@guiexpert/react-table 1.0.6 → 18.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +3 -3
- package/index.js +267 -217
- package/lib/guiexpert-table.d.ts +20 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,18 +1,43 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { jsx as U } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as J, useEffect as Q } from "react";
|
|
3
|
+
import Z from "react-dom";
|
|
4
|
+
class D {
|
|
5
|
+
// The constructor is private to prevent direct construction calls
|
|
6
|
+
// with the `new` operator
|
|
7
|
+
constructor() {
|
|
8
|
+
this.alreadySet = !1;
|
|
9
|
+
}
|
|
10
|
+
static getInstance() {
|
|
11
|
+
return D.instance || (D.instance = new D()), D.instance;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Method to set the license key for the application.
|
|
15
|
+
* A 'meta' element is created with content as 'guiexperttable=<license key>'
|
|
16
|
+
* and appended into the head section of the document
|
|
17
|
+
*
|
|
18
|
+
* @param {string} key - The license key to set for the application.
|
|
19
|
+
*
|
|
20
|
+
* @return {void} - This method does not return anything
|
|
21
|
+
*/
|
|
22
|
+
setLicenseKey(e) {
|
|
23
|
+
if (e && !this.alreadySet) {
|
|
24
|
+
const t = document.createElement("meta");
|
|
25
|
+
t.content = "license=" + e, t.name = "guiexperttable", document.getElementsByTagName("head")[0].appendChild(t), this.alreadySet = !0;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
6
28
|
}
|
|
7
29
|
function $(p) {
|
|
30
|
+
return p && p.type === "TreeRow";
|
|
31
|
+
}
|
|
32
|
+
function B(p) {
|
|
8
33
|
return p && p.type === "AreaModelTree";
|
|
9
34
|
}
|
|
10
|
-
class
|
|
11
|
-
constructor(e = -1, t = -1, s = -1, i = -1, o, r, n, l = 0, a = 0, d = 0,
|
|
12
|
-
this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = i, this.areaIdent = o, this.sideIdent = r, this.originalEvent = n, this.clickCount = l, this.draggingX = a, this.draggingY = d, this.action =
|
|
35
|
+
class H {
|
|
36
|
+
constructor(e = -1, t = -1, s = -1, i = -1, o, r, n, l = 0, a = 0, d = 0, u = "") {
|
|
37
|
+
this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = i, this.areaIdent = o, this.sideIdent = r, this.originalEvent = n, this.clickCount = l, this.draggingX = a, this.draggingY = d, this.action = u;
|
|
13
38
|
}
|
|
14
39
|
clone() {
|
|
15
|
-
return new
|
|
40
|
+
return new H(
|
|
16
41
|
this.rowIndex,
|
|
17
42
|
this.rowTop,
|
|
18
43
|
this.columnIndex,
|
|
@@ -27,25 +52,25 @@ class W {
|
|
|
27
52
|
);
|
|
28
53
|
}
|
|
29
54
|
}
|
|
30
|
-
class
|
|
55
|
+
class I {
|
|
31
56
|
constructor(e = ">", t = "", s = []) {
|
|
32
57
|
this.content = e, this.style = t, this.classes = s;
|
|
33
58
|
}
|
|
34
59
|
}
|
|
35
|
-
class
|
|
36
|
-
constructor(e = new
|
|
60
|
+
class z {
|
|
61
|
+
constructor(e = new I(
|
|
37
62
|
">",
|
|
38
63
|
"transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
|
|
39
64
|
["gt-table-tree-arrow-expanded"]
|
|
40
|
-
), t = new
|
|
65
|
+
), t = new I(
|
|
41
66
|
">",
|
|
42
67
|
"",
|
|
43
68
|
["ge-table-tree-arrow-collapsed"]
|
|
44
|
-
), s = new
|
|
69
|
+
), s = new I(
|
|
45
70
|
">",
|
|
46
71
|
"color:transparent;",
|
|
47
72
|
["gt-table-tree-arrow-hidden"]
|
|
48
|
-
), i = new
|
|
73
|
+
), i = new I(
|
|
49
74
|
"↕",
|
|
50
75
|
"",
|
|
51
76
|
["gt-table-tree-arrow-expanded-all"]
|
|
@@ -53,12 +78,12 @@ class X {
|
|
|
53
78
|
this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = s, this.arrowExpandCollapseAll = i;
|
|
54
79
|
}
|
|
55
80
|
}
|
|
56
|
-
class
|
|
57
|
-
constructor(e = new
|
|
81
|
+
class K {
|
|
82
|
+
constructor(e = new I("↑", "", ["ge-header-sorted-asc"]), t = new I("↓", "", ["ge-header-sorted-desc"]), s = new I("↑", "color:transparent;", [])) {
|
|
58
83
|
this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = s;
|
|
59
84
|
}
|
|
60
85
|
}
|
|
61
|
-
class
|
|
86
|
+
class ee {
|
|
62
87
|
constructor(e) {
|
|
63
88
|
this.domService = e;
|
|
64
89
|
}
|
|
@@ -143,15 +168,15 @@ class Z {
|
|
|
143
168
|
}
|
|
144
169
|
return this.domService.appendChild(e.child, l), l;
|
|
145
170
|
}
|
|
146
|
-
addColumnDiv(e, t, s = -1, i = -1, o, r, n = "", l, a, d = void 0,
|
|
147
|
-
const g = a == null ? void 0 : a.treeOptions, m = a == null ? void 0 : a.showCheckboxWihoutExtraColumn,
|
|
148
|
-
this.domService.addClass(
|
|
171
|
+
addColumnDiv(e, t, s = -1, i = -1, o, r, n = "", l, a, d = void 0, u) {
|
|
172
|
+
const g = a == null ? void 0 : a.treeOptions, m = a == null ? void 0 : a.showCheckboxWihoutExtraColumn, c = this.domService.createElement("div");
|
|
173
|
+
this.domService.addClass(c, "ge-table-col-div"), this.domService.addClass(c, `ge-table-col-div-${t.index}`), this.domService.setAttribute(c, "data-col-index", `${t.index}`), this.domService.setAttribute(c, "data-row-index", `${s}`), this.domService.setAttribute(c, "data-area", `${o}`);
|
|
149
174
|
const f = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
150
|
-
if (o === "body" && r === "center" && this.domService.addClass(
|
|
151
|
-
const
|
|
152
|
-
this.addLabelDiv(
|
|
175
|
+
if (o === "body" && r === "center" && this.domService.addClass(c, `ge-table-column-${f}`), this.domService.setStyle(c, "display", "clip"), this.domService.setStyle(c, "position", "absolute"), this.domService.setStyle(c, "left", `${t.left}px`), this.domService.setStyle(c, "top", `${t.top}px`), this.domService.setStyle(c, "width", `${t.width}px`), this.domService.setStyle(c, "height", `${t.height}px`), l && l !== "none" && (this.domService.addClass(c, "ge-table-col-tree"), this.addArrowDiv(c, l, g, s, i, o)), m && i === 0 && d && this.addCheckboxToDiv(c, d, o, s), n) {
|
|
176
|
+
const S = l !== "none" && i === 0;
|
|
177
|
+
this.addLabelDiv(c, n, S, s, i, o);
|
|
153
178
|
}
|
|
154
|
-
return
|
|
179
|
+
return u && this.addSortedIcon(c, u, a == null ? void 0 : a.sortedOptions, i), this.domService.appendChild(e, c), c;
|
|
155
180
|
}
|
|
156
181
|
addCheckboxToDiv(e, t, s, i) {
|
|
157
182
|
const o = this.domService.createElement("div"), r = t === "full" ? "checked" : "";
|
|
@@ -178,7 +203,7 @@ class Z {
|
|
|
178
203
|
}
|
|
179
204
|
return this.domService.appendChild(e, n), n;
|
|
180
205
|
}
|
|
181
|
-
addSortedIcon(e, t = "", s = new
|
|
206
|
+
addSortedIcon(e, t = "", s = new K(), i = -1) {
|
|
182
207
|
const o = this.domService.createElement("div");
|
|
183
208
|
this.domService.addClass(o, "ge-table-sorted-icon-div"), this.domService.setStyle(o, "position", "absolute"), this.domService.setStyle(o, "top", "0"), this.domService.setStyle(o, "right", "0"), this.domService.setStyle(o, "width", "20px"), this.domService.setStyle(o, "background", "transparent"), this.domService.setStyle(o, "cursor", "pointer"), this.domService.setAttribute(o, "data-col-index", `${i}`), this.domService.setAttribute(o, "data-area", "header");
|
|
184
209
|
let r;
|
|
@@ -189,15 +214,15 @@ class Z {
|
|
|
189
214
|
this.domService.addClass(o, a);
|
|
190
215
|
return this.domService.appendChild(e, o), o;
|
|
191
216
|
}
|
|
192
|
-
addArrowDiv(e, t = "none", s = new
|
|
217
|
+
addArrowDiv(e, t = "none", s = new z(), i = -1, o = -1, r = "body") {
|
|
193
218
|
const n = this.domService.createElement("div");
|
|
194
219
|
this.domService.addClass(n, "ge-table-tree-arrow-div"), this.domService.setStyle(n, "display", "inline-block"), this.domService.setStyle(n, "position", ""), this.domService.setStyle(n, "width", "20px"), this.domService.setStyle(n, "background", "transparent"), this.domService.setStyle(n, "cursor", "pointer"), this.domService.setAttribute(n, "data-row-index", `${i}`), this.domService.setAttribute(n, "data-col-index", `${o}`), this.domService.setAttribute(n, "data-area", `${r}`);
|
|
195
220
|
let l;
|
|
196
221
|
t === "expanded" ? l = s.arrowExpanded : t === "collapsed" ? l = s.arrowCollapsed : l = s.arrowPlaceholder;
|
|
197
222
|
const a = l.content, d = this.domService.createText(a);
|
|
198
223
|
this.domService.appendChild(n, d), l.style && this.applyStyleString(n, l.style);
|
|
199
|
-
for (const
|
|
200
|
-
this.domService.addClass(n,
|
|
224
|
+
for (const u of l.classes)
|
|
225
|
+
this.domService.addClass(n, u);
|
|
201
226
|
return this.domService.appendChild(e, n), n;
|
|
202
227
|
}
|
|
203
228
|
addColumnBorderDivs(e, t, s, i, o) {
|
|
@@ -239,20 +264,20 @@ class Z {
|
|
|
239
264
|
return s ? (s.innerText = "", s) : (s = this.domService.createElement("div"), t.cache[e] = s, s);
|
|
240
265
|
}
|
|
241
266
|
}
|
|
242
|
-
const
|
|
243
|
-
class
|
|
267
|
+
const P = (p) => p === "header" ? "header" : p === "footer" ? "footer" : "body";
|
|
268
|
+
class te {
|
|
244
269
|
constructor(e, t) {
|
|
245
270
|
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)) {
|
|
246
271
|
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"));
|
|
247
272
|
const s = e.getAttribute("data-area");
|
|
248
|
-
if (s && (this.areaIdent =
|
|
273
|
+
if (s && (this.areaIdent = P(s), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
|
|
249
274
|
const i = e;
|
|
250
275
|
this.value = i.value;
|
|
251
276
|
}
|
|
252
277
|
}
|
|
253
278
|
}
|
|
254
279
|
}
|
|
255
|
-
class
|
|
280
|
+
class se {
|
|
256
281
|
constructor(e) {
|
|
257
282
|
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(
|
|
258
283
|
(t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
|
|
@@ -278,12 +303,12 @@ class te {
|
|
|
278
303
|
* @return {void}
|
|
279
304
|
*/
|
|
280
305
|
onHostElementClicked(e) {
|
|
281
|
-
const t = new
|
|
306
|
+
const t = new te(e.target, this.tableScope);
|
|
282
307
|
if (t.action === "toggleExpandCollapseAll")
|
|
283
308
|
this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
|
|
284
309
|
else if (t.inputType === "checkbox" && t.areaIdent)
|
|
285
310
|
this.tableScope.toggleRowCheckbox(t.rowIdx, t.colIdx, t.areaIdent), e.preventDefault(), e.stopPropagation();
|
|
286
|
-
else if (
|
|
311
|
+
else if ($(t.row) && t.areaModel) {
|
|
287
312
|
const s = t.colIdx === this.getArrowColumnIndex() && e.altKey, i = t.className.includes("ge-table-tree-arrow-div");
|
|
288
313
|
if (console.info(i, s), s || i) {
|
|
289
314
|
e.preventDefault(), e.stopPropagation();
|
|
@@ -305,12 +330,12 @@ class te {
|
|
|
305
330
|
*/
|
|
306
331
|
onHostElementDblClicked(e) {
|
|
307
332
|
if (e.target instanceof HTMLElement) {
|
|
308
|
-
const t = e.target, s = t.getAttribute("data-area"), i =
|
|
333
|
+
const t = e.target, s = t.getAttribute("data-area"), i = P(s), o = Number(t.getAttribute("data-row-index")), r = Number(t.getAttribute("data-col-index")), n = this.tableScope.tableModel.getAreaModel(i);
|
|
309
334
|
if (s && i === "header")
|
|
310
335
|
this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, o, r));
|
|
311
336
|
else if (t.getAttribute("data-row-index")) {
|
|
312
337
|
const l = n.getRowByIndex(o);
|
|
313
|
-
if (s && i === "body" && n.isEditable(o, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(o, r)),
|
|
338
|
+
if (s && i === "body" && n.isEditable(o, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(o, r)), $(l) && r === this.getArrowColumnIndex()) {
|
|
314
339
|
e.preventDefault(), e.stopPropagation();
|
|
315
340
|
const a = l;
|
|
316
341
|
a.expanded = !a.expanded, "recalcVisibleTreeRows" in n && n.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(a);
|
|
@@ -341,8 +366,8 @@ class te {
|
|
|
341
366
|
var s, i, o, r, n;
|
|
342
367
|
const t = (i = (s = this.tableScope.tableOptions) == null ? void 0 : s.autoRestoreOptions) == null ? void 0 : i.getRowId;
|
|
343
368
|
if (t) {
|
|
344
|
-
const l = (o = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : o.collapsedExpandedStateGet().mode, a = l === "collapsed" && !e.expanded || l === "expanded" && e.expanded, d = l === "collapsed" && e.expanded || l === "expanded" && !e.expanded,
|
|
345
|
-
a ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(
|
|
369
|
+
const l = (o = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : o.collapsedExpandedStateGet().mode, a = l === "collapsed" && !e.expanded || l === "expanded" && e.expanded, d = l === "collapsed" && e.expanded || l === "expanded" && !e.expanded, u = t(e.data);
|
|
370
|
+
a ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(u) : d && ((n = this.tableScope.storeStateCollapsedExpandService) == null || n.collapsedStateIdsRemove(u));
|
|
346
371
|
}
|
|
347
372
|
}
|
|
348
373
|
getArrowColumnIndex() {
|
|
@@ -378,7 +403,7 @@ class te {
|
|
|
378
403
|
}
|
|
379
404
|
}
|
|
380
405
|
}
|
|
381
|
-
class
|
|
406
|
+
class ie {
|
|
382
407
|
constructor(e) {
|
|
383
408
|
this.tableScope = e;
|
|
384
409
|
}
|
|
@@ -404,21 +429,23 @@ class se {
|
|
|
404
429
|
/**
|
|
405
430
|
* Scrolls the table body to the specified pixel coordinates.
|
|
406
431
|
*
|
|
407
|
-
* @param {number}
|
|
408
|
-
* @param {number}
|
|
432
|
+
* @param {number} px - The horizontal pixel coordinate to scroll to. Defaults to 0.
|
|
433
|
+
* @param {number} py - The vertical pixel coordinate to scroll to. Defaults to 0.
|
|
409
434
|
* @return {void}
|
|
410
435
|
*/
|
|
411
436
|
scrollToPixel(e = 0, t = 0) {
|
|
437
|
+
this.tableScope.scrollToPixel(e, t);
|
|
412
438
|
}
|
|
413
439
|
/**
|
|
414
440
|
* Scrolls to the specified index in both horizontal and vertical directions.
|
|
415
441
|
*
|
|
416
|
-
* @param {number}
|
|
417
|
-
* @param {number}
|
|
442
|
+
* @param {number} indexX - The index of the column to scroll to in the horizontal direction. Default is 0.
|
|
443
|
+
* @param {number} indexY - The index of the row to scroll to in the vertical direction. Default is 0.
|
|
418
444
|
*
|
|
419
445
|
* @return undefined
|
|
420
446
|
*/
|
|
421
447
|
scrollToIndex(e = 0, t = 0) {
|
|
448
|
+
this.tableScope.scrollToIndex(e, t);
|
|
422
449
|
}
|
|
423
450
|
/**
|
|
424
451
|
* Sets whether the header is visible or not.
|
|
@@ -483,7 +510,7 @@ class se {
|
|
|
483
510
|
this.tableScope.repaint();
|
|
484
511
|
}
|
|
485
512
|
}
|
|
486
|
-
class
|
|
513
|
+
class V {
|
|
487
514
|
constructor(e) {
|
|
488
515
|
this.getStorageKeyFn = e;
|
|
489
516
|
}
|
|
@@ -558,7 +585,7 @@ class P {
|
|
|
558
585
|
// }
|
|
559
586
|
// }
|
|
560
587
|
}
|
|
561
|
-
class
|
|
588
|
+
class oe extends V {
|
|
562
589
|
constructor(e) {
|
|
563
590
|
super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
|
|
564
591
|
}
|
|
@@ -580,14 +607,14 @@ class ie extends P {
|
|
|
580
607
|
}
|
|
581
608
|
}
|
|
582
609
|
}
|
|
583
|
-
class
|
|
610
|
+
class le {
|
|
584
611
|
constructor(e = "collapsed", t = [], s = !1, i = !1) {
|
|
585
612
|
this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = i;
|
|
586
613
|
}
|
|
587
614
|
}
|
|
588
|
-
class
|
|
615
|
+
class re extends V {
|
|
589
616
|
constructor(e) {
|
|
590
|
-
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new
|
|
617
|
+
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new le(), this.load();
|
|
591
618
|
}
|
|
592
619
|
collapsedExpandedStateGet() {
|
|
593
620
|
return this.collapsedExpandedState;
|
|
@@ -619,7 +646,7 @@ class le extends P {
|
|
|
619
646
|
this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
|
|
620
647
|
}
|
|
621
648
|
}
|
|
622
|
-
class
|
|
649
|
+
class ne extends V {
|
|
623
650
|
constructor(e) {
|
|
624
651
|
super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
|
|
625
652
|
}
|
|
@@ -646,7 +673,7 @@ class T {
|
|
|
646
673
|
this.left = e, this.width = t, this.height = s, this.top = i, this.index = o;
|
|
647
674
|
}
|
|
648
675
|
}
|
|
649
|
-
class
|
|
676
|
+
class ae {
|
|
650
677
|
constructor(e, t, s, i) {
|
|
651
678
|
this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = i, this.scrollTop = 0, this.areaBodyWestGeo = new T(), this.areaBodyCenterGeo = new T(), this.areaBodyEastGeo = new T();
|
|
652
679
|
const o = this.hostElement;
|
|
@@ -832,7 +859,7 @@ class R {
|
|
|
832
859
|
return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
|
|
833
860
|
}
|
|
834
861
|
}
|
|
835
|
-
class
|
|
862
|
+
class de {
|
|
836
863
|
constructor(e, t) {
|
|
837
864
|
this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
|
|
838
865
|
}
|
|
@@ -865,22 +892,22 @@ class ae {
|
|
|
865
892
|
return !1;
|
|
866
893
|
}
|
|
867
894
|
}
|
|
868
|
-
class
|
|
895
|
+
class he {
|
|
869
896
|
constructor(e, t, s) {
|
|
870
897
|
this.header = e, this.body = t, this.footer = s;
|
|
871
898
|
}
|
|
872
899
|
}
|
|
873
|
-
class
|
|
900
|
+
class ce extends ae {
|
|
874
901
|
constructor(e, t, s, i) {
|
|
875
902
|
var r, n;
|
|
876
903
|
super(e, t, s, i), this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
|
|
877
904
|
header: [],
|
|
878
905
|
body: [],
|
|
879
906
|
footer: []
|
|
880
|
-
}, this.tree = !1, this.colAndRowspanModels = new
|
|
907
|
+
}, this.tree = !1, this.colAndRowspanModels = new he(), 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), (n = this.tableOptions) != null && n.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), B(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
|
|
881
908
|
(l) => {
|
|
882
909
|
var a;
|
|
883
|
-
this.colAndRowspanModels[l] = new
|
|
910
|
+
this.colAndRowspanModels[l] = new de(t, t.getAreaModel(l)), (a = this.colAndRowspanModels[l]) == null || a.init();
|
|
884
911
|
}
|
|
885
912
|
);
|
|
886
913
|
}
|
|
@@ -999,21 +1026,21 @@ class he extends ne {
|
|
|
999
1026
|
return "";
|
|
1000
1027
|
}
|
|
1001
1028
|
adjustArea(e, t = 0) {
|
|
1002
|
-
var
|
|
1029
|
+
var S;
|
|
1003
1030
|
const s = this.getArea(e, "west"), i = this.getArea(e, "center"), o = this.getArea(e, "east"), r = i.child.clientHeight;
|
|
1004
1031
|
s.child.innerText = "", i.child.innerText = "", o.child.innerText = "";
|
|
1005
|
-
const n = 0, l = this.areaBodyCenterGeo.width, a = this.tableModel.getPadding(), d = this.tableModel.getAreaModel(e),
|
|
1032
|
+
const n = 0, l = this.areaBodyCenterGeo.width, a = this.tableModel.getPadding(), d = this.tableModel.getAreaModel(e), u = d.getRowCount();
|
|
1006
1033
|
for (; this.cleanupFunctions[e].length; ) {
|
|
1007
|
-
const
|
|
1008
|
-
|
|
1034
|
+
const h = this.cleanupFunctions[e].shift();
|
|
1035
|
+
h && h();
|
|
1009
1036
|
}
|
|
1010
1037
|
let g = t;
|
|
1011
|
-
const m = this.tableModel.getColumnCount(),
|
|
1012
|
-
for (let
|
|
1013
|
-
const w = g, C =
|
|
1038
|
+
const m = this.tableModel.getColumnCount(), c = this.tableModel.getFixedRightColumnCount(), f = this.tableModel.getFixedLeftColumnCount();
|
|
1039
|
+
for (let h = 0; h < u; h++) {
|
|
1040
|
+
const w = g, C = h === u - 1, x = this.tableModel.getRowHeight(e, h);
|
|
1014
1041
|
if (w + x > 0) {
|
|
1015
|
-
this.firstVisibleRowIndex =
|
|
1016
|
-
let y = { left: n, width: l, height: x, top: w, index:
|
|
1042
|
+
this.firstVisibleRowIndex = h;
|
|
1043
|
+
let y = { left: n, width: l, height: x, top: w, index: h }, v = this.dom.addRowDiv(i, y, h, e, "center");
|
|
1017
1044
|
const E = f;
|
|
1018
1045
|
if (this.adjustColumnsToRowParent({
|
|
1019
1046
|
areaIdent: e,
|
|
@@ -1021,34 +1048,34 @@ class he extends ne {
|
|
|
1021
1048
|
areaModel: d,
|
|
1022
1049
|
geo: y,
|
|
1023
1050
|
parent: v,
|
|
1024
|
-
rowIndex:
|
|
1051
|
+
rowIndex: h,
|
|
1025
1052
|
columnIndexStart: E,
|
|
1026
|
-
columnIndexEnd: m -
|
|
1053
|
+
columnIndexEnd: m - c - 1,
|
|
1027
1054
|
verticalFixed: !1,
|
|
1028
1055
|
lastRowOfModel: C
|
|
1029
|
-
}), a.left > 0 && (y = { left: n, width: this.areaBodyWestGeo.width, height: x, top: w, index:
|
|
1056
|
+
}), a.left > 0 && (y = { left: n, width: this.areaBodyWestGeo.width, height: x, top: w, index: h }, v = this.dom.addRowDiv(s, y, h, e, "west"), this.adjustColumnsToRowParent({
|
|
1030
1057
|
areaIdent: e,
|
|
1031
1058
|
sideIdent: "west",
|
|
1032
1059
|
areaModel: d,
|
|
1033
1060
|
geo: y,
|
|
1034
1061
|
parent: v,
|
|
1035
|
-
rowIndex:
|
|
1062
|
+
rowIndex: h,
|
|
1036
1063
|
columnIndexStart: 0,
|
|
1037
1064
|
columnIndexEnd: E - 1,
|
|
1038
1065
|
verticalFixed: !0,
|
|
1039
1066
|
lastRowOfModel: C
|
|
1040
|
-
})), a.right > 0 && (y = { left: n, width: this.areaBodyEastGeo.width, height: x, top: w, index:
|
|
1067
|
+
})), a.right > 0 && (y = { left: n, width: this.areaBodyEastGeo.width, height: x, top: w, index: h }, v = this.dom.addRowDiv(o, y, h, e, "east"), this.adjustColumnsToRowParent({
|
|
1041
1068
|
areaIdent: e,
|
|
1042
1069
|
sideIdent: "east",
|
|
1043
1070
|
areaModel: d,
|
|
1044
1071
|
geo: y,
|
|
1045
1072
|
parent: v,
|
|
1046
|
-
rowIndex:
|
|
1047
|
-
columnIndexStart: m -
|
|
1073
|
+
rowIndex: h,
|
|
1074
|
+
columnIndexStart: m - c,
|
|
1048
1075
|
columnIndexEnd: m - 1,
|
|
1049
1076
|
verticalFixed: !0,
|
|
1050
1077
|
lastRowOfModel: C
|
|
1051
|
-
})), e === "header" && this.tree &&
|
|
1078
|
+
})), e === "header" && this.tree && h === u - 1) {
|
|
1052
1079
|
const A = this.dom.applyStyle(
|
|
1053
1080
|
this.dom.setAttribute(
|
|
1054
1081
|
this.dom.addDiv(v, new T(16, 20, 20, 8)),
|
|
@@ -1058,8 +1085,8 @@ class he extends ne {
|
|
|
1058
1085
|
{ cursor: "pointer" }
|
|
1059
1086
|
), M = this.tableOptions.treeOptions.arrowExpandCollapseAll;
|
|
1060
1087
|
if (M) {
|
|
1061
|
-
const
|
|
1062
|
-
this.dom.domService.appendChild(A,
|
|
1088
|
+
const F = this.dom.domService.createText(M.content);
|
|
1089
|
+
this.dom.domService.appendChild(A, F), M.style && this.dom.applyStyleString(A, M.style);
|
|
1063
1090
|
}
|
|
1064
1091
|
}
|
|
1065
1092
|
}
|
|
@@ -1067,13 +1094,13 @@ class he extends ne {
|
|
|
1067
1094
|
break;
|
|
1068
1095
|
}
|
|
1069
1096
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
|
|
1070
|
-
const
|
|
1071
|
-
if (
|
|
1072
|
-
for (const w of
|
|
1097
|
+
const h = ((S = this.colAndRowspanModels[e]) == null ? void 0 : S.getRanges()) ?? [];
|
|
1098
|
+
if (h.length)
|
|
1099
|
+
for (const w of h) {
|
|
1073
1100
|
let C = 0, x = i.child, y = "center";
|
|
1074
1101
|
if (w.c1 < f)
|
|
1075
1102
|
x = s.child, y = "west";
|
|
1076
|
-
else if (
|
|
1103
|
+
else if (c > 0 && w.c1 >= m - c)
|
|
1077
1104
|
x = o.child, y = "east";
|
|
1078
1105
|
else {
|
|
1079
1106
|
const v = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
@@ -1094,24 +1121,24 @@ class he extends ne {
|
|
|
1094
1121
|
* @protected
|
|
1095
1122
|
*/
|
|
1096
1123
|
drawBigCell(e, t, s, i, o, r) {
|
|
1097
|
-
const n = s + this.getRowHeights(0, e.r1 - 1, i).reduce((
|
|
1124
|
+
const n = s + this.getRowHeights(0, e.r1 - 1, i).reduce((S, h) => S + h, 0), l = this.tableModel.getColumnCount(), a = this.tableModel.getFixedRightColumnCount();
|
|
1098
1125
|
let d = 0;
|
|
1099
1126
|
a > 0 && e.c1 >= l - a && (d = l - a);
|
|
1100
|
-
const
|
|
1101
|
-
let
|
|
1127
|
+
const u = t + this.getColumnWidths(d, e.c1 - 1).reduce((S, h) => S + h, 0), g = this.getRowHeights(e.r1, e.r2, i).reduce((S, h) => S + h, 0), m = this.getColumnWidths(e.c1, e.c2).reduce((S, h) => S + h, 0);
|
|
1128
|
+
let c = !1;
|
|
1102
1129
|
const f = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
1103
|
-
f && (
|
|
1130
|
+
f && (c = f.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? (console.info("TODO here", e), this.renderCell({
|
|
1104
1131
|
areaModel: i,
|
|
1105
1132
|
areaIdent: i.areaIdent,
|
|
1106
1133
|
sideIdent: r,
|
|
1107
1134
|
rowIndex: e.r1,
|
|
1108
1135
|
columnIndex: e.c1,
|
|
1109
|
-
left:
|
|
1136
|
+
left: u,
|
|
1110
1137
|
top: n,
|
|
1111
1138
|
width: m,
|
|
1112
1139
|
height: g,
|
|
1113
1140
|
parent: o,
|
|
1114
|
-
cellSelected:
|
|
1141
|
+
cellSelected: c,
|
|
1115
1142
|
lastRowOfModel: !0,
|
|
1116
1143
|
gammaRange: e.gammaRange
|
|
1117
1144
|
})) : this.renderCell({
|
|
@@ -1120,18 +1147,18 @@ class he extends ne {
|
|
|
1120
1147
|
sideIdent: r,
|
|
1121
1148
|
rowIndex: e.r1,
|
|
1122
1149
|
columnIndex: e.c1,
|
|
1123
|
-
left:
|
|
1150
|
+
left: u,
|
|
1124
1151
|
top: n,
|
|
1125
1152
|
width: m,
|
|
1126
1153
|
height: g,
|
|
1127
1154
|
parent: o,
|
|
1128
|
-
cellSelected:
|
|
1155
|
+
cellSelected: c,
|
|
1129
1156
|
lastRowOfModel: !0,
|
|
1130
1157
|
gammaRange: e.gammaRange
|
|
1131
1158
|
}), i.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1132
1159
|
rowIndex: e.r1,
|
|
1133
1160
|
columnIndex: e.c1,
|
|
1134
|
-
cellLeft:
|
|
1161
|
+
cellLeft: u,
|
|
1135
1162
|
cellTop: n,
|
|
1136
1163
|
cellWidth: m,
|
|
1137
1164
|
cellHeight: g,
|
|
@@ -1163,35 +1190,35 @@ class he extends ne {
|
|
|
1163
1190
|
}) {
|
|
1164
1191
|
var f;
|
|
1165
1192
|
this.scrollViewportLeft = this.scrollViewport.scrollLeft;
|
|
1166
|
-
let
|
|
1193
|
+
let u = 0;
|
|
1167
1194
|
if (!a) {
|
|
1168
|
-
const
|
|
1169
|
-
|
|
1195
|
+
const S = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1196
|
+
u = this.scrollFactorX * S;
|
|
1170
1197
|
}
|
|
1171
1198
|
const g = 0, m = !!(e === "body" && t);
|
|
1172
|
-
let
|
|
1173
|
-
for (let
|
|
1174
|
-
const
|
|
1175
|
-
if (w > 0 &&
|
|
1199
|
+
let c = u;
|
|
1200
|
+
for (let S = n; S <= l; S++) {
|
|
1201
|
+
const h = c, w = this.tableModel.getColumnWidth(S);
|
|
1202
|
+
if (w > 0 && h + w > 0) {
|
|
1176
1203
|
let C = i.height;
|
|
1177
|
-
const x = s.getRowspanAt(r,
|
|
1204
|
+
const x = s.getRowspanAt(r, S), y = s.getColspanAt(r, S);
|
|
1178
1205
|
x > 1 && (C = this.getRowHeights(r, r + x - 1, s).reduce((A, M) => A + M, 0));
|
|
1179
1206
|
let v = w;
|
|
1180
|
-
y > 1 && (v = this.getColumnWidths(
|
|
1207
|
+
y > 1 && (v = this.getColumnWidths(S, S + y - 1).reduce((A, M) => A + M, 0));
|
|
1181
1208
|
let E = !1;
|
|
1182
|
-
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (f = this.colAndRowspanModels[e]) != null && f.isInRange(r,
|
|
1183
|
-
this.renderDragTargetDiv(o,
|
|
1184
|
-
const A = { left:
|
|
1209
|
+
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (f = this.colAndRowspanModels[e]) != null && f.isInRange(r, S) && (E = !0), this.draggingTargetColumnIndex === S && e !== "header") {
|
|
1210
|
+
this.renderDragTargetDiv(o, h, g, v, C);
|
|
1211
|
+
const A = { left: h, top: g, width: v, height: C };
|
|
1185
1212
|
this.dom.addColumnBorderDivs(this.tableOptions, o, A, e, t);
|
|
1186
1213
|
} else {
|
|
1187
|
-
const A = this.renderSelectedBackgroundDiv(E, m, t, s, r,
|
|
1214
|
+
const A = this.renderSelectedBackgroundDiv(E, m, t, s, r, S, o, h, g, v, C);
|
|
1188
1215
|
E || this.renderCell({
|
|
1189
1216
|
areaModel: s,
|
|
1190
1217
|
areaIdent: e,
|
|
1191
1218
|
sideIdent: t,
|
|
1192
1219
|
rowIndex: r,
|
|
1193
|
-
columnIndex:
|
|
1194
|
-
left:
|
|
1220
|
+
columnIndex: S,
|
|
1221
|
+
left: h,
|
|
1195
1222
|
top: g,
|
|
1196
1223
|
width: v,
|
|
1197
1224
|
height: C,
|
|
@@ -1201,8 +1228,8 @@ class he extends ne {
|
|
|
1201
1228
|
gammaRange: !0
|
|
1202
1229
|
}), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1203
1230
|
rowIndex: r,
|
|
1204
|
-
columnIndex:
|
|
1205
|
-
cellLeft:
|
|
1231
|
+
columnIndex: S,
|
|
1232
|
+
cellLeft: h,
|
|
1206
1233
|
cellTop: g,
|
|
1207
1234
|
cellWidth: v,
|
|
1208
1235
|
cellHeight: C,
|
|
@@ -1210,10 +1237,10 @@ class he extends ne {
|
|
|
1210
1237
|
});
|
|
1211
1238
|
}
|
|
1212
1239
|
}
|
|
1213
|
-
if (
|
|
1240
|
+
if (c = c + w, c > this.areaBodyCenterGeo.width)
|
|
1214
1241
|
break;
|
|
1215
1242
|
}
|
|
1216
|
-
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new T(
|
|
1243
|
+
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new T(c - 1, 1, i.height, 0), o);
|
|
1217
1244
|
}
|
|
1218
1245
|
getTreeArrowColumnIndex() {
|
|
1219
1246
|
return this.tableOptions.showCheckboxWihoutExtraColumn ? 0 : this.tableModel.isRowCheckboxVisible() ? 1 : 0;
|
|
@@ -1229,22 +1256,22 @@ class he extends ne {
|
|
|
1229
1256
|
height: l,
|
|
1230
1257
|
top: a,
|
|
1231
1258
|
parent: d,
|
|
1232
|
-
lastRowOfModel:
|
|
1259
|
+
lastRowOfModel: u,
|
|
1233
1260
|
gammaRange: g
|
|
1234
1261
|
}) {
|
|
1235
|
-
var
|
|
1236
|
-
const
|
|
1237
|
-
let
|
|
1238
|
-
if (o === this.getTreeArrowColumnIndex() &&
|
|
1239
|
-
const b =
|
|
1240
|
-
(
|
|
1262
|
+
var N;
|
|
1263
|
+
const c = this.editorRenderer && this.editorRendererRow === i && this.editorRendererColumn === o ? this.editorRenderer : e.getCellRenderer(i, o), f = { left: r, width: n, height: l, top: a, index: o }, S = e.getRowByIndex(i);
|
|
1264
|
+
let h = "none";
|
|
1265
|
+
if (o === this.getTreeArrowColumnIndex() && $(S)) {
|
|
1266
|
+
const b = S;
|
|
1267
|
+
(N = b.children) != null && N.length ? b.expanded ? h = "expanded" : h = "collapsed" : h = "hidden";
|
|
1241
1268
|
}
|
|
1242
1269
|
let C;
|
|
1243
1270
|
if (t === "header") {
|
|
1244
1271
|
const b = this.tableModel.getColumnDef(o);
|
|
1245
1272
|
(!(b != null && b.sortIconVisible) || b != null && b.sortIconVisible()) && (C = b == null ? void 0 : b.sortState);
|
|
1246
1273
|
}
|
|
1247
|
-
const x = e.getValueAt(i, o), y =
|
|
1274
|
+
const x = e.getValueAt(i, o), y = c ? "" : `${x}`, v = e.isRowChecked(i), E = this.dom.addColumnDiv(
|
|
1248
1275
|
d,
|
|
1249
1276
|
f,
|
|
1250
1277
|
i,
|
|
@@ -1252,7 +1279,7 @@ class he extends ne {
|
|
|
1252
1279
|
t,
|
|
1253
1280
|
s,
|
|
1254
1281
|
y,
|
|
1255
|
-
|
|
1282
|
+
h,
|
|
1256
1283
|
this.tableOptions,
|
|
1257
1284
|
v,
|
|
1258
1285
|
C
|
|
@@ -1260,19 +1287,19 @@ class he extends ne {
|
|
|
1260
1287
|
A && this.dom.setAttribute(E, "title", A);
|
|
1261
1288
|
const M = this.tableModel.getColumnDef(o);
|
|
1262
1289
|
M && M.classes[t] && this.dom.addClasses(M.classes[t], E);
|
|
1263
|
-
let
|
|
1264
|
-
|
|
1265
|
-
const
|
|
1266
|
-
if (
|
|
1290
|
+
let F;
|
|
1291
|
+
c && (F = c.render(E, i, o, t, e, x, this.dom.domService));
|
|
1292
|
+
const _ = e.getCustomClassesAt(i, o);
|
|
1293
|
+
if (_.length && this.dom.addClasses(_, E), this.dom.addColumnBorderDivs(this.tableOptions, d, f, t, s), u && this.dom.addHorizontalBorder({ left: r, width: n, height: l, top: a + l }, d), this.getFocusModel && t === "body") {
|
|
1267
1294
|
const b = this.getFocusModel();
|
|
1268
1295
|
b != null && b.hasFocus(i, o) && this.dom.addFocusBorderDivs(d, f, {});
|
|
1269
1296
|
}
|
|
1270
1297
|
t === "header" && this.dom.setAttribute(E, "data-ge-action", "drag-column");
|
|
1271
|
-
const
|
|
1272
|
-
if (
|
|
1273
|
-
for (const b in
|
|
1274
|
-
this.dom.setStyle(E, b,
|
|
1275
|
-
return [E,
|
|
1298
|
+
const O = e.getCustomStyleAt(i, o);
|
|
1299
|
+
if (O)
|
|
1300
|
+
for (const b in O)
|
|
1301
|
+
this.dom.setStyle(E, b, O[b]);
|
|
1302
|
+
return [E, F];
|
|
1276
1303
|
}
|
|
1277
1304
|
applyCssClasses(e, t = {}) {
|
|
1278
1305
|
e && Object.entries(t).forEach(([s, i]) => {
|
|
@@ -1283,19 +1310,19 @@ class he extends ne {
|
|
|
1283
1310
|
const r = this.tableModel.getAreaModel(e), n = 'div[data-col-index="' + s + '"][data-row-index="' + t + '"][data-area="' + e + '"]', l = document.querySelector(n);
|
|
1284
1311
|
if (l) {
|
|
1285
1312
|
let a;
|
|
1286
|
-
const
|
|
1287
|
-
if (l.innerText = "", this.applyCssClasses(l, o),
|
|
1288
|
-
a =
|
|
1313
|
+
const u = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === s ? this.editorRenderer : r.getCellRenderer(t, s);
|
|
1314
|
+
if (l.innerText = "", this.applyCssClasses(l, o), u)
|
|
1315
|
+
a = u.render(l, t, s, e, r, i, this.dom.domService), a && this.cleanupFunctions[e].push(a);
|
|
1289
1316
|
else {
|
|
1290
|
-
const
|
|
1291
|
-
this.dom.addLabelDiv(l,
|
|
1317
|
+
const c = `${i}`;
|
|
1318
|
+
this.dom.addLabelDiv(l, c, !1, t, s, e);
|
|
1292
1319
|
}
|
|
1293
1320
|
const g = r.getCustomClassesAt(t, s);
|
|
1294
1321
|
g.length && this.dom.addClasses(g, l);
|
|
1295
1322
|
const m = r.getCustomStyleAt(t, s);
|
|
1296
1323
|
if (m)
|
|
1297
|
-
for (const
|
|
1298
|
-
this.dom.setStyle(l,
|
|
1324
|
+
for (const c in m)
|
|
1325
|
+
this.dom.setStyle(l, c, m[c]);
|
|
1299
1326
|
}
|
|
1300
1327
|
}
|
|
1301
1328
|
getColumnWidths(e, t) {
|
|
@@ -1355,19 +1382,19 @@ class he extends ne {
|
|
|
1355
1382
|
);
|
|
1356
1383
|
return this.dom.setStyle(r, "left", `${t}px`), this.dom.setStyle(r, "top", `${s}px`), this.dom.setStyle(r, "width", `${i}px`), this.dom.setStyle(r, "height", `${o}px`), r;
|
|
1357
1384
|
}
|
|
1358
|
-
renderSelectedBackgroundDiv(e, t, s, i, o, r, n, l, a, d,
|
|
1385
|
+
renderSelectedBackgroundDiv(e, t, s, i, o, r, n, l, a, d, u) {
|
|
1359
1386
|
let g = !1;
|
|
1360
1387
|
if (!e && t && i.isSelectable(o, r) && this.getSelectionModel) {
|
|
1361
1388
|
const m = this.getSelectionModel();
|
|
1362
1389
|
if (m) {
|
|
1363
|
-
const
|
|
1364
|
-
g =
|
|
1365
|
-
for (let f = 0; f <
|
|
1366
|
-
const
|
|
1390
|
+
const c = m.getSelectionCount(o, r);
|
|
1391
|
+
g = c > 0;
|
|
1392
|
+
for (let f = 0; f < c; f++) {
|
|
1393
|
+
const S = this.dom.applyStylePosistionAbsolute(
|
|
1367
1394
|
// ge-table-body-west-selected-range
|
|
1368
1395
|
this.dom.createDivWithClass(`ge-table-${i.areaIdent}-${s}-selected-range`, n)
|
|
1369
1396
|
);
|
|
1370
|
-
this.dom.setStyle(
|
|
1397
|
+
this.dom.setStyle(S, "left", `${l}px`), this.dom.setStyle(S, "top", `${a}px`), this.dom.setStyle(S, "width", `${d}px`), this.dom.setStyle(S, "height", `${u}px`);
|
|
1371
1398
|
}
|
|
1372
1399
|
}
|
|
1373
1400
|
}
|
|
@@ -1384,11 +1411,11 @@ class he extends ne {
|
|
|
1384
1411
|
width: l,
|
|
1385
1412
|
height: a,
|
|
1386
1413
|
parent: d,
|
|
1387
|
-
cellSelected:
|
|
1414
|
+
cellSelected: u,
|
|
1388
1415
|
lastRowOfModel: g,
|
|
1389
1416
|
gammaRange: m
|
|
1390
1417
|
}) {
|
|
1391
|
-
const [
|
|
1418
|
+
const [c, f] = this.addAndRenderCellDiv({
|
|
1392
1419
|
areaModel: e,
|
|
1393
1420
|
areaIdent: t,
|
|
1394
1421
|
sideIdent: s,
|
|
@@ -1402,19 +1429,19 @@ class he extends ne {
|
|
|
1402
1429
|
lastRowOfModel: g,
|
|
1403
1430
|
gammaRange: m
|
|
1404
1431
|
});
|
|
1405
|
-
|
|
1432
|
+
u && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, c), f && this.cleanupFunctions[t].push(f);
|
|
1406
1433
|
}
|
|
1407
1434
|
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: i, cellWidth: o, cellHeight: r, parent: n }) {
|
|
1408
1435
|
const l = this.dom.domService, a = this.tableOptions.columnResizeHandleWidthInPx ?? 2, d = l.createElement("div");
|
|
1409
1436
|
l.setAttribute(d, "data-col-index", `${t}`), l.setAttribute(d, "data-row-index", `${e}`), l.setAttribute(d, "data-area", "header"), l.setAttribute(d, "data-ge-action", "resize-column"), l.addClass(d, "ge-table-column-resize-handle"), l.setStyle(d, "display", "clip"), l.setStyle(d, "position", "absolute"), l.setStyle(d, "cursor", "col-resize"), l.setStyle(d, "left", `${s + o - a}px`), l.setStyle(d, "top", `${i}px`), l.setStyle(d, "width", `${a}px`), l.setStyle(d, "height", `${r}px`), l.appendChild(n, d);
|
|
1410
1437
|
}
|
|
1411
1438
|
}
|
|
1412
|
-
class
|
|
1439
|
+
class pe {
|
|
1413
1440
|
constructor(e, t) {
|
|
1414
1441
|
this.columnIndex = e, this.sortState = t;
|
|
1415
1442
|
}
|
|
1416
1443
|
}
|
|
1417
|
-
class
|
|
1444
|
+
class ue {
|
|
1418
1445
|
constructor(e) {
|
|
1419
1446
|
this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
|
|
1420
1447
|
}
|
|
@@ -1430,36 +1457,36 @@ class pe {
|
|
|
1430
1457
|
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
|
|
1431
1458
|
const t = e.target, s = t.getAttribute("data-area"), i = t.getAttribute("data-row-index"), o = t.getAttribute("data-col-index");
|
|
1432
1459
|
if (s && i && o) {
|
|
1433
|
-
const r =
|
|
1460
|
+
const r = P(s), n = Number(i), l = Number(o);
|
|
1434
1461
|
this.tableScope.updateModelValueAfterEdit(r, n, l, t.value);
|
|
1435
1462
|
}
|
|
1436
1463
|
}
|
|
1437
1464
|
}
|
|
1438
1465
|
}
|
|
1439
|
-
class
|
|
1466
|
+
class Se {
|
|
1440
1467
|
constructor(e = -1, t = -1) {
|
|
1441
1468
|
this.rowIndex = e, this.columnIndex = t;
|
|
1442
1469
|
}
|
|
1443
1470
|
}
|
|
1444
|
-
class
|
|
1471
|
+
class G {
|
|
1445
1472
|
constructor(e) {
|
|
1446
1473
|
this.cells = e;
|
|
1447
1474
|
}
|
|
1448
1475
|
static createSingle(e, t) {
|
|
1449
|
-
return new
|
|
1476
|
+
return new G([new Se(e, t)]);
|
|
1450
1477
|
}
|
|
1451
1478
|
}
|
|
1452
|
-
class
|
|
1479
|
+
class ge {
|
|
1453
1480
|
constructor(e) {
|
|
1454
1481
|
var t, s;
|
|
1455
1482
|
this.tableScope = e, (t = this.tableScope.tableOptions) != null && t.getSelectionModel && (this.getSelectionModel = this.tableScope.tableOptions.getSelectionModel), (s = this.tableScope.tableOptions) != null && s.getFocusModel && (this.getFocusModel = this.tableScope.tableOptions.getFocusModel);
|
|
1456
1483
|
}
|
|
1457
1484
|
onMouseClicked(e, t) {
|
|
1458
|
-
var o, r, n, l, a, d,
|
|
1485
|
+
var o, r, n, l, a, d, u;
|
|
1459
1486
|
let s = !1, i = !1;
|
|
1460
1487
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
1461
1488
|
const g = this.getSelectionModel(), m = this.getFocusModel();
|
|
1462
|
-
g && m && (m.hasFocus(e.rowIndex, e.columnIndex) || (m.setFocus(e.rowIndex, e.columnIndex), s = !0), (o = e.originalEvent) != null && o.shiftKey || g.hasSelection() && (g.clear(), s = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (g.addSelection(this.createRangeByEvents(e, this.previousEvt)), i = !0, s = !0) : (n = e.originalEvent) != null && n.ctrlKey || (l = e.originalEvent) != null && l.metaKey ? (g.addSelection(R.singleCell(e.rowIndex, e.columnIndex)), i = !0, s = !0) : (a = e.originalEvent) != null && a.altKey && ((d = e.originalEvent) != null && d.ctrlKey || (
|
|
1489
|
+
g && m && (m.hasFocus(e.rowIndex, e.columnIndex) || (m.setFocus(e.rowIndex, e.columnIndex), s = !0), (o = e.originalEvent) != null && o.shiftKey || g.hasSelection() && (g.clear(), s = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (g.addSelection(this.createRangeByEvents(e, this.previousEvt)), i = !0, s = !0) : (n = e.originalEvent) != null && n.ctrlKey || (l = e.originalEvent) != null && l.metaKey ? (g.addSelection(R.singleCell(e.rowIndex, e.columnIndex)), i = !0, s = !0) : (a = e.originalEvent) != null && a.altKey && ((d = e.originalEvent) != null && d.ctrlKey || (u = e.originalEvent) != null && u.metaKey) && (g.removeSelection(R.singleCell(e.rowIndex, e.columnIndex)), i = !0, s = !0));
|
|
1463
1490
|
}
|
|
1464
1491
|
return i ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), s;
|
|
1465
1492
|
}
|
|
@@ -1490,7 +1517,7 @@ class Se {
|
|
|
1490
1517
|
});
|
|
1491
1518
|
}
|
|
1492
1519
|
}
|
|
1493
|
-
class
|
|
1520
|
+
class me {
|
|
1494
1521
|
get() {
|
|
1495
1522
|
return {
|
|
1496
1523
|
f2: "START_EDITING",
|
|
@@ -1508,7 +1535,7 @@ class ge {
|
|
|
1508
1535
|
};
|
|
1509
1536
|
}
|
|
1510
1537
|
}
|
|
1511
|
-
class
|
|
1538
|
+
class fe {
|
|
1512
1539
|
get() {
|
|
1513
1540
|
return {
|
|
1514
1541
|
f2: "START_EDITING",
|
|
@@ -1528,7 +1555,7 @@ class me {
|
|
|
1528
1555
|
};
|
|
1529
1556
|
}
|
|
1530
1557
|
}
|
|
1531
|
-
class
|
|
1558
|
+
class be {
|
|
1532
1559
|
constructor(e) {
|
|
1533
1560
|
this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
|
|
1534
1561
|
}
|
|
@@ -1536,7 +1563,7 @@ class fe {
|
|
|
1536
1563
|
this.listener.includes(e) || this.listener.push(e);
|
|
1537
1564
|
}
|
|
1538
1565
|
init() {
|
|
1539
|
-
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new
|
|
1566
|
+
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new fe().get()) : Object.assign(this.shortcutActionIdMapping, new me().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));
|
|
1540
1567
|
}
|
|
1541
1568
|
isMacintosh() {
|
|
1542
1569
|
return navigator.platform.indexOf("Mac") > -1;
|
|
@@ -1580,7 +1607,7 @@ class fe {
|
|
|
1580
1607
|
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();
|
|
1581
1608
|
}
|
|
1582
1609
|
}
|
|
1583
|
-
class
|
|
1610
|
+
class j {
|
|
1584
1611
|
onCheckboxChanged(e) {
|
|
1585
1612
|
}
|
|
1586
1613
|
onContextmenu(e) {
|
|
@@ -1596,7 +1623,7 @@ class N {
|
|
|
1596
1623
|
onMouseMoved(e) {
|
|
1597
1624
|
}
|
|
1598
1625
|
}
|
|
1599
|
-
class
|
|
1626
|
+
class Y {
|
|
1600
1627
|
setStyle(e, t, s) {
|
|
1601
1628
|
return e.style[t] = s, e;
|
|
1602
1629
|
}
|
|
@@ -1623,7 +1650,7 @@ class K {
|
|
|
1623
1650
|
e.setAttribute(t, s);
|
|
1624
1651
|
}
|
|
1625
1652
|
}
|
|
1626
|
-
class
|
|
1653
|
+
class ye {
|
|
1627
1654
|
render(e, t, s, i, o, r, n) {
|
|
1628
1655
|
if (o.isEditable(t, s)) {
|
|
1629
1656
|
n.addClass(e, "ge-table-row-input-div");
|
|
@@ -1644,7 +1671,7 @@ class be {
|
|
|
1644
1671
|
}
|
|
1645
1672
|
}
|
|
1646
1673
|
}
|
|
1647
|
-
class
|
|
1674
|
+
class ve {
|
|
1648
1675
|
constructor(e = "none", t = "single") {
|
|
1649
1676
|
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
|
|
1650
1677
|
}
|
|
@@ -1688,7 +1715,7 @@ class ye {
|
|
|
1688
1715
|
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));
|
|
1689
1716
|
}
|
|
1690
1717
|
}
|
|
1691
|
-
class
|
|
1718
|
+
class Ce {
|
|
1692
1719
|
constructor(e = "none") {
|
|
1693
1720
|
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1;
|
|
1694
1721
|
}
|
|
@@ -1711,29 +1738,29 @@ class ve {
|
|
|
1711
1738
|
return [this.rowIndex, this.columnIndex];
|
|
1712
1739
|
}
|
|
1713
1740
|
}
|
|
1714
|
-
const
|
|
1715
|
-
class
|
|
1741
|
+
const xe = new ve(), we = new Ce("cell");
|
|
1742
|
+
class q {
|
|
1716
1743
|
constructor() {
|
|
1717
1744
|
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 = {
|
|
1718
1745
|
header: 34,
|
|
1719
1746
|
body: 34,
|
|
1720
1747
|
footer: 34
|
|
1721
|
-
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new
|
|
1748
|
+
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new z(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new K(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new ye(), this.getSelectionModel = () => xe, this.getFocusModel = () => we;
|
|
1722
1749
|
}
|
|
1723
1750
|
}
|
|
1724
|
-
class
|
|
1751
|
+
class k extends ce {
|
|
1725
1752
|
constructor(e, t, s, i, o) {
|
|
1726
1753
|
var r;
|
|
1727
1754
|
if (super(
|
|
1728
1755
|
e,
|
|
1729
1756
|
t,
|
|
1730
|
-
new
|
|
1757
|
+
new ee(s),
|
|
1731
1758
|
i
|
|
1732
|
-
), this.eventListener = o, this.selectionService = new
|
|
1759
|
+
), this.eventListener = o, this.licenseManager = D.getInstance(), this.selectionService = new ge(this), this.api = new ie(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, o || (this.eventListener = new j()), (r = this.tableOptions) != null && r.autoRestoreOptions) {
|
|
1733
1760
|
const n = this.tableOptions.autoRestoreOptions, l = n.getStorageKeyFn;
|
|
1734
|
-
l && (n.autoRestoreScrollPosition && (this.storeScrollPosStateService = new
|
|
1761
|
+
l && (n.autoRestoreScrollPosition && (this.storeScrollPosStateService = new oe(l)), n.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new re(l)), n.autoRestoreSortingState && (this.storeSortingService = new ne(l)));
|
|
1735
1762
|
}
|
|
1736
|
-
this.mouseHandler = new
|
|
1763
|
+
this.mouseHandler = new se(this), this.inputHandler = new ue(this), this.shortcutService = new be(this), this.shortcutService.addListener(this.selectionService);
|
|
1737
1764
|
}
|
|
1738
1765
|
/**
|
|
1739
1766
|
* Creates a TableScope instance.
|
|
@@ -1746,8 +1773,8 @@ class _ extends he {
|
|
|
1746
1773
|
*
|
|
1747
1774
|
* @return {TableScope} - The newly created TableScope instance.
|
|
1748
1775
|
*/
|
|
1749
|
-
static create(e, t, s = new
|
|
1750
|
-
return new
|
|
1776
|
+
static create(e, t, s = new q(), i = new j(), o = new Y()) {
|
|
1777
|
+
return new k(
|
|
1751
1778
|
e,
|
|
1752
1779
|
t,
|
|
1753
1780
|
o,
|
|
@@ -1769,7 +1796,7 @@ class _ extends he {
|
|
|
1769
1796
|
return !1;
|
|
1770
1797
|
}
|
|
1771
1798
|
updateModelValueAfterEdit(e, t, s, i) {
|
|
1772
|
-
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, i) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(
|
|
1799
|
+
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, i) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(G.createSingle(t, s)), this.hostElement.focus());
|
|
1773
1800
|
}
|
|
1774
1801
|
/**
|
|
1775
1802
|
* Retrieves the TableApi object.
|
|
@@ -1798,7 +1825,7 @@ class _ extends he {
|
|
|
1798
1825
|
* @return {GeMouseEvent} - The created GeMouseEvent object.
|
|
1799
1826
|
*/
|
|
1800
1827
|
createGeMouseEvent(e) {
|
|
1801
|
-
const t = new
|
|
1828
|
+
const t = new H();
|
|
1802
1829
|
if (t.originalEvent = e, e) {
|
|
1803
1830
|
const s = e.target;
|
|
1804
1831
|
if ([t.areaIdent, t.sideIdent] = this.getAreaAndSideIdentByAttr(s), t.rowIndex = this.getNumberByAttr(s, "data-row-index"), t.columnIndex = this.getNumberByAttr(s, "data-col-index"), t.action = this.getStringByAttr(s, "data-ge-action"), t.areaIdent) {
|
|
@@ -1867,7 +1894,7 @@ class _ extends he {
|
|
|
1867
1894
|
toggleExpandCollapseAll(e = !0) {
|
|
1868
1895
|
var s;
|
|
1869
1896
|
const t = this.tableModel.getBodyModel();
|
|
1870
|
-
|
|
1897
|
+
B(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (s = this.storeStateCollapsedExpandService) == null || s.collapsedStateAll(e));
|
|
1871
1898
|
}
|
|
1872
1899
|
/**
|
|
1873
1900
|
* Toggles the checkbox state of a specific row in a table.
|
|
@@ -1924,7 +1951,7 @@ class _ extends he {
|
|
|
1924
1951
|
const i = this.tableModel.getColumnDef(s);
|
|
1925
1952
|
if (i != null && i.sortable && i.sortable()) {
|
|
1926
1953
|
e.preventDefault(), e.stopPropagation();
|
|
1927
|
-
const n = i.sortStatesOrder ? i.sortStatesOrder : this.tableOptions.sortOrder, l = i.sortState ?? "", a = n[(n.indexOf(l) + 1) % n.length], d = new
|
|
1954
|
+
const n = i.sortStatesOrder ? i.sortStatesOrder : this.tableOptions.sortOrder, l = i.sortState ?? "", a = n[(n.indexOf(l) + 1) % n.length], d = new pe(s, a);
|
|
1928
1955
|
this.tableModel.doSort([d]) && ((o = this.tableModel.getColumnDefs()) == null || o.forEach((g) => g.sortState = ""), i.sortState = a), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([d]);
|
|
1929
1956
|
}
|
|
1930
1957
|
}
|
|
@@ -2014,7 +2041,7 @@ class _ extends he {
|
|
|
2014
2041
|
const s = this.tableOptions.autoRestoreOptions, i = s.getRowId;
|
|
2015
2042
|
if (s.autoRestoreCollapsedExpandedState && i) {
|
|
2016
2043
|
const o = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), r = this.tableModel.getAreaModel("body");
|
|
2017
|
-
if (
|
|
2044
|
+
if (B(r)) {
|
|
2018
2045
|
const n = r, l = r.getRowCount();
|
|
2019
2046
|
for (let a = 0; a < l; a++) {
|
|
2020
2047
|
const d = r.getRowByIndex(a);
|
|
@@ -2024,8 +2051,8 @@ class _ extends he {
|
|
|
2024
2051
|
else if (o.allCollapsed)
|
|
2025
2052
|
d.expanded = !1;
|
|
2026
2053
|
else {
|
|
2027
|
-
const
|
|
2028
|
-
o.mode === "expanded" ? d.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(
|
|
2054
|
+
const u = i(d.data);
|
|
2055
|
+
o.mode === "expanded" ? d.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(u) : o.mode === "collapsed" && (d.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(u));
|
|
2029
2056
|
}
|
|
2030
2057
|
}
|
|
2031
2058
|
n.recalcVisibleTreeRows();
|
|
@@ -2033,10 +2060,32 @@ class _ extends he {
|
|
|
2033
2060
|
}
|
|
2034
2061
|
}
|
|
2035
2062
|
}
|
|
2063
|
+
/**
|
|
2064
|
+
* Scrolls the viewport to the specified pixel coordinates.
|
|
2065
|
+
*
|
|
2066
|
+
* @param {number} px - The horizontal pixel coordinate to scroll to.
|
|
2067
|
+
* @param {number} py - The vertical pixel coordinate to scroll to.
|
|
2068
|
+
*
|
|
2069
|
+
* @return {void}
|
|
2070
|
+
*/
|
|
2071
|
+
scrollToPixel(e, t) {
|
|
2072
|
+
this.scrollViewport.scrollTo(e, t);
|
|
2073
|
+
}
|
|
2074
|
+
/**
|
|
2075
|
+
* Scrolls to the specified index in the table.
|
|
2076
|
+
*
|
|
2077
|
+
* @param {number} _indexX - The horizontal index of the table where scrolling is needed.
|
|
2078
|
+
* @param {number} indexY - The vertical index of the table where scrolling is needed.
|
|
2079
|
+
* @return {void}
|
|
2080
|
+
*/
|
|
2081
|
+
scrollToIndex(e, t) {
|
|
2082
|
+
const i = this.tableModel.getAreaModel("body").getYPosByRowIndex(t);
|
|
2083
|
+
this.scrollToPixel(0, i);
|
|
2084
|
+
}
|
|
2036
2085
|
}
|
|
2037
|
-
function
|
|
2086
|
+
function Me({
|
|
2038
2087
|
tableModel: p,
|
|
2039
|
-
tableOptions: e = new
|
|
2088
|
+
tableOptions: e = new q(),
|
|
2040
2089
|
mouseMoved: t,
|
|
2041
2090
|
checkboxChanged: s,
|
|
2042
2091
|
contextmenu: i,
|
|
@@ -2044,49 +2093,50 @@ function Re({
|
|
|
2044
2093
|
mouseClicked: r,
|
|
2045
2094
|
mouseDragging: n,
|
|
2046
2095
|
mouseDraggingEnd: l,
|
|
2047
|
-
tableReady: a
|
|
2096
|
+
tableReady: a,
|
|
2097
|
+
licenseKey: d
|
|
2048
2098
|
}) {
|
|
2049
|
-
const
|
|
2050
|
-
let
|
|
2051
|
-
|
|
2052
|
-
|
|
2099
|
+
const u = J(null);
|
|
2100
|
+
let g = !1;
|
|
2101
|
+
Q(() => {
|
|
2102
|
+
u.current && !g && (m(u.current), g = !0);
|
|
2053
2103
|
});
|
|
2054
|
-
const
|
|
2055
|
-
const
|
|
2056
|
-
onCheckboxChanged: (
|
|
2057
|
-
s && s(
|
|
2104
|
+
const m = (c) => {
|
|
2105
|
+
const f = {
|
|
2106
|
+
onCheckboxChanged: (h) => {
|
|
2107
|
+
s && s(h);
|
|
2058
2108
|
},
|
|
2059
|
-
onContextmenu: (
|
|
2060
|
-
i && i(
|
|
2109
|
+
onContextmenu: (h) => {
|
|
2110
|
+
i && i(h);
|
|
2061
2111
|
},
|
|
2062
|
-
onModelChanged: (
|
|
2063
|
-
o && o(
|
|
2112
|
+
onModelChanged: (h) => {
|
|
2113
|
+
o && o(h);
|
|
2064
2114
|
},
|
|
2065
|
-
onMouseClicked: (
|
|
2066
|
-
r && r(
|
|
2115
|
+
onMouseClicked: (h) => {
|
|
2116
|
+
r && r(h);
|
|
2067
2117
|
},
|
|
2068
|
-
onMouseDragging: (
|
|
2069
|
-
n && n(
|
|
2118
|
+
onMouseDragging: (h) => {
|
|
2119
|
+
n && n(h);
|
|
2070
2120
|
},
|
|
2071
|
-
onMouseDraggingEnd: (
|
|
2072
|
-
l && l(
|
|
2121
|
+
onMouseDraggingEnd: (h) => {
|
|
2122
|
+
l && l(h);
|
|
2073
2123
|
},
|
|
2074
|
-
onMouseMoved: (
|
|
2075
|
-
t && t(
|
|
2124
|
+
onMouseMoved: (h) => {
|
|
2125
|
+
t && t(h);
|
|
2076
2126
|
}
|
|
2077
|
-
},
|
|
2078
|
-
|
|
2127
|
+
}, S = new k(
|
|
2128
|
+
c,
|
|
2079
2129
|
p,
|
|
2080
|
-
new
|
|
2130
|
+
new Y(),
|
|
2081
2131
|
e,
|
|
2082
|
-
|
|
2132
|
+
f
|
|
2083
2133
|
);
|
|
2084
|
-
|
|
2134
|
+
S.firstInit(), a && a(S.getApi()), d && D.getInstance().setLicenseKey(d);
|
|
2085
2135
|
};
|
|
2086
|
-
return /* @__PURE__ */
|
|
2136
|
+
return /* @__PURE__ */ U(
|
|
2087
2137
|
"div",
|
|
2088
2138
|
{
|
|
2089
|
-
ref:
|
|
2139
|
+
ref: u,
|
|
2090
2140
|
className: "container-div",
|
|
2091
2141
|
style: {
|
|
2092
2142
|
width: "100%",
|
|
@@ -2098,21 +2148,21 @@ function Re({
|
|
|
2098
2148
|
}
|
|
2099
2149
|
);
|
|
2100
2150
|
}
|
|
2101
|
-
var
|
|
2151
|
+
var W, L = Z;
|
|
2102
2152
|
if (process.env.NODE_ENV === "production")
|
|
2103
|
-
|
|
2153
|
+
W = L.createRoot, L.hydrateRoot;
|
|
2104
2154
|
else {
|
|
2105
|
-
var
|
|
2106
|
-
|
|
2107
|
-
|
|
2155
|
+
var X = L.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
2156
|
+
W = function(p, e) {
|
|
2157
|
+
X.usingClientEntryPoint = !0;
|
|
2108
2158
|
try {
|
|
2109
|
-
return
|
|
2159
|
+
return L.createRoot(p, e);
|
|
2110
2160
|
} finally {
|
|
2111
|
-
|
|
2161
|
+
X.usingClientEntryPoint = !1;
|
|
2112
2162
|
}
|
|
2113
2163
|
};
|
|
2114
2164
|
}
|
|
2115
|
-
class
|
|
2165
|
+
class Te {
|
|
2116
2166
|
constructor(e) {
|
|
2117
2167
|
this.Component = e, console.info(e);
|
|
2118
2168
|
}
|
|
@@ -2124,13 +2174,13 @@ class Me {
|
|
|
2124
2174
|
areaIdent: i,
|
|
2125
2175
|
areaModel: o,
|
|
2126
2176
|
cellValue: r
|
|
2127
|
-
}, a =
|
|
2177
|
+
}, a = W(e, {});
|
|
2128
2178
|
return a.render(this.Component(l)), () => {
|
|
2129
2179
|
a.unmount();
|
|
2130
2180
|
};
|
|
2131
2181
|
}
|
|
2132
2182
|
}
|
|
2133
2183
|
export {
|
|
2134
|
-
|
|
2135
|
-
|
|
2184
|
+
Te as ComponentRendererWrapper,
|
|
2185
|
+
Me as GuiexpertTable
|
|
2136
2186
|
};
|