@guiexpert/vue3-table 3.1.57 → 3.1.59
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 +13 -13
- package/index.js +533 -345
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as ee, ref as te, onMounted as se, createElementBlock as oe, openBlock as ie, createVNode as
|
|
2
|
-
function
|
|
1
|
+
import { defineComponent as ee, ref as te, onMounted as se, createElementBlock as oe, openBlock as ie, createVNode as re, render as U } from "vue";
|
|
2
|
+
function ae(g, e = 500) {
|
|
3
3
|
let t = null;
|
|
4
4
|
return function(...s) {
|
|
5
5
|
t && window.clearTimeout(t), t = window.setTimeout(() => {
|
|
@@ -32,18 +32,18 @@ class k {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function L(g) {
|
|
36
36
|
return g && g.type === "TreeRow";
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function H(g) {
|
|
39
39
|
return g && g.type === "AreaModelTree";
|
|
40
40
|
}
|
|
41
|
-
class
|
|
42
|
-
constructor(e = -1, t = -1, s = -1, o = -1, i,
|
|
43
|
-
this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = o, this.areaIdent = i, this.sideIdent =
|
|
41
|
+
class $ {
|
|
42
|
+
constructor(e = -1, t = -1, s = -1, o = -1, i, r, a, l = 0, n = 0, c = 0, h = "") {
|
|
43
|
+
this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = o, this.areaIdent = i, this.sideIdent = r, this.originalEvent = a, this.clickCount = l, this.draggingX = n, this.draggingY = c, this.action = h;
|
|
44
44
|
}
|
|
45
45
|
clone() {
|
|
46
|
-
return new
|
|
46
|
+
return new $(
|
|
47
47
|
this.rowIndex,
|
|
48
48
|
this.rowTop,
|
|
49
49
|
this.columnIndex,
|
|
@@ -162,83 +162,83 @@ class le {
|
|
|
162
162
|
const s = this.domService.createElement("div");
|
|
163
163
|
return this.addClass(e, s), this.domService.appendChild(t, s), s;
|
|
164
164
|
}
|
|
165
|
-
addRowDiv(e, t, s = -1, o, i,
|
|
166
|
-
const
|
|
165
|
+
addRowDiv(e, t, s = -1, o, i, r = "") {
|
|
166
|
+
const a = t.index ?? -1, l = this.getDivOrCreateDiv(a, e);
|
|
167
167
|
if (this.domService.addClass(l, "ge-table-row-div"), this.domService.addClass(l, `ge-table-row-div-${t.index}`), o === "body" && i === "center") {
|
|
168
168
|
const n = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
169
169
|
this.domService.addClass(l, `ge-table-row-${n}`);
|
|
170
170
|
}
|
|
171
|
-
if (this.domService.setStyle(l, "display", "clip"), this.domService.setStyle(l, "position", "absolute"), this.domService.setStyle(l, "left", `${t.left}px`), this.domService.setStyle(l, "top", `${t.top}px`), this.domService.setStyle(l, "width", `${t.width}px`), this.domService.setStyle(l, "height", `${t.height}px`), this.domService.setAttribute(l, "data-row-index", `${s}`), this.domService.setAttribute(l, "data-area", `${o}`),
|
|
172
|
-
const n = this.domService.createText(
|
|
171
|
+
if (this.domService.setStyle(l, "display", "clip"), this.domService.setStyle(l, "position", "absolute"), this.domService.setStyle(l, "left", `${t.left}px`), this.domService.setStyle(l, "top", `${t.top}px`), this.domService.setStyle(l, "width", `${t.width}px`), this.domService.setStyle(l, "height", `${t.height}px`), this.domService.setAttribute(l, "data-row-index", `${s}`), this.domService.setAttribute(l, "data-area", `${o}`), r) {
|
|
172
|
+
const n = this.domService.createText(r);
|
|
173
173
|
this.domService.appendChild(l, n);
|
|
174
174
|
}
|
|
175
175
|
return this.domService.appendChild(e.child, l), l;
|
|
176
176
|
}
|
|
177
177
|
addColumnDiv(e) {
|
|
178
|
-
const { parent: t, geo: s, rowIndex: o = -1, columnIndex: i = -1, areaIdent:
|
|
179
|
-
this.domService.addClass(b, "ge-table-col-div"), p && this.domService.addClass(b, "ge-with-checkbox"), this.domService.addClass(b, `ge-table-col-div-${s.index}`), this.domService.setAttribute(b, "data-col-index", `${s.index}`), this.domService.setAttribute(b, "data-row-index", `${o}`), this.domService.setAttribute(b, "data-area", `${
|
|
180
|
-
const
|
|
181
|
-
if (
|
|
182
|
-
const
|
|
183
|
-
this.addLabelDiv(b, l,
|
|
178
|
+
const { parent: t, geo: s, rowIndex: o = -1, columnIndex: i = -1, areaIdent: r, sideIdent: a, text: l = "", treeArrow: n, tableOptions: c, checkedType: h = void 0, sortState: d } = e, m = c == null ? void 0 : c.treeOptions, p = c == null ? void 0 : c.showCheckboxWihoutExtraColumn, b = this.domService.createElement("div");
|
|
179
|
+
this.domService.addClass(b, "ge-table-col-div"), p && this.domService.addClass(b, "ge-with-checkbox"), this.domService.addClass(b, `ge-table-col-div-${s.index}`), this.domService.setAttribute(b, "data-col-index", `${s.index}`), this.domService.setAttribute(b, "data-row-index", `${o}`), this.domService.setAttribute(b, "data-area", `${r}`);
|
|
180
|
+
const u = ((s == null ? void 0 : s.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
181
|
+
if (r === "body" && a === "center" && this.domService.addClass(b, `ge-table-column-${u}`), this.domService.setStyle(b, "display", "clip"), this.domService.setStyle(b, "position", "absolute"), this.domService.setStyle(b, "left", `${s.left}px`), this.domService.setStyle(b, "top", `${s.top}px`), this.domService.setStyle(b, "width", `${s.width}px`), this.domService.setStyle(b, "height", `${s.height}px`), n && n !== "none" && (this.domService.addClass(b, "ge-table-col-tree"), this.addArrowDiv(b, n, m, o, i, r)), p && i === 0 && h && this.addCheckboxToDiv(b, h, r, o), l) {
|
|
182
|
+
const f = n !== "none" && i === 0;
|
|
183
|
+
this.addLabelDiv(b, l, f, o, i, r);
|
|
184
184
|
}
|
|
185
185
|
return d && this.addSortedIcon(b, d, c == null ? void 0 : c.sortedOptions, i), this.domService.appendChild(t, b), b;
|
|
186
186
|
}
|
|
187
187
|
addCheckboxToDiv(e, t, s, o) {
|
|
188
|
-
const i = this.domService.createElement("div"),
|
|
188
|
+
const i = this.domService.createElement("div"), r = t === "full" ? "checked" : "";
|
|
189
189
|
return i.innerHTML = `
|
|
190
190
|
<input
|
|
191
191
|
type="checkbox"
|
|
192
192
|
data-area="${s}"
|
|
193
193
|
data-row-index="${o}"
|
|
194
194
|
data-input-type="checkbox"
|
|
195
|
-
${
|
|
195
|
+
${r}
|
|
196
196
|
class="ge-table-row-checkbox"> `, this.domService.setStyle(i, "display", "inline"), this.domService.setStyle(i, "width", "inherit"), this.domService.setAttribute(i, "data-row-index", `${o}`), this.domService.appendChild(e, i), i;
|
|
197
197
|
}
|
|
198
|
-
addLabelDiv(e, t = "", s = !1, o = -1, i = -1,
|
|
199
|
-
const
|
|
200
|
-
if (this.domService.addClass(
|
|
198
|
+
addLabelDiv(e, t = "", s = !1, o = -1, i = -1, r = "body") {
|
|
199
|
+
const a = this.domService.createElement("div");
|
|
200
|
+
if (this.domService.addClass(a, "ge-table-label-div"), this.domService.setStyle(a, "position", "relative"), this.domService.setStyle(a, "background", "transparent"), this.domService.setStyle(a, "width", "100%"), this.domService.setStyle(a, "height", "100%"), this.domService.setAttribute(a, "data-row-index", `${o}`), this.domService.setAttribute(a, "data-col-index", `${i}`), this.domService.setAttribute(a, "data-area", `${r}`), t)
|
|
201
201
|
if (s) {
|
|
202
202
|
const l = this.domService.createText(t);
|
|
203
|
-
this.domService.appendChild(
|
|
203
|
+
this.domService.appendChild(a, l);
|
|
204
204
|
} else {
|
|
205
205
|
const l = this.domService.createElement("div");
|
|
206
|
-
this.domService.appendChild(
|
|
206
|
+
this.domService.appendChild(a, l);
|
|
207
207
|
const n = this.domService.createText(t);
|
|
208
|
-
this.domService.addClass(l, "ge-table-label"), this.domService.appendChild(l, n), this.domService.setAttribute(l, "data-row-index", `${o}`), this.domService.setAttribute(l, "data-col-index", `${i}`), this.domService.setAttribute(l, "data-area", `${
|
|
208
|
+
this.domService.addClass(l, "ge-table-label"), this.domService.appendChild(l, n), this.domService.setAttribute(l, "data-row-index", `${o}`), this.domService.setAttribute(l, "data-col-index", `${i}`), this.domService.setAttribute(l, "data-area", `${r}`);
|
|
209
209
|
}
|
|
210
|
-
return this.domService.appendChild(e,
|
|
210
|
+
return this.domService.appendChild(e, a), a;
|
|
211
211
|
}
|
|
212
212
|
addSortedIcon(e, t = "", s = new q(), o = -1) {
|
|
213
213
|
const i = this.domService.createElement("div");
|
|
214
214
|
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", `${o}`), this.domService.setAttribute(i, "data-area", "header");
|
|
215
|
-
let
|
|
216
|
-
t === "asc" ?
|
|
217
|
-
const
|
|
218
|
-
this.domService.appendChild(i, l),
|
|
219
|
-
for (const n of
|
|
215
|
+
let r;
|
|
216
|
+
t === "asc" ? r = s.iconAsc : t === "desc" ? r = s.iconDesc : r = s.iconPlaceholder;
|
|
217
|
+
const a = r.content, l = this.domService.createText(a);
|
|
218
|
+
this.domService.appendChild(i, l), r.style && this.applyStyleString(i, r.style);
|
|
219
|
+
for (const n of r.classes)
|
|
220
220
|
this.domService.addClass(i, n);
|
|
221
221
|
return this.domService.appendChild(e, i), i;
|
|
222
222
|
}
|
|
223
|
-
addArrowDiv(e, t = "none", s = new Y(), o = -1, i = -1,
|
|
224
|
-
const
|
|
225
|
-
this.domService.addClass(
|
|
223
|
+
addArrowDiv(e, t = "none", s = new Y(), o = -1, i = -1, r = "body") {
|
|
224
|
+
const a = this.domService.createElement("div");
|
|
225
|
+
this.domService.addClass(a, "ge-table-tree-arrow-div"), this.domService.setStyle(a, "display", "inline-block"), this.domService.setStyle(a, "position", ""), this.domService.setStyle(a, "width", "20px"), this.domService.setStyle(a, "background", "transparent"), this.domService.setStyle(a, "cursor", "pointer"), this.domService.setAttribute(a, "data-row-index", `${o}`), this.domService.setAttribute(a, "data-col-index", `${i}`), this.domService.setAttribute(a, "data-area", `${r}`);
|
|
226
226
|
let l;
|
|
227
227
|
t === "expanded" ? l = s.arrowExpanded : t === "collapsed" ? l = s.arrowCollapsed : l = s.arrowPlaceholder;
|
|
228
228
|
const n = l.content, c = this.domService.createText(n);
|
|
229
|
-
this.domService.appendChild(
|
|
229
|
+
this.domService.appendChild(a, c), l.style && this.applyStyleString(a, l.style);
|
|
230
230
|
for (const h of l.classes)
|
|
231
|
-
this.domService.addClass(
|
|
232
|
-
return this.domService.appendChild(e,
|
|
231
|
+
this.domService.addClass(a, h);
|
|
232
|
+
return this.domService.appendChild(e, a), a;
|
|
233
233
|
}
|
|
234
234
|
addColumnBorderDivs(e, t, s, o, i) {
|
|
235
235
|
if (e.verticalBorderVisible) {
|
|
236
|
-
const
|
|
237
|
-
this.addVerticalBorder(s, t,
|
|
236
|
+
const r = `ge-table-${o}-${i}-vertical-border`;
|
|
237
|
+
this.addVerticalBorder(s, t, r);
|
|
238
238
|
}
|
|
239
239
|
if (e.horizontalBorderVisible) {
|
|
240
|
-
const
|
|
241
|
-
this.addHorizontalBorder(s, t,
|
|
240
|
+
const r = `ge-table-${o}-${i}-horizontal-border`;
|
|
241
|
+
this.addHorizontalBorder(s, t, r);
|
|
242
242
|
}
|
|
243
243
|
return t;
|
|
244
244
|
}
|
|
@@ -262,8 +262,8 @@ class le {
|
|
|
262
262
|
applyStyleString(e, t) {
|
|
263
263
|
const s = t.split(";").map((o) => o.trim()).filter((o) => o);
|
|
264
264
|
for (const o of s) {
|
|
265
|
-
const [i,
|
|
266
|
-
this.domService.setStyle(e, i.trim(),
|
|
265
|
+
const [i, r] = o.split(":");
|
|
266
|
+
this.domService.setStyle(e, i.trim(), r.trim());
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
getDivOrCreateDiv(e, t) {
|
|
@@ -321,12 +321,12 @@ class ce {
|
|
|
321
321
|
this.tableScope.toggleHeaderGroup(s), e.preventDefault(), e.stopPropagation();
|
|
322
322
|
else if (s.inputType === "checkbox" && s.areaIdent)
|
|
323
323
|
this.tableScope.toggleRowCheckbox(s.rowIdx, s.colIdx, s.areaIdent), e.preventDefault(), e.stopPropagation();
|
|
324
|
-
else if (
|
|
324
|
+
else if (L(s.row) && s.areaModel) {
|
|
325
325
|
const o = s.colIdx === this.getArrowColumnIndex() && e.altKey, i = s.className.includes("ge-table-tree-arrow-div");
|
|
326
326
|
if (o || i) {
|
|
327
327
|
e.preventDefault(), e.stopPropagation();
|
|
328
|
-
const
|
|
329
|
-
|
|
328
|
+
const r = s.row;
|
|
329
|
+
r.expanded = !r.expanded, "recalcVisibleTreeRows" in s.areaModel && s.areaModel.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(r);
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
if (s.areaIdent === "body" && this.tableScope.tableOptions.getFocusModel) {
|
|
@@ -343,15 +343,15 @@ class ce {
|
|
|
343
343
|
*/
|
|
344
344
|
onHostElementDblClicked(e) {
|
|
345
345
|
if (this.lastClicked = Date.now(), e.target instanceof HTMLElement) {
|
|
346
|
-
const t = e.target, s = t.getAttribute("data-area"), o = V(s), i = Number(t.getAttribute("data-row-index")),
|
|
346
|
+
const t = e.target, s = t.getAttribute("data-area"), o = V(s), i = Number(t.getAttribute("data-row-index")), r = Number(t.getAttribute("data-col-index")), a = this.tableScope.tableModel.getAreaModel(o);
|
|
347
347
|
if (s && o === "header")
|
|
348
|
-
this.tableScope.tableModel.isSortable(
|
|
348
|
+
this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, i, r));
|
|
349
349
|
else if (t.getAttribute("data-row-index")) {
|
|
350
|
-
const l =
|
|
351
|
-
if (s && o === "body" &&
|
|
350
|
+
const l = a.getRowByIndex(i);
|
|
351
|
+
if (s && o === "body" && a.isEditable(i, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(i, r)), L(l) && r === this.getArrowColumnIndex()) {
|
|
352
352
|
e.preventDefault(), e.stopPropagation();
|
|
353
353
|
const n = l;
|
|
354
|
-
n.expanded = !n.expanded, "recalcVisibleTreeRows" in
|
|
354
|
+
n.expanded = !n.expanded, "recalcVisibleTreeRows" in a && a.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(n);
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
357
|
}
|
|
@@ -376,11 +376,11 @@ class ce {
|
|
|
376
376
|
* @returns {void}
|
|
377
377
|
*/
|
|
378
378
|
updateCollapsedExpandedState(e) {
|
|
379
|
-
var s, o, i,
|
|
379
|
+
var s, o, i, r, a;
|
|
380
380
|
const t = (o = (s = this.tableScope.tableOptions) == null ? void 0 : s.autoRestoreOptions) == null ? void 0 : o.getRowId;
|
|
381
381
|
if (t) {
|
|
382
382
|
const l = (i = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : i.collapsedExpandedStateGet().mode, n = l === "collapsed" && !e.expanded || l === "expanded" && e.expanded, c = l === "collapsed" && e.expanded || l === "expanded" && !e.expanded, h = t(e.data);
|
|
383
|
-
n ? (
|
|
383
|
+
n ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(h) : c && ((a = this.tableScope.storeStateCollapsedExpandService) == null || a.collapsedStateIdsRemove(h));
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
getArrowColumnIndex() {
|
|
@@ -417,6 +417,179 @@ class ce {
|
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
419
|
class de {
|
|
420
|
+
constructor(e, t = [], s = -1) {
|
|
421
|
+
this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = s, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((o) => o.rendererMap[e]);
|
|
422
|
+
}
|
|
423
|
+
getTextValueAt(e, t) {
|
|
424
|
+
return "" + this.getValueAt(e, t);
|
|
425
|
+
}
|
|
426
|
+
getTooltipAt(e, t) {
|
|
427
|
+
return "";
|
|
428
|
+
}
|
|
429
|
+
getCellRenderer(e, t) {
|
|
430
|
+
if (t < this.cellRenderers.length)
|
|
431
|
+
return this.cellRenderers[t];
|
|
432
|
+
}
|
|
433
|
+
getColspanAt(e, t) {
|
|
434
|
+
return 0;
|
|
435
|
+
}
|
|
436
|
+
getCustomClassesAt(e, t) {
|
|
437
|
+
return [];
|
|
438
|
+
}
|
|
439
|
+
getCustomStyleAt(e, t) {
|
|
440
|
+
}
|
|
441
|
+
getRowspanAt(e, t) {
|
|
442
|
+
return 0;
|
|
443
|
+
}
|
|
444
|
+
getRowByIndex(e) {
|
|
445
|
+
}
|
|
446
|
+
isRowCheckable(e) {
|
|
447
|
+
return !0;
|
|
448
|
+
}
|
|
449
|
+
isRowChecked(e) {
|
|
450
|
+
var s;
|
|
451
|
+
const t = this.getRowByIndex(e);
|
|
452
|
+
return (s = this.rowSelectionModel) == null ? void 0 : s.isRowChecked(t);
|
|
453
|
+
}
|
|
454
|
+
setRowChecked(e, t) {
|
|
455
|
+
if (this.rowSelectionModel) {
|
|
456
|
+
const s = this.getRowByIndex(e);
|
|
457
|
+
this.rowSelectionModel.checkRow(s, t);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
getMaxColspan() {
|
|
461
|
+
return 31;
|
|
462
|
+
}
|
|
463
|
+
getMaxRowspan() {
|
|
464
|
+
return 31;
|
|
465
|
+
}
|
|
466
|
+
getYPosByRowIndex(e) {
|
|
467
|
+
return this.defaultRowHeight > 0 ? this.defaultRowHeight * e : this.yPositions[e];
|
|
468
|
+
}
|
|
469
|
+
init() {
|
|
470
|
+
!this.yPositions.length && this.getRowCount() !== void 0 && this.defaultRowHeight === -1 && this.calcYPositions();
|
|
471
|
+
}
|
|
472
|
+
isFilterable() {
|
|
473
|
+
return this.areaIdent === "body";
|
|
474
|
+
}
|
|
475
|
+
doSort(e) {
|
|
476
|
+
return !1;
|
|
477
|
+
}
|
|
478
|
+
isEditable(e, t) {
|
|
479
|
+
var o, i;
|
|
480
|
+
const s = (o = this.columnDefs) == null ? void 0 : o[t];
|
|
481
|
+
return ((i = s == null ? void 0 : s.editable) == null ? void 0 : i.call(s)) ?? !1;
|
|
482
|
+
}
|
|
483
|
+
setValue(e, t, s) {
|
|
484
|
+
var a;
|
|
485
|
+
const o = (a = this.columnDefs[t]) == null ? void 0 : a.editInputPipe;
|
|
486
|
+
o && (s = o(s, e, t));
|
|
487
|
+
const i = this.getRowByIndex(e), r = this.columnDefs[t].property;
|
|
488
|
+
return r.includes(".") ? this.setPropertyValue(i, r.split("."), s) : (i[r] = s, !0);
|
|
489
|
+
}
|
|
490
|
+
isSelectable(e, t) {
|
|
491
|
+
return !0;
|
|
492
|
+
}
|
|
493
|
+
changeColumnOrder(e, t) {
|
|
494
|
+
this.arrayMove(this.cellRenderers, e, t);
|
|
495
|
+
}
|
|
496
|
+
setPropertyValue(e, t, s) {
|
|
497
|
+
const o = t.shift();
|
|
498
|
+
if (o) {
|
|
499
|
+
const i = e[o];
|
|
500
|
+
return i && t.length ? this.setPropertyValue(i, t, s) : (e[o] = s, !0);
|
|
501
|
+
}
|
|
502
|
+
return !1;
|
|
503
|
+
}
|
|
504
|
+
arrayMove(e, t, s) {
|
|
505
|
+
const o = e.splice(t, 1)[0];
|
|
506
|
+
return e.splice(s, 0, o), e;
|
|
507
|
+
}
|
|
508
|
+
calcYPositions() {
|
|
509
|
+
const e = this.getRowCount();
|
|
510
|
+
this.yPositions = new Array(e + 1), this.yPositions[0] = 0;
|
|
511
|
+
for (let t = 0; t < e; t++)
|
|
512
|
+
this.yPositions[t + 1] = this.getRowHeight(t) + this.yPositions[t];
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
class he {
|
|
516
|
+
genericSortComparator(e, t, s) {
|
|
517
|
+
if (typeof e == "number" && typeof t == "number")
|
|
518
|
+
return s * (e - t);
|
|
519
|
+
if (typeof e == "string" && typeof t == "string")
|
|
520
|
+
return s * e.localeCompare(t);
|
|
521
|
+
if (typeof e == "boolean" && typeof t == "boolean")
|
|
522
|
+
return s * ((e ? -1 : 1) - (t ? -1 : 1));
|
|
523
|
+
if (e instanceof Date && t instanceof Date)
|
|
524
|
+
return s * (e.getTime() - t.getTime());
|
|
525
|
+
if (e instanceof Array && t instanceof Array) {
|
|
526
|
+
const o = e, i = t;
|
|
527
|
+
if (o.length && i.length)
|
|
528
|
+
return this.genericSortComparator(o[0], i[0], s);
|
|
529
|
+
}
|
|
530
|
+
return s * ("" + e).localeCompare("" + t);
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
class pe extends de {
|
|
534
|
+
constructor(e, t, s, o = []) {
|
|
535
|
+
super(e, o, s), this.areaIdent = e, this.rows = t, this.defaultRowHeight = s, this.columnDefs = o, this.sorterService = new he(), this.filteredRows = [...t], this.properties = o.map((i) => i.property);
|
|
536
|
+
}
|
|
537
|
+
setRows(e) {
|
|
538
|
+
this.rows = e, this.filteredRows = [...e];
|
|
539
|
+
}
|
|
540
|
+
filterRowsByPredict(e) {
|
|
541
|
+
this.rows = this.rows.filter(e), this.filteredRows = this.filteredRows.filter(e);
|
|
542
|
+
}
|
|
543
|
+
getRowCount() {
|
|
544
|
+
var e;
|
|
545
|
+
return ((e = this.filteredRows) == null ? void 0 : e.length) ?? 0;
|
|
546
|
+
}
|
|
547
|
+
getValueAt(e, t) {
|
|
548
|
+
const s = this.properties[t];
|
|
549
|
+
let o = this.filteredRows[e];
|
|
550
|
+
return L(o) && (o = o.data), o ? this.getValueByT(o, s) : "";
|
|
551
|
+
}
|
|
552
|
+
getFilteredRows() {
|
|
553
|
+
return this.filteredRows;
|
|
554
|
+
}
|
|
555
|
+
getAllRows() {
|
|
556
|
+
return this.rows;
|
|
557
|
+
}
|
|
558
|
+
getRowHeight(e) {
|
|
559
|
+
return this.defaultRowHeight;
|
|
560
|
+
}
|
|
561
|
+
getRowByIndex(e) {
|
|
562
|
+
return this.filteredRows[e];
|
|
563
|
+
}
|
|
564
|
+
externalFilterChanged(e) {
|
|
565
|
+
this.filteredRows = this.rows ? this.rows.filter(e) : [];
|
|
566
|
+
}
|
|
567
|
+
doSort(e) {
|
|
568
|
+
for (const t of e) {
|
|
569
|
+
const { columnIndex: s, sortState: o } = t, i = o === "asc" ? 1 : o === "desc" ? -1 : 0, r = this.properties[s];
|
|
570
|
+
this.filteredRows = this.filteredRows.sort(this.genericFlatTableSortComparator(r, i));
|
|
571
|
+
}
|
|
572
|
+
return !0;
|
|
573
|
+
}
|
|
574
|
+
getValueByT(e, t) {
|
|
575
|
+
return t.includes(".") ? this.getPropertyValue(e, t.split(".")) : e[t];
|
|
576
|
+
}
|
|
577
|
+
changeColumnOrder(e, t) {
|
|
578
|
+
this.arrayMove(this.properties, e, t), super.changeColumnOrder(e, t);
|
|
579
|
+
}
|
|
580
|
+
genericFlatTableSortComparator(e, t) {
|
|
581
|
+
const s = this.columnDefs.find((o) => o.property === e);
|
|
582
|
+
return (o, i) => {
|
|
583
|
+
const r = this.getValueByT(o, e), a = this.getValueByT(i, e);
|
|
584
|
+
return s != null && s.sortComparator ? t * s.sortComparator(r, a, o, i, t) : this.sorterService.genericSortComparator(r, a, t);
|
|
585
|
+
};
|
|
586
|
+
}
|
|
587
|
+
getPropertyValue(e, t) {
|
|
588
|
+
const s = t.shift(), o = e[s];
|
|
589
|
+
return o && t.length ? this.getPropertyValue(o, t) : o;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
class ge {
|
|
420
593
|
constructor(e) {
|
|
421
594
|
this.tableScope = e;
|
|
422
595
|
}
|
|
@@ -602,13 +775,13 @@ class de {
|
|
|
602
775
|
*/
|
|
603
776
|
downloadExcel(e = "table.xlsx", t = "") {
|
|
604
777
|
const s = [], o = this.tableScope.tableModel.getColumnCount(), i = ["header", "body", "footer"];
|
|
605
|
-
for (const
|
|
606
|
-
const
|
|
778
|
+
for (const r of i) {
|
|
779
|
+
const a = this.tableScope.tableModel.getAreaModel(r), l = (a == null ? void 0 : a.getRowCount()) ?? 0;
|
|
607
780
|
for (let n = 0; n < l; n++) {
|
|
608
781
|
const c = [];
|
|
609
782
|
s.push(c);
|
|
610
783
|
for (let h = 0; h < o; h++)
|
|
611
|
-
c.push(
|
|
784
|
+
c.push(a.getValueAt(n, h));
|
|
612
785
|
}
|
|
613
786
|
}
|
|
614
787
|
return this.tableScope.excelService.downloadExcel(s, e, t);
|
|
@@ -642,8 +815,18 @@ class de {
|
|
|
642
815
|
getTableModel() {
|
|
643
816
|
return this.tableScope.tableModel;
|
|
644
817
|
}
|
|
818
|
+
getBodyModel() {
|
|
819
|
+
return this.tableScope.tableModel.getBodyModel();
|
|
820
|
+
}
|
|
821
|
+
setRows(e) {
|
|
822
|
+
const t = this.getBodyModel();
|
|
823
|
+
t instanceof pe ? t.setRows(e) : console.warn("setRows<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ", typeof t);
|
|
824
|
+
}
|
|
825
|
+
reSort() {
|
|
826
|
+
this.tableScope.reSort();
|
|
827
|
+
}
|
|
645
828
|
}
|
|
646
|
-
class
|
|
829
|
+
class _ {
|
|
647
830
|
constructor(e) {
|
|
648
831
|
this.getStorageKeyFn = e;
|
|
649
832
|
}
|
|
@@ -660,8 +843,8 @@ class G {
|
|
|
660
843
|
if (o) {
|
|
661
844
|
const i = o + e;
|
|
662
845
|
if ((t + "").includes("Map")) {
|
|
663
|
-
const
|
|
664
|
-
this.persistItem(i,
|
|
846
|
+
const r = this.autoConvertMapToObject(t);
|
|
847
|
+
this.persistItem(i, r);
|
|
665
848
|
} else
|
|
666
849
|
this.persistItem(i, t);
|
|
667
850
|
}
|
|
@@ -710,7 +893,7 @@ class G {
|
|
|
710
893
|
// }
|
|
711
894
|
// }
|
|
712
895
|
}
|
|
713
|
-
class
|
|
896
|
+
class ue extends _ {
|
|
714
897
|
constructor(e) {
|
|
715
898
|
super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
|
|
716
899
|
}
|
|
@@ -732,14 +915,14 @@ class he extends G {
|
|
|
732
915
|
}
|
|
733
916
|
}
|
|
734
917
|
}
|
|
735
|
-
class
|
|
918
|
+
class fe {
|
|
736
919
|
constructor(e = "collapsed", t = [], s = !1, o = !1) {
|
|
737
920
|
this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = o;
|
|
738
921
|
}
|
|
739
922
|
}
|
|
740
|
-
class
|
|
923
|
+
class me extends _ {
|
|
741
924
|
constructor(e) {
|
|
742
|
-
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new
|
|
925
|
+
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new fe(), this.load();
|
|
743
926
|
}
|
|
744
927
|
collapsedExpandedStateGet() {
|
|
745
928
|
return this.collapsedExpandedState;
|
|
@@ -771,7 +954,7 @@ class ge extends G {
|
|
|
771
954
|
this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
|
|
772
955
|
}
|
|
773
956
|
}
|
|
774
|
-
class
|
|
957
|
+
class be extends _ {
|
|
775
958
|
constructor(e) {
|
|
776
959
|
super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
|
|
777
960
|
}
|
|
@@ -792,14 +975,14 @@ class fe extends G {
|
|
|
792
975
|
}
|
|
793
976
|
}
|
|
794
977
|
}
|
|
795
|
-
class
|
|
978
|
+
class T {
|
|
796
979
|
constructor(e = 0, t = 0, s = 0, o = 0, i) {
|
|
797
980
|
this.left = e, this.width = t, this.height = s, this.top = o, this.index = i;
|
|
798
981
|
}
|
|
799
982
|
}
|
|
800
|
-
class
|
|
983
|
+
class Se {
|
|
801
984
|
constructor(e, t, s, o) {
|
|
802
|
-
this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = o, this.scrollTop = 0, this.areaBodyWestGeo = new
|
|
985
|
+
this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = o, this.scrollTop = 0, this.areaBodyWestGeo = new T(), this.areaBodyCenterGeo = new T(), this.areaBodyEastGeo = new T();
|
|
803
986
|
const i = this.hostElement;
|
|
804
987
|
i.innerText = "", this.dom.setAttribute(i, "tabindex", "0"), this.dom.setStyle(
|
|
805
988
|
this.dom.addClass("ge-table", i),
|
|
@@ -1003,7 +1186,7 @@ class E {
|
|
|
1003
1186
|
return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
|
|
1004
1187
|
}
|
|
1005
1188
|
}
|
|
1006
|
-
class
|
|
1189
|
+
class ye {
|
|
1007
1190
|
constructor(e, t) {
|
|
1008
1191
|
this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
|
|
1009
1192
|
}
|
|
@@ -1014,12 +1197,12 @@ class ue {
|
|
|
1014
1197
|
const e = this.areaModel.getRowCount(), t = this.tableModel.getColumnCount();
|
|
1015
1198
|
for (let s = 0; s < e; s++)
|
|
1016
1199
|
for (let o = 0; o < t; o++) {
|
|
1017
|
-
let i = this.areaModel.getColspanAt(s, o),
|
|
1018
|
-
if (i > 1 ||
|
|
1019
|
-
i === 0 && (i = 1),
|
|
1020
|
-
const
|
|
1200
|
+
let i = this.areaModel.getColspanAt(s, o), r = this.areaModel.getRowspanAt(s, o);
|
|
1201
|
+
if (i > 1 || r > 1) {
|
|
1202
|
+
i === 0 && (i = 1), r === 0 && (r = 1);
|
|
1203
|
+
const a = "gammaCells" in this.areaModel;
|
|
1021
1204
|
this.colAndRowspanRanges.push(
|
|
1022
|
-
new E(s, o, s +
|
|
1205
|
+
new E(s, o, s + r - 1, o + i - 1, a)
|
|
1023
1206
|
);
|
|
1024
1207
|
}
|
|
1025
1208
|
}
|
|
@@ -1036,22 +1219,22 @@ class ue {
|
|
|
1036
1219
|
return !1;
|
|
1037
1220
|
}
|
|
1038
1221
|
}
|
|
1039
|
-
class
|
|
1222
|
+
class xe {
|
|
1040
1223
|
constructor(e, t, s) {
|
|
1041
1224
|
this.header = e, this.body = t, this.footer = s;
|
|
1042
1225
|
}
|
|
1043
1226
|
}
|
|
1044
|
-
class
|
|
1227
|
+
class ve extends Se {
|
|
1045
1228
|
constructor(e, t, s, o) {
|
|
1046
|
-
var
|
|
1229
|
+
var r, a;
|
|
1047
1230
|
super(e, t, s, o), this.dragging = !1, this.editing = !1, this.storedColumnWidths = [], this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
|
|
1048
1231
|
header: [],
|
|
1049
1232
|
body: [],
|
|
1050
1233
|
footer: []
|
|
1051
|
-
}, this.tree = !1, this.colAndRowspanModels = new
|
|
1234
|
+
}, this.tree = !1, this.colAndRowspanModels = new xe(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (r = this.tableOptions) != null && r.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (a = this.tableOptions) != null && a.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), H(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
|
|
1052
1235
|
(l) => {
|
|
1053
1236
|
var n;
|
|
1054
|
-
this.colAndRowspanModels[l] = new
|
|
1237
|
+
this.colAndRowspanModels[l] = new ye(t, t.getAreaModel(l)), (n = this.colAndRowspanModels[l]) == null || n.init();
|
|
1055
1238
|
}
|
|
1056
1239
|
);
|
|
1057
1240
|
}
|
|
@@ -1137,19 +1320,19 @@ class Se extends me {
|
|
|
1137
1320
|
for (const t of this.removables)
|
|
1138
1321
|
t.remove();
|
|
1139
1322
|
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(
|
|
1140
|
-
new
|
|
1323
|
+
new T(0, this.hostElement.clientWidth, 1, 0),
|
|
1141
1324
|
this.hostElement,
|
|
1142
1325
|
"ge-table-border"
|
|
1143
1326
|
)), this.tableOptions.tableBottomBorderVisible && this.removables.push(this.dom.addHorizontalBorder(
|
|
1144
|
-
new
|
|
1327
|
+
new T(0, this.hostElement.clientWidth, 1, this.hostElement.clientHeight - 1),
|
|
1145
1328
|
this.hostElement,
|
|
1146
1329
|
"ge-table-border"
|
|
1147
1330
|
)), this.tableModel.getFixedLeftColumnCount() > 0 && this.removables.push(this.dom.addVerticalBorder(
|
|
1148
|
-
new
|
|
1331
|
+
new T(this.areaBodyWest.child.clientWidth, 1, this.hostElement.clientHeight, 0),
|
|
1149
1332
|
this.hostElement,
|
|
1150
1333
|
"ge-table-body-west-vertical-border"
|
|
1151
1334
|
)), ((e = this.tableModel.getAreaModel("header")) == null ? void 0 : e.getRowCount()) > 0 && this.removables.push(this.dom.addHorizontalBorder(
|
|
1152
|
-
new
|
|
1335
|
+
new T(0, this.hostElement.clientWidth, 1, this.areaHeaderCenter.child.clientHeight),
|
|
1153
1336
|
this.hostElement,
|
|
1154
1337
|
"ge-table-body-west-vertical-border"
|
|
1155
1338
|
));
|
|
@@ -1188,23 +1371,23 @@ class Se extends me {
|
|
|
1188
1371
|
* @param {string[]} cssClasses - An array of CSS classes to be applied to the cell.
|
|
1189
1372
|
*/
|
|
1190
1373
|
rerenderCellContent({ area: e, rowIndex: t, columnIndex: s, value: o, cssClasses: i }) {
|
|
1191
|
-
const
|
|
1374
|
+
const r = this.tableModel.getAreaModel(e), a = 'div[data-col-index="' + s + '"][data-row-index="' + t + '"][data-area="' + e + '"]', l = document.querySelector(a);
|
|
1192
1375
|
if (l) {
|
|
1193
1376
|
let n;
|
|
1194
1377
|
const c = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === s;
|
|
1195
1378
|
let h;
|
|
1196
|
-
if (c ? h = this.editorRenderer : h =
|
|
1197
|
-
n = h.render(l, t, s, e,
|
|
1379
|
+
if (c ? h = this.editorRenderer : h = r.getCellRenderer(t, s), l.innerText = "", this.applyCssClasses(l, i), h)
|
|
1380
|
+
n = h.render(l, t, s, e, r, o, this.dom.domService), n && this.cleanupFunctions[e].push(n);
|
|
1198
1381
|
else {
|
|
1199
1382
|
const p = `${o}`;
|
|
1200
1383
|
this.dom.addLabelDiv(l, p, !1, t, s, e);
|
|
1201
1384
|
}
|
|
1202
|
-
const d =
|
|
1385
|
+
const d = r.getCustomClassesAt(t, s);
|
|
1203
1386
|
d.length && this.dom.addClasses(d, l);
|
|
1204
|
-
const
|
|
1205
|
-
if (
|
|
1206
|
-
for (const p in
|
|
1207
|
-
this.dom.setStyle(l, p,
|
|
1387
|
+
const m = r.getCustomStyleAt(t, s);
|
|
1388
|
+
if (m)
|
|
1389
|
+
for (const p in m)
|
|
1390
|
+
this.dom.setStyle(l, p, m[p]);
|
|
1208
1391
|
}
|
|
1209
1392
|
}
|
|
1210
1393
|
/**
|
|
@@ -1302,59 +1485,59 @@ class Se extends me {
|
|
|
1302
1485
|
* @protected
|
|
1303
1486
|
*/
|
|
1304
1487
|
adjustArea(e, t = 0) {
|
|
1305
|
-
var
|
|
1306
|
-
const s = this.getArea(e, "west"), o = this.getArea(e, "center"), i = this.getArea(e, "east"),
|
|
1488
|
+
var u;
|
|
1489
|
+
const s = this.getArea(e, "west"), o = this.getArea(e, "center"), i = this.getArea(e, "east"), r = o.child.clientHeight;
|
|
1307
1490
|
s.child.innerText = "", o.child.innerText = "", i.child.innerText = "";
|
|
1308
|
-
const
|
|
1491
|
+
const a = 0, l = this.areaBodyCenterGeo.width, n = this.tableModel.getPadding(), c = this.tableModel.getAreaModel(e), h = c.getRowCount();
|
|
1309
1492
|
for (; this.cleanupFunctions[e].length; ) {
|
|
1310
|
-
const
|
|
1311
|
-
|
|
1493
|
+
const f = this.cleanupFunctions[e].shift();
|
|
1494
|
+
f && f();
|
|
1312
1495
|
}
|
|
1313
1496
|
let d = t;
|
|
1314
|
-
const
|
|
1315
|
-
for (let
|
|
1316
|
-
const x = d, v =
|
|
1497
|
+
const m = this.tableModel.getColumnCount(), p = this.tableModel.getFixedRightColumnCount(), b = this.tableModel.getFixedLeftColumnCount();
|
|
1498
|
+
for (let f = 0; f < h; f++) {
|
|
1499
|
+
const x = d, v = f === h - 1, w = this.tableModel.getRowHeight(e, f);
|
|
1317
1500
|
if (x + w > 0) {
|
|
1318
|
-
this.firstVisibleRowIndex =
|
|
1319
|
-
let y = { left:
|
|
1320
|
-
const
|
|
1501
|
+
this.firstVisibleRowIndex = f;
|
|
1502
|
+
let y = { left: a, width: l, height: w, top: x, index: f }, S = this.dom.addRowDiv(o, y, f, e, "center");
|
|
1503
|
+
const R = b;
|
|
1321
1504
|
if (this.adjustColumnsToRowParent({
|
|
1322
1505
|
areaIdent: e,
|
|
1323
1506
|
sideIdent: "center",
|
|
1324
1507
|
areaModel: c,
|
|
1325
1508
|
geo: y,
|
|
1326
1509
|
parent: S,
|
|
1327
|
-
rowIndex:
|
|
1328
|
-
columnIndexStart:
|
|
1329
|
-
columnIndexEnd:
|
|
1510
|
+
rowIndex: f,
|
|
1511
|
+
columnIndexStart: R,
|
|
1512
|
+
columnIndexEnd: m - p - 1,
|
|
1330
1513
|
verticalFixed: !1,
|
|
1331
1514
|
lastRowOfModel: v
|
|
1332
|
-
}), n.left > 0 && (y = { left:
|
|
1515
|
+
}), n.left > 0 && (y = { left: a, width: this.areaBodyWestGeo.width, height: w, top: x, index: f }, S = this.dom.addRowDiv(s, y, f, e, "west"), this.adjustColumnsToRowParent({
|
|
1333
1516
|
areaIdent: e,
|
|
1334
1517
|
sideIdent: "west",
|
|
1335
1518
|
areaModel: c,
|
|
1336
1519
|
geo: y,
|
|
1337
1520
|
parent: S,
|
|
1338
|
-
rowIndex:
|
|
1521
|
+
rowIndex: f,
|
|
1339
1522
|
columnIndexStart: 0,
|
|
1340
|
-
columnIndexEnd:
|
|
1523
|
+
columnIndexEnd: R - 1,
|
|
1341
1524
|
verticalFixed: !0,
|
|
1342
1525
|
lastRowOfModel: v
|
|
1343
|
-
})), n.right > 0 && (y = { left:
|
|
1526
|
+
})), n.right > 0 && (y = { left: a, width: this.areaBodyEastGeo.width, height: w, top: x, index: f }, S = this.dom.addRowDiv(i, y, f, e, "east"), this.adjustColumnsToRowParent({
|
|
1344
1527
|
areaIdent: e,
|
|
1345
1528
|
sideIdent: "east",
|
|
1346
1529
|
areaModel: c,
|
|
1347
1530
|
geo: y,
|
|
1348
1531
|
parent: S,
|
|
1349
|
-
rowIndex:
|
|
1350
|
-
columnIndexStart:
|
|
1351
|
-
columnIndexEnd:
|
|
1532
|
+
rowIndex: f,
|
|
1533
|
+
columnIndexStart: m - p,
|
|
1534
|
+
columnIndexEnd: m - 1,
|
|
1352
1535
|
verticalFixed: !0,
|
|
1353
1536
|
lastRowOfModel: v
|
|
1354
|
-
})), e === "header" && this.tree &&
|
|
1537
|
+
})), e === "header" && this.tree && f === h - 1) {
|
|
1355
1538
|
const A = this.dom.applyStyle(
|
|
1356
1539
|
this.dom.setAttribute(
|
|
1357
|
-
this.dom.addDiv(S, new
|
|
1540
|
+
this.dom.addDiv(S, new T(16, 20, 20, 8)),
|
|
1358
1541
|
"data-ge-action",
|
|
1359
1542
|
"toggleExpandCollapseAll"
|
|
1360
1543
|
),
|
|
@@ -1366,17 +1549,17 @@ class Se extends me {
|
|
|
1366
1549
|
}
|
|
1367
1550
|
}
|
|
1368
1551
|
}
|
|
1369
|
-
if (d = d + w, d >
|
|
1552
|
+
if (d = d + w, d > r)
|
|
1370
1553
|
break;
|
|
1371
1554
|
}
|
|
1372
1555
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
|
|
1373
|
-
const
|
|
1374
|
-
if (
|
|
1375
|
-
for (const x of
|
|
1556
|
+
const f = ((u = this.colAndRowspanModels[e]) == null ? void 0 : u.getRanges()) ?? [];
|
|
1557
|
+
if (f.length)
|
|
1558
|
+
for (const x of f) {
|
|
1376
1559
|
let v = 0, w = o.child, y = "center";
|
|
1377
1560
|
if (x.c1 < b)
|
|
1378
1561
|
w = s.child, y = "west";
|
|
1379
|
-
else if (p > 0 && x.c1 >=
|
|
1562
|
+
else if (p > 0 && x.c1 >= m - p)
|
|
1380
1563
|
w = i.child, y = "east";
|
|
1381
1564
|
else {
|
|
1382
1565
|
const S = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
@@ -1396,22 +1579,22 @@ class Se extends me {
|
|
|
1396
1579
|
* @param sideIdent SideIdent (west,center,east)
|
|
1397
1580
|
* @protected
|
|
1398
1581
|
*/
|
|
1399
|
-
drawBigCell(e, t, s, o, i,
|
|
1400
|
-
const
|
|
1582
|
+
drawBigCell(e, t, s, o, i, r) {
|
|
1583
|
+
const a = s + this.getRowHeights(0, e.r1 - 1, o).reduce((u, f) => u + f, 0), l = this.tableModel.getColumnCount(), n = this.tableModel.getFixedRightColumnCount();
|
|
1401
1584
|
let c = 0;
|
|
1402
1585
|
n > 0 && e.c1 >= l - n && (c = l - n);
|
|
1403
|
-
const h = t + this.getColumnWidths(c, e.c1 - 1).reduce((
|
|
1586
|
+
const h = t + this.getColumnWidths(c, e.c1 - 1).reduce((u, f) => u + f, 0), d = this.getRowHeights(e.r1, e.r2, o).reduce((u, f) => u + f, 0), m = this.getColumnWidths(e.c1, e.c2).reduce((u, f) => u + f, 0);
|
|
1404
1587
|
let p = !1;
|
|
1405
1588
|
const b = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
1406
1589
|
b && (p = b.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? this.renderCell({
|
|
1407
1590
|
areaModel: o,
|
|
1408
1591
|
areaIdent: o.areaIdent,
|
|
1409
|
-
sideIdent:
|
|
1592
|
+
sideIdent: r,
|
|
1410
1593
|
rowIndex: e.r1,
|
|
1411
1594
|
columnIndex: e.c1,
|
|
1412
1595
|
left: h,
|
|
1413
|
-
top:
|
|
1414
|
-
width:
|
|
1596
|
+
top: a,
|
|
1597
|
+
width: m,
|
|
1415
1598
|
height: d,
|
|
1416
1599
|
parent: i,
|
|
1417
1600
|
cellSelected: p,
|
|
@@ -1420,12 +1603,12 @@ class Se extends me {
|
|
|
1420
1603
|
}) : this.renderCell({
|
|
1421
1604
|
areaModel: o,
|
|
1422
1605
|
areaIdent: o.areaIdent,
|
|
1423
|
-
sideIdent:
|
|
1606
|
+
sideIdent: r,
|
|
1424
1607
|
rowIndex: e.r1,
|
|
1425
1608
|
columnIndex: e.c1,
|
|
1426
1609
|
left: h,
|
|
1427
|
-
top:
|
|
1428
|
-
width:
|
|
1610
|
+
top: a,
|
|
1611
|
+
width: m,
|
|
1429
1612
|
height: d,
|
|
1430
1613
|
parent: i,
|
|
1431
1614
|
cellSelected: p,
|
|
@@ -1435,8 +1618,8 @@ class Se extends me {
|
|
|
1435
1618
|
rowIndex: e.r1,
|
|
1436
1619
|
columnIndex: e.c1,
|
|
1437
1620
|
cellLeft: h,
|
|
1438
|
-
cellTop:
|
|
1439
|
-
cellWidth:
|
|
1621
|
+
cellTop: a,
|
|
1622
|
+
cellWidth: m,
|
|
1440
1623
|
cellHeight: d,
|
|
1441
1624
|
parent: i
|
|
1442
1625
|
});
|
|
@@ -1453,8 +1636,8 @@ class Se extends me {
|
|
|
1453
1636
|
findRowOfImportantRowspanCell(e, t, s) {
|
|
1454
1637
|
const o = e.getMaxRowspan();
|
|
1455
1638
|
for (let i = t - 1; i > -1; i--) {
|
|
1456
|
-
const
|
|
1457
|
-
if (
|
|
1639
|
+
const r = e.getRowspanAt(i, s);
|
|
1640
|
+
if (r > 1 && i + r + 1 >= t)
|
|
1458
1641
|
return i;
|
|
1459
1642
|
if (t - i > o)
|
|
1460
1643
|
return -1;
|
|
@@ -1474,8 +1657,8 @@ class Se extends me {
|
|
|
1474
1657
|
areaModel: s,
|
|
1475
1658
|
geo: o,
|
|
1476
1659
|
parent: i,
|
|
1477
|
-
rowIndex:
|
|
1478
|
-
columnIndexStart:
|
|
1660
|
+
rowIndex: r,
|
|
1661
|
+
columnIndexStart: a,
|
|
1479
1662
|
columnIndexEnd: l,
|
|
1480
1663
|
verticalFixed: n = !1,
|
|
1481
1664
|
lastRowOfModel: c = !1
|
|
@@ -1484,33 +1667,33 @@ class Se extends me {
|
|
|
1484
1667
|
this.scrollViewportLeft = this.scrollViewport.scrollLeft;
|
|
1485
1668
|
let h = 0;
|
|
1486
1669
|
if (!n) {
|
|
1487
|
-
const
|
|
1488
|
-
h = this.scrollFactorX *
|
|
1670
|
+
const u = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1671
|
+
h = this.scrollFactorX * u;
|
|
1489
1672
|
}
|
|
1490
|
-
const d = 0,
|
|
1673
|
+
const d = 0, m = !!(e === "body" && t);
|
|
1491
1674
|
let p = h;
|
|
1492
|
-
for (let
|
|
1493
|
-
const
|
|
1494
|
-
if (x > 0 &&
|
|
1675
|
+
for (let u = a; u <= l; u++) {
|
|
1676
|
+
const f = p, x = this.tableModel.getColumnWidth(u);
|
|
1677
|
+
if (x > 0 && f + x > 0) {
|
|
1495
1678
|
let v = o.height;
|
|
1496
|
-
const w = s.getRowspanAt(
|
|
1497
|
-
w > 1 && (v = this.getRowHeights(
|
|
1679
|
+
const w = s.getRowspanAt(r, u), y = s.getColspanAt(r, u);
|
|
1680
|
+
w > 1 && (v = this.getRowHeights(r, r + w - 1, s).reduce((A, M) => A + M, 0));
|
|
1498
1681
|
let S = x;
|
|
1499
|
-
y > 1 && (S = this.getColumnWidths(
|
|
1500
|
-
let
|
|
1501
|
-
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (b = this.colAndRowspanModels[e]) != null && b.isInRange(
|
|
1502
|
-
this.renderDragTargetDiv(i,
|
|
1503
|
-
const A = { left:
|
|
1682
|
+
y > 1 && (S = this.getColumnWidths(u, u + y - 1).reduce((A, M) => A + M, 0));
|
|
1683
|
+
let R = !1;
|
|
1684
|
+
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (b = this.colAndRowspanModels[e]) != null && b.isInRange(r, u) && (R = !0), this.draggingTargetColumnIndex === u && e !== "header") {
|
|
1685
|
+
this.renderDragTargetDiv(i, f, d, S, v);
|
|
1686
|
+
const A = { left: f, top: d, width: S, height: v };
|
|
1504
1687
|
this.dom.addColumnBorderDivs(this.tableOptions, i, A, e, t);
|
|
1505
1688
|
} else {
|
|
1506
|
-
const A = this.renderSelectedBackgroundDiv(
|
|
1507
|
-
"gammaCells" in s && s.getValueAt(
|
|
1689
|
+
const A = this.renderSelectedBackgroundDiv(R, m, t, s, r, u, i, f, d, S, v);
|
|
1690
|
+
"gammaCells" in s && s.getValueAt(r, u) && (R = !1), R || this.renderCell({
|
|
1508
1691
|
areaModel: s,
|
|
1509
1692
|
areaIdent: e,
|
|
1510
1693
|
sideIdent: t,
|
|
1511
|
-
rowIndex:
|
|
1512
|
-
columnIndex:
|
|
1513
|
-
left:
|
|
1694
|
+
rowIndex: r,
|
|
1695
|
+
columnIndex: u,
|
|
1696
|
+
left: f,
|
|
1514
1697
|
top: d,
|
|
1515
1698
|
width: S,
|
|
1516
1699
|
height: v,
|
|
@@ -1519,9 +1702,9 @@ class Se extends me {
|
|
|
1519
1702
|
lastRowOfModel: c,
|
|
1520
1703
|
gammaRange: !0
|
|
1521
1704
|
}), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1522
|
-
rowIndex:
|
|
1523
|
-
columnIndex:
|
|
1524
|
-
cellLeft:
|
|
1705
|
+
rowIndex: r,
|
|
1706
|
+
columnIndex: u,
|
|
1707
|
+
cellLeft: f,
|
|
1525
1708
|
cellTop: d,
|
|
1526
1709
|
cellWidth: S,
|
|
1527
1710
|
cellHeight: v,
|
|
@@ -1532,7 +1715,7 @@ class Se extends me {
|
|
|
1532
1715
|
if (p = p + x, p > this.areaBodyCenterGeo.width)
|
|
1533
1716
|
break;
|
|
1534
1717
|
}
|
|
1535
|
-
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new
|
|
1718
|
+
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new T(p - 1, 1, o.height, 0), i);
|
|
1536
1719
|
}
|
|
1537
1720
|
/**
|
|
1538
1721
|
* Retrieves the column index of the tree arrow column in the table.
|
|
@@ -1552,26 +1735,26 @@ class Se extends me {
|
|
|
1552
1735
|
sideIdent: s,
|
|
1553
1736
|
rowIndex: o,
|
|
1554
1737
|
index: i,
|
|
1555
|
-
left:
|
|
1556
|
-
width:
|
|
1738
|
+
left: r,
|
|
1739
|
+
width: a,
|
|
1557
1740
|
height: l,
|
|
1558
1741
|
top: n,
|
|
1559
1742
|
parent: c,
|
|
1560
1743
|
lastRowOfModel: h
|
|
1561
1744
|
}) {
|
|
1562
|
-
var
|
|
1563
|
-
const
|
|
1564
|
-
let
|
|
1565
|
-
if (i === this.getTreeArrowColumnIndex() &&
|
|
1745
|
+
var N;
|
|
1746
|
+
const m = this.editorRenderer && this.editorRendererRow === o && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(o, i), p = { left: r, width: a, height: l, top: n, index: i }, b = e.getRowByIndex(o);
|
|
1747
|
+
let u = "none";
|
|
1748
|
+
if (i === this.getTreeArrowColumnIndex() && L(b)) {
|
|
1566
1749
|
const C = b;
|
|
1567
|
-
(
|
|
1750
|
+
(N = C.children) != null && N.length ? C.expanded ? u = "expanded" : u = "collapsed" : u = "hidden";
|
|
1568
1751
|
}
|
|
1569
1752
|
let x;
|
|
1570
1753
|
if (t === "header") {
|
|
1571
1754
|
const C = this.tableModel.getColumnDef(i);
|
|
1572
1755
|
(!(C != null && C.sortIconVisible) || C != null && C.sortIconVisible()) && (x = C == null ? void 0 : C.sortState);
|
|
1573
1756
|
}
|
|
1574
|
-
const v = e.getValueAt(o, i), w =
|
|
1757
|
+
const v = e.getValueAt(o, i), w = m ? "" : `${v}`, y = e.isRowChecked(o), S = this.dom.addColumnDiv(
|
|
1575
1758
|
{
|
|
1576
1759
|
parent: c,
|
|
1577
1760
|
geo: p,
|
|
@@ -1580,27 +1763,27 @@ class Se extends me {
|
|
|
1580
1763
|
areaIdent: t,
|
|
1581
1764
|
sideIdent: s,
|
|
1582
1765
|
text: w,
|
|
1583
|
-
treeArrow:
|
|
1766
|
+
treeArrow: u,
|
|
1584
1767
|
tableOptions: this.tableOptions,
|
|
1585
1768
|
checkedType: y,
|
|
1586
1769
|
sortState: x
|
|
1587
1770
|
}
|
|
1588
|
-
),
|
|
1589
|
-
|
|
1771
|
+
), R = e.getTooltipAt(o, i);
|
|
1772
|
+
R && this.dom.setAttribute(S, "title", R);
|
|
1590
1773
|
const A = this.tableModel.getColumnDef(i);
|
|
1591
1774
|
A && A.classes[t] && this.dom.addClasses(A.classes[t], S);
|
|
1592
1775
|
let M;
|
|
1593
|
-
|
|
1776
|
+
m && (M = m.render(S, o, i, t, e, v, this.dom.domService));
|
|
1594
1777
|
const I = e.getCustomClassesAt(o, i);
|
|
1595
|
-
if (I.length && this.dom.addClasses(I, S), this.dom.addColumnBorderDivs(this.tableOptions, c, p, t, s), h && this.dom.addHorizontalBorder({ left:
|
|
1778
|
+
if (I.length && this.dom.addClasses(I, S), this.dom.addColumnBorderDivs(this.tableOptions, c, p, t, s), h && this.dom.addHorizontalBorder({ left: r, width: a, height: l, top: n + l }, c), this.getFocusModel && t === "body") {
|
|
1596
1779
|
const C = this.getFocusModel();
|
|
1597
1780
|
C != null && C.hasFocus(o, i) && this.dom.addFocusBorderDivs(c, p, {});
|
|
1598
1781
|
}
|
|
1599
1782
|
t === "header" && this.dom.setAttribute(S, "data-ge-action", "drag-column");
|
|
1600
|
-
const
|
|
1601
|
-
if (
|
|
1602
|
-
for (const C in
|
|
1603
|
-
this.dom.setStyle(S, C,
|
|
1783
|
+
const W = e.getCustomStyleAt(o, i);
|
|
1784
|
+
if (W)
|
|
1785
|
+
for (const C in W)
|
|
1786
|
+
this.dom.setStyle(S, C, W[C]);
|
|
1604
1787
|
return [S, M];
|
|
1605
1788
|
}
|
|
1606
1789
|
/**
|
|
@@ -1731,9 +1914,9 @@ class Se extends me {
|
|
|
1731
1914
|
adjustDraggingColumn(e, t, s) {
|
|
1732
1915
|
var o, i;
|
|
1733
1916
|
if (this.dragging) {
|
|
1734
|
-
const
|
|
1917
|
+
const r = this.hostElement.clientHeight, a = this.storedColumnWidths[t];
|
|
1735
1918
|
if ((o = e.originalEvent) != null && o.clientX) {
|
|
1736
|
-
const c = { left: ((i = e.originalEvent) == null ? void 0 : i.clientX) -
|
|
1919
|
+
const c = { left: ((i = e.originalEvent) == null ? void 0 : i.clientX) - a / 2, width: a, height: r, top: 0, index: t };
|
|
1737
1920
|
this.dom.applyStyle(this.draggingColumn, {
|
|
1738
1921
|
background: "rgba(128,128,128,0.2)",
|
|
1739
1922
|
display: "block",
|
|
@@ -1763,29 +1946,29 @@ class Se extends me {
|
|
|
1763
1946
|
* @return {number} The final y-position after rendering all the content.
|
|
1764
1947
|
*/
|
|
1765
1948
|
renderContentOfDraggingColumnForArea(e, t, s = 0) {
|
|
1766
|
-
const o = "center", i = this.tableModel.getAreaModel(t),
|
|
1767
|
-
if (
|
|
1768
|
-
const
|
|
1769
|
-
for (let n = 0; n <
|
|
1770
|
-
const c = s, h = i.getRowHeight(n), d = { left: 0, width: e.width, height: h, top: c, index: n },
|
|
1949
|
+
const o = "center", i = this.tableModel.getAreaModel(t), r = i == null ? void 0 : i.getRowCount();
|
|
1950
|
+
if (r) {
|
|
1951
|
+
const a = e.index ?? 0, l = this.draggingColumn;
|
|
1952
|
+
for (let n = 0; n < r; n++) {
|
|
1953
|
+
const c = s, h = i.getRowHeight(n), d = { left: 0, width: e.width, height: h, top: c, index: n }, m = i.getValueAt(n, a), p = i.getCellRenderer(n, a), b = p ? "" : `${m}`, u = {
|
|
1771
1954
|
parent: l,
|
|
1772
1955
|
geo: d,
|
|
1773
1956
|
rowIndex: n,
|
|
1774
|
-
columnIndex:
|
|
1957
|
+
columnIndex: a,
|
|
1775
1958
|
areaIdent: t,
|
|
1776
1959
|
sideIdent: o,
|
|
1777
1960
|
text: b
|
|
1778
|
-
},
|
|
1961
|
+
}, f = this.dom.addColumnDiv(u);
|
|
1779
1962
|
let x;
|
|
1780
|
-
p && (x = p.render(
|
|
1781
|
-
const v = i.getCustomClassesAt(n,
|
|
1782
|
-
v.length && this.dom.addClasses(v,
|
|
1783
|
-
const w = this.tableModel.getColumnDef(
|
|
1784
|
-
w && w.classes[t] && this.dom.addClasses(w.classes[t],
|
|
1785
|
-
const y = i.getCustomStyleAt(n,
|
|
1963
|
+
p && (x = p.render(f, n, a, t, i, m, this.dom.domService), x && this.cleanupFunctions[t].push(x));
|
|
1964
|
+
const v = i.getCustomClassesAt(n, a);
|
|
1965
|
+
v.length && this.dom.addClasses(v, f);
|
|
1966
|
+
const w = this.tableModel.getColumnDef(a);
|
|
1967
|
+
w && w.classes[t] && this.dom.addClasses(w.classes[t], f), this.dom.addColumnBorderDivs(this.tableOptions, l, d, t, o);
|
|
1968
|
+
const y = i.getCustomStyleAt(n, a);
|
|
1786
1969
|
if (y)
|
|
1787
1970
|
for (const S in y)
|
|
1788
|
-
this.dom.setStyle(
|
|
1971
|
+
this.dom.setStyle(f, S, y[S]);
|
|
1789
1972
|
s = s + h;
|
|
1790
1973
|
}
|
|
1791
1974
|
}
|
|
@@ -1813,10 +1996,10 @@ class Se extends me {
|
|
|
1813
1996
|
* @return {HTMLDivElement} - The rendered draggable target div element.
|
|
1814
1997
|
*/
|
|
1815
1998
|
renderDragTargetDiv(e, t, s, o, i) {
|
|
1816
|
-
const
|
|
1999
|
+
const r = this.dom.applyStylePosistionAbsolute(
|
|
1817
2000
|
this.dom.createDivWithClass("ge-table-drop-zone", e)
|
|
1818
2001
|
);
|
|
1819
|
-
return this.dom.setStyle(
|
|
2002
|
+
return this.dom.setStyle(r, "left", `${t}px`), this.dom.setStyle(r, "top", `${s}px`), this.dom.setStyle(r, "width", `${o}px`), this.dom.setStyle(r, "height", `${i}px`), r;
|
|
1820
2003
|
}
|
|
1821
2004
|
/**
|
|
1822
2005
|
* Render selected background div.
|
|
@@ -1835,19 +2018,19 @@ class Se extends me {
|
|
|
1835
2018
|
* @param {number} height - The height of the div.
|
|
1836
2019
|
* @returns {boolean} - Whether the cell is selected.
|
|
1837
2020
|
*/
|
|
1838
|
-
renderSelectedBackgroundDiv(e, t, s, o, i,
|
|
2021
|
+
renderSelectedBackgroundDiv(e, t, s, o, i, r, a, l, n, c, h) {
|
|
1839
2022
|
let d = !1;
|
|
1840
|
-
if (!e && t && o.isSelectable(i,
|
|
1841
|
-
const
|
|
1842
|
-
if (
|
|
1843
|
-
const p =
|
|
2023
|
+
if (!e && t && o.isSelectable(i, r) && this.getSelectionModel) {
|
|
2024
|
+
const m = this.getSelectionModel();
|
|
2025
|
+
if (m) {
|
|
2026
|
+
const p = m.getSelectionCount(i, r);
|
|
1844
2027
|
d = p > 0;
|
|
1845
2028
|
for (let b = 0; b < p; b++) {
|
|
1846
|
-
const
|
|
2029
|
+
const u = this.dom.applyStylePosistionAbsolute(
|
|
1847
2030
|
// ge-table-body-west-selected-range
|
|
1848
|
-
this.dom.createDivWithClass(`ge-table-${o.areaIdent}-${s}-selected-range`,
|
|
2031
|
+
this.dom.createDivWithClass(`ge-table-${o.areaIdent}-${s}-selected-range`, a)
|
|
1849
2032
|
);
|
|
1850
|
-
this.dom.setStyle(
|
|
2033
|
+
this.dom.setStyle(u, "left", `${l}px`), this.dom.setStyle(u, "top", `${n}px`), this.dom.setStyle(u, "width", `${c}px`), this.dom.setStyle(u, "height", `${h}px`);
|
|
1851
2034
|
}
|
|
1852
2035
|
}
|
|
1853
2036
|
}
|
|
@@ -1878,28 +2061,28 @@ class Se extends me {
|
|
|
1878
2061
|
sideIdent: s,
|
|
1879
2062
|
rowIndex: o,
|
|
1880
2063
|
columnIndex: i,
|
|
1881
|
-
left:
|
|
1882
|
-
top:
|
|
2064
|
+
left: r,
|
|
2065
|
+
top: a,
|
|
1883
2066
|
width: l,
|
|
1884
2067
|
height: n,
|
|
1885
2068
|
parent: c,
|
|
1886
2069
|
cellSelected: h,
|
|
1887
2070
|
lastRowOfModel: d
|
|
1888
2071
|
}) {
|
|
1889
|
-
const [
|
|
2072
|
+
const [m, p] = this.addAndRenderCellDiv({
|
|
1890
2073
|
areaModel: e,
|
|
1891
2074
|
areaIdent: t,
|
|
1892
2075
|
sideIdent: s,
|
|
1893
2076
|
rowIndex: o,
|
|
1894
2077
|
index: i,
|
|
1895
|
-
left:
|
|
2078
|
+
left: r,
|
|
1896
2079
|
width: l,
|
|
1897
2080
|
height: n,
|
|
1898
|
-
top:
|
|
2081
|
+
top: a,
|
|
1899
2082
|
parent: c,
|
|
1900
2083
|
lastRowOfModel: d
|
|
1901
2084
|
});
|
|
1902
|
-
h && this.dom.addClass(`ge-table-${t}-${s}-selected-range`,
|
|
2085
|
+
h && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, m), p && this.cleanupFunctions[t].push(p);
|
|
1903
2086
|
}
|
|
1904
2087
|
/**
|
|
1905
2088
|
* Render the header cell resize handle.
|
|
@@ -1915,17 +2098,17 @@ class Se extends me {
|
|
|
1915
2098
|
*
|
|
1916
2099
|
* @return {void}
|
|
1917
2100
|
*/
|
|
1918
|
-
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: o, cellWidth: i, cellHeight:
|
|
2101
|
+
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: o, cellWidth: i, cellHeight: r, parent: a }) {
|
|
1919
2102
|
const l = this.dom.domService, n = this.tableOptions.columnResizeHandleWidthInPx ?? 2, c = l.createElement("div");
|
|
1920
|
-
l.setAttribute(c, "data-col-index", `${t}`), l.setAttribute(c, "data-row-index", `${e}`), l.setAttribute(c, "data-area", "header"), l.setAttribute(c, "data-ge-action", "resize-column"), l.addClass(c, "ge-table-column-resize-handle"), l.setStyle(c, "display", "clip"), l.setStyle(c, "position", "absolute"), l.setStyle(c, "cursor", "col-resize"), l.setStyle(c, "left", `${s + i - n}px`), l.setStyle(c, "top", `${o}px`), l.setStyle(c, "width", `${n}px`), l.setStyle(c, "height", `${
|
|
2103
|
+
l.setAttribute(c, "data-col-index", `${t}`), l.setAttribute(c, "data-row-index", `${e}`), l.setAttribute(c, "data-area", "header"), l.setAttribute(c, "data-ge-action", "resize-column"), l.addClass(c, "ge-table-column-resize-handle"), l.setStyle(c, "display", "clip"), l.setStyle(c, "position", "absolute"), l.setStyle(c, "cursor", "col-resize"), l.setStyle(c, "left", `${s + i - n}px`), l.setStyle(c, "top", `${o}px`), l.setStyle(c, "width", `${n}px`), l.setStyle(c, "height", `${r}px`), l.appendChild(a, c);
|
|
1921
2104
|
}
|
|
1922
2105
|
}
|
|
1923
|
-
class
|
|
2106
|
+
class Ce {
|
|
1924
2107
|
constructor(e, t) {
|
|
1925
2108
|
this.columnIndex = e, this.sortState = t;
|
|
1926
2109
|
}
|
|
1927
2110
|
}
|
|
1928
|
-
class
|
|
2111
|
+
class we {
|
|
1929
2112
|
constructor(e) {
|
|
1930
2113
|
this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
|
|
1931
2114
|
}
|
|
@@ -1941,36 +2124,36 @@ class xe {
|
|
|
1941
2124
|
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
|
|
1942
2125
|
const t = e.target, s = t.getAttribute("data-area"), o = t.getAttribute("data-row-index"), i = t.getAttribute("data-col-index");
|
|
1943
2126
|
if (s && o && i) {
|
|
1944
|
-
const
|
|
1945
|
-
this.tableScope.updateModelValueAfterEdit(
|
|
2127
|
+
const r = V(s), a = Number(o), l = Number(i);
|
|
2128
|
+
this.tableScope.updateModelValueAfterEdit(r, a, l, t.value);
|
|
1946
2129
|
}
|
|
1947
2130
|
}
|
|
1948
2131
|
}
|
|
1949
2132
|
}
|
|
1950
|
-
class
|
|
2133
|
+
class Ee {
|
|
1951
2134
|
constructor(e = -1, t = -1) {
|
|
1952
2135
|
this.rowIndex = e, this.columnIndex = t;
|
|
1953
2136
|
}
|
|
1954
2137
|
}
|
|
1955
|
-
class
|
|
2138
|
+
class G {
|
|
1956
2139
|
constructor(e) {
|
|
1957
2140
|
this.cells = e;
|
|
1958
2141
|
}
|
|
1959
2142
|
static createSingle(e, t) {
|
|
1960
|
-
return new
|
|
2143
|
+
return new G([new Ee(e, t)]);
|
|
1961
2144
|
}
|
|
1962
2145
|
}
|
|
1963
|
-
class
|
|
2146
|
+
class Ae {
|
|
1964
2147
|
constructor(e) {
|
|
1965
2148
|
var t, s;
|
|
1966
2149
|
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);
|
|
1967
2150
|
}
|
|
1968
2151
|
onMouseClicked(e, t) {
|
|
1969
|
-
var i,
|
|
2152
|
+
var i, r, a, l, n, c, h;
|
|
1970
2153
|
let s = !1, o = !1;
|
|
1971
2154
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
1972
|
-
const d = this.getSelectionModel(),
|
|
1973
|
-
d &&
|
|
2155
|
+
const d = this.getSelectionModel(), m = this.getFocusModel();
|
|
2156
|
+
d && m && (m.hasFocus(e.rowIndex, e.columnIndex) || (m.setFocus(e.rowIndex, e.columnIndex), this.tableScope.onFocusChanged(m), s = !0), (i = e.originalEvent) != null && i.shiftKey || d.hasSelection() && (d.clear(), s = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (d.addSelection(this.createRangeByEvents(e, this.previousEvt)), o = !0, s = !0) : (a = e.originalEvent) != null && a.altKey && ((l = e.originalEvent) != null && l.ctrlKey || (n = e.originalEvent) != null && n.metaKey) ? (d.removeSelection(E.singleCell(e.rowIndex, e.columnIndex)), o = !0, s = !0) : (c = e.originalEvent) != null && c.ctrlKey || (h = e.originalEvent) != null && h.metaKey ? (d.addSelection(E.singleCell(e.rowIndex, e.columnIndex)), o = !0, s = !0) : (d.firstClick(e.rowIndex, e.columnIndex), s = !0), this.tableScope.onSelectionChanged(d));
|
|
1974
2157
|
}
|
|
1975
2158
|
return o ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), s;
|
|
1976
2159
|
}
|
|
@@ -1992,16 +2175,16 @@ class Ce {
|
|
|
1992
2175
|
}
|
|
1993
2176
|
createRangeByEvents(e, t) {
|
|
1994
2177
|
t || (t = e);
|
|
1995
|
-
const s = Math.min(e.rowIndex, t == null ? void 0 : t.rowIndex), o = Math.max(e.rowIndex, t == null ? void 0 : t.rowIndex), i = Math.min(e.columnIndex, t == null ? void 0 : t.columnIndex),
|
|
2178
|
+
const s = Math.min(e.rowIndex, t == null ? void 0 : t.rowIndex), o = 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);
|
|
1996
2179
|
return E.create({
|
|
1997
2180
|
rowIndex1: s,
|
|
1998
2181
|
columnIndex1: i,
|
|
1999
2182
|
rowIndex2: o,
|
|
2000
|
-
columnIndex2:
|
|
2183
|
+
columnIndex2: r
|
|
2001
2184
|
});
|
|
2002
2185
|
}
|
|
2003
2186
|
}
|
|
2004
|
-
class
|
|
2187
|
+
class Me {
|
|
2005
2188
|
get() {
|
|
2006
2189
|
return {
|
|
2007
2190
|
f2: "START_EDITING",
|
|
@@ -2021,7 +2204,7 @@ class we {
|
|
|
2021
2204
|
};
|
|
2022
2205
|
}
|
|
2023
2206
|
}
|
|
2024
|
-
class
|
|
2207
|
+
class Re {
|
|
2025
2208
|
get() {
|
|
2026
2209
|
return {
|
|
2027
2210
|
f2: "START_EDITING",
|
|
@@ -2043,7 +2226,7 @@ class Ee {
|
|
|
2043
2226
|
};
|
|
2044
2227
|
}
|
|
2045
2228
|
}
|
|
2046
|
-
class
|
|
2229
|
+
class Te {
|
|
2047
2230
|
constructor(e) {
|
|
2048
2231
|
this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
|
|
2049
2232
|
}
|
|
@@ -2064,7 +2247,7 @@ class Ae {
|
|
|
2064
2247
|
this.assignPredefinedSystemShortcutMappings(), Object.assign(this.shortcutActionIdMapping, this.tableScope.tableOptions.shortcutActionIdMapping), this.isDebug() && console.debug("ShortcutService", this.shortcutActionIdMapping), this.tableScope.hostElement.addEventListener("keydown", this.onKeyDown.bind(this));
|
|
2065
2248
|
}
|
|
2066
2249
|
assignPredefinedSystemShortcutMappings() {
|
|
2067
|
-
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new
|
|
2250
|
+
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new Re().get()) : Object.assign(this.shortcutActionIdMapping, new Me().get());
|
|
2068
2251
|
}
|
|
2069
2252
|
isMacintosh() {
|
|
2070
2253
|
return navigator.platform.indexOf("Mac") > -1;
|
|
@@ -2163,10 +2346,10 @@ class J {
|
|
|
2163
2346
|
e.setAttribute(t, s);
|
|
2164
2347
|
}
|
|
2165
2348
|
}
|
|
2166
|
-
class
|
|
2167
|
-
render(e, t, s, o, i,
|
|
2349
|
+
class De {
|
|
2350
|
+
render(e, t, s, o, i, r, a) {
|
|
2168
2351
|
if (i.isEditable(t, s)) {
|
|
2169
|
-
|
|
2352
|
+
a.addClass(e, "ge-table-row-input-div");
|
|
2170
2353
|
const l = i.getValueAt(t, s);
|
|
2171
2354
|
e.innerHTML = `
|
|
2172
2355
|
<input
|
|
@@ -2184,7 +2367,7 @@ class Me {
|
|
|
2184
2367
|
}
|
|
2185
2368
|
}
|
|
2186
2369
|
}
|
|
2187
|
-
class
|
|
2370
|
+
class ke {
|
|
2188
2371
|
constructor(e = "none", t = "single") {
|
|
2189
2372
|
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1, this.silent = !1, this.listenerArr = [];
|
|
2190
2373
|
}
|
|
@@ -2266,7 +2449,7 @@ class Te {
|
|
|
2266
2449
|
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), this.fireChangeEvent());
|
|
2267
2450
|
}
|
|
2268
2451
|
}
|
|
2269
|
-
class
|
|
2452
|
+
class Fe {
|
|
2270
2453
|
constructor(e = "none") {
|
|
2271
2454
|
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1, this.listenerArr = [];
|
|
2272
2455
|
}
|
|
@@ -2317,14 +2500,14 @@ class Z {
|
|
|
2317
2500
|
}
|
|
2318
2501
|
// `⊖ `, `⊕ `;
|
|
2319
2502
|
}
|
|
2320
|
-
const
|
|
2503
|
+
const Ie = new ke(), Le = new Fe("cell");
|
|
2321
2504
|
class Q {
|
|
2322
2505
|
constructor() {
|
|
2323
2506
|
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 = {
|
|
2324
2507
|
header: 34,
|
|
2325
2508
|
body: 34,
|
|
2326
2509
|
footer: 34
|
|
2327
|
-
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new Y(), this.headerGroupOptions = new Z(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new q(), this.sortOrder = ["asc", "desc"], this.resizeEventDebounceDelay = 500, this.getEditRenderer = (e, t) => new
|
|
2510
|
+
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new Y(), this.headerGroupOptions = new Z(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new q(), this.sortOrder = ["asc", "desc"], this.resizeEventDebounceDelay = 500, this.getEditRenderer = (e, t) => new De(), this.getSelectionModel = () => Ie, this.getFocusModel = () => Le;
|
|
2328
2511
|
}
|
|
2329
2512
|
}
|
|
2330
2513
|
const F = class F {
|
|
@@ -2340,23 +2523,23 @@ const F = class F {
|
|
|
2340
2523
|
createContent(e, t, s) {
|
|
2341
2524
|
return new Promise((o, i) => {
|
|
2342
2525
|
if (t != null && t.hasSelection()) {
|
|
2343
|
-
const
|
|
2344
|
-
if (
|
|
2345
|
-
|
|
2346
|
-
const
|
|
2347
|
-
for (let l =
|
|
2526
|
+
const r = this.mergeRanges(t.getRanges());
|
|
2527
|
+
if (r) {
|
|
2528
|
+
r.c2 = Math.min(r.c2, e.getColumnCount() - 1), r.r2 = Math.min(r.r2, e.getBodyModel().getRowCount() - 1);
|
|
2529
|
+
const a = [];
|
|
2530
|
+
for (let l = r.r1; l <= r.r2; l++) {
|
|
2348
2531
|
const n = [];
|
|
2349
|
-
for (let c =
|
|
2532
|
+
for (let c = r.c1; c <= r.c2; c++) {
|
|
2350
2533
|
const h = t.isSelected(l, c) ? e.getBodyModel().getTextValueAt(l, c) : "";
|
|
2351
2534
|
n.push(h);
|
|
2352
2535
|
}
|
|
2353
|
-
|
|
2536
|
+
a.push(n.join(F.columnSeparatorChar));
|
|
2354
2537
|
}
|
|
2355
|
-
return o(
|
|
2538
|
+
return o(a.join(F.rowSeparatorChar));
|
|
2356
2539
|
}
|
|
2357
2540
|
}
|
|
2358
2541
|
if (s) {
|
|
2359
|
-
const [
|
|
2542
|
+
const [r, a] = s.getFocus(), l = e.getBodyModel().getTextValueAt(r, a);
|
|
2360
2543
|
return o(l);
|
|
2361
2544
|
}
|
|
2362
2545
|
i("Cannot copy, neither selection nor focus defined.");
|
|
@@ -2385,13 +2568,13 @@ const F = class F {
|
|
|
2385
2568
|
e,
|
|
2386
2569
|
t,
|
|
2387
2570
|
s
|
|
2388
|
-
).then((
|
|
2389
|
-
|
|
2390
|
-
o(
|
|
2391
|
-
}).catch((
|
|
2571
|
+
).then((r) => {
|
|
2572
|
+
r && this.copyContent(r).then((a) => {
|
|
2573
|
+
o(r);
|
|
2574
|
+
}).catch((a) => {
|
|
2392
2575
|
i();
|
|
2393
2576
|
});
|
|
2394
|
-
}).catch((
|
|
2577
|
+
}).catch((r) => {
|
|
2395
2578
|
i();
|
|
2396
2579
|
});
|
|
2397
2580
|
});
|
|
@@ -2411,17 +2594,17 @@ const F = class F {
|
|
|
2411
2594
|
};
|
|
2412
2595
|
F.columnSeparatorChar = " ", F.rowSeparatorChar = `
|
|
2413
2596
|
`;
|
|
2414
|
-
let
|
|
2415
|
-
class
|
|
2597
|
+
let O = F;
|
|
2598
|
+
class Oe {
|
|
2416
2599
|
constructor(e, t = 500) {
|
|
2417
|
-
this.tableScope = e, this.debounceDelay = t, new ResizeObserver(
|
|
2600
|
+
this.tableScope = e, this.debounceDelay = t, new ResizeObserver(ae(this.handleResize.bind(this), t)).observe(this.tableScope.hostElement);
|
|
2418
2601
|
}
|
|
2419
2602
|
handleResize(e) {
|
|
2420
2603
|
const t = e[0], { width: s } = t.contentRect;
|
|
2421
2604
|
this.tableScope.recalcColumnWidths(s);
|
|
2422
2605
|
}
|
|
2423
2606
|
}
|
|
2424
|
-
class
|
|
2607
|
+
class Be {
|
|
2425
2608
|
/**
|
|
2426
2609
|
* Downloads a matrix data as an Excel file.
|
|
2427
2610
|
*
|
|
@@ -2439,8 +2622,8 @@ class Ie {
|
|
|
2439
2622
|
try {
|
|
2440
2623
|
const o = this.generateBuffer(e, s), i = new Blob([o], {
|
|
2441
2624
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
2442
|
-
}),
|
|
2443
|
-
|
|
2625
|
+
}), r = document.createElement("a");
|
|
2626
|
+
r.href = URL.createObjectURL(i), r.download = t, document.body.appendChild(r), r.click(), document.body.removeChild(r);
|
|
2444
2627
|
} catch (o) {
|
|
2445
2628
|
throw console.error("Error generating Excel file:", o), new Error("Failed to download Excel file.");
|
|
2446
2629
|
}
|
|
@@ -2449,14 +2632,14 @@ class Ie {
|
|
|
2449
2632
|
const s = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2450
2633
|
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>`, o = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2451
2634
|
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"><Application>Microsoft Macintosh Excel</Application><DocSecurity>0</DocSecurity><ScaleCrop>false</ScaleCrop><HeadingPairs><vt:vector size="2" baseType="variant"><vt:variant><vt:lpstr>Worksheets</vt:lpstr></vt:variant><vt:variant><vt:i4>1</vt:i4></vt:variant></vt:vector></HeadingPairs><TitlesOfParts><vt:vector size="1" baseType="lpstr"><vt:lpstr>Sheet1</vt:lpstr></vt:vector></TitlesOfParts><Company></Company><LinksUpToDate>false</LinksUpToDate><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>16.0300</AppVersion></Properties>`, i = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2452
|
-
<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:creator>${t}</dc:creator><cp:lastModifiedBy>${t}</cp:lastModifiedBy><dcterms:created xsi:type="dcterms:W3CDTF">2024-12-13T19:45:08Z</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">2024-12-13T19:45:35Z</dcterms:modified></cp:coreProperties>`,
|
|
2453
|
-
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml"/></Relationships>`,
|
|
2635
|
+
<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:creator>${t}</dc:creator><cp:lastModifiedBy>${t}</cp:lastModifiedBy><dcterms:created xsi:type="dcterms:W3CDTF">2024-12-13T19:45:08Z</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">2024-12-13T19:45:35Z</dcterms:modified></cp:coreProperties>`, r = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2636
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml"/></Relationships>`, a = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2454
2637
|
<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="0E2841"/></a:dk2><a:lt2><a:srgbClr val="E8E8E8"/></a:lt2><a:accent1><a:srgbClr val="156082"/></a:accent1><a:accent2><a:srgbClr val="E97132"/></a:accent2><a:accent3><a:srgbClr val="196B24"/></a:accent3><a:accent4><a:srgbClr val="0F9ED5"/></a:accent4><a:accent5><a:srgbClr val="A02B93"/></a:accent5><a:accent6><a:srgbClr val="4EA72E"/></a:accent6><a:hlink><a:srgbClr val="467886"/></a:hlink><a:folHlink><a:srgbClr val="96607D"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Aptos Display" panose="02110004020202020204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック Light"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线 Light"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:majorFont><a:minorFont><a:latin typeface="Aptos Narrow" panose="02110004020202020204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:lumMod val="110000"/><a:satMod val="105000"/><a:tint val="67000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="103000"/><a:tint val="73000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="109000"/><a:tint val="81000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:satMod val="103000"/><a:lumMod val="102000"/><a:tint val="94000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:satMod val="110000"/><a:lumMod val="100000"/><a:shade val="100000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="99000"/><a:satMod val="120000"/><a:shade val="78000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="12700" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="19050" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="57150" dist="19050" dir="5400000" algn="ctr" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="63000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:tint val="95000"/><a:satMod val="170000"/></a:schemeClr></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="93000"/><a:satMod val="150000"/><a:shade val="98000"/><a:lumMod val="102000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:tint val="98000"/><a:satMod val="130000"/><a:shade val="90000"/><a:lumMod val="103000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="63000"/><a:satMod val="120000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults><a:lnDef><a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style></a:lnDef></a:objectDefaults><a:extraClrSchemeLst/><a:extLst><a:ext uri="{05A4C25C-085E-4340-85A3-A5531E510DB2}"><thm15:themeFamily xmlns:thm15="http://schemas.microsoft.com/office/thememl/2012/main" name="Office Theme" id="{2E142A2C-CD16-42D6-873A-C26D2A0506FA}" vid="{1BDDFF52-6CD6-40A5-AB3C-68EB2F1E4D0A}"/></a:ext></a:extLst></a:theme>`, l = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2455
2638
|
<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="3" uniqueCount="3"><si><t>a</t></si><si><t>b</t></si><si><t>c</t></si></sst>`, n = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2456
2639
|
<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac x16r2 xr" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:x16r2="http://schemas.microsoft.com/office/spreadsheetml/2015/02/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision"><fonts count="1" x14ac:knownFonts="1"><font><sz val="12"/><color theme="1"/><name val="Aptos Narrow"/><family val="2"/><scheme val="minor"/></font></fonts><fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs><cellXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/></cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles><dxfs count="0"/><tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleLight16"/><extLst><ext uri="{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"><x14:slicerStyles defaultSlicerStyle="SlicerStyleLight1"/></ext><ext uri="{9260A510-F301-46a8-8635-F512D64BE5F5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:timelineStyles defaultTimelineStyle="TimeSlicerStyleLight1"/></ext></extLst></styleSheet>`, c = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2457
2640
|
<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x15 xr xr6 xr10 xr2" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr6="http://schemas.microsoft.com/office/spreadsheetml/2016/revision6" xmlns:xr10="http://schemas.microsoft.com/office/spreadsheetml/2016/revision10" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2"><fileVersion appName="xl" lastEdited="7" lowestEdited="7" rupBuild="11207"/><workbookPr defaultThemeVersion="202300"/><mc:AlternateContent xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"><mc:Choice Requires="x15"><x15ac:absPath url="/" xmlns:x15ac="http://schemas.microsoft.com/office/spreadsheetml/2010/11/ac"/></mc:Choice></mc:AlternateContent><xr:revisionPtr revIDLastSave="0" documentId="8_{292BF245-1F37-B045-B1A5-26C42FB62779}" xr6:coauthVersionLast="47" xr6:coauthVersionMax="47" xr10:uidLastSave="{00000000-0000-0000-0000-000000000000}"/><bookViews><workbookView xWindow="11340" yWindow="5060" windowWidth="28040" windowHeight="17440" xr2:uid="{858B8D3F-6246-774D-8903-6D38687B7BC6}"/></bookViews><sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets><calcPr calcId="181029"/><extLst><ext uri="{140A7094-0E35-4892-8432-C4D2E57EDEB5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:workbookPr chartTrackingRefBase="1"/></ext><ext uri="{B58B0392-4F1F-4190-BB64-5DF3571DCE5F}" xmlns:xcalcf="http://schemas.microsoft.com/office/spreadsheetml/2018/calcfeatures"><xcalcf:calcFeatures><xcalcf:feature name="microsoft.com:RD"/><xcalcf:feature name="microsoft.com:Single"/><xcalcf:feature name="microsoft.com:FV"/><xcalcf:feature name="microsoft.com:CNMTM"/><xcalcf:feature name="microsoft.com:LET_WF"/><xcalcf:feature name="microsoft.com:LAMBDA_WF"/><xcalcf:feature name="microsoft.com:ARRAYTEXT_WF"/></xcalcf:calcFeatures></ext></extLst></workbook>`, h = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2458
2641
|
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/><Override PartName="/xl/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/><Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/></Types>`, d = /* @__PURE__ */ new Map();
|
|
2459
|
-
return d.set("_rels/.rels", s), d.set("docProps/app.xml", o), d.set("docProps/core.xml", i), d.set("xl/_rels/workbook.xml.rels",
|
|
2642
|
+
return d.set("_rels/.rels", s), d.set("docProps/app.xml", o), d.set("docProps/core.xml", i), d.set("xl/_rels/workbook.xml.rels", r), d.set("xl/theme/theme1.xml", a), d.set("xl/worksheets/sheet1.xml", this.getX1WorksheetsSheet1Xml(e)), d.set("xl/sharedStrings.xml", l), d.set("xl/styles.xml", n), d.set("xl/workbook.xml", c), d.set("[Content_Types].xml", h), d;
|
|
2460
2643
|
}
|
|
2461
2644
|
getX1WorksheetsSheet1Xml(e) {
|
|
2462
2645
|
const t = [];
|
|
@@ -2471,15 +2654,15 @@ class Ie {
|
|
|
2471
2654
|
const o = e[s];
|
|
2472
2655
|
t.push('<row r="${r + 1}" spans="1:2" x14ac:dyDescent="0.2">');
|
|
2473
2656
|
for (let i = 0; i < o.length; i++) {
|
|
2474
|
-
const
|
|
2475
|
-
if (typeof
|
|
2476
|
-
t.push(`<c r="${
|
|
2477
|
-
else if (
|
|
2478
|
-
const l =
|
|
2479
|
-
t.push(`<c r="${
|
|
2657
|
+
const r = o[i], a = this.getCellAddress(s, i);
|
|
2658
|
+
if (typeof r == "number")
|
|
2659
|
+
t.push(`<c r="${a}"><v>${r}</v></c>`);
|
|
2660
|
+
else if (r instanceof Date) {
|
|
2661
|
+
const l = r;
|
|
2662
|
+
t.push(`<c r="${a}" t="inlineStr"><is><t>${l.toISOString()}</t></is></c>`);
|
|
2480
2663
|
} else {
|
|
2481
|
-
const l =
|
|
2482
|
-
t.push(`<c r="${
|
|
2664
|
+
const l = r != null ? this.escapeXml(String(r)) : "";
|
|
2665
|
+
t.push(`<c r="${a}" t="inlineStr"><is><t>${l}</t></is></c>`);
|
|
2483
2666
|
}
|
|
2484
2667
|
}
|
|
2485
2668
|
t.push("</row>");
|
|
@@ -2502,8 +2685,8 @@ class Ie {
|
|
|
2502
2685
|
let s = 0;
|
|
2503
2686
|
const o = [];
|
|
2504
2687
|
e.forEach((h, d) => {
|
|
2505
|
-
const
|
|
2506
|
-
b.set([80, 75, 3, 4], 0),
|
|
2688
|
+
const m = new TextEncoder().encode(d), p = new TextEncoder().encode(h), b = new Uint8Array(30 + m.length), u = new DataView(b.buffer);
|
|
2689
|
+
b.set([80, 75, 3, 4], 0), u.setUint16(4, 20, !0), u.setUint16(6, 0, !0), u.setUint16(8, 0, !0), u.setUint16(10, 0, !0), u.setUint16(12, 0, !0), u.setUint32(14, 0, !0), u.setUint32(18, p.length, !0), u.setUint32(22, p.length, !0), u.setUint16(26, m.length, !0), u.setUint16(28, 0, !0), b.set(m, 30), t.push(b, p), o.push({
|
|
2507
2690
|
path: d,
|
|
2508
2691
|
offset: s,
|
|
2509
2692
|
contentSize: p.length
|
|
@@ -2511,11 +2694,11 @@ class Ie {
|
|
|
2511
2694
|
});
|
|
2512
2695
|
const i = s;
|
|
2513
2696
|
o.forEach((h) => {
|
|
2514
|
-
const d = new TextEncoder().encode(h.path),
|
|
2515
|
-
|
|
2697
|
+
const d = new TextEncoder().encode(h.path), m = new Uint8Array(46 + d.length), p = new DataView(m.buffer);
|
|
2698
|
+
m.set([80, 75, 1, 2], 0), p.setUint16(4, 20, !0), p.setUint16(6, 20, !0), p.setUint16(8, 0, !0), p.setUint16(10, 0, !0), p.setUint16(12, 0, !0), p.setUint16(14, 0, !0), p.setUint32(16, 0, !0), p.setUint32(20, h.contentSize, !0), p.setUint32(24, h.contentSize, !0), p.setUint16(28, d.length, !0), p.setUint16(30, 0, !0), p.setUint16(32, 0, !0), p.setUint16(34, 0, !0), p.setUint16(36, 0, !0), p.setUint32(38, 0, !0), p.setUint32(42, h.offset, !0), m.set(d, 46), t.push(m), s += m.length;
|
|
2516
2699
|
});
|
|
2517
|
-
const
|
|
2518
|
-
|
|
2700
|
+
const r = new Uint8Array(22), a = new DataView(r.buffer);
|
|
2701
|
+
r.set([80, 75, 5, 6], 0), a.setUint16(4, 0, !0), a.setUint16(6, 0, !0), a.setUint16(8, o.length, !0), a.setUint16(10, o.length, !0), a.setUint32(12, s - i, !0), a.setUint32(16, i, !0), a.setUint16(20, 0, !0), t.push(r);
|
|
2519
2702
|
const l = t.reduce((h, d) => h + d.length, 0), n = new Uint8Array(l);
|
|
2520
2703
|
let c = 0;
|
|
2521
2704
|
for (const h of t)
|
|
@@ -2527,14 +2710,14 @@ class Ie {
|
|
|
2527
2710
|
return this.createZip(s);
|
|
2528
2711
|
}
|
|
2529
2712
|
}
|
|
2530
|
-
class
|
|
2531
|
-
constructor(e, t, s, o, i,
|
|
2713
|
+
class z extends ve {
|
|
2714
|
+
constructor(e, t, s, o, i, r = new O(), a = new Be()) {
|
|
2532
2715
|
var c;
|
|
2533
|
-
if (super(e, t, new le(s), o), this.eventListener = i, this.copyService =
|
|
2716
|
+
if (super(e, t, new le(s), o), this.eventListener = i, this.copyService = r, this.excelService = a, this.licenseManager = k.getInstance(), this.selectionService = new Ae(this), this.api = new ge(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, t.setTableScope(this), i || (this.eventListener = new j()), (c = this.tableOptions) != null && c.autoRestoreOptions) {
|
|
2534
2717
|
const h = this.tableOptions.autoRestoreOptions, d = h.getStorageKeyFn;
|
|
2535
|
-
d && (h.autoRestoreScrollPosition && (this.storeScrollPosStateService = new
|
|
2718
|
+
d && (h.autoRestoreScrollPosition && (this.storeScrollPosStateService = new ue(d)), h.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new me(d)), h.autoRestoreSortingState && (this.storeSortingService = new be(d)));
|
|
2536
2719
|
}
|
|
2537
|
-
this.mouseHandler = new ce(this), this.inputHandler = new
|
|
2720
|
+
this.mouseHandler = new ce(this), this.inputHandler = new we(this), this.resizeHandler = new Oe(this, o.resizeEventDebounceDelay), this.shortcutService = new Te(this), this.shortcutService.addListener(this.selectionService);
|
|
2538
2721
|
const l = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
2539
2722
|
l && l.addEventSelectionChangedListener(this);
|
|
2540
2723
|
const n = this.getFocusModel ? this.getFocusModel() : void 0;
|
|
@@ -2552,8 +2735,8 @@ class N extends Se {
|
|
|
2552
2735
|
*
|
|
2553
2736
|
* @return {TableScope} - The newly created TableScope instance.
|
|
2554
2737
|
*/
|
|
2555
|
-
static create(e, t, s = new Q(), o = new j(), i = new J(),
|
|
2556
|
-
return new
|
|
2738
|
+
static create(e, t, s = new Q(), o = new j(), i = new J(), r = new O()) {
|
|
2739
|
+
return new z(e, t, i, s, o, r);
|
|
2557
2740
|
}
|
|
2558
2741
|
/**
|
|
2559
2742
|
* Triggers an action based on the provided actionId.
|
|
@@ -2581,7 +2764,7 @@ class N extends Se {
|
|
|
2581
2764
|
return !1;
|
|
2582
2765
|
}
|
|
2583
2766
|
updateModelValueAfterEdit(e, t, s, o) {
|
|
2584
|
-
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, o) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(
|
|
2767
|
+
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, o) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(G.createSingle(t, s)), this.hostElement.focus());
|
|
2585
2768
|
}
|
|
2586
2769
|
/**
|
|
2587
2770
|
* Retrieves the TableApi object.
|
|
@@ -2610,7 +2793,7 @@ class N extends Se {
|
|
|
2610
2793
|
* @return {GeMouseEvent} - The created GeMouseEvent object.
|
|
2611
2794
|
*/
|
|
2612
2795
|
createGeMouseEvent(e) {
|
|
2613
|
-
const t = new
|
|
2796
|
+
const t = new $();
|
|
2614
2797
|
if (t.originalEvent = e, e) {
|
|
2615
2798
|
const s = e.target;
|
|
2616
2799
|
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) {
|
|
@@ -2680,7 +2863,7 @@ class N extends Se {
|
|
|
2680
2863
|
toggleExpandCollapseAll(e = !0) {
|
|
2681
2864
|
var s;
|
|
2682
2865
|
const t = this.tableModel.getBodyModel();
|
|
2683
|
-
|
|
2866
|
+
H(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (s = this.storeStateCollapsedExpandService) == null || s.collapsedStateAll(e));
|
|
2684
2867
|
}
|
|
2685
2868
|
/**
|
|
2686
2869
|
* Toggles the checkbox state of a specific row in a table.
|
|
@@ -2693,10 +2876,10 @@ class N extends Se {
|
|
|
2693
2876
|
*/
|
|
2694
2877
|
toggleRowCheckbox(e, t, s) {
|
|
2695
2878
|
var l;
|
|
2696
|
-
const o = this.tableModel.getAreaModel(s), i = o.isRowChecked(e),
|
|
2697
|
-
o.setRowChecked(e,
|
|
2698
|
-
const
|
|
2699
|
-
this.eventListener.onCheckboxChanged(
|
|
2879
|
+
const o = this.tableModel.getAreaModel(s), i = o.isRowChecked(e), r = i === void 0 || i === "semi" || i === "none";
|
|
2880
|
+
o.setRowChecked(e, r), this.repaint();
|
|
2881
|
+
const a = (l = o.rowSelectionModel) == null ? void 0 : l.getCheckedRows();
|
|
2882
|
+
this.eventListener.onCheckboxChanged(a || []);
|
|
2700
2883
|
}
|
|
2701
2884
|
/**
|
|
2702
2885
|
* Handle mouse click events.
|
|
@@ -2746,12 +2929,12 @@ class N extends Se {
|
|
|
2746
2929
|
* @return {void}
|
|
2747
2930
|
*/
|
|
2748
2931
|
onHeaderDblClicked(e, t, s) {
|
|
2749
|
-
var i,
|
|
2932
|
+
var i, r;
|
|
2750
2933
|
const o = this.tableModel.getColumnDef(s);
|
|
2751
2934
|
if (o != null && o.sortable && o.sortable()) {
|
|
2752
2935
|
e.preventDefault(), e.stopPropagation();
|
|
2753
|
-
const
|
|
2754
|
-
this.tableModel.doSort([c]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((d) => d.sortState = ""), o.sortState = n), this.repaint(), (
|
|
2936
|
+
const a = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, l = o.sortState ?? "", n = a[(a.indexOf(l) + 1) % a.length], c = new Ce(s, n);
|
|
2937
|
+
this.tableModel.doSort([c]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((d) => d.sortState = ""), o.sortState = n), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([c]);
|
|
2755
2938
|
}
|
|
2756
2939
|
}
|
|
2757
2940
|
/**
|
|
@@ -2895,11 +3078,11 @@ class N extends Se {
|
|
|
2895
3078
|
if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.getRowId && this.storeStateCollapsedExpandService) {
|
|
2896
3079
|
const s = this.tableOptions.autoRestoreOptions, o = s.getRowId;
|
|
2897
3080
|
if (s.autoRestoreCollapsedExpandedState && o) {
|
|
2898
|
-
const i = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(),
|
|
2899
|
-
if (
|
|
2900
|
-
const
|
|
3081
|
+
const i = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), r = this.tableModel.getAreaModel("body");
|
|
3082
|
+
if (H(r)) {
|
|
3083
|
+
const a = r, l = r.getRowCount();
|
|
2901
3084
|
for (let n = 0; n < l; n++) {
|
|
2902
|
-
const c =
|
|
3085
|
+
const c = r.getRowByIndex(n);
|
|
2903
3086
|
if (c)
|
|
2904
3087
|
if (i.allExpanded)
|
|
2905
3088
|
c.expanded = !0;
|
|
@@ -2910,7 +3093,7 @@ class N extends Se {
|
|
|
2910
3093
|
i.mode === "expanded" ? c.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h) : i.mode === "collapsed" && (c.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h));
|
|
2911
3094
|
}
|
|
2912
3095
|
}
|
|
2913
|
-
|
|
3096
|
+
a.recalcVisibleTreeRows();
|
|
2914
3097
|
}
|
|
2915
3098
|
}
|
|
2916
3099
|
}
|
|
@@ -2921,9 +3104,9 @@ class N extends Se {
|
|
|
2921
3104
|
return console.warn("Body model is not available."), [];
|
|
2922
3105
|
const o = new Array(t).fill(0);
|
|
2923
3106
|
for (let i = 0; i < s; i++)
|
|
2924
|
-
for (let
|
|
2925
|
-
const
|
|
2926
|
-
l > o[
|
|
3107
|
+
for (let r = 0; r < t; r++) {
|
|
3108
|
+
const a = e.getValueAt(i, r), l = (a == null ? void 0 : a.toString().length) || 0;
|
|
3109
|
+
l > o[r] && (o[r] = l);
|
|
2927
3110
|
}
|
|
2928
3111
|
return o.map((i) => Math.max(i * 10, 50));
|
|
2929
3112
|
}
|
|
@@ -2941,10 +3124,15 @@ class N extends Se {
|
|
|
2941
3124
|
recalcWrappers() {
|
|
2942
3125
|
this.tableModel.recalcPadding(), this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows();
|
|
2943
3126
|
}
|
|
3127
|
+
reSort() {
|
|
3128
|
+
var t;
|
|
3129
|
+
let e = ((t = this.storeSortingService) == null ? void 0 : t.getSortItems()) ?? [];
|
|
3130
|
+
this.tableModel.doSort(e);
|
|
3131
|
+
}
|
|
2944
3132
|
}
|
|
2945
|
-
const
|
|
3133
|
+
const B = class B {
|
|
2946
3134
|
};
|
|
2947
|
-
|
|
3135
|
+
B.themes = ["light", "combat", "paper", "blackboard"], B.vars = {
|
|
2948
3136
|
light: `html[data-theme="light"] {
|
|
2949
3137
|
--ge-table-bg: rgba(255,255,255, 0.5);
|
|
2950
3138
|
--ge-table-header-west-bg: rgba(233, 233, 233, 0.5);
|
|
@@ -3178,30 +3366,30 @@ O.themes = ["light", "combat", "paper", "blackboard"], O.vars = {
|
|
|
3178
3366
|
--ge-table-drop-zone-bg: #758129;
|
|
3179
3367
|
}`
|
|
3180
3368
|
};
|
|
3181
|
-
let X =
|
|
3182
|
-
const
|
|
3369
|
+
let X = B;
|
|
3370
|
+
const P = class P {
|
|
3183
3371
|
constructor(e = new Z()) {
|
|
3184
3372
|
this.headerGroupOptions = e;
|
|
3185
3373
|
}
|
|
3186
|
-
render(e, t, s, o, i,
|
|
3187
|
-
const l =
|
|
3188
|
-
if (
|
|
3189
|
-
const { toggle: n, visibility: c, closed: h } =
|
|
3190
|
-
this.addText(e, o, t, s, l, d), n && c !== "always" && this.addArrowDiv(
|
|
3374
|
+
render(e, t, s, o, i, r, a) {
|
|
3375
|
+
const l = r != null && r.data ? r.data : "";
|
|
3376
|
+
if (r) {
|
|
3377
|
+
const { toggle: n, visibility: c, closed: h } = r, d = n ? P.toggleHeaderGroup : "";
|
|
3378
|
+
this.addText(e, o, t, s, l, d), n && c !== "always" && this.addArrowDiv(a, e, !h, t, s, o, d);
|
|
3191
3379
|
} else
|
|
3192
3380
|
this.addText(e, o, t, s, l, "");
|
|
3193
3381
|
}
|
|
3194
|
-
addText(e, t, s, o, i,
|
|
3382
|
+
addText(e, t, s, o, i, r) {
|
|
3195
3383
|
e.innerHTML = `<span
|
|
3196
|
-
data-ge-action="${
|
|
3384
|
+
data-ge-action="${r}"
|
|
3197
3385
|
data-area="${t}"
|
|
3198
3386
|
data-row-index="${s}"
|
|
3199
3387
|
data-col-index="${o}"
|
|
3200
3388
|
>${i}</span>`;
|
|
3201
3389
|
}
|
|
3202
|
-
addArrowDiv(e, t, s = !0, o = -1, i = -1,
|
|
3390
|
+
addArrowDiv(e, t, s = !0, o = -1, i = -1, r = "header", a) {
|
|
3203
3391
|
const l = e.createElement("div");
|
|
3204
|
-
e.addClass(l, "ge-table-toggle-icon-div"), e.setStyle(l, "display", "inline-block"), e.setStyle(l, "position", ""), e.setStyle(l, "width", "20px"), e.setStyle(l, "background", "transparent"), e.setStyle(l, "cursor", "pointer"), e.setAttribute(l, "data-row-index", `${o}`), e.setAttribute(l, "data-col-index", `${i}`), e.setAttribute(l, "data-area", `${
|
|
3392
|
+
e.addClass(l, "ge-table-toggle-icon-div"), e.setStyle(l, "display", "inline-block"), e.setStyle(l, "position", ""), e.setStyle(l, "width", "20px"), e.setStyle(l, "background", "transparent"), e.setStyle(l, "cursor", "pointer"), e.setAttribute(l, "data-row-index", `${o}`), e.setAttribute(l, "data-col-index", `${i}`), e.setAttribute(l, "data-area", `${r}`), e.setAttribute(l, "data-ge-action", `${a}`);
|
|
3205
3393
|
let n;
|
|
3206
3394
|
s ? n = this.headerGroupOptions.iconExpanded : n = this.headerGroupOptions.iconCollapsed;
|
|
3207
3395
|
const c = n.content, h = e.createText(c);
|
|
@@ -3213,14 +3401,14 @@ const B = class B {
|
|
|
3213
3401
|
applyStyleString(e, t, s) {
|
|
3214
3402
|
const o = s.split(";").map((i) => i.trim()).filter((i) => i);
|
|
3215
3403
|
for (const i of o) {
|
|
3216
|
-
const [
|
|
3217
|
-
e.setStyle(t,
|
|
3404
|
+
const [r, a] = i.split(":");
|
|
3405
|
+
e.setStyle(t, r.trim(), a.trim());
|
|
3218
3406
|
}
|
|
3219
3407
|
}
|
|
3220
3408
|
};
|
|
3221
|
-
|
|
3222
|
-
let K =
|
|
3223
|
-
const
|
|
3409
|
+
P.toggleHeaderGroup = "toggleHeaderGroup";
|
|
3410
|
+
let K = P;
|
|
3411
|
+
const Pe = ee({
|
|
3224
3412
|
inheritAttrs: !1,
|
|
3225
3413
|
props: {
|
|
3226
3414
|
tableModel: {
|
|
@@ -3256,41 +3444,41 @@ const Le = ee({
|
|
|
3256
3444
|
setup(g, { emit: e }) {
|
|
3257
3445
|
const t = te(null), s = (o) => {
|
|
3258
3446
|
const i = {
|
|
3259
|
-
onSelectionChanged: (
|
|
3260
|
-
e("selectionChanged",
|
|
3447
|
+
onSelectionChanged: (a) => {
|
|
3448
|
+
e("selectionChanged", a);
|
|
3261
3449
|
},
|
|
3262
|
-
onFocusChanged: (
|
|
3263
|
-
e("focusChanged",
|
|
3450
|
+
onFocusChanged: (a) => {
|
|
3451
|
+
e("focusChanged", a);
|
|
3264
3452
|
},
|
|
3265
|
-
onCheckboxChanged: (
|
|
3266
|
-
e("checkboxChanged",
|
|
3453
|
+
onCheckboxChanged: (a) => {
|
|
3454
|
+
e("checkboxChanged", a);
|
|
3267
3455
|
},
|
|
3268
|
-
onContextmenu: (
|
|
3269
|
-
e("contextmenu",
|
|
3456
|
+
onContextmenu: (a) => {
|
|
3457
|
+
e("contextmenu", a);
|
|
3270
3458
|
},
|
|
3271
|
-
onModelChanged: (
|
|
3272
|
-
e("modelChanged",
|
|
3459
|
+
onModelChanged: (a) => {
|
|
3460
|
+
e("modelChanged", a);
|
|
3273
3461
|
},
|
|
3274
|
-
onMouseClicked: (
|
|
3275
|
-
e("mouseClicked",
|
|
3462
|
+
onMouseClicked: (a) => {
|
|
3463
|
+
e("mouseClicked", a);
|
|
3276
3464
|
},
|
|
3277
|
-
onMouseDragging: (
|
|
3278
|
-
e("mouseDragging",
|
|
3465
|
+
onMouseDragging: (a) => {
|
|
3466
|
+
e("mouseDragging", a);
|
|
3279
3467
|
},
|
|
3280
|
-
onMouseDraggingEnd: (
|
|
3281
|
-
e("mouseDraggingEnd",
|
|
3468
|
+
onMouseDraggingEnd: (a) => {
|
|
3469
|
+
e("mouseDraggingEnd", a);
|
|
3282
3470
|
},
|
|
3283
|
-
onMouseMoved: (
|
|
3284
|
-
e("mouseMoved",
|
|
3471
|
+
onMouseMoved: (a) => {
|
|
3472
|
+
e("mouseMoved", a);
|
|
3285
3473
|
}
|
|
3286
|
-
},
|
|
3474
|
+
}, r = new z(
|
|
3287
3475
|
o,
|
|
3288
3476
|
g.tableModel,
|
|
3289
3477
|
new J(),
|
|
3290
3478
|
g.tableOptions,
|
|
3291
3479
|
i
|
|
3292
3480
|
);
|
|
3293
|
-
|
|
3481
|
+
r.firstInit(), e("tableReady", r.getApi());
|
|
3294
3482
|
};
|
|
3295
3483
|
return se(() => {
|
|
3296
3484
|
t.value && s(t.value);
|
|
@@ -3298,25 +3486,25 @@ const Le = ee({
|
|
|
3298
3486
|
root: t
|
|
3299
3487
|
};
|
|
3300
3488
|
}
|
|
3301
|
-
}),
|
|
3489
|
+
}), We = (g, e) => {
|
|
3302
3490
|
const t = g.__vccOpts || g;
|
|
3303
3491
|
for (const [s, o] of e)
|
|
3304
3492
|
t[s] = o;
|
|
3305
3493
|
return t;
|
|
3306
|
-
},
|
|
3494
|
+
}, He = {
|
|
3307
3495
|
ref: "root",
|
|
3308
3496
|
class: "container-div",
|
|
3309
3497
|
style: { width: "100%", height: "100%", "background-color": "transparent", padding: "0", margin: "0" }
|
|
3310
3498
|
};
|
|
3311
|
-
function
|
|
3312
|
-
return ie(), oe("div",
|
|
3499
|
+
function $e(g, e, t, s, o, i) {
|
|
3500
|
+
return ie(), oe("div", He, null, 512);
|
|
3313
3501
|
}
|
|
3314
|
-
const
|
|
3315
|
-
class
|
|
3502
|
+
const Ve = /* @__PURE__ */ We(Pe, [["render", $e]]);
|
|
3503
|
+
class Ge {
|
|
3316
3504
|
constructor(e, t) {
|
|
3317
3505
|
this.component = e, this.appContext = t;
|
|
3318
3506
|
}
|
|
3319
|
-
render(e, t, s, o, i,
|
|
3507
|
+
render(e, t, s, o, i, r, a) {
|
|
3320
3508
|
return this.mount(
|
|
3321
3509
|
this.component,
|
|
3322
3510
|
{
|
|
@@ -3325,26 +3513,26 @@ class He {
|
|
|
3325
3513
|
columnIndex: s,
|
|
3326
3514
|
areaIdent: o,
|
|
3327
3515
|
areaModel: i,
|
|
3328
|
-
cellValue:
|
|
3516
|
+
cellValue: r
|
|
3329
3517
|
},
|
|
3330
3518
|
this.appContext,
|
|
3331
3519
|
e
|
|
3332
3520
|
);
|
|
3333
3521
|
}
|
|
3334
3522
|
mount(e, t, s, o) {
|
|
3335
|
-
let i =
|
|
3523
|
+
let i = re(e, t);
|
|
3336
3524
|
return i.appContext = s, U(i, o), () => {
|
|
3337
3525
|
o && U(null, o);
|
|
3338
3526
|
};
|
|
3339
3527
|
}
|
|
3340
3528
|
}
|
|
3341
|
-
const
|
|
3529
|
+
const ze = {
|
|
3342
3530
|
install: (g, e = { img: "" }) => {
|
|
3343
|
-
g.component("GuiexpertTable",
|
|
3531
|
+
g.component("GuiexpertTable", Ve);
|
|
3344
3532
|
}
|
|
3345
3533
|
};
|
|
3346
3534
|
export {
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3535
|
+
Ge as ComponentRendererWrapper,
|
|
3536
|
+
Ve as GuiexpertTable,
|
|
3537
|
+
ze as default
|
|
3350
3538
|
};
|