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