@guiexpert/vue3-table 1.0.1 → 1.0.3

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.
@@ -0,0 +1,3828 @@
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
+ }
6
+ clone() {
7
+ return new X(
8
+ this.rowIndex,
9
+ this.rowTop,
10
+ this.columnIndex,
11
+ this.columnLeft,
12
+ this.areaIdent,
13
+ this.sideIdent,
14
+ this.originalEvent,
15
+ this.clickCount,
16
+ this.draggingX,
17
+ this.draggingY,
18
+ this.action
19
+ );
20
+ }
21
+ }
22
+ class L {
23
+ constructor(e = ">", t = "", o = []) {
24
+ this.content = e, this.style = t, this.classes = o;
25
+ }
26
+ }
27
+ class le {
28
+ constructor(e = new L(
29
+ ">",
30
+ "transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
31
+ ["gt-table-tree-arrow-expanded"]
32
+ ), t = new L(
33
+ ">",
34
+ "",
35
+ ["ge-table-tree-arrow-collapsed"]
36
+ ), o = new L(
37
+ ">",
38
+ "color:transparent;",
39
+ ["gt-table-tree-arrow-hidden"]
40
+ ), s = new L(
41
+ "↕",
42
+ "",
43
+ ["gt-table-tree-arrow-expanded-all"]
44
+ )) {
45
+ this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = o, this.arrowExpandCollapseAll = s;
46
+ }
47
+ }
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
+ }
52
+ }
53
+ class me {
54
+ constructor(e) {
55
+ this.domService = e;
56
+ }
57
+ setStyle(e, t, o) {
58
+ return this.domService.setStyle(e, t, o), e;
59
+ }
60
+ applyStyle(e, t) {
61
+ for (const o in t)
62
+ this.domService.setStyle(e, o, t[o]);
63
+ return e;
64
+ }
65
+ applyDisplayNoneStyle(e) {
66
+ return this.domService.setStyle(e, "display", "none"), e;
67
+ }
68
+ applyDisplayBlockStyle(e) {
69
+ return this.domService.setStyle(e, "display", "block"), e;
70
+ }
71
+ applyStyleInPx(e, t) {
72
+ return Object.entries(t).forEach(([o, s]) => this.domService.setStyle(e, o, s + "px")), e;
73
+ }
74
+ applyStylePosistionRelative(e) {
75
+ return this.domService.setStyle(e, "position", "relative"), this.domService.setStyle(e, "overflow", "clip"), e;
76
+ }
77
+ applyStylePosistionAbsolute(e) {
78
+ return this.domService.setStyle(e, "position", "absolute"), e;
79
+ }
80
+ applyStyleFullSize(e) {
81
+ return this.domService.setStyle(e, "width", "100%"), this.domService.setStyle(e, "height", "100%"), e;
82
+ }
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
+ }
86
+ applyStyleNoPadding(e) {
87
+ return this.domService.setStyle(e, "padding", "0"), this.domService.setStyle(e, "margin", "0"), this.domService.setStyle(e, "border", "0"), e;
88
+ }
89
+ appendRelativeChildDiv(e) {
90
+ const t = this.applyStylePosistionRelative(
91
+ this.applyStyleFullSize(
92
+ this.applyStyleNoPadding(
93
+ this.domService.createElement("div")
94
+ )
95
+ )
96
+ );
97
+ return this.domService.appendChild(e, t), this.applyStylePosistionAbsolute(e), { parent: e, child: t, cache: {} };
98
+ }
99
+ appendText(e, t) {
100
+ const o = this.domService.createText(t);
101
+ return this.domService.appendChild(e, o), o;
102
+ }
103
+ addClass(e, t) {
104
+ return e.includes(" ") ? e.split(" ").forEach((o) => this.domService.addClass(t, o)) : this.domService.addClass(t, e), t;
105
+ }
106
+ addClasses(e, t) {
107
+ if (e)
108
+ for (const o of e)
109
+ this.domService.addClass(t, o);
110
+ return t;
111
+ }
112
+ setAttribute(e, t, o) {
113
+ return t && o && this.domService.setAttribute(e, t, o), e;
114
+ }
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
+ }
119
+ createDivWithClass(e, t) {
120
+ const o = this.domService.createElement("div");
121
+ return this.addClass(e, o), this.domService.appendChild(t, o), o;
122
+ }
123
+ addRowDiv(e, t, o = -1, s, i, r = "") {
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}`), 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
+ }
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
+ }
133
+ return this.domService.appendChild(e.child, n), n;
134
+ }
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
+ }
143
+ return c && this.addSortedIcon(b, c, d == null ? void 0 : d.sortedOptions, s), this.domService.appendChild(e, b), b;
144
+ }
145
+ addCheckboxToDiv(e, t, o, s) {
146
+ const i = this.domService.createElement("div"), r = t === "full" ? "checked" : "";
147
+ return i.innerHTML = `
148
+ <input
149
+ type="checkbox"
150
+ data-area="${o}"
151
+ data-row-index="${s}"
152
+ data-input-type="checkbox"
153
+ ${r}
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
+ }
156
+ addLabelDiv(e, t = "", o = !1, s = -1, i = -1, r = "body") {
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", `${s}`), this.domService.setAttribute(l, "data-col-index", `${i}`), this.domService.setAttribute(l, "data-area", `${r}`), t)
159
+ if (o) {
160
+ const n = this.domService.createText(t);
161
+ this.domService.appendChild(l, n);
162
+ } else {
163
+ const n = this.domService.createElement("div");
164
+ this.domService.appendChild(l, n);
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
+ }
168
+ return this.domService.appendChild(e, l), l;
169
+ }
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
+ let r;
174
+ t === "asc" ? r = o.iconAsc : t === "desc" ? r = o.iconDesc : r = o.iconPlaceholder;
175
+ const l = r.content, n = this.domService.createText(l);
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
+ }
181
+ addArrowDiv(e, t = "none", o = new le(), s = -1, i = -1, r = "body") {
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", `${s}`), this.domService.setAttribute(l, "data-col-index", `${i}`), this.domService.setAttribute(l, "data-area", `${r}`);
184
+ let n;
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
+ return this.domService.appendChild(e, l), l;
191
+ }
192
+ addColumnBorderDivs(e, t, o, s, i) {
193
+ if (e.verticalBorderVisible) {
194
+ const r = `ge-table-${s}-${i}-vertical-border`;
195
+ this.addVerticalBorder(o, t, r);
196
+ }
197
+ if (e.horizontalBorderVisible) {
198
+ const r = `ge-table-${s}-${i}-horizontal-border`;
199
+ this.addHorizontalBorder(o, t, r);
200
+ }
201
+ return t;
202
+ }
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
+ }
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
+ }
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
+ }
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
+ }
219
+ applyStyleString(e, t) {
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
+ }
225
+ }
226
+ getDivOrCreateDiv(e, t) {
227
+ let o = t.cache[e];
228
+ return o ? (o.innerText = "", o) : (o = this.domService.createElement("div"), t.cache[e] = o, o);
229
+ }
230
+ }
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
+ }
235
+ }
236
+ const Y = (h) => h === "header" ? "header" : h === "footer" ? "footer" : "body";
237
+ class we {
238
+ constructor(e, t) {
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
+ 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 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
+ }
246
+ }
247
+ }
248
+ }
249
+ class Se {
250
+ constructor(e) {
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
+ (t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
253
+ );
254
+ }
255
+ onContextmenu(e) {
256
+ this.mouseEvent = e;
257
+ const t = this.tableScope.createGeMouseEvent(this.mouseEvent);
258
+ this.tableScope.contextmenu(t);
259
+ }
260
+ onHostElementClicked(e) {
261
+ const t = new we(e.target, this.tableScope);
262
+ if (t.action === "toggleExpandCollapseAll")
263
+ this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
264
+ else if (t.inputType === "checkbox" && t.areaIdent)
265
+ this.tableScope.toggleRowCheckbox(t.rowIdx, t.colIdx, t.areaIdent), e.preventDefault(), e.stopPropagation();
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
+ e.preventDefault(), e.stopPropagation();
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
+ }
273
+ }
274
+ if (t.areaIdent === "body" && this.tableScope.tableOptions.getFocusModel) {
275
+ const o = this.tableScope.tableOptions.getFocusModel();
276
+ o == null || o.clear(), o == null || o.setFocus(t.rowIdx, t.colIdx);
277
+ }
278
+ this.publishGeMouseEvent(e, 1);
279
+ }
280
+ onHostElementDblClicked(e) {
281
+ if (e.target instanceof HTMLElement) {
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
+ else if (t.getAttribute("data-row-index")) {
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
+ e.preventDefault(), e.stopPropagation();
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
+ }
292
+ }
293
+ }
294
+ this.publishGeMouseEvent(e, 2);
295
+ }
296
+ publishGeMouseEvent(e, t) {
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
+ }
300
+ updateCollapsedExpandedState(e) {
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
+ if (t) {
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
+ }
307
+ }
308
+ getArrowColumnIndex() {
309
+ return this.tableScope.tableModel.isRowCheckboxVisible() ? 1 : 0;
310
+ }
311
+ onMouseDown(e) {
312
+ this.mouseEvent = e, this.startMouseEvent = this.tableScope.createGeMouseEvent(this.mouseEvent), this.tableScope.onMouseDown(this.startMouseEvent), this.mouseDown = !0;
313
+ }
314
+ onMouseMove(e) {
315
+ this.mouseEvent = e, this.mouseDown ? (this.dragging = !0, requestAnimationFrame(this.mouseDraggingOnFrame.bind(this))) : requestAnimationFrame(this.mouseMoveOnFrame.bind(this));
316
+ }
317
+ onMouseUp(e) {
318
+ this.mouseEvent = e, this.dragging && requestAnimationFrame(this.mouseDraggingEndOnFrame.bind(this)), this.mouseDown = !1, this.dragging = !1;
319
+ }
320
+ mouseDraggingOnFrame() {
321
+ var e;
322
+ if (this.mouseEvent) {
323
+ const t = this.tableScope.createGeMouseEvent(this.mouseEvent);
324
+ (e = this.startMouseEvent) != null && e.originalEvent && (t.draggingX = this.mouseEvent.clientX - this.startMouseEvent.originalEvent.clientX, t.draggingY = this.mouseEvent.clientY - this.startMouseEvent.originalEvent.clientY), this.tableScope.mouseDraggingOnFrame(t);
325
+ }
326
+ }
327
+ mouseDraggingEndOnFrame() {
328
+ var e;
329
+ if (this.mouseEvent) {
330
+ const t = this.tableScope.createGeMouseEvent(this.mouseEvent);
331
+ (e = this.startMouseEvent) != null && e.originalEvent && (t.draggingX = this.mouseEvent.clientX - this.startMouseEvent.originalEvent.clientX, t.draggingY = this.mouseEvent.clientY - this.startMouseEvent.originalEvent.clientY), this.tableScope.mouseDraggingEndOnFrame(t);
332
+ }
333
+ }
334
+ mouseMoveOnFrame() {
335
+ if (this.mouseEvent) {
336
+ const e = this.tableScope.createGeMouseEvent(this.mouseEvent);
337
+ this.tableScope.mouseMove(e);
338
+ }
339
+ }
340
+ }
341
+ class xe {
342
+ constructor(e) {
343
+ this.tableScope = e;
344
+ }
345
+ updateCells(e) {
346
+ this.tableScope.updateCells(e);
347
+ }
348
+ externalFilterChanged() {
349
+ this.tableScope.externalFilterChanged();
350
+ }
351
+ scrollToPixel(e = 0, t = 0) {
352
+ }
353
+ scrollToIndex(e = 0, t = 0) {
354
+ }
355
+ setHeaderVisible(e = !0) {
356
+ }
357
+ setColumnVisible(e, t = !0) {
358
+ }
359
+ isColumnVisible(e) {
360
+ return !0;
361
+ }
362
+ isHeaderVisible() {
363
+ return !0;
364
+ }
365
+ setFooterVisible(e = !0) {
366
+ }
367
+ isFooterVisible() {
368
+ return !0;
369
+ }
370
+ repaint() {
371
+ this.tableScope.repaint();
372
+ }
373
+ }
374
+ class ye {
375
+ flattenTree(e, 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
+ return t;
380
+ }
381
+ isVisible(e) {
382
+ return e.parent ? e.parent.expanded ? this.isVisible(e.parent) : !1 : !0;
383
+ }
384
+ }
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
+ }
389
+ getTooltipAt(e, t) {
390
+ return "";
391
+ }
392
+ getCellRenderer(e, t) {
393
+ if (t < this.cellRenderers.length)
394
+ return this.cellRenderers[t];
395
+ }
396
+ getColspanAt(e, t) {
397
+ return 0;
398
+ }
399
+ getCustomClassesAt(e, t) {
400
+ return [];
401
+ }
402
+ getCustomStyleAt(e, t) {
403
+ }
404
+ getRowspanAt(e, t) {
405
+ return 0;
406
+ }
407
+ getRowByIndex(e) {
408
+ }
409
+ isRowCheckable(e) {
410
+ return !0;
411
+ }
412
+ isRowChecked(e) {
413
+ var o;
414
+ const t = this.getRowByIndex(e);
415
+ return (o = this.rowSelectionModel) == null ? void 0 : o.isRowChecked(t);
416
+ }
417
+ setRowChecked(e, t) {
418
+ if (this.rowSelectionModel) {
419
+ const o = this.getRowByIndex(e);
420
+ this.rowSelectionModel.checkRow(o, t);
421
+ }
422
+ }
423
+ getMaxColspan() {
424
+ return 31;
425
+ }
426
+ getMaxRowspan() {
427
+ return 31;
428
+ }
429
+ getYPosByRowIndex(e) {
430
+ return this.defaultRowHeight > 0 ? this.defaultRowHeight * e : this.yPositions[e];
431
+ }
432
+ init() {
433
+ !this.yPositions.length && this.getRowCount() !== void 0 && this.defaultRowHeight === -1 && this.calcYPositions();
434
+ }
435
+ isFilterable() {
436
+ return this.areaIdent === "body";
437
+ }
438
+ doSort(e) {
439
+ return !1;
440
+ }
441
+ isEditable(e, t) {
442
+ return this.columnDefs && t < this.columnDefs.length && this.columnDefs[t].editable ? this.columnDefs[t].editable() : !1;
443
+ }
444
+ setValue(e, t, o) {
445
+ var l;
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
+ }
451
+ isSelectable(e, t) {
452
+ return !0;
453
+ }
454
+ changeColumnOrder(e, t) {
455
+ this.arrayMove(this.cellRenderers, e, t);
456
+ }
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
+ }
463
+ return !1;
464
+ }
465
+ arrayMove(e, t, o) {
466
+ const s = e.splice(t, 1)[0];
467
+ return e.splice(o, 0, s), e;
468
+ }
469
+ calcYPositions() {
470
+ const e = this.getRowCount();
471
+ this.yPositions = new Array(e + 1), this.yPositions[0] = 0;
472
+ for (let t = 0; t < e; t++)
473
+ this.yPositions[t + 1] = this.getRowHeight(t) + this.yPositions[t];
474
+ }
475
+ }
476
+ class ae {
477
+ genericSortComparator(e, t, o) {
478
+ if (typeof e == "number" && typeof t == "number")
479
+ return o * (e - t);
480
+ if (typeof e == "string" && typeof t == "string")
481
+ return o * e.localeCompare(t);
482
+ if (typeof e == "boolean" && typeof t == "boolean")
483
+ return o * ((e ? -1 : 1) - (t ? -1 : 1));
484
+ if (e instanceof Date && t instanceof Date)
485
+ return o * (e.getTime() - t.getTime());
486
+ if (e instanceof Array && t instanceof Array) {
487
+ const s = e, i = t;
488
+ if (s.length && i.length)
489
+ return this.genericSortComparator(s[0], i[0], o);
490
+ }
491
+ return o * ("" + e).localeCompare("" + t);
492
+ }
493
+ }
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
+ }
498
+ changeColumnOrder(e, t) {
499
+ this.arrayMove(this.properties, e, t), super.changeColumnOrder(e, t);
500
+ }
501
+ recalcVisibleTreeRows() {
502
+ this.filteredFlattenRows = this.service.flattenTree(this.rows);
503
+ }
504
+ getFilteredFlattenRows() {
505
+ return this.filteredFlattenRows;
506
+ }
507
+ getRowCount() {
508
+ let e = 0;
509
+ for (const t of this.filteredFlattenRows)
510
+ this.service.isVisible(t) && e++;
511
+ return e;
512
+ }
513
+ getValueAt(e, t) {
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
+ }
520
+ return "";
521
+ }
522
+ getRowHeight(e) {
523
+ return this.defaultRowHeight;
524
+ }
525
+ getCustomClassesAt(e, t) {
526
+ return ["ge-table-tree-cell", "ge-table-tree-deep-" + this.filteredFlattenRows[e].deep];
527
+ }
528
+ getRowByIndex(e) {
529
+ return this.filteredFlattenRows[e];
530
+ }
531
+ getValueByT(e, t) {
532
+ return t.includes(".") ? this.getPropertyValue(e, t.split(".")) : e[t];
533
+ }
534
+ externalFilterChanged(e) {
535
+ this.lastPredictFn = e, this.doFiltering();
536
+ }
537
+ doSort(e) {
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
+ }
541
+ toggleExpandCollapseAll(e) {
542
+ this.expandAllRecursive(this.rows, e), this.flattenRows = this.service.flattenTree(this.rows), this.doFiltering();
543
+ }
544
+ setAllParentsOk(e) {
545
+ return e.parent && (e.parent.keep = !0, this.setAllParentsOk(e.parent)), !1;
546
+ }
547
+ setValue(e, t, o) {
548
+ var r;
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
+ }
556
+ return !1;
557
+ }
558
+ genericTreeTableSortComparator(e, 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
+ };
563
+ }
564
+ expandAllRecursive(e, t) {
565
+ for (const o of e)
566
+ o.expanded = t, o.children && this.expandAllRecursive(o.children, t);
567
+ }
568
+ doFiltering() {
569
+ if (!this.lastPredictFn)
570
+ this.filteredFlattenRows = [...this.flattenRows ? this.flattenRows : []];
571
+ else {
572
+ this.flattenRows || (this.flattenRows = []);
573
+ let e = 0;
574
+ this.flattenRows.forEach((o) => {
575
+ e = Math.max(e, o.deep);
576
+ });
577
+ const t = this.flattenRows.filter(
578
+ (o, s, i) => this.lastPredictFn(o, s, i)
579
+ );
580
+ this.flattenRows.forEach((o) => o.keep = !1), this.flattenRows.forEach((o) => {
581
+ t.includes(o) && (o.keep = !0, this.setAllParentsOk(o));
582
+ }), this.filteredFlattenRows = this.flattenRows.filter(
583
+ (o, s, i) => o.keep
584
+ );
585
+ }
586
+ }
587
+ getPropertyValue(e, t) {
588
+ const o = t.shift();
589
+ let s = e[o];
590
+ return s && t.length ? this.getPropertyValue(s, t) : s;
591
+ }
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
+ }
597
+ }
598
+ class q {
599
+ constructor(e) {
600
+ this.getStorageKeyFn = e;
601
+ }
602
+ autoConvertMapToObject(e) {
603
+ const t = {};
604
+ if (e instanceof Map) {
605
+ const o = e;
606
+ for (const s of [...o]) {
607
+ const [
608
+ i,
609
+ r
610
+ ] = s;
611
+ t[i] = r;
612
+ }
613
+ }
614
+ return t;
615
+ }
616
+ checkAndPersistItem(e, t) {
617
+ const o = this.getStorageKeyFn;
618
+ if (o) {
619
+ const s = o();
620
+ if (s) {
621
+ const i = s + e;
622
+ if ((t + "").includes("Map")) {
623
+ const r = this.autoConvertMapToObject(t);
624
+ this.persistItem(i, r);
625
+ } else
626
+ this.persistItem(i, t);
627
+ }
628
+ }
629
+ }
630
+ persistItem(e, t) {
631
+ t ? localStorage.setItem(e, JSON.stringify(t)) : localStorage.removeItem(e);
632
+ }
633
+ loadFromLocalStorage(e) {
634
+ const t = localStorage.getItem(e);
635
+ return t ? JSON.parse(t) : null;
636
+ }
637
+ // private loadItems() {
638
+ // const fn = this.getStorageKeyFn;
639
+ // if (fn) {
640
+ // const key = fn();
641
+ // if (key) {
642
+ // // A main key is given by function from options
643
+ // const subKey = key + this.CHECKED_STATE;
644
+ // const arr = this.loadFromLocalStorage<Array<string | number>>(subKey);
645
+ // if (arr) {
646
+ // this.checkedStateIds.length = 0;
647
+ // arr.forEach(a => this.checkedStateIds.push(a));
648
+ // }
649
+ //
650
+ // const subKey2 = key + this.COLLAPSED_EXPANDED_STATE;
651
+ // const data = this.loadFromLocalStorage<CollapsedExpandedData>(subKey2);
652
+ // if (data) {
653
+ // this.collapsedExpandedState = data;
654
+ // }
655
+ //
656
+ // const subKey3 = key + this.SELECTED_STATE;
657
+ // const arr3 = this.loadFromLocalStorage<object>(subKey3);
658
+ // if (arr3) {
659
+ // const map: Map<string | number, string[]> = new Map(Object.entries(arr3));
660
+ // if (map) {
661
+ // this.selectedStateIds.clear();
662
+ // map.forEach((col, k) => this.selectedStateIds.set(k, col));
663
+ // }
664
+ // }
665
+ //
666
+ // const subKey4 = key + this.SCROLL_STATE;
667
+ // let scrollOffset = this.loadFromLocalStorage<[number, number]>(subKey4);
668
+ // this.scrollOffset = scrollOffset ? scrollOffset : [0, 0];
669
+ // }
670
+ // }
671
+ // }
672
+ }
673
+ class Ce extends q {
674
+ constructor(e) {
675
+ super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
676
+ }
677
+ getScrollOffset() {
678
+ return this.scrollOffset;
679
+ }
680
+ updateScrollOffset(e) {
681
+ this.scrollOffset = e, this.checkAndPersistItem(this.SCROLL_STATE, this.scrollOffset);
682
+ }
683
+ load() {
684
+ const e = this.getStorageKeyFn;
685
+ if (e) {
686
+ const t = e();
687
+ if (t) {
688
+ const o = t + this.SCROLL_STATE;
689
+ let s = this.loadFromLocalStorage(o);
690
+ this.scrollOffset = s || [0, 0];
691
+ }
692
+ }
693
+ }
694
+ }
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
+ }
699
+ }
700
+ class Re extends q {
701
+ constructor(e) {
702
+ super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new ve(), this.load();
703
+ }
704
+ collapsedExpandedStateGet() {
705
+ return this.collapsedExpandedState;
706
+ }
707
+ collapsedExpandedStateIncludes(e) {
708
+ return this.collapsedExpandedState.rowIds.includes(e);
709
+ }
710
+ collapsedStateIdsPush(e) {
711
+ this.collapsedExpandedState.rowIds.includes(e) || (this.collapsedExpandedState.rowIds.push(e), this.collapsedExpandedState.allCollapsed = !1, this.collapsedExpandedState.allExpanded = !1, this.persist());
712
+ }
713
+ collapsedStateIdsRemove(e) {
714
+ const t = this.collapsedExpandedState.rowIds.indexOf(e);
715
+ t !== -1 && (this.collapsedExpandedState.rowIds.splice(t, 1), this.collapsedExpandedState.allCollapsed = !1, this.collapsedExpandedState.allExpanded = !1, this.persist());
716
+ }
717
+ collapsedStateAll(e) {
718
+ this.collapsedExpandedState.rowIds = [], this.collapsedExpandedState.mode = e ? "collapsed" : "expanded", this.collapsedExpandedState.allCollapsed = !e, this.collapsedExpandedState.allExpanded = e, this.persist();
719
+ }
720
+ load() {
721
+ const e = this.getStorageKeyFn;
722
+ if (e) {
723
+ const t = e();
724
+ if (t) {
725
+ const o = t + this.COLLAPSED_EXPANDED_STATE, s = this.loadFromLocalStorage(o);
726
+ s && (this.collapsedExpandedState = s);
727
+ }
728
+ }
729
+ }
730
+ persist() {
731
+ this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
732
+ }
733
+ }
734
+ class Ae extends q {
735
+ constructor(e) {
736
+ super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
737
+ }
738
+ getSortItems() {
739
+ return this.sortItems;
740
+ }
741
+ setSortItems(e) {
742
+ this.sortItems = e, this.checkAndPersistItem(this.SORTING_STATE, this.sortItems);
743
+ }
744
+ load() {
745
+ const e = this.getStorageKeyFn;
746
+ if (e) {
747
+ const t = e();
748
+ if (t) {
749
+ const o = t + this.SORTING_STATE;
750
+ let s = this.loadFromLocalStorage(o);
751
+ this.sortItems = s || [];
752
+ }
753
+ }
754
+ }
755
+ }
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
+ }
760
+ }
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
+ "position",
768
+ "relative"
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
+ )
777
+ ), this.areaHeaderCenter = o.appendRelativeChildDiv(
778
+ o.applyStylePosistionAbsolute(
779
+ o.createAreaDivWithClass("ge-table-header ge-table-header-center", i, "header", "center")
780
+ )
781
+ ), this.areaHeaderEast = o.appendRelativeChildDiv(
782
+ o.applyStylePosistionAbsolute(
783
+ o.createAreaDivWithClass("ge-table-header ge-table-header-east", i, "body", "east")
784
+ )
785
+ ), this.areaBodyWest = o.appendRelativeChildDiv(
786
+ o.applyStylePosistionAbsolute(
787
+ o.createAreaDivWithClass("ge-table-body ge-table-body-west", i, "body", "west")
788
+ )
789
+ ), this.areaBodyEast = o.appendRelativeChildDiv(
790
+ o.applyStylePosistionAbsolute(
791
+ o.createAreaDivWithClass("ge-table-body ge-table-body-east", i, "body", "east")
792
+ )
793
+ ), this.areaFooterWest = o.appendRelativeChildDiv(
794
+ o.applyStylePosistionAbsolute(
795
+ o.createAreaDivWithClass("ge-table-footer ge-table-footer-west", i, "footer", "west")
796
+ )
797
+ ), this.areaFooterCenter = o.appendRelativeChildDiv(
798
+ o.applyStylePosistionAbsolute(
799
+ o.createAreaDivWithClass("ge-table-footer ge-table-footer-center", i, "footer", "center")
800
+ )
801
+ ), this.areaFooterEast = o.appendRelativeChildDiv(
802
+ o.applyStylePosistionAbsolute(
803
+ o.createAreaDivWithClass("ge-table-footer ge-table-footer-east", i, "footer", "east")
804
+ )
805
+ ), this.scrollViewport = o.applyStyleOverflowAuto(
806
+ this.tableOptions.overflowX ?? "auto",
807
+ this.tableOptions.overflowY ?? "auto",
808
+ o.applyStyleNoPadding(
809
+ o.applyStylePosistionAbsolute(
810
+ o.createAreaDivWithClass("ge-table-scroll-viewport", i, "body", "center")
811
+ )
812
+ )
813
+ ), this.contentWrapperDiv = o.applyStyleNoPadding(
814
+ o.applyStylePosistionRelative(
815
+ o.createDivWithClass("ge-table-scroll-content-wrapper", this.scrollViewport)
816
+ )
817
+ ), this.contentDiv = o.applyStyleNoPadding(
818
+ o.applyStylePosistionRelative(
819
+ o.createDivWithClass("ge-table-scroll-content", this.contentWrapperDiv)
820
+ )
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
+ );
832
+ }
833
+ adjustContainersAndRows() {
834
+ const e = this.tableModel.getPadding(), t = this.hostElement.clientWidth, o = this.hostElement.clientHeight;
835
+ this.dom.applyStyle(this.scrollViewport, {
836
+ width: `${t - e.left}px`,
837
+ height: `${o - e.top}px`,
838
+ top: `${e.top}px`,
839
+ left: `${e.left}px`
840
+ }), this.scrollTop = this.scrollViewport.scrollTop, this.dom.applyStyle(this.contentDiv, {
841
+ width: `${this.scrollViewport.clientWidth}px`,
842
+ height: `${this.scrollViewport.clientHeight}px`,
843
+ top: `${this.scrollTop}px`,
844
+ left: `${this.scrollViewport.scrollLeft}px`
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
+ this.dom.applyStyle(this.borderFixedWest, {
847
+ width: "1px",
848
+ height: `${this.areaBodyWestGeo.height}px`,
849
+ top: `${this.areaBodyWestGeo.top}px`,
850
+ left: `${this.areaBodyWestGeo.width}px`
851
+ })
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
+ this.dom.applyStyle(this.borderFixedEast, {
854
+ width: "1px",
855
+ height: `${this.areaBodyEastGeo.height}px`,
856
+ top: `${this.areaBodyEastGeo.top}px`,
857
+ left: `${this.areaBodyEastGeo.left}px`
858
+ })
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
+ width: `${t - e.left - e.right}px`,
861
+ height: `${e.top}px`,
862
+ top: "0",
863
+ left: `${e.left}px`
864
+ }), this.dom.applyStyle(this.areaHeaderWest.parent, {
865
+ width: `${e.left}px`,
866
+ height: `${e.top}px`,
867
+ top: "0",
868
+ left: "0"
869
+ }), this.dom.applyStyle(this.areaHeaderEast.parent, {
870
+ width: `${e.right}px`,
871
+ height: `${e.top}px`,
872
+ top: "0",
873
+ left: `${t - e.right}px`
874
+ }), this.tableOptions.headerSeparatorBorderVisible && this.tableModel.isHeaderVisibe() ? this.dom.applyDisplayBlockStyle(
875
+ this.dom.applyStyle(this.borderHeaderBottom, {
876
+ width: `${t}px`,
877
+ height: "1px",
878
+ top: `${e.top}px`,
879
+ left: "0px"
880
+ })
881
+ ) : this.dom.applyDisplayNoneStyle(this.borderHeaderBottom), this.dom.applyStyle(this.areaFooterWest.parent, {
882
+ width: `${e.left}px`,
883
+ height: `${e.bottom}px`,
884
+ top: `${o - e.bottom}px`,
885
+ left: "0"
886
+ }), this.dom.applyStyle(this.areaFooterCenter.parent, {
887
+ width: `${t - e.left - e.right}px`,
888
+ height: `${e.bottom}px`,
889
+ top: `${o - e.bottom}px`,
890
+ left: `${e.left}px`
891
+ }), this.dom.applyStyle(this.areaFooterEast.parent, {
892
+ width: `${e.right}px`,
893
+ height: `${e.bottom}px`,
894
+ top: `${o - e.bottom}px`,
895
+ left: `${t - e.right}px`
896
+ }), this.tableOptions.footerSeparatorBorderVisible && this.tableModel.isFooterVisibe() ? this.dom.applyDisplayBlockStyle(
897
+ this.dom.applyStyle(this.borderFooterTop, {
898
+ width: `${t}px`,
899
+ height: "1px",
900
+ top: `${o - e.bottom}px`,
901
+ left: "0px"
902
+ })
903
+ ) : this.dom.applyDisplayNoneStyle(this.borderFooterTop), this.adjustAfterScrolling();
904
+ }
905
+ adjustAfterScrolling() {
906
+ }
907
+ resetSizeOfWrapperDiv() {
908
+ const e = `${this.tableModel.getContentWidthInPixel()}px`, t = `${this.tableModel.getContentHeightInPixel() + 1}px`;
909
+ this.dom.setStyle(this.contentWrapperDiv, "width", e), this.dom.setStyle(this.contentWrapperDiv, "height", t);
910
+ }
911
+ }
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
+ }
916
+ static create(e) {
917
+ return e.gammaRange === void 0 && (e.gammaRange = !1), new E(
918
+ e.rowIndex1,
919
+ e.columnIndex1,
920
+ e.rowIndex2,
921
+ e.columnIndex2,
922
+ e.gammaRange
923
+ );
924
+ }
925
+ static singleCell(e, t) {
926
+ return new E(e, t, e, t);
927
+ }
928
+ static singleRow(e) {
929
+ return new E(e, 0, e, Number.MAX_SAFE_INTEGER);
930
+ }
931
+ static singleColumn(e) {
932
+ return new E(0, e, Number.MAX_SAFE_INTEGER, e);
933
+ }
934
+ isInRange(e, t) {
935
+ return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
936
+ }
937
+ }
938
+ class Me {
939
+ constructor(e, t) {
940
+ this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
941
+ }
942
+ init() {
943
+ if (this.areaModel.getMaxColspan() < 2 && this.areaModel.getMaxRowspan() < 2)
944
+ return;
945
+ this.colAndRowspanRanges = [];
946
+ const e = this.areaModel.getRowCount(), t = this.tableModel.getColumnCount();
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
+ const l = this.areaModel.hasOwnProperty("gammaCells");
953
+ this.colAndRowspanRanges.push(
954
+ new E(o, s, o + r - 1, s + i - 1, l)
955
+ );
956
+ }
957
+ }
958
+ }
959
+ getRanges() {
960
+ return this.colAndRowspanRanges ? this.colAndRowspanRanges : [];
961
+ }
962
+ isInRange(e, t) {
963
+ if (this.colAndRowspanRanges) {
964
+ for (const o of this.colAndRowspanRanges)
965
+ if (o.isInRange(e, t))
966
+ return !0;
967
+ }
968
+ return !1;
969
+ }
970
+ }
971
+ class k {
972
+ constructor(e, t, o) {
973
+ this.header = e, this.body = t, this.footer = o;
974
+ }
975
+ }
976
+ class Ie extends Ee {
977
+ constructor(e, t, o, s) {
978
+ var r, l;
979
+ super(e, t, o, s), this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
980
+ header: [],
981
+ body: [],
982
+ footer: []
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
+ (n) => {
985
+ var d;
986
+ this.colAndRowspanModels[n] = new Me(t, t.getAreaModel(n)), (d = this.colAndRowspanModels[n]) == null || d.init();
987
+ }
988
+ );
989
+ }
990
+ isEditing() {
991
+ return this.editing;
992
+ }
993
+ resetEditorRenderer() {
994
+ this.editorRenderer = void 0, this.editorRendererRow = -1, this.editorRendererColumn = -1, this.editing = !1;
995
+ }
996
+ clearSelection() {
997
+ if (this.getSelectionModel) {
998
+ const e = this.getSelectionModel();
999
+ e == null || e.clear();
1000
+ }
1001
+ }
1002
+ initRenderEditor(e, t) {
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
+ this.editorRendererRow = e, this.editorRendererColumn = t, this.editing = !0, this.repaint();
1008
+ const i = document.querySelector("input.ge-table-cell-editor-input");
1009
+ i && i.focus();
1010
+ } else
1011
+ this.resetEditorRenderer();
1012
+ }
1013
+ repaint() {
1014
+ this.adjustAfterScrolling();
1015
+ }
1016
+ adjustAfterScrolling() {
1017
+ var e;
1018
+ for (const t of this.removables)
1019
+ t.remove();
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 $(0, this.hostElement.clientWidth, 1, 0),
1022
+ this.hostElement,
1023
+ "ge-table-border"
1024
+ )), this.tableOptions.tableBottomBorderVisible && this.removables.push(this.dom.addHorizontalBorder(
1025
+ new $(0, this.hostElement.clientWidth, 1, this.hostElement.clientHeight - 1),
1026
+ this.hostElement,
1027
+ "ge-table-border"
1028
+ )), this.tableModel.getFixedLeftColumnCount() > 0 && this.removables.push(this.dom.addVerticalBorder(
1029
+ new $(this.areaBodyWest.child.clientWidth, 1, this.hostElement.clientHeight, 0),
1030
+ this.hostElement,
1031
+ "ge-table-body-west-vertical-border"
1032
+ )), ((e = this.tableModel.getAreaModel("header")) == null ? void 0 : e.getRowCount()) > 0 && this.removables.push(this.dom.addHorizontalBorder(
1033
+ new $(0, this.hostElement.clientWidth, 1, this.areaHeaderCenter.child.clientHeight),
1034
+ this.hostElement,
1035
+ "ge-table-body-west-vertical-border"
1036
+ ));
1037
+ }
1038
+ checkForScrollPosSaving() {
1039
+ var e, t;
1040
+ this.storeScrollPosStateService && ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.autoRestoreScrollPosition) && this.storeScrollPosStateService.updateScrollOffset([this.scrollLeft, this.scrollTop]);
1041
+ }
1042
+ updateCells(e) {
1043
+ e.forEach(
1044
+ (t) => this.tableModel.getAreaModel(t.area).setValue(t.rowIndex, t.columnIndex, t.value)
1045
+ ), this.repaint();
1046
+ }
1047
+ getAreaAndSideIdentByAttr(e) {
1048
+ if (e) {
1049
+ const t = this.getStringByAttr(e, "data-area"), o = this.getStringByAttr(e, "data-side");
1050
+ if (o && t)
1051
+ return [t, o];
1052
+ }
1053
+ return [void 0, void 0];
1054
+ }
1055
+ getArea(e, t) {
1056
+ if (e === "header") {
1057
+ if (t === "west")
1058
+ return this.areaHeaderWest;
1059
+ if (t === "center")
1060
+ return this.areaHeaderCenter;
1061
+ if (t === "east")
1062
+ return this.areaHeaderEast;
1063
+ } else if (e === "body") {
1064
+ if (t === "west")
1065
+ return this.areaBodyWest;
1066
+ if (t === "center")
1067
+ return this.areaBodyCenter;
1068
+ if (t === "east")
1069
+ return this.areaBodyEast;
1070
+ } else if (e === "footer") {
1071
+ if (t === "west")
1072
+ return this.areaFooterWest;
1073
+ if (t === "center")
1074
+ return this.areaFooterCenter;
1075
+ if (t === "east")
1076
+ return this.areaFooterEast;
1077
+ }
1078
+ throw Error(`Wrong area identifier: row:${e}, col:${t}`);
1079
+ }
1080
+ adjustBody() {
1081
+ const e = this.areaBodyCenterGeo.height - this.tableModel.getContentHeightInPixel(), t = this.scrollFactorY * e;
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
+ }
1084
+ getNumberByAttr(e, t) {
1085
+ var o;
1086
+ if (e) {
1087
+ const s = (o = e.closest("[" + t + "]")) == null ? void 0 : o.getAttribute(t);
1088
+ if (s)
1089
+ return Number(s);
1090
+ }
1091
+ return -1;
1092
+ }
1093
+ getStringByAttr(e, t) {
1094
+ var o;
1095
+ if (e) {
1096
+ const s = (o = e.closest("[" + t + "]")) == null ? void 0 : o.getAttribute(t);
1097
+ if (s)
1098
+ return s;
1099
+ }
1100
+ return "";
1101
+ }
1102
+ adjustArea(e, t = 0) {
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
+ for (; this.cleanupFunctions[e].length; ) {
1108
+ const p = this.cleanupFunctions[e].shift();
1109
+ p && p();
1110
+ }
1111
+ let g = t;
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
+ if (this.adjustColumnsToRowParent({
1120
+ areaIdent: e,
1121
+ sideIdent: "center",
1122
+ areaModel: a,
1123
+ geo: y,
1124
+ parent: S,
1125
+ rowIndex: p,
1126
+ columnIndexStart: T,
1127
+ columnIndexEnd: m - b - 1,
1128
+ verticalFixed: !1,
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
+ areaIdent: e,
1132
+ sideIdent: "west",
1133
+ areaModel: a,
1134
+ geo: y,
1135
+ parent: S,
1136
+ rowIndex: p,
1137
+ columnIndexStart: 0,
1138
+ columnIndexEnd: T - 1,
1139
+ verticalFixed: !0,
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
+ areaIdent: e,
1143
+ sideIdent: "east",
1144
+ areaModel: a,
1145
+ geo: y,
1146
+ parent: S,
1147
+ rowIndex: p,
1148
+ columnIndexStart: m - b,
1149
+ columnIndexEnd: m - 1,
1150
+ verticalFixed: !0,
1151
+ lastRowOfModel: v
1152
+ })), e === "header" && this.tree && p === c - 1) {
1153
+ const A = this.dom.applyStyle(
1154
+ this.dom.setAttribute(
1155
+ this.dom.addDiv(S, new $(16, 20, 20, 8)),
1156
+ "data-ge-action",
1157
+ "toggleExpandCollapseAll"
1158
+ ),
1159
+ { cursor: "pointer" }
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
+ }
1165
+ }
1166
+ }
1167
+ if (g = g + R, g > r)
1168
+ break;
1169
+ }
1170
+ if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
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
+ else {
1180
+ const S = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
1181
+ v = this.scrollFactorX * S - this.areaBodyWestGeo.width, y = "center";
1182
+ }
1183
+ this.drawBigCell(C, v, t, a, R, y);
1184
+ }
1185
+ }
1186
+ }
1187
+ /**
1188
+ * Draws big cells (rowspan and or colspan) in body/center
1189
+ * @param range CellRange
1190
+ * @param xStart X position in pixel for top left corner
1191
+ * @param yStart Y position in pixel for top left corner
1192
+ * @param areaModel AreaModelIf
1193
+ * @param parentDiv Parent div as HTMLDivElement
1194
+ * @param sideIdent SideIdent (west,center,east)
1195
+ * @protected
1196
+ */
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
+ sideIdent: r,
1208
+ rowIndex: e.r1,
1209
+ columnIndex: e.c1,
1210
+ left: c,
1211
+ top: l,
1212
+ width: m,
1213
+ height: g,
1214
+ parent: i,
1215
+ cellSelected: b,
1216
+ lastRowOfModel: !0,
1217
+ gammaRange: e.gammaRange
1218
+ })) : this.renderCell({
1219
+ areaModel: s,
1220
+ areaIdent: s.areaIdent,
1221
+ sideIdent: r,
1222
+ rowIndex: e.r1,
1223
+ columnIndex: e.c1,
1224
+ left: c,
1225
+ top: l,
1226
+ width: m,
1227
+ height: g,
1228
+ parent: i,
1229
+ cellSelected: b,
1230
+ lastRowOfModel: !0,
1231
+ gammaRange: e.gammaRange
1232
+ }), s.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
1233
+ rowIndex: e.r1,
1234
+ columnIndex: e.c1,
1235
+ cellLeft: c,
1236
+ cellTop: l,
1237
+ cellWidth: m,
1238
+ cellHeight: g,
1239
+ parent: i
1240
+ });
1241
+ }
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
+ return -1;
1250
+ }
1251
+ return -1;
1252
+ }
1253
+ adjustColumnsToRowParent({
1254
+ areaIdent: e,
1255
+ sideIdent: t,
1256
+ areaModel: o,
1257
+ geo: s,
1258
+ parent: i,
1259
+ rowIndex: r,
1260
+ columnIndexStart: l,
1261
+ columnIndexEnd: n,
1262
+ verticalFixed: d = !1,
1263
+ lastRowOfModel: a = !1
1264
+ }) {
1265
+ var w;
1266
+ this.scrollViewportLeft = this.scrollViewport.scrollLeft;
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
+ } else {
1288
+ const A = this.renderSelectedBackgroundDiv(T, m, t, o, r, u, i, p, g, S, v);
1289
+ T || this.renderCell({
1290
+ areaModel: o,
1291
+ areaIdent: e,
1292
+ sideIdent: t,
1293
+ rowIndex: r,
1294
+ columnIndex: u,
1295
+ left: p,
1296
+ top: g,
1297
+ width: S,
1298
+ height: v,
1299
+ parent: i,
1300
+ cellSelected: A,
1301
+ lastRowOfModel: a,
1302
+ gammaRange: !0
1303
+ }), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
1304
+ rowIndex: r,
1305
+ columnIndex: u,
1306
+ cellLeft: p,
1307
+ cellTop: g,
1308
+ cellWidth: S,
1309
+ cellHeight: v,
1310
+ parent: i
1311
+ });
1312
+ }
1313
+ }
1314
+ if (b = b + C, b > this.areaBodyCenterGeo.width)
1315
+ break;
1316
+ }
1317
+ this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new $(b - 1, 1, s.height, 0), i);
1318
+ }
1319
+ getTreeArrowColumnIndex() {
1320
+ return this.tableOptions.showCheckboxWihoutExtraColumn ? 0 : this.tableModel.isRowCheckboxVisible() ? 1 : 0;
1321
+ }
1322
+ addAndRenderCellDiv({
1323
+ areaModel: e,
1324
+ areaIdent: t,
1325
+ sideIdent: o,
1326
+ rowIndex: s,
1327
+ index: i,
1328
+ left: r,
1329
+ width: l,
1330
+ height: n,
1331
+ top: d,
1332
+ parent: a,
1333
+ lastRowOfModel: c
1334
+ }) {
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
+ if (t === "header") {
1344
+ const x = this.tableModel.getColumnDef(i);
1345
+ (!(x != null && x.sortIconVisible) || x != null && x.sortIconVisible()) && (C = x == null ? void 0 : x.sortState);
1346
+ }
1347
+ const v = e.getValueAt(s, i), R = m ? "" : `${v}`, y = e.isRowChecked(s), S = this.dom.addColumnDiv(
1348
+ a,
1349
+ b,
1350
+ s,
1351
+ i,
1352
+ t,
1353
+ o,
1354
+ R,
1355
+ u,
1356
+ this.tableOptions,
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
+ }
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) {
1384
+ const s = [];
1385
+ for (let i = e; i <= t; i++)
1386
+ s.push(o.getRowHeight(i));
1387
+ return s;
1388
+ }
1389
+ adjustHoverRows(e) {
1390
+ if (this.tableOptions.hoverRowVisible && e.rowIndex > -1) {
1391
+ const t = this.hostElement.clientWidth, o = this.tableModel.getAreaModel("body").getRowHeight(e.rowIndex), s = e.rowTop + this.areaHeaderCenter.parent.clientHeight - this.scrollTop;
1392
+ this.dom.applyStyle(this.hoverRow, {
1393
+ left: "0",
1394
+ top: s + "px",
1395
+ width: t + "px",
1396
+ height: o + "px",
1397
+ display: "block"
1398
+ });
1399
+ } else
1400
+ this.hideHoverRow();
1401
+ }
1402
+ hideHoverRow() {
1403
+ this.dom.applyStyle(this.hoverRow, {
1404
+ display: "none"
1405
+ });
1406
+ }
1407
+ adjustHoverColumns(e) {
1408
+ if (this.tableOptions.hoverColumnVisible && e.rowIndex > -1) {
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
+ this.dom.applyStyle(this.hoverColumn, {
1411
+ left: i + "px",
1412
+ top: "0px",
1413
+ width: o + "px",
1414
+ height: t + "px",
1415
+ display: "block"
1416
+ });
1417
+ } else
1418
+ this.hideHoverColumn();
1419
+ }
1420
+ hideHoverColumn() {
1421
+ this.dom.applyStyle(this.hoverColumn, {
1422
+ display: "none"
1423
+ });
1424
+ }
1425
+ debounce(e, t = 1e3) {
1426
+ this.debounceTimeout && clearTimeout(this.debounceTimeout), this.debounceTimeout = setTimeout(e.bind(this), t);
1427
+ }
1428
+ renderDragTargetDiv(e, t, o, s, i) {
1429
+ const r = this.dom.applyStylePosistionAbsolute(
1430
+ this.dom.createDivWithClass("ge-table-drop-zone", e)
1431
+ );
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
+ }
1434
+ renderSelectedBackgroundDiv(e, t, o, s, i, r, l, n, d, a, c) {
1435
+ let g = !1;
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
+ // ge-table-body-west-selected-range
1444
+ this.dom.createDivWithClass(`ge-table-${s.areaIdent}-${o}-selected-range`, l)
1445
+ );
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
+ }
1448
+ }
1449
+ }
1450
+ return g;
1451
+ }
1452
+ renderCell({
1453
+ areaModel: e,
1454
+ areaIdent: t,
1455
+ sideIdent: o,
1456
+ rowIndex: s,
1457
+ columnIndex: i,
1458
+ left: r,
1459
+ top: l,
1460
+ width: n,
1461
+ height: d,
1462
+ parent: a,
1463
+ cellSelected: c,
1464
+ lastRowOfModel: g,
1465
+ gammaRange: m
1466
+ }) {
1467
+ const [b, w] = this.addAndRenderCellDiv({
1468
+ areaModel: e,
1469
+ areaIdent: t,
1470
+ sideIdent: o,
1471
+ rowIndex: s,
1472
+ index: i,
1473
+ left: r,
1474
+ width: n,
1475
+ height: d,
1476
+ top: l,
1477
+ parent: a,
1478
+ lastRowOfModel: g,
1479
+ gammaRange: m
1480
+ });
1481
+ c && this.dom.addClass(`ge-table-${t}-${o}-selected-range`, b), w && this.cleanupFunctions[t].push(w);
1482
+ }
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
+ }
1487
+ }
1488
+ class ke {
1489
+ constructor(e, t) {
1490
+ this.columnIndex = e, this.sortState = t;
1491
+ }
1492
+ }
1493
+ class Te {
1494
+ constructor(e) {
1495
+ this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
1496
+ }
1497
+ onHostElementChanged(e) {
1498
+ if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
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
+ this.tableScope.updateModelValueAfterEdit(r, l, n, t.value);
1503
+ }
1504
+ }
1505
+ }
1506
+ }
1507
+ class _e {
1508
+ constructor(e = -1, t = -1) {
1509
+ this.rowIndex = e, this.columnIndex = t;
1510
+ }
1511
+ }
1512
+ class U {
1513
+ constructor(e) {
1514
+ this.cells = e;
1515
+ }
1516
+ static createSingle(e, t) {
1517
+ return new U([new _e(e, t)]);
1518
+ }
1519
+ }
1520
+ class De {
1521
+ constructor(e) {
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
+ }
1525
+ onMouseClicked(e, t) {
1526
+ var i, r, l, n, d, a, c;
1527
+ let o = !1, s = !1;
1528
+ if (this.getSelectionModel && this.getFocusModel) {
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
+ }
1532
+ return s ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), o;
1533
+ }
1534
+ onActionTriggered(e) {
1535
+ if (this.getSelectionModel && this.getFocusModel) {
1536
+ const t = this.getSelectionModel(), o = this.getFocusModel();
1537
+ if (t && o) {
1538
+ if (e === "SELECT_ALL")
1539
+ return t.selectAll(), this.tableScope.repaint(), !0;
1540
+ if (e === "DESELECT_ALL")
1541
+ return t.clear(), this.tableScope.repaint(), !0;
1542
+ if (e === "TOGGLE_SELECTION") {
1543
+ const [s, i] = o.getFocus();
1544
+ return t.togglePoint(s, i), this.tableScope.repaint(), !0;
1545
+ }
1546
+ }
1547
+ }
1548
+ return !1;
1549
+ }
1550
+ createRangeByEvents(e, t) {
1551
+ t || (t = e);
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
+ columnIndex2: r
1558
+ });
1559
+ }
1560
+ }
1561
+ class $e {
1562
+ get() {
1563
+ return {
1564
+ f2: "START_EDITING",
1565
+ space: "TOGGLE_SELECTION",
1566
+ "ctrl+num_add": "SELECT_ALL",
1567
+ "ctrl+a": "SELECT_ALL",
1568
+ "ctrl+shift+a": "DESELECT_ALL",
1569
+ "ctrl+x": "DESELECT_ALL",
1570
+ "ctrl+num_subtract": "DESELECT_ALL",
1571
+ "cmd -": "DESELECT_ALL",
1572
+ arrowup: "NAVIGATE_UP",
1573
+ arrowdown: "NAVIGATE_DOWN",
1574
+ arrowleft: "NAVIGATE_LEFT",
1575
+ arrowright: "NAVIGATE_RIGHT"
1576
+ };
1577
+ }
1578
+ }
1579
+ class Fe {
1580
+ get() {
1581
+ return {
1582
+ f2: "START_EDITING",
1583
+ space: "TOGGLE_SELECTION",
1584
+ "ctrl+num_add": "SELECT_ALL",
1585
+ "cmd+a": "SELECT_ALL",
1586
+ "ctrl+a": "SELECT_ALL",
1587
+ "cmd+x": "DESELECT_ALL",
1588
+ "cmd+shift+a": "DESELECT_ALL",
1589
+ "ctrl+shift+a": "DESELECT_ALL",
1590
+ "ctrl+num_subtract": "DESELECT_ALL",
1591
+ "ctrl -": "DESELECT_ALL",
1592
+ arrowup: "NAVIGATE_UP",
1593
+ arrowdown: "NAVIGATE_DOWN",
1594
+ arrowleft: "NAVIGATE_LEFT",
1595
+ arrowright: "NAVIGATE_RIGHT"
1596
+ };
1597
+ }
1598
+ }
1599
+ class Le {
1600
+ constructor(e) {
1601
+ this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
1602
+ }
1603
+ addListener(e) {
1604
+ this.listener.includes(e) || this.listener.push(e);
1605
+ }
1606
+ init() {
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
+ }
1609
+ isMacintosh() {
1610
+ return navigator.platform.indexOf("Mac") > -1;
1611
+ }
1612
+ isDebug() {
1613
+ return this.isLocalhost();
1614
+ }
1615
+ isLocalhost() {
1616
+ return location.hostname === "localhost" || location.hostname === "127.0.0.1";
1617
+ }
1618
+ onKeyDown(e) {
1619
+ const t = this.findEnty(e);
1620
+ t && this.emit(t) && (e.preventDefault(), e.stopPropagation());
1621
+ }
1622
+ emit(e) {
1623
+ this.isDebug() && console.debug("ShortcutService emit:", e);
1624
+ let t = !1;
1625
+ for (const o of this.listener)
1626
+ o.onActionTriggered(e) && (t = !0);
1627
+ return t;
1628
+ }
1629
+ findEnty(e) {
1630
+ const t = this.getTokenByEvent(e);
1631
+ this.isDebug() && console.debug("ShortcutService tokens:", t);
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
+ }
1637
+ }
1638
+ areTokensEquals(e, t) {
1639
+ if (e.length !== t.length || e.length === 0)
1640
+ return !1;
1641
+ for (let o = 0; o < e.length; o++)
1642
+ if (e[o] !== t[o])
1643
+ return !1;
1644
+ return !0;
1645
+ }
1646
+ getTokenByEvent(e) {
1647
+ const t = [];
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
+ }
1650
+ }
1651
+ class Oe {
1652
+ onCheckboxChanged(e) {
1653
+ }
1654
+ onContextmenu(e) {
1655
+ }
1656
+ onModelChanged(e) {
1657
+ }
1658
+ onMouseClicked(e) {
1659
+ }
1660
+ onMouseDragging(e) {
1661
+ }
1662
+ onMouseDraggingEnd(e) {
1663
+ }
1664
+ onMouseMoved(e) {
1665
+ }
1666
+ }
1667
+ class Pe extends Ie {
1668
+ constructor(e, t, o, s, i) {
1669
+ var r;
1670
+ if (super(
1671
+ e,
1672
+ t,
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
+ const l = this.tableOptions.autoRestoreOptions, n = l.getStorageKeyFn;
1677
+ n && (l.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Ce(n)), l.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new Re(n)), l.autoRestoreSortingState && (this.storeSortingService = new Ae(n)));
1678
+ }
1679
+ this.mouseHandler = new Se(this), this.inputHandler = new Te(this), this.shortcutService = new Le(this), this.shortcutService.addListener(this.selectionService);
1680
+ }
1681
+ onActionTriggered(e) {
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))
1683
+ return !0;
1684
+ if (e === "START_EDITING" && this.getFocusModel) {
1685
+ const t = this.getFocusModel();
1686
+ if (t) {
1687
+ const [o, s] = t.getFocus();
1688
+ this.tableModel.getBodyModel().isEditable(o, s) && (this.clearSelection(), this.initRenderEditor(o, s));
1689
+ }
1690
+ return !0;
1691
+ }
1692
+ return !1;
1693
+ }
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
+ }
1697
+ getApi() {
1698
+ return this.api;
1699
+ }
1700
+ /*
1701
+ * Called by the table component
1702
+ */
1703
+ firstInit() {
1704
+ var e;
1705
+ this.tableModel.init(), (e = this.tableOptions) != null && e.externalFilterFunction && this.externalFilterChanged(!1), this.autoRestoreCollapsedExpandedState(), this.autoRestoreSortingState(), this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows(), this.autoRestoreScrollPosition();
1706
+ }
1707
+ createGeMouseEvent(e) {
1708
+ const t = new X();
1709
+ if (t.originalEvent = e, e) {
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
+ }
1715
+ if (t.columnLeft = this.tableModel.getXPosByColumnIndex(t.columnIndex), e.ctrlKey && e.altKey) {
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
+ }
1719
+ }
1720
+ return t;
1721
+ }
1722
+ onMouseDown(e) {
1723
+ e.columnIndex > -1 && e.action && ["resize-column", "drag-column"].includes(e.action) && (this.mouseStartWidth = this.tableModel.getColumnWidth(e.columnIndex), this.mouseStartAction = e.action, this.mouseStartColumnIndex = e.columnIndex, this.mouseStartAction === "drag-column" && (this.dragFrom = this.mouseStartColumnIndex));
1724
+ }
1725
+ mouseDraggingOnFrame(e) {
1726
+ this.eventListener.onMouseDragging(e), this.mouseEvent = e, this.mouseStartColumnIndex > -1 && this.mouseStartAction === "resize-column" && this.tableOptions.columnsResizable ? this.resizeColumn(e) : this.mouseStartAction === "drag-column" && e.columnIndex > -1 && this.tableOptions.columnsDraggable && (this.draggingTargetColumnIndex = e.columnIndex, this.dragTo = this.draggingTargetColumnIndex, this.dragFrom > -1 && this.dragTo > -1 && this.dragFrom !== this.dragTo && (this.tableModel.changeColumnOrder(this.dragFrom, this.dragTo), this.dragFrom = this.dragTo, this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows()), this.repaint());
1727
+ }
1728
+ mouseDraggingEndOnFrame(e) {
1729
+ this.eventListener.onMouseDraggingEnd(e), this.draggingTargetColumnIndex = -1, this.mouseStartAction === "resize-column" ? this.resizeColumn(e) : this.mouseStartAction === "drag-column" && this.repaint(), this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.mouseStartAction = "";
1730
+ }
1731
+ mouseMove(e) {
1732
+ this.eventListener.onMouseMoved(e), this.adjustHoverRows(e), this.adjustHoverColumns(e);
1733
+ }
1734
+ contextmenu(e) {
1735
+ this.eventListener.onContextmenu(e);
1736
+ }
1737
+ toggleExpandCollapseAll(e = !0) {
1738
+ var o;
1739
+ const t = this.tableModel.getBodyModel();
1740
+ t instanceof V && (t.toggleExpandCollapseAll(e), this.repaint(), (o = this.storeStateCollapsedExpandService) == null || o.collapsedStateAll(e));
1741
+ }
1742
+ toggleRowCheckbox(e, t, o) {
1743
+ var n;
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
+ this.eventListener.onCheckboxChanged(l || []);
1748
+ }
1749
+ onMouseClicked(e, t) {
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
+ }
1755
+ this.eventListener.onMouseClicked(e), o && this.debounce(this.repaint.bind(this), 10);
1756
+ }
1757
+ externalFilterChanged(e = !0) {
1758
+ const t = this.tableOptions.externalFilterFunction;
1759
+ t && (e && this.clearSelectionModel(), this.tableModel.externalFilterChanged(t), this.scrollViewport.scrollTo(0, 0), this.tableModel.recalcHeightAndPadding(), this.resetSizeOfWrapperDiv(), this.repaint());
1760
+ }
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
+ e.preventDefault(), e.stopPropagation();
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
+ }
1769
+ }
1770
+ changeFocusCell(e, t) {
1771
+ if (!this.isEditing() && this.getFocusModel) {
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
+ }
1777
+ }
1778
+ return !1;
1779
+ }
1780
+ resizeColumn(e) {
1781
+ this.tableModel.setColumnWidth(this.mouseStartColumnIndex, this.mouseStartWidth + e.draggingX), this.tableModel.recalcPadding(), this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows();
1782
+ }
1783
+ clearSelectionModel() {
1784
+ var e;
1785
+ this.getSelectionModel && ((e = this.getSelectionModel()) == null || e.clear());
1786
+ }
1787
+ debugOnce(e, t) {
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
+ }
1791
+ autoRestoreScrollPosition() {
1792
+ var e;
1793
+ if ((e = this.tableOptions) != null && e.autoRestoreOptions && this.storeScrollPosStateService && this.tableOptions.autoRestoreOptions.autoRestoreScrollPosition) {
1794
+ const o = this.storeScrollPosStateService.getScrollOffset();
1795
+ o && this.scrollViewport.scrollTo(...o);
1796
+ }
1797
+ }
1798
+ autoRestoreSortingState() {
1799
+ var e, t;
1800
+ if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.autoRestoreSortingState && this.storeSortingService) {
1801
+ const o = this.storeSortingService.getSortItems();
1802
+ o != null && o.length && this.tableModel.getBodyModel().doSort(o);
1803
+ }
1804
+ }
1805
+ autoRestoreCollapsedExpandedState() {
1806
+ var e, t;
1807
+ if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.getRowId && this.storeStateCollapsedExpandService) {
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
+ const l = r, n = r.getRowCount();
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
+ else {
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
+ }
1824
+ }
1825
+ l.recalcVisibleTreeRows();
1826
+ }
1827
+ }
1828
+ }
1829
+ }
1830
+ }
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;
2092
+ }
2093
+ }
2094
+ class P {
2095
+ constructor(e = 34, t = 34, o = 34) {
2096
+ this.header = e, this.body = t, this.footer = o;
2097
+ }
2098
+ }
2099
+ class f {
2100
+ constructor(e = 100, t = "px") {
2101
+ this.value = e, this.unit = t;
2102
+ }
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;
2108
+ }
2109
+ static bodyRenderer(e) {
2110
+ return new k(
2111
+ void 0,
2112
+ e,
2113
+ void 0
2114
+ );
2115
+ }
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
+ );
2144
+ }
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];
2150
+ }
2151
+ externalFilterChanged(e) {
2152
+ this.filteredArr = this.arr ? this.arr.filter(e) : [];
2153
+ }
2154
+ getRowCount() {
2155
+ return this.filteredArr ? this.filteredArr.length : 0;
2156
+ }
2157
+ getValueAt(e, t) {
2158
+ return this.filteredArr[e][t];
2159
+ }
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;
2164
+ }
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);
2173
+ }
2174
+ }
2175
+ class D {
2176
+ constructor(e = "body") {
2177
+ this.areaIdent = e, this.rowSelectionModel = void 0;
2178
+ }
2179
+ getRowCount() {
2180
+ return 0;
2181
+ }
2182
+ getValueAt(e, t) {
2183
+ return "";
2184
+ }
2185
+ getCellRenderer(e, t) {
2186
+ }
2187
+ getRowHeight(e) {
2188
+ return 0;
2189
+ }
2190
+ getColspanAt(e, t) {
2191
+ return 0;
2192
+ }
2193
+ getCustomClassesAt(e, t) {
2194
+ return [];
2195
+ }
2196
+ getCustomStyleAt(e, t) {
2197
+ }
2198
+ getRowspanAt(e, t) {
2199
+ return 0;
2200
+ }
2201
+ getRowByIndex(e) {
2202
+ }
2203
+ isRowCheckable(e) {
2204
+ return !1;
2205
+ }
2206
+ isRowChecked(e) {
2207
+ }
2208
+ setRowChecked(e, t) {
2209
+ }
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;
2237
+ }
2238
+ isSelectable(e, t) {
2239
+ return !1;
2240
+ }
2241
+ changeColumnOrder(e, t) {
2242
+ }
2243
+ }
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);
2279
+ }
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",
3612
+ "mouseDragging",
3613
+ "checkboxChanged",
3614
+ "contextmenu",
3615
+ "modelChanged",
3616
+ "mouseDraggingEnd",
3617
+ "mouseMoved"
3618
+ ],
3619
+ setup(h, { emit: e }) {
3620
+ const t = ue(null), o = (s) => {
3621
+ const i = {
3622
+ onCheckboxChanged: (l) => {
3623
+ e("checkboxChanged", l);
3624
+ },
3625
+ onContextmenu: (l) => {
3626
+ e("contextmenu", l);
3627
+ },
3628
+ onModelChanged: (l) => {
3629
+ e("modelChanged", l);
3630
+ },
3631
+ onMouseClicked: (l) => {
3632
+ e("mouseClicked", l);
3633
+ },
3634
+ onMouseDragging: (l) => {
3635
+ e("mouseDragging", l);
3636
+ },
3637
+ onMouseDraggingEnd: (l) => {
3638
+ e("mouseDraggingEnd", l);
3639
+ },
3640
+ onMouseMoved: (l) => {
3641
+ e("mouseMoved", l);
3642
+ }
3643
+ }, r = new Pe(
3644
+ s,
3645
+ h.tableModel,
3646
+ new Qe(),
3647
+ h.tableOptions,
3648
+ i
3649
+ );
3650
+ r.firstInit(), e("tableReady", r.getApi());
3651
+ };
3652
+ return ge(() => {
3653
+ t.value && o(t.value);
3654
+ }), {
3655
+ root: t
3656
+ };
3657
+ }
3658
+ }), et = (h, e) => {
3659
+ const t = h.__vccOpts || h;
3660
+ for (const [o, s] of e)
3661
+ t[o] = s;
3662
+ return t;
3663
+ }, tt = {
3664
+ ref: "root",
3665
+ class: "container-div",
3666
+ style: { width: "100%", height: "100%", "background-color": "transparent", padding: "0", margin: "0" }
3667
+ };
3668
+ function ot(h, e, t, o, s, i) {
3669
+ return be(), pe("div", tt, null, 512);
3670
+ }
3671
+ const uo = /* @__PURE__ */ et(Ze, [["render", ot]]);
3672
+ class go {
3673
+ constructor(e, t) {
3674
+ this.component = e, this.appContext = t;
3675
+ }
3676
+ render(e, t, o, s, i, r, l) {
3677
+ return this.mount(
3678
+ this.component,
3679
+ {
3680
+ cellDiv: e,
3681
+ rowIndex: t,
3682
+ columnIndex: o,
3683
+ areaIdent: s,
3684
+ areaModel: i,
3685
+ cellValue: r
3686
+ },
3687
+ this.appContext,
3688
+ e
3689
+ );
3690
+ }
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);
3695
+ };
3696
+ }
3697
+ }
3698
+ export {
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
3828
+ };