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