@guiexpert/vue3-table 1.0.2 → 1.0.4

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/vue3-table.es.js CHANGED
@@ -1,10 +1,10 @@
1
- import { defineComponent as G, ref as N, onMounted as z, openBlock as j, createElementBlock as X, createVNode as K, render as k } from "vue";
2
- class B {
3
- constructor(e = -1, t = -1, s = -1, i = -1, o, r, l, n = 0, a = 0, d = 0, S = "") {
4
- this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = i, this.areaIdent = o, this.sideIdent = r, this.originalEvent = l, this.clickCount = n, this.draggingX = a, this.draggingY = d, this.action = S;
1
+ import { defineComponent as ce, ref as ue, onMounted as ge, openBlock as be, createElementBlock as pe, createVNode as fe, render as Q } from "vue";
2
+ class X {
3
+ constructor(e = -1, t = -1, o = -1, s = -1, i, r, l, n = 0, d = 0, a = 0, c = "") {
4
+ this.rowIndex = e, this.rowTop = t, this.columnIndex = o, this.columnLeft = s, this.areaIdent = i, this.sideIdent = r, this.originalEvent = l, this.clickCount = n, this.draggingX = d, this.draggingY = a, this.action = c;
5
5
  }
6
6
  clone() {
7
- return new B(
7
+ return new X(
8
8
  this.rowIndex,
9
9
  this.rowTop,
10
10
  this.columnIndex,
@@ -19,47 +19,47 @@ class B {
19
19
  );
20
20
  }
21
21
  }
22
- class I {
23
- constructor(e = ">", t = "", s = []) {
24
- this.content = e, this.style = t, this.classes = s;
22
+ class L {
23
+ constructor(e = ">", t = "", o = []) {
24
+ this.content = e, this.style = t, this.classes = o;
25
25
  }
26
26
  }
27
- class H {
28
- constructor(e = new I(
27
+ class le {
28
+ constructor(e = new L(
29
29
  ">",
30
30
  "transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
31
31
  ["gt-table-tree-arrow-expanded"]
32
- ), t = new I(
32
+ ), t = new L(
33
33
  ">",
34
34
  "",
35
35
  ["ge-table-tree-arrow-collapsed"]
36
- ), s = new I(
36
+ ), o = new L(
37
37
  ">",
38
38
  "color:transparent;",
39
39
  ["gt-table-tree-arrow-hidden"]
40
- ), i = new I(
40
+ ), s = new L(
41
41
  "↕",
42
42
  "",
43
43
  ["gt-table-tree-arrow-expanded-all"]
44
44
  )) {
45
- this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = s, this.arrowExpandCollapseAll = i;
45
+ this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = o, this.arrowExpandCollapseAll = s;
46
46
  }
47
47
  }
48
- class W {
49
- constructor(e = new I("↑", "", ["ge-header-sorted-asc"]), t = new I("↓", "", ["ge-header-sorted-desc"]), s = new I("↑", "color:transparent;", [])) {
50
- this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = s;
48
+ class ne {
49
+ constructor(e = new L("↑", "", ["ge-header-sorted-asc"]), t = new L("↓", "", ["ge-header-sorted-desc"]), o = new L("↑", "color:transparent;", [])) {
50
+ this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = o;
51
51
  }
52
52
  }
53
- class Y {
53
+ class me {
54
54
  constructor(e) {
55
55
  this.domService = e;
56
56
  }
57
- setStyle(e, t, s) {
58
- return this.domService.setStyle(e, t, s), e;
57
+ setStyle(e, t, o) {
58
+ return this.domService.setStyle(e, t, o), e;
59
59
  }
60
60
  applyStyle(e, t) {
61
- for (const s in t)
62
- this.domService.setStyle(e, s, t[s]);
61
+ for (const o in t)
62
+ this.domService.setStyle(e, o, t[o]);
63
63
  return e;
64
64
  }
65
65
  applyDisplayNoneStyle(e) {
@@ -69,7 +69,7 @@ class Y {
69
69
  return this.domService.setStyle(e, "display", "block"), e;
70
70
  }
71
71
  applyStyleInPx(e, t) {
72
- return Object.entries(t).forEach(([s, i]) => this.domService.setStyle(e, s, i + "px")), e;
72
+ return Object.entries(t).forEach(([o, s]) => this.domService.setStyle(e, o, s + "px")), e;
73
73
  }
74
74
  applyStylePosistionRelative(e) {
75
75
  return this.domService.setStyle(e, "position", "relative"), this.domService.setStyle(e, "overflow", "clip"), e;
@@ -80,8 +80,8 @@ class Y {
80
80
  applyStyleFullSize(e) {
81
81
  return this.domService.setStyle(e, "width", "100%"), this.domService.setStyle(e, "height", "100%"), e;
82
82
  }
83
- applyStyleOverflowAuto(e = "auto", t = "auto", s) {
84
- return this.domService.setStyle(s, "overflow-x", e), this.domService.setStyle(s, "overflow-y", t), s;
83
+ applyStyleOverflowAuto(e = "auto", t = "auto", o) {
84
+ return this.domService.setStyle(o, "overflow-x", e), this.domService.setStyle(o, "overflow-y", t), o;
85
85
  }
86
86
  applyStyleNoPadding(e) {
87
87
  return this.domService.setStyle(e, "padding", "0"), this.domService.setStyle(e, "margin", "0"), this.domService.setStyle(e, "border", "0"), e;
@@ -97,156 +97,156 @@ class Y {
97
97
  return this.domService.appendChild(e, t), this.applyStylePosistionAbsolute(e), { parent: e, child: t, cache: {} };
98
98
  }
99
99
  appendText(e, t) {
100
- const s = this.domService.createText(t);
101
- return this.domService.appendChild(e, s), s;
100
+ const o = this.domService.createText(t);
101
+ return this.domService.appendChild(e, o), o;
102
102
  }
103
103
  addClass(e, t) {
104
- return e.includes(" ") ? e.split(" ").forEach((s) => this.domService.addClass(t, s)) : this.domService.addClass(t, e), t;
104
+ return e.includes(" ") ? e.split(" ").forEach((o) => this.domService.addClass(t, o)) : this.domService.addClass(t, e), t;
105
105
  }
106
106
  addClasses(e, t) {
107
107
  if (e)
108
- for (const s of e)
109
- this.domService.addClass(t, s);
108
+ for (const o of e)
109
+ this.domService.addClass(t, o);
110
110
  return t;
111
111
  }
112
- setAttribute(e, t, s) {
113
- return t && s && this.domService.setAttribute(e, t, s), e;
112
+ setAttribute(e, t, o) {
113
+ return t && o && this.domService.setAttribute(e, t, o), e;
114
114
  }
115
- createAreaDivWithClass(e, t, s, i) {
116
- const o = this.domService.createElement("div");
117
- 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;
115
+ createAreaDivWithClass(e, t, o, s) {
116
+ const i = this.domService.createElement("div");
117
+ return this.addClass(e, i), this.domService.setAttribute(i, "data-area", o), this.domService.setAttribute(i, "data-side", s), this.domService.appendChild(t, i), i;
118
118
  }
119
119
  createDivWithClass(e, t) {
120
- const s = this.domService.createElement("div");
121
- return this.addClass(e, s), this.domService.appendChild(t, s), s;
120
+ const o = this.domService.createElement("div");
121
+ return this.addClass(e, o), this.domService.appendChild(t, o), o;
122
122
  }
123
- addRowDiv(e, t, s = -1, i, o, r = "") {
123
+ addRowDiv(e, t, o = -1, s, i, r = "") {
124
124
  const l = t.index ?? -1, n = this.getDivOrCreateDiv(l, e);
125
- if (this.domService.addClass(n, "ge-table-row-div"), this.domService.addClass(n, `ge-table-row-div-${t.index}`), i === "body" && o === "center") {
126
- const a = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
127
- this.domService.addClass(n, `ge-table-row-${a}`);
125
+ if (this.domService.addClass(n, "ge-table-row-div"), this.domService.addClass(n, `ge-table-row-div-${t.index}`), s === "body" && i === "center") {
126
+ const d = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
127
+ this.domService.addClass(n, `ge-table-row-${d}`);
128
128
  }
129
- 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) {
130
- const a = this.domService.createText(r);
131
- this.domService.appendChild(n, a);
129
+ 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", `${o}`), this.domService.setAttribute(n, "data-area", `${s}`), r) {
130
+ const d = this.domService.createText(r);
131
+ this.domService.appendChild(n, d);
132
132
  }
133
133
  return this.domService.appendChild(e.child, n), n;
134
134
  }
135
- addColumnDiv(e, t, s = -1, i = -1, o, r, l = "", n, a, d = void 0, S) {
136
- const g = a == null ? void 0 : a.treeOptions, f = a == null ? void 0 : a.showCheckboxWihoutExtraColumn, c = this.domService.createElement("div");
137
- 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}`);
138
- const b = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
139
- 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)), f && i === 0 && d && this.addCheckboxToDiv(c, d, o, s), l) {
140
- const p = n !== "none" && i === 0;
141
- this.addLabelDiv(c, l, p, s, i, o);
135
+ addColumnDiv(e, t, o = -1, s = -1, i, r, l = "", n, d, a = void 0, c) {
136
+ const g = d == null ? void 0 : d.treeOptions, m = d == null ? void 0 : d.showCheckboxWihoutExtraColumn, b = this.domService.createElement("div");
137
+ this.domService.addClass(b, "ge-table-col-div"), this.domService.addClass(b, `ge-table-col-div-${t.index}`), this.domService.setAttribute(b, "data-col-index", `${t.index}`), this.domService.setAttribute(b, "data-row-index", `${o}`), this.domService.setAttribute(b, "data-area", `${i}`);
138
+ const w = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
139
+ if (i === "body" && r === "center" && this.domService.addClass(b, `ge-table-column-${w}`), this.domService.setStyle(b, "display", "clip"), this.domService.setStyle(b, "position", "absolute"), this.domService.setStyle(b, "left", `${t.left}px`), this.domService.setStyle(b, "top", `${t.top}px`), this.domService.setStyle(b, "width", `${t.width}px`), this.domService.setStyle(b, "height", `${t.height}px`), n && n !== "none" && (this.domService.addClass(b, "ge-table-col-tree"), this.addArrowDiv(b, n, g, o, s, i)), m && s === 0 && a && this.addCheckboxToDiv(b, a, i, o), l) {
140
+ const u = n !== "none" && s === 0;
141
+ this.addLabelDiv(b, l, u, o, s, i);
142
142
  }
143
- return S && this.addSortedIcon(c, S, a == null ? void 0 : a.sortedOptions, i), this.domService.appendChild(e, c), c;
143
+ return c && this.addSortedIcon(b, c, d == null ? void 0 : d.sortedOptions, s), this.domService.appendChild(e, b), b;
144
144
  }
145
- addCheckboxToDiv(e, t, s, i) {
146
- const o = this.domService.createElement("div"), r = t === "full" ? "checked" : "";
147
- return o.innerHTML = `
145
+ addCheckboxToDiv(e, t, o, s) {
146
+ const i = this.domService.createElement("div"), r = t === "full" ? "checked" : "";
147
+ return i.innerHTML = `
148
148
  <input
149
149
  type="checkbox"
150
- data-area="${s}"
151
- data-row-index="${i}"
150
+ data-area="${o}"
151
+ data-row-index="${s}"
152
152
  data-input-type="checkbox"
153
153
  ${r}
154
- 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;
154
+ class="ge-table-row-checkbox"> `, this.domService.setStyle(i, "display", "inline"), this.domService.setStyle(i, "width", "inherit"), this.domService.setAttribute(i, "data-row-index", `${s}`), this.domService.appendChild(e, i), i;
155
155
  }
156
- addLabelDiv(e, t = "", s = !1, i = -1, o = -1, r = "body") {
156
+ addLabelDiv(e, t = "", o = !1, s = -1, i = -1, r = "body") {
157
157
  const l = this.domService.createElement("div");
158
- if (this.domService.addClass(l, "ge-table-label-div"), this.domService.setStyle(l, "position", "relative"), this.domService.setStyle(l, "background", "transparent"), this.domService.setStyle(l, "width", "100%"), this.domService.setStyle(l, "height", "100%"), this.domService.setAttribute(l, "data-row-index", `${i}`), this.domService.setAttribute(l, "data-col-index", `${o}`), this.domService.setAttribute(l, "data-area", `${r}`), t)
159
- if (s) {
158
+ if (this.domService.addClass(l, "ge-table-label-div"), this.domService.setStyle(l, "position", "relative"), this.domService.setStyle(l, "background", "transparent"), this.domService.setStyle(l, "width", "100%"), this.domService.setStyle(l, "height", "100%"), this.domService.setAttribute(l, "data-row-index", `${s}`), this.domService.setAttribute(l, "data-col-index", `${i}`), this.domService.setAttribute(l, "data-area", `${r}`), t)
159
+ if (o) {
160
160
  const n = this.domService.createText(t);
161
161
  this.domService.appendChild(l, n);
162
162
  } else {
163
163
  const n = this.domService.createElement("div");
164
164
  this.domService.appendChild(l, n);
165
- const a = this.domService.createText(t);
166
- this.domService.addClass(n, "ge-table-label"), this.domService.appendChild(n, a), this.domService.setAttribute(n, "data-row-index", `${i}`), this.domService.setAttribute(n, "data-col-index", `${o}`), this.domService.setAttribute(n, "data-area", `${r}`);
165
+ const d = this.domService.createText(t);
166
+ this.domService.addClass(n, "ge-table-label"), this.domService.appendChild(n, d), this.domService.setAttribute(n, "data-row-index", `${s}`), this.domService.setAttribute(n, "data-col-index", `${i}`), this.domService.setAttribute(n, "data-area", `${r}`);
167
167
  }
168
168
  return this.domService.appendChild(e, l), l;
169
169
  }
170
- addSortedIcon(e, t = "", s = new W(), i = -1) {
171
- const o = this.domService.createElement("div");
172
- 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");
170
+ addSortedIcon(e, t = "", o = new ne(), s = -1) {
171
+ const i = this.domService.createElement("div");
172
+ this.domService.addClass(i, "ge-table-sorted-icon-div"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "top", "0"), this.domService.setStyle(i, "right", "0"), this.domService.setStyle(i, "width", "20px"), this.domService.setStyle(i, "background", "transparent"), this.domService.setStyle(i, "cursor", "pointer"), this.domService.setAttribute(i, "data-col-index", `${s}`), this.domService.setAttribute(i, "data-area", "header");
173
173
  let r;
174
- t === "asc" ? r = s.iconAsc : t === "desc" ? r = s.iconDesc : r = s.iconPlaceholder;
174
+ t === "asc" ? r = o.iconAsc : t === "desc" ? r = o.iconDesc : r = o.iconPlaceholder;
175
175
  const l = r.content, n = this.domService.createText(l);
176
- this.domService.appendChild(o, n), r.style && this.applyStyleString(o, r.style);
177
- for (const a of r.classes)
178
- this.domService.addClass(o, a);
179
- return this.domService.appendChild(e, o), o;
176
+ this.domService.appendChild(i, n), r.style && this.applyStyleString(i, r.style);
177
+ for (const d of r.classes)
178
+ this.domService.addClass(i, d);
179
+ return this.domService.appendChild(e, i), i;
180
180
  }
181
- addArrowDiv(e, t = "none", s = new H(), i = -1, o = -1, r = "body") {
181
+ addArrowDiv(e, t = "none", o = new le(), s = -1, i = -1, r = "body") {
182
182
  const l = this.domService.createElement("div");
183
- this.domService.addClass(l, "ge-table-tree-arrow-div"), this.domService.setStyle(l, "display", "inline-block"), this.domService.setStyle(l, "position", ""), this.domService.setStyle(l, "width", "20px"), this.domService.setStyle(l, "background", "transparent"), this.domService.setStyle(l, "cursor", "pointer"), this.domService.setAttribute(l, "data-row-index", `${i}`), this.domService.setAttribute(l, "data-col-index", `${o}`), this.domService.setAttribute(l, "data-area", `${r}`);
183
+ this.domService.addClass(l, "ge-table-tree-arrow-div"), this.domService.setStyle(l, "display", "inline-block"), this.domService.setStyle(l, "position", ""), this.domService.setStyle(l, "width", "20px"), this.domService.setStyle(l, "background", "transparent"), this.domService.setStyle(l, "cursor", "pointer"), this.domService.setAttribute(l, "data-row-index", `${s}`), this.domService.setAttribute(l, "data-col-index", `${i}`), this.domService.setAttribute(l, "data-area", `${r}`);
184
184
  let n;
185
- t === "expanded" ? n = s.arrowExpanded : t === "collapsed" ? n = s.arrowCollapsed : n = s.arrowPlaceholder;
186
- const a = n.content, d = this.domService.createText(a);
187
- this.domService.appendChild(l, d), n.style && this.applyStyleString(l, n.style);
188
- for (const S of n.classes)
189
- this.domService.addClass(l, S);
185
+ t === "expanded" ? n = o.arrowExpanded : t === "collapsed" ? n = o.arrowCollapsed : n = o.arrowPlaceholder;
186
+ const d = n.content, a = this.domService.createText(d);
187
+ this.domService.appendChild(l, a), n.style && this.applyStyleString(l, n.style);
188
+ for (const c of n.classes)
189
+ this.domService.addClass(l, c);
190
190
  return this.domService.appendChild(e, l), l;
191
191
  }
192
- addColumnBorderDivs(e, t, s, i, o) {
192
+ addColumnBorderDivs(e, t, o, s, i) {
193
193
  if (e.verticalBorderVisible) {
194
- const r = `ge-table-${i}-${o}-vertical-border`;
195
- this.addVerticalBorder(s, t, r);
194
+ const r = `ge-table-${s}-${i}-vertical-border`;
195
+ this.addVerticalBorder(o, t, r);
196
196
  }
197
197
  if (e.horizontalBorderVisible) {
198
- const r = `ge-table-${i}-${o}-horizontal-border`;
199
- this.addHorizontalBorder(s, t, r);
198
+ const r = `ge-table-${s}-${i}-horizontal-border`;
199
+ this.addHorizontalBorder(o, t, r);
200
200
  }
201
201
  return t;
202
202
  }
203
- addHorizontalBorder(e, t, s = "ge-table-body-center-horizontal-border") {
204
- const i = this.domService.createElement("div");
205
- 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;
203
+ addHorizontalBorder(e, t, o = "ge-table-body-center-horizontal-border") {
204
+ const s = this.domService.createElement("div");
205
+ return this.domService.addClass(s, o), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${e.left}px`), this.domService.setStyle(s, "top", `${e.top}px`), this.domService.setStyle(s, "width", `${e.width}px`), this.domService.setStyle(s, "height", "1px"), this.domService.appendChild(t, s), s;
206
206
  }
207
- addFocusBorderDivs(e, t, s) {
208
- let i = this.domService.createElement("div");
209
- 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;
207
+ addFocusBorderDivs(e, t, o) {
208
+ let s = this.domService.createElement("div");
209
+ 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, o), this.domService.appendChild(e, s), s = this.domService.createElement("div"), this.domService.addClass(s, "ge-table-focus-border"), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${t.left + t.width - 1}px`), this.domService.setStyle(s, "top", `${t.top}px`), this.domService.setStyle(s, "width", "1px"), this.domService.setStyle(s, "height", `${t.height}px`), this.applyStyle(s, o), this.domService.appendChild(e, s), s = this.domService.createElement("div"), this.domService.addClass(s, "ge-table-focus-border"), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${t.left}px`), this.domService.setStyle(s, "top", `${t.top}px`), this.domService.setStyle(s, "width", `${t.width}px`), this.domService.setStyle(s, "height", "1px"), this.applyStyle(s, o), this.domService.appendChild(e, s), s = this.domService.createElement("div"), this.domService.addClass(s, "ge-table-focus-border"), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${t.left}px`), this.domService.setStyle(s, "top", `${t.top + t.height - 1}px`), this.domService.setStyle(s, "width", `${t.width}px`), this.domService.setStyle(s, "height", "1px"), this.applyStyle(s, o), this.domService.appendChild(e, s), e;
210
210
  }
211
- addVerticalBorder(e, t, s = "ge-table-body-center-vertical-border") {
212
- const i = this.domService.createElement("div");
213
- 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;
211
+ addVerticalBorder(e, t, o = "ge-table-body-center-vertical-border") {
212
+ const s = this.domService.createElement("div");
213
+ return this.domService.addClass(s, o), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${e.left}px`), this.domService.setStyle(s, "top", `${e.top}px`), this.domService.setStyle(s, "width", "1px"), this.domService.setStyle(s, "height", `${e.height}px`), this.domService.appendChild(t, s), s;
214
214
  }
215
- addDiv(e, t, s = "") {
216
- const i = this.domService.createElement("div");
217
- 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;
215
+ addDiv(e, t, o = "") {
216
+ const s = this.domService.createElement("div");
217
+ return o && this.domService.addClass(s, o), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${t.left}px`), this.domService.setStyle(s, "top", `${t.top}px`), this.domService.setStyle(s, "width", `${t.width}px`), this.domService.setStyle(s, "height", `${t.height}px`), this.domService.appendChild(e, s), s;
218
218
  }
219
219
  applyStyleString(e, t) {
220
- const s = t.split(";").map((i) => i.trim()).filter((i) => i);
221
- for (const i of s) {
222
- const [o, r] = i.split(":");
223
- this.domService.setStyle(e, o.trim(), r.trim());
220
+ const o = t.split(";").map((s) => s.trim()).filter((s) => s);
221
+ for (const s of o) {
222
+ const [i, r] = s.split(":");
223
+ this.domService.setStyle(e, i.trim(), r.trim());
224
224
  }
225
225
  }
226
226
  getDivOrCreateDiv(e, t) {
227
- let s = t.cache[e];
228
- return s ? (s.innerText = "", s) : (s = this.domService.createElement("div"), t.cache[e] = s, s);
227
+ let o = t.cache[e];
228
+ return o ? (o.innerText = "", o) : (o = this.domService.createElement("div"), t.cache[e] = o, o);
229
229
  }
230
230
  }
231
- class O {
232
- constructor(e, t = !0, s, i, o = 0, r = !1, l = !1) {
233
- this.data = e, this.expanded = t, this.children = s, this.parent = i, this.deep = o, this.checked = r, this.keep = l;
231
+ class F {
232
+ constructor(e, t = !0, o, s, i = 0, r = !1, l = !1) {
233
+ this.data = e, this.expanded = t, this.children = o, this.parent = s, this.deep = i, this.checked = r, this.keep = l;
234
234
  }
235
235
  }
236
- const $ = (h) => h === "header" ? "header" : h === "footer" ? "footer" : "body";
237
- class q {
236
+ const Y = (h) => h === "header" ? "header" : h === "footer" ? "footer" : "body";
237
+ class we {
238
238
  constructor(e, t) {
239
239
  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)) {
240
240
  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"));
241
- const s = e.getAttribute("data-area");
242
- if (s && (this.areaIdent = $(s), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
243
- const i = e;
244
- this.value = i.value;
241
+ const o = e.getAttribute("data-area");
242
+ if (o && (this.areaIdent = Y(o), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
243
+ const s = e;
244
+ this.value = s.value;
245
245
  }
246
246
  }
247
247
  }
248
248
  }
249
- class U {
249
+ class Se {
250
250
  constructor(e) {
251
251
  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(
252
252
  (t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
@@ -258,51 +258,51 @@ class U {
258
258
  this.tableScope.contextmenu(t);
259
259
  }
260
260
  onHostElementClicked(e) {
261
- const t = new q(e.target, this.tableScope);
261
+ const t = new we(e.target, this.tableScope);
262
262
  if (t.action === "toggleExpandCollapseAll")
263
263
  this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
264
264
  else if (t.inputType === "checkbox" && t.areaIdent)
265
265
  this.tableScope.toggleRowCheckbox(t.rowIdx, t.colIdx, t.areaIdent), e.preventDefault(), e.stopPropagation();
266
- else if (t.row instanceof O && t.areaModel) {
267
- const s = t.colIdx === this.getArrowColumnIndex() && e.altKey, i = t.className.includes("ge-table-tree-arrow-div");
268
- if (console.info(i, s), s || i) {
266
+ else if (t.row instanceof F && t.areaModel) {
267
+ const o = t.colIdx === this.getArrowColumnIndex() && e.altKey, s = t.className.includes("ge-table-tree-arrow-div");
268
+ if (console.info(s, o), o || s) {
269
269
  e.preventDefault(), e.stopPropagation();
270
- const o = t.row;
271
- 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);
270
+ const i = t.row;
271
+ i.expanded = !i.expanded, "recalcVisibleTreeRows" in t.areaModel && t.areaModel.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(i);
272
272
  }
273
273
  }
274
274
  if (t.areaIdent === "body" && this.tableScope.tableOptions.getFocusModel) {
275
- const s = this.tableScope.tableOptions.getFocusModel();
276
- s == null || s.clear(), s == null || s.setFocus(t.rowIdx, t.colIdx);
275
+ const o = this.tableScope.tableOptions.getFocusModel();
276
+ o == null || o.clear(), o == null || o.setFocus(t.rowIdx, t.colIdx);
277
277
  }
278
278
  this.publishGeMouseEvent(e, 1);
279
279
  }
280
280
  onHostElementDblClicked(e) {
281
281
  if (e.target instanceof HTMLElement) {
282
- const t = e.target, s = t.getAttribute("data-area"), i = $(s), o = Number(t.getAttribute("data-row-index")), r = Number(t.getAttribute("data-col-index")), l = this.tableScope.tableModel.getAreaModel(i);
283
- if (s && i === "header")
284
- this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, o, r));
282
+ const t = e.target, o = t.getAttribute("data-area"), s = Y(o), i = Number(t.getAttribute("data-row-index")), r = Number(t.getAttribute("data-col-index")), l = this.tableScope.tableModel.getAreaModel(s);
283
+ if (o && s === "header")
284
+ this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, i, r));
285
285
  else if (t.getAttribute("data-row-index")) {
286
- const n = l.getRowByIndex(o);
287
- if (s && i === "body" && l.isEditable(o, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(o, r)), n instanceof O && r === this.getArrowColumnIndex()) {
286
+ const n = l.getRowByIndex(i);
287
+ if (o && s === "body" && l.isEditable(i, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(i, r)), n instanceof F && r === this.getArrowColumnIndex()) {
288
288
  e.preventDefault(), e.stopPropagation();
289
- const a = n;
290
- a.expanded = !a.expanded, "recalcVisibleTreeRows" in l && l.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(a);
289
+ const d = n;
290
+ d.expanded = !d.expanded, "recalcVisibleTreeRows" in l && l.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(d);
291
291
  }
292
292
  }
293
293
  }
294
294
  this.publishGeMouseEvent(e, 2);
295
295
  }
296
296
  publishGeMouseEvent(e, t) {
297
- var s;
298
- 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);
297
+ var o;
298
+ this.mouseEvent = e, this.geMouseEventOld = (o = this.geMouseEvent) == null ? void 0 : o.clone(), this.geMouseEvent = this.tableScope.createGeMouseEvent(e), this.geMouseEvent && (this.geMouseEvent.clickCount = t), this.tableScope.onMouseClicked(this.geMouseEvent, this.geMouseEventOld);
299
299
  }
300
300
  updateCollapsedExpandedState(e) {
301
- var s, i, o, r, l;
302
- const t = (i = (s = this.tableScope.tableOptions) == null ? void 0 : s.autoRestoreOptions) == null ? void 0 : i.getRowId;
301
+ var o, s, i, r, l;
302
+ const t = (s = (o = this.tableScope.tableOptions) == null ? void 0 : o.autoRestoreOptions) == null ? void 0 : s.getRowId;
303
303
  if (t) {
304
- const n = (o = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : o.collapsedExpandedStateGet().mode, a = n === "collapsed" && !e.expanded || n === "expanded" && e.expanded, d = n === "collapsed" && e.expanded || n === "expanded" && !e.expanded, S = t(e.data);
305
- a ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(S) : d && ((l = this.tableScope.storeStateCollapsedExpandService) == null || l.collapsedStateIdsRemove(S));
304
+ const n = (i = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : i.collapsedExpandedStateGet().mode, d = n === "collapsed" && !e.expanded || n === "expanded" && e.expanded, a = n === "collapsed" && e.expanded || n === "expanded" && !e.expanded, c = t(e.data);
305
+ d ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(c) : a && ((l = this.tableScope.storeStateCollapsedExpandService) == null || l.collapsedStateIdsRemove(c));
306
306
  }
307
307
  }
308
308
  getArrowColumnIndex() {
@@ -338,7 +338,7 @@ class U {
338
338
  }
339
339
  }
340
340
  }
341
- class J {
341
+ class xe {
342
342
  constructor(e) {
343
343
  this.tableScope = e;
344
344
  }
@@ -371,20 +371,20 @@ class J {
371
371
  this.tableScope.repaint();
372
372
  }
373
373
  }
374
- class Q {
374
+ class ye {
375
375
  flattenTree(e, t = []) {
376
- var s;
377
- for (const i of e)
378
- this.isVisible(i) && t.push(i), (s = i.children) != null && s.length && this.flattenTree(i.children, t);
376
+ var o;
377
+ for (const s of e)
378
+ this.isVisible(s) && t.push(s), (o = s.children) != null && o.length && this.flattenTree(s.children, t);
379
379
  return t;
380
380
  }
381
381
  isVisible(e) {
382
382
  return e.parent ? e.parent.expanded ? this.isVisible(e.parent) : !1 : !0;
383
383
  }
384
384
  }
385
- class Z {
386
- constructor(e, t = [], s = -1) {
387
- this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = s, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((i) => i.rendererMap[e]);
385
+ class K {
386
+ constructor(e, t = [], o = -1) {
387
+ this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = o, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((s) => s.rendererMap[e]);
388
388
  }
389
389
  getTooltipAt(e, t) {
390
390
  return "";
@@ -410,14 +410,14 @@ class Z {
410
410
  return !0;
411
411
  }
412
412
  isRowChecked(e) {
413
- var s;
413
+ var o;
414
414
  const t = this.getRowByIndex(e);
415
- return (s = this.rowSelectionModel) == null ? void 0 : s.isRowChecked(t);
415
+ return (o = this.rowSelectionModel) == null ? void 0 : o.isRowChecked(t);
416
416
  }
417
417
  setRowChecked(e, t) {
418
418
  if (this.rowSelectionModel) {
419
- const s = this.getRowByIndex(e);
420
- this.rowSelectionModel.checkRow(s, t);
419
+ const o = this.getRowByIndex(e);
420
+ this.rowSelectionModel.checkRow(o, t);
421
421
  }
422
422
  }
423
423
  getMaxColspan() {
@@ -441,12 +441,12 @@ class Z {
441
441
  isEditable(e, t) {
442
442
  return this.columnDefs && t < this.columnDefs.length && this.columnDefs[t].editable ? this.columnDefs[t].editable() : !1;
443
443
  }
444
- setValue(e, t, s) {
444
+ setValue(e, t, o) {
445
445
  var l;
446
- const i = (l = this.columnDefs[t]) == null ? void 0 : l.editInputPipe;
447
- i && (s = i(s, e, t));
448
- const o = this.getRowByIndex(e), r = this.columnDefs[t].property;
449
- return r.includes(".") ? this.setPropertyValue(o, r.split("."), s) : (o[r] = s, !0);
446
+ const s = (l = this.columnDefs[t]) == null ? void 0 : l.editInputPipe;
447
+ s && (o = s(o, e, t));
448
+ const i = this.getRowByIndex(e), r = this.columnDefs[t].property;
449
+ return r.includes(".") ? this.setPropertyValue(i, r.split("."), o) : (i[r] = o, !0);
450
450
  }
451
451
  isSelectable(e, t) {
452
452
  return !0;
@@ -454,17 +454,17 @@ class Z {
454
454
  changeColumnOrder(e, t) {
455
455
  this.arrayMove(this.cellRenderers, e, t);
456
456
  }
457
- setPropertyValue(e, t, s) {
458
- const i = t.shift();
459
- if (i) {
460
- let o = e[i];
461
- return o && t.length ? this.setPropertyValue(o, t, s) : (e[i] = s, !0);
457
+ setPropertyValue(e, t, o) {
458
+ const s = t.shift();
459
+ if (s) {
460
+ let i = e[s];
461
+ return i && t.length ? this.setPropertyValue(i, t, o) : (e[s] = o, !0);
462
462
  }
463
463
  return !1;
464
464
  }
465
- arrayMove(e, t, s) {
466
- const i = e.splice(t, 1)[0];
467
- return e.splice(s, 0, i), e;
465
+ arrayMove(e, t, o) {
466
+ const s = e.splice(t, 1)[0];
467
+ return e.splice(o, 0, s), e;
468
468
  }
469
469
  calcYPositions() {
470
470
  const e = this.getRowCount();
@@ -473,27 +473,27 @@ class Z {
473
473
  this.yPositions[t + 1] = this.getRowHeight(t) + this.yPositions[t];
474
474
  }
475
475
  }
476
- class ee {
477
- genericSortComparator(e, t, s) {
476
+ class ae {
477
+ genericSortComparator(e, t, o) {
478
478
  if (typeof e == "number" && typeof t == "number")
479
- return s * (e - t);
479
+ return o * (e - t);
480
480
  if (typeof e == "string" && typeof t == "string")
481
- return s * e.localeCompare(t);
481
+ return o * e.localeCompare(t);
482
482
  if (typeof e == "boolean" && typeof t == "boolean")
483
- return s * ((e ? -1 : 1) - (t ? -1 : 1));
483
+ return o * ((e ? -1 : 1) - (t ? -1 : 1));
484
484
  if (e instanceof Date && t instanceof Date)
485
- return s * (e.getTime() - t.getTime());
485
+ return o * (e.getTime() - t.getTime());
486
486
  if (e instanceof Array && t instanceof Array) {
487
- const i = e, o = t;
488
- if (i.length && o.length)
489
- return this.genericSortComparator(i[0], o[0], s);
487
+ const s = e, i = t;
488
+ if (s.length && i.length)
489
+ return this.genericSortComparator(s[0], i[0], o);
490
490
  }
491
- return s * ("" + e).localeCompare("" + t);
491
+ return o * ("" + e).localeCompare("" + t);
492
492
  }
493
493
  }
494
- class L extends Z {
495
- constructor(e, t, s, i = []) {
496
- super(e, i, s), this.areaIdent = e, this.rows = t, this.defaultRowHeight = s, this.columnDefs = i, this.sorterService = new ee(), this.service = new Q(), this.properties = i.map((o) => o.property), this.flattenRows = this.service.flattenTree(t), this.filteredFlattenRows = [...this.flattenRows];
494
+ class V extends K {
495
+ constructor(e, t, o, s = []) {
496
+ super(e, s, o), this.areaIdent = e, this.rows = t, this.defaultRowHeight = o, this.columnDefs = s, this.sorterService = new ae(), this.service = new ye(), this.properties = s.map((i) => i.property), this.flattenRows = this.service.flattenTree(t), this.filteredFlattenRows = [...this.flattenRows];
497
497
  }
498
498
  changeColumnOrder(e, t) {
499
499
  this.arrayMove(this.properties, e, t), super.changeColumnOrder(e, t);
@@ -511,11 +511,11 @@ class L extends Z {
511
511
  return e;
512
512
  }
513
513
  getValueAt(e, t) {
514
- const s = this.getRowByIndex(e);
515
- if (s) {
516
- const i = this.properties[t];
517
- if (i)
518
- return i.includes(".") ? this.getPropertyValue(s.data, i.split(".")) : s.data[i];
514
+ const o = this.getRowByIndex(e);
515
+ if (o) {
516
+ const s = this.properties[t];
517
+ if (s)
518
+ return s.includes(".") ? this.getPropertyValue(o.data, s.split(".")) : o.data[s];
519
519
  }
520
520
  return "";
521
521
  }
@@ -535,8 +535,8 @@ class L extends Z {
535
535
  this.lastPredictFn = e, this.doFiltering();
536
536
  }
537
537
  doSort(e) {
538
- const { columnIndex: t, sortState: s } = e[e.length - 1], i = s === "asc" ? 1 : s === "desc" ? -1 : 0, o = this.properties[t];
539
- return this.treeSort(this.rows, o, i), this.flattenRows = this.service.flattenTree(this.rows), this.filteredFlattenRows = [...this.flattenRows], !0;
538
+ const { columnIndex: t, sortState: o } = e[e.length - 1], s = o === "asc" ? 1 : o === "desc" ? -1 : 0, i = this.properties[t];
539
+ return this.treeSort(this.rows, i, s), this.flattenRows = this.service.flattenTree(this.rows), this.filteredFlattenRows = [...this.flattenRows], !0;
540
540
  }
541
541
  toggleExpandCollapseAll(e) {
542
542
  this.expandAllRecursive(this.rows, e), this.flattenRows = this.service.flattenTree(this.rows), this.doFiltering();
@@ -544,26 +544,26 @@ class L extends Z {
544
544
  setAllParentsOk(e) {
545
545
  return e.parent && (e.parent.keep = !0, this.setAllParentsOk(e.parent)), !1;
546
546
  }
547
- setValue(e, t, s) {
547
+ setValue(e, t, o) {
548
548
  var r;
549
- const i = (r = this.columnDefs[t]) == null ? void 0 : r.editInputPipe;
550
- i && (s = i(s, e, t));
551
- const o = this.getRowByIndex(e);
552
- if (o) {
553
- const l = o.data, n = this.columnDefs[t].property;
554
- return n.includes(".") ? this.setPropertyValue(l, n.split("."), s) : (l[n] = s, !0);
549
+ const s = (r = this.columnDefs[t]) == null ? void 0 : r.editInputPipe;
550
+ s && (o = s(o, e, t));
551
+ const i = this.getRowByIndex(e);
552
+ if (i) {
553
+ const l = i.data, n = this.columnDefs[t].property;
554
+ return n.includes(".") ? this.setPropertyValue(l, n.split("."), o) : (l[n] = o, !0);
555
555
  }
556
556
  return !1;
557
557
  }
558
558
  genericTreeTableSortComparator(e, t) {
559
- return (s, i) => {
560
- const o = this.getValueByT(s.data, e), r = this.getValueByT(i.data, e);
561
- return this.sorterService.genericSortComparator(o, r, t);
559
+ return (o, s) => {
560
+ const i = this.getValueByT(o.data, e), r = this.getValueByT(s.data, e);
561
+ return this.sorterService.genericSortComparator(i, r, t);
562
562
  };
563
563
  }
564
564
  expandAllRecursive(e, t) {
565
- for (const s of e)
566
- s.expanded = t, s.children && this.expandAllRecursive(s.children, t);
565
+ for (const o of e)
566
+ o.expanded = t, o.children && this.expandAllRecursive(o.children, t);
567
567
  }
568
568
  doFiltering() {
569
569
  if (!this.lastPredictFn)
@@ -571,59 +571,59 @@ class L extends Z {
571
571
  else {
572
572
  this.flattenRows || (this.flattenRows = []);
573
573
  let e = 0;
574
- this.flattenRows.forEach((s) => {
575
- e = Math.max(e, s.deep);
574
+ this.flattenRows.forEach((o) => {
575
+ e = Math.max(e, o.deep);
576
576
  });
577
577
  const t = this.flattenRows.filter(
578
- (s, i, o) => this.lastPredictFn(s, i, o)
578
+ (o, s, i) => this.lastPredictFn(o, s, i)
579
579
  );
580
- this.flattenRows.forEach((s) => s.keep = !1), this.flattenRows.forEach((s) => {
581
- t.includes(s) && (s.keep = !0, this.setAllParentsOk(s));
580
+ this.flattenRows.forEach((o) => o.keep = !1), this.flattenRows.forEach((o) => {
581
+ t.includes(o) && (o.keep = !0, this.setAllParentsOk(o));
582
582
  }), this.filteredFlattenRows = this.flattenRows.filter(
583
- (s, i, o) => s.keep
583
+ (o, s, i) => o.keep
584
584
  );
585
585
  }
586
586
  }
587
587
  getPropertyValue(e, t) {
588
- const s = t.shift();
589
- let i = e[s];
590
- return i && t.length ? this.getPropertyValue(i, t) : i;
588
+ const o = t.shift();
589
+ let s = e[o];
590
+ return s && t.length ? this.getPropertyValue(s, t) : s;
591
591
  }
592
- treeSort(e, t, s) {
593
- e.sort(this.genericTreeTableSortComparator(t, s));
594
- for (const i of e)
595
- i.children && this.treeSort(i.children, t, s);
592
+ treeSort(e, t, o) {
593
+ e.sort(this.genericTreeTableSortComparator(t, o));
594
+ for (const s of e)
595
+ s.children && this.treeSort(s.children, t, o);
596
596
  }
597
597
  }
598
- class P {
598
+ class q {
599
599
  constructor(e) {
600
600
  this.getStorageKeyFn = e;
601
601
  }
602
602
  autoConvertMapToObject(e) {
603
603
  const t = {};
604
604
  if (e instanceof Map) {
605
- const s = e;
606
- for (const i of [...s]) {
605
+ const o = e;
606
+ for (const s of [...o]) {
607
607
  const [
608
- o,
608
+ i,
609
609
  r
610
- ] = i;
611
- t[o] = r;
610
+ ] = s;
611
+ t[i] = r;
612
612
  }
613
613
  }
614
614
  return t;
615
615
  }
616
616
  checkAndPersistItem(e, t) {
617
- const s = this.getStorageKeyFn;
618
- if (s) {
619
- const i = s();
620
- if (i) {
621
- const o = i + e;
617
+ const o = this.getStorageKeyFn;
618
+ if (o) {
619
+ const s = o();
620
+ if (s) {
621
+ const i = s + e;
622
622
  if ((t + "").includes("Map")) {
623
623
  const r = this.autoConvertMapToObject(t);
624
- this.persistItem(o, r);
624
+ this.persistItem(i, r);
625
625
  } else
626
- this.persistItem(o, t);
626
+ this.persistItem(i, t);
627
627
  }
628
628
  }
629
629
  }
@@ -670,7 +670,7 @@ class P {
670
670
  // }
671
671
  // }
672
672
  }
673
- class te extends P {
673
+ class Ce extends q {
674
674
  constructor(e) {
675
675
  super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
676
676
  }
@@ -685,21 +685,21 @@ class te extends P {
685
685
  if (e) {
686
686
  const t = e();
687
687
  if (t) {
688
- const s = t + this.SCROLL_STATE;
689
- let i = this.loadFromLocalStorage(s);
690
- this.scrollOffset = i || [0, 0];
688
+ const o = t + this.SCROLL_STATE;
689
+ let s = this.loadFromLocalStorage(o);
690
+ this.scrollOffset = s || [0, 0];
691
691
  }
692
692
  }
693
693
  }
694
694
  }
695
- class se {
696
- constructor(e = "collapsed", t = [], s = !1, i = !1) {
697
- this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = i;
695
+ class ve {
696
+ constructor(e = "collapsed", t = [], o = !1, s = !1) {
697
+ this.mode = e, this.rowIds = t, this.allCollapsed = o, this.allExpanded = s;
698
698
  }
699
699
  }
700
- class ie extends P {
700
+ class Re extends q {
701
701
  constructor(e) {
702
- super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new se(), this.load();
702
+ super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new ve(), this.load();
703
703
  }
704
704
  collapsedExpandedStateGet() {
705
705
  return this.collapsedExpandedState;
@@ -722,8 +722,8 @@ class ie extends P {
722
722
  if (e) {
723
723
  const t = e();
724
724
  if (t) {
725
- const s = t + this.COLLAPSED_EXPANDED_STATE, i = this.loadFromLocalStorage(s);
726
- i && (this.collapsedExpandedState = i);
725
+ const o = t + this.COLLAPSED_EXPANDED_STATE, s = this.loadFromLocalStorage(o);
726
+ s && (this.collapsedExpandedState = s);
727
727
  }
728
728
  }
729
729
  }
@@ -731,7 +731,7 @@ class ie extends P {
731
731
  this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
732
732
  }
733
733
  }
734
- class oe extends P {
734
+ class Ae extends q {
735
735
  constructor(e) {
736
736
  super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
737
737
  }
@@ -746,95 +746,95 @@ class oe extends P {
746
746
  if (e) {
747
747
  const t = e();
748
748
  if (t) {
749
- const s = t + this.SORTING_STATE;
750
- let i = this.loadFromLocalStorage(s);
751
- this.sortItems = i || [];
749
+ const o = t + this.SORTING_STATE;
750
+ let s = this.loadFromLocalStorage(o);
751
+ this.sortItems = s || [];
752
752
  }
753
753
  }
754
754
  }
755
755
  }
756
- class T {
757
- constructor(e = 0, t = 0, s = 0, i = 0, o) {
758
- this.left = e, this.width = t, this.height = s, this.top = i, this.index = o;
756
+ class $ {
757
+ constructor(e = 0, t = 0, o = 0, s = 0, i) {
758
+ this.left = e, this.width = t, this.height = o, this.top = s, this.index = i;
759
759
  }
760
760
  }
761
- class re {
762
- constructor(e, t, s, i) {
763
- 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();
764
- const o = this.hostElement;
765
- o.innerText = "", this.dom.setAttribute(o, "tabindex", "0"), this.dom.setStyle(
766
- this.dom.addClass("ge-table", o),
761
+ class Ee {
762
+ constructor(e, t, o, s) {
763
+ this.hostElement = e, this.tableModel = t, this.dom = o, this.tableOptions = s, this.scrollTop = 0, this.areaBodyWestGeo = new $(), this.areaBodyCenterGeo = new $(), this.areaBodyEastGeo = new $();
764
+ const i = this.hostElement;
765
+ i.innerText = "", this.dom.setAttribute(i, "tabindex", "0"), this.dom.setStyle(
766
+ this.dom.addClass("ge-table", i),
767
767
  "position",
768
768
  "relative"
769
- ), this.hoverRow = s.applyStylePosistionAbsolute(
770
- s.createDivWithClass("ge-table-hover-row", o)
771
- ), this.hoverColumn = s.applyStylePosistionAbsolute(
772
- s.createDivWithClass("ge-table-hover-column", o)
773
- ), this.areaHeaderWest = s.appendRelativeChildDiv(
774
- s.applyStylePosistionAbsolute(
775
- s.createAreaDivWithClass("ge-table-header ge-table-header-west", o, "header", "west")
769
+ ), this.hoverRow = o.applyStylePosistionAbsolute(
770
+ o.createDivWithClass("ge-table-hover-row", i)
771
+ ), this.hoverColumn = o.applyStylePosistionAbsolute(
772
+ o.createDivWithClass("ge-table-hover-column", i)
773
+ ), this.areaHeaderWest = o.appendRelativeChildDiv(
774
+ o.applyStylePosistionAbsolute(
775
+ o.createAreaDivWithClass("ge-table-header ge-table-header-west", i, "header", "west")
776
776
  )
777
- ), this.areaHeaderCenter = s.appendRelativeChildDiv(
778
- s.applyStylePosistionAbsolute(
779
- s.createAreaDivWithClass("ge-table-header ge-table-header-center", o, "header", "center")
777
+ ), this.areaHeaderCenter = o.appendRelativeChildDiv(
778
+ o.applyStylePosistionAbsolute(
779
+ o.createAreaDivWithClass("ge-table-header ge-table-header-center", i, "header", "center")
780
780
  )
781
- ), this.areaHeaderEast = s.appendRelativeChildDiv(
782
- s.applyStylePosistionAbsolute(
783
- s.createAreaDivWithClass("ge-table-header ge-table-header-east", o, "body", "east")
781
+ ), this.areaHeaderEast = o.appendRelativeChildDiv(
782
+ o.applyStylePosistionAbsolute(
783
+ o.createAreaDivWithClass("ge-table-header ge-table-header-east", i, "body", "east")
784
784
  )
785
- ), this.areaBodyWest = s.appendRelativeChildDiv(
786
- s.applyStylePosistionAbsolute(
787
- s.createAreaDivWithClass("ge-table-body ge-table-body-west", o, "body", "west")
785
+ ), this.areaBodyWest = o.appendRelativeChildDiv(
786
+ o.applyStylePosistionAbsolute(
787
+ o.createAreaDivWithClass("ge-table-body ge-table-body-west", i, "body", "west")
788
788
  )
789
- ), this.areaBodyEast = s.appendRelativeChildDiv(
790
- s.applyStylePosistionAbsolute(
791
- s.createAreaDivWithClass("ge-table-body ge-table-body-east", o, "body", "east")
789
+ ), this.areaBodyEast = o.appendRelativeChildDiv(
790
+ o.applyStylePosistionAbsolute(
791
+ o.createAreaDivWithClass("ge-table-body ge-table-body-east", i, "body", "east")
792
792
  )
793
- ), this.areaFooterWest = s.appendRelativeChildDiv(
794
- s.applyStylePosistionAbsolute(
795
- s.createAreaDivWithClass("ge-table-footer ge-table-footer-west", o, "footer", "west")
793
+ ), this.areaFooterWest = o.appendRelativeChildDiv(
794
+ o.applyStylePosistionAbsolute(
795
+ o.createAreaDivWithClass("ge-table-footer ge-table-footer-west", i, "footer", "west")
796
796
  )
797
- ), this.areaFooterCenter = s.appendRelativeChildDiv(
798
- s.applyStylePosistionAbsolute(
799
- s.createAreaDivWithClass("ge-table-footer ge-table-footer-center", o, "footer", "center")
797
+ ), this.areaFooterCenter = o.appendRelativeChildDiv(
798
+ o.applyStylePosistionAbsolute(
799
+ o.createAreaDivWithClass("ge-table-footer ge-table-footer-center", i, "footer", "center")
800
800
  )
801
- ), this.areaFooterEast = s.appendRelativeChildDiv(
802
- s.applyStylePosistionAbsolute(
803
- s.createAreaDivWithClass("ge-table-footer ge-table-footer-east", o, "footer", "east")
801
+ ), this.areaFooterEast = o.appendRelativeChildDiv(
802
+ o.applyStylePosistionAbsolute(
803
+ o.createAreaDivWithClass("ge-table-footer ge-table-footer-east", i, "footer", "east")
804
804
  )
805
- ), this.scrollViewport = s.applyStyleOverflowAuto(
805
+ ), this.scrollViewport = o.applyStyleOverflowAuto(
806
806
  this.tableOptions.overflowX ?? "auto",
807
807
  this.tableOptions.overflowY ?? "auto",
808
- s.applyStyleNoPadding(
809
- s.applyStylePosistionAbsolute(
810
- s.createAreaDivWithClass("ge-table-scroll-viewport", o, "body", "center")
808
+ o.applyStyleNoPadding(
809
+ o.applyStylePosistionAbsolute(
810
+ o.createAreaDivWithClass("ge-table-scroll-viewport", i, "body", "center")
811
811
  )
812
812
  )
813
- ), this.contentWrapperDiv = s.applyStyleNoPadding(
814
- s.applyStylePosistionRelative(
815
- s.createDivWithClass("ge-table-scroll-content-wrapper", this.scrollViewport)
813
+ ), this.contentWrapperDiv = o.applyStyleNoPadding(
814
+ o.applyStylePosistionRelative(
815
+ o.createDivWithClass("ge-table-scroll-content-wrapper", this.scrollViewport)
816
816
  )
817
- ), this.contentDiv = s.applyStyleNoPadding(
818
- s.applyStylePosistionRelative(
819
- s.createDivWithClass("ge-table-scroll-content", this.contentWrapperDiv)
817
+ ), this.contentDiv = o.applyStyleNoPadding(
818
+ o.applyStylePosistionRelative(
819
+ o.createDivWithClass("ge-table-scroll-content", this.contentWrapperDiv)
820
820
  )
821
- ), this.areaBodyCenter = s.appendRelativeChildDiv(
822
- s.createDivWithClass("ge-table-body-center", this.contentDiv)
823
- ), this.borderHeaderBottom = s.applyStylePosistionAbsolute(
824
- s.createDivWithClass("ge-table-header-border", o)
825
- ), this.borderFixedWest = s.applyStylePosistionAbsolute(
826
- s.createDivWithClass("ge-table-west-fixed-column-border", o)
827
- ), this.borderFixedEast = s.applyStylePosistionAbsolute(
828
- s.createDivWithClass("ge-table-east-fixed-column-border", o)
829
- ), this.borderFooterTop = s.applyStylePosistionAbsolute(
830
- s.createDivWithClass("ge-table-footer-border", o)
821
+ ), this.areaBodyCenter = o.appendRelativeChildDiv(
822
+ o.createDivWithClass("ge-table-body-center", this.contentDiv)
823
+ ), this.borderHeaderBottom = o.applyStylePosistionAbsolute(
824
+ o.createDivWithClass("ge-table-header-border", i)
825
+ ), this.borderFixedWest = o.applyStylePosistionAbsolute(
826
+ o.createDivWithClass("ge-table-west-fixed-column-border", i)
827
+ ), this.borderFixedEast = o.applyStylePosistionAbsolute(
828
+ o.createDivWithClass("ge-table-east-fixed-column-border", i)
829
+ ), this.borderFooterTop = o.applyStylePosistionAbsolute(
830
+ o.createDivWithClass("ge-table-footer-border", i)
831
831
  );
832
832
  }
833
833
  adjustContainersAndRows() {
834
- const e = this.tableModel.getPadding(), t = this.hostElement.clientWidth, s = this.hostElement.clientHeight;
834
+ const e = this.tableModel.getPadding(), t = this.hostElement.clientWidth, o = this.hostElement.clientHeight;
835
835
  this.dom.applyStyle(this.scrollViewport, {
836
836
  width: `${t - e.left}px`,
837
- height: `${s - e.top}px`,
837
+ height: `${o - e.top}px`,
838
838
  top: `${e.top}px`,
839
839
  left: `${e.left}px`
840
840
  }), this.scrollTop = this.scrollViewport.scrollTop, this.dom.applyStyle(this.contentDiv, {
@@ -842,21 +842,21 @@ class re {
842
842
  height: `${this.scrollViewport.clientHeight}px`,
843
843
  top: `${this.scrollTop}px`,
844
844
  left: `${this.scrollViewport.scrollLeft}px`
845
- }), 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(
845
+ }), this.areaBodyWestGeo.width = e.left, this.areaBodyWestGeo.height = o - e.top - e.bottom, this.areaBodyWestGeo.top = e.top, this.areaBodyWestGeo.left = 0, this.dom.applyStyleInPx(this.areaBodyWest.parent, this.areaBodyWestGeo), this.tableOptions.fixedWestSeparatorBorderVisible && this.tableModel.getFixedLeftColumnCount() ? this.dom.applyDisplayBlockStyle(
846
846
  this.dom.applyStyle(this.borderFixedWest, {
847
847
  width: "1px",
848
848
  height: `${this.areaBodyWestGeo.height}px`,
849
849
  top: `${this.areaBodyWestGeo.top}px`,
850
850
  left: `${this.areaBodyWestGeo.width}px`
851
851
  })
852
- ) : 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(
852
+ ) : this.dom.applyDisplayNoneStyle(this.borderFixedWest), this.areaBodyEastGeo.width = e.right, this.areaBodyEastGeo.height = o - e.top - e.bottom, this.areaBodyEastGeo.top = e.top, this.areaBodyEastGeo.left = t - e.right, this.dom.applyStyleInPx(this.areaBodyEast.parent, this.areaBodyEastGeo), this.tableOptions.fixedEastSeparatorBorderVisible && this.tableModel.getFixedLeftColumnCount() ? this.dom.applyDisplayBlockStyle(
853
853
  this.dom.applyStyle(this.borderFixedEast, {
854
854
  width: "1px",
855
855
  height: `${this.areaBodyEastGeo.height}px`,
856
856
  top: `${this.areaBodyEastGeo.top}px`,
857
857
  left: `${this.areaBodyEastGeo.left}px`
858
858
  })
859
- ) : 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, {
859
+ ) : this.dom.applyDisplayNoneStyle(this.borderFixedEast), this.areaBodyCenterGeo.width = t - e.left - e.right, this.areaBodyCenterGeo.height = o - e.top - e.bottom, this.areaBodyCenterGeo.top = 0, this.areaBodyCenterGeo.left = 0, this.dom.applyStyleInPx(this.areaBodyCenter.parent, this.areaBodyCenterGeo), this.dom.applyStyle(this.areaHeaderCenter.parent, {
860
860
  width: `${t - e.left - e.right}px`,
861
861
  height: `${e.top}px`,
862
862
  top: "0",
@@ -881,23 +881,23 @@ class re {
881
881
  ) : this.dom.applyDisplayNoneStyle(this.borderHeaderBottom), this.dom.applyStyle(this.areaFooterWest.parent, {
882
882
  width: `${e.left}px`,
883
883
  height: `${e.bottom}px`,
884
- top: `${s - e.bottom}px`,
884
+ top: `${o - e.bottom}px`,
885
885
  left: "0"
886
886
  }), this.dom.applyStyle(this.areaFooterCenter.parent, {
887
887
  width: `${t - e.left - e.right}px`,
888
888
  height: `${e.bottom}px`,
889
- top: `${s - e.bottom}px`,
889
+ top: `${o - e.bottom}px`,
890
890
  left: `${e.left}px`
891
891
  }), this.dom.applyStyle(this.areaFooterEast.parent, {
892
892
  width: `${e.right}px`,
893
893
  height: `${e.bottom}px`,
894
- top: `${s - e.bottom}px`,
894
+ top: `${o - e.bottom}px`,
895
895
  left: `${t - e.right}px`
896
896
  }), this.tableOptions.footerSeparatorBorderVisible && this.tableModel.isFooterVisibe() ? this.dom.applyDisplayBlockStyle(
897
897
  this.dom.applyStyle(this.borderFooterTop, {
898
898
  width: `${t}px`,
899
899
  height: "1px",
900
- top: `${s - e.bottom}px`,
900
+ top: `${o - e.bottom}px`,
901
901
  left: "0px"
902
902
  })
903
903
  ) : this.dom.applyDisplayNoneStyle(this.borderFooterTop), this.adjustAfterScrolling();
@@ -909,12 +909,12 @@ class re {
909
909
  this.dom.setStyle(this.contentWrapperDiv, "width", e), this.dom.setStyle(this.contentWrapperDiv, "height", t);
910
910
  }
911
911
  }
912
- class A {
913
- constructor(e, t, s, i, o = !1) {
914
- this.r1 = e, this.c1 = t, this.r2 = s, this.c2 = i, this.gammaRange = o;
912
+ class E {
913
+ constructor(e, t, o, s, i = !1) {
914
+ this.r1 = e, this.c1 = t, this.r2 = o, this.c2 = s, this.gammaRange = i;
915
915
  }
916
916
  static create(e) {
917
- return e.gammaRange === void 0 && (e.gammaRange = !1), new A(
917
+ return e.gammaRange === void 0 && (e.gammaRange = !1), new E(
918
918
  e.rowIndex1,
919
919
  e.columnIndex1,
920
920
  e.rowIndex2,
@@ -923,19 +923,19 @@ class A {
923
923
  );
924
924
  }
925
925
  static singleCell(e, t) {
926
- return new A(e, t, e, t);
926
+ return new E(e, t, e, t);
927
927
  }
928
928
  static singleRow(e) {
929
- return new A(e, 0, e, Number.MAX_SAFE_INTEGER);
929
+ return new E(e, 0, e, Number.MAX_SAFE_INTEGER);
930
930
  }
931
931
  static singleColumn(e) {
932
- return new A(0, e, Number.MAX_SAFE_INTEGER, e);
932
+ return new E(0, e, Number.MAX_SAFE_INTEGER, e);
933
933
  }
934
934
  isInRange(e, t) {
935
935
  return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
936
936
  }
937
937
  }
938
- class le {
938
+ class Me {
939
939
  constructor(e, t) {
940
940
  this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
941
941
  }
@@ -944,14 +944,14 @@ class le {
944
944
  return;
945
945
  this.colAndRowspanRanges = [];
946
946
  const e = this.areaModel.getRowCount(), t = this.tableModel.getColumnCount();
947
- for (let s = 0; s < e; s++)
948
- for (let i = 0; i < t; i++) {
949
- let o = this.areaModel.getColspanAt(s, i), r = this.areaModel.getRowspanAt(s, i);
950
- if (o > 1 || r > 1) {
951
- o === 0 && (o = 1), r === 0 && (r = 1);
947
+ for (let o = 0; o < e; o++)
948
+ for (let s = 0; s < t; s++) {
949
+ let i = this.areaModel.getColspanAt(o, s), r = this.areaModel.getRowspanAt(o, s);
950
+ if (i > 1 || r > 1) {
951
+ i === 0 && (i = 1), r === 0 && (r = 1);
952
952
  const l = this.areaModel.hasOwnProperty("gammaCells");
953
953
  this.colAndRowspanRanges.push(
954
- new A(s, i, s + r - 1, i + o - 1, l)
954
+ new E(o, s, o + r - 1, s + i - 1, l)
955
955
  );
956
956
  }
957
957
  }
@@ -961,29 +961,29 @@ class le {
961
961
  }
962
962
  isInRange(e, t) {
963
963
  if (this.colAndRowspanRanges) {
964
- for (const s of this.colAndRowspanRanges)
965
- if (s.isInRange(e, t))
964
+ for (const o of this.colAndRowspanRanges)
965
+ if (o.isInRange(e, t))
966
966
  return !0;
967
967
  }
968
968
  return !1;
969
969
  }
970
970
  }
971
- class ne {
972
- constructor(e, t, s) {
973
- this.header = e, this.body = t, this.footer = s;
971
+ class k {
972
+ constructor(e, t, o) {
973
+ this.header = e, this.body = t, this.footer = o;
974
974
  }
975
975
  }
976
- class ae extends re {
977
- constructor(e, t, s, i) {
976
+ class Ie extends Ee {
977
+ constructor(e, t, o, s) {
978
978
  var r, l;
979
- super(e, t, s, i), this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
979
+ super(e, t, o, s), this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
980
980
  header: [],
981
981
  body: [],
982
982
  footer: []
983
- }, this.tree = !1, this.colAndRowspanModels = new ne(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.editing = !1, this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (r = this.tableOptions) != null && r.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (l = this.tableOptions) != null && l.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), t.getAreaModel("body") instanceof L && (this.tree = !0), ["header", "body", "footer"].forEach(
983
+ }, this.tree = !1, this.colAndRowspanModels = new k(), 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), (l = this.tableOptions) != null && l.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), t.getAreaModel("body") instanceof V && (this.tree = !0), ["header", "body", "footer"].forEach(
984
984
  (n) => {
985
- var a;
986
- this.colAndRowspanModels[n] = new le(t, t.getAreaModel(n)), (a = this.colAndRowspanModels[n]) == null || a.init();
985
+ var d;
986
+ this.colAndRowspanModels[n] = new Me(t, t.getAreaModel(n)), (d = this.colAndRowspanModels[n]) == null || d.init();
987
987
  }
988
988
  );
989
989
  }
@@ -1000,13 +1000,13 @@ class ae extends re {
1000
1000
  }
1001
1001
  }
1002
1002
  initRenderEditor(e, t) {
1003
- var i;
1004
- let s = (i = this.tableModel.getColumnDef(t)) == null ? void 0 : i.getEditRenderer;
1005
- if (s || (s = this.tableOptions.getEditRenderer), s)
1006
- if (this.editorRenderer = s(e, t), this.editorRenderer) {
1003
+ var s;
1004
+ let o = (s = this.tableModel.getColumnDef(t)) == null ? void 0 : s.getEditRenderer;
1005
+ if (o || (o = this.tableOptions.getEditRenderer), o)
1006
+ if (this.editorRenderer = o(e, t), this.editorRenderer) {
1007
1007
  this.editorRendererRow = e, this.editorRendererColumn = t, this.editing = !0, this.repaint();
1008
- const o = document.querySelector("input.ge-table-cell-editor-input");
1009
- o && o.focus();
1008
+ const i = document.querySelector("input.ge-table-cell-editor-input");
1009
+ i && i.focus();
1010
1010
  } else
1011
1011
  this.resetEditorRenderer();
1012
1012
  }
@@ -1018,19 +1018,19 @@ class ae extends re {
1018
1018
  for (const t of this.removables)
1019
1019
  t.remove();
1020
1020
  this.hideHoverRow(), this.hideHoverColumn(), this.scrollTop = this.scrollViewport.scrollTop, this.scrollLeft = this.scrollViewport.scrollLeft, this.debounce(this.checkForScrollPosSaving.bind(this)), this.scrollFactorY = this.scrollTop / (this.scrollViewport.scrollHeight - this.scrollViewport.clientHeight), this.scrollFactorX = this.scrollLeft / (this.scrollViewport.scrollWidth - this.scrollViewport.clientWidth), isNaN(this.scrollFactorY) && (this.scrollFactorY = 0), isNaN(this.scrollFactorX) && (this.scrollFactorX = 0), this.adjustBody(), this.adjustArea("footer"), this.adjustArea("header"), this.tableOptions.tableTopBorderVisible && this.removables.push(this.dom.addHorizontalBorder(
1021
- new T(0, this.hostElement.clientWidth, 1, 0),
1021
+ new $(0, this.hostElement.clientWidth, 1, 0),
1022
1022
  this.hostElement,
1023
1023
  "ge-table-border"
1024
1024
  )), this.tableOptions.tableBottomBorderVisible && this.removables.push(this.dom.addHorizontalBorder(
1025
- new T(0, this.hostElement.clientWidth, 1, this.hostElement.clientHeight - 1),
1025
+ new $(0, this.hostElement.clientWidth, 1, this.hostElement.clientHeight - 1),
1026
1026
  this.hostElement,
1027
1027
  "ge-table-border"
1028
1028
  )), this.tableModel.getFixedLeftColumnCount() > 0 && this.removables.push(this.dom.addVerticalBorder(
1029
- new T(this.areaBodyWest.child.clientWidth, 1, this.hostElement.clientHeight, 0),
1029
+ new $(this.areaBodyWest.child.clientWidth, 1, this.hostElement.clientHeight, 0),
1030
1030
  this.hostElement,
1031
1031
  "ge-table-body-west-vertical-border"
1032
1032
  )), ((e = this.tableModel.getAreaModel("header")) == null ? void 0 : e.getRowCount()) > 0 && this.removables.push(this.dom.addHorizontalBorder(
1033
- new T(0, this.hostElement.clientWidth, 1, this.areaHeaderCenter.child.clientHeight),
1033
+ new $(0, this.hostElement.clientWidth, 1, this.areaHeaderCenter.child.clientHeight),
1034
1034
  this.hostElement,
1035
1035
  "ge-table-body-west-vertical-border"
1036
1036
  ));
@@ -1046,9 +1046,9 @@ class ae extends re {
1046
1046
  }
1047
1047
  getAreaAndSideIdentByAttr(e) {
1048
1048
  if (e) {
1049
- const t = this.getStringByAttr(e, "data-area"), s = this.getStringByAttr(e, "data-side");
1050
- if (s && t)
1051
- return [t, s];
1049
+ const t = this.getStringByAttr(e, "data-area"), o = this.getStringByAttr(e, "data-side");
1050
+ if (o && t)
1051
+ return [t, o];
1052
1052
  }
1053
1053
  return [void 0, void 0];
1054
1054
  }
@@ -1082,105 +1082,105 @@ class ae extends re {
1082
1082
  this.dom.setStyle(this.contentDiv, "top", `${this.scrollTop}px`), this.dom.setStyle(this.contentDiv, "left", `${this.scrollViewport.scrollLeft}px`), this.adjustArea("body", t);
1083
1083
  }
1084
1084
  getNumberByAttr(e, t) {
1085
- var s;
1085
+ var o;
1086
1086
  if (e) {
1087
- const i = (s = e.closest("[" + t + "]")) == null ? void 0 : s.getAttribute(t);
1088
- if (i)
1089
- return Number(i);
1087
+ const s = (o = e.closest("[" + t + "]")) == null ? void 0 : o.getAttribute(t);
1088
+ if (s)
1089
+ return Number(s);
1090
1090
  }
1091
1091
  return -1;
1092
1092
  }
1093
1093
  getStringByAttr(e, t) {
1094
- var s;
1094
+ var o;
1095
1095
  if (e) {
1096
- const i = (s = e.closest("[" + t + "]")) == null ? void 0 : s.getAttribute(t);
1097
- if (i)
1098
- return i;
1096
+ const s = (o = e.closest("[" + t + "]")) == null ? void 0 : o.getAttribute(t);
1097
+ if (s)
1098
+ return s;
1099
1099
  }
1100
1100
  return "";
1101
1101
  }
1102
1102
  adjustArea(e, t = 0) {
1103
- var p;
1104
- const s = this.getArea(e, "west"), i = this.getArea(e, "center"), o = this.getArea(e, "east"), r = i.child.clientHeight;
1105
- s.child.innerText = "", i.child.innerText = "", o.child.innerText = "";
1106
- const l = 0, n = this.areaBodyCenterGeo.width, a = this.tableModel.getPadding(), d = this.tableModel.getAreaModel(e), S = d.getRowCount();
1103
+ var u;
1104
+ const o = this.getArea(e, "west"), s = this.getArea(e, "center"), i = this.getArea(e, "east"), r = s.child.clientHeight;
1105
+ o.child.innerText = "", s.child.innerText = "", i.child.innerText = "";
1106
+ const l = 0, n = this.areaBodyCenterGeo.width, d = this.tableModel.getPadding(), a = this.tableModel.getAreaModel(e), c = a.getRowCount();
1107
1107
  for (; this.cleanupFunctions[e].length; ) {
1108
- const u = this.cleanupFunctions[e].shift();
1109
- u && u();
1108
+ const p = this.cleanupFunctions[e].shift();
1109
+ p && p();
1110
1110
  }
1111
1111
  let g = t;
1112
- const f = this.tableModel.getColumnCount(), c = this.tableModel.getFixedRightColumnCount(), b = this.tableModel.getFixedLeftColumnCount();
1113
- for (let u = 0; u < S; u++) {
1114
- const v = g, x = u === S - 1, C = this.tableModel.getRowHeight(e, u);
1115
- if (v + C > 0) {
1116
- this.firstVisibleRowIndex = u;
1117
- let w = { left: l, width: n, height: C, top: v, index: u }, m = this.dom.addRowDiv(i, w, u, e, "center");
1118
- const M = b;
1112
+ const m = this.tableModel.getColumnCount(), b = this.tableModel.getFixedRightColumnCount(), w = this.tableModel.getFixedLeftColumnCount();
1113
+ for (let p = 0; p < c; p++) {
1114
+ const C = g, v = p === c - 1, R = this.tableModel.getRowHeight(e, p);
1115
+ if (C + R > 0) {
1116
+ this.firstVisibleRowIndex = p;
1117
+ let y = { left: l, width: n, height: R, top: C, index: p }, S = this.dom.addRowDiv(s, y, p, e, "center");
1118
+ const T = w;
1119
1119
  if (this.adjustColumnsToRowParent({
1120
1120
  areaIdent: e,
1121
1121
  sideIdent: "center",
1122
- areaModel: d,
1123
- geo: w,
1124
- parent: m,
1125
- rowIndex: u,
1126
- columnIndexStart: M,
1127
- columnIndexEnd: f - c - 1,
1122
+ areaModel: a,
1123
+ geo: y,
1124
+ parent: S,
1125
+ rowIndex: p,
1126
+ columnIndexStart: T,
1127
+ columnIndexEnd: m - b - 1,
1128
1128
  verticalFixed: !1,
1129
- lastRowOfModel: x
1130
- }), a.left > 0 && (w = { left: l, width: this.areaBodyWestGeo.width, height: C, top: v, index: u }, m = this.dom.addRowDiv(s, w, u, e, "west"), this.adjustColumnsToRowParent({
1129
+ lastRowOfModel: v
1130
+ }), d.left > 0 && (y = { left: l, width: this.areaBodyWestGeo.width, height: R, top: C, index: p }, S = this.dom.addRowDiv(o, y, p, e, "west"), this.adjustColumnsToRowParent({
1131
1131
  areaIdent: e,
1132
1132
  sideIdent: "west",
1133
- areaModel: d,
1134
- geo: w,
1135
- parent: m,
1136
- rowIndex: u,
1133
+ areaModel: a,
1134
+ geo: y,
1135
+ parent: S,
1136
+ rowIndex: p,
1137
1137
  columnIndexStart: 0,
1138
- columnIndexEnd: M - 1,
1138
+ columnIndexEnd: T - 1,
1139
1139
  verticalFixed: !0,
1140
- lastRowOfModel: x
1141
- })), a.right > 0 && (w = { left: l, width: this.areaBodyEastGeo.width, height: C, top: v, index: u }, m = this.dom.addRowDiv(o, w, u, e, "east"), this.adjustColumnsToRowParent({
1140
+ lastRowOfModel: v
1141
+ })), d.right > 0 && (y = { left: l, width: this.areaBodyEastGeo.width, height: R, top: C, index: p }, S = this.dom.addRowDiv(i, y, p, e, "east"), this.adjustColumnsToRowParent({
1142
1142
  areaIdent: e,
1143
1143
  sideIdent: "east",
1144
- areaModel: d,
1145
- geo: w,
1146
- parent: m,
1147
- rowIndex: u,
1148
- columnIndexStart: f - c,
1149
- columnIndexEnd: f - 1,
1144
+ areaModel: a,
1145
+ geo: y,
1146
+ parent: S,
1147
+ rowIndex: p,
1148
+ columnIndexStart: m - b,
1149
+ columnIndexEnd: m - 1,
1150
1150
  verticalFixed: !0,
1151
- lastRowOfModel: x
1152
- })), e === "header" && this.tree && u === S - 1) {
1153
- const E = this.dom.applyStyle(
1151
+ lastRowOfModel: v
1152
+ })), e === "header" && this.tree && p === c - 1) {
1153
+ const A = this.dom.applyStyle(
1154
1154
  this.dom.setAttribute(
1155
- this.dom.addDiv(m, new T(16, 20, 20, 8)),
1155
+ this.dom.addDiv(S, new $(16, 20, 20, 8)),
1156
1156
  "data-ge-action",
1157
1157
  "toggleExpandCollapseAll"
1158
1158
  ),
1159
1159
  { cursor: "pointer" }
1160
- ), R = this.tableOptions.treeOptions.arrowExpandCollapseAll;
1161
- if (R) {
1162
- const D = this.dom.domService.createText(R.content);
1163
- this.dom.domService.appendChild(E, D), R.style && this.dom.applyStyleString(E, R.style);
1160
+ ), M = this.tableOptions.treeOptions.arrowExpandCollapseAll;
1161
+ if (M) {
1162
+ const B = this.dom.domService.createText(M.content);
1163
+ this.dom.domService.appendChild(A, B), M.style && this.dom.applyStyleString(A, M.style);
1164
1164
  }
1165
1165
  }
1166
1166
  }
1167
- if (g = g + C, g > r)
1167
+ if (g = g + R, g > r)
1168
1168
  break;
1169
1169
  }
1170
1170
  if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
1171
- const u = ((p = this.colAndRowspanModels[e]) == null ? void 0 : p.getRanges()) ?? [];
1172
- if (u.length)
1173
- for (const v of u) {
1174
- let x = 0, C = i.child, w = "center";
1175
- if (v.c1 < b)
1176
- C = s.child, w = "west";
1177
- else if (c > 0 && v.c1 >= f - c)
1178
- C = o.child, w = "east";
1171
+ const p = ((u = this.colAndRowspanModels[e]) == null ? void 0 : u.getRanges()) ?? [];
1172
+ if (p.length)
1173
+ for (const C of p) {
1174
+ let v = 0, R = s.child, y = "center";
1175
+ if (C.c1 < w)
1176
+ R = o.child, y = "west";
1177
+ else if (b > 0 && C.c1 >= m - b)
1178
+ R = i.child, y = "east";
1179
1179
  else {
1180
- const m = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1181
- x = this.scrollFactorX * m - this.areaBodyWestGeo.width, w = "center";
1180
+ const S = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1181
+ v = this.scrollFactorX * S - this.areaBodyWestGeo.width, y = "center";
1182
1182
  }
1183
- this.drawBigCell(v, x, t, d, C, w);
1183
+ this.drawBigCell(C, v, t, a, R, y);
1184
1184
  }
1185
1185
  }
1186
1186
  }
@@ -1194,58 +1194,58 @@ class ae extends re {
1194
1194
  * @param sideIdent SideIdent (west,center,east)
1195
1195
  * @protected
1196
1196
  */
1197
- drawBigCell(e, t, s, i, o, r) {
1198
- const l = s + this.getRowHeights(0, e.r1 - 1, i).reduce((p, u) => p + u, 0), n = this.tableModel.getColumnCount(), a = this.tableModel.getFixedRightColumnCount();
1199
- let d = 0;
1200
- a > 0 && e.c1 >= n - a && (d = n - a);
1201
- const S = t + this.getColumnWidths(d, e.c1 - 1).reduce((p, u) => p + u, 0), g = this.getRowHeights(e.r1, e.r2, i).reduce((p, u) => p + u, 0), f = this.getColumnWidths(e.c1, e.c2).reduce((p, u) => p + u, 0);
1202
- let c = !1;
1203
- const b = this.getSelectionModel ? this.getSelectionModel() : void 0;
1204
- b && (c = b.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? (console.info("TODO here", e), this.renderCell({
1205
- areaModel: i,
1206
- areaIdent: i.areaIdent,
1197
+ drawBigCell(e, t, o, s, i, r) {
1198
+ const l = o + this.getRowHeights(0, e.r1 - 1, s).reduce((u, p) => u + p, 0), n = this.tableModel.getColumnCount(), d = this.tableModel.getFixedRightColumnCount();
1199
+ let a = 0;
1200
+ d > 0 && e.c1 >= n - d && (a = n - d);
1201
+ const c = t + this.getColumnWidths(a, e.c1 - 1).reduce((u, p) => u + p, 0), g = this.getRowHeights(e.r1, e.r2, s).reduce((u, p) => u + p, 0), m = this.getColumnWidths(e.c1, e.c2).reduce((u, p) => u + p, 0);
1202
+ let b = !1;
1203
+ const w = this.getSelectionModel ? this.getSelectionModel() : void 0;
1204
+ w && (b = w.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? (console.info("TODO here", e), this.renderCell({
1205
+ areaModel: s,
1206
+ areaIdent: s.areaIdent,
1207
1207
  sideIdent: r,
1208
1208
  rowIndex: e.r1,
1209
1209
  columnIndex: e.c1,
1210
- left: S,
1210
+ left: c,
1211
1211
  top: l,
1212
- width: f,
1212
+ width: m,
1213
1213
  height: g,
1214
- parent: o,
1215
- cellSelected: c,
1214
+ parent: i,
1215
+ cellSelected: b,
1216
1216
  lastRowOfModel: !0,
1217
1217
  gammaRange: e.gammaRange
1218
1218
  })) : this.renderCell({
1219
- areaModel: i,
1220
- areaIdent: i.areaIdent,
1219
+ areaModel: s,
1220
+ areaIdent: s.areaIdent,
1221
1221
  sideIdent: r,
1222
1222
  rowIndex: e.r1,
1223
1223
  columnIndex: e.c1,
1224
- left: S,
1224
+ left: c,
1225
1225
  top: l,
1226
- width: f,
1226
+ width: m,
1227
1227
  height: g,
1228
- parent: o,
1229
- cellSelected: c,
1228
+ parent: i,
1229
+ cellSelected: b,
1230
1230
  lastRowOfModel: !0,
1231
1231
  gammaRange: e.gammaRange
1232
- }), i.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
1232
+ }), s.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
1233
1233
  rowIndex: e.r1,
1234
1234
  columnIndex: e.c1,
1235
- cellLeft: S,
1235
+ cellLeft: c,
1236
1236
  cellTop: l,
1237
- cellWidth: f,
1237
+ cellWidth: m,
1238
1238
  cellHeight: g,
1239
- parent: o
1239
+ parent: i
1240
1240
  });
1241
1241
  }
1242
- findRowOfImportantRowspanCell(e, t, s) {
1243
- const i = e.getMaxRowspan();
1244
- for (let o = t - 1; o > -1; o--) {
1245
- const r = e.getRowspanAt(o, s);
1246
- if (r > 1 && o + r + 1 >= t)
1247
- return o;
1248
- if (t - o > i)
1242
+ findRowOfImportantRowspanCell(e, t, o) {
1243
+ const s = e.getMaxRowspan();
1244
+ for (let i = t - 1; i > -1; i--) {
1245
+ const r = e.getRowspanAt(i, o);
1246
+ if (r > 1 && i + r + 1 >= t)
1247
+ return i;
1248
+ if (t - i > s)
1249
1249
  return -1;
1250
1250
  }
1251
1251
  return -1;
@@ -1253,68 +1253,68 @@ class ae extends re {
1253
1253
  adjustColumnsToRowParent({
1254
1254
  areaIdent: e,
1255
1255
  sideIdent: t,
1256
- areaModel: s,
1257
- geo: i,
1258
- parent: o,
1256
+ areaModel: o,
1257
+ geo: s,
1258
+ parent: i,
1259
1259
  rowIndex: r,
1260
1260
  columnIndexStart: l,
1261
1261
  columnIndexEnd: n,
1262
- verticalFixed: a = !1,
1263
- lastRowOfModel: d = !1
1262
+ verticalFixed: d = !1,
1263
+ lastRowOfModel: a = !1
1264
1264
  }) {
1265
- var b;
1265
+ var w;
1266
1266
  this.scrollViewportLeft = this.scrollViewport.scrollLeft;
1267
- let S = 0;
1268
- if (!a) {
1269
- const p = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1270
- S = this.scrollFactorX * p;
1271
- }
1272
- const g = 0, f = !!(e === "body" && t);
1273
- let c = S;
1274
- for (let p = l; p <= n; p++) {
1275
- const u = c, v = this.tableModel.getColumnWidth(p);
1276
- if (v > 0 && u + v > 0) {
1277
- let x = i.height;
1278
- const C = s.getRowspanAt(r, p), w = s.getColspanAt(r, p);
1279
- C > 1 && (x = this.getRowHeights(r, r + C - 1, s).reduce((E, R) => E + R, 0));
1280
- let m = v;
1281
- w > 1 && (m = this.getColumnWidths(p, p + w - 1).reduce((E, R) => E + R, 0));
1282
- let M = !1;
1283
- if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (b = this.colAndRowspanModels[e]) != null && b.isInRange(r, p) && (M = !0), this.draggingTargetColumnIndex === p && e !== "header") {
1284
- this.renderDragTargetDiv(o, u, g, m, x);
1285
- const E = { left: u, top: g, width: m, height: x };
1286
- this.dom.addColumnBorderDivs(this.tableOptions, o, E, e, t);
1267
+ let c = 0;
1268
+ if (!d) {
1269
+ const u = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1270
+ c = this.scrollFactorX * u;
1271
+ }
1272
+ const g = 0, m = !!(e === "body" && t);
1273
+ let b = c;
1274
+ for (let u = l; u <= n; u++) {
1275
+ const p = b, C = this.tableModel.getColumnWidth(u);
1276
+ if (C > 0 && p + C > 0) {
1277
+ let v = s.height;
1278
+ const R = o.getRowspanAt(r, u), y = o.getColspanAt(r, u);
1279
+ R > 1 && (v = this.getRowHeights(r, r + R - 1, o).reduce((A, M) => A + M, 0));
1280
+ let S = C;
1281
+ y > 1 && (S = this.getColumnWidths(u, u + y - 1).reduce((A, M) => A + M, 0));
1282
+ let T = !1;
1283
+ if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (w = this.colAndRowspanModels[e]) != null && w.isInRange(r, u) && (T = !0), this.draggingTargetColumnIndex === u && e !== "header") {
1284
+ this.renderDragTargetDiv(i, p, g, S, v);
1285
+ const A = { left: p, top: g, width: S, height: v };
1286
+ this.dom.addColumnBorderDivs(this.tableOptions, i, A, e, t);
1287
1287
  } else {
1288
- const E = this.renderSelectedBackgroundDiv(M, f, t, s, r, p, o, u, g, m, x);
1289
- M || this.renderCell({
1290
- areaModel: s,
1288
+ const A = this.renderSelectedBackgroundDiv(T, m, t, o, r, u, i, p, g, S, v);
1289
+ T || this.renderCell({
1290
+ areaModel: o,
1291
1291
  areaIdent: e,
1292
1292
  sideIdent: t,
1293
1293
  rowIndex: r,
1294
- columnIndex: p,
1295
- left: u,
1294
+ columnIndex: u,
1295
+ left: p,
1296
1296
  top: g,
1297
- width: m,
1298
- height: x,
1299
- parent: o,
1300
- cellSelected: E,
1301
- lastRowOfModel: d,
1297
+ width: S,
1298
+ height: v,
1299
+ parent: i,
1300
+ cellSelected: A,
1301
+ lastRowOfModel: a,
1302
1302
  gammaRange: !0
1303
1303
  }), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
1304
1304
  rowIndex: r,
1305
- columnIndex: p,
1306
- cellLeft: u,
1305
+ columnIndex: u,
1306
+ cellLeft: p,
1307
1307
  cellTop: g,
1308
- cellWidth: m,
1309
- cellHeight: x,
1310
- parent: o
1308
+ cellWidth: S,
1309
+ cellHeight: v,
1310
+ parent: i
1311
1311
  });
1312
1312
  }
1313
1313
  }
1314
- if (c = c + v, c > this.areaBodyCenterGeo.width)
1314
+ if (b = b + C, b > this.areaBodyCenterGeo.width)
1315
1315
  break;
1316
1316
  }
1317
- this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new T(c - 1, 1, i.height, 0), o);
1317
+ this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new $(b - 1, 1, s.height, 0), i);
1318
1318
  }
1319
1319
  getTreeArrowColumnIndex() {
1320
1320
  return this.tableOptions.showCheckboxWihoutExtraColumn ? 0 : this.tableModel.isRowCheckboxVisible() ? 1 : 0;
@@ -1322,78 +1322,78 @@ class ae extends re {
1322
1322
  addAndRenderCellDiv({
1323
1323
  areaModel: e,
1324
1324
  areaIdent: t,
1325
- sideIdent: s,
1326
- rowIndex: i,
1327
- index: o,
1325
+ sideIdent: o,
1326
+ rowIndex: s,
1327
+ index: i,
1328
1328
  left: r,
1329
1329
  width: l,
1330
1330
  height: n,
1331
- top: a,
1332
- parent: d,
1333
- lastRowOfModel: S
1331
+ top: d,
1332
+ parent: a,
1333
+ lastRowOfModel: c
1334
1334
  }) {
1335
- var _;
1336
- const f = this.editorRenderer && this.editorRendererRow === i && this.editorRendererColumn === o ? this.editorRenderer : e.getCellRenderer(i, o), c = { left: r, width: l, height: n, top: a, index: o }, b = e.getRowByIndex(i);
1337
- let p = "none";
1338
- if (o === this.getTreeArrowColumnIndex() && b instanceof O) {
1339
- const y = b;
1340
- (_ = y.children) != null && _.length ? y.expanded ? p = "expanded" : p = "collapsed" : p = "hidden";
1341
- }
1342
- let v;
1335
+ var J;
1336
+ const m = this.editorRenderer && this.editorRendererRow === s && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(s, i), b = { left: r, width: l, height: n, top: d, index: i }, w = e.getRowByIndex(s);
1337
+ let u = "none";
1338
+ if (i === this.getTreeArrowColumnIndex() && w instanceof F) {
1339
+ const x = w;
1340
+ (J = x.children) != null && J.length ? x.expanded ? u = "expanded" : u = "collapsed" : u = "hidden";
1341
+ }
1342
+ let C;
1343
1343
  if (t === "header") {
1344
- const y = this.tableModel.getColumnDef(o);
1345
- (!(y != null && y.sortIconVisible) || y != null && y.sortIconVisible()) && (v = y == null ? void 0 : y.sortState);
1344
+ const x = this.tableModel.getColumnDef(i);
1345
+ (!(x != null && x.sortIconVisible) || x != null && x.sortIconVisible()) && (C = x == null ? void 0 : x.sortState);
1346
1346
  }
1347
- const x = e.getValueAt(i, o), C = f ? "" : `${x}`, w = e.isRowChecked(i), m = this.dom.addColumnDiv(
1348
- d,
1349
- c,
1347
+ const v = e.getValueAt(s, i), R = m ? "" : `${v}`, y = e.isRowChecked(s), S = this.dom.addColumnDiv(
1348
+ a,
1349
+ b,
1350
+ s,
1350
1351
  i,
1351
- o,
1352
1352
  t,
1353
- s,
1354
- C,
1355
- p,
1353
+ o,
1354
+ R,
1355
+ u,
1356
1356
  this.tableOptions,
1357
- w,
1358
- v
1359
- ), M = e.getTooltipAt(i, o);
1360
- M && this.dom.setAttribute(m, "title", M);
1361
- const E = this.tableModel.getColumnDef(o);
1362
- E && E.classes[t] && this.dom.addClasses(E.classes[t], m);
1363
- let R;
1364
- f && (R = f.render(m, i, o, t, e, x, this.dom.domService));
1365
- const D = e.getCustomClassesAt(i, o);
1366
- if (D.length && this.dom.addClasses(D, m), this.dom.addColumnBorderDivs(this.tableOptions, d, c, t, s), S && this.dom.addHorizontalBorder({ left: r, width: l, height: n, top: a + n }, d), this.getFocusModel && t === "body") {
1367
- const y = this.getFocusModel();
1368
- y != null && y.hasFocus(i, o) && this.dom.addFocusBorderDivs(d, c, {});
1369
- }
1370
- t === "header" && this.dom.setAttribute(m, "data-ge-action", "drag-column");
1371
- const F = e.getCustomStyleAt(i, o);
1372
- if (F)
1373
- for (const y in F)
1374
- this.dom.setStyle(m, y, F[y]);
1375
- return [m, R];
1357
+ y,
1358
+ C
1359
+ ), T = e.getTooltipAt(s, i);
1360
+ T && this.dom.setAttribute(S, "title", T);
1361
+ const A = this.tableModel.getColumnDef(i);
1362
+ A && A.classes[t] && this.dom.addClasses(A.classes[t], S);
1363
+ let M;
1364
+ m && (M = m.render(S, s, i, t, e, v, this.dom.domService));
1365
+ const B = e.getCustomClassesAt(s, i);
1366
+ if (B.length && this.dom.addClasses(B, S), this.dom.addColumnBorderDivs(this.tableOptions, a, b, t, o), c && this.dom.addHorizontalBorder({ left: r, width: l, height: n, top: d + n }, a), this.getFocusModel && t === "body") {
1367
+ const x = this.getFocusModel();
1368
+ x != null && x.hasFocus(s, i) && this.dom.addFocusBorderDivs(a, b, {});
1369
+ }
1370
+ t === "header" && this.dom.setAttribute(S, "data-ge-action", "drag-column");
1371
+ const G = e.getCustomStyleAt(s, i);
1372
+ if (G)
1373
+ for (const x in G)
1374
+ this.dom.setStyle(S, x, G[x]);
1375
+ return [S, M];
1376
1376
  }
1377
1377
  getColumnWidths(e, t) {
1378
+ const o = [];
1379
+ for (let s = e; s <= t; s++)
1380
+ o.push(this.tableModel.getColumnWidth(s));
1381
+ return o;
1382
+ }
1383
+ getRowHeights(e, t, o) {
1378
1384
  const s = [];
1379
1385
  for (let i = e; i <= t; i++)
1380
- s.push(this.tableModel.getColumnWidth(i));
1386
+ s.push(o.getRowHeight(i));
1381
1387
  return s;
1382
1388
  }
1383
- getRowHeights(e, t, s) {
1384
- const i = [];
1385
- for (let o = e; o <= t; o++)
1386
- i.push(s.getRowHeight(o));
1387
- return i;
1388
- }
1389
1389
  adjustHoverRows(e) {
1390
1390
  if (this.tableOptions.hoverRowVisible && e.rowIndex > -1) {
1391
- const t = this.hostElement.clientWidth, s = this.tableModel.getAreaModel("body").getRowHeight(e.rowIndex), i = e.rowTop + this.areaHeaderCenter.parent.clientHeight - this.scrollTop;
1391
+ const t = this.hostElement.clientWidth, o = this.tableModel.getAreaModel("body").getRowHeight(e.rowIndex), s = e.rowTop + this.areaHeaderCenter.parent.clientHeight - this.scrollTop;
1392
1392
  this.dom.applyStyle(this.hoverRow, {
1393
1393
  left: "0",
1394
- top: i + "px",
1394
+ top: s + "px",
1395
1395
  width: t + "px",
1396
- height: s + "px",
1396
+ height: o + "px",
1397
1397
  display: "block"
1398
1398
  });
1399
1399
  } else
@@ -1406,11 +1406,11 @@ class ae extends re {
1406
1406
  }
1407
1407
  adjustHoverColumns(e) {
1408
1408
  if (this.tableOptions.hoverColumnVisible && e.rowIndex > -1) {
1409
- 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;
1409
+ const t = this.hostElement.clientHeight, o = this.tableModel.getColumnWidth(e.columnIndex), s = this.areaBodyWestGeo.width, i = e.columnLeft + this.tableModel.getPadding().left - this.scrollLeft - s;
1410
1410
  this.dom.applyStyle(this.hoverColumn, {
1411
- left: o + "px",
1411
+ left: i + "px",
1412
1412
  top: "0px",
1413
- width: s + "px",
1413
+ width: o + "px",
1414
1414
  height: t + "px",
1415
1415
  display: "block"
1416
1416
  });
@@ -1425,25 +1425,25 @@ class ae extends re {
1425
1425
  debounce(e, t = 1e3) {
1426
1426
  this.debounceTimeout && clearTimeout(this.debounceTimeout), this.debounceTimeout = setTimeout(e.bind(this), t);
1427
1427
  }
1428
- renderDragTargetDiv(e, t, s, i, o) {
1428
+ renderDragTargetDiv(e, t, o, s, i) {
1429
1429
  const r = this.dom.applyStylePosistionAbsolute(
1430
1430
  this.dom.createDivWithClass("ge-table-drop-zone", e)
1431
1431
  );
1432
- 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;
1432
+ return this.dom.setStyle(r, "left", `${t}px`), this.dom.setStyle(r, "top", `${o}px`), this.dom.setStyle(r, "width", `${s}px`), this.dom.setStyle(r, "height", `${i}px`), r;
1433
1433
  }
1434
- renderSelectedBackgroundDiv(e, t, s, i, o, r, l, n, a, d, S) {
1434
+ renderSelectedBackgroundDiv(e, t, o, s, i, r, l, n, d, a, c) {
1435
1435
  let g = !1;
1436
- if (!e && t && i.isSelectable(o, r) && this.getSelectionModel) {
1437
- const f = this.getSelectionModel();
1438
- if (f) {
1439
- const c = f.getSelectionCount(o, r);
1440
- g = c > 0;
1441
- for (let b = 0; b < c; b++) {
1442
- const p = this.dom.applyStylePosistionAbsolute(
1436
+ if (!e && t && s.isSelectable(i, r) && this.getSelectionModel) {
1437
+ const m = this.getSelectionModel();
1438
+ if (m) {
1439
+ const b = m.getSelectionCount(i, r);
1440
+ g = b > 0;
1441
+ for (let w = 0; w < b; w++) {
1442
+ const u = this.dom.applyStylePosistionAbsolute(
1443
1443
  // ge-table-body-west-selected-range
1444
- this.dom.createDivWithClass(`ge-table-${i.areaIdent}-${s}-selected-range`, l)
1444
+ this.dom.createDivWithClass(`ge-table-${s.areaIdent}-${o}-selected-range`, l)
1445
1445
  );
1446
- this.dom.setStyle(p, "left", `${n}px`), this.dom.setStyle(p, "top", `${a}px`), this.dom.setStyle(p, "width", `${d}px`), this.dom.setStyle(p, "height", `${S}px`);
1446
+ this.dom.setStyle(u, "left", `${n}px`), this.dom.setStyle(u, "top", `${d}px`), this.dom.setStyle(u, "width", `${a}px`), this.dom.setStyle(u, "height", `${c}px`);
1447
1447
  }
1448
1448
  }
1449
1449
  }
@@ -1452,96 +1452,96 @@ class ae extends re {
1452
1452
  renderCell({
1453
1453
  areaModel: e,
1454
1454
  areaIdent: t,
1455
- sideIdent: s,
1456
- rowIndex: i,
1457
- columnIndex: o,
1455
+ sideIdent: o,
1456
+ rowIndex: s,
1457
+ columnIndex: i,
1458
1458
  left: r,
1459
1459
  top: l,
1460
1460
  width: n,
1461
- height: a,
1462
- parent: d,
1463
- cellSelected: S,
1461
+ height: d,
1462
+ parent: a,
1463
+ cellSelected: c,
1464
1464
  lastRowOfModel: g,
1465
- gammaRange: f
1465
+ gammaRange: m
1466
1466
  }) {
1467
- const [c, b] = this.addAndRenderCellDiv({
1467
+ const [b, w] = this.addAndRenderCellDiv({
1468
1468
  areaModel: e,
1469
1469
  areaIdent: t,
1470
- sideIdent: s,
1471
- rowIndex: i,
1472
- index: o,
1470
+ sideIdent: o,
1471
+ rowIndex: s,
1472
+ index: i,
1473
1473
  left: r,
1474
1474
  width: n,
1475
- height: a,
1475
+ height: d,
1476
1476
  top: l,
1477
- parent: d,
1477
+ parent: a,
1478
1478
  lastRowOfModel: g,
1479
- gammaRange: f
1479
+ gammaRange: m
1480
1480
  });
1481
- S && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, c), b && this.cleanupFunctions[t].push(b);
1481
+ c && this.dom.addClass(`ge-table-${t}-${o}-selected-range`, b), w && this.cleanupFunctions[t].push(w);
1482
1482
  }
1483
- renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: i, cellWidth: o, cellHeight: r, parent: l }) {
1484
- const n = this.dom.domService, a = this.tableOptions.columnResizeHandleWidthInPx ?? 2, d = n.createElement("div");
1485
- n.setAttribute(d, "data-col-index", `${t}`), n.setAttribute(d, "data-row-index", `${e}`), n.setAttribute(d, "data-area", "header"), n.setAttribute(d, "data-ge-action", "resize-column"), n.addClass(d, "ge-table-column-resize-handle"), n.setStyle(d, "display", "clip"), n.setStyle(d, "position", "absolute"), n.setStyle(d, "cursor", "col-resize"), n.setStyle(d, "left", `${s + o - a}px`), n.setStyle(d, "top", `${i}px`), n.setStyle(d, "width", `${a}px`), n.setStyle(d, "height", `${r}px`), n.appendChild(l, d);
1483
+ renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: o, cellTop: s, cellWidth: i, cellHeight: r, parent: l }) {
1484
+ const n = this.dom.domService, d = this.tableOptions.columnResizeHandleWidthInPx ?? 2, a = n.createElement("div");
1485
+ n.setAttribute(a, "data-col-index", `${t}`), n.setAttribute(a, "data-row-index", `${e}`), n.setAttribute(a, "data-area", "header"), n.setAttribute(a, "data-ge-action", "resize-column"), n.addClass(a, "ge-table-column-resize-handle"), n.setStyle(a, "display", "clip"), n.setStyle(a, "position", "absolute"), n.setStyle(a, "cursor", "col-resize"), n.setStyle(a, "left", `${o + i - d}px`), n.setStyle(a, "top", `${s}px`), n.setStyle(a, "width", `${d}px`), n.setStyle(a, "height", `${r}px`), n.appendChild(l, a);
1486
1486
  }
1487
1487
  }
1488
- class de {
1488
+ class ke {
1489
1489
  constructor(e, t) {
1490
1490
  this.columnIndex = e, this.sortState = t;
1491
1491
  }
1492
1492
  }
1493
- class he {
1493
+ class Te {
1494
1494
  constructor(e) {
1495
1495
  this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
1496
1496
  }
1497
1497
  onHostElementChanged(e) {
1498
1498
  if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
1499
- const t = e.target, s = t.getAttribute("data-area"), i = t.getAttribute("data-row-index"), o = t.getAttribute("data-col-index");
1500
- if (s && i && o) {
1501
- const r = $(s), l = Number(i), n = Number(o);
1499
+ const t = e.target, o = t.getAttribute("data-area"), s = t.getAttribute("data-row-index"), i = t.getAttribute("data-col-index");
1500
+ if (o && s && i) {
1501
+ const r = Y(o), l = Number(s), n = Number(i);
1502
1502
  this.tableScope.updateModelValueAfterEdit(r, l, n, t.value);
1503
1503
  }
1504
1504
  }
1505
1505
  }
1506
1506
  }
1507
- class ce {
1507
+ class _e {
1508
1508
  constructor(e = -1, t = -1) {
1509
1509
  this.rowIndex = e, this.columnIndex = t;
1510
1510
  }
1511
1511
  }
1512
- class V {
1512
+ class U {
1513
1513
  constructor(e) {
1514
1514
  this.cells = e;
1515
1515
  }
1516
1516
  static createSingle(e, t) {
1517
- return new V([new ce(e, t)]);
1517
+ return new U([new _e(e, t)]);
1518
1518
  }
1519
1519
  }
1520
- class pe {
1520
+ class De {
1521
1521
  constructor(e) {
1522
- var t, s;
1523
- 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);
1522
+ var t, o;
1523
+ this.tableScope = e, (t = this.tableScope.tableOptions) != null && t.getSelectionModel && (this.getSelectionModel = this.tableScope.tableOptions.getSelectionModel), (o = this.tableScope.tableOptions) != null && o.getFocusModel && (this.getFocusModel = this.tableScope.tableOptions.getFocusModel);
1524
1524
  }
1525
1525
  onMouseClicked(e, t) {
1526
- var o, r, l, n, a, d, S;
1527
- let s = !1, i = !1;
1526
+ var i, r, l, n, d, a, c;
1527
+ let o = !1, s = !1;
1528
1528
  if (this.getSelectionModel && this.getFocusModel) {
1529
- const g = this.getSelectionModel(), f = this.getFocusModel();
1530
- g && f && (f.hasFocus(e.rowIndex, e.columnIndex) || (f.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) : (l = e.originalEvent) != null && l.ctrlKey || (n = e.originalEvent) != null && n.metaKey ? (g.addSelection(A.singleCell(e.rowIndex, e.columnIndex)), i = !0, s = !0) : (a = e.originalEvent) != null && a.altKey && ((d = e.originalEvent) != null && d.ctrlKey || (S = e.originalEvent) != null && S.metaKey) && (g.removeSelection(A.singleCell(e.rowIndex, e.columnIndex)), i = !0, s = !0));
1529
+ const g = this.getSelectionModel(), m = this.getFocusModel();
1530
+ g && m && (m.hasFocus(e.rowIndex, e.columnIndex) || (m.setFocus(e.rowIndex, e.columnIndex), o = !0), (i = e.originalEvent) != null && i.shiftKey || g.hasSelection() && (g.clear(), o = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (g.addSelection(this.createRangeByEvents(e, this.previousEvt)), s = !0, o = !0) : (l = e.originalEvent) != null && l.ctrlKey || (n = e.originalEvent) != null && n.metaKey ? (g.addSelection(E.singleCell(e.rowIndex, e.columnIndex)), s = !0, o = !0) : (d = e.originalEvent) != null && d.altKey && ((a = e.originalEvent) != null && a.ctrlKey || (c = e.originalEvent) != null && c.metaKey) && (g.removeSelection(E.singleCell(e.rowIndex, e.columnIndex)), s = !0, o = !0));
1531
1531
  }
1532
- return i ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), s;
1532
+ return s ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), o;
1533
1533
  }
1534
1534
  onActionTriggered(e) {
1535
1535
  if (this.getSelectionModel && this.getFocusModel) {
1536
- const t = this.getSelectionModel(), s = this.getFocusModel();
1537
- if (t && s) {
1536
+ const t = this.getSelectionModel(), o = this.getFocusModel();
1537
+ if (t && o) {
1538
1538
  if (e === "SELECT_ALL")
1539
1539
  return t.selectAll(), this.tableScope.repaint(), !0;
1540
1540
  if (e === "DESELECT_ALL")
1541
1541
  return t.clear(), this.tableScope.repaint(), !0;
1542
1542
  if (e === "TOGGLE_SELECTION") {
1543
- const [i, o] = s.getFocus();
1544
- return t.togglePoint(i, o), this.tableScope.repaint(), !0;
1543
+ const [s, i] = o.getFocus();
1544
+ return t.togglePoint(s, i), this.tableScope.repaint(), !0;
1545
1545
  }
1546
1546
  }
1547
1547
  }
@@ -1549,16 +1549,16 @@ class pe {
1549
1549
  }
1550
1550
  createRangeByEvents(e, t) {
1551
1551
  t || (t = e);
1552
- 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);
1553
- return A.create({
1554
- rowIndex1: s,
1555
- columnIndex1: o,
1556
- rowIndex2: i,
1552
+ const o = Math.min(e.rowIndex, t == null ? void 0 : t.rowIndex), s = Math.max(e.rowIndex, t == null ? void 0 : t.rowIndex), i = Math.min(e.columnIndex, t == null ? void 0 : t.columnIndex), r = Math.max(e.columnIndex, t == null ? void 0 : t.columnIndex);
1553
+ return E.create({
1554
+ rowIndex1: o,
1555
+ columnIndex1: i,
1556
+ rowIndex2: s,
1557
1557
  columnIndex2: r
1558
1558
  });
1559
1559
  }
1560
1560
  }
1561
- class ue {
1561
+ class $e {
1562
1562
  get() {
1563
1563
  return {
1564
1564
  f2: "START_EDITING",
@@ -1576,7 +1576,7 @@ class ue {
1576
1576
  };
1577
1577
  }
1578
1578
  }
1579
- class Se {
1579
+ class Fe {
1580
1580
  get() {
1581
1581
  return {
1582
1582
  f2: "START_EDITING",
@@ -1596,7 +1596,7 @@ class Se {
1596
1596
  };
1597
1597
  }
1598
1598
  }
1599
- class ge {
1599
+ class Le {
1600
1600
  constructor(e) {
1601
1601
  this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
1602
1602
  }
@@ -1604,7 +1604,7 @@ class ge {
1604
1604
  this.listener.includes(e) || this.listener.push(e);
1605
1605
  }
1606
1606
  init() {
1607
- this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new Se().get()) : Object.assign(this.shortcutActionIdMapping, new ue().get()), Object.assign(this.shortcutActionIdMapping, this.tableScope.tableOptions.shortcutActionIdMapping), this.isDebug() && console.debug("ShortcutService", this.shortcutActionIdMapping), this.tableScope.hostElement.addEventListener("keydown", this.onKeyDown.bind(this));
1607
+ this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new Fe().get()) : Object.assign(this.shortcutActionIdMapping, new $e().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));
1608
1608
  }
1609
1609
  isMacintosh() {
1610
1610
  return navigator.platform.indexOf("Mac") > -1;
@@ -1622,24 +1622,24 @@ class ge {
1622
1622
  emit(e) {
1623
1623
  this.isDebug() && console.debug("ShortcutService emit:", e);
1624
1624
  let t = !1;
1625
- for (const s of this.listener)
1626
- s.onActionTriggered(e) && (t = !0);
1625
+ for (const o of this.listener)
1626
+ o.onActionTriggered(e) && (t = !0);
1627
1627
  return t;
1628
1628
  }
1629
1629
  findEnty(e) {
1630
1630
  const t = this.getTokenByEvent(e);
1631
1631
  this.isDebug() && console.debug("ShortcutService tokens:", t);
1632
- for (const s in this.shortcutActionIdMapping) {
1633
- const i = s.replace(/opt/g, "alt").replace(/cmd/g, "meta").split(/[\+ ]/g).sort();
1634
- if (this.areTokensEquals(t, i))
1635
- return this.shortcutActionIdMapping[s];
1632
+ for (const o in this.shortcutActionIdMapping) {
1633
+ const s = o.replace(/opt/g, "alt").replace(/cmd/g, "meta").split(/[\+ ]/g).sort();
1634
+ if (this.areTokensEquals(t, s))
1635
+ return this.shortcutActionIdMapping[o];
1636
1636
  }
1637
1637
  }
1638
1638
  areTokensEquals(e, t) {
1639
1639
  if (e.length !== t.length || e.length === 0)
1640
1640
  return !1;
1641
- for (let s = 0; s < e.length; s++)
1642
- if (e[s] !== t[s])
1641
+ for (let o = 0; o < e.length; o++)
1642
+ if (e[o] !== t[o])
1643
1643
  return !1;
1644
1644
  return !0;
1645
1645
  }
@@ -1648,7 +1648,7 @@ class ge {
1648
1648
  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();
1649
1649
  }
1650
1650
  }
1651
- class fe {
1651
+ class Oe {
1652
1652
  onCheckboxChanged(e) {
1653
1653
  }
1654
1654
  onContextmenu(e) {
@@ -1664,19 +1664,19 @@ class fe {
1664
1664
  onMouseMoved(e) {
1665
1665
  }
1666
1666
  }
1667
- class me extends ae {
1668
- constructor(e, t, s, i, o) {
1667
+ class Pe extends Ie {
1668
+ constructor(e, t, o, s, i) {
1669
1669
  var r;
1670
1670
  if (super(
1671
1671
  e,
1672
1672
  t,
1673
- new Y(s),
1674
- i
1675
- ), this.eventListener = o, this.selectionService = new pe(this), this.api = new J(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, o || (this.eventListener = new fe()), (r = this.tableOptions) != null && r.autoRestoreOptions) {
1673
+ new me(o),
1674
+ s
1675
+ ), this.eventListener = i, this.selectionService = new De(this), this.api = new xe(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, i || (this.eventListener = new Oe()), (r = this.tableOptions) != null && r.autoRestoreOptions) {
1676
1676
  const l = this.tableOptions.autoRestoreOptions, n = l.getStorageKeyFn;
1677
- n && (l.autoRestoreScrollPosition && (this.storeScrollPosStateService = new te(n)), l.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new ie(n)), l.autoRestoreSortingState && (this.storeSortingService = new oe(n)));
1677
+ n && (l.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Ce(n)), l.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new Re(n)), l.autoRestoreSortingState && (this.storeSortingService = new Ae(n)));
1678
1678
  }
1679
- this.mouseHandler = new U(this), this.inputHandler = new he(this), this.shortcutService = new ge(this), this.shortcutService.addListener(this.selectionService);
1679
+ this.mouseHandler = new Se(this), this.inputHandler = new Te(this), this.shortcutService = new Le(this), this.shortcutService.addListener(this.selectionService);
1680
1680
  }
1681
1681
  onActionTriggered(e) {
1682
1682
  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))
@@ -1684,15 +1684,15 @@ class me extends ae {
1684
1684
  if (e === "START_EDITING" && this.getFocusModel) {
1685
1685
  const t = this.getFocusModel();
1686
1686
  if (t) {
1687
- const [s, i] = t.getFocus();
1688
- this.tableModel.getBodyModel().isEditable(s, i) && (this.clearSelection(), this.initRenderEditor(s, i));
1687
+ const [o, s] = t.getFocus();
1688
+ this.tableModel.getBodyModel().isEditable(o, s) && (this.clearSelection(), this.initRenderEditor(o, s));
1689
1689
  }
1690
1690
  return !0;
1691
1691
  }
1692
1692
  return !1;
1693
1693
  }
1694
- updateModelValueAfterEdit(e, t, s, i) {
1695
- e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, i) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(V.createSingle(t, s)), this.hostElement.focus());
1694
+ updateModelValueAfterEdit(e, t, o, s) {
1695
+ e === "body" && this.tableModel.getAreaModel(e).setValue(t, o, s) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(U.createSingle(t, o)), this.hostElement.focus());
1696
1696
  }
1697
1697
  getApi() {
1698
1698
  return this.api;
@@ -1705,16 +1705,16 @@ class me extends ae {
1705
1705
  this.tableModel.init(), (e = this.tableOptions) != null && e.externalFilterFunction && this.externalFilterChanged(!1), this.autoRestoreCollapsedExpandedState(), this.autoRestoreSortingState(), this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows(), this.autoRestoreScrollPosition();
1706
1706
  }
1707
1707
  createGeMouseEvent(e) {
1708
- const t = new B();
1708
+ const t = new X();
1709
1709
  if (t.originalEvent = e, e) {
1710
- const s = e.target;
1711
- 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) {
1712
- const i = this.tableModel.getAreaModel(t.areaIdent);
1713
- t.rowTop = i.getYPosByRowIndex(t.rowIndex);
1710
+ const o = e.target;
1711
+ if ([t.areaIdent, t.sideIdent] = this.getAreaAndSideIdentByAttr(o), t.rowIndex = this.getNumberByAttr(o, "data-row-index"), t.columnIndex = this.getNumberByAttr(o, "data-col-index"), t.action = this.getStringByAttr(o, "data-ge-action"), t.areaIdent) {
1712
+ const s = this.tableModel.getAreaModel(t.areaIdent);
1713
+ t.rowTop = s.getYPosByRowIndex(t.rowIndex);
1714
1714
  }
1715
1715
  if (t.columnLeft = this.tableModel.getXPosByColumnIndex(t.columnIndex), e.ctrlKey && e.altKey) {
1716
- const i = e.clientY - this.hostElement.offsetTop - this.areaHeaderCenter.parent.clientHeight, o = e.clientX - this.hostElement.offsetLeft - this.areaBodyWestGeo.width;
1717
- this.debugOnce(o, i);
1716
+ const s = e.clientY - this.hostElement.offsetTop - this.areaHeaderCenter.parent.clientHeight, i = e.clientX - this.hostElement.offsetLeft - this.areaBodyWestGeo.width;
1717
+ this.debugOnce(i, s);
1718
1718
  }
1719
1719
  }
1720
1720
  return t;
@@ -1735,44 +1735,44 @@ class me extends ae {
1735
1735
  this.eventListener.onContextmenu(e);
1736
1736
  }
1737
1737
  toggleExpandCollapseAll(e = !0) {
1738
- var s;
1738
+ var o;
1739
1739
  const t = this.tableModel.getBodyModel();
1740
- t instanceof L && (t.toggleExpandCollapseAll(e), this.repaint(), (s = this.storeStateCollapsedExpandService) == null || s.collapsedStateAll(e));
1740
+ t instanceof V && (t.toggleExpandCollapseAll(e), this.repaint(), (o = this.storeStateCollapsedExpandService) == null || o.collapsedStateAll(e));
1741
1741
  }
1742
- toggleRowCheckbox(e, t, s) {
1742
+ toggleRowCheckbox(e, t, o) {
1743
1743
  var n;
1744
- const i = this.tableModel.getAreaModel(s), o = i.isRowChecked(e), r = o === void 0 || o === "semi" || o === "none";
1745
- i.setRowChecked(e, r), this.repaint();
1746
- const l = (n = i.rowSelectionModel) == null ? void 0 : n.getCheckedRows();
1744
+ const s = this.tableModel.getAreaModel(o), i = s.isRowChecked(e), r = i === void 0 || i === "semi" || i === "none";
1745
+ s.setRowChecked(e, r), this.repaint();
1746
+ const l = (n = s.rowSelectionModel) == null ? void 0 : n.getCheckedRows();
1747
1747
  this.eventListener.onCheckboxChanged(l || []);
1748
1748
  }
1749
1749
  onMouseClicked(e, t) {
1750
- let s = this.selectionService.onMouseClicked(e, t);
1751
- if (!s && this.getFocusModel) {
1752
- const i = this.getFocusModel();
1753
- i && (s = i.hasChanged(), i.clearChanged(), s && this.resetEditorRenderer());
1750
+ let o = this.selectionService.onMouseClicked(e, t);
1751
+ if (!o && this.getFocusModel) {
1752
+ const s = this.getFocusModel();
1753
+ s && (o = s.hasChanged(), s.clearChanged(), o && this.resetEditorRenderer());
1754
1754
  }
1755
- this.eventListener.onMouseClicked(e), s && this.debounce(this.repaint.bind(this), 10);
1755
+ this.eventListener.onMouseClicked(e), o && this.debounce(this.repaint.bind(this), 10);
1756
1756
  }
1757
1757
  externalFilterChanged(e = !0) {
1758
1758
  const t = this.tableOptions.externalFilterFunction;
1759
1759
  t && (e && this.clearSelectionModel(), this.tableModel.externalFilterChanged(t), this.scrollViewport.scrollTo(0, 0), this.tableModel.recalcHeightAndPadding(), this.resetSizeOfWrapperDiv(), this.repaint());
1760
1760
  }
1761
- onHeaderDblClicked(e, t, s) {
1762
- var o, r;
1763
- const i = this.tableModel.getColumnDef(s);
1764
- if (i != null && i.sortable && i.sortable()) {
1761
+ onHeaderDblClicked(e, t, o) {
1762
+ var i, r;
1763
+ const s = this.tableModel.getColumnDef(o);
1764
+ if (s != null && s.sortable && s.sortable()) {
1765
1765
  e.preventDefault(), e.stopPropagation();
1766
- const l = i.sortStatesOrder ? i.sortStatesOrder : this.tableOptions.sortOrder, n = i.sortState ?? "", a = l[(l.indexOf(n) + 1) % l.length], d = new de(s, a);
1767
- this.tableModel.doSort([d]) && ((o = this.tableModel.getColumnDefs()) == null || o.forEach((g) => g.sortState = ""), i.sortState = a), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([d]);
1766
+ const l = s.sortStatesOrder ? s.sortStatesOrder : this.tableOptions.sortOrder, n = s.sortState ?? "", d = l[(l.indexOf(n) + 1) % l.length], a = new ke(o, d);
1767
+ this.tableModel.doSort([a]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((g) => g.sortState = ""), s.sortState = d), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([a]);
1768
1768
  }
1769
1769
  }
1770
1770
  changeFocusCell(e, t) {
1771
1771
  if (!this.isEditing() && this.getFocusModel) {
1772
- const s = this.getFocusModel();
1773
- if (s) {
1774
- const [i, o] = s.getFocus();
1775
- return s.setFocus(i + t, o + e), this.repaint(), !0;
1772
+ const o = this.getFocusModel();
1773
+ if (o) {
1774
+ const [s, i] = o.getFocus();
1775
+ return o.setFocus(s + t, i + e), this.repaint(), !0;
1776
1776
  }
1777
1777
  }
1778
1778
  return !1;
@@ -1785,41 +1785,41 @@ class me extends ae {
1785
1785
  this.getSelectionModel && ((e = this.getSelectionModel()) == null || e.clear());
1786
1786
  }
1787
1787
  debugOnce(e, t) {
1788
- var s;
1789
- 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);
1788
+ var o;
1789
+ console.clear(), console.info("this.hostElement.offsetTop", this.hostElement.offsetTop), console.info("this.hostElement.scrollHeight", this.hostElement.scrollHeight), console.info("this.scrollViewportTop", this.scrollTop), console.info("this.areaHeaderCenter.parent.clientHeight", this.areaHeaderCenter.parent.clientHeight), console.info("bodyY", t), console.info("bodyX", e), console.info("rows", this.firstVisibleRowIndex), console.info(""), console.info("this.tableModel", this.tableModel), console.info(""), console.info("this.mouseMoveEvent.clientX", (o = this.mouseHandler.mouseEvent) == null ? void 0 : o.clientX), console.info("this.hostElement.offsetLeft", this.hostElement.offsetLeft), console.info("this.areaBodyWestGeo.width", this.areaBodyWestGeo.width);
1790
1790
  }
1791
1791
  autoRestoreScrollPosition() {
1792
1792
  var e;
1793
1793
  if ((e = this.tableOptions) != null && e.autoRestoreOptions && this.storeScrollPosStateService && this.tableOptions.autoRestoreOptions.autoRestoreScrollPosition) {
1794
- const s = this.storeScrollPosStateService.getScrollOffset();
1795
- s && this.scrollViewport.scrollTo(...s);
1794
+ const o = this.storeScrollPosStateService.getScrollOffset();
1795
+ o && this.scrollViewport.scrollTo(...o);
1796
1796
  }
1797
1797
  }
1798
1798
  autoRestoreSortingState() {
1799
1799
  var e, t;
1800
1800
  if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.autoRestoreSortingState && this.storeSortingService) {
1801
- const s = this.storeSortingService.getSortItems();
1802
- s != null && s.length && this.tableModel.getBodyModel().doSort(s);
1801
+ const o = this.storeSortingService.getSortItems();
1802
+ o != null && o.length && this.tableModel.getBodyModel().doSort(o);
1803
1803
  }
1804
1804
  }
1805
1805
  autoRestoreCollapsedExpandedState() {
1806
1806
  var e, t;
1807
1807
  if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.getRowId && this.storeStateCollapsedExpandService) {
1808
- const s = this.tableOptions.autoRestoreOptions, i = s.getRowId;
1809
- if (s.autoRestoreCollapsedExpandedState && i) {
1810
- const o = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), r = this.tableModel.getAreaModel("body");
1811
- if (r instanceof L) {
1808
+ const o = this.tableOptions.autoRestoreOptions, s = o.getRowId;
1809
+ if (o.autoRestoreCollapsedExpandedState && s) {
1810
+ const i = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), r = this.tableModel.getAreaModel("body");
1811
+ if (r instanceof V) {
1812
1812
  const l = r, n = r.getRowCount();
1813
- for (let a = 0; a < n; a++) {
1814
- const d = r.getRowByIndex(a);
1815
- if (d)
1816
- if (o.allExpanded)
1817
- d.expanded = !0;
1818
- else if (o.allCollapsed)
1819
- d.expanded = !1;
1813
+ for (let d = 0; d < n; d++) {
1814
+ const a = r.getRowByIndex(d);
1815
+ if (a)
1816
+ if (i.allExpanded)
1817
+ a.expanded = !0;
1818
+ else if (i.allCollapsed)
1819
+ a.expanded = !1;
1820
1820
  else {
1821
- const S = i(d.data);
1822
- o.mode === "expanded" ? d.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(S) : o.mode === "collapsed" && (d.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(S));
1821
+ const c = s(a.data);
1822
+ i.mode === "expanded" ? a.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(c) : i.mode === "collapsed" && (a.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(c));
1823
1823
  }
1824
1824
  }
1825
1825
  l.recalcVisibleTreeRows();
@@ -1828,146 +1828,1787 @@ class me extends ae {
1828
1828
  }
1829
1829
  }
1830
1830
  }
1831
- class be {
1832
- render(e, t, s, i, o, r, l) {
1833
- if (o.isEditable(t, s)) {
1834
- l.addClass(e, "ge-table-row-input-div");
1835
- const n = o.getValueAt(t, s);
1836
- e.innerHTML = `
1837
- <input
1838
- type="text"
1839
- value="${n}"
1840
- autofocus
1841
- onfocus="this.setSelectionRange(0, this.value.length)"
1842
- data-listen="change"
1843
- data-area="${i}"
1844
- data-row-index="${t}"
1845
- data-col-index="${s}"
1846
- data-input-type="text"
1847
- style="width:calc(100% - 8px);height:100%;border:0;padding:0 0 0 8px;"
1848
- class="ge-table-cell-editor-input">`;
1849
- }
1831
+ class de {
1832
+ }
1833
+ de.themes = ["light", "combat", "paper", "blackboard"];
1834
+ de.vars = {
1835
+ light: `:root [data-theme="light"] {
1836
+ --ge-table-bg: rgba(255,255,255, 0.5);
1837
+ --ge-table-header-west-bg: rgba(233, 233, 233, 0.5);
1838
+ --ge-table-header-center-bg: rgba(233, 233, 233, 0.5);
1839
+ --ge-table-header-east-bg: rgba(233, 233, 233, 0.5);
1840
+ --ge-table-header-west-text: #000;
1841
+ --ge-table-header-center-text: #000;
1842
+ --ge-table-header-east-text: #000;
1843
+ --ge-table-header-west-horizontal-border: #ddd;
1844
+ --ge-table-header-west-vertical-border: #ccc;
1845
+ --ge-table-header-center-horizontal-border: #ddd;
1846
+ --ge-table-header-center-vertical-border: #ccc;
1847
+ --ge-table-header-east-horizontal-border: #ddd;
1848
+ --ge-table-header-east-vertical-border: #ccc;
1849
+ --ge-table-body-west-bg: rgba(233, 233, 233, 0.5);
1850
+ --ge-table-body-center-bg: rgba(255,255,255, 0.5);
1851
+ --ge-table-body-east-bg: rgba(233, 233, 233, 0.5);
1852
+ --ge-table-body-west-text: #000;
1853
+ --ge-table-body-center-text: #000;
1854
+ --ge-table-body-east-text: #000;
1855
+ --ge-table-body-west-horizontal-border: #ddd;
1856
+ --ge-table-body-west-vertical-border: #ccc;
1857
+ --ge-table-body-center-horizontal-border: #bbb;
1858
+ --ge-table-body-center-vertical-border: #ddd;
1859
+ --ge-table-body-east-horizontal-border: #ddd;
1860
+ --ge-table-body-east-vertical-border: #ccc;
1861
+ --ge-table-body-west-selected-range-bg: rgba(0, 152, 219, 0.4);
1862
+ --ge-table-body-center-selected-range-bg: rgba(0, 152, 219, 0.4);
1863
+ --ge-table-body-east-selected-range-bg: rgba(0, 152, 219, 0.4);
1864
+ --ge-table-body-west-selected-range-text: #000;
1865
+ --ge-table-body-center-selected-range-text: #000;
1866
+ --ge-table-body-east-selected-range-text: #000;
1867
+ --ge-table-footer-west-bg: rgba(233, 233, 233, 0.5);
1868
+ --ge-table-footer-center-bg: rgba(233, 233, 233, 0.5);
1869
+ --ge-table-footer-east-bg: rgba(233, 233, 233, 0.5);
1870
+ --ge-table-footer-west-text: #000;
1871
+ --ge-table-footer-center-text: #000;
1872
+ --ge-table-footer-east-text: #000;
1873
+ --ge-table-footer-west-horizontal-border: #ddd;
1874
+ --ge-table-footer-west-vertical-border: #ccc;
1875
+ --ge-table-footer-center-horizontal-border: #ddd;
1876
+ --ge-table-footer-center-vertical-border: #ccc;
1877
+ --ge-table-footer-east-horizontal-border: #ddd;
1878
+ --ge-table-footer-east-vertical-border: #ccc;
1879
+ --ge-table-border: #ccc;
1880
+ --ge-table-row-odd-bg: transparent;
1881
+ --ge-table-row-even-bg: transparent;
1882
+ --ge-table-column-odd-bg: transparent;
1883
+ --ge-table-column-even-bg: transparent;
1884
+ --ge-table-hover-column-bg: rgba(0, 224, 255, 0.27);
1885
+ --ge-table-hover-row-bg: rgba(0, 224, 255, 0.27);
1886
+ --ge-table-focus-border: rgb(0, 255, 255);
1887
+ --ge-table-color-error-text: #e00034;
1888
+ --ge-table-tree-arrow-collapsed-color: #e00034;
1889
+ --ge-table-column-resize-handle-border: rgb(0, 255, 255);
1890
+ --ge-table-dragged-col-div-bg: lightcyan;
1891
+ --ge-table-drop-zone-bg: rgba(244, 255, 242, 0.6);
1892
+ }`,
1893
+ combat: `:root [data-theme="combat"] {
1894
+ --ge-table-bg: #101010;
1895
+ --ge-table-header-west-bg: #101010;
1896
+ --ge-table-header-center-bg: #101010;
1897
+ --ge-table-header-east-bg: #101010;
1898
+ --ge-table-header-west-text: oklch(100% 0 0);
1899
+ --ge-table-header-center-text: oklch(100% 0 0);
1900
+ --ge-table-header-east-text: oklch(100% 0 0);
1901
+ --ge-table-header-west-horizontal-border: oklch(100% 0 0 / 0%);
1902
+ --ge-table-header-west-vertical-border: oklch(100% 0 0 / 0%);
1903
+ --ge-table-header-center-horizontal-border: oklch(100% 0 0 / 0%);
1904
+ --ge-table-header-center-vertical-border: oklch(100% 0 0 / 0%);
1905
+ --ge-table-header-east-horizontal-border: oklch(100% 0 0 / 0%);
1906
+ --ge-table-header-east-vertical-border: oklch(100% 0 0 / 0%);
1907
+ --ge-table-body-west-bg: #101010;
1908
+ --ge-table-body-center-bg: #101010;
1909
+ --ge-table-body-east-bg: #101010;
1910
+ --ge-table-body-west-text: #b6b4b4;
1911
+ --ge-table-body-center-text: #b6b4b4;
1912
+ --ge-table-body-east-text: #b6b4b4;
1913
+ --ge-table-body-west-horizontal-border: oklch(100% 0 0 / 0%);
1914
+ --ge-table-body-west-vertical-border: oklch(100% 0 0 / 0%);
1915
+ --ge-table-body-center-horizontal-border: oklch(100% 0 0 / 0%);
1916
+ --ge-table-body-center-vertical-border: oklch(100% 0 0 / 0%);
1917
+ --ge-table-body-east-horizontal-border: oklch(100% 0 0 / 0%);
1918
+ --ge-table-body-east-vertical-border: oklch(100% 0 0 / 0%);
1919
+ --ge-table-body-west-selected-range-bg: oklch(20% 0.2 39.6 / 37%);
1920
+ --ge-table-body-center-selected-range-bg: oklch(20% 0.2 39.6 / 37%);
1921
+ --ge-table-body-east-selected-range-bg: oklch(20% 0.2 39.6 / 37%);
1922
+ --ge-table-body-west-selected-range-text: #f00032;
1923
+ --ge-table-body-center-selected-range-text: #f00032;
1924
+ --ge-table-body-east-selected-range-text: #f00032;
1925
+ --ge-table-footer-west-bg: #101010;
1926
+ --ge-table-footer-center-bg: #101010;
1927
+ --ge-table-footer-east-bg: #101010;
1928
+ --ge-table-footer-west-text: oklch(100% 0 0);
1929
+ --ge-table-footer-center-text: oklch(100% 0 0);
1930
+ --ge-table-footer-east-text: oklch(100% 0 0);
1931
+ --ge-table-footer-west-horizontal-border: oklch(100% 0 0 / 0%);
1932
+ --ge-table-footer-west-vertical-border: oklch(100% 0 0 / 0%);
1933
+ --ge-table-footer-center-horizontal-border: oklch(100% 0 0 / 0%);
1934
+ --ge-table-footer-center-vertical-border: oklch(100% 0 0 / 0%);
1935
+ --ge-table-footer-east-horizontal-border: oklch(100% 0 0 / 0%);
1936
+ --ge-table-footer-east-vertical-border: oklch(100% 0 0 / 0%);
1937
+ --ge-table-border: oklch(100% 0 0 / 0%);
1938
+ --ge-table-row-odd-bg: oklch(100% 0 0 / 0%);
1939
+ --ge-table-row-even-bg: oklch(100% 0 0 / 0%);
1940
+ --ge-table-column-odd-bg: oklch(100% 0 0 / 0%);
1941
+ --ge-table-column-even-bg: oklch(100% 0 0 / 0%);
1942
+ --ge-table-hover-column-bg: oklch(34% 0.25 3.6 / 27%);
1943
+ --ge-table-hover-row-bg: oklch(34% 0.25 3.6 / 27%);
1944
+ --ge-table-focus-border: oklch(40% 0.25 3.6);
1945
+ --ge-table-color-error-text: oklch(65% 0.31 43.2);
1946
+ --ge-table-tree-arrow-collapsed-color: #e00034;
1947
+ --ge-table-column-resize-handle-border: oklch(63% 0.31 43.2);
1948
+ --ge-table-dragged-col-div-bg: #2c2e33;
1949
+ --ge-table-drop-zone-bg: #101010;
1950
+ }`,
1951
+ paper: `:root [data-theme="paper"] {
1952
+ --ge-table-bg: #e7e5df;
1953
+ --ge-table-header-west-bg: oklch(80% 0.02 99 / 48%);
1954
+ --ge-table-header-center-bg: oklch(80% 0.02 99 / 48%);
1955
+ --ge-table-header-east-bg: oklch(80% 0.02 99 / 48%);
1956
+ --ge-table-header-west-text: #111;
1957
+ --ge-table-header-center-text: #111;
1958
+ --ge-table-header-east-text: #111;
1959
+ --ge-table-header-west-horizontal-border: oklch(100% 0 0 / 0%);
1960
+ --ge-table-header-west-vertical-border: oklch(100% 0 0 / 0%);
1961
+ --ge-table-header-center-horizontal-border: oklch(100% 0 0 / 0%);
1962
+ --ge-table-header-center-vertical-border: oklch(100% 0 0 / 0%);
1963
+ --ge-table-header-east-horizontal-border: oklch(100% 0 0 / 0%);
1964
+ --ge-table-header-east-vertical-border: oklch(100% 0 0 / 0%);
1965
+ --ge-table-body-west-bg: oklch(80% 0.02 99 / 48%);
1966
+ --ge-table-body-center-bg: #e7e5df;
1967
+ --ge-table-body-east-bg: oklch(80% 0.02 99 / 48%);
1968
+ --ge-table-body-west-text: #000;
1969
+ --ge-table-body-center-text: #000;
1970
+ --ge-table-body-east-text: #000;
1971
+ --ge-table-body-west-horizontal-border: oklch(100% 0 0 / 0%);
1972
+ --ge-table-body-west-vertical-border: oklch(100% 0 0 / 0%);
1973
+ --ge-table-body-center-horizontal-border: oklch(100% 0 0 / 0%);
1974
+ --ge-table-body-center-vertical-border: oklch(100% 0 0 / 0%);
1975
+ --ge-table-body-east-horizontal-border: oklch(100% 0 0 / 0%);
1976
+ --ge-table-body-east-vertical-border: oklch(100% 0 0 / 0%);
1977
+ --ge-table-body-west-selected-range-bg: #cfcdc2;
1978
+ --ge-table-body-center-selected-range-bg: #cfcdc2;
1979
+ --ge-table-body-east-selected-range-bg: #cfcdc2;
1980
+ --ge-table-body-west-selected-range-text: #000;
1981
+ --ge-table-body-center-selected-range-text: #000;
1982
+ --ge-table-body-east-selected-range-text: #000;
1983
+ --ge-table-footer-west-bg: oklch(80% 0.02 99 / 48%);
1984
+ --ge-table-footer-center-bg: oklch(80% 0.02 99 / 48%);
1985
+ --ge-table-footer-east-bg: oklch(80% 0.02 99 / 48%);
1986
+ --ge-table-footer-west-text: #111;
1987
+ --ge-table-footer-center-text: #111;
1988
+ --ge-table-footer-east-text: #111;
1989
+ --ge-table-footer-west-horizontal-border: oklch(100% 0 0 / 0%);
1990
+ --ge-table-footer-west-vertical-border: oklch(100% 0 0 / 0%);
1991
+ --ge-table-footer-center-horizontal-border: oklch(100% 0 0 / 0%);
1992
+ --ge-table-footer-center-vertical-border: oklch(100% 0 0 / 0%);
1993
+ --ge-table-footer-east-horizontal-border: oklch(100% 0 0 / 0%);
1994
+ --ge-table-footer-east-vertical-border: oklch(100% 0 0 / 0%);
1995
+ --ge-table-border: oklch(100% 0 0 / 0%);
1996
+ --ge-table-row-odd-bg: oklch(100% 0 0 / 0%);
1997
+ --ge-table-row-even-bg: oklch(100% 0 0 / 0%);
1998
+ --ge-table-column-odd-bg: oklch(100% 0 0 / 0%);
1999
+ --ge-table-column-even-bg: oklch(100% 0 0 / 0%);
2000
+ --ge-table-hover-column-bg: oklch(5% 0.2 266.40000000000003 / 9%);
2001
+ --ge-table-hover-row-bg: oklch(5% 0.2 266.40000000000003 / 9%);
2002
+ --ge-table-focus-border: oklch(100% 0.19 205.20000000000002);
2003
+ --ge-table-color-error-text: oklch(45% 0.25 43.2);
2004
+ --ge-table-tree-arrow-collapsed-color: #e00034;
2005
+ --ge-table-column-resize-handle-border: oklch(100% 0.19 205.20000000000002 / 71%);
2006
+ --ge-table-dragged-col-div-bg: #2c2e33;
2007
+ --ge-table-drop-zone-bg: #e7e5df;
2008
+ }`,
2009
+ blackboard: `:root [data-theme="dark"] {
2010
+ --ge-table-bg: #0c1021;
2011
+ --ge-table-header-west-bg: #0c1021;
2012
+ --ge-table-header-center-bg: #0c1021;
2013
+ --ge-table-header-east-bg: #0c1021;
2014
+ --ge-table-header-west-text: #e0df85;
2015
+ --ge-table-header-center-text: #e0df85;
2016
+ --ge-table-header-east-text: #e0df85;
2017
+ --ge-table-header-west-horizontal-border: transparent;
2018
+ --ge-table-header-west-vertical-border: transparent;
2019
+ --ge-table-header-center-horizontal-border: transparent;
2020
+ --ge-table-header-center-vertical-border: transparent;
2021
+ --ge-table-header-east-horizontal-border: transparent;
2022
+ --ge-table-header-east-vertical-border: transparent;
2023
+ --ge-table-body-west-bg: #0c1021;
2024
+ --ge-table-body-center-bg: #0c1021;
2025
+ --ge-table-body-east-bg: #0c1021;
2026
+ --ge-table-body-west-text: #a7a7a7;
2027
+ --ge-table-body-center-text: #a7a7a7;
2028
+ --ge-table-body-east-text: #a7a7a7;
2029
+ --ge-table-body-west-horizontal-border: transparent;
2030
+ --ge-table-body-west-vertical-border: transparent;
2031
+ --ge-table-body-center-horizontal-border: transparent;
2032
+ --ge-table-body-center-vertical-border: transparent;
2033
+ --ge-table-body-east-horizontal-border: transparent;
2034
+ --ge-table-body-east-vertical-border: transparent;
2035
+ --ge-table-body-west-selected-range-bg: #758129;
2036
+ --ge-table-body-center-selected-range-bg: #758129;
2037
+ --ge-table-body-east-selected-range-bg: #758129;
2038
+ --ge-table-body-west-selected-range-text: oklch(100% 0 0);
2039
+ --ge-table-body-center-selected-range-text: oklch(100% 0 0);
2040
+ --ge-table-body-east-selected-range-text: oklch(100% 0 0);
2041
+ --ge-table-footer-west-bg: #0c1021;
2042
+ --ge-table-footer-center-bg: #0c1021;
2043
+ --ge-table-footer-east-bg: #0c1021;
2044
+ --ge-table-footer-west-text: #e0df85;
2045
+ --ge-table-footer-center-text: #e0df85;
2046
+ --ge-table-footer-east-text: #e0df85;
2047
+ --ge-table-footer-west-horizontal-border: transparent;
2048
+ --ge-table-footer-west-vertical-border: transparent;
2049
+ --ge-table-footer-center-horizontal-border: transparent;
2050
+ --ge-table-footer-center-vertical-border: otransparent;
2051
+ --ge-table-footer-east-horizontal-border: transparent;
2052
+ --ge-table-footer-east-vertical-border: transparent;
2053
+ --ge-table-border: oklch(0% 0 0);
2054
+ --ge-table-row-odd-bg: oklch(100% 0 0 / 0%);
2055
+ --ge-table-row-even-bg: oklch(100% 0 0 / 0%);
2056
+ --ge-table-column-odd-bg: oklch(100% 0 0 / 0%);
2057
+ --ge-table-column-even-bg: oklch(100% 0 0 / 0%);
2058
+ --ge-table-hover-column-bg: #a9a9a9;
2059
+ --ge-table-hover-row-bg: #a9a9a9;
2060
+ --ge-table-focus-border: #e1ff00;
2061
+ --ge-table-color-error-text: #ff0040;
2062
+ --ge-table-tree-arrow-collapsed-color: #e00034;
2063
+ --ge-table-column-resize-handle-border: oklch(0% 0 0);
2064
+ --ge-table-dragged-col-div-bg: #2c2e33;
2065
+ --ge-table-drop-zone-bg: #758129;
2066
+ }`
2067
+ };
2068
+ class N {
2069
+ static buildTreeRows(e, t = "children", o = 12) {
2070
+ const s = [];
2071
+ for (const i of e)
2072
+ s.push(N.buildTreeRow(i, t, void 0, 0, o));
2073
+ return s;
2074
+ }
2075
+ static buildTreeRow(e, t = "children", o = new F(e, !0, [], void 0, 0), s = 0, i = 12) {
2076
+ var l;
2077
+ if (s > i)
2078
+ return console.warn("Max deep limit reached: ", s), o;
2079
+ const r = e[t];
2080
+ if (r)
2081
+ for (const n of r) {
2082
+ const d = new F(n, !0, [], o, s + 1);
2083
+ if ((l = o.children) == null || l.push(d), N.buildTreeRow(
2084
+ n,
2085
+ t,
2086
+ d,
2087
+ s + 1
2088
+ ), s > i)
2089
+ return console.warn("Max deep limit reached: ", s), o;
2090
+ }
2091
+ return o;
1850
2092
  }
1851
2093
  }
1852
- class ye {
1853
- constructor(e = "none", t = "single") {
1854
- this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
2094
+ class P {
2095
+ constructor(e = 34, t = 34, o = 34) {
2096
+ this.header = e, this.body = t, this.footer = o;
1855
2097
  }
1856
- getSelectionCount(e, t) {
1857
- let s = 0;
1858
- for (const i of this.ranges)
1859
- i.isInRange(e, t) && s++;
1860
- return this.allSelected && s++, this.isInNegativeRange(e, t) && (s = 0), s;
2098
+ }
2099
+ class f {
2100
+ constructor(e = 100, t = "px") {
2101
+ this.value = e, this.unit = t;
1861
2102
  }
1862
- isInNegativeRange(e, t) {
1863
- for (const s of this.negativeRanges)
1864
- if (s.isInRange(e, t))
1865
- return !0;
1866
- return !1;
2103
+ }
2104
+ const Ve = () => !0, Z = () => !1;
2105
+ class H {
2106
+ constructor(e, t, o = new f(100, "px"), s = new k(), i = new k(), r = new f(100, "px"), l = new f(100, "px"), n, d, a, c, g, m, b, w, u = () => this.visible) {
2107
+ this.property = e, this.headerLabel = t, this.width = o, this.classes = s, this.rendererMap = i, this.minWidth = r, this.maxWidth = l, this.sortable = n, this.sortComparator = d, this.sortState = a, this.sortStatesOrder = c, this.sortIconVisible = g, this.editable = m, this.getEditRenderer = b, this.editInputPipe = w, this.isVisible = u, this.visible = !0;
1867
2108
  }
1868
- getRanges() {
1869
- return this.ranges;
2109
+ static bodyRenderer(e) {
2110
+ return new k(
2111
+ void 0,
2112
+ e,
2113
+ void 0
2114
+ );
1870
2115
  }
1871
- clear() {
1872
- this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
2116
+ static create(e) {
2117
+ const t = new k(
2118
+ e.headerRenderer,
2119
+ e.bodyRenderer,
2120
+ e.footerRenderer
2121
+ ), o = new k(
2122
+ e.headerClasses,
2123
+ e.bodyClasses,
2124
+ e.footerClasses
2125
+ ), s = e.sortIconVisible ?? e.sortable ?? Z, i = e.editable ?? e.editable ?? Z, r = e.isVisible ?? e.isVisible ?? Ve;
2126
+ return new H(
2127
+ e.property ?? "",
2128
+ e.headerLabel ?? "",
2129
+ e.width ?? new f(100, "px"),
2130
+ o,
2131
+ t,
2132
+ e.minWidth ?? new f(100, "px"),
2133
+ e.maxWidth ?? new f(100, "px"),
2134
+ e.sortable,
2135
+ e.sortComparator,
2136
+ e.sortState,
2137
+ e.sortStatesOrder,
2138
+ s,
2139
+ i,
2140
+ e.getEditRenderer,
2141
+ e.editInputPipe,
2142
+ r
2143
+ );
1873
2144
  }
1874
- hasSelection() {
1875
- return !!this.ranges.length;
2145
+ }
2146
+ const it = new f(300, "px"), rt = new f(290, "px"), lt = new f(280, "px"), nt = new f(270, "px"), at = new f(260, "px"), dt = new f(250, "px"), ht = new f(240, "px"), ct = new f(230, "px"), ut = new f(220, "px"), gt = new f(210, "px"), ee = new f(200, "px"), bt = new f(190, "px"), pt = new f(180, "px"), ft = new f(170, "px"), mt = new f(160, "px"), wt = new f(150, "px"), St = new f(140, "px"), xt = new f(130, "px"), yt = new f(120, "px"), Ct = new f(110, "px"), vt = new f(100, "px"), Rt = new f(90, "px"), At = new f(80, "px"), Et = new f(70, "px"), Mt = new f(60, "px"), It = new f(50, "px"), kt = new f(40, "px"), Tt = new f(30, "px"), _t = new f(20, "px"), Dt = new f(10, "px"), $t = new f(0, "px");
2147
+ class _ extends K {
2148
+ constructor(e, t, o, s = []) {
2149
+ super(e, s, o), this.areaIdent = e, this.arr = t, this.defaultRowHeight = o, this.columnDefs = s, this.filteredArr = [...t];
1876
2150
  }
1877
- selectAll() {
1878
- this.allSelected = !0;
2151
+ externalFilterChanged(e) {
2152
+ this.filteredArr = this.arr ? this.arr.filter(e) : [];
1879
2153
  }
1880
- addSelection(e) {
1881
- this.addRange(e);
2154
+ getRowCount() {
2155
+ return this.filteredArr ? this.filteredArr.length : 0;
1882
2156
  }
1883
- removeSelection(e) {
1884
- if (this.selectionType === "none")
1885
- return;
1886
- let t = e;
1887
- this.selectionType === "row" ? t = A.singleRow(e.r1) : this.selectionType === "column" && (t = A.singleColumn(e.c1)), this.negativeRanges.push(t);
2157
+ getValueAt(e, t) {
2158
+ return this.filteredArr[e][t];
1888
2159
  }
1889
- togglePoint(e, t) {
1890
- this.getSelectionCount(e, t) > 0 ? this.removeSelection(A.singleCell(e, t)) : this.addSelection(A.singleCell(e, t));
2160
+ setValue(e, t, o) {
2161
+ var i;
2162
+ const s = (i = this.columnDefs[t]) == null ? void 0 : i.editInputPipe;
2163
+ return s && (o = s(o, e, t)), this.arr[e][t] = o, !0;
1891
2164
  }
1892
- addRange(e) {
1893
- 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));
2165
+ getRowByIndex(e) {
2166
+ return this.filteredArr[e];
2167
+ }
2168
+ getRowHeight(e) {
2169
+ return this.defaultRowHeight;
2170
+ }
2171
+ changeColumnOrder(e, t) {
2172
+ this.filteredArr.forEach((o) => this.arrayMove(o, e, t)), super.changeColumnOrder(e, t);
1894
2173
  }
1895
2174
  }
1896
- class we {
1897
- constructor(e = "none") {
1898
- this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1;
2175
+ class D {
2176
+ constructor(e = "body") {
2177
+ this.areaIdent = e, this.rowSelectionModel = void 0;
1899
2178
  }
1900
- clearChanged() {
1901
- this.changed = !1;
2179
+ getRowCount() {
2180
+ return 0;
1902
2181
  }
1903
- hasChanged() {
1904
- return this.changed;
2182
+ getValueAt(e, t) {
2183
+ return "";
1905
2184
  }
1906
- clear() {
1907
- this.rowIndex = -1, this.columnIndex = -1;
2185
+ getCellRenderer(e, t) {
1908
2186
  }
1909
- setFocus(e, t) {
1910
- (this.rowIndex !== e || this.columnIndex !== t) && (this.rowIndex = e, this.columnIndex = t, this.changed = !0);
2187
+ getRowHeight(e) {
2188
+ return 0;
1911
2189
  }
1912
- hasFocus(e, t) {
1913
- return this.rowIndex === e && this.columnIndex === t;
2190
+ getColspanAt(e, t) {
2191
+ return 0;
1914
2192
  }
1915
- getFocus() {
1916
- return [this.rowIndex, this.columnIndex];
2193
+ getCustomClassesAt(e, t) {
2194
+ return [];
1917
2195
  }
1918
- }
1919
- const ve = new ye(), xe = new we("cell");
1920
- class Ce {
1921
- constructor() {
1922
- 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 = {
1923
- header: 34,
1924
- body: 34,
1925
- footer: 34
1926
- }, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new H(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new W(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new be(), this.getSelectionModel = () => ve, this.getFocusModel = () => xe;
2196
+ getCustomStyleAt(e, t) {
1927
2197
  }
1928
- }
1929
- class Ee {
1930
- setStyle(e, t, s) {
1931
- return e.style[t] = s, e;
2198
+ getRowspanAt(e, t) {
2199
+ return 0;
1932
2200
  }
1933
- appendText(e, t) {
1934
- const s = this.createText(t);
1935
- return this.appendChild(e, s), s;
2201
+ getRowByIndex(e) {
1936
2202
  }
1937
- addClass(e, t) {
1938
- return t.includes(" ") ? t.split(" ").forEach((s) => e.classList.add(s)) : e.classList.add(t), e;
2203
+ isRowCheckable(e) {
2204
+ return !1;
1939
2205
  }
1940
- appendChild(e, t) {
1941
- e.appendChild(t);
2206
+ isRowChecked(e) {
1942
2207
  }
1943
- createElement(e) {
1944
- return document.createElement(e);
2208
+ setRowChecked(e, t) {
1945
2209
  }
1946
- createText(e) {
1947
- return document.createTextNode(e);
2210
+ getTooltipAt(e, t) {
2211
+ return "";
2212
+ }
2213
+ getMaxColspan() {
2214
+ return 0;
2215
+ }
2216
+ getMaxRowspan() {
2217
+ return 0;
2218
+ }
2219
+ getYPosByRowIndex(e) {
2220
+ return 0;
2221
+ }
2222
+ init() {
2223
+ }
2224
+ externalFilterChanged(e) {
2225
+ }
2226
+ isFilterable() {
2227
+ return !1;
2228
+ }
2229
+ doSort(e) {
2230
+ return !1;
2231
+ }
2232
+ isEditable(e, t) {
2233
+ return !1;
2234
+ }
2235
+ setValue(e, t, o) {
2236
+ return !1;
1948
2237
  }
1949
- setAttribute(e, t, s) {
1950
- e.setAttribute(t, s);
2238
+ isSelectable(e, t) {
2239
+ return !1;
2240
+ }
2241
+ changeColumnOrder(e, t) {
1951
2242
  }
1952
2243
  }
1953
- const Ae = G({
1954
- inheritAttrs: !1,
1955
- props: {
1956
- tableModel: {
1957
- required: !0
1958
- },
1959
- tableOptions: {
1960
- required: !1,
1961
- default: new Ce()
1962
- },
1963
- debounceMouseClickDelay: {
1964
- required: !1,
1965
- default: 150
2244
+ class te {
2245
+ constructor(e = []) {
2246
+ this.allRootNodes = e;
2247
+ }
2248
+ checkRow(e, t) {
2249
+ if (e.checked = t, e.children)
2250
+ for (const o of e.children)
2251
+ this.checkRow(o, t);
2252
+ this.autoCheckParent(e.parent);
2253
+ }
2254
+ checkAll(e) {
2255
+ for (const t of this.allRootNodes)
2256
+ t.checked = !1, t.children && this.checkAll(t.children);
2257
+ }
2258
+ getCheckedRows() {
2259
+ const e = [];
2260
+ return this.addSelectedRecursive(this.allRootNodes, e), e;
2261
+ }
2262
+ isRowChecked(e) {
2263
+ if (e.checked)
2264
+ return "full";
2265
+ const t = this.areAllChildrenChecked(e), o = this.areAllChildrenUnchecked(e);
2266
+ return !t && !o ? "semi" : "none";
2267
+ }
2268
+ setCheckedRows(e) {
2269
+ this.addCheckedRows(e);
2270
+ }
2271
+ addCheckedRows(e) {
2272
+ for (const t of e)
2273
+ t.checked = !0;
2274
+ }
2275
+ autoCheckParent(e) {
2276
+ if (e) {
2277
+ const t = this.areAllChildrenChecked(e), o = this.areAllChildrenUnchecked(e);
2278
+ t ? e.checked = !0 : e.checked = !1, this.autoCheckParent(e.parent);
1966
2279
  }
1967
- },
1968
- emits: [
1969
- "tableReady",
1970
- "mouseClicked",
2280
+ }
2281
+ areAllChildrenChecked(e) {
2282
+ var t, o;
2283
+ if ((t = e.children) != null && t.length) {
2284
+ for (const s of e.children)
2285
+ if (!s.checked || (o = s.children) != null && o.length && !this.areAllChildrenChecked(s))
2286
+ return !1;
2287
+ }
2288
+ return !0;
2289
+ }
2290
+ areAllChildrenUnchecked(e) {
2291
+ var t, o;
2292
+ if ((t = e.children) != null && t.length) {
2293
+ for (const s of e.children)
2294
+ if (s.checked || (o = s.children) != null && o.length && !this.areAllChildrenUnchecked(s))
2295
+ return !1;
2296
+ }
2297
+ return !0;
2298
+ }
2299
+ addSelectedRecursive(e, t) {
2300
+ for (const o of e)
2301
+ o.checked && t.push(o), o.children && this.addSelectedRecursive(o.children, t);
2302
+ }
2303
+ }
2304
+ class oe {
2305
+ constructor(e = 0, t = 0, o = 0, s = 0) {
2306
+ this.top = e, this.right = t, this.bottom = o, this.left = s;
2307
+ }
2308
+ }
2309
+ class se {
2310
+ render(e, t, o, s, i, r, l) {
2311
+ if (i.isRowCheckable(t)) {
2312
+ l.addClass(e, "ge-table-row-checkbox-div");
2313
+ const n = i.isRowChecked(t), d = n === "full" ? "checked" : "", a = n === "semi" ? '<span style="opacity: 0.4;">✓<span>' : "";
2314
+ e.innerHTML = `
2315
+ <input
2316
+ type="checkbox"
2317
+ data-area="${s}"
2318
+ data-row-index="${t}"
2319
+ data-col-index="${o}"
2320
+ data-input-type="checkbox"
2321
+ ${d}
2322
+ class="ge-table-row-checkbox">
2323
+ ${a} `;
2324
+ }
2325
+ }
2326
+ }
2327
+ class He {
2328
+ constructor() {
2329
+ this.property = "CheckboxColumn", this.headerLabel = "", this.width = new f(50, "px"), this.minWidth = new f(50, "px"), this.maxWidth = new f(100, "px"), this.rendererMap = new k(new se(), new se(), void 0), this.classes = new k(
2330
+ [],
2331
+ ["ge-table-text-align-left"],
2332
+ []
2333
+ );
2334
+ }
2335
+ }
2336
+ class Be {
2337
+ constructor() {
2338
+ this.checkedRows = [];
2339
+ }
2340
+ getCheckedRows() {
2341
+ return this.checkedRows;
2342
+ }
2343
+ setCheckedRows(e) {
2344
+ this.checkedRows = e;
2345
+ }
2346
+ addCheckedRows(e) {
2347
+ this.checkedRows || (this.checkedRows = []);
2348
+ for (const t of e)
2349
+ this.checkedRows.includes(t) || this.checkedRows.push(t);
2350
+ }
2351
+ checkRow(e, t) {
2352
+ this.checkedRows || (this.checkedRows = []), t ? this.checkedRows.includes(e) || this.checkedRows.push(e) : this.removeSelectedRow(e);
2353
+ }
2354
+ isRowChecked(e) {
2355
+ return this.checkedRows && this.checkedRows.includes(e) ? "full" : "none";
2356
+ }
2357
+ checkAll(e) {
2358
+ this.checkedRows = [];
2359
+ }
2360
+ removeSelectedRow(e) {
2361
+ if (this.checkedRows) {
2362
+ const t = this.checkedRows.indexOf(e);
2363
+ t > -1 && this.checkedRows.splice(t, 1);
2364
+ }
2365
+ }
2366
+ }
2367
+ class z {
2368
+ constructor(e, t, o, s = 0, i = 0, r = !1, l = new P(), n = [], d = [], a = -1, c = 0, g = 400, m = () => {
2369
+ }) {
2370
+ var b, w, u, p;
2371
+ this.headerAreaModel = e, this.bodyAreaModel = t, this.footerAreaModel = o, this.fixedLeftColumnCount = s, this.fixedRightColumnCount = i, this.rowCheckboxVisible = r, this.defaultRowHeights = l, this.columnDefs = n, this.columnSizes = d, this.overridingColumnWidth = a, this.columnCount = c, this.parentSize = g, this.getSelectionModel = m, this.rowCount = 0, this.contentHeightInPx = 0, this.contentWidthInPx = 0, this.padding = new oe(0, 0, 0, 0), this.xPositions = [], e.areaIdent = "header", t.areaIdent = "body", o.areaIdent = "footer", this.columnCount || ((b = this.columnDefs) != null && b.length ? this.columnCount = this.columnDefs.length : (w = this.columnSizes) != null && w.length && (this.columnCount = (u = this.columnSizes) == null ? void 0 : u.length)), (p = this.columnDefs) != null && p.length && this.columnDefs[0] instanceof He && !t.rowSelectionModel && (t.rowSelectionModel = new Be());
2372
+ }
2373
+ init() {
2374
+ this.recalcSize(this.parentSize), this.overridingColumnWidth === -1 && this.calcXPositions(), this.headerAreaModel && this.headerAreaModel.init(), this.bodyAreaModel && this.bodyAreaModel.init(), this.footerAreaModel && this.footerAreaModel.init();
2375
+ }
2376
+ getColumnCount() {
2377
+ return this.columnCount;
2378
+ }
2379
+ setColumnWidth(e, t) {
2380
+ var o;
2381
+ t = Math.max(0, t), this.overridingColumnWidth !== -1 && (this.overridingColumnWidth = t), e > -1 && e < ((o = this.columnSizes) == null ? void 0 : o.length) && (this.columnSizes[e] = t), this.recalcContentWidthInPx();
2382
+ }
2383
+ getColumnWidth(e) {
2384
+ var o;
2385
+ const t = this.getColumnDef(e);
2386
+ return t && t.isVisible && !t.isVisible() ? 0 : this.overridingColumnWidth !== -1 ? this.overridingColumnWidth : e > -1 && e < ((o = this.columnSizes) == null ? void 0 : o.length) ? this.columnSizes[e] : 0;
2387
+ }
2388
+ getXPosByColumnIndex(e) {
2389
+ return e === 0 ? 0 : this.overridingColumnWidth > -1 ? this.overridingColumnWidth * e : this.xPositions[e];
2390
+ }
2391
+ recalcSize(e) {
2392
+ this.recalcColumnWidthes(e), this.recalcHeightAndPadding();
2393
+ }
2394
+ recalcHeightAndPadding() {
2395
+ const e = this.getAreaModel("body");
2396
+ this.rowCount = e.getRowCount(), this.contentHeightInPx = this.getAreaHeight("body"), this.recalcContentWidthInPx(), this.recalcPadding();
2397
+ }
2398
+ recalcPadding() {
2399
+ const e = this.getSideAreaWidth("west"), t = this.getSideAreaWidth("east"), o = this.getAreaHeight("header"), s = this.getAreaHeight("footer");
2400
+ this.padding = new oe(
2401
+ o,
2402
+ t,
2403
+ s,
2404
+ e
2405
+ );
2406
+ }
2407
+ getPadding() {
2408
+ return this.padding;
2409
+ }
2410
+ getContentHeightInPixel() {
2411
+ return this.contentHeightInPx;
2412
+ }
2413
+ getContentWidthInPixel() {
2414
+ return this.contentWidthInPx;
2415
+ }
2416
+ getRowHeight(e, t) {
2417
+ return this.getAreaModel(e).getRowHeight(t);
2418
+ }
2419
+ getModel(e) {
2420
+ return this.getAreaModel(e);
2421
+ }
2422
+ getAreaHeight(e) {
2423
+ const t = this.getModel(e), o = t.getRowCount();
2424
+ if (this.defaultRowHeights[e])
2425
+ return o * this.defaultRowHeights[e];
2426
+ let s = 0;
2427
+ for (let i = 0; i < o; i++)
2428
+ s = s + t.getRowHeight(i);
2429
+ return s;
2430
+ }
2431
+ getSideAreaWidth(e) {
2432
+ const [t, o] = this.getSideStartAndEndColumnIndex(e);
2433
+ let s = 0;
2434
+ for (let i = t; i <= o; i++)
2435
+ s = s + this.getColumnWidth(i);
2436
+ return s;
2437
+ }
2438
+ getSideStartAndEndColumnIndex(e) {
2439
+ const t = this.getFixedLeftColumnCount(), o = this.getFixedRightColumnCount();
2440
+ let s = 0, i = this.columnCount - 1;
2441
+ return e === "west" ? i = t - 1 : e === "east" ? s = this.columnCount - o : (s = t, i = this.columnCount - o - 1), [s, i];
2442
+ }
2443
+ getColumnDef(e) {
2444
+ if (e < this.columnDefs.length)
2445
+ return this.columnDefs[e];
2446
+ }
2447
+ getFixedLeftColumnCount() {
2448
+ return this.fixedLeftColumnCount;
2449
+ }
2450
+ getFixedRightColumnCount() {
2451
+ return this.fixedRightColumnCount;
2452
+ }
2453
+ getAreaModel(e) {
2454
+ if (e === "header")
2455
+ return this.headerAreaModel;
2456
+ if (e === "body")
2457
+ return this.bodyAreaModel;
2458
+ if (e === "footer")
2459
+ return this.footerAreaModel;
2460
+ throw new Error("Wrong ident.");
2461
+ }
2462
+ getBodyModel() {
2463
+ return this.bodyAreaModel;
2464
+ }
2465
+ isFooterVisibe() {
2466
+ var e;
2467
+ return (((e = this.footerAreaModel) == null ? void 0 : e.getRowCount()) ?? 0) > 0;
2468
+ }
2469
+ isHeaderVisibe() {
2470
+ var e;
2471
+ return (((e = this.headerAreaModel) == null ? void 0 : e.getRowCount()) ?? 0) > 0;
2472
+ }
2473
+ isRowCheckboxVisible() {
2474
+ return this.rowCheckboxVisible;
2475
+ }
2476
+ externalFilterChanged(e) {
2477
+ this.getAreaModel("body").externalFilterChanged(e);
2478
+ }
2479
+ doSort(e) {
2480
+ return this.getAreaModel("body").doSort(e);
2481
+ }
2482
+ getColumnDefs() {
2483
+ return this.columnDefs;
2484
+ }
2485
+ getColumnProperty(e) {
2486
+ return this.columnDefs[e].property;
2487
+ }
2488
+ getBodyRowByIndex(e) {
2489
+ return this.getBodyModel().getRowByIndex(e);
2490
+ }
2491
+ isSortable(e) {
2492
+ return this.columnDefs && e < this.columnDefs.length && this.columnDefs[e].sortable ? this.columnDefs[e].sortable() : !1;
2493
+ }
2494
+ changeColumnOrder(e, t) {
2495
+ var o, s, i;
2496
+ this.arrayMove(this.columnDefs, e, t), this.arrayMove(this.columnSizes, e, t), (o = this.headerAreaModel) == null || o.changeColumnOrder(e, t), (s = this.bodyAreaModel) == null || s.changeColumnOrder(e, t), (i = this.footerAreaModel) == null || i.changeColumnOrder(e, t), this.calcXPositions();
2497
+ }
2498
+ recalcColumnWidthes(e) {
2499
+ var t, o, s;
2500
+ !((t = this.columnDefs) != null && t.length) && !((o = this.columnSizes) != null && o.length) && (this.columnSizes = new Array(this.getColumnCount()).fill(this.overridingColumnWidth)), (s = this.columnDefs) != null && s.length && (this.columnSizes = this.columnDefs.map((i) => {
2501
+ if (i.width.unit === "%" && e) {
2502
+ let r = Math.floor(i.width.value * e / 100);
2503
+ if (i.minWidth) {
2504
+ let l = i.minWidth.unit === "px" ? i.minWidth.value : Math.floor(i.minWidth.value * e / 100);
2505
+ r = Math.max(l, r);
2506
+ }
2507
+ if (i.maxWidth) {
2508
+ let l = i.maxWidth.unit === "px" ? i.maxWidth.value : Math.floor(i.maxWidth.value * e / 100);
2509
+ r = Math.min(l, r);
2510
+ }
2511
+ return r;
2512
+ }
2513
+ return i.width.value;
2514
+ }));
2515
+ }
2516
+ arrayMove(e, t, o) {
2517
+ const s = e.splice(t, 1)[0];
2518
+ return e.splice(o, 0, s), e;
2519
+ }
2520
+ recalcContentWidthInPx() {
2521
+ this.contentWidthInPx = this.getSideAreaWidth("center");
2522
+ }
2523
+ calcXPositions() {
2524
+ const e = this.getColumnCount();
2525
+ this.xPositions = new Array(e + 1), this.xPositions[0] = 0;
2526
+ for (let t = 0; t < e; t++)
2527
+ this.xPositions[t + 1] = this.getColumnWidth(t) + this.xPositions[t];
2528
+ }
2529
+ }
2530
+ class We extends K {
2531
+ constructor(e, t, o, s = []) {
2532
+ super(e, s, o), this.areaIdent = e, this.rows = t, this.defaultRowHeight = o, this.columnDefs = s, this.sorterService = new ae(), this.filteredRows = [...t], this.properties = s.map((i) => i.property);
2533
+ }
2534
+ getRowCount() {
2535
+ var e;
2536
+ return ((e = this.filteredRows) == null ? void 0 : e.length) ?? 0;
2537
+ }
2538
+ getValueAt(e, t) {
2539
+ const o = this.properties[t];
2540
+ let s = this.filteredRows[e];
2541
+ return s instanceof F && (s = s.data), s ? this.getValueByT(s, o) : "";
2542
+ }
2543
+ getFilteredRows() {
2544
+ return this.filteredRows;
2545
+ }
2546
+ getAllRows() {
2547
+ return this.rows;
2548
+ }
2549
+ getRowHeight(e) {
2550
+ return this.defaultRowHeight;
2551
+ }
2552
+ getRowByIndex(e) {
2553
+ return this.filteredRows[e];
2554
+ }
2555
+ externalFilterChanged(e) {
2556
+ this.filteredRows = this.rows ? this.rows.filter(e) : [];
2557
+ }
2558
+ doSort(e) {
2559
+ for (const t of e) {
2560
+ const { columnIndex: o, sortState: s } = t, i = s === "asc" ? 1 : s === "desc" ? -1 : 0, r = this.properties[o];
2561
+ this.filteredRows = this.filteredRows.sort(this.genericFlatTableSortComparator(r, i));
2562
+ }
2563
+ return !0;
2564
+ }
2565
+ getValueByT(e, t) {
2566
+ return t.includes(".") ? this.getPropertyValue(e, t.split(".")) : e[t];
2567
+ }
2568
+ changeColumnOrder(e, t) {
2569
+ this.arrayMove(this.properties, e, t), super.changeColumnOrder(e, t);
2570
+ }
2571
+ genericFlatTableSortComparator(e, t) {
2572
+ return (o, s) => {
2573
+ const i = this.getValueByT(o, e), r = this.getValueByT(s, e);
2574
+ return this.sorterService.genericSortComparator(i, r, t);
2575
+ };
2576
+ }
2577
+ getPropertyValue(e, t) {
2578
+ const o = t.shift();
2579
+ let s = e[o];
2580
+ return s && t.length ? this.getPropertyValue(s, t) : s;
2581
+ }
2582
+ }
2583
+ class ie extends We {
2584
+ constructor(e, t, o, s) {
2585
+ super(
2586
+ e,
2587
+ t,
2588
+ s,
2589
+ o
2590
+ ), this.areaIdent = e, this.rows = t, this.columnDefs = o, this.defaultRowHeight = s;
2591
+ }
2592
+ }
2593
+ class Ge {
2594
+ render(e, t, o, s, i, r, l) {
2595
+ if (i.isEditable(t, o)) {
2596
+ l.addClass(e, "ge-table-row-input-div");
2597
+ const n = i.getValueAt(t, o);
2598
+ e.innerHTML = `
2599
+ <input
2600
+ type="text"
2601
+ value="${n}"
2602
+ autofocus
2603
+ onfocus="this.setSelectionRange(0, this.value.length)"
2604
+ data-listen="change"
2605
+ data-area="${s}"
2606
+ data-row-index="${t}"
2607
+ data-col-index="${o}"
2608
+ data-input-type="text"
2609
+ style="width:calc(100% - 8px);height:100%;border:0;padding:0 0 0 8px;"
2610
+ class="ge-table-cell-editor-input">`;
2611
+ }
2612
+ }
2613
+ }
2614
+ class ze {
2615
+ constructor(e = "none", t = "single") {
2616
+ this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
2617
+ }
2618
+ getSelectionCount(e, t) {
2619
+ let o = 0;
2620
+ for (const s of this.ranges)
2621
+ s.isInRange(e, t) && o++;
2622
+ return this.allSelected && o++, this.isInNegativeRange(e, t) && (o = 0), o;
2623
+ }
2624
+ isInNegativeRange(e, t) {
2625
+ for (const o of this.negativeRanges)
2626
+ if (o.isInRange(e, t))
2627
+ return !0;
2628
+ return !1;
2629
+ }
2630
+ getRanges() {
2631
+ return this.ranges;
2632
+ }
2633
+ clear() {
2634
+ this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
2635
+ }
2636
+ hasSelection() {
2637
+ return !!this.ranges.length;
2638
+ }
2639
+ selectAll() {
2640
+ this.allSelected = !0;
2641
+ }
2642
+ addSelection(e) {
2643
+ this.addRange(e);
2644
+ }
2645
+ removeSelection(e) {
2646
+ if (this.selectionType === "none")
2647
+ return;
2648
+ let t = e;
2649
+ this.selectionType === "row" ? t = E.singleRow(e.r1) : this.selectionType === "column" && (t = E.singleColumn(e.c1)), this.negativeRanges.push(t);
2650
+ }
2651
+ togglePoint(e, t) {
2652
+ this.getSelectionCount(e, t) > 0 ? this.removeSelection(E.singleCell(e, t)) : this.addSelection(E.singleCell(e, t));
2653
+ }
2654
+ addRange(e) {
2655
+ 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));
2656
+ }
2657
+ }
2658
+ class Ne {
2659
+ constructor(e = "none") {
2660
+ this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1;
2661
+ }
2662
+ clearChanged() {
2663
+ this.changed = !1;
2664
+ }
2665
+ hasChanged() {
2666
+ return this.changed;
2667
+ }
2668
+ clear() {
2669
+ this.rowIndex = -1, this.columnIndex = -1;
2670
+ }
2671
+ setFocus(e, t) {
2672
+ (this.rowIndex !== e || this.columnIndex !== t) && (this.rowIndex = e, this.columnIndex = t, this.changed = !0);
2673
+ }
2674
+ hasFocus(e, t) {
2675
+ return this.rowIndex === e && this.columnIndex === t;
2676
+ }
2677
+ getFocus() {
2678
+ return [this.rowIndex, this.columnIndex];
2679
+ }
2680
+ }
2681
+ const je = new ze(), Xe = new Ne("cell");
2682
+ class j {
2683
+ constructor() {
2684
+ 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 = {
2685
+ header: 34,
2686
+ body: 34,
2687
+ footer: 34
2688
+ }, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new le(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new ne(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new Ge(), this.getSelectionModel = () => je, this.getFocusModel = () => Xe;
2689
+ }
2690
+ }
2691
+ class O {
2692
+ static createTableModel(e) {
2693
+ var t, o, s, i, r, l, n, d, a, c, g, m, b, w;
2694
+ if (e.defaultRowHeights === void 0)
2695
+ if ((t = e.tableOptions) != null && t.defaultRowHeights)
2696
+ e.defaultRowHeights = e.tableOptions.defaultRowHeights;
2697
+ else {
2698
+ if (e.defaultRowHeights = new P(), e.headerAreaModel && "defaultRowHeight" in e.headerAreaModel) {
2699
+ const u = e.headerAreaModel.defaultRowHeight;
2700
+ u > -1 && (e.defaultRowHeights.header = u);
2701
+ }
2702
+ if (e.bodyAreaModel && "defaultRowHeight" in e.bodyAreaModel) {
2703
+ const u = e.bodyAreaModel.defaultRowHeight;
2704
+ u > -1 && (e.defaultRowHeights.body = u);
2705
+ }
2706
+ if (e.footerAreaModel && "defaultRowHeight" in e.footerAreaModel) {
2707
+ const u = e.footerAreaModel.defaultRowHeight;
2708
+ u > -1 && (e.defaultRowHeights.footer = u);
2709
+ }
2710
+ }
2711
+ if (e.columnDefs === void 0 && ((o = e.properties) != null && o.length ? e.columnDefs = e.properties.map((u) => new H(u, u.toUpperCase(), ee)) : (s = e.rows) != null && s.length ? e.columnDefs = Object.keys(e.rows[0]).map((u) => new H(u, u.toUpperCase(), ee)) : e.columnDefs = []), e.columnCount === void 0 && ((i = e.columnDefs) != null && i.length ? e.columnCount = e.columnDefs.length : (r = e.headerData) != null && r.length ? e.columnCount = e.headerData[0].length : (l = e.columnSizes) != null && l.length ? e.columnCount = (n = e.columnSizes) == null ? void 0 : n.length : console.warn('Property "columnCount" is missing and cannot be derived from other properties.')), e.headerAreaModel || ((d = e.headerData) != null && d.length ? e.headerAreaModel = new _(
2712
+ "header",
2713
+ e.headerData,
2714
+ e.defaultRowHeights.header,
2715
+ e.columnDefs
2716
+ ) : (a = e.columnDefs) != null && a.length ? e.headerAreaModel = new _(
2717
+ "header",
2718
+ [e.columnDefs.map((u) => u.headerLabel)],
2719
+ e.defaultRowHeights.header,
2720
+ e.columnDefs
2721
+ ) : e.headerAreaModel = new D("header")), e.footerAreaModel || ((c = e.footerData) != null && c.length ? e.footerAreaModel = new _(
2722
+ "footer",
2723
+ e.footerData,
2724
+ e.defaultRowHeights.footer,
2725
+ e.columnDefs
2726
+ ) : e.footerAreaModel = new D("footer")), !e.bodyAreaModel)
2727
+ if (e.rows)
2728
+ if ((g = e.rows) != null && g.length && e.rows[0] instanceof F) {
2729
+ const u = e.rows;
2730
+ e.bodyAreaModel = new V(
2731
+ "body",
2732
+ u,
2733
+ e.defaultRowHeights.body,
2734
+ e.columnDefs
2735
+ ), (e.columnDefs[0].property === "CheckboxColumn" || (m = e.tableOptions) != null && m.showCheckboxWihoutExtraColumn) && (e.bodyAreaModel.rowSelectionModel = new te(u));
2736
+ } else
2737
+ e.bodyAreaModel = new ie(
2738
+ "body",
2739
+ e.rows,
2740
+ e.columnDefs,
2741
+ e.defaultRowHeights.body
2742
+ );
2743
+ else
2744
+ e.bodyData ? e.bodyAreaModel = new _(
2745
+ "body",
2746
+ e.bodyData,
2747
+ e.defaultRowHeights.body
2748
+ ) : e.bodyAreaModel = new D("body");
2749
+ return e.fixedLeftColumnCount === void 0 && (e.fixedLeftColumnCount = 0), e.fixedRightColumnCount === void 0 && (e.fixedRightColumnCount = 0), e.rowCheckboxVisible === void 0 && (e.rowCheckboxVisible = !1), e.overridingColumnWidth === void 0 && (e.overridingColumnWidth = -1), !e.getSelectionModel && ((b = e.tableOptions) != null && b.getSelectionModel) && (e.getSelectionModel = (w = e.tableOptions) == null ? void 0 : w.getSelectionModel), new z(
2750
+ e.headerAreaModel,
2751
+ e.bodyAreaModel,
2752
+ e.footerAreaModel,
2753
+ e.fixedLeftColumnCount,
2754
+ e.fixedRightColumnCount,
2755
+ e.rowCheckboxVisible,
2756
+ e.defaultRowHeights,
2757
+ e.columnDefs,
2758
+ e.columnSizes,
2759
+ e.overridingColumnWidth,
2760
+ e.columnCount,
2761
+ e.parentSize,
2762
+ e.getSelectionModel
2763
+ );
2764
+ }
2765
+ static buildByTypedRowsParam(e) {
2766
+ return O.buildByTypedRows(
2767
+ e.rows ?? [],
2768
+ e.columnDefs,
2769
+ e.tableOptions ?? new j(),
2770
+ e.fixedLeftColumnCount ?? 0,
2771
+ e.fixedRightColumnCount ?? 0
2772
+ );
2773
+ }
2774
+ static buildByTypedRows(e, t, o = new j(), s = 0, i = 0) {
2775
+ const r = o.defaultRowHeights, l = t[0].property === "CheckboxColumn";
2776
+ if (e != null && e.length && e[0] instanceof F) {
2777
+ const n = e, d = new V(
2778
+ "body",
2779
+ n,
2780
+ r.body,
2781
+ t
2782
+ );
2783
+ return (l || o.showCheckboxWihoutExtraColumn) && (d.rowSelectionModel = new te(n)), O.createByAreaModelsParam({
2784
+ headerAreaModel: new _("header", [t.map((a) => a.headerLabel)], r.header),
2785
+ bodyAreaModel: d,
2786
+ footerAreaModel: new _("footer", [], r.footer),
2787
+ columnDefs: t,
2788
+ fixedLeftColumnCount: s,
2789
+ fixedRightColumnCount: i,
2790
+ defaultRowHeights: o.defaultRowHeights,
2791
+ rowCheckboxVisible: !1,
2792
+ columnSizes: [],
2793
+ columnCount: t.length,
2794
+ overridingColumnWidth: -1
2795
+ });
2796
+ }
2797
+ return O.createByObjectArrayParam({
2798
+ rows: e,
2799
+ columnDefs: t,
2800
+ fixedLeftColumnCount: s,
2801
+ fixedRightColumnCount: i,
2802
+ defaultRowHeights: o.defaultRowHeights
2803
+ });
2804
+ }
2805
+ static createByObjectArrayParam(e) {
2806
+ const t = e.rowCheckboxVisible !== void 0 ? e.rowCheckboxVisible : !1;
2807
+ return O.createByObjectArray(
2808
+ e.rows,
2809
+ e.header ?? [],
2810
+ e.footer ?? [],
2811
+ e.fixedLeftColumnCount ?? 0,
2812
+ e.fixedRightColumnCount ?? 0,
2813
+ t,
2814
+ e.defaultRowHeights ?? new P(),
2815
+ e.columnDefs ?? [],
2816
+ e.columnSizes ?? []
2817
+ );
2818
+ }
2819
+ static createByAreaModels(e = new D(), t, o = new D(), s = 0, i = 0, r = !1, l = new P(), n, d = [], a = -1, c) {
2820
+ return new z(
2821
+ e,
2822
+ t,
2823
+ o,
2824
+ s,
2825
+ i,
2826
+ r,
2827
+ l,
2828
+ n,
2829
+ d,
2830
+ a,
2831
+ c
2832
+ );
2833
+ }
2834
+ static createByAreaModelsParam(e) {
2835
+ return O.createByAreaModels(
2836
+ e.headerAreaModel ?? new D(),
2837
+ e.bodyAreaModel,
2838
+ e.footerAreaModel ?? new D(),
2839
+ e.fixedLeftColumnCount ?? 0,
2840
+ e.fixedRightColumnCount ?? 0,
2841
+ e.rowCheckboxVisible === void 0 ? !1 : e.rowCheckboxVisible,
2842
+ e.defaultRowHeights,
2843
+ e.columnDefs ?? [],
2844
+ e.columnSizes ?? [],
2845
+ e.overridingColumnWidth ?? -1,
2846
+ e.columnCount ?? 0
2847
+ );
2848
+ }
2849
+ static createByObjectArray(e, t = [], o = [], s = 0, i = 0, r = !1, l = new P(), n, d = []) {
2850
+ let a;
2851
+ t != null && t.length ? a = new _("header", t, l.header, n) : n != null && n.length ? a = new _("header", [n.map((m) => m.headerLabel)], l.header, n) : a = new D();
2852
+ const c = o ? new _("footer", o, l.footer, n) : new D(), g = new ie("body", e, n, l.body);
2853
+ return new z(
2854
+ a,
2855
+ g,
2856
+ c,
2857
+ s,
2858
+ i,
2859
+ r,
2860
+ l,
2861
+ n,
2862
+ d
2863
+ );
2864
+ }
2865
+ }
2866
+ const Ft = [
2867
+ //"COPY_2_CLIPBOARD",
2868
+ "START_EDITING",
2869
+ "TOGGLE_SELECTION",
2870
+ "SELECT_ALL",
2871
+ "DESELECT_ALL",
2872
+ "NAVIGATE_LEFT",
2873
+ "NAVIGATE_RIGHT",
2874
+ "NAVIGATE_UP",
2875
+ "NAVIGATE_DOWN"
2876
+ //
2877
+ // "ENTER_PRESSED",
2878
+ // "HOME_PRESSED",
2879
+ // "SPACE_PRESSED",
2880
+ // "END_PRESSED",
2881
+ // "PAGEUP_PRESSED",
2882
+ // "PAGEDOWN_PRESSED"
2883
+ ];
2884
+ class Lt {
2885
+ constructor(e, t) {
2886
+ this.tableModel = e, this.tableOptions = t;
2887
+ }
2888
+ }
2889
+ class Ye {
2890
+ constructor(e, t, o, s, i, r, l) {
2891
+ this.emmitDataKey = e, this.emmitCancelKey = t, this.queryId = o, this.filter = s, this.sorting = i, this.startIndex = r, this.endIndex = l;
2892
+ }
2893
+ }
2894
+ class Ot extends Ye {
2895
+ constructor(e, t, o, s, i, r, l, n) {
2896
+ super(
2897
+ e,
2898
+ t,
2899
+ o,
2900
+ s,
2901
+ i,
2902
+ r,
2903
+ l
2904
+ ), this.rows = n;
2905
+ }
2906
+ }
2907
+ class Ke {
2908
+ constructor(e, t) {
2909
+ this.value = e, this.label = t;
2910
+ }
2911
+ }
2912
+ class Pt {
2913
+ constructor(e, t) {
2914
+ this.index = e, this.px = t;
2915
+ }
2916
+ }
2917
+ const Vt = { body: ["ge-table-text-align-left"] }, Ht = { body: ["ge-table-text-align-center"] }, Bt = { body: ["ge-table-text-align-right"] }, Wt = {
2918
+ header: ["ge-table-text-align-left"],
2919
+ body: ["ge-table-text-align-left"],
2920
+ footer: ["ge-table-text-align-left"]
2921
+ }, Gt = {
2922
+ header: ["ge-table-text-align-center"],
2923
+ body: ["ge-table-text-align-center"],
2924
+ footer: ["ge-table-text-align-center"]
2925
+ }, zt = {
2926
+ header: ["ge-table-text-align-right"],
2927
+ body: ["ge-table-text-align-right"],
2928
+ footer: ["ge-table-text-align-right"]
2929
+ };
2930
+ class Nt {
2931
+ static body(e) {
2932
+ return new k(
2933
+ void 0,
2934
+ e,
2935
+ void 0
2936
+ );
2937
+ }
2938
+ }
2939
+ class jt {
2940
+ constructor(e = "down", t) {
2941
+ this.status = e, this.originalEvent = t;
2942
+ }
2943
+ }
2944
+ class Xt {
2945
+ constructor(e, t, o, s) {
2946
+ this.area = e, this.rowIndex = t, this.columnIndex = o, this.value = s;
2947
+ }
2948
+ }
2949
+ class Yt {
2950
+ constructor() {
2951
+ this.autoRestoreSortingState = !1, this.autoRestoreCollapsedExpandedState = !1, this.autoRestoreScrollPosition = !1, this.autoRestoreCheckedState = !1, this.autoRestoreSelectedState = !1, this.getStorageKeyFn = void 0, this.isSame = (e, t, o) => {
2952
+ if (e && t && o.getRowId) {
2953
+ const s = o.getRowId(e), i = o.getRowId(t);
2954
+ return s === i;
2955
+ }
2956
+ return !1;
2957
+ }, this.getRowId = (e) => {
2958
+ if (e) {
2959
+ for (const t of ["id", "uuid"]) {
2960
+ const o = e[t];
2961
+ if (o != null)
2962
+ return o;
2963
+ }
2964
+ try {
2965
+ return JSON.stringify(e);
2966
+ } catch (t) {
2967
+ console.error(t);
2968
+ }
2969
+ }
2970
+ return console.warn('One of following options set to true without a valid "getRowId()": autoRestoreExpandedState, autoRestoreCheckedState.'), -1;
2971
+ };
2972
+ }
2973
+ }
2974
+ class qe {
2975
+ constructor(e, t, o, s = !1, i = "normal", r = void 0) {
2976
+ this.data = e, this.property = t, this.toggle = o, this.closed = s, this.visibility = i, this.children = r, this.impl = "CellGroup";
2977
+ }
2978
+ }
2979
+ class Ue extends qe {
2980
+ constructor(e, t = 0, o = 0, s) {
2981
+ super(
2982
+ e.data,
2983
+ e.property,
2984
+ e.toggle,
2985
+ e.closed,
2986
+ e.visibility,
2987
+ e.children
2988
+ ), this.rowIndex = t, this.childIndex = o, this.parent = s, this.impl = "CellGroupExt", this.children = void 0, this.leftNeighbour = void 0, this.rightNeighbour = void 0;
2989
+ }
2990
+ ownColumn() {
2991
+ return !!this.property;
2992
+ }
2993
+ toString() {
2994
+ return this.data + "";
2995
+ }
2996
+ // TODO hier gehts weiter!!!!!!!!!!!
2997
+ getColumnIndex() {
2998
+ return this.parent ? this.parent.getColumnIndex() + this.childIndex : (this.leftNeighbour, 0);
2999
+ }
3000
+ //
3001
+ // getLeftClaimedSpaces(): number{
3002
+ // if (this.leftNeighbour) {
3003
+ //
3004
+ // }
3005
+ // return 0;
3006
+ // }
3007
+ // getSumOfLeafs(cg: CellGroupExt, sum: number = 0): number {
3008
+ // if (cg.children?.length) {
3009
+ // for (let i = 0; i < cg.children.length; i++) {
3010
+ // const child = cg.children[i];
3011
+ // if (child.children?.length) {
3012
+ // sum = this.getSumOfLeafs(child, sum);
3013
+ // } else {
3014
+ // sum++;
3015
+ // }
3016
+ // }
3017
+ // }
3018
+ // if (this.ownColumn()) {
3019
+ // sum++;
3020
+ // }
3021
+ // //console.info(cg.data, sum)
3022
+ // return sum;
3023
+ // }
3024
+ //
3025
+ // getBiggestChildColumnIndex(): number {
3026
+ // if (this.children?.length) {
3027
+ // return Math.max(...this.children.map(c => c.getBiggestChildColumnIndex()));
3028
+ // }
3029
+ // return this.childIndex;
3030
+ // }
3031
+ isVisible() {
3032
+ return this.parent ? this.visibility === "always" ? this.parent.isVisible() : this.visibility === "normal" || !this.visibility ? this.parent.isVisible() && !this.parent.closed : this.visibility === "inverted" ? this.parent.isVisible() && this.parent.closed : !0 : !0;
3033
+ }
3034
+ // should be rendered
3035
+ claimsSpace() {
3036
+ return this.isVisible() && (this.ownColumn() || this.closed);
3037
+ }
3038
+ getColumnCount(e = this, t = 0) {
3039
+ var o;
3040
+ if (e != null && e.claimsSpace() && t++, (o = e == null ? void 0 : e.children) != null && o.length)
3041
+ for (const s of e.children)
3042
+ t = this.getColumnCount(s, t);
3043
+ return t;
3044
+ }
3045
+ getRowSpan(e = this, t) {
3046
+ return e != null && e.claimsSpace() ? t - this.getParentCount(e, 0) : 1;
3047
+ }
3048
+ getParentCount(e = this, t = 0) {
3049
+ return e.parent && (t = t + 1 + this.getParentCount(e.parent, t)), t;
3050
+ }
3051
+ log(e) {
3052
+ const t = " ".substring(0, 2 * this.rowIndex), o = `${this.getColumnIndex()}`, s = `${this.getColumnCount(this)}`, i = `${this.getRowSpan(this, e)}`, r = `${this.getParentCount(this)}`;
3053
+ if (console.info(`${t + this.data}
3054
+ childIndex:${this.childIndex}
3055
+ row:${this.rowIndex}
3056
+ col:${o}
3057
+ vis:${this.visibility}
3058
+ closed:${this.closed}
3059
+ isVisible:${this.isVisible()}
3060
+ ownColumn:${this.ownColumn()}
3061
+ claimsSpace:${this.claimsSpace()}
3062
+ colCount:${s}
3063
+ rowSpan:${i}
3064
+ pc:${r}`.replace(/[ \n]+/g, " ")), this.children)
3065
+ for (const l of this.children)
3066
+ l.log(e);
3067
+ }
3068
+ }
3069
+ class I {
3070
+ static buildColumnDefs(e, t = []) {
3071
+ for (const o of e)
3072
+ o.property && t.push(
3073
+ H.create({
3074
+ property: o.property,
3075
+ headerLabel: o.data ? o.data : o.property,
3076
+ isVisible: () => typeof o.isVisible == "function" ? o.isVisible() : !0
3077
+ })
3078
+ ), o.children && I.buildColumnDefs(o.children, t);
3079
+ return t;
3080
+ }
3081
+ /*
3082
+ static buildDeepMap(
3083
+ cellGroups: CellGroupIf[],
3084
+ ret: { [key: string]: number } = {},
3085
+ deep = 0
3086
+ ): { [key: string]: number } {
3087
+
3088
+ for (const cellGroup of cellGroups) {
3089
+ //if (cellGroup.property) {
3090
+ ret[cellGroup.data] = deep;
3091
+ //}
3092
+ if (cellGroup.children) {
3093
+ CellgroupFactory.buildDeepMap(cellGroup.children, ret, deep + 1);
3094
+ }
3095
+ }
3096
+ return ret;
3097
+ }
3098
+ */
3099
+ static buildGroupExts(e, t = [], o = 0, s) {
3100
+ let i;
3101
+ for (let r = 0; r < e.length; r++) {
3102
+ const l = e[r], n = new Ue(l, o, r, s);
3103
+ i && (n.leftNeighbour = i, i.rightNeighbour = n), t.push(n), l.children && (n.children = I.buildGroupExts(l.children, [], o + 1, n)), i = n;
3104
+ }
3105
+ return t;
3106
+ }
3107
+ static flattenGroupExts(e, t = []) {
3108
+ for (const o of e)
3109
+ t.push(o), o.children && I.flattenGroupExts(o.children, t);
3110
+ return t;
3111
+ }
3112
+ /*
3113
+
3114
+ Gold Hohenwarte
3115
+ Gold AB Gold CD HOH AB HOH CD
3116
+ . Gold A Gold B Gold C Gold D Gold Sum . HOH Loc HOH A HOH B HOH C HOH D
3117
+
3118
+ */
3119
+ static buildArrayOfArrays(e, t) {
3120
+ var i;
3121
+ let o = -1, s = 99999;
3122
+ for (const r of e) {
3123
+ if (r.rowIndex <= s) {
3124
+ o++;
3125
+ for (let l = 0; l < t.length; l++)
3126
+ t[l][o] = null;
3127
+ }
3128
+ if (t[r.rowIndex][o] = r, s = r.rowIndex, r.ownColumn() && ((i = r.children) != null && i.length)) {
3129
+ for (let l = r.rowIndex + 1; l < t.length; l++)
3130
+ t[l][o] = void 0;
3131
+ o++;
3132
+ for (let l = 0; l < t.length; l++)
3133
+ t[l][o] = null;
3134
+ }
3135
+ }
3136
+ return t;
3137
+ }
3138
+ static iterateThrowColumns(e = [], t) {
3139
+ var o;
3140
+ for (const s of t)
3141
+ e.push(s.data + " rowIndex:" + s.rowIndex), (o = s.children) != null && o.length && I.iterateThrowColumns(e, s.children);
3142
+ }
3143
+ }
3144
+ class Kt {
3145
+ constructor() {
3146
+ this.areaIdent = "body", this.rowSelectionModel = void 0;
3147
+ }
3148
+ changeColumnOrder(e, t) {
3149
+ }
3150
+ doSort(e) {
3151
+ return !1;
3152
+ }
3153
+ externalFilterChanged(e) {
3154
+ }
3155
+ getCellRenderer(e, t) {
3156
+ }
3157
+ getColspanAt(e, t) {
3158
+ return 0;
3159
+ }
3160
+ getCustomClassesAt(e, t) {
3161
+ return [];
3162
+ }
3163
+ getCustomStyleAt(e, t) {
3164
+ }
3165
+ getMaxColspan() {
3166
+ return 0;
3167
+ }
3168
+ getMaxRowspan() {
3169
+ return 0;
3170
+ }
3171
+ getRowByIndex(e) {
3172
+ }
3173
+ getRowCount() {
3174
+ return 0;
3175
+ }
3176
+ getRowHeight(e) {
3177
+ return 0;
3178
+ }
3179
+ getRowspanAt(e, t) {
3180
+ return 0;
3181
+ }
3182
+ getTooltipAt(e, t) {
3183
+ }
3184
+ getValueAt(e, t) {
3185
+ }
3186
+ getYPosByRowIndex(e) {
3187
+ return 0;
3188
+ }
3189
+ init() {
3190
+ }
3191
+ isEditable(e, t) {
3192
+ return !1;
3193
+ }
3194
+ isFilterable() {
3195
+ return !1;
3196
+ }
3197
+ isRowCheckable(e) {
3198
+ return !1;
3199
+ }
3200
+ isRowChecked(e) {
3201
+ }
3202
+ isSelectable(e, t) {
3203
+ return !1;
3204
+ }
3205
+ setRowChecked(e, t) {
3206
+ }
3207
+ setValue(e, t, o) {
3208
+ return !1;
3209
+ }
3210
+ }
3211
+ class Je {
3212
+ render(e, t, o, s, i, r, l) {
3213
+ const n = r != null && r.data ? r.data : "";
3214
+ e.innerHTML = `${n}`;
3215
+ }
3216
+ }
3217
+ class qt {
3218
+ constructor(e = "header", t, o = [], s) {
3219
+ var i;
3220
+ this.areaIdent = e, this.groups = t, this.columnDefs = o, this.defaultRowHeight = s, this.gammaCells = !0, this.groupExts = [], this.cellGroupExtCellRenderer = new Je(), this.groupExts = I.buildGroupExts(t), console.info(this.groupExts), console.info(this.getAllLeafs()), console.info(this.getMaxRowCount());
3221
+ for (const r of this.groupExts)
3222
+ r.log(this.getMaxRowCount());
3223
+ this.arr = this.buildArray(), !((i = this.columnDefs) != null && i.length) && e === "header" && (this.columnDefs = I.buildColumnDefs(t)), console.info("this.columnDefs", this.columnDefs), console.info("this.arr", this.arr);
3224
+ }
3225
+ getAllLeafs() {
3226
+ return I.flattenGroupExts(this.groupExts).filter((t) => !t.children);
3227
+ }
3228
+ getMaxRowCount() {
3229
+ const e = this.getAllLeafs();
3230
+ return e != null && e.length ? 1 + Math.max(...e.map((t) => t.getParentCount(t))) : 0;
3231
+ }
3232
+ buildArray() {
3233
+ console.info("");
3234
+ let e = I.flattenGroupExts(this.groupExts);
3235
+ const t = e.length, o = 1 + Math.max(...e.map((l) => l.rowIndex));
3236
+ console.info("max row/col:", o + "/" + t);
3237
+ const s = [];
3238
+ I.iterateThrowColumns(s, this.groupExts), console.info(s);
3239
+ const i = Array.from(Array(o).keys()).map((l) => []);
3240
+ let r = I.buildArrayOfArrays(e, i);
3241
+ return console.table(r), r;
3242
+ }
3243
+ changeColumnOrder(e, t) {
3244
+ }
3245
+ doSort(e) {
3246
+ return !1;
3247
+ }
3248
+ externalFilterChanged(e) {
3249
+ }
3250
+ getCellRenderer(e, t) {
3251
+ return this.cellGroupExtCellRenderer;
3252
+ }
3253
+ getColspanAt(e, t) {
3254
+ const o = this.getValueAt(e, t);
3255
+ return o ? o.getColumnCount() : 0;
3256
+ }
3257
+ getCustomClassesAt(e, t) {
3258
+ return [];
3259
+ }
3260
+ getCustomStyleAt(e, t) {
3261
+ }
3262
+ getMaxColspan() {
3263
+ return 12;
3264
+ }
3265
+ getMaxRowspan() {
3266
+ return 12;
3267
+ }
3268
+ getRowByIndex(e) {
3269
+ }
3270
+ getRowCount() {
3271
+ return this.arr ? this.arr.length : 0;
3272
+ }
3273
+ getRowspanAt(e, t) {
3274
+ const o = this.getValueAt(e, t);
3275
+ if (o) {
3276
+ const s = this.getRowCount();
3277
+ return o.getRowSpan(o, s);
3278
+ }
3279
+ return 0;
3280
+ }
3281
+ getTooltipAt(e, t) {
3282
+ return "";
3283
+ }
3284
+ getValueAt(e, t) {
3285
+ return this.arr[e][t];
3286
+ }
3287
+ getYPosByRowIndex(e) {
3288
+ return 0;
3289
+ }
3290
+ init() {
3291
+ }
3292
+ getRowHeight(e) {
3293
+ return this.defaultRowHeight;
3294
+ }
3295
+ isEditable(e, t) {
3296
+ return !1;
3297
+ }
3298
+ isFilterable() {
3299
+ return !1;
3300
+ }
3301
+ isRowCheckable(e) {
3302
+ return !1;
3303
+ }
3304
+ isRowChecked(e) {
3305
+ }
3306
+ isSelectable(e, t) {
3307
+ return !1;
3308
+ }
3309
+ setRowChecked(e, t) {
3310
+ }
3311
+ setValue(e, t, o) {
3312
+ return !1;
3313
+ }
3314
+ }
3315
+ class Qe {
3316
+ setStyle(e, t, o) {
3317
+ return e.style[t] = o, e;
3318
+ }
3319
+ appendText(e, t) {
3320
+ const o = this.createText(t);
3321
+ return this.appendChild(e, o), o;
3322
+ }
3323
+ addClass(e, t) {
3324
+ return t.includes(" ") ? t.split(" ").forEach((o) => e.classList.add(o)) : e.classList.add(t), e;
3325
+ }
3326
+ appendChild(e, t) {
3327
+ e.appendChild(t);
3328
+ }
3329
+ createElement(e) {
3330
+ return document.createElement(e);
3331
+ }
3332
+ createText(e) {
3333
+ return document.createTextNode(e);
3334
+ }
3335
+ setAttribute(e, t, o) {
3336
+ e.setAttribute(t, o);
3337
+ }
3338
+ }
3339
+ class Ut {
3340
+ filterPredict(e, t, o = this.objectToString.bind(this)) {
3341
+ if (!e)
3342
+ return !1;
3343
+ if (!t)
3344
+ return !0;
3345
+ t = t.toLowerCase();
3346
+ const s = "+", i = "-", r = t.toLowerCase().split(" ").filter((c) => c !== s && c !== i && c !== ""), l = r.filter((c) => !c.startsWith(s) && !c.startsWith(i)), n = r.filter((c) => c.startsWith(s)).map((c) => c.replace(/\+/g, "")), d = r.filter((c) => c.startsWith(i)).map((c) => c.replace(/-/g, ""));
3347
+ let a = !l.length;
3348
+ for (let c = 0; c < l.length; c++)
3349
+ (a || o(e).includes(l[c])) && (a = !0);
3350
+ if (!a)
3351
+ return !1;
3352
+ for (let c = 0; c < n.length; c++)
3353
+ if (!o(e).includes(n[c]))
3354
+ return !1;
3355
+ for (let c = 0; c < d.length; c++)
3356
+ if (o(e).includes(d[c]))
3357
+ return !1;
3358
+ return !0;
3359
+ }
3360
+ filterRows(e, t, o = (s) => JSON.stringify(s).toLowerCase()) {
3361
+ if (!e)
3362
+ return [];
3363
+ if (!t)
3364
+ return [...e];
3365
+ t = t.toLowerCase();
3366
+ const s = "+", i = "-", r = t.toLowerCase().split(" ").filter((a) => a !== s && a !== i && a !== ""), l = r.filter((a) => !a.startsWith(s) && !a.startsWith(i)), n = r.filter((a) => a.startsWith(s)).map((a) => a.replace(/\+/g, "")), d = r.filter((a) => a.startsWith(i)).map((a) => a.replace(/-/g, ""));
3367
+ return e == null ? void 0 : e.filter((a) => {
3368
+ let c = !l.length;
3369
+ for (let g = 0; g < l.length; g++)
3370
+ (c || o(a).includes(l[g])) && (c = !0);
3371
+ if (!c)
3372
+ return !1;
3373
+ for (let g = 0; g < n.length; g++)
3374
+ if (!o(a).includes(n[g]))
3375
+ return !1;
3376
+ for (let g = 0; g < d.length; g++)
3377
+ if (o(a).includes(d[g]))
3378
+ return !1;
3379
+ return !0;
3380
+ });
3381
+ }
3382
+ objectToString(e) {
3383
+ if (!e)
3384
+ return "";
3385
+ const t = [], o = Object.keys(e);
3386
+ for (let s = 0; s < o.length; s++) {
3387
+ const i = o[s];
3388
+ t.push(e[i]);
3389
+ }
3390
+ return t.join(" ").toLowerCase();
3391
+ }
3392
+ }
3393
+ class Jt {
3394
+ static bodyRenderer(e) {
3395
+ return new k(void 0, e, void 0);
3396
+ }
3397
+ }
3398
+ class Qt {
3399
+ constructor(e, t = !0, o = !1) {
3400
+ this.property = e, this.skipCheckableCheck = t, this.readonly = o;
3401
+ }
3402
+ render(e, t, o, s, i, r, l) {
3403
+ if (this.readonly || this.skipCheckableCheck || i.isRowCheckable(t)) {
3404
+ l.addClass(e, "ge-table-row-checkbox-div");
3405
+ const n = i.getRowByIndex(t), a = i.getValueByT(n, this.property) === !0 ? "checked" : "", c = this.readonly ? " readonly " : "";
3406
+ if (l.addClass(e, "ge-padding-property-checkbox"), e.innerHTML = `
3407
+ <input
3408
+ type="checkbox"
3409
+ data-area="${s}"
3410
+ data-row-index="${t}"
3411
+ data-col-index="${o}"
3412
+ data-property-index="${this.property}"
3413
+ data-input-type="checkbox"
3414
+ ${a}
3415
+ ${c}
3416
+ class="ge-input-checkbox">`, !this.readonly) {
3417
+ const g = e.querySelector(".ge-input-checkbox");
3418
+ g && g.addEventListener("click", (m, b) => (n[this.property] = !n[this.property], !0));
3419
+ }
3420
+ }
3421
+ }
3422
+ }
3423
+ class Zt {
3424
+ render(e, t, o, s, i, r, l) {
3425
+ r && (e.innerText = new Date(r).toISOString());
3426
+ }
3427
+ }
3428
+ class eo {
3429
+ constructor() {
3430
+ this.formatter = new Intl.DateTimeFormat("de-DE", {
3431
+ year: "numeric",
3432
+ month: "2-digit",
3433
+ day: "2-digit"
3434
+ });
3435
+ }
3436
+ render(e, t, o, s, i, r, l) {
3437
+ if (r) {
3438
+ let n = "";
3439
+ try {
3440
+ n = this.formatter.format(new Date(r));
3441
+ } catch {
3442
+ n = r;
3443
+ }
3444
+ e.innerHTML = `
3445
+ <div class="ge-table-label-div" data-row-index="${t}" data-col-index="${o}" data-area="${s}" style="position: relative; background: transparent; width: 100%; height: 100%;">
3446
+ <div class="ge-table-label" data-row-index="${t}" data-col-index="${o}" data-area="${s}">${n}</div>
3447
+ </div>`;
3448
+ }
3449
+ }
3450
+ }
3451
+ class to {
3452
+ render(e, t, o, s, i, r, l) {
3453
+ r && (e.innerText = new Date(r).toLocaleDateString());
3454
+ }
3455
+ }
3456
+ class oo {
3457
+ render(e, t, o, s, i, r, l) {
3458
+ r === "male" || r === "m" ? e.innerText = "♂" : (r === "female" || r === "f") && (e.innerText = "♀");
3459
+ }
3460
+ }
3461
+ class so {
3462
+ render(e, t, o, s, i, r, l) {
3463
+ r === "true" || r === !0 ? e.innerHTML = '<span class="ge-true-text-color">✅</span>' : r === "false" || r === !1 ? e.innerHTML = '<span class="ge-false-text-color">❌</span>' : e.innerText = "";
3464
+ }
3465
+ }
3466
+ class io {
3467
+ render(e, t, o, s, i, r, l) {
3468
+ r && (e.innerText = new Date(r).toISOString().replace(/T/g, " ").replace(/\..*/g, ""));
3469
+ }
3470
+ }
3471
+ class ro {
3472
+ constructor(e = Number.MIN_SAFE_INTEGER, t = Number.MAX_SAFE_INTEGER) {
3473
+ this.min = e, this.max = t;
3474
+ }
3475
+ render(e, t, o, s, i, r, l) {
3476
+ r && (e.innerText = r, (typeof r == "string" || isNaN(r) || r < this.min || r > this.max) && l.addClass(e, "ge-cell-error"));
3477
+ }
3478
+ }
3479
+ class lo {
3480
+ constructor(e) {
3481
+ this.property = e;
3482
+ }
3483
+ render(e, t, o, s, i, r, l) {
3484
+ l.addClass(e, "ge-star-rating-div");
3485
+ const n = i.getRowByIndex(t), d = +("" + i.getValueByT(n, this.property));
3486
+ if (!isNaN(d)) {
3487
+ const a = [];
3488
+ for (let g = 0; g < d; g++)
3489
+ a.push("★");
3490
+ const c = a.join(" ");
3491
+ e.innerHTML = `
3492
+ <div class="ge-table-label-div" data-row-index="${t}" data-col-index="${o}" data-area="${s}" style="position: relative; background: transparent; width: 100%; height: 100%;">
3493
+ <div class="ge-table-label" data-row-index="${t}" data-col-index="${o}" data-area="${s}">${c}</div>
3494
+ </div>`;
3495
+ }
3496
+ }
3497
+ }
3498
+ class no {
3499
+ constructor(e, t = 100, o = !1) {
3500
+ this.property = e, this.maxValue = t, this.labelVisible = o;
3501
+ }
3502
+ render(e, t, o, s, i, r, l) {
3503
+ l.addClass(e, "ge-star-rating-div");
3504
+ const n = i.getRowByIndex(t), d = +("" + i.getValueByT(n, this.property));
3505
+ if (!isNaN(d)) {
3506
+ const a = d * 100 / this.maxValue, c = this.labelVisible ? Math.round(a) + "%" : "";
3507
+ e.innerHTML = `
3508
+ <div class="ge-table-label-div"
3509
+ data-row-index="${t}"
3510
+ data-col-index="${o}"
3511
+ data-area="${s}"
3512
+ title="${c}"
3513
+ style="position: relative; background: transparent; width: 100%; height: 100%;">
3514
+ <div class="ge-table-progress-container"
3515
+ style="width:100%;height:50%;padding:0;margin-top:6px;"
3516
+ data-row-index="${t}"
3517
+ data-col-index="${o}"
3518
+ data-area="${s}">
3519
+ <div class="ge-table-progress-bar"
3520
+ style="width:${a}%;height:100%;padding:0;margin:0;"
3521
+ data-row-index="${t}"
3522
+ data-col-index="${o}"
3523
+ data-area="${s}">&nbsp;
3524
+ </div>
3525
+ </div>
3526
+ </div>`;
3527
+ }
3528
+ }
3529
+ }
3530
+ const ao = function(h, e, t) {
3531
+ return h ? Number(h) : "";
3532
+ };
3533
+ class he {
3534
+ constructor(e) {
3535
+ this.options = e;
3536
+ }
3537
+ static create(e) {
3538
+ return new he(
3539
+ e.map((t) => new Ke(t, t))
3540
+ );
3541
+ }
3542
+ render(e, t, o, s, i, r, l) {
3543
+ if (i.isEditable(t, o)) {
3544
+ l.addClass(e, "ge-table-row-select-div");
3545
+ const n = i.getValueAt(t, o);
3546
+ let d = [];
3547
+ for (let c of this.options) {
3548
+ const g = c.value === n ? " selected " : "";
3549
+ d.push(`<option value="${c.value}" ${g}>${c.label}</option>`);
3550
+ }
3551
+ const a = d.join("");
3552
+ e.innerHTML = `
3553
+ <select
3554
+ type="text"
3555
+ value="${n}"
3556
+ autofocus
3557
+ data-listen="change"
3558
+ data-area="${s}"
3559
+ data-row-index="${t}"
3560
+ data-col-index="${o}"
3561
+ data-input-type="text"
3562
+ style="width:100%;height:100%;border:0;padding:0 0 0 8px;"
3563
+ class="ge-table-cell-editor-select">${a}</select>`;
3564
+ }
3565
+ }
3566
+ }
3567
+ class ho {
3568
+ constructor(e, t, o) {
3569
+ this.r = e, this.g = t, this.b = o;
3570
+ }
3571
+ }
3572
+ class re {
3573
+ constructor(e, t, o, s) {
3574
+ this.minValue = e, this.minColor = t, this.maxValue = o, this.maxColor = s;
3575
+ }
3576
+ }
3577
+ class W {
3578
+ static normalize(e, t, o, s = 0, i = 1) {
3579
+ return (e - t) / (o - t) * (i - s) + s;
3580
+ }
3581
+ static getTwoColorGradientRGB(e, t) {
3582
+ const o = W.normalize(e, t.minValue, t.maxValue, 0, 1), s = t.maxColor.r - t.minColor.r, i = t.maxColor.g - t.minColor.g, r = t.maxColor.b - t.minColor.b, l = s * o + t.minColor.r, n = i * o + t.minColor.g, d = r * o + t.minColor.b;
3583
+ return `rgb(${Math.round(l)}, ${Math.round(n)}, ${Math.round(d)})`;
3584
+ }
3585
+ static getThreeColorGradientRGB(e, t) {
3586
+ return e < t.middleValue ? W.getTwoColorGradientRGB(e, new re(t.minValue, t.minColor, t.middleValue, t.middleColor)) : e > t.middleValue ? W.getTwoColorGradientRGB(e, new re(t.middleValue, t.middleColor, t.maxValue, t.maxColor)) : `rgb(${t.middleColor.r}, ${t.middleColor.g}, ${t.middleColor.b})`;
3587
+ }
3588
+ }
3589
+ class co {
3590
+ constructor(e, t, o, s, i, r) {
3591
+ this.minValue = e, this.minColor = t, this.middleValue = o, this.middleColor = s, this.maxValue = i, this.maxColor = r;
3592
+ }
3593
+ }
3594
+ const Ze = ce({
3595
+ inheritAttrs: !1,
3596
+ props: {
3597
+ tableModel: {
3598
+ required: !0
3599
+ },
3600
+ tableOptions: {
3601
+ required: !1,
3602
+ default: new j()
3603
+ },
3604
+ debounceMouseClickDelay: {
3605
+ required: !1,
3606
+ default: 150
3607
+ }
3608
+ },
3609
+ emits: [
3610
+ "tableReady",
3611
+ "mouseClicked",
1971
3612
  "mouseDragging",
1972
3613
  "checkboxChanged",
1973
3614
  "contextmenu",
@@ -1976,8 +3617,8 @@ const Ae = G({
1976
3617
  "mouseMoved"
1977
3618
  ],
1978
3619
  setup(h, { emit: e }) {
1979
- const t = N(null), s = (i) => {
1980
- const o = {
3620
+ const t = ue(null), o = (s) => {
3621
+ const i = {
1981
3622
  onCheckboxChanged: (l) => {
1982
3623
  e("checkboxChanged", l);
1983
3624
  },
@@ -1999,62 +3640,189 @@ const Ae = G({
1999
3640
  onMouseMoved: (l) => {
2000
3641
  e("mouseMoved", l);
2001
3642
  }
2002
- }, r = new me(
2003
- i,
3643
+ }, r = new Pe(
3644
+ s,
2004
3645
  h.tableModel,
2005
- new Ee(),
3646
+ new Qe(),
2006
3647
  h.tableOptions,
2007
- o
3648
+ i
2008
3649
  );
2009
3650
  r.firstInit(), e("tableReady", r.getApi());
2010
3651
  };
2011
- return z(() => {
2012
- t.value && s(t.value);
3652
+ return ge(() => {
3653
+ t.value && o(t.value);
2013
3654
  }), {
2014
3655
  root: t
2015
3656
  };
2016
3657
  }
2017
- }), Re = (h, e) => {
3658
+ }), et = (h, e) => {
2018
3659
  const t = h.__vccOpts || h;
2019
- for (const [s, i] of e)
2020
- t[s] = i;
3660
+ for (const [o, s] of e)
3661
+ t[o] = s;
2021
3662
  return t;
2022
- }, Me = {
3663
+ }, tt = {
2023
3664
  ref: "root",
2024
3665
  class: "container-div",
2025
3666
  style: { width: "100%", height: "100%", "background-color": "transparent", padding: "0", margin: "0" }
2026
3667
  };
2027
- function Te(h, e, t, s, i, o) {
2028
- return j(), X("div", Me, null, 512);
3668
+ function ot(h, e, t, o, s, i) {
3669
+ return be(), pe("div", tt, null, 512);
2029
3670
  }
2030
- const De = /* @__PURE__ */ Re(Ae, [["render", Te]]);
2031
- class Fe {
3671
+ const uo = /* @__PURE__ */ et(Ze, [["render", ot]]);
3672
+ class go {
2032
3673
  constructor(e, t) {
2033
3674
  this.component = e, this.appContext = t;
2034
3675
  }
2035
- render(e, t, s, i, o, r, l) {
3676
+ render(e, t, o, s, i, r, l) {
2036
3677
  return this.mount(
2037
3678
  this.component,
2038
3679
  {
2039
3680
  cellDiv: e,
2040
3681
  rowIndex: t,
2041
- columnIndex: s,
2042
- areaIdent: i,
2043
- areaModel: o,
3682
+ columnIndex: o,
3683
+ areaIdent: s,
3684
+ areaModel: i,
2044
3685
  cellValue: r
2045
3686
  },
2046
3687
  this.appContext,
2047
3688
  e
2048
3689
  );
2049
3690
  }
2050
- mount(e, t, s, i) {
2051
- let o = K(e, t);
2052
- return o.appContext = s, k(o, i), () => {
2053
- i && k(null, i);
3691
+ mount(e, t, o, s) {
3692
+ let i = fe(e, t);
3693
+ return i.appContext = o, Q(i, s), () => {
3694
+ s && Q(null, s);
2054
3695
  };
2055
3696
  }
2056
3697
  }
2057
3698
  export {
2058
- Fe as ComponentRendererWrapper,
2059
- De as GuiexpertTable
3699
+ K as AbstractAreaModel,
3700
+ Nt as AreaMapFactory,
3701
+ Kt as AreaModel,
3702
+ _ as AreaModelArrayOfArrays,
3703
+ qt as AreaModelCellGroups,
3704
+ D as AreaModelHidden,
3705
+ ie as AreaModelObjectArrayWithColumndefs,
3706
+ We as AreaModelObjectyArray,
3707
+ V as AreaModelTree,
3708
+ k as AreaObjectMap,
3709
+ Yt as AutoRestoreOptions,
3710
+ qe as CellGroup,
3711
+ Ue as CellGroupExt,
3712
+ Je as CellGroupExtCellRenderer,
3713
+ E as CellRange,
3714
+ I as CellgroupFactory,
3715
+ Qt as CheckboxBooleanPropertyCellRenderer,
3716
+ se as CheckboxCellRenderer,
3717
+ He as CheckboxColumnDef,
3718
+ Be as CheckboxModel,
3719
+ Ot as ChunkData,
3720
+ Me as ColAndRowspanModel,
3721
+ ve as CollapsedExpandedData,
3722
+ ho as ColorRgb,
3723
+ H as ColumnDef,
3724
+ go as ComponentRendererWrapper,
3725
+ me as ConvenienceDomService,
3726
+ de as CssVars,
3727
+ eo as DateToIntlDDMMYYYYCellRenderer,
3728
+ Zt as DateToIsoCellRenderer,
3729
+ to as DateToLocaleDateCellRenderer,
3730
+ io as DateToTecCellRenderer,
3731
+ P as DefaultRowHeights,
3732
+ Ee as EleScope,
3733
+ Oe as EventAdapter,
3734
+ Z as FalseFn,
3735
+ Ne as FocusModel,
3736
+ _e as GeCellIndices,
3737
+ W as GeCssColorUtil,
3738
+ Ut as GeFilterService,
3739
+ jt as GeKeyEvent,
3740
+ U as GeModelChangeEvent,
3741
+ X as GeMouseEvent,
3742
+ $ as GeoData,
3743
+ uo as GuiexpertTable,
3744
+ L as Icon,
3745
+ Pt as IndexAndPx,
3746
+ Ge as InputCellRenderer,
3747
+ Te as InputHandler,
3748
+ oo as MaleFemaleToIconCellRenderer,
3749
+ Se as MouseHandler,
3750
+ we as MouseTargetData,
3751
+ ro as NumberCellRenderer,
3752
+ Fe as OsxShortcutActionIdMapping,
3753
+ oe as Padding,
3754
+ no as ProgressBarCellRenderer,
3755
+ Ie as RenderScope,
3756
+ Jt as Renderer,
3757
+ Ye as RequestChunk,
3758
+ he as SelectCellRenderer,
3759
+ ze as SelectionModel,
3760
+ De as SelectionService,
3761
+ Le as ShortcutService,
3762
+ Qe as SimpleDomService,
3763
+ f as Size,
3764
+ ke as SortItem,
3765
+ ne as SortedOptions,
3766
+ lo as StarRatingCellRenderer,
3767
+ Re as StoreStateCollapsedExpandService,
3768
+ Ce as StoreStateScrollPosService,
3769
+ Ae as StoreStateSortingService,
3770
+ xe as TableApi,
3771
+ Xt as TableCellUpdateEvent,
3772
+ O as TableFactory,
3773
+ z as TableModel,
3774
+ Lt as TableModelAndOptions,
3775
+ j as TableOptions,
3776
+ Pe as TableScope,
3777
+ co as ThreeColorGradientArg,
3778
+ te as TreeCheckboxModel,
3779
+ N as TreeFactory,
3780
+ le as TreeOptions,
3781
+ F as TreeRow,
3782
+ ye as TreeRowService,
3783
+ so as TrueFalseCellRenderer,
3784
+ Ve as TrueFn,
3785
+ re as TwoColorGradientArg,
3786
+ Ke as ValueLabel,
3787
+ $e as WindowsShortcutActionIdMapping,
3788
+ Ft as actionIds,
3789
+ Gt as allCenter,
3790
+ Wt as allLeft,
3791
+ zt as allRight,
3792
+ Ht as bodyCenter,
3793
+ Vt as bodyLeft,
3794
+ Bt as bodyRight,
3795
+ ao as editInputPipeForNumber,
3796
+ Y as getAreaIdentByString,
3797
+ $t as px0,
3798
+ Dt as px10,
3799
+ vt as px100,
3800
+ Ct as px110,
3801
+ yt as px120,
3802
+ xt as px130,
3803
+ St as px140,
3804
+ wt as px150,
3805
+ mt as px160,
3806
+ ft as px170,
3807
+ pt as px180,
3808
+ bt as px190,
3809
+ _t as px20,
3810
+ ee as px200,
3811
+ gt as px210,
3812
+ ut as px220,
3813
+ ct as px230,
3814
+ ht as px240,
3815
+ dt as px250,
3816
+ at as px260,
3817
+ nt as px270,
3818
+ lt as px280,
3819
+ rt as px290,
3820
+ Tt as px30,
3821
+ it as px300,
3822
+ kt as px40,
3823
+ It as px50,
3824
+ Mt as px60,
3825
+ Et as px70,
3826
+ At as px80,
3827
+ Rt as px90
2060
3828
  };