@guiexpert/vue3-table 3.0.12 → 3.0.14
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 +30 -14
- package/index.js +901 -767
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as ee, ref as te, onMounted as
|
|
2
|
-
function
|
|
1
|
+
import { defineComponent as ee, ref as te, onMounted as se, openBlock as oe, createElementBlock as ie, createVNode as ae, render as U } from "vue";
|
|
2
|
+
function re(g, e = 500) {
|
|
3
3
|
let t = null;
|
|
4
|
-
return function(...
|
|
4
|
+
return function(...s) {
|
|
5
5
|
t && window.clearTimeout(t), t = window.setTimeout(() => {
|
|
6
|
-
|
|
6
|
+
g.apply(this, s), t = null;
|
|
7
7
|
}, e);
|
|
8
8
|
};
|
|
9
9
|
}
|
|
@@ -32,18 +32,18 @@ class k {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
35
|
+
function $(g) {
|
|
36
|
+
return g && g.type === "TreeRow";
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
return
|
|
38
|
+
function H(g) {
|
|
39
|
+
return g && g.type === "AreaModelTree";
|
|
40
40
|
}
|
|
41
|
-
class
|
|
42
|
-
constructor(e = -1, t = -1,
|
|
43
|
-
this.rowIndex = e, this.rowTop = t, this.columnIndex =
|
|
41
|
+
class W {
|
|
42
|
+
constructor(e = -1, t = -1, s = -1, o = -1, i, a, r, 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 = a, this.originalEvent = r, this.clickCount = l, this.draggingX = n, this.draggingY = c, this.action = h;
|
|
44
44
|
}
|
|
45
45
|
clone() {
|
|
46
|
-
return new
|
|
46
|
+
return new W(
|
|
47
47
|
this.rowIndex,
|
|
48
48
|
this.rowTop,
|
|
49
49
|
this.columnIndex,
|
|
@@ -59,11 +59,11 @@ class P {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
class D {
|
|
62
|
-
constructor(e = ">", t = "",
|
|
63
|
-
this.content = e, this.style = t, this.classes =
|
|
62
|
+
constructor(e = ">", t = "", s = []) {
|
|
63
|
+
this.content = e, this.style = t, this.classes = s;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
class
|
|
66
|
+
class Y {
|
|
67
67
|
constructor(e = new D(
|
|
68
68
|
">",
|
|
69
69
|
"transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
|
|
@@ -72,33 +72,33 @@ class q {
|
|
|
72
72
|
">",
|
|
73
73
|
"",
|
|
74
74
|
["ge-table-tree-arrow-collapsed"]
|
|
75
|
-
),
|
|
75
|
+
), s = new D(
|
|
76
76
|
">",
|
|
77
77
|
"color:transparent;",
|
|
78
78
|
["gt-table-tree-arrow-hidden"]
|
|
79
|
-
),
|
|
79
|
+
), o = new D(
|
|
80
80
|
"↕",
|
|
81
81
|
"",
|
|
82
82
|
["gt-table-tree-arrow-expanded-all"]
|
|
83
83
|
)) {
|
|
84
|
-
this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder =
|
|
84
|
+
this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = s, this.arrowExpandCollapseAll = o;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
class
|
|
88
|
-
constructor(e = new D("↑", "", ["ge-header-sorted-asc"]), t = new D("↓", "", ["ge-header-sorted-desc"]),
|
|
89
|
-
this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder =
|
|
87
|
+
class q {
|
|
88
|
+
constructor(e = new D("↑", "", ["ge-header-sorted-asc"]), t = new D("↓", "", ["ge-header-sorted-desc"]), s = new D("↑", "color:transparent;", [])) {
|
|
89
|
+
this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = s;
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
class
|
|
92
|
+
class le {
|
|
93
93
|
constructor(e) {
|
|
94
94
|
this.domService = e;
|
|
95
95
|
}
|
|
96
|
-
setStyle(e, t,
|
|
97
|
-
return this.domService.setStyle(e, t,
|
|
96
|
+
setStyle(e, t, s) {
|
|
97
|
+
return this.domService.setStyle(e, t, s), e;
|
|
98
98
|
}
|
|
99
99
|
applyStyle(e, t) {
|
|
100
|
-
for (const
|
|
101
|
-
this.domService.setStyle(e,
|
|
100
|
+
for (const s in t)
|
|
101
|
+
this.domService.setStyle(e, s, t[s]);
|
|
102
102
|
return e;
|
|
103
103
|
}
|
|
104
104
|
applyDisplayNoneStyle(e) {
|
|
@@ -108,7 +108,7 @@ class ae {
|
|
|
108
108
|
return this.domService.setStyle(e, "display", "block"), e;
|
|
109
109
|
}
|
|
110
110
|
applyStyleInPx(e, t) {
|
|
111
|
-
return Object.entries(t).forEach(([
|
|
111
|
+
return Object.entries(t).forEach(([s, o]) => this.domService.setStyle(e, s, o + "px")), e;
|
|
112
112
|
}
|
|
113
113
|
applyStylePosistionRelative(e) {
|
|
114
114
|
return this.domService.setStyle(e, "position", "relative"), this.domService.setStyle(e, "overflow", "clip"), e;
|
|
@@ -119,8 +119,8 @@ class ae {
|
|
|
119
119
|
applyStyleFullSize(e) {
|
|
120
120
|
return this.domService.setStyle(e, "width", "100%"), this.domService.setStyle(e, "height", "100%"), e;
|
|
121
121
|
}
|
|
122
|
-
applyStyleOverflowAuto(e = "auto", t = "auto",
|
|
123
|
-
return this.domService.setStyle(
|
|
122
|
+
applyStyleOverflowAuto(e = "auto", t = "auto", s) {
|
|
123
|
+
return this.domService.setStyle(s, "overflow-x", e), this.domService.setStyle(s, "overflow-y", t), s;
|
|
124
124
|
}
|
|
125
125
|
applyStyleNoPadding(e) {
|
|
126
126
|
return this.domService.setStyle(e, "padding", "0"), this.domService.setStyle(e, "margin", "0"), this.domService.setStyle(e, "border", "0"), e;
|
|
@@ -136,155 +136,155 @@ class ae {
|
|
|
136
136
|
return this.domService.appendChild(e, t), this.applyStylePosistionAbsolute(e), { parent: e, child: t, cache: {} };
|
|
137
137
|
}
|
|
138
138
|
appendText(e, t) {
|
|
139
|
-
const
|
|
140
|
-
return this.domService.appendChild(e,
|
|
139
|
+
const s = this.domService.createText(t);
|
|
140
|
+
return this.domService.appendChild(e, s), s;
|
|
141
141
|
}
|
|
142
142
|
addClass(e, t) {
|
|
143
|
-
return e.includes(" ") ? e.split(" ").forEach((
|
|
143
|
+
return e.includes(" ") ? e.split(" ").forEach((s) => this.domService.addClass(t, s)) : this.domService.addClass(t, e), t;
|
|
144
144
|
}
|
|
145
145
|
removeClass(e, t) {
|
|
146
|
-
return e.includes(" ") ? e.split(" ").forEach((
|
|
146
|
+
return e.includes(" ") ? e.split(" ").forEach((s) => this.domService.removeClass(t, s)) : this.domService.removeClass(t, e), t;
|
|
147
147
|
}
|
|
148
148
|
addClasses(e, t) {
|
|
149
149
|
if (e)
|
|
150
|
-
for (const
|
|
151
|
-
this.domService.addClass(t,
|
|
150
|
+
for (const s of e)
|
|
151
|
+
this.domService.addClass(t, s);
|
|
152
152
|
return t;
|
|
153
153
|
}
|
|
154
|
-
setAttribute(e, t,
|
|
155
|
-
return t &&
|
|
154
|
+
setAttribute(e, t, s) {
|
|
155
|
+
return t && s && this.domService.setAttribute(e, t, s), e;
|
|
156
156
|
}
|
|
157
|
-
createAreaDivWithClass(e, t,
|
|
157
|
+
createAreaDivWithClass(e, t, s, o) {
|
|
158
158
|
const i = this.domService.createElement("div");
|
|
159
|
-
return this.addClass(e, i), this.domService.setAttribute(i, "data-area",
|
|
159
|
+
return this.addClass(e, i), this.domService.setAttribute(i, "data-area", s), this.domService.setAttribute(i, "data-side", o), this.domService.appendChild(t, i), i;
|
|
160
160
|
}
|
|
161
161
|
createDivWithClass(e, t) {
|
|
162
|
-
const
|
|
163
|
-
return this.addClass(e,
|
|
162
|
+
const s = this.domService.createElement("div");
|
|
163
|
+
return this.addClass(e, s), this.domService.appendChild(t, s), s;
|
|
164
164
|
}
|
|
165
|
-
addRowDiv(e, t,
|
|
166
|
-
const
|
|
167
|
-
if (this.domService.addClass(l, "ge-table-row-div"), this.domService.addClass(l, `ge-table-row-div-${t.index}`),
|
|
165
|
+
addRowDiv(e, t, s = -1, o, i, a = "") {
|
|
166
|
+
const r = t.index ?? -1, l = this.getDivOrCreateDiv(r, e);
|
|
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", `${
|
|
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}`), a) {
|
|
172
|
+
const n = this.domService.createText(a);
|
|
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:
|
|
179
|
-
this.domService.addClass(
|
|
180
|
-
const
|
|
181
|
-
if (
|
|
182
|
-
const
|
|
183
|
-
this.addLabelDiv(
|
|
178
|
+
const { parent: t, geo: s, rowIndex: o = -1, columnIndex: i = -1, areaIdent: a, sideIdent: r, text: l = "", treeArrow: n, tableOptions: c, checkedType: h = void 0, sortState: d } = e, u = 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", `${a}`);
|
|
180
|
+
const f = ((s == null ? void 0 : s.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
181
|
+
if (a === "body" && r === "center" && this.domService.addClass(b, `ge-table-column-${f}`), 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, u, o, i, a)), p && i === 0 && h && this.addCheckboxToDiv(b, h, a, o), l) {
|
|
182
|
+
const m = n !== "none" && i === 0;
|
|
183
|
+
this.addLabelDiv(b, l, m, o, i, a);
|
|
184
184
|
}
|
|
185
|
-
return
|
|
185
|
+
return d && this.addSortedIcon(b, d, c == null ? void 0 : c.sortedOptions, i), this.domService.appendChild(t, b), b;
|
|
186
186
|
}
|
|
187
|
-
addCheckboxToDiv(e, t,
|
|
188
|
-
const i = this.domService.createElement("div"),
|
|
187
|
+
addCheckboxToDiv(e, t, s, o) {
|
|
188
|
+
const i = this.domService.createElement("div"), a = t === "full" ? "checked" : "";
|
|
189
189
|
return i.innerHTML = `
|
|
190
190
|
<input
|
|
191
191
|
type="checkbox"
|
|
192
|
-
data-area="${
|
|
193
|
-
data-row-index="${
|
|
192
|
+
data-area="${s}"
|
|
193
|
+
data-row-index="${o}"
|
|
194
194
|
data-input-type="checkbox"
|
|
195
|
-
${
|
|
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", `${
|
|
195
|
+
${a}
|
|
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 = "",
|
|
199
|
-
const
|
|
200
|
-
if (this.domService.addClass(
|
|
201
|
-
if (
|
|
198
|
+
addLabelDiv(e, t = "", s = !1, o = -1, i = -1, a = "body") {
|
|
199
|
+
const r = this.domService.createElement("div");
|
|
200
|
+
if (this.domService.addClass(r, "ge-table-label-div"), this.domService.setStyle(r, "position", "relative"), this.domService.setStyle(r, "background", "transparent"), this.domService.setStyle(r, "width", "100%"), this.domService.setStyle(r, "height", "100%"), this.domService.setAttribute(r, "data-row-index", `${o}`), this.domService.setAttribute(r, "data-col-index", `${i}`), this.domService.setAttribute(r, "data-area", `${a}`), t)
|
|
201
|
+
if (s) {
|
|
202
202
|
const l = this.domService.createText(t);
|
|
203
|
-
this.domService.appendChild(
|
|
203
|
+
this.domService.appendChild(r, l);
|
|
204
204
|
} else {
|
|
205
205
|
const l = this.domService.createElement("div");
|
|
206
|
-
this.domService.appendChild(
|
|
206
|
+
this.domService.appendChild(r, 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", `${
|
|
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", `${a}`);
|
|
209
209
|
}
|
|
210
|
-
return this.domService.appendChild(e,
|
|
210
|
+
return this.domService.appendChild(e, r), r;
|
|
211
211
|
}
|
|
212
|
-
addSortedIcon(e, t = "",
|
|
212
|
+
addSortedIcon(e, t = "", s = new q(), o = -1) {
|
|
213
213
|
const i = this.domService.createElement("div");
|
|
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", `${
|
|
215
|
-
let
|
|
216
|
-
t === "asc" ?
|
|
217
|
-
const
|
|
218
|
-
this.domService.appendChild(i, l),
|
|
219
|
-
for (const n of
|
|
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 a;
|
|
216
|
+
t === "asc" ? a = s.iconAsc : t === "desc" ? a = s.iconDesc : a = s.iconPlaceholder;
|
|
217
|
+
const r = a.content, l = this.domService.createText(r);
|
|
218
|
+
this.domService.appendChild(i, l), a.style && this.applyStyleString(i, a.style);
|
|
219
|
+
for (const n of a.classes)
|
|
220
220
|
this.domService.addClass(i, n);
|
|
221
221
|
return this.domService.appendChild(e, i), i;
|
|
222
222
|
}
|
|
223
|
-
addArrowDiv(e, t = "none",
|
|
224
|
-
const
|
|
225
|
-
this.domService.addClass(
|
|
223
|
+
addArrowDiv(e, t = "none", s = new Y(), o = -1, i = -1, a = "body") {
|
|
224
|
+
const r = this.domService.createElement("div");
|
|
225
|
+
this.domService.addClass(r, "ge-table-tree-arrow-div"), this.domService.setStyle(r, "display", "inline-block"), this.domService.setStyle(r, "position", ""), this.domService.setStyle(r, "width", "20px"), this.domService.setStyle(r, "background", "transparent"), this.domService.setStyle(r, "cursor", "pointer"), this.domService.setAttribute(r, "data-row-index", `${o}`), this.domService.setAttribute(r, "data-col-index", `${i}`), this.domService.setAttribute(r, "data-area", `${a}`);
|
|
226
226
|
let l;
|
|
227
|
-
t === "expanded" ? l =
|
|
228
|
-
const n = l.content,
|
|
229
|
-
this.domService.appendChild(
|
|
230
|
-
for (const
|
|
231
|
-
this.domService.addClass(
|
|
232
|
-
return this.domService.appendChild(e,
|
|
233
|
-
}
|
|
234
|
-
addColumnBorderDivs(e, t,
|
|
227
|
+
t === "expanded" ? l = s.arrowExpanded : t === "collapsed" ? l = s.arrowCollapsed : l = s.arrowPlaceholder;
|
|
228
|
+
const n = l.content, c = this.domService.createText(n);
|
|
229
|
+
this.domService.appendChild(r, c), l.style && this.applyStyleString(r, l.style);
|
|
230
|
+
for (const h of l.classes)
|
|
231
|
+
this.domService.addClass(r, h);
|
|
232
|
+
return this.domService.appendChild(e, r), r;
|
|
233
|
+
}
|
|
234
|
+
addColumnBorderDivs(e, t, s, o, i) {
|
|
235
235
|
if (e.verticalBorderVisible) {
|
|
236
|
-
const
|
|
237
|
-
this.addVerticalBorder(
|
|
236
|
+
const a = `ge-table-${o}-${i}-vertical-border`;
|
|
237
|
+
this.addVerticalBorder(s, t, a);
|
|
238
238
|
}
|
|
239
239
|
if (e.horizontalBorderVisible) {
|
|
240
|
-
const
|
|
241
|
-
this.addHorizontalBorder(
|
|
240
|
+
const a = `ge-table-${o}-${i}-horizontal-border`;
|
|
241
|
+
this.addHorizontalBorder(s, t, a);
|
|
242
242
|
}
|
|
243
243
|
return t;
|
|
244
244
|
}
|
|
245
|
-
addHorizontalBorder(e, t,
|
|
246
|
-
const
|
|
247
|
-
return this.domService.addClass(
|
|
245
|
+
addHorizontalBorder(e, t, s = "ge-table-body-center-horizontal-border") {
|
|
246
|
+
const o = this.domService.createElement("div");
|
|
247
|
+
return this.domService.addClass(o, s), this.domService.setStyle(o, "display", "clip"), this.domService.setStyle(o, "position", "absolute"), this.domService.setStyle(o, "left", `${e.left}px`), this.domService.setStyle(o, "top", `${e.top}px`), this.domService.setStyle(o, "width", `${e.width}px`), this.domService.setStyle(o, "height", "1px"), this.domService.appendChild(t, o), o;
|
|
248
248
|
}
|
|
249
|
-
addFocusBorderDivs(e, t,
|
|
249
|
+
addFocusBorderDivs(e, t, s) {
|
|
250
250
|
t = { ...t, width: t.width + 1, height: t.height + 1 };
|
|
251
|
-
let
|
|
252
|
-
return this.domService.addClass(
|
|
251
|
+
let o = this.domService.createElement("div");
|
|
252
|
+
return this.domService.addClass(o, "ge-table-focus-border"), this.domService.setStyle(o, "display", "clip"), this.domService.setStyle(o, "position", "absolute"), this.domService.setStyle(o, "left", `${t.left}px`), this.domService.setStyle(o, "top", `${t.top}px`), this.domService.setStyle(o, "width", "1px"), this.domService.setStyle(o, "height", `${t.height}px`), this.domService.setStyle(o, "z-index", "9999"), this.applyStyle(o, s), this.domService.appendChild(e, o), o = this.domService.createElement("div"), this.domService.addClass(o, "ge-table-focus-border"), this.domService.setStyle(o, "display", "clip"), this.domService.setStyle(o, "position", "absolute"), this.domService.setStyle(o, "left", `${t.left + t.width - 1}px`), this.domService.setStyle(o, "top", `${t.top}px`), this.domService.setStyle(o, "width", "1px"), this.domService.setStyle(o, "height", `${t.height}px`), this.domService.setStyle(o, "z-index", "9999"), this.applyStyle(o, s), this.domService.appendChild(e, o), o = this.domService.createElement("div"), this.domService.addClass(o, "ge-table-focus-border"), this.domService.setStyle(o, "display", "clip"), this.domService.setStyle(o, "position", "absolute"), this.domService.setStyle(o, "left", `${t.left}px`), this.domService.setStyle(o, "top", `${t.top}px`), this.domService.setStyle(o, "width", `${t.width}px`), this.domService.setStyle(o, "height", "1px"), this.domService.setStyle(o, "z-index", "9999"), this.applyStyle(o, s), this.domService.appendChild(e, o), o = this.domService.createElement("div"), this.domService.addClass(o, "ge-table-focus-border"), this.domService.setStyle(o, "display", "clip"), this.domService.setStyle(o, "position", "absolute"), this.domService.setStyle(o, "left", `${t.left}px`), this.domService.setStyle(o, "top", `${t.top + t.height - 1}px`), this.domService.setStyle(o, "width", `${t.width}px`), this.domService.setStyle(o, "height", "1px"), this.domService.setStyle(o, "z-index", "9999"), this.applyStyle(o, s), this.domService.appendChild(e, o), e;
|
|
253
253
|
}
|
|
254
|
-
addVerticalBorder(e, t,
|
|
255
|
-
const
|
|
256
|
-
return this.domService.addClass(
|
|
254
|
+
addVerticalBorder(e, t, s = "ge-table-body-center-vertical-border") {
|
|
255
|
+
const o = this.domService.createElement("div");
|
|
256
|
+
return this.domService.addClass(o, s), this.domService.setStyle(o, "display", "clip"), this.domService.setStyle(o, "position", "absolute"), this.domService.setStyle(o, "left", `${e.left}px`), this.domService.setStyle(o, "top", `${e.top}px`), this.domService.setStyle(o, "width", "1px"), this.domService.setStyle(o, "height", `${e.height}px`), this.domService.appendChild(t, o), o;
|
|
257
257
|
}
|
|
258
|
-
addDiv(e, t,
|
|
259
|
-
const
|
|
260
|
-
return
|
|
258
|
+
addDiv(e, t, s = "") {
|
|
259
|
+
const o = this.domService.createElement("div");
|
|
260
|
+
return s && this.domService.addClass(o, s), this.domService.setStyle(o, "display", "clip"), this.domService.setStyle(o, "position", "absolute"), this.domService.setStyle(o, "left", `${t.left}px`), this.domService.setStyle(o, "top", `${t.top}px`), this.domService.setStyle(o, "width", `${t.width}px`), this.domService.setStyle(o, "height", `${t.height}px`), this.domService.appendChild(e, o), o;
|
|
261
261
|
}
|
|
262
262
|
applyStyleString(e, t) {
|
|
263
|
-
const
|
|
264
|
-
for (const
|
|
265
|
-
const [i,
|
|
266
|
-
this.domService.setStyle(e, i.trim(),
|
|
263
|
+
const s = t.split(";").map((o) => o.trim()).filter((o) => o);
|
|
264
|
+
for (const o of s) {
|
|
265
|
+
const [i, a] = o.split(":");
|
|
266
|
+
this.domService.setStyle(e, i.trim(), a.trim());
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
getDivOrCreateDiv(e, t) {
|
|
270
|
-
let
|
|
271
|
-
return
|
|
270
|
+
let s = t.cache[e];
|
|
271
|
+
return s ? (s.innerText = "", s) : (s = this.domService.createElement("div"), t.cache[e] = s, s);
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
-
const
|
|
274
|
+
const V = (g) => g === "header" ? "header" : g === "footer" ? "footer" : "body";
|
|
275
275
|
class ne {
|
|
276
276
|
constructor(e, t) {
|
|
277
277
|
if (this.rowIdx = -1, this.colIdx = -1, this.action = null, this.inputType = null, this.className = "", e !== null && (e instanceof HTMLDivElement || e instanceof HTMLSpanElement || e instanceof HTMLInputElement)) {
|
|
278
278
|
this.className = e.className, this.action = e.getAttribute("data-ge-action"), this.inputType = e.getAttribute("data-input-type"), this.rowIdx = Number(e.getAttribute("data-row-index")), this.colIdx = Number(e.getAttribute("data-col-index"));
|
|
279
|
-
const
|
|
280
|
-
if (
|
|
281
|
-
const
|
|
282
|
-
this.value =
|
|
279
|
+
const s = e.getAttribute("data-area");
|
|
280
|
+
if (s && (this.areaIdent = V(s), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
|
|
281
|
+
const o = e;
|
|
282
|
+
this.value = o.value;
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
|
-
class
|
|
287
|
+
class ce {
|
|
288
288
|
constructor(e) {
|
|
289
289
|
this.tableScope = e, this.doubleClickDelay = 500, this.expandedAll = !0, this.mouseDown = !1, this.dragging = !1, this.lastClicked = 0, this.tableScope.hostElement.addEventListener("click", this.onHostElementClicked.bind(this)), this.tableScope.hostElement.addEventListener("dblclick", this.onHostElementDblClicked.bind(this)), this.tableScope.hostElement.addEventListener("mousedown", this.onMouseDown.bind(this)), this.tableScope.hostElement.addEventListener("mousemove", this.onMouseMove.bind(this)), this.tableScope.hostElement.addEventListener("mouseup", this.onMouseUp.bind(this)), this.tableScope.hostElement.addEventListener("contextmenu", this.onContextmenu.bind(this)), this.tableScope.hostElement._MouseHandler = "true", this.tableScope.scrollViewport.addEventListener("scroll", this.tableScope.adjustAfterScrolling.bind(this.tableScope)), [window, this.tableScope.hostElement].forEach(
|
|
290
290
|
(t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
|
|
@@ -314,24 +314,24 @@ class de {
|
|
|
314
314
|
if (t - this.lastClicked < this.doubleClickDelay)
|
|
315
315
|
return;
|
|
316
316
|
this.lastClicked = t;
|
|
317
|
-
const
|
|
318
|
-
if (
|
|
317
|
+
const s = new ne(e.target, this.tableScope);
|
|
318
|
+
if (s.action === "toggleExpandCollapseAll")
|
|
319
319
|
this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
|
|
320
|
-
else if (
|
|
321
|
-
this.tableScope.toggleHeaderGroup(
|
|
322
|
-
else if (
|
|
323
|
-
this.tableScope.toggleRowCheckbox(
|
|
324
|
-
else if (
|
|
325
|
-
const
|
|
326
|
-
if (
|
|
320
|
+
else if (s.action === "toggleHeaderGroup")
|
|
321
|
+
this.tableScope.toggleHeaderGroup(s), e.preventDefault(), e.stopPropagation();
|
|
322
|
+
else if (s.inputType === "checkbox" && s.areaIdent)
|
|
323
|
+
this.tableScope.toggleRowCheckbox(s.rowIdx, s.colIdx, s.areaIdent), e.preventDefault(), e.stopPropagation();
|
|
324
|
+
else if ($(s.row) && s.areaModel) {
|
|
325
|
+
const o = s.colIdx === this.getArrowColumnIndex() && e.altKey, i = s.className.includes("ge-table-tree-arrow-div");
|
|
326
|
+
if (o || i) {
|
|
327
327
|
e.preventDefault(), e.stopPropagation();
|
|
328
|
-
const
|
|
329
|
-
|
|
328
|
+
const a = s.row;
|
|
329
|
+
a.expanded = !a.expanded, "recalcVisibleTreeRows" in s.areaModel && s.areaModel.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(a);
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
if (
|
|
333
|
-
const
|
|
334
|
-
|
|
332
|
+
if (s.areaIdent === "body" && this.tableScope.tableOptions.getFocusModel) {
|
|
333
|
+
const o = this.tableScope.tableOptions.getFocusModel();
|
|
334
|
+
o == null || o.clear(), o == null || o.setFocus(s.rowIdx, s.colIdx);
|
|
335
335
|
}
|
|
336
336
|
this.publishGeMouseEvent(e, 1);
|
|
337
337
|
}
|
|
@@ -343,15 +343,15 @@ class de {
|
|
|
343
343
|
*/
|
|
344
344
|
onHostElementDblClicked(e) {
|
|
345
345
|
if (this.lastClicked = Date.now(), e.target instanceof HTMLElement) {
|
|
346
|
-
const t = e.target,
|
|
347
|
-
if (
|
|
348
|
-
this.tableScope.tableModel.isSortable(
|
|
346
|
+
const t = e.target, s = t.getAttribute("data-area"), o = V(s), i = Number(t.getAttribute("data-row-index")), a = Number(t.getAttribute("data-col-index")), r = this.tableScope.tableModel.getAreaModel(o);
|
|
347
|
+
if (s && o === "header")
|
|
348
|
+
this.tableScope.tableModel.isSortable(a) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, i, a));
|
|
349
349
|
else if (t.getAttribute("data-row-index")) {
|
|
350
|
-
const l =
|
|
351
|
-
if (
|
|
350
|
+
const l = r.getRowByIndex(i);
|
|
351
|
+
if (s && o === "body" && r.isEditable(i, a) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(i, a)), $(l) && a === 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 r && r.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(n);
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
357
|
}
|
|
@@ -366,8 +366,8 @@ class de {
|
|
|
366
366
|
* @return {void}
|
|
367
367
|
*/
|
|
368
368
|
publishGeMouseEvent(e, t) {
|
|
369
|
-
var
|
|
370
|
-
this.mouseEvent = e, this.geMouseEventOld = (
|
|
369
|
+
var s;
|
|
370
|
+
this.mouseEvent = e, this.geMouseEventOld = (s = this.geMouseEvent) == null ? void 0 : s.clone(), this.geMouseEvent = this.tableScope.createGeMouseEvent(e), this.geMouseEvent && (this.geMouseEvent.clickCount = t), this.tableScope.onMouseClicked(this.geMouseEvent, this.geMouseEventOld), this.tableScope.publishGeMouseEvent(this.geMouseEvent), t === 1 && this.tableScope.debounceRepaint();
|
|
371
371
|
}
|
|
372
372
|
/**
|
|
373
373
|
* Update the collapsed/expanded state of a tree row.
|
|
@@ -376,11 +376,11 @@ class de {
|
|
|
376
376
|
* @returns {void}
|
|
377
377
|
*/
|
|
378
378
|
updateCollapsedExpandedState(e) {
|
|
379
|
-
var
|
|
380
|
-
const t = (
|
|
379
|
+
var s, o, i, a, r;
|
|
380
|
+
const t = (o = (s = this.tableScope.tableOptions) == null ? void 0 : s.autoRestoreOptions) == null ? void 0 : o.getRowId;
|
|
381
381
|
if (t) {
|
|
382
|
-
const l = (i = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : i.collapsedExpandedStateGet().mode, n = l === "collapsed" && !e.expanded || l === "expanded" && e.expanded,
|
|
383
|
-
n ? (
|
|
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 ? (a = this.tableScope.storeStateCollapsedExpandService) == null || a.collapsedStateIdsPush(h) : c && ((r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsRemove(h));
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
getArrowColumnIndex() {
|
|
@@ -416,7 +416,7 @@ class de {
|
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
class
|
|
419
|
+
class de {
|
|
420
420
|
constructor(e) {
|
|
421
421
|
this.tableScope = e;
|
|
422
422
|
}
|
|
@@ -533,6 +533,13 @@ class he {
|
|
|
533
533
|
repaintHard() {
|
|
534
534
|
this.tableScope.repaintHard();
|
|
535
535
|
}
|
|
536
|
+
/**
|
|
537
|
+
* Recalculates the column widths of the table.
|
|
538
|
+
*
|
|
539
|
+
* @param {number} clientWidth - The width of the client area.
|
|
540
|
+
*
|
|
541
|
+
* @return {void}
|
|
542
|
+
*/
|
|
536
543
|
recalcColumnWidths(e) {
|
|
537
544
|
this.tableScope.recalcColumnWidths(e);
|
|
538
545
|
}
|
|
@@ -586,6 +593,26 @@ class he {
|
|
|
586
593
|
this.tableScope.focusModel()
|
|
587
594
|
);
|
|
588
595
|
}
|
|
596
|
+
/**
|
|
597
|
+
* Generates and downloads an Excel file based on the table data.
|
|
598
|
+
*
|
|
599
|
+
* @param {string} fileName - The name of the Excel file to be downloaded. Defaults to 'table.xlsx'.
|
|
600
|
+
* @param {string} author - The author of the Excel file. If not provided, it will remain empty.
|
|
601
|
+
* @return {void} No return value. Initiates a file download of the Excel document.
|
|
602
|
+
*/
|
|
603
|
+
downloadExcel(e = "table.xlsx", t = "") {
|
|
604
|
+
const s = [], o = this.tableScope.tableModel.getColumnCount(), i = ["header", "body", "footer"];
|
|
605
|
+
for (const a of i) {
|
|
606
|
+
const r = this.tableScope.tableModel.getAreaModel(a), l = (r == null ? void 0 : r.getRowCount()) ?? 0;
|
|
607
|
+
for (let n = 0; n < l; n++) {
|
|
608
|
+
const c = [];
|
|
609
|
+
s.push(c);
|
|
610
|
+
for (let h = 0; h < o; h++)
|
|
611
|
+
c.push(r.getValueAt(n, h));
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
return this.tableScope.excelService.downloadExcel(s, e, t);
|
|
615
|
+
}
|
|
589
616
|
/**
|
|
590
617
|
* Retrieves the current scope of the table.
|
|
591
618
|
*
|
|
@@ -604,33 +631,33 @@ class he {
|
|
|
604
631
|
return this.tableScope.selectionModel();
|
|
605
632
|
}
|
|
606
633
|
}
|
|
607
|
-
class
|
|
634
|
+
class G {
|
|
608
635
|
constructor(e) {
|
|
609
636
|
this.getStorageKeyFn = e;
|
|
610
637
|
}
|
|
611
638
|
autoConvertMapToObject(e) {
|
|
612
639
|
const t = {};
|
|
613
640
|
if (e instanceof Map) {
|
|
614
|
-
const
|
|
615
|
-
for (const
|
|
641
|
+
const s = e;
|
|
642
|
+
for (const o of [...s]) {
|
|
616
643
|
const [
|
|
617
644
|
i,
|
|
618
|
-
|
|
619
|
-
] =
|
|
620
|
-
t[i] =
|
|
645
|
+
a
|
|
646
|
+
] = o;
|
|
647
|
+
t[i] = a;
|
|
621
648
|
}
|
|
622
649
|
}
|
|
623
650
|
return t;
|
|
624
651
|
}
|
|
625
652
|
checkAndPersistItem(e, t) {
|
|
626
|
-
const
|
|
627
|
-
if (
|
|
628
|
-
const
|
|
629
|
-
if (
|
|
630
|
-
const i =
|
|
653
|
+
const s = this.getStorageKeyFn;
|
|
654
|
+
if (s) {
|
|
655
|
+
const o = s();
|
|
656
|
+
if (o) {
|
|
657
|
+
const i = o + e;
|
|
631
658
|
if ((t + "").includes("Map")) {
|
|
632
|
-
const
|
|
633
|
-
this.persistItem(i,
|
|
659
|
+
const a = this.autoConvertMapToObject(t);
|
|
660
|
+
this.persistItem(i, a);
|
|
634
661
|
} else
|
|
635
662
|
this.persistItem(i, t);
|
|
636
663
|
}
|
|
@@ -679,7 +706,7 @@ class _ {
|
|
|
679
706
|
// }
|
|
680
707
|
// }
|
|
681
708
|
}
|
|
682
|
-
class
|
|
709
|
+
class he extends G {
|
|
683
710
|
constructor(e) {
|
|
684
711
|
super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
|
|
685
712
|
}
|
|
@@ -694,21 +721,21 @@ class ce extends _ {
|
|
|
694
721
|
if (e) {
|
|
695
722
|
const t = e();
|
|
696
723
|
if (t) {
|
|
697
|
-
const
|
|
698
|
-
let
|
|
699
|
-
this.scrollOffset =
|
|
724
|
+
const s = t + this.SCROLL_STATE;
|
|
725
|
+
let o = this.loadFromLocalStorage(s);
|
|
726
|
+
this.scrollOffset = o || [0, 0];
|
|
700
727
|
}
|
|
701
728
|
}
|
|
702
729
|
}
|
|
703
730
|
}
|
|
704
|
-
class
|
|
705
|
-
constructor(e = "collapsed", t = [],
|
|
706
|
-
this.mode = e, this.rowIds = t, this.allCollapsed =
|
|
731
|
+
class pe {
|
|
732
|
+
constructor(e = "collapsed", t = [], s = !1, o = !1) {
|
|
733
|
+
this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = o;
|
|
707
734
|
}
|
|
708
735
|
}
|
|
709
|
-
class
|
|
736
|
+
class ge extends G {
|
|
710
737
|
constructor(e) {
|
|
711
|
-
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new
|
|
738
|
+
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new pe(), this.load();
|
|
712
739
|
}
|
|
713
740
|
collapsedExpandedStateGet() {
|
|
714
741
|
return this.collapsedExpandedState;
|
|
@@ -731,8 +758,8 @@ class pe extends _ {
|
|
|
731
758
|
if (e) {
|
|
732
759
|
const t = e();
|
|
733
760
|
if (t) {
|
|
734
|
-
const
|
|
735
|
-
|
|
761
|
+
const s = t + this.COLLAPSED_EXPANDED_STATE, o = this.loadFromLocalStorage(s);
|
|
762
|
+
o && (this.collapsedExpandedState = o);
|
|
736
763
|
}
|
|
737
764
|
}
|
|
738
765
|
}
|
|
@@ -740,7 +767,7 @@ class pe extends _ {
|
|
|
740
767
|
this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
|
|
741
768
|
}
|
|
742
769
|
}
|
|
743
|
-
class
|
|
770
|
+
class fe extends G {
|
|
744
771
|
constructor(e) {
|
|
745
772
|
super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
|
|
746
773
|
}
|
|
@@ -755,89 +782,89 @@ class be extends _ {
|
|
|
755
782
|
if (e) {
|
|
756
783
|
const t = e();
|
|
757
784
|
if (t) {
|
|
758
|
-
const
|
|
759
|
-
this.sortItems =
|
|
785
|
+
const s = t + this.SORTING_STATE, o = this.loadFromLocalStorage(s);
|
|
786
|
+
this.sortItems = o || [];
|
|
760
787
|
}
|
|
761
788
|
}
|
|
762
789
|
}
|
|
763
790
|
}
|
|
764
|
-
class
|
|
765
|
-
constructor(e = 0, t = 0,
|
|
766
|
-
this.left = e, this.width = t, this.height =
|
|
791
|
+
class R {
|
|
792
|
+
constructor(e = 0, t = 0, s = 0, o = 0, i) {
|
|
793
|
+
this.left = e, this.width = t, this.height = s, this.top = o, this.index = i;
|
|
767
794
|
}
|
|
768
795
|
}
|
|
769
|
-
class
|
|
770
|
-
constructor(e, t,
|
|
771
|
-
this.hostElement = e, this.tableModel = t, this.dom =
|
|
796
|
+
class me {
|
|
797
|
+
constructor(e, t, s, o) {
|
|
798
|
+
this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = o, this.scrollTop = 0, this.areaBodyWestGeo = new R(), this.areaBodyCenterGeo = new R(), this.areaBodyEastGeo = new R();
|
|
772
799
|
const i = this.hostElement;
|
|
773
800
|
i.innerText = "", this.dom.setAttribute(i, "tabindex", "0"), this.dom.setStyle(
|
|
774
801
|
this.dom.addClass("ge-table", i),
|
|
775
802
|
"position",
|
|
776
803
|
"relative"
|
|
777
|
-
), this.hoverRow =
|
|
778
|
-
|
|
779
|
-
), this.hoverColumn =
|
|
780
|
-
|
|
781
|
-
), this.draggingColumn =
|
|
782
|
-
|
|
783
|
-
), this.areaHeaderWest =
|
|
784
|
-
|
|
785
|
-
|
|
804
|
+
), this.hoverRow = s.applyStylePosistionAbsolute(
|
|
805
|
+
s.createDivWithClass("ge-table-hover-row", i)
|
|
806
|
+
), this.hoverColumn = s.applyStylePosistionAbsolute(
|
|
807
|
+
s.createDivWithClass("ge-table-hover-column", i)
|
|
808
|
+
), this.draggingColumn = s.applyStylePosistionAbsolute(
|
|
809
|
+
s.createDivWithClass("ge-table-dragging-column", i)
|
|
810
|
+
), this.areaHeaderWest = s.appendRelativeChildDiv(
|
|
811
|
+
s.applyStylePosistionAbsolute(
|
|
812
|
+
s.createAreaDivWithClass("ge-table-header ge-table-header-west", i, "header", "west")
|
|
786
813
|
)
|
|
787
|
-
), this.areaHeaderCenter =
|
|
788
|
-
|
|
789
|
-
|
|
814
|
+
), this.areaHeaderCenter = s.appendRelativeChildDiv(
|
|
815
|
+
s.applyStylePosistionAbsolute(
|
|
816
|
+
s.createAreaDivWithClass("ge-table-header ge-table-header-center", i, "header", "center")
|
|
790
817
|
)
|
|
791
|
-
), this.areaHeaderEast =
|
|
792
|
-
|
|
793
|
-
|
|
818
|
+
), this.areaHeaderEast = s.appendRelativeChildDiv(
|
|
819
|
+
s.applyStylePosistionAbsolute(
|
|
820
|
+
s.createAreaDivWithClass("ge-table-header ge-table-header-east", i, "body", "east")
|
|
794
821
|
)
|
|
795
|
-
), this.areaBodyWest =
|
|
796
|
-
|
|
797
|
-
|
|
822
|
+
), this.areaBodyWest = s.appendRelativeChildDiv(
|
|
823
|
+
s.applyStylePosistionAbsolute(
|
|
824
|
+
s.createAreaDivWithClass("ge-table-body ge-table-body-west", i, "body", "west")
|
|
798
825
|
)
|
|
799
|
-
), this.areaBodyEast =
|
|
800
|
-
|
|
801
|
-
|
|
826
|
+
), this.areaBodyEast = s.appendRelativeChildDiv(
|
|
827
|
+
s.applyStylePosistionAbsolute(
|
|
828
|
+
s.createAreaDivWithClass("ge-table-body ge-table-body-east", i, "body", "east")
|
|
802
829
|
)
|
|
803
|
-
), this.areaFooterWest =
|
|
804
|
-
|
|
805
|
-
|
|
830
|
+
), this.areaFooterWest = s.appendRelativeChildDiv(
|
|
831
|
+
s.applyStylePosistionAbsolute(
|
|
832
|
+
s.createAreaDivWithClass("ge-table-footer ge-table-footer-west", i, "footer", "west")
|
|
806
833
|
)
|
|
807
|
-
), this.areaFooterCenter =
|
|
808
|
-
|
|
809
|
-
|
|
834
|
+
), this.areaFooterCenter = s.appendRelativeChildDiv(
|
|
835
|
+
s.applyStylePosistionAbsolute(
|
|
836
|
+
s.createAreaDivWithClass("ge-table-footer ge-table-footer-center", i, "footer", "center")
|
|
810
837
|
)
|
|
811
|
-
), this.areaFooterEast =
|
|
812
|
-
|
|
813
|
-
|
|
838
|
+
), this.areaFooterEast = s.appendRelativeChildDiv(
|
|
839
|
+
s.applyStylePosistionAbsolute(
|
|
840
|
+
s.createAreaDivWithClass("ge-table-footer ge-table-footer-east", i, "footer", "east")
|
|
814
841
|
)
|
|
815
|
-
), this.scrollViewport =
|
|
842
|
+
), this.scrollViewport = s.applyStyleOverflowAuto(
|
|
816
843
|
this.tableOptions.overflowX ?? "auto",
|
|
817
844
|
this.tableOptions.overflowY ?? "auto",
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
845
|
+
s.applyStyleNoPadding(
|
|
846
|
+
s.applyStylePosistionAbsolute(
|
|
847
|
+
s.createAreaDivWithClass("ge-table-scroll-viewport", i, "body", "center")
|
|
821
848
|
)
|
|
822
849
|
)
|
|
823
|
-
), this.contentWrapperDiv =
|
|
824
|
-
|
|
825
|
-
|
|
850
|
+
), this.contentWrapperDiv = s.applyStyleNoPadding(
|
|
851
|
+
s.applyStylePosistionRelative(
|
|
852
|
+
s.createDivWithClass("ge-table-scroll-content-wrapper", this.scrollViewport)
|
|
826
853
|
)
|
|
827
|
-
), this.contentDiv =
|
|
828
|
-
|
|
829
|
-
|
|
854
|
+
), this.contentDiv = s.applyStyleNoPadding(
|
|
855
|
+
s.applyStylePosistionRelative(
|
|
856
|
+
s.createDivWithClass("ge-table-scroll-content", this.contentWrapperDiv)
|
|
830
857
|
)
|
|
831
|
-
), this.areaBodyCenter =
|
|
832
|
-
|
|
833
|
-
), this.borderHeaderBottom =
|
|
834
|
-
|
|
835
|
-
), this.borderFixedWest =
|
|
836
|
-
|
|
837
|
-
), this.borderFixedEast =
|
|
838
|
-
|
|
839
|
-
), this.borderFooterTop =
|
|
840
|
-
|
|
858
|
+
), this.areaBodyCenter = s.appendRelativeChildDiv(
|
|
859
|
+
s.createDivWithClass("ge-table-body-center", this.contentDiv)
|
|
860
|
+
), this.borderHeaderBottom = s.applyStylePosistionAbsolute(
|
|
861
|
+
s.createDivWithClass("ge-table-header-border", i)
|
|
862
|
+
), this.borderFixedWest = s.applyStylePosistionAbsolute(
|
|
863
|
+
s.createDivWithClass("ge-table-west-fixed-column-border", i)
|
|
864
|
+
), this.borderFixedEast = s.applyStylePosistionAbsolute(
|
|
865
|
+
s.createDivWithClass("ge-table-east-fixed-column-border", i)
|
|
866
|
+
), this.borderFooterTop = s.applyStylePosistionAbsolute(
|
|
867
|
+
s.createDivWithClass("ge-table-footer-border", i)
|
|
841
868
|
);
|
|
842
869
|
}
|
|
843
870
|
/**
|
|
@@ -846,10 +873,10 @@ class ue {
|
|
|
846
873
|
* @return {void}
|
|
847
874
|
*/
|
|
848
875
|
adjustContainersAndRows() {
|
|
849
|
-
const e = this.tableModel.getPadding(), t = this.hostElement.clientWidth,
|
|
876
|
+
const e = this.tableModel.getPadding(), t = this.hostElement.clientWidth, s = this.hostElement.clientHeight;
|
|
850
877
|
this.dom.applyStyle(this.scrollViewport, {
|
|
851
878
|
width: `${t - e.left}px`,
|
|
852
|
-
height: `${
|
|
879
|
+
height: `${s - e.top}px`,
|
|
853
880
|
top: `${e.top}px`,
|
|
854
881
|
left: `${e.left}px`
|
|
855
882
|
}), this.scrollTop = this.scrollViewport.scrollTop, this.dom.applyStyle(this.contentDiv, {
|
|
@@ -857,21 +884,21 @@ class ue {
|
|
|
857
884
|
height: `${this.scrollViewport.clientHeight}px`,
|
|
858
885
|
top: `${this.scrollTop}px`,
|
|
859
886
|
left: `${this.scrollViewport.scrollLeft}px`
|
|
860
|
-
}), this.areaBodyWestGeo.width = e.left, this.areaBodyWestGeo.height =
|
|
887
|
+
}), this.areaBodyWestGeo.width = e.left, this.areaBodyWestGeo.height = s - e.top - e.bottom, this.areaBodyWestGeo.top = e.top, this.areaBodyWestGeo.left = 0, this.dom.applyStyleInPx(this.areaBodyWest.parent, this.areaBodyWestGeo), this.tableOptions.fixedWestSeparatorBorderVisible && this.tableModel.getFixedLeftColumnCount() ? this.dom.applyDisplayBlockStyle(
|
|
861
888
|
this.dom.applyStyle(this.borderFixedWest, {
|
|
862
889
|
width: "1px",
|
|
863
890
|
height: `${this.areaBodyWestGeo.height}px`,
|
|
864
891
|
top: `${this.areaBodyWestGeo.top}px`,
|
|
865
892
|
left: `${this.areaBodyWestGeo.width}px`
|
|
866
893
|
})
|
|
867
|
-
) : this.dom.applyDisplayNoneStyle(this.borderFixedWest), this.areaBodyEastGeo.width = e.right, this.areaBodyEastGeo.height =
|
|
894
|
+
) : this.dom.applyDisplayNoneStyle(this.borderFixedWest), this.areaBodyEastGeo.width = e.right, this.areaBodyEastGeo.height = s - e.top - e.bottom, this.areaBodyEastGeo.top = e.top, this.areaBodyEastGeo.left = t - e.right, this.dom.applyStyleInPx(this.areaBodyEast.parent, this.areaBodyEastGeo), this.tableOptions.fixedEastSeparatorBorderVisible && this.tableModel.getFixedLeftColumnCount() ? this.dom.applyDisplayBlockStyle(
|
|
868
895
|
this.dom.applyStyle(this.borderFixedEast, {
|
|
869
896
|
width: "1px",
|
|
870
897
|
height: `${this.areaBodyEastGeo.height}px`,
|
|
871
898
|
top: `${this.areaBodyEastGeo.top}px`,
|
|
872
899
|
left: `${this.areaBodyEastGeo.left}px`
|
|
873
900
|
})
|
|
874
|
-
) : this.dom.applyDisplayNoneStyle(this.borderFixedEast), this.areaBodyCenterGeo.width = t - e.left - e.right, this.areaBodyCenterGeo.height =
|
|
901
|
+
) : this.dom.applyDisplayNoneStyle(this.borderFixedEast), this.areaBodyCenterGeo.width = t - e.left - e.right, this.areaBodyCenterGeo.height = s - e.top - e.bottom, this.areaBodyCenterGeo.top = 0, this.areaBodyCenterGeo.left = 0, this.dom.applyStyleInPx(this.areaBodyCenter.parent, this.areaBodyCenterGeo), this.dom.applyStyle(this.areaHeaderCenter.parent, {
|
|
875
902
|
width: `${t - e.left - e.right}px`,
|
|
876
903
|
height: `${e.top}px`,
|
|
877
904
|
top: "0",
|
|
@@ -896,23 +923,23 @@ class ue {
|
|
|
896
923
|
) : this.dom.applyDisplayNoneStyle(this.borderHeaderBottom), this.dom.applyStyle(this.areaFooterWest.parent, {
|
|
897
924
|
width: `${e.left}px`,
|
|
898
925
|
height: `${e.bottom}px`,
|
|
899
|
-
top: `${
|
|
926
|
+
top: `${s - e.bottom}px`,
|
|
900
927
|
left: "0"
|
|
901
928
|
}), this.dom.applyStyle(this.areaFooterCenter.parent, {
|
|
902
929
|
width: `${t - e.left - e.right}px`,
|
|
903
930
|
height: `${e.bottom}px`,
|
|
904
|
-
top: `${
|
|
931
|
+
top: `${s - e.bottom}px`,
|
|
905
932
|
left: `${e.left}px`
|
|
906
933
|
}), this.dom.applyStyle(this.areaFooterEast.parent, {
|
|
907
934
|
width: `${e.right}px`,
|
|
908
935
|
height: `${e.bottom}px`,
|
|
909
|
-
top: `${
|
|
936
|
+
top: `${s - e.bottom}px`,
|
|
910
937
|
left: `${t - e.right}px`
|
|
911
938
|
}), this.tableOptions.footerSeparatorBorderVisible && this.tableModel.isFooterVisibe() ? this.dom.applyDisplayBlockStyle(
|
|
912
939
|
this.dom.applyStyle(this.borderFooterTop, {
|
|
913
940
|
width: `${t}px`,
|
|
914
941
|
height: "1px",
|
|
915
|
-
top: `${
|
|
942
|
+
top: `${s - e.bottom}px`,
|
|
916
943
|
left: "0px"
|
|
917
944
|
})
|
|
918
945
|
) : this.dom.applyDisplayNoneStyle(this.borderFooterTop), this.adjustAfterScrolling();
|
|
@@ -947,8 +974,8 @@ class E {
|
|
|
947
974
|
* @param {number} c2 - The value for c2.
|
|
948
975
|
* @param {boolean} [gammaRange=false] - The value for gammaRange. Defaults to false. gammaRange will be used for AreaModelCellGroups, but it's not implemented yet!
|
|
949
976
|
*/
|
|
950
|
-
constructor(e, t,
|
|
951
|
-
this.r1 = e, this.c1 = t, this.r2 =
|
|
977
|
+
constructor(e, t, s, o, i = !1) {
|
|
978
|
+
this.r1 = e, this.c1 = t, this.r2 = s, this.c2 = o, this.gammaRange = i;
|
|
952
979
|
}
|
|
953
980
|
static create(e) {
|
|
954
981
|
return e.gammaRange === void 0 && (e.gammaRange = !1), new E(
|
|
@@ -972,7 +999,7 @@ class E {
|
|
|
972
999
|
return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
|
|
973
1000
|
}
|
|
974
1001
|
}
|
|
975
|
-
class
|
|
1002
|
+
class ue {
|
|
976
1003
|
constructor(e, t) {
|
|
977
1004
|
this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
|
|
978
1005
|
}
|
|
@@ -981,14 +1008,14 @@ class Se {
|
|
|
981
1008
|
return;
|
|
982
1009
|
this.colAndRowspanRanges = [];
|
|
983
1010
|
const e = this.areaModel.getRowCount(), t = this.tableModel.getColumnCount();
|
|
984
|
-
for (let
|
|
985
|
-
for (let
|
|
986
|
-
let i = this.areaModel.getColspanAt(
|
|
987
|
-
if (i > 1 ||
|
|
988
|
-
i === 0 && (i = 1),
|
|
989
|
-
const
|
|
1011
|
+
for (let s = 0; s < e; s++)
|
|
1012
|
+
for (let o = 0; o < t; o++) {
|
|
1013
|
+
let i = this.areaModel.getColspanAt(s, o), a = this.areaModel.getRowspanAt(s, o);
|
|
1014
|
+
if (i > 1 || a > 1) {
|
|
1015
|
+
i === 0 && (i = 1), a === 0 && (a = 1);
|
|
1016
|
+
const r = "gammaCells" in this.areaModel;
|
|
990
1017
|
this.colAndRowspanRanges.push(
|
|
991
|
-
new E(o, s
|
|
1018
|
+
new E(s, o, s + a - 1, o + i - 1, r)
|
|
992
1019
|
);
|
|
993
1020
|
}
|
|
994
1021
|
}
|
|
@@ -998,29 +1025,29 @@ class Se {
|
|
|
998
1025
|
}
|
|
999
1026
|
isInRange(e, t) {
|
|
1000
1027
|
if (this.colAndRowspanRanges) {
|
|
1001
|
-
for (const
|
|
1002
|
-
if (
|
|
1028
|
+
for (const s of this.colAndRowspanRanges)
|
|
1029
|
+
if (s.isInRange(e, t))
|
|
1003
1030
|
return !0;
|
|
1004
1031
|
}
|
|
1005
1032
|
return !1;
|
|
1006
1033
|
}
|
|
1007
1034
|
}
|
|
1008
|
-
class
|
|
1009
|
-
constructor(e, t,
|
|
1010
|
-
this.header = e, this.body = t, this.footer =
|
|
1035
|
+
class be {
|
|
1036
|
+
constructor(e, t, s) {
|
|
1037
|
+
this.header = e, this.body = t, this.footer = s;
|
|
1011
1038
|
}
|
|
1012
1039
|
}
|
|
1013
|
-
class
|
|
1014
|
-
constructor(e, t,
|
|
1015
|
-
var
|
|
1016
|
-
super(e, t,
|
|
1040
|
+
class Se extends me {
|
|
1041
|
+
constructor(e, t, s, o) {
|
|
1042
|
+
var a, r;
|
|
1043
|
+
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 = {
|
|
1017
1044
|
header: [],
|
|
1018
1045
|
body: [],
|
|
1019
1046
|
footer: []
|
|
1020
|
-
}, this.tree = !1, this.colAndRowspanModels = new
|
|
1047
|
+
}, this.tree = !1, this.colAndRowspanModels = new be(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (a = this.tableOptions) != null && a.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (r = this.tableOptions) != null && r.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), H(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
|
|
1021
1048
|
(l) => {
|
|
1022
1049
|
var n;
|
|
1023
|
-
this.colAndRowspanModels[l] = new
|
|
1050
|
+
this.colAndRowspanModels[l] = new ue(t, t.getAreaModel(l)), (n = this.colAndRowspanModels[l]) == null || n.init();
|
|
1024
1051
|
}
|
|
1025
1052
|
);
|
|
1026
1053
|
}
|
|
@@ -1058,10 +1085,10 @@ class me extends ue {
|
|
|
1058
1085
|
* @param {number} colIdx - The index of the column.
|
|
1059
1086
|
*/
|
|
1060
1087
|
initRenderEditor(e, t) {
|
|
1061
|
-
var
|
|
1062
|
-
let
|
|
1063
|
-
if (
|
|
1064
|
-
if (this.editorRenderer =
|
|
1088
|
+
var o;
|
|
1089
|
+
let s = (o = this.tableModel.getColumnDef(t)) == null ? void 0 : o.getEditRenderer;
|
|
1090
|
+
if (s || (s = this.tableOptions.getEditRenderer), s)
|
|
1091
|
+
if (this.editorRenderer = s(e, t), this.editorRenderer) {
|
|
1065
1092
|
this.editorRendererRow = e, this.editorRendererColumn = t, this.editing = !0, this.repaint();
|
|
1066
1093
|
const i = document.querySelector("input.ge-table-cell-editor-input");
|
|
1067
1094
|
i && i.focus();
|
|
@@ -1106,19 +1133,19 @@ class me extends ue {
|
|
|
1106
1133
|
for (const t of this.removables)
|
|
1107
1134
|
t.remove();
|
|
1108
1135
|
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(
|
|
1109
|
-
new
|
|
1136
|
+
new R(0, this.hostElement.clientWidth, 1, 0),
|
|
1110
1137
|
this.hostElement,
|
|
1111
1138
|
"ge-table-border"
|
|
1112
1139
|
)), this.tableOptions.tableBottomBorderVisible && this.removables.push(this.dom.addHorizontalBorder(
|
|
1113
|
-
new
|
|
1140
|
+
new R(0, this.hostElement.clientWidth, 1, this.hostElement.clientHeight - 1),
|
|
1114
1141
|
this.hostElement,
|
|
1115
1142
|
"ge-table-border"
|
|
1116
1143
|
)), this.tableModel.getFixedLeftColumnCount() > 0 && this.removables.push(this.dom.addVerticalBorder(
|
|
1117
|
-
new
|
|
1144
|
+
new R(this.areaBodyWest.child.clientWidth, 1, this.hostElement.clientHeight, 0),
|
|
1118
1145
|
this.hostElement,
|
|
1119
1146
|
"ge-table-body-west-vertical-border"
|
|
1120
1147
|
)), ((e = this.tableModel.getAreaModel("header")) == null ? void 0 : e.getRowCount()) > 0 && this.removables.push(this.dom.addHorizontalBorder(
|
|
1121
|
-
new
|
|
1148
|
+
new R(0, this.hostElement.clientWidth, 1, this.areaHeaderCenter.child.clientHeight),
|
|
1122
1149
|
this.hostElement,
|
|
1123
1150
|
"ge-table-body-west-vertical-border"
|
|
1124
1151
|
));
|
|
@@ -1142,8 +1169,8 @@ class me extends ue {
|
|
|
1142
1169
|
*/
|
|
1143
1170
|
updateCells(e, t = !1) {
|
|
1144
1171
|
e.forEach(
|
|
1145
|
-
(
|
|
1146
|
-
this.tableModel.getAreaModel(
|
|
1172
|
+
(s) => {
|
|
1173
|
+
this.tableModel.getAreaModel(s.area).setValue(s.rowIndex, s.columnIndex, s.value), t || this.rerenderCellContent(s);
|
|
1147
1174
|
}
|
|
1148
1175
|
), t && this.repaint();
|
|
1149
1176
|
}
|
|
@@ -1156,23 +1183,24 @@ class me extends ue {
|
|
|
1156
1183
|
* @param {any} value - The new value to be displayed in the cell.
|
|
1157
1184
|
* @param {string[]} cssClasses - An array of CSS classes to be applied to the cell.
|
|
1158
1185
|
*/
|
|
1159
|
-
rerenderCellContent({ area: e, rowIndex: t, columnIndex:
|
|
1160
|
-
const
|
|
1186
|
+
rerenderCellContent({ area: e, rowIndex: t, columnIndex: s, value: o, cssClasses: i }) {
|
|
1187
|
+
const a = this.tableModel.getAreaModel(e), r = 'div[data-col-index="' + s + '"][data-row-index="' + t + '"][data-area="' + e + '"]', l = document.querySelector(r);
|
|
1161
1188
|
if (l) {
|
|
1162
1189
|
let n;
|
|
1163
|
-
const c = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn ===
|
|
1164
|
-
|
|
1165
|
-
|
|
1190
|
+
const c = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === s;
|
|
1191
|
+
let h;
|
|
1192
|
+
if (c ? h = this.editorRenderer : h = a.getCellRenderer(t, s), l.innerText = "", this.applyCssClasses(l, i), h)
|
|
1193
|
+
n = h.render(l, t, s, e, a, o, this.dom.domService), n && this.cleanupFunctions[e].push(n);
|
|
1166
1194
|
else {
|
|
1167
|
-
const
|
|
1168
|
-
this.dom.addLabelDiv(l,
|
|
1195
|
+
const p = `${o}`;
|
|
1196
|
+
this.dom.addLabelDiv(l, p, !1, t, s, e);
|
|
1169
1197
|
}
|
|
1170
|
-
const
|
|
1171
|
-
|
|
1172
|
-
const
|
|
1173
|
-
if (
|
|
1174
|
-
for (const
|
|
1175
|
-
this.dom.setStyle(l,
|
|
1198
|
+
const d = a.getCustomClassesAt(t, s);
|
|
1199
|
+
d.length && this.dom.addClasses(d, l);
|
|
1200
|
+
const u = a.getCustomStyleAt(t, s);
|
|
1201
|
+
if (u)
|
|
1202
|
+
for (const p in u)
|
|
1203
|
+
this.dom.setStyle(l, p, u[p]);
|
|
1176
1204
|
}
|
|
1177
1205
|
}
|
|
1178
1206
|
/**
|
|
@@ -1184,13 +1212,13 @@ class me extends ue {
|
|
|
1184
1212
|
*/
|
|
1185
1213
|
storeColumnWidths() {
|
|
1186
1214
|
const e = this.tableModel.getColumnDefs();
|
|
1187
|
-
e != null && e.length && (this.storedColumnWidths = e.map((t,
|
|
1215
|
+
e != null && e.length && (this.storedColumnWidths = e.map((t, s) => this.tableModel.getColumnWidth(s)));
|
|
1188
1216
|
}
|
|
1189
1217
|
getAreaAndSideIdentByAttr(e) {
|
|
1190
1218
|
if (e) {
|
|
1191
|
-
const t = this.getStringByAttr(e, "data-area"),
|
|
1192
|
-
if (
|
|
1193
|
-
return [t,
|
|
1219
|
+
const t = this.getStringByAttr(e, "data-area"), s = this.getStringByAttr(e, "data-side");
|
|
1220
|
+
if (s && t)
|
|
1221
|
+
return [t, s];
|
|
1194
1222
|
}
|
|
1195
1223
|
return [void 0, void 0];
|
|
1196
1224
|
}
|
|
@@ -1247,11 +1275,11 @@ class me extends ue {
|
|
|
1247
1275
|
* @protected
|
|
1248
1276
|
*/
|
|
1249
1277
|
getNumberByAttr(e, t) {
|
|
1250
|
-
var
|
|
1278
|
+
var s;
|
|
1251
1279
|
if (e) {
|
|
1252
|
-
const
|
|
1253
|
-
if (
|
|
1254
|
-
return Number(
|
|
1280
|
+
const o = (s = e.closest("[" + t + "]")) == null ? void 0 : s.getAttribute(t);
|
|
1281
|
+
if (o)
|
|
1282
|
+
return Number(o);
|
|
1255
1283
|
}
|
|
1256
1284
|
return -1;
|
|
1257
1285
|
}
|
|
@@ -1264,11 +1292,11 @@ class me extends ue {
|
|
|
1264
1292
|
* @protected
|
|
1265
1293
|
*/
|
|
1266
1294
|
getStringByAttr(e, t) {
|
|
1267
|
-
var
|
|
1295
|
+
var s;
|
|
1268
1296
|
if (e) {
|
|
1269
|
-
const
|
|
1270
|
-
if (
|
|
1271
|
-
return
|
|
1297
|
+
const o = (s = e.closest("[" + t + "]")) == null ? void 0 : s.getAttribute(t);
|
|
1298
|
+
if (o)
|
|
1299
|
+
return o;
|
|
1272
1300
|
}
|
|
1273
1301
|
return "";
|
|
1274
1302
|
}
|
|
@@ -1281,87 +1309,87 @@ class me extends ue {
|
|
|
1281
1309
|
* @protected
|
|
1282
1310
|
*/
|
|
1283
1311
|
adjustArea(e, t = 0) {
|
|
1284
|
-
var
|
|
1285
|
-
const
|
|
1286
|
-
|
|
1287
|
-
const
|
|
1312
|
+
var f;
|
|
1313
|
+
const s = this.getArea(e, "west"), o = this.getArea(e, "center"), i = this.getArea(e, "east"), a = o.child.clientHeight;
|
|
1314
|
+
s.child.innerText = "", o.child.innerText = "", i.child.innerText = "";
|
|
1315
|
+
const r = 0, l = this.areaBodyCenterGeo.width, n = this.tableModel.getPadding(), c = this.tableModel.getAreaModel(e), h = c.getRowCount();
|
|
1288
1316
|
for (; this.cleanupFunctions[e].length; ) {
|
|
1289
|
-
const
|
|
1290
|
-
|
|
1317
|
+
const m = this.cleanupFunctions[e].shift();
|
|
1318
|
+
m && m();
|
|
1291
1319
|
}
|
|
1292
|
-
let
|
|
1293
|
-
const
|
|
1294
|
-
for (let
|
|
1295
|
-
const
|
|
1296
|
-
if (
|
|
1297
|
-
this.firstVisibleRowIndex =
|
|
1298
|
-
let y = { left:
|
|
1299
|
-
const
|
|
1320
|
+
let d = t;
|
|
1321
|
+
const u = this.tableModel.getColumnCount(), p = this.tableModel.getFixedRightColumnCount(), b = this.tableModel.getFixedLeftColumnCount();
|
|
1322
|
+
for (let m = 0; m < h; m++) {
|
|
1323
|
+
const x = d, v = m === h - 1, w = this.tableModel.getRowHeight(e, m);
|
|
1324
|
+
if (x + w > 0) {
|
|
1325
|
+
this.firstVisibleRowIndex = m;
|
|
1326
|
+
let y = { left: r, width: l, height: w, top: x, index: m }, S = this.dom.addRowDiv(o, y, m, e, "center");
|
|
1327
|
+
const T = b;
|
|
1300
1328
|
if (this.adjustColumnsToRowParent({
|
|
1301
1329
|
areaIdent: e,
|
|
1302
1330
|
sideIdent: "center",
|
|
1303
|
-
areaModel:
|
|
1331
|
+
areaModel: c,
|
|
1304
1332
|
geo: y,
|
|
1305
|
-
parent:
|
|
1306
|
-
rowIndex:
|
|
1307
|
-
columnIndexStart:
|
|
1308
|
-
columnIndexEnd:
|
|
1333
|
+
parent: S,
|
|
1334
|
+
rowIndex: m,
|
|
1335
|
+
columnIndexStart: T,
|
|
1336
|
+
columnIndexEnd: u - p - 1,
|
|
1309
1337
|
verticalFixed: !1,
|
|
1310
|
-
lastRowOfModel:
|
|
1311
|
-
}), n.left > 0 && (y = { left:
|
|
1338
|
+
lastRowOfModel: v
|
|
1339
|
+
}), n.left > 0 && (y = { left: r, width: this.areaBodyWestGeo.width, height: w, top: x, index: m }, S = this.dom.addRowDiv(s, y, m, e, "west"), this.adjustColumnsToRowParent({
|
|
1312
1340
|
areaIdent: e,
|
|
1313
1341
|
sideIdent: "west",
|
|
1314
|
-
areaModel:
|
|
1342
|
+
areaModel: c,
|
|
1315
1343
|
geo: y,
|
|
1316
|
-
parent:
|
|
1317
|
-
rowIndex:
|
|
1344
|
+
parent: S,
|
|
1345
|
+
rowIndex: m,
|
|
1318
1346
|
columnIndexStart: 0,
|
|
1319
|
-
columnIndexEnd:
|
|
1347
|
+
columnIndexEnd: T - 1,
|
|
1320
1348
|
verticalFixed: !0,
|
|
1321
|
-
lastRowOfModel:
|
|
1322
|
-
})), n.right > 0 && (y = { left:
|
|
1349
|
+
lastRowOfModel: v
|
|
1350
|
+
})), n.right > 0 && (y = { left: r, width: this.areaBodyEastGeo.width, height: w, top: x, index: m }, S = this.dom.addRowDiv(i, y, m, e, "east"), this.adjustColumnsToRowParent({
|
|
1323
1351
|
areaIdent: e,
|
|
1324
1352
|
sideIdent: "east",
|
|
1325
|
-
areaModel:
|
|
1353
|
+
areaModel: c,
|
|
1326
1354
|
geo: y,
|
|
1327
|
-
parent:
|
|
1328
|
-
rowIndex:
|
|
1329
|
-
columnIndexStart:
|
|
1330
|
-
columnIndexEnd:
|
|
1355
|
+
parent: S,
|
|
1356
|
+
rowIndex: m,
|
|
1357
|
+
columnIndexStart: u - p,
|
|
1358
|
+
columnIndexEnd: u - 1,
|
|
1331
1359
|
verticalFixed: !0,
|
|
1332
|
-
lastRowOfModel:
|
|
1333
|
-
})), e === "header" && this.tree &&
|
|
1360
|
+
lastRowOfModel: v
|
|
1361
|
+
})), e === "header" && this.tree && m === h - 1) {
|
|
1334
1362
|
const A = this.dom.applyStyle(
|
|
1335
1363
|
this.dom.setAttribute(
|
|
1336
|
-
this.dom.addDiv(
|
|
1364
|
+
this.dom.addDiv(S, new R(16, 20, 20, 8)),
|
|
1337
1365
|
"data-ge-action",
|
|
1338
1366
|
"toggleExpandCollapseAll"
|
|
1339
1367
|
),
|
|
1340
1368
|
{ cursor: "pointer" }
|
|
1341
1369
|
), M = this.tableOptions.treeOptions.arrowExpandCollapseAll;
|
|
1342
1370
|
if (M) {
|
|
1343
|
-
const
|
|
1344
|
-
this.dom.domService.appendChild(A,
|
|
1371
|
+
const I = this.dom.domService.createText(M.content);
|
|
1372
|
+
this.dom.domService.appendChild(A, I), M.style && this.dom.applyStyleString(A, M.style);
|
|
1345
1373
|
}
|
|
1346
1374
|
}
|
|
1347
1375
|
}
|
|
1348
|
-
if (
|
|
1376
|
+
if (d = d + w, d > a)
|
|
1349
1377
|
break;
|
|
1350
1378
|
}
|
|
1351
1379
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
|
|
1352
|
-
const
|
|
1353
|
-
if (
|
|
1354
|
-
for (const
|
|
1355
|
-
let
|
|
1356
|
-
if (
|
|
1357
|
-
|
|
1358
|
-
else if (
|
|
1359
|
-
|
|
1380
|
+
const m = ((f = this.colAndRowspanModels[e]) == null ? void 0 : f.getRanges()) ?? [];
|
|
1381
|
+
if (m.length)
|
|
1382
|
+
for (const x of m) {
|
|
1383
|
+
let v = 0, w = o.child, y = "center";
|
|
1384
|
+
if (x.c1 < b)
|
|
1385
|
+
w = s.child, y = "west";
|
|
1386
|
+
else if (p > 0 && x.c1 >= u - p)
|
|
1387
|
+
w = i.child, y = "east";
|
|
1360
1388
|
else {
|
|
1361
|
-
const
|
|
1362
|
-
|
|
1389
|
+
const S = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1390
|
+
v = this.scrollFactorX * S - this.areaBodyWestGeo.width, y = "center";
|
|
1363
1391
|
}
|
|
1364
|
-
this.drawBigCell(
|
|
1392
|
+
this.drawBigCell(x, v, t, c, w, y);
|
|
1365
1393
|
}
|
|
1366
1394
|
}
|
|
1367
1395
|
}
|
|
@@ -1375,48 +1403,48 @@ class me extends ue {
|
|
|
1375
1403
|
* @param sideIdent SideIdent (west,center,east)
|
|
1376
1404
|
* @protected
|
|
1377
1405
|
*/
|
|
1378
|
-
drawBigCell(e, t,
|
|
1379
|
-
const
|
|
1380
|
-
let
|
|
1381
|
-
n > 0 && e.c1 >= l - n && (
|
|
1382
|
-
const
|
|
1383
|
-
let
|
|
1384
|
-
const
|
|
1385
|
-
|
|
1386
|
-
areaModel:
|
|
1387
|
-
areaIdent:
|
|
1388
|
-
sideIdent:
|
|
1406
|
+
drawBigCell(e, t, s, o, i, a) {
|
|
1407
|
+
const r = s + this.getRowHeights(0, e.r1 - 1, o).reduce((f, m) => f + m, 0), l = this.tableModel.getColumnCount(), n = this.tableModel.getFixedRightColumnCount();
|
|
1408
|
+
let c = 0;
|
|
1409
|
+
n > 0 && e.c1 >= l - n && (c = l - n);
|
|
1410
|
+
const h = t + this.getColumnWidths(c, e.c1 - 1).reduce((f, m) => f + m, 0), d = this.getRowHeights(e.r1, e.r2, o).reduce((f, m) => f + m, 0), u = this.getColumnWidths(e.c1, e.c2).reduce((f, m) => f + m, 0);
|
|
1411
|
+
let p = !1;
|
|
1412
|
+
const b = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
1413
|
+
b && (p = b.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? this.renderCell({
|
|
1414
|
+
areaModel: o,
|
|
1415
|
+
areaIdent: o.areaIdent,
|
|
1416
|
+
sideIdent: a,
|
|
1389
1417
|
rowIndex: e.r1,
|
|
1390
1418
|
columnIndex: e.c1,
|
|
1391
|
-
left:
|
|
1392
|
-
top:
|
|
1393
|
-
width:
|
|
1394
|
-
height:
|
|
1419
|
+
left: h,
|
|
1420
|
+
top: r,
|
|
1421
|
+
width: u,
|
|
1422
|
+
height: d,
|
|
1395
1423
|
parent: i,
|
|
1396
|
-
cellSelected:
|
|
1424
|
+
cellSelected: p,
|
|
1397
1425
|
lastRowOfModel: !0,
|
|
1398
1426
|
gammaRange: e.gammaRange
|
|
1399
1427
|
}) : this.renderCell({
|
|
1400
|
-
areaModel:
|
|
1401
|
-
areaIdent:
|
|
1402
|
-
sideIdent:
|
|
1428
|
+
areaModel: o,
|
|
1429
|
+
areaIdent: o.areaIdent,
|
|
1430
|
+
sideIdent: a,
|
|
1403
1431
|
rowIndex: e.r1,
|
|
1404
1432
|
columnIndex: e.c1,
|
|
1405
|
-
left:
|
|
1406
|
-
top:
|
|
1407
|
-
width:
|
|
1408
|
-
height:
|
|
1433
|
+
left: h,
|
|
1434
|
+
top: r,
|
|
1435
|
+
width: u,
|
|
1436
|
+
height: d,
|
|
1409
1437
|
parent: i,
|
|
1410
|
-
cellSelected:
|
|
1438
|
+
cellSelected: p,
|
|
1411
1439
|
lastRowOfModel: !0,
|
|
1412
1440
|
gammaRange: e.gammaRange
|
|
1413
|
-
}),
|
|
1441
|
+
}), o.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1414
1442
|
rowIndex: e.r1,
|
|
1415
1443
|
columnIndex: e.c1,
|
|
1416
|
-
cellLeft:
|
|
1417
|
-
cellTop:
|
|
1418
|
-
cellWidth:
|
|
1419
|
-
cellHeight:
|
|
1444
|
+
cellLeft: h,
|
|
1445
|
+
cellTop: r,
|
|
1446
|
+
cellWidth: u,
|
|
1447
|
+
cellHeight: d,
|
|
1420
1448
|
parent: i
|
|
1421
1449
|
});
|
|
1422
1450
|
}
|
|
@@ -1429,13 +1457,13 @@ class me extends ue {
|
|
|
1429
1457
|
* @returns {number} - The row index of the important rowspan cell, or -1 if not found.
|
|
1430
1458
|
* @protected
|
|
1431
1459
|
*/
|
|
1432
|
-
findRowOfImportantRowspanCell(e, t,
|
|
1433
|
-
const
|
|
1460
|
+
findRowOfImportantRowspanCell(e, t, s) {
|
|
1461
|
+
const o = e.getMaxRowspan();
|
|
1434
1462
|
for (let i = t - 1; i > -1; i--) {
|
|
1435
|
-
const
|
|
1436
|
-
if (
|
|
1463
|
+
const a = e.getRowspanAt(i, s);
|
|
1464
|
+
if (a > 1 && i + a + 1 >= t)
|
|
1437
1465
|
return i;
|
|
1438
|
-
if (t - i >
|
|
1466
|
+
if (t - i > o)
|
|
1439
1467
|
return -1;
|
|
1440
1468
|
}
|
|
1441
1469
|
return -1;
|
|
@@ -1450,68 +1478,68 @@ class me extends ue {
|
|
|
1450
1478
|
adjustColumnsToRowParent({
|
|
1451
1479
|
areaIdent: e,
|
|
1452
1480
|
sideIdent: t,
|
|
1453
|
-
areaModel:
|
|
1454
|
-
geo:
|
|
1481
|
+
areaModel: s,
|
|
1482
|
+
geo: o,
|
|
1455
1483
|
parent: i,
|
|
1456
|
-
rowIndex:
|
|
1457
|
-
columnIndexStart:
|
|
1484
|
+
rowIndex: a,
|
|
1485
|
+
columnIndexStart: r,
|
|
1458
1486
|
columnIndexEnd: l,
|
|
1459
1487
|
verticalFixed: n = !1,
|
|
1460
|
-
lastRowOfModel:
|
|
1488
|
+
lastRowOfModel: c = !1
|
|
1461
1489
|
}) {
|
|
1462
|
-
var
|
|
1490
|
+
var b;
|
|
1463
1491
|
this.scrollViewportLeft = this.scrollViewport.scrollLeft;
|
|
1464
|
-
let
|
|
1492
|
+
let h = 0;
|
|
1465
1493
|
if (!n) {
|
|
1466
|
-
const
|
|
1467
|
-
|
|
1494
|
+
const f = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1495
|
+
h = this.scrollFactorX * f;
|
|
1468
1496
|
}
|
|
1469
|
-
const
|
|
1470
|
-
let
|
|
1471
|
-
for (let
|
|
1472
|
-
const
|
|
1473
|
-
if (
|
|
1474
|
-
let
|
|
1475
|
-
const
|
|
1476
|
-
|
|
1477
|
-
let
|
|
1478
|
-
y > 1 && (
|
|
1479
|
-
let
|
|
1480
|
-
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (
|
|
1481
|
-
this.renderDragTargetDiv(i,
|
|
1482
|
-
const A = { left:
|
|
1497
|
+
const d = 0, u = !!(e === "body" && t);
|
|
1498
|
+
let p = h;
|
|
1499
|
+
for (let f = r; f <= l; f++) {
|
|
1500
|
+
const m = p, x = this.tableModel.getColumnWidth(f);
|
|
1501
|
+
if (x > 0 && m + x > 0) {
|
|
1502
|
+
let v = o.height;
|
|
1503
|
+
const w = s.getRowspanAt(a, f), y = s.getColspanAt(a, f);
|
|
1504
|
+
w > 1 && (v = this.getRowHeights(a, a + w - 1, s).reduce((A, M) => A + M, 0));
|
|
1505
|
+
let S = x;
|
|
1506
|
+
y > 1 && (S = this.getColumnWidths(f, f + y - 1).reduce((A, M) => A + M, 0));
|
|
1507
|
+
let T = !1;
|
|
1508
|
+
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (b = this.colAndRowspanModels[e]) != null && b.isInRange(a, f) && (T = !0), this.draggingTargetColumnIndex === f && e !== "header") {
|
|
1509
|
+
this.renderDragTargetDiv(i, m, d, S, v);
|
|
1510
|
+
const A = { left: m, top: d, width: S, height: v };
|
|
1483
1511
|
this.dom.addColumnBorderDivs(this.tableOptions, i, A, e, t);
|
|
1484
1512
|
} else {
|
|
1485
|
-
const A = this.renderSelectedBackgroundDiv(
|
|
1486
|
-
"gammaCells" in
|
|
1487
|
-
areaModel:
|
|
1513
|
+
const A = this.renderSelectedBackgroundDiv(T, u, t, s, a, f, i, m, d, S, v);
|
|
1514
|
+
"gammaCells" in s && s.getValueAt(a, f) && (T = !1), T || this.renderCell({
|
|
1515
|
+
areaModel: s,
|
|
1488
1516
|
areaIdent: e,
|
|
1489
1517
|
sideIdent: t,
|
|
1490
|
-
rowIndex:
|
|
1491
|
-
columnIndex:
|
|
1492
|
-
left:
|
|
1493
|
-
top:
|
|
1494
|
-
width:
|
|
1495
|
-
height:
|
|
1518
|
+
rowIndex: a,
|
|
1519
|
+
columnIndex: f,
|
|
1520
|
+
left: m,
|
|
1521
|
+
top: d,
|
|
1522
|
+
width: S,
|
|
1523
|
+
height: v,
|
|
1496
1524
|
parent: i,
|
|
1497
1525
|
cellSelected: A,
|
|
1498
|
-
lastRowOfModel:
|
|
1526
|
+
lastRowOfModel: c,
|
|
1499
1527
|
gammaRange: !0
|
|
1500
1528
|
}), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1501
|
-
rowIndex:
|
|
1502
|
-
columnIndex:
|
|
1503
|
-
cellLeft:
|
|
1504
|
-
cellTop:
|
|
1505
|
-
cellWidth:
|
|
1506
|
-
cellHeight:
|
|
1529
|
+
rowIndex: a,
|
|
1530
|
+
columnIndex: f,
|
|
1531
|
+
cellLeft: m,
|
|
1532
|
+
cellTop: d,
|
|
1533
|
+
cellWidth: S,
|
|
1534
|
+
cellHeight: v,
|
|
1507
1535
|
parent: i
|
|
1508
1536
|
});
|
|
1509
1537
|
}
|
|
1510
1538
|
}
|
|
1511
|
-
if (
|
|
1539
|
+
if (p = p + x, p > this.areaBodyCenterGeo.width)
|
|
1512
1540
|
break;
|
|
1513
1541
|
}
|
|
1514
|
-
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new
|
|
1542
|
+
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new R(p - 1, 1, o.height, 0), i);
|
|
1515
1543
|
}
|
|
1516
1544
|
/**
|
|
1517
1545
|
* Retrieves the column index of the tree arrow column in the table.
|
|
@@ -1528,59 +1556,59 @@ class me extends ue {
|
|
|
1528
1556
|
addAndRenderCellDiv({
|
|
1529
1557
|
areaModel: e,
|
|
1530
1558
|
areaIdent: t,
|
|
1531
|
-
sideIdent:
|
|
1532
|
-
rowIndex:
|
|
1559
|
+
sideIdent: s,
|
|
1560
|
+
rowIndex: o,
|
|
1533
1561
|
index: i,
|
|
1534
|
-
left:
|
|
1535
|
-
width:
|
|
1562
|
+
left: a,
|
|
1563
|
+
width: r,
|
|
1536
1564
|
height: l,
|
|
1537
1565
|
top: n,
|
|
1538
|
-
parent:
|
|
1539
|
-
lastRowOfModel:
|
|
1566
|
+
parent: c,
|
|
1567
|
+
lastRowOfModel: h
|
|
1540
1568
|
}) {
|
|
1541
|
-
var
|
|
1542
|
-
const
|
|
1543
|
-
let
|
|
1544
|
-
if (i === this.getTreeArrowColumnIndex() &&
|
|
1545
|
-
const
|
|
1546
|
-
(
|
|
1569
|
+
var z;
|
|
1570
|
+
const u = this.editorRenderer && this.editorRendererRow === o && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(o, i), p = { left: a, width: r, height: l, top: n, index: i }, b = e.getRowByIndex(o);
|
|
1571
|
+
let f = "none";
|
|
1572
|
+
if (i === this.getTreeArrowColumnIndex() && $(b)) {
|
|
1573
|
+
const C = b;
|
|
1574
|
+
(z = C.children) != null && z.length ? C.expanded ? f = "expanded" : f = "collapsed" : f = "hidden";
|
|
1547
1575
|
}
|
|
1548
|
-
let
|
|
1576
|
+
let x;
|
|
1549
1577
|
if (t === "header") {
|
|
1550
|
-
const
|
|
1551
|
-
(!(
|
|
1578
|
+
const C = this.tableModel.getColumnDef(i);
|
|
1579
|
+
(!(C != null && C.sortIconVisible) || C != null && C.sortIconVisible()) && (x = C == null ? void 0 : C.sortState);
|
|
1552
1580
|
}
|
|
1553
|
-
const
|
|
1581
|
+
const v = e.getValueAt(o, i), w = u ? "" : `${v}`, y = e.isRowChecked(o), S = this.dom.addColumnDiv(
|
|
1554
1582
|
{
|
|
1555
|
-
parent:
|
|
1556
|
-
geo:
|
|
1557
|
-
rowIndex:
|
|
1583
|
+
parent: c,
|
|
1584
|
+
geo: p,
|
|
1585
|
+
rowIndex: o,
|
|
1558
1586
|
columnIndex: i,
|
|
1559
1587
|
areaIdent: t,
|
|
1560
|
-
sideIdent:
|
|
1561
|
-
text:
|
|
1562
|
-
treeArrow:
|
|
1588
|
+
sideIdent: s,
|
|
1589
|
+
text: w,
|
|
1590
|
+
treeArrow: f,
|
|
1563
1591
|
tableOptions: this.tableOptions,
|
|
1564
1592
|
checkedType: y,
|
|
1565
|
-
sortState:
|
|
1593
|
+
sortState: x
|
|
1566
1594
|
}
|
|
1567
|
-
),
|
|
1568
|
-
|
|
1595
|
+
), T = e.getTooltipAt(o, i);
|
|
1596
|
+
T && this.dom.setAttribute(S, "title", T);
|
|
1569
1597
|
const A = this.tableModel.getColumnDef(i);
|
|
1570
|
-
A && A.classes[t] && this.dom.addClasses(A.classes[t],
|
|
1598
|
+
A && A.classes[t] && this.dom.addClasses(A.classes[t], S);
|
|
1571
1599
|
let M;
|
|
1572
|
-
|
|
1573
|
-
const
|
|
1574
|
-
if (
|
|
1575
|
-
const
|
|
1576
|
-
|
|
1600
|
+
u && (M = u.render(S, o, i, t, e, v, this.dom.domService));
|
|
1601
|
+
const I = e.getCustomClassesAt(o, i);
|
|
1602
|
+
if (I.length && this.dom.addClasses(I, S), this.dom.addColumnBorderDivs(this.tableOptions, c, p, t, s), h && this.dom.addHorizontalBorder({ left: a, width: r, height: l, top: n + l }, c), this.getFocusModel && t === "body") {
|
|
1603
|
+
const C = this.getFocusModel();
|
|
1604
|
+
C != null && C.hasFocus(o, i) && this.dom.addFocusBorderDivs(c, p, {});
|
|
1577
1605
|
}
|
|
1578
|
-
t === "header" && this.dom.setAttribute(
|
|
1579
|
-
const
|
|
1580
|
-
if (
|
|
1581
|
-
for (const
|
|
1582
|
-
this.dom.setStyle(
|
|
1583
|
-
return [
|
|
1606
|
+
t === "header" && this.dom.setAttribute(S, "data-ge-action", "drag-column");
|
|
1607
|
+
const P = e.getCustomStyleAt(o, i);
|
|
1608
|
+
if (P)
|
|
1609
|
+
for (const C in P)
|
|
1610
|
+
this.dom.setStyle(S, C, P[C]);
|
|
1611
|
+
return [S, M];
|
|
1584
1612
|
}
|
|
1585
1613
|
/**
|
|
1586
1614
|
* Applies CSS classes to an HTML element.
|
|
@@ -1590,8 +1618,8 @@ class me extends ue {
|
|
|
1590
1618
|
* @protected
|
|
1591
1619
|
*/
|
|
1592
1620
|
applyCssClasses(e, t = {}) {
|
|
1593
|
-
e && Object.entries(t).forEach(([
|
|
1594
|
-
|
|
1621
|
+
e && Object.entries(t).forEach(([s, o]) => {
|
|
1622
|
+
o ? this.dom.addClass(s, e) : this.dom.removeClass(s, e);
|
|
1595
1623
|
});
|
|
1596
1624
|
}
|
|
1597
1625
|
/**
|
|
@@ -1603,10 +1631,10 @@ class me extends ue {
|
|
|
1603
1631
|
* @return {number[]} An array containing the widths of the columns within the specified range.
|
|
1604
1632
|
*/
|
|
1605
1633
|
getColumnWidths(e, t) {
|
|
1606
|
-
const
|
|
1607
|
-
for (let
|
|
1608
|
-
|
|
1609
|
-
return
|
|
1634
|
+
const s = [];
|
|
1635
|
+
for (let o = e; o <= t; o++)
|
|
1636
|
+
s.push(this.tableModel.getColumnWidth(o));
|
|
1637
|
+
return s;
|
|
1610
1638
|
}
|
|
1611
1639
|
/**
|
|
1612
1640
|
* Retrieves the heights of rows within a specified range.
|
|
@@ -1616,11 +1644,11 @@ class me extends ue {
|
|
|
1616
1644
|
* @param {AreaModelIf} areaModel - The area model.
|
|
1617
1645
|
* @return {number[]} - An array containing the heights of the rows within the specified range.
|
|
1618
1646
|
*/
|
|
1619
|
-
getRowHeights(e, t,
|
|
1620
|
-
const
|
|
1647
|
+
getRowHeights(e, t, s) {
|
|
1648
|
+
const o = [];
|
|
1621
1649
|
for (let i = e; i <= t; i++)
|
|
1622
|
-
|
|
1623
|
-
return
|
|
1650
|
+
o.push(s.getRowHeight(i));
|
|
1651
|
+
return o;
|
|
1624
1652
|
}
|
|
1625
1653
|
/**
|
|
1626
1654
|
* Adjusts the position and size of the hover row based on the mouse move event.
|
|
@@ -1631,12 +1659,12 @@ class me extends ue {
|
|
|
1631
1659
|
*/
|
|
1632
1660
|
adjustHoverRows(e) {
|
|
1633
1661
|
if (this.tableOptions.hoverRowVisible && e.rowIndex > -1) {
|
|
1634
|
-
const t = this.hostElement.clientWidth,
|
|
1662
|
+
const t = this.hostElement.clientWidth, s = this.tableModel.getAreaModel("body").getRowHeight(e.rowIndex), o = e.rowTop + this.areaHeaderCenter.parent.clientHeight - this.scrollTop;
|
|
1635
1663
|
this.dom.applyStyle(this.hoverRow, {
|
|
1636
1664
|
left: "0",
|
|
1637
|
-
top:
|
|
1665
|
+
top: o + "px",
|
|
1638
1666
|
width: t + "px",
|
|
1639
|
-
height:
|
|
1667
|
+
height: s + "px",
|
|
1640
1668
|
display: "block"
|
|
1641
1669
|
});
|
|
1642
1670
|
} else
|
|
@@ -1664,11 +1692,11 @@ class me extends ue {
|
|
|
1664
1692
|
*/
|
|
1665
1693
|
adjustHoverColumns(e) {
|
|
1666
1694
|
if (this.tableOptions.hoverColumnVisible && e.rowIndex > -1) {
|
|
1667
|
-
const t = this.hostElement.clientHeight,
|
|
1695
|
+
const t = this.hostElement.clientHeight, s = this.tableModel.getColumnWidth(e.columnIndex), o = this.areaBodyWestGeo.width, i = e.columnLeft + this.tableModel.getPadding().left - this.scrollLeft - o;
|
|
1668
1696
|
this.dom.applyStyle(this.hoverColumn, {
|
|
1669
1697
|
left: i + "px",
|
|
1670
1698
|
top: "0px",
|
|
1671
|
-
width:
|
|
1699
|
+
width: s + "px",
|
|
1672
1700
|
height: t + "px",
|
|
1673
1701
|
display: "block"
|
|
1674
1702
|
});
|
|
@@ -1707,17 +1735,17 @@ class me extends ue {
|
|
|
1707
1735
|
* @param {number} sourceColumnIndex - The index of the source column.
|
|
1708
1736
|
* @param {boolean} firstDraggingRendering - Indicates if it's the first rendering of the dragging column.
|
|
1709
1737
|
*/
|
|
1710
|
-
adjustDraggingColumn(e, t,
|
|
1711
|
-
var
|
|
1738
|
+
adjustDraggingColumn(e, t, s) {
|
|
1739
|
+
var o, i;
|
|
1712
1740
|
if (this.dragging) {
|
|
1713
|
-
const
|
|
1714
|
-
if ((
|
|
1715
|
-
const
|
|
1741
|
+
const a = this.hostElement.clientHeight, r = this.storedColumnWidths[t];
|
|
1742
|
+
if ((o = e.originalEvent) != null && o.clientX) {
|
|
1743
|
+
const c = { left: ((i = e.originalEvent) == null ? void 0 : i.clientX) - r / 2, width: r, height: a, top: 0, index: t };
|
|
1716
1744
|
this.dom.applyStyle(this.draggingColumn, {
|
|
1717
1745
|
background: "rgba(128,128,128,0.2)",
|
|
1718
1746
|
display: "block",
|
|
1719
1747
|
overfllow: "clip"
|
|
1720
|
-
}), this.dom.applyStyleInPx(this.draggingColumn,
|
|
1748
|
+
}), this.dom.applyStyleInPx(this.draggingColumn, c), s && this.renderContentOfDraggingColumn(c);
|
|
1721
1749
|
}
|
|
1722
1750
|
} else
|
|
1723
1751
|
this.hideDraggingColumn();
|
|
@@ -1741,34 +1769,34 @@ class me extends ue {
|
|
|
1741
1769
|
* @param {number} [y=0] - The starting y-position.
|
|
1742
1770
|
* @return {number} The final y-position after rendering all the content.
|
|
1743
1771
|
*/
|
|
1744
|
-
renderContentOfDraggingColumnForArea(e, t,
|
|
1745
|
-
const
|
|
1746
|
-
if (
|
|
1747
|
-
const
|
|
1748
|
-
for (let n = 0; n <
|
|
1749
|
-
const
|
|
1772
|
+
renderContentOfDraggingColumnForArea(e, t, s = 0) {
|
|
1773
|
+
const o = "center", i = this.tableModel.getAreaModel(t), a = i == null ? void 0 : i.getRowCount();
|
|
1774
|
+
if (a) {
|
|
1775
|
+
const r = e.index ?? 0, l = this.draggingColumn;
|
|
1776
|
+
for (let n = 0; n < a; n++) {
|
|
1777
|
+
const c = s, h = i.getRowHeight(n), d = { left: 0, width: e.width, height: h, top: c, index: n }, u = i.getValueAt(n, r), p = i.getCellRenderer(n, r), b = p ? "" : `${u}`, f = {
|
|
1750
1778
|
parent: l,
|
|
1751
|
-
geo:
|
|
1779
|
+
geo: d,
|
|
1752
1780
|
rowIndex: n,
|
|
1753
|
-
columnIndex:
|
|
1781
|
+
columnIndex: r,
|
|
1754
1782
|
areaIdent: t,
|
|
1755
|
-
sideIdent:
|
|
1756
|
-
text:
|
|
1757
|
-
},
|
|
1758
|
-
let
|
|
1759
|
-
|
|
1760
|
-
const
|
|
1761
|
-
|
|
1762
|
-
const
|
|
1763
|
-
|
|
1764
|
-
const y = i.getCustomStyleAt(n,
|
|
1783
|
+
sideIdent: o,
|
|
1784
|
+
text: b
|
|
1785
|
+
}, m = this.dom.addColumnDiv(f);
|
|
1786
|
+
let x;
|
|
1787
|
+
p && (x = p.render(m, n, r, t, i, u, this.dom.domService), x && this.cleanupFunctions[t].push(x));
|
|
1788
|
+
const v = i.getCustomClassesAt(n, r);
|
|
1789
|
+
v.length && this.dom.addClasses(v, m);
|
|
1790
|
+
const w = this.tableModel.getColumnDef(r);
|
|
1791
|
+
w && w.classes[t] && this.dom.addClasses(w.classes[t], m), this.dom.addColumnBorderDivs(this.tableOptions, l, d, t, o);
|
|
1792
|
+
const y = i.getCustomStyleAt(n, r);
|
|
1765
1793
|
if (y)
|
|
1766
|
-
for (const
|
|
1767
|
-
this.dom.setStyle(
|
|
1768
|
-
|
|
1794
|
+
for (const S in y)
|
|
1795
|
+
this.dom.setStyle(m, S, y[S]);
|
|
1796
|
+
s = s + h;
|
|
1769
1797
|
}
|
|
1770
1798
|
}
|
|
1771
|
-
return
|
|
1799
|
+
return s;
|
|
1772
1800
|
}
|
|
1773
1801
|
/**
|
|
1774
1802
|
* Hides the dragging column by applying a 'display: none' style to it.
|
|
@@ -1791,11 +1819,11 @@ class me extends ue {
|
|
|
1791
1819
|
* @param {number} height - The height of the target div in pixels.
|
|
1792
1820
|
* @return {HTMLDivElement} - The rendered draggable target div element.
|
|
1793
1821
|
*/
|
|
1794
|
-
renderDragTargetDiv(e, t,
|
|
1795
|
-
const
|
|
1822
|
+
renderDragTargetDiv(e, t, s, o, i) {
|
|
1823
|
+
const a = this.dom.applyStylePosistionAbsolute(
|
|
1796
1824
|
this.dom.createDivWithClass("ge-table-drop-zone", e)
|
|
1797
1825
|
);
|
|
1798
|
-
return this.dom.setStyle(
|
|
1826
|
+
return this.dom.setStyle(a, "left", `${t}px`), this.dom.setStyle(a, "top", `${s}px`), this.dom.setStyle(a, "width", `${o}px`), this.dom.setStyle(a, "height", `${i}px`), a;
|
|
1799
1827
|
}
|
|
1800
1828
|
/**
|
|
1801
1829
|
* Render selected background div.
|
|
@@ -1814,23 +1842,23 @@ class me extends ue {
|
|
|
1814
1842
|
* @param {number} height - The height of the div.
|
|
1815
1843
|
* @returns {boolean} - Whether the cell is selected.
|
|
1816
1844
|
*/
|
|
1817
|
-
renderSelectedBackgroundDiv(e, t,
|
|
1818
|
-
let
|
|
1819
|
-
if (!e && t &&
|
|
1820
|
-
const
|
|
1821
|
-
if (
|
|
1822
|
-
const
|
|
1823
|
-
|
|
1824
|
-
for (let
|
|
1825
|
-
const
|
|
1845
|
+
renderSelectedBackgroundDiv(e, t, s, o, i, a, r, l, n, c, h) {
|
|
1846
|
+
let d = !1;
|
|
1847
|
+
if (!e && t && o.isSelectable(i, a) && this.getSelectionModel) {
|
|
1848
|
+
const u = this.getSelectionModel();
|
|
1849
|
+
if (u) {
|
|
1850
|
+
const p = u.getSelectionCount(i, a);
|
|
1851
|
+
d = p > 0;
|
|
1852
|
+
for (let b = 0; b < p; b++) {
|
|
1853
|
+
const f = this.dom.applyStylePosistionAbsolute(
|
|
1826
1854
|
// ge-table-body-west-selected-range
|
|
1827
|
-
this.dom.createDivWithClass(`ge-table-${
|
|
1855
|
+
this.dom.createDivWithClass(`ge-table-${o.areaIdent}-${s}-selected-range`, r)
|
|
1828
1856
|
);
|
|
1829
|
-
this.dom.setStyle(
|
|
1857
|
+
this.dom.setStyle(f, "left", `${l}px`), this.dom.setStyle(f, "top", `${n}px`), this.dom.setStyle(f, "width", `${c}px`), this.dom.setStyle(f, "height", `${h}px`);
|
|
1830
1858
|
}
|
|
1831
1859
|
}
|
|
1832
1860
|
}
|
|
1833
|
-
return
|
|
1861
|
+
return d;
|
|
1834
1862
|
}
|
|
1835
1863
|
/**
|
|
1836
1864
|
* Renders a cell in the grid.
|
|
@@ -1854,31 +1882,31 @@ class me extends ue {
|
|
|
1854
1882
|
renderCell({
|
|
1855
1883
|
areaModel: e,
|
|
1856
1884
|
areaIdent: t,
|
|
1857
|
-
sideIdent:
|
|
1858
|
-
rowIndex:
|
|
1885
|
+
sideIdent: s,
|
|
1886
|
+
rowIndex: o,
|
|
1859
1887
|
columnIndex: i,
|
|
1860
|
-
left:
|
|
1861
|
-
top:
|
|
1888
|
+
left: a,
|
|
1889
|
+
top: r,
|
|
1862
1890
|
width: l,
|
|
1863
1891
|
height: n,
|
|
1864
|
-
parent:
|
|
1865
|
-
cellSelected:
|
|
1866
|
-
lastRowOfModel:
|
|
1892
|
+
parent: c,
|
|
1893
|
+
cellSelected: h,
|
|
1894
|
+
lastRowOfModel: d
|
|
1867
1895
|
}) {
|
|
1868
|
-
const [
|
|
1896
|
+
const [u, p] = this.addAndRenderCellDiv({
|
|
1869
1897
|
areaModel: e,
|
|
1870
1898
|
areaIdent: t,
|
|
1871
|
-
sideIdent:
|
|
1872
|
-
rowIndex:
|
|
1899
|
+
sideIdent: s,
|
|
1900
|
+
rowIndex: o,
|
|
1873
1901
|
index: i,
|
|
1874
|
-
left:
|
|
1902
|
+
left: a,
|
|
1875
1903
|
width: l,
|
|
1876
1904
|
height: n,
|
|
1877
|
-
top:
|
|
1878
|
-
parent:
|
|
1879
|
-
lastRowOfModel:
|
|
1905
|
+
top: r,
|
|
1906
|
+
parent: c,
|
|
1907
|
+
lastRowOfModel: d
|
|
1880
1908
|
});
|
|
1881
|
-
|
|
1909
|
+
h && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, u), p && this.cleanupFunctions[t].push(p);
|
|
1882
1910
|
}
|
|
1883
1911
|
/**
|
|
1884
1912
|
* Render the header cell resize handle.
|
|
@@ -1894,9 +1922,9 @@ class me extends ue {
|
|
|
1894
1922
|
*
|
|
1895
1923
|
* @return {void}
|
|
1896
1924
|
*/
|
|
1897
|
-
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft:
|
|
1898
|
-
const l = this.dom.domService, n = this.tableOptions.columnResizeHandleWidthInPx ?? 2,
|
|
1899
|
-
l.setAttribute(
|
|
1925
|
+
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: o, cellWidth: i, cellHeight: a, parent: r }) {
|
|
1926
|
+
const l = this.dom.domService, n = this.tableOptions.columnResizeHandleWidthInPx ?? 2, c = l.createElement("div");
|
|
1927
|
+
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", `${a}px`), l.appendChild(r, c);
|
|
1900
1928
|
}
|
|
1901
1929
|
}
|
|
1902
1930
|
class ye {
|
|
@@ -1904,7 +1932,7 @@ class ye {
|
|
|
1904
1932
|
this.columnIndex = e, this.sortState = t;
|
|
1905
1933
|
}
|
|
1906
1934
|
}
|
|
1907
|
-
class
|
|
1935
|
+
class xe {
|
|
1908
1936
|
constructor(e) {
|
|
1909
1937
|
this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
|
|
1910
1938
|
}
|
|
@@ -1918,52 +1946,52 @@ class ve {
|
|
|
1918
1946
|
*/
|
|
1919
1947
|
onHostElementChanged(e) {
|
|
1920
1948
|
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
|
|
1921
|
-
const t = e.target,
|
|
1922
|
-
if (
|
|
1923
|
-
const
|
|
1924
|
-
this.tableScope.updateModelValueAfterEdit(
|
|
1949
|
+
const t = e.target, s = t.getAttribute("data-area"), o = t.getAttribute("data-row-index"), i = t.getAttribute("data-col-index");
|
|
1950
|
+
if (s && o && i) {
|
|
1951
|
+
const a = V(s), r = Number(o), l = Number(i);
|
|
1952
|
+
this.tableScope.updateModelValueAfterEdit(a, r, l, t.value);
|
|
1925
1953
|
}
|
|
1926
1954
|
}
|
|
1927
1955
|
}
|
|
1928
1956
|
}
|
|
1929
|
-
class
|
|
1957
|
+
class ve {
|
|
1930
1958
|
constructor(e = -1, t = -1) {
|
|
1931
1959
|
this.rowIndex = e, this.columnIndex = t;
|
|
1932
1960
|
}
|
|
1933
1961
|
}
|
|
1934
|
-
class
|
|
1962
|
+
class N {
|
|
1935
1963
|
constructor(e) {
|
|
1936
1964
|
this.cells = e;
|
|
1937
1965
|
}
|
|
1938
1966
|
static createSingle(e, t) {
|
|
1939
|
-
return new
|
|
1967
|
+
return new N([new ve(e, t)]);
|
|
1940
1968
|
}
|
|
1941
1969
|
}
|
|
1942
|
-
class
|
|
1970
|
+
class Ce {
|
|
1943
1971
|
constructor(e) {
|
|
1944
|
-
var t,
|
|
1945
|
-
this.tableScope = e, (t = this.tableScope.tableOptions) != null && t.getSelectionModel && (this.getSelectionModel = this.tableScope.tableOptions.getSelectionModel), (
|
|
1972
|
+
var t, s;
|
|
1973
|
+
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);
|
|
1946
1974
|
}
|
|
1947
1975
|
onMouseClicked(e, t) {
|
|
1948
|
-
var i,
|
|
1949
|
-
let
|
|
1976
|
+
var i, a, r, l, n, c, h;
|
|
1977
|
+
let s = !1, o = !1;
|
|
1950
1978
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
1951
|
-
const
|
|
1952
|
-
|
|
1979
|
+
const d = this.getSelectionModel(), u = this.getFocusModel();
|
|
1980
|
+
d && u && (u.hasFocus(e.rowIndex, e.columnIndex) || (u.setFocus(e.rowIndex, e.columnIndex), this.tableScope.onFocusChanged(u), s = !0), (i = e.originalEvent) != null && i.shiftKey || d.hasSelection() && (d.clear(), s = !0), (a = e.originalEvent) != null && a.shiftKey && this.previousEvt ? (d.addSelection(this.createRangeByEvents(e, this.previousEvt)), o = !0, s = !0) : (r = e.originalEvent) != null && r.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));
|
|
1953
1981
|
}
|
|
1954
|
-
return
|
|
1982
|
+
return o ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), s;
|
|
1955
1983
|
}
|
|
1956
1984
|
onActionTriggered(e) {
|
|
1957
1985
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
1958
|
-
const t = this.getSelectionModel(),
|
|
1959
|
-
if (t &&
|
|
1986
|
+
const t = this.getSelectionModel(), s = this.getFocusModel();
|
|
1987
|
+
if (t && s) {
|
|
1960
1988
|
if (e === "SELECT_ALL")
|
|
1961
1989
|
return t.selectAll(), this.tableScope.repaint(), !0;
|
|
1962
1990
|
if (e === "DESELECT_ALL")
|
|
1963
1991
|
return t.clear(), this.tableScope.repaint(), !0;
|
|
1964
1992
|
if (e === "TOGGLE_SELECTION") {
|
|
1965
|
-
const [
|
|
1966
|
-
return t.togglePoint(
|
|
1993
|
+
const [o, i] = s.getFocus();
|
|
1994
|
+
return t.togglePoint(o, i), this.tableScope.repaint(), !0;
|
|
1967
1995
|
}
|
|
1968
1996
|
}
|
|
1969
1997
|
}
|
|
@@ -1971,16 +1999,16 @@ class we {
|
|
|
1971
1999
|
}
|
|
1972
2000
|
createRangeByEvents(e, t) {
|
|
1973
2001
|
t || (t = e);
|
|
1974
|
-
const
|
|
2002
|
+
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), a = Math.max(e.columnIndex, t == null ? void 0 : t.columnIndex);
|
|
1975
2003
|
return E.create({
|
|
1976
|
-
rowIndex1:
|
|
2004
|
+
rowIndex1: s,
|
|
1977
2005
|
columnIndex1: i,
|
|
1978
|
-
rowIndex2:
|
|
1979
|
-
columnIndex2:
|
|
2006
|
+
rowIndex2: o,
|
|
2007
|
+
columnIndex2: a
|
|
1980
2008
|
});
|
|
1981
2009
|
}
|
|
1982
2010
|
}
|
|
1983
|
-
class
|
|
2011
|
+
class we {
|
|
1984
2012
|
get() {
|
|
1985
2013
|
return {
|
|
1986
2014
|
f2: "START_EDITING",
|
|
@@ -2043,7 +2071,7 @@ class Ae {
|
|
|
2043
2071
|
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));
|
|
2044
2072
|
}
|
|
2045
2073
|
assignPredefinedSystemShortcutMappings() {
|
|
2046
|
-
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new Ee().get()) : Object.assign(this.shortcutActionIdMapping, new
|
|
2074
|
+
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new Ee().get()) : Object.assign(this.shortcutActionIdMapping, new we().get());
|
|
2047
2075
|
}
|
|
2048
2076
|
isMacintosh() {
|
|
2049
2077
|
return navigator.platform.indexOf("Mac") > -1;
|
|
@@ -2061,24 +2089,24 @@ class Ae {
|
|
|
2061
2089
|
emit(e) {
|
|
2062
2090
|
this.isDebug() && console.debug("ShortcutService emit :", e);
|
|
2063
2091
|
let t = !1;
|
|
2064
|
-
for (const
|
|
2065
|
-
|
|
2092
|
+
for (const s of this.listener)
|
|
2093
|
+
s.onActionTriggered(e) && (t = !0);
|
|
2066
2094
|
return t;
|
|
2067
2095
|
}
|
|
2068
2096
|
findEntity(e) {
|
|
2069
2097
|
const t = this.getTokenByEvent(e);
|
|
2070
2098
|
this.isDebug() && console.debug("ShortcutService tokens :", t);
|
|
2071
|
-
for (const
|
|
2072
|
-
const
|
|
2073
|
-
if (this.areTokensEquals(t,
|
|
2074
|
-
return this.shortcutActionIdMapping[
|
|
2099
|
+
for (const s in this.shortcutActionIdMapping) {
|
|
2100
|
+
const o = s.replace(/opt/g, "alt").replace(/cmd/g, "meta").split(/[+ ]/g).sort();
|
|
2101
|
+
if (this.areTokensEquals(t, o))
|
|
2102
|
+
return this.shortcutActionIdMapping[s];
|
|
2075
2103
|
}
|
|
2076
2104
|
}
|
|
2077
2105
|
areTokensEquals(e, t) {
|
|
2078
2106
|
if (e.length !== t.length || e.length === 0)
|
|
2079
2107
|
return !1;
|
|
2080
|
-
for (let
|
|
2081
|
-
if (e[
|
|
2108
|
+
for (let s = 0; s < e.length; s++)
|
|
2109
|
+
if (e[s] !== t[s])
|
|
2082
2110
|
return !1;
|
|
2083
2111
|
return !0;
|
|
2084
2112
|
}
|
|
@@ -2116,18 +2144,18 @@ class X {
|
|
|
2116
2144
|
}
|
|
2117
2145
|
}
|
|
2118
2146
|
class J {
|
|
2119
|
-
setStyle(e, t,
|
|
2120
|
-
return e.style[t] =
|
|
2147
|
+
setStyle(e, t, s) {
|
|
2148
|
+
return e.style[t] = s, e;
|
|
2121
2149
|
}
|
|
2122
2150
|
appendText(e, t) {
|
|
2123
|
-
const
|
|
2124
|
-
return this.appendChild(e,
|
|
2151
|
+
const s = this.createText(t);
|
|
2152
|
+
return this.appendChild(e, s), s;
|
|
2125
2153
|
}
|
|
2126
2154
|
addClass(e, t) {
|
|
2127
|
-
return t.includes(" ") ? t.split(" ").forEach((
|
|
2155
|
+
return t.includes(" ") ? t.split(" ").forEach((s) => e.classList.add(s)) : e.classList.add(t), e;
|
|
2128
2156
|
}
|
|
2129
2157
|
removeClass(e, t) {
|
|
2130
|
-
return t.includes(" ") ? t.split(" ").forEach((
|
|
2158
|
+
return t.includes(" ") ? t.split(" ").forEach((s) => e.classList.remove(s)) : e.classList.remove(t), e;
|
|
2131
2159
|
}
|
|
2132
2160
|
appendChild(e, t) {
|
|
2133
2161
|
e.appendChild(t);
|
|
@@ -2138,15 +2166,15 @@ class J {
|
|
|
2138
2166
|
createText(e) {
|
|
2139
2167
|
return document.createTextNode(e);
|
|
2140
2168
|
}
|
|
2141
|
-
setAttribute(e, t,
|
|
2142
|
-
e.setAttribute(t,
|
|
2169
|
+
setAttribute(e, t, s) {
|
|
2170
|
+
e.setAttribute(t, s);
|
|
2143
2171
|
}
|
|
2144
2172
|
}
|
|
2145
2173
|
class Me {
|
|
2146
|
-
render(e, t,
|
|
2147
|
-
if (i.isEditable(t,
|
|
2148
|
-
|
|
2149
|
-
const l = i.getValueAt(t,
|
|
2174
|
+
render(e, t, s, o, i, a, r) {
|
|
2175
|
+
if (i.isEditable(t, s)) {
|
|
2176
|
+
r.addClass(e, "ge-table-row-input-div");
|
|
2177
|
+
const l = i.getValueAt(t, s);
|
|
2150
2178
|
e.innerHTML = `
|
|
2151
2179
|
<input
|
|
2152
2180
|
type="text"
|
|
@@ -2154,16 +2182,16 @@ class Me {
|
|
|
2154
2182
|
autofocus
|
|
2155
2183
|
onfocus="this.setSelectionRange(0, this.value.length)"
|
|
2156
2184
|
data-listen="change"
|
|
2157
|
-
data-area="${
|
|
2185
|
+
data-area="${o}"
|
|
2158
2186
|
data-row-index="${t}"
|
|
2159
|
-
data-col-index="${
|
|
2187
|
+
data-col-index="${s}"
|
|
2160
2188
|
data-input-type="text"
|
|
2161
2189
|
style="width:calc(100% - 8px);height:100%;border:0;padding:0 0 0 8px;"
|
|
2162
2190
|
class="ge-table-cell-editor-input">`;
|
|
2163
2191
|
}
|
|
2164
2192
|
}
|
|
2165
2193
|
}
|
|
2166
|
-
class
|
|
2194
|
+
class Te {
|
|
2167
2195
|
constructor(e = "none", t = "single") {
|
|
2168
2196
|
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1, this.silent = !1, this.listenerArr = [];
|
|
2169
2197
|
}
|
|
@@ -2185,14 +2213,14 @@ class Re {
|
|
|
2185
2213
|
this.selectionType === "row" ? this.addRange(E.singleRow(e)) : this.selectionType === "column" && this.addRange(E.singleColumn(t));
|
|
2186
2214
|
}
|
|
2187
2215
|
getSelectionCount(e, t) {
|
|
2188
|
-
let
|
|
2189
|
-
for (const
|
|
2190
|
-
|
|
2191
|
-
return this.allSelected &&
|
|
2216
|
+
let s = 0;
|
|
2217
|
+
for (const o of this.ranges)
|
|
2218
|
+
o.isInRange(e, t) && s++;
|
|
2219
|
+
return this.allSelected && s++, this.isInNegativeRange(e, t) && (s = 0), s;
|
|
2192
2220
|
}
|
|
2193
2221
|
isInNegativeRange(e, t) {
|
|
2194
|
-
for (const
|
|
2195
|
-
if (
|
|
2222
|
+
for (const s of this.negativeRanges)
|
|
2223
|
+
if (s.isInRange(e, t))
|
|
2196
2224
|
return !0;
|
|
2197
2225
|
return !1;
|
|
2198
2226
|
}
|
|
@@ -2216,8 +2244,8 @@ class Re {
|
|
|
2216
2244
|
getMergedRowIndices() {
|
|
2217
2245
|
const e = /* @__PURE__ */ new Set();
|
|
2218
2246
|
for (const t of this.ranges)
|
|
2219
|
-
for (let
|
|
2220
|
-
!e.has(
|
|
2247
|
+
for (let s = t.r1; s <= t.r2; s++)
|
|
2248
|
+
!e.has(s) && !this.isInNegativeRange(s, 0) && e.add(s);
|
|
2221
2249
|
return Array.from(e);
|
|
2222
2250
|
}
|
|
2223
2251
|
selectAll() {
|
|
@@ -2245,7 +2273,7 @@ class Re {
|
|
|
2245
2273
|
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());
|
|
2246
2274
|
}
|
|
2247
2275
|
}
|
|
2248
|
-
class
|
|
2276
|
+
class Re {
|
|
2249
2277
|
constructor(e = "none") {
|
|
2250
2278
|
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1, this.listenerArr = [];
|
|
2251
2279
|
}
|
|
@@ -2282,7 +2310,7 @@ class Te {
|
|
|
2282
2310
|
return [this.rowIndex, this.columnIndex];
|
|
2283
2311
|
}
|
|
2284
2312
|
}
|
|
2285
|
-
class
|
|
2313
|
+
class Z {
|
|
2286
2314
|
constructor(e = new D(
|
|
2287
2315
|
"❯",
|
|
2288
2316
|
"",
|
|
@@ -2296,14 +2324,14 @@ class Q {
|
|
|
2296
2324
|
}
|
|
2297
2325
|
// `⊖ `, `⊕ `;
|
|
2298
2326
|
}
|
|
2299
|
-
const De = new
|
|
2300
|
-
class
|
|
2327
|
+
const De = new Te(), ke = new Re("cell");
|
|
2328
|
+
class Q {
|
|
2301
2329
|
constructor() {
|
|
2302
2330
|
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 = {
|
|
2303
2331
|
header: 34,
|
|
2304
2332
|
body: 34,
|
|
2305
2333
|
footer: 34
|
|
2306
|
-
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new
|
|
2334
|
+
}, 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 Me(), this.getSelectionModel = () => De, this.getFocusModel = () => ke;
|
|
2307
2335
|
}
|
|
2308
2336
|
}
|
|
2309
2337
|
const F = class F {
|
|
@@ -2316,27 +2344,27 @@ const F = class F {
|
|
|
2316
2344
|
* @return {Promise<string>} A promise that resolves to the copied content as a string.
|
|
2317
2345
|
* @throws {string} Throws an error if neither selection nor focus is defined.
|
|
2318
2346
|
*/
|
|
2319
|
-
createContent(e, t,
|
|
2320
|
-
return new Promise((
|
|
2347
|
+
createContent(e, t, s) {
|
|
2348
|
+
return new Promise((o, i) => {
|
|
2321
2349
|
if (t != null && t.hasSelection()) {
|
|
2322
|
-
const
|
|
2323
|
-
if (
|
|
2324
|
-
|
|
2325
|
-
const
|
|
2326
|
-
for (let l =
|
|
2350
|
+
const a = this.mergeRanges(t.getRanges());
|
|
2351
|
+
if (a) {
|
|
2352
|
+
a.c2 = Math.min(a.c2, e.getColumnCount() - 1), a.r2 = Math.min(a.r2, e.getBodyModel().getRowCount() - 1);
|
|
2353
|
+
const r = [];
|
|
2354
|
+
for (let l = a.r1; l <= a.r2; l++) {
|
|
2327
2355
|
const n = [];
|
|
2328
|
-
for (let
|
|
2329
|
-
const
|
|
2330
|
-
n.push(
|
|
2356
|
+
for (let c = a.c1; c <= a.c2; c++) {
|
|
2357
|
+
const h = t.isSelected(l, c) ? e.getBodyModel().getTextValueAt(l, c) : "";
|
|
2358
|
+
n.push(h);
|
|
2331
2359
|
}
|
|
2332
|
-
|
|
2360
|
+
r.push(n.join(F.columnSeparatorChar));
|
|
2333
2361
|
}
|
|
2334
|
-
return
|
|
2362
|
+
return o(r.join(F.rowSeparatorChar));
|
|
2335
2363
|
}
|
|
2336
2364
|
}
|
|
2337
|
-
if (
|
|
2338
|
-
const [
|
|
2339
|
-
return
|
|
2365
|
+
if (s) {
|
|
2366
|
+
const [a, r] = s.getFocus(), l = e.getBodyModel().getTextValueAt(a, r);
|
|
2367
|
+
return o(l);
|
|
2340
2368
|
}
|
|
2341
2369
|
i("Cannot copy, neither selection nor focus defined.");
|
|
2342
2370
|
});
|
|
@@ -2358,19 +2386,19 @@ const F = class F {
|
|
|
2358
2386
|
* @param {FocusModelIf} focusModel - The focus model of the table.
|
|
2359
2387
|
* @returns {Promise<string>} A promise that resolves with the copied text if successful, or rejects if an error occurs.
|
|
2360
2388
|
*/
|
|
2361
|
-
copyToClipboard(e, t,
|
|
2362
|
-
return new Promise((
|
|
2389
|
+
copyToClipboard(e, t, s) {
|
|
2390
|
+
return new Promise((o, i) => {
|
|
2363
2391
|
this.createContent(
|
|
2364
2392
|
e,
|
|
2365
2393
|
t,
|
|
2366
|
-
|
|
2367
|
-
).then((
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
}).catch((
|
|
2394
|
+
s
|
|
2395
|
+
).then((a) => {
|
|
2396
|
+
a && this.copyContent(a).then((r) => {
|
|
2397
|
+
o(a);
|
|
2398
|
+
}).catch((r) => {
|
|
2371
2399
|
i();
|
|
2372
2400
|
});
|
|
2373
|
-
}).catch((
|
|
2401
|
+
}).catch((a) => {
|
|
2374
2402
|
i();
|
|
2375
2403
|
});
|
|
2376
2404
|
});
|
|
@@ -2383,35 +2411,141 @@ const F = class F {
|
|
|
2383
2411
|
*/
|
|
2384
2412
|
mergeRanges(e) {
|
|
2385
2413
|
let t;
|
|
2386
|
-
for (const
|
|
2387
|
-
t ? (t.r1 = Math.min(t.r1,
|
|
2414
|
+
for (const s of e)
|
|
2415
|
+
t ? (t.r1 = Math.min(t.r1, s.r1), t.c1 = Math.min(t.c1, s.c1), t.r2 = Math.max(t.r2, s.r2), t.c2 = Math.max(t.c2, s.c2)) : t = new E(s.r1, s.c1, s.r2, s.c2);
|
|
2388
2416
|
return t;
|
|
2389
2417
|
}
|
|
2390
2418
|
};
|
|
2391
2419
|
F.columnSeparatorChar = " ", F.rowSeparatorChar = `
|
|
2392
2420
|
`;
|
|
2393
|
-
let
|
|
2421
|
+
let L = F;
|
|
2394
2422
|
class Fe {
|
|
2395
|
-
constructor(e) {
|
|
2396
|
-
this.tableScope = e, new ResizeObserver(
|
|
2423
|
+
constructor(e, t = 500) {
|
|
2424
|
+
this.tableScope = e, this.debounceDelay = t, new ResizeObserver(re(this.handleResize.bind(this), t)).observe(this.tableScope.hostElement);
|
|
2397
2425
|
}
|
|
2398
2426
|
handleResize(e) {
|
|
2399
|
-
const t = e[0], { width:
|
|
2400
|
-
this.tableScope.recalcColumnWidths(
|
|
2427
|
+
const t = e[0], { width: s } = t.contentRect;
|
|
2428
|
+
this.tableScope.recalcColumnWidths(s);
|
|
2429
|
+
}
|
|
2430
|
+
}
|
|
2431
|
+
class Ie {
|
|
2432
|
+
/**
|
|
2433
|
+
* Downloads a matrix data as an Excel file.
|
|
2434
|
+
*
|
|
2435
|
+
* @param {Array<Array<any>>} matrix - A 2D array representing the data to be included in the Excel file. Each inner array corresponds to a row in the sheet.
|
|
2436
|
+
* @param {string} [filename='file.xlsx'] - The name of the Excel file to be downloaded. Defaults to 'file.xlsx'.
|
|
2437
|
+
* @param {string} [author=''] - The author's name to include as metadata in the Excel file. Optional parameter.
|
|
2438
|
+
* @return {void} Does not return a value.
|
|
2439
|
+
* @throws {Error} Throws an error if the input matrix is not a valid 2D array or if the filename is an empty string.
|
|
2440
|
+
*/
|
|
2441
|
+
downloadExcel(e, t = "file.xlsx", s = "") {
|
|
2442
|
+
if (!Array.isArray(e) || e.some((o) => !Array.isArray(o)))
|
|
2443
|
+
throw new Error("Invalid matrix format. Expected a 2D array.");
|
|
2444
|
+
if ((t == null ? void 0 : t.trim()) === "")
|
|
2445
|
+
throw new Error("Invalid filename. Filename must be a non-empty string.");
|
|
2446
|
+
try {
|
|
2447
|
+
const o = this.generateBuffer(e, s), i = new Blob([o], {
|
|
2448
|
+
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
2449
|
+
}), a = document.createElement("a");
|
|
2450
|
+
a.href = URL.createObjectURL(i), a.download = t, document.body.appendChild(a), a.click(), document.body.removeChild(a);
|
|
2451
|
+
} catch (o) {
|
|
2452
|
+
throw console.error("Error generating Excel file:", o), new Error("Failed to download Excel file.");
|
|
2453
|
+
}
|
|
2454
|
+
}
|
|
2455
|
+
generateMap(e, t = "") {
|
|
2456
|
+
const s = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2457
|
+
<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"?>
|
|
2458
|
+
<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"?>
|
|
2459
|
+
<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>`, a = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2460
|
+
<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>`, r = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2461
|
+
<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"?>
|
|
2462
|
+
<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"?>
|
|
2463
|
+
<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"?>
|
|
2464
|
+
<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"?>
|
|
2465
|
+
<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();
|
|
2466
|
+
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", a), d.set("xl/theme/theme1.xml", r), 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;
|
|
2467
|
+
}
|
|
2468
|
+
getX1WorksheetsSheet1Xml(e) {
|
|
2469
|
+
const t = [];
|
|
2470
|
+
t.push(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2471
|
+
<worksheet 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="x14ac xr xr2 xr3" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2" xmlns:xr3="http://schemas.microsoft.com/office/spreadsheetml/2016/revision3" xr:uid="{E15F8FC4-4D40-434C-921A-3D9CFAAA2865}">
|
|
2472
|
+
<dimension ref="A1:B3"/>
|
|
2473
|
+
<sheetViews>
|
|
2474
|
+
<sheetView tabSelected="1" workbookViewId="0"/></sheetViews>
|
|
2475
|
+
<sheetFormatPr baseColWidth="10" defaultRowHeight="16" x14ac:dyDescent="0.2"/>
|
|
2476
|
+
<sheetData>`);
|
|
2477
|
+
for (let s = 0; s < e.length; s++) {
|
|
2478
|
+
const o = e[s];
|
|
2479
|
+
t.push('<row r="${r + 1}" spans="1:2" x14ac:dyDescent="0.2">');
|
|
2480
|
+
for (let i = 0; i < o.length; i++) {
|
|
2481
|
+
const a = o[i], r = this.getCellAddress(s, i);
|
|
2482
|
+
if (typeof a == "number")
|
|
2483
|
+
t.push(`<c r="${r}"><v>${a}</v></c>`);
|
|
2484
|
+
else if (a instanceof Date) {
|
|
2485
|
+
const l = a;
|
|
2486
|
+
t.push(`<c r="${r}" t="inlineStr"><is><t>${l.toISOString()}</t></is></c>`);
|
|
2487
|
+
} else {
|
|
2488
|
+
const l = a != null ? this.escapeXml(String(a)) : "";
|
|
2489
|
+
t.push(`<c r="${r}" t="inlineStr"><is><t>${l}</t></is></c>`);
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2492
|
+
t.push("</row>");
|
|
2493
|
+
}
|
|
2494
|
+
return t.push(""), t.push(""), t.push('</sheetData><pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"/>'), t.push("</worksheet>"), t.join(`
|
|
2495
|
+
`);
|
|
2496
|
+
}
|
|
2497
|
+
escapeXml(e) {
|
|
2498
|
+
return e == null ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2499
|
+
}
|
|
2500
|
+
getCellAddress(e, t) {
|
|
2501
|
+
const s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
2502
|
+
let o = "";
|
|
2503
|
+
for (; t >= 0; )
|
|
2504
|
+
o = s[t % 26] + o, t = Math.floor(t / 26) - 1;
|
|
2505
|
+
return `${o}${e + 1}`;
|
|
2506
|
+
}
|
|
2507
|
+
createZip(e) {
|
|
2508
|
+
const t = [];
|
|
2509
|
+
let s = 0;
|
|
2510
|
+
const o = [];
|
|
2511
|
+
e.forEach((h, d) => {
|
|
2512
|
+
const u = new TextEncoder().encode(d), p = new TextEncoder().encode(h), b = new Uint8Array(30 + u.length), f = new DataView(b.buffer);
|
|
2513
|
+
b.set([80, 75, 3, 4], 0), f.setUint16(4, 20, !0), f.setUint16(6, 0, !0), f.setUint16(8, 0, !0), f.setUint16(10, 0, !0), f.setUint16(12, 0, !0), f.setUint32(14, 0, !0), f.setUint32(18, p.length, !0), f.setUint32(22, p.length, !0), f.setUint16(26, u.length, !0), f.setUint16(28, 0, !0), b.set(u, 30), t.push(b, p), o.push({
|
|
2514
|
+
path: d,
|
|
2515
|
+
offset: s,
|
|
2516
|
+
contentSize: p.length
|
|
2517
|
+
}), s += b.length + p.length;
|
|
2518
|
+
});
|
|
2519
|
+
const i = s;
|
|
2520
|
+
o.forEach((h) => {
|
|
2521
|
+
const d = new TextEncoder().encode(h.path), u = new Uint8Array(46 + d.length), p = new DataView(u.buffer);
|
|
2522
|
+
u.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), u.set(d, 46), t.push(u), s += u.length;
|
|
2523
|
+
});
|
|
2524
|
+
const a = new Uint8Array(22), r = new DataView(a.buffer);
|
|
2525
|
+
a.set([80, 75, 5, 6], 0), r.setUint16(4, 0, !0), r.setUint16(6, 0, !0), r.setUint16(8, o.length, !0), r.setUint16(10, o.length, !0), r.setUint32(12, s - i, !0), r.setUint32(16, i, !0), r.setUint16(20, 0, !0), t.push(a);
|
|
2526
|
+
const l = t.reduce((h, d) => h + d.length, 0), n = new Uint8Array(l);
|
|
2527
|
+
let c = 0;
|
|
2528
|
+
for (const h of t)
|
|
2529
|
+
n.set(h, c), c += h.length;
|
|
2530
|
+
return n;
|
|
2531
|
+
}
|
|
2532
|
+
generateBuffer(e, t = "") {
|
|
2533
|
+
const s = this.generateMap(e, t);
|
|
2534
|
+
return this.createZip(s);
|
|
2401
2535
|
}
|
|
2402
2536
|
}
|
|
2403
|
-
class
|
|
2404
|
-
constructor(e, t,
|
|
2405
|
-
var
|
|
2406
|
-
if (super(e, t, new
|
|
2407
|
-
const
|
|
2408
|
-
|
|
2537
|
+
class _ extends Se {
|
|
2538
|
+
constructor(e, t, s, o, i, a = new L(), r = new Ie()) {
|
|
2539
|
+
var c;
|
|
2540
|
+
if (super(e, t, new le(s), o), this.eventListener = i, this.copyService = a, this.excelService = r, this.licenseManager = k.getInstance(), this.selectionService = new Ce(this), this.api = new de(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, i || (this.eventListener = new X()), (c = this.tableOptions) != null && c.autoRestoreOptions) {
|
|
2541
|
+
const h = this.tableOptions.autoRestoreOptions, d = h.getStorageKeyFn;
|
|
2542
|
+
d && (h.autoRestoreScrollPosition && (this.storeScrollPosStateService = new he(d)), h.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new ge(d)), h.autoRestoreSortingState && (this.storeSortingService = new fe(d)));
|
|
2409
2543
|
}
|
|
2410
|
-
this.mouseHandler = new
|
|
2411
|
-
const
|
|
2412
|
-
|
|
2413
|
-
const
|
|
2414
|
-
|
|
2544
|
+
this.mouseHandler = new ce(this), this.inputHandler = new xe(this), this.resizeHandler = new Fe(this, o.resizeEventDebounceDelay), this.shortcutService = new Ae(this), this.shortcutService.addListener(this.selectionService);
|
|
2545
|
+
const l = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
2546
|
+
l && l.addEventSelectionChangedListener(this);
|
|
2547
|
+
const n = this.getFocusModel ? this.getFocusModel() : void 0;
|
|
2548
|
+
n && n.addEventFocusChangedListener(this);
|
|
2415
2549
|
}
|
|
2416
2550
|
/**
|
|
2417
2551
|
* Creates a TableScope instance.
|
|
@@ -2425,8 +2559,8 @@ class V extends me {
|
|
|
2425
2559
|
*
|
|
2426
2560
|
* @return {TableScope} - The newly created TableScope instance.
|
|
2427
2561
|
*/
|
|
2428
|
-
static create(e, t,
|
|
2429
|
-
return new
|
|
2562
|
+
static create(e, t, s = new Q(), o = new X(), i = new J(), a = new L()) {
|
|
2563
|
+
return new _(e, t, i, s, o, a);
|
|
2430
2564
|
}
|
|
2431
2565
|
/**
|
|
2432
2566
|
* Triggers an action based on the provided actionId.
|
|
@@ -2442,19 +2576,19 @@ class V extends me {
|
|
|
2442
2576
|
if (e === "START_EDITING" && this.getFocusModel) {
|
|
2443
2577
|
const t = this.getFocusModel();
|
|
2444
2578
|
if (t) {
|
|
2445
|
-
const [
|
|
2446
|
-
this.tableModel.getBodyModel().isEditable(
|
|
2579
|
+
const [s, o] = t.getFocus();
|
|
2580
|
+
this.tableModel.getBodyModel().isEditable(s, o) && (this.clearSelection(), this.initRenderEditor(s, o));
|
|
2447
2581
|
}
|
|
2448
2582
|
return !0;
|
|
2449
2583
|
}
|
|
2450
2584
|
if (e === "COPY_2_CLIPBOARD") {
|
|
2451
|
-
const t = this.getSelectionModel ? this.getSelectionModel() : void 0,
|
|
2452
|
-
this.copyService.createContent(this.tableModel, t,
|
|
2585
|
+
const t = this.getSelectionModel ? this.getSelectionModel() : void 0, s = this.getFocusModel ? this.getFocusModel() : void 0;
|
|
2586
|
+
this.copyService.createContent(this.tableModel, t, s).then((o) => this.copyService.copyContent(o));
|
|
2453
2587
|
}
|
|
2454
2588
|
return !1;
|
|
2455
2589
|
}
|
|
2456
|
-
updateModelValueAfterEdit(e, t,
|
|
2457
|
-
e === "body" && this.tableModel.getAreaModel(e).setValue(t,
|
|
2590
|
+
updateModelValueAfterEdit(e, t, s, o) {
|
|
2591
|
+
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, o) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(N.createSingle(t, s)), this.hostElement.focus());
|
|
2458
2592
|
}
|
|
2459
2593
|
/**
|
|
2460
2594
|
* Retrieves the TableApi object.
|
|
@@ -2483,16 +2617,16 @@ class V extends me {
|
|
|
2483
2617
|
* @return {GeMouseEvent} - The created GeMouseEvent object.
|
|
2484
2618
|
*/
|
|
2485
2619
|
createGeMouseEvent(e) {
|
|
2486
|
-
const t = new
|
|
2620
|
+
const t = new W();
|
|
2487
2621
|
if (t.originalEvent = e, e) {
|
|
2488
|
-
const
|
|
2489
|
-
if ([t.areaIdent, t.sideIdent] = this.getAreaAndSideIdentByAttr(
|
|
2490
|
-
const
|
|
2491
|
-
t.rowTop =
|
|
2622
|
+
const s = e.target;
|
|
2623
|
+
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) {
|
|
2624
|
+
const o = this.tableModel.getAreaModel(t.areaIdent);
|
|
2625
|
+
t.rowTop = o.getYPosByRowIndex(t.rowIndex);
|
|
2492
2626
|
}
|
|
2493
2627
|
if (t.columnLeft = this.tableModel.getXPosByColumnIndex(t.columnIndex), e.ctrlKey && e.altKey) {
|
|
2494
|
-
const
|
|
2495
|
-
this.debugOnce(i,
|
|
2628
|
+
const o = e.clientY - this.hostElement.offsetTop - this.areaHeaderCenter.parent.clientHeight, i = e.clientX - this.hostElement.offsetLeft - this.areaBodyWestGeo.width;
|
|
2629
|
+
this.debugOnce(i, o);
|
|
2496
2630
|
}
|
|
2497
2631
|
}
|
|
2498
2632
|
return t;
|
|
@@ -2551,9 +2685,9 @@ class V extends me {
|
|
|
2551
2685
|
* @return {void}
|
|
2552
2686
|
*/
|
|
2553
2687
|
toggleExpandCollapseAll(e = !0) {
|
|
2554
|
-
var
|
|
2688
|
+
var s;
|
|
2555
2689
|
const t = this.tableModel.getBodyModel();
|
|
2556
|
-
|
|
2690
|
+
H(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (s = this.storeStateCollapsedExpandService) == null || s.collapsedStateAll(e));
|
|
2557
2691
|
}
|
|
2558
2692
|
/**
|
|
2559
2693
|
* Toggles the checkbox state of a specific row in a table.
|
|
@@ -2564,12 +2698,12 @@ class V extends me {
|
|
|
2564
2698
|
*
|
|
2565
2699
|
* @return {void} - This method does not return anything.
|
|
2566
2700
|
*/
|
|
2567
|
-
toggleRowCheckbox(e, t,
|
|
2701
|
+
toggleRowCheckbox(e, t, s) {
|
|
2568
2702
|
var l;
|
|
2569
|
-
const
|
|
2570
|
-
|
|
2571
|
-
const
|
|
2572
|
-
this.eventListener.onCheckboxChanged(
|
|
2703
|
+
const o = this.tableModel.getAreaModel(s), i = o.isRowChecked(e), a = i === void 0 || i === "semi" || i === "none";
|
|
2704
|
+
o.setRowChecked(e, a), this.repaint();
|
|
2705
|
+
const r = (l = o.rowSelectionModel) == null ? void 0 : l.getCheckedRows();
|
|
2706
|
+
this.eventListener.onCheckboxChanged(r || []);
|
|
2573
2707
|
}
|
|
2574
2708
|
/**
|
|
2575
2709
|
* Handle mouse click events.
|
|
@@ -2579,13 +2713,13 @@ class V extends me {
|
|
|
2579
2713
|
* @returns {void}
|
|
2580
2714
|
*/
|
|
2581
2715
|
onMouseClicked(e, t) {
|
|
2582
|
-
let
|
|
2583
|
-
if (!
|
|
2716
|
+
let s = this.selectionService.onMouseClicked(e, t);
|
|
2717
|
+
if (!s && this.getFocusModel) {
|
|
2584
2718
|
this.resetEditorRenderer();
|
|
2585
|
-
const
|
|
2586
|
-
|
|
2719
|
+
const o = this.getFocusModel();
|
|
2720
|
+
o && (s = o.hasChanged(), o.clearChanged());
|
|
2587
2721
|
}
|
|
2588
|
-
return
|
|
2722
|
+
return s;
|
|
2589
2723
|
}
|
|
2590
2724
|
debounceRepaint() {
|
|
2591
2725
|
this.debounce(this.repaint.bind(this), 1);
|
|
@@ -2618,13 +2752,13 @@ class V extends me {
|
|
|
2618
2752
|
*
|
|
2619
2753
|
* @return {void}
|
|
2620
2754
|
*/
|
|
2621
|
-
onHeaderDblClicked(e, t,
|
|
2622
|
-
var i,
|
|
2623
|
-
const
|
|
2624
|
-
if (
|
|
2755
|
+
onHeaderDblClicked(e, t, s) {
|
|
2756
|
+
var i, a;
|
|
2757
|
+
const o = this.tableModel.getColumnDef(s);
|
|
2758
|
+
if (o != null && o.sortable && o.sortable()) {
|
|
2625
2759
|
e.preventDefault(), e.stopPropagation();
|
|
2626
|
-
const
|
|
2627
|
-
this.tableModel.doSort([
|
|
2760
|
+
const r = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, l = o.sortState ?? "", n = r[(r.indexOf(l) + 1) % r.length], c = new ye(s, n);
|
|
2761
|
+
this.tableModel.doSort([c]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((d) => d.sortState = ""), o.sortState = n), this.repaint(), (a = this.storeSortingService) == null || a.setSortItems([c]);
|
|
2628
2762
|
}
|
|
2629
2763
|
}
|
|
2630
2764
|
/**
|
|
@@ -2646,8 +2780,8 @@ class V extends me {
|
|
|
2646
2780
|
* @return {void}
|
|
2647
2781
|
*/
|
|
2648
2782
|
scrollToIndex(e, t) {
|
|
2649
|
-
const
|
|
2650
|
-
this.scrollToPixel(0,
|
|
2783
|
+
const o = this.tableModel.getAreaModel("body").getYPosByRowIndex(t);
|
|
2784
|
+
this.scrollToPixel(0, o);
|
|
2651
2785
|
}
|
|
2652
2786
|
/**
|
|
2653
2787
|
* Sets the selection model for the table.
|
|
@@ -2658,8 +2792,8 @@ class V extends me {
|
|
|
2658
2792
|
* @return {void} - This method does not return any value.
|
|
2659
2793
|
*/
|
|
2660
2794
|
setSelectionModel(e, t = !1) {
|
|
2661
|
-
const
|
|
2662
|
-
this.tableOptions.getSelectionModel =
|
|
2795
|
+
const s = () => e;
|
|
2796
|
+
this.tableOptions.getSelectionModel = s, this.getSelectionModel = s, this.selectionService.getSelectionModel = s, t && this.repaint();
|
|
2663
2797
|
}
|
|
2664
2798
|
toggleHeaderGroup(e) {
|
|
2665
2799
|
const t = this.tableModel.getAreaModel("header");
|
|
@@ -2694,10 +2828,10 @@ class V extends me {
|
|
|
2694
2828
|
*/
|
|
2695
2829
|
changeFocusCell(e, t) {
|
|
2696
2830
|
if (!this.isEditing() && this.getFocusModel) {
|
|
2697
|
-
const
|
|
2698
|
-
if (
|
|
2699
|
-
const [
|
|
2700
|
-
return
|
|
2831
|
+
const s = this.getFocusModel();
|
|
2832
|
+
if (s) {
|
|
2833
|
+
const [o, i] = s.getFocus();
|
|
2834
|
+
return s.setFocus(o + t, i + e), this.repaint(), !0;
|
|
2701
2835
|
}
|
|
2702
2836
|
}
|
|
2703
2837
|
return !1;
|
|
@@ -2720,8 +2854,8 @@ class V extends me {
|
|
|
2720
2854
|
this.getSelectionModel && ((e = this.getSelectionModel()) == null || e.clear());
|
|
2721
2855
|
}
|
|
2722
2856
|
debugOnce(e, t) {
|
|
2723
|
-
var
|
|
2724
|
-
console.clear(), console.info("this.hostElement.offsetTop", this.hostElement.offsetTop), console.info("this.hostElement.scrollHeight", this.hostElement.scrollHeight), console.info("this.scrollViewportTop", this.scrollTop), console.info("this.areaHeaderCenter.parent.clientHeight", this.areaHeaderCenter.parent.clientHeight), console.info("bodyY", t), console.info("bodyX", e), console.info("rows", this.firstVisibleRowIndex), console.info(""), console.info("this.tableModel", this.tableModel), console.info(""), console.info("this.mouseMoveEvent.clientX", (
|
|
2857
|
+
var s;
|
|
2858
|
+
console.clear(), console.info("this.hostElement.offsetTop", this.hostElement.offsetTop), console.info("this.hostElement.scrollHeight", this.hostElement.scrollHeight), console.info("this.scrollViewportTop", this.scrollTop), console.info("this.areaHeaderCenter.parent.clientHeight", this.areaHeaderCenter.parent.clientHeight), console.info("bodyY", t), console.info("bodyX", e), console.info("rows", this.firstVisibleRowIndex), console.info(""), console.info("this.tableModel", this.tableModel), console.info(""), console.info("this.mouseMoveEvent.clientX", (s = this.mouseHandler.mouseEvent) == null ? void 0 : s.clientX), console.info("this.hostElement.offsetLeft", this.hostElement.offsetLeft), console.info("this.areaBodyWestGeo.width", this.areaBodyWestGeo.width);
|
|
2725
2859
|
}
|
|
2726
2860
|
/**
|
|
2727
2861
|
* Restores the scroll position of the table if auto restore options are enabled.
|
|
@@ -2732,8 +2866,8 @@ class V extends me {
|
|
|
2732
2866
|
autoRestoreScrollPosition() {
|
|
2733
2867
|
var e;
|
|
2734
2868
|
if ((e = this.tableOptions) != null && e.autoRestoreOptions && this.storeScrollPosStateService && this.tableOptions.autoRestoreOptions.autoRestoreScrollPosition) {
|
|
2735
|
-
const
|
|
2736
|
-
|
|
2869
|
+
const s = this.storeScrollPosStateService.getScrollOffset();
|
|
2870
|
+
s && this.scrollViewport.scrollTo(...s);
|
|
2737
2871
|
}
|
|
2738
2872
|
}
|
|
2739
2873
|
/**
|
|
@@ -2753,8 +2887,8 @@ class V extends me {
|
|
|
2753
2887
|
autoRestoreSortingState() {
|
|
2754
2888
|
var e, t;
|
|
2755
2889
|
if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.autoRestoreSortingState && this.storeSortingService) {
|
|
2756
|
-
const
|
|
2757
|
-
|
|
2890
|
+
const s = this.storeSortingService.getSortItems();
|
|
2891
|
+
s != null && s.length && this.tableModel.getBodyModel().doSort(s);
|
|
2758
2892
|
}
|
|
2759
2893
|
}
|
|
2760
2894
|
/**
|
|
@@ -2766,32 +2900,32 @@ class V extends me {
|
|
|
2766
2900
|
autoRestoreCollapsedExpandedState() {
|
|
2767
2901
|
var e, t;
|
|
2768
2902
|
if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.getRowId && this.storeStateCollapsedExpandService) {
|
|
2769
|
-
const
|
|
2770
|
-
if (
|
|
2771
|
-
const i = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(),
|
|
2772
|
-
if (
|
|
2773
|
-
const
|
|
2903
|
+
const s = this.tableOptions.autoRestoreOptions, o = s.getRowId;
|
|
2904
|
+
if (s.autoRestoreCollapsedExpandedState && o) {
|
|
2905
|
+
const i = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), a = this.tableModel.getAreaModel("body");
|
|
2906
|
+
if (H(a)) {
|
|
2907
|
+
const r = a, l = a.getRowCount();
|
|
2774
2908
|
for (let n = 0; n < l; n++) {
|
|
2775
|
-
const
|
|
2776
|
-
if (
|
|
2909
|
+
const c = a.getRowByIndex(n);
|
|
2910
|
+
if (c)
|
|
2777
2911
|
if (i.allExpanded)
|
|
2778
|
-
|
|
2912
|
+
c.expanded = !0;
|
|
2779
2913
|
else if (i.allCollapsed)
|
|
2780
|
-
|
|
2914
|
+
c.expanded = !1;
|
|
2781
2915
|
else {
|
|
2782
|
-
const
|
|
2783
|
-
i.mode === "expanded" ?
|
|
2916
|
+
const h = o(c.data);
|
|
2917
|
+
i.mode === "expanded" ? c.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h) : i.mode === "collapsed" && (c.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h));
|
|
2784
2918
|
}
|
|
2785
2919
|
}
|
|
2786
|
-
|
|
2920
|
+
r.recalcVisibleTreeRows();
|
|
2787
2921
|
}
|
|
2788
2922
|
}
|
|
2789
2923
|
}
|
|
2790
2924
|
}
|
|
2791
2925
|
}
|
|
2792
|
-
const
|
|
2926
|
+
const O = class O {
|
|
2793
2927
|
};
|
|
2794
|
-
|
|
2928
|
+
O.themes = ["light", "combat", "paper", "blackboard"], O.vars = {
|
|
2795
2929
|
light: `html[data-theme="light"] {
|
|
2796
2930
|
--ge-table-bg: rgba(255,255,255, 0.5);
|
|
2797
2931
|
--ge-table-header-west-bg: rgba(233, 233, 233, 0.5);
|
|
@@ -3025,49 +3159,49 @@ L.themes = ["light", "combat", "paper", "blackboard"], L.vars = {
|
|
|
3025
3159
|
--ge-table-drop-zone-bg: #758129;
|
|
3026
3160
|
}`
|
|
3027
3161
|
};
|
|
3028
|
-
let
|
|
3029
|
-
const
|
|
3030
|
-
constructor(e = new
|
|
3162
|
+
let j = O;
|
|
3163
|
+
const B = class B {
|
|
3164
|
+
constructor(e = new Z()) {
|
|
3031
3165
|
this.headerGroupOptions = e;
|
|
3032
3166
|
}
|
|
3033
|
-
render(e, t,
|
|
3034
|
-
const l =
|
|
3035
|
-
if (
|
|
3036
|
-
const { toggle: n, visibility:
|
|
3037
|
-
this.addText(e,
|
|
3167
|
+
render(e, t, s, o, i, a, r) {
|
|
3168
|
+
const l = a != null && a.data ? a.data : "";
|
|
3169
|
+
if (a) {
|
|
3170
|
+
const { toggle: n, visibility: c, closed: h } = a, d = n ? B.toggleHeaderGroup : "";
|
|
3171
|
+
this.addText(e, o, t, s, l, d), n && c !== "always" && this.addArrowDiv(r, e, !h, t, s, o, d);
|
|
3038
3172
|
} else
|
|
3039
|
-
this.addText(e,
|
|
3173
|
+
this.addText(e, o, t, s, l, "");
|
|
3040
3174
|
}
|
|
3041
|
-
addText(e, t,
|
|
3175
|
+
addText(e, t, s, o, i, a) {
|
|
3042
3176
|
e.innerHTML = `<span
|
|
3043
|
-
data-ge-action="${
|
|
3177
|
+
data-ge-action="${a}"
|
|
3044
3178
|
data-area="${t}"
|
|
3045
|
-
data-row-index="${
|
|
3046
|
-
data-col-index="${
|
|
3179
|
+
data-row-index="${s}"
|
|
3180
|
+
data-col-index="${o}"
|
|
3047
3181
|
>${i}</span>`;
|
|
3048
3182
|
}
|
|
3049
|
-
addArrowDiv(e, t,
|
|
3183
|
+
addArrowDiv(e, t, s = !0, o = -1, i = -1, a = "header", r) {
|
|
3050
3184
|
const l = e.createElement("div");
|
|
3051
|
-
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", `${
|
|
3185
|
+
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", `${a}`), e.setAttribute(l, "data-ge-action", `${r}`);
|
|
3052
3186
|
let n;
|
|
3053
|
-
|
|
3054
|
-
const
|
|
3055
|
-
e.appendChild(l,
|
|
3056
|
-
for (const
|
|
3057
|
-
e.addClass(l,
|
|
3187
|
+
s ? n = this.headerGroupOptions.iconExpanded : n = this.headerGroupOptions.iconCollapsed;
|
|
3188
|
+
const c = n.content, h = e.createText(c);
|
|
3189
|
+
e.appendChild(l, h), n.style && this.applyStyleString(e, l, n.style);
|
|
3190
|
+
for (const d of n.classes)
|
|
3191
|
+
e.addClass(l, d);
|
|
3058
3192
|
return e.appendChild(t, l), l;
|
|
3059
3193
|
}
|
|
3060
|
-
applyStyleString(e, t,
|
|
3061
|
-
const
|
|
3062
|
-
for (const i of
|
|
3063
|
-
const [
|
|
3064
|
-
e.setStyle(t,
|
|
3194
|
+
applyStyleString(e, t, s) {
|
|
3195
|
+
const o = s.split(";").map((i) => i.trim()).filter((i) => i);
|
|
3196
|
+
for (const i of o) {
|
|
3197
|
+
const [a, r] = i.split(":");
|
|
3198
|
+
e.setStyle(t, a.trim(), r.trim());
|
|
3065
3199
|
}
|
|
3066
3200
|
}
|
|
3067
3201
|
};
|
|
3068
|
-
|
|
3069
|
-
let
|
|
3070
|
-
const
|
|
3202
|
+
B.toggleHeaderGroup = "toggleHeaderGroup";
|
|
3203
|
+
let K = B;
|
|
3204
|
+
const Le = ee({
|
|
3071
3205
|
inheritAttrs: !1,
|
|
3072
3206
|
props: {
|
|
3073
3207
|
tableModel: {
|
|
@@ -3076,7 +3210,7 @@ const Oe = ee({
|
|
|
3076
3210
|
},
|
|
3077
3211
|
tableOptions: {
|
|
3078
3212
|
required: !1,
|
|
3079
|
-
default: new
|
|
3213
|
+
default: new Q(),
|
|
3080
3214
|
type: Object
|
|
3081
3215
|
},
|
|
3082
3216
|
debounceMouseClickDelay: {
|
|
@@ -3100,98 +3234,98 @@ const Oe = ee({
|
|
|
3100
3234
|
"mouseDraggingEnd",
|
|
3101
3235
|
"mouseMoved"
|
|
3102
3236
|
],
|
|
3103
|
-
setup(
|
|
3104
|
-
const t = te(null),
|
|
3237
|
+
setup(g, { emit: e }) {
|
|
3238
|
+
const t = te(null), s = (o) => {
|
|
3105
3239
|
const i = {
|
|
3106
|
-
onSelectionChanged: (
|
|
3107
|
-
e("selectionChanged",
|
|
3240
|
+
onSelectionChanged: (r) => {
|
|
3241
|
+
e("selectionChanged", r);
|
|
3108
3242
|
},
|
|
3109
|
-
onFocusChanged: (
|
|
3110
|
-
e("focusChanged",
|
|
3243
|
+
onFocusChanged: (r) => {
|
|
3244
|
+
e("focusChanged", r);
|
|
3111
3245
|
},
|
|
3112
|
-
onCheckboxChanged: (
|
|
3113
|
-
e("checkboxChanged",
|
|
3246
|
+
onCheckboxChanged: (r) => {
|
|
3247
|
+
e("checkboxChanged", r);
|
|
3114
3248
|
},
|
|
3115
|
-
onContextmenu: (
|
|
3116
|
-
e("contextmenu",
|
|
3249
|
+
onContextmenu: (r) => {
|
|
3250
|
+
e("contextmenu", r);
|
|
3117
3251
|
},
|
|
3118
|
-
onModelChanged: (
|
|
3119
|
-
e("modelChanged",
|
|
3252
|
+
onModelChanged: (r) => {
|
|
3253
|
+
e("modelChanged", r);
|
|
3120
3254
|
},
|
|
3121
|
-
onMouseClicked: (
|
|
3122
|
-
e("mouseClicked",
|
|
3255
|
+
onMouseClicked: (r) => {
|
|
3256
|
+
e("mouseClicked", r);
|
|
3123
3257
|
},
|
|
3124
|
-
onMouseDragging: (
|
|
3125
|
-
e("mouseDragging",
|
|
3258
|
+
onMouseDragging: (r) => {
|
|
3259
|
+
e("mouseDragging", r);
|
|
3126
3260
|
},
|
|
3127
|
-
onMouseDraggingEnd: (
|
|
3128
|
-
e("mouseDraggingEnd",
|
|
3261
|
+
onMouseDraggingEnd: (r) => {
|
|
3262
|
+
e("mouseDraggingEnd", r);
|
|
3129
3263
|
},
|
|
3130
|
-
onMouseMoved: (
|
|
3131
|
-
e("mouseMoved",
|
|
3264
|
+
onMouseMoved: (r) => {
|
|
3265
|
+
e("mouseMoved", r);
|
|
3132
3266
|
}
|
|
3133
|
-
},
|
|
3134
|
-
|
|
3135
|
-
|
|
3267
|
+
}, a = new _(
|
|
3268
|
+
o,
|
|
3269
|
+
g.tableModel,
|
|
3136
3270
|
new J(),
|
|
3137
|
-
|
|
3271
|
+
g.tableOptions,
|
|
3138
3272
|
i
|
|
3139
3273
|
);
|
|
3140
|
-
|
|
3274
|
+
a.firstInit(), e("tableReady", a.getApi());
|
|
3141
3275
|
};
|
|
3142
|
-
return
|
|
3143
|
-
t.value &&
|
|
3144
|
-
}),
|
|
3276
|
+
return se(() => {
|
|
3277
|
+
t.value && s(t.value);
|
|
3278
|
+
}), g.licenseKey && k.getInstance().setLicenseKey(g.licenseKey), {
|
|
3145
3279
|
root: t
|
|
3146
3280
|
};
|
|
3147
3281
|
}
|
|
3148
|
-
}),
|
|
3149
|
-
const t =
|
|
3150
|
-
for (const [
|
|
3151
|
-
t[
|
|
3282
|
+
}), Oe = (g, e) => {
|
|
3283
|
+
const t = g.__vccOpts || g;
|
|
3284
|
+
for (const [s, o] of e)
|
|
3285
|
+
t[s] = o;
|
|
3152
3286
|
return t;
|
|
3153
|
-
},
|
|
3287
|
+
}, Be = {
|
|
3154
3288
|
ref: "root",
|
|
3155
3289
|
class: "container-div",
|
|
3156
3290
|
style: { width: "100%", height: "100%", "background-color": "transparent", padding: "0", margin: "0" }
|
|
3157
3291
|
};
|
|
3158
|
-
function
|
|
3159
|
-
return
|
|
3292
|
+
function Pe(g, e, t, s, o, i) {
|
|
3293
|
+
return oe(), ie("div", Be, null, 512);
|
|
3160
3294
|
}
|
|
3161
|
-
const
|
|
3295
|
+
const $e = /* @__PURE__ */ Oe(Le, [["render", Pe]]);
|
|
3162
3296
|
class We {
|
|
3163
3297
|
constructor(e, t) {
|
|
3164
3298
|
this.component = e, this.appContext = t;
|
|
3165
3299
|
}
|
|
3166
|
-
render(e, t,
|
|
3300
|
+
render(e, t, s, o, i, a, r) {
|
|
3167
3301
|
return this.mount(
|
|
3168
3302
|
this.component,
|
|
3169
3303
|
{
|
|
3170
3304
|
cellDiv: e,
|
|
3171
3305
|
rowIndex: t,
|
|
3172
|
-
columnIndex:
|
|
3173
|
-
areaIdent:
|
|
3306
|
+
columnIndex: s,
|
|
3307
|
+
areaIdent: o,
|
|
3174
3308
|
areaModel: i,
|
|
3175
|
-
cellValue:
|
|
3309
|
+
cellValue: a
|
|
3176
3310
|
},
|
|
3177
3311
|
this.appContext,
|
|
3178
3312
|
e
|
|
3179
3313
|
);
|
|
3180
3314
|
}
|
|
3181
|
-
mount(e, t,
|
|
3182
|
-
let i =
|
|
3183
|
-
return i.appContext =
|
|
3184
|
-
|
|
3315
|
+
mount(e, t, s, o) {
|
|
3316
|
+
let i = ae(e, t);
|
|
3317
|
+
return i.appContext = s, U(i, o), () => {
|
|
3318
|
+
o && U(null, o);
|
|
3185
3319
|
};
|
|
3186
3320
|
}
|
|
3187
3321
|
}
|
|
3188
|
-
const
|
|
3189
|
-
install: (
|
|
3190
|
-
|
|
3322
|
+
const Ve = {
|
|
3323
|
+
install: (g, e = { img: "" }) => {
|
|
3324
|
+
g.component("GuiexpertTable", $e);
|
|
3191
3325
|
}
|
|
3192
3326
|
};
|
|
3193
3327
|
export {
|
|
3194
3328
|
We as ComponentRendererWrapper,
|
|
3195
|
-
|
|
3196
|
-
|
|
3329
|
+
$e as GuiexpertTable,
|
|
3330
|
+
Ve as default
|
|
3197
3331
|
};
|