@guiexpert/preact-table 10.0.13 → 10.0.17
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 +5 -5
- package/index.js +624 -585
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var Oe = Object.defineProperty;
|
|
2
2
|
var Be = (r, e, t) => e in r ? Oe(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
-
var
|
|
4
|
-
import { Component as O, createRef as Pe, options as A, createElement as
|
|
3
|
+
var oe = (r, e, t) => (Be(r, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
+
import { Component as O, createRef as Pe, options as A, createElement as se, Fragment as ie, toChildArray as j, render as _e } from "preact";
|
|
5
5
|
import { jsx as He } from "preact/jsx-runtime";
|
|
6
|
-
function
|
|
6
|
+
function We(r, e = 500) {
|
|
7
7
|
let t = null;
|
|
8
|
-
return function(...
|
|
8
|
+
return function(...o) {
|
|
9
9
|
t && window.clearTimeout(t), t = window.setTimeout(() => {
|
|
10
|
-
r.apply(this,
|
|
10
|
+
r.apply(this, o), t = null;
|
|
11
11
|
}, e);
|
|
12
12
|
};
|
|
13
13
|
}
|
|
@@ -43,8 +43,8 @@ function K(r) {
|
|
|
43
43
|
return r && r.type === "AreaModelTree";
|
|
44
44
|
}
|
|
45
45
|
class q {
|
|
46
|
-
constructor(e = -1, t = -1,
|
|
47
|
-
this.rowIndex = e, this.rowTop = t, this.columnIndex =
|
|
46
|
+
constructor(e = -1, t = -1, o = -1, s = -1, i, a, n, l = 0, c = 0, d = 0, p = "") {
|
|
47
|
+
this.rowIndex = e, this.rowTop = t, this.columnIndex = o, this.columnLeft = s, this.areaIdent = i, this.sideIdent = a, this.originalEvent = n, this.clickCount = l, this.draggingX = c, this.draggingY = d, this.action = p;
|
|
48
48
|
}
|
|
49
49
|
clone() {
|
|
50
50
|
return new q(
|
|
@@ -63,8 +63,8 @@ class q {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
class F {
|
|
66
|
-
constructor(e = ">", t = "",
|
|
67
|
-
this.content = e, this.style = t, this.classes =
|
|
66
|
+
constructor(e = ">", t = "", o = []) {
|
|
67
|
+
this.content = e, this.style = t, this.classes = o;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
class Ae {
|
|
@@ -76,33 +76,33 @@ class Ae {
|
|
|
76
76
|
">",
|
|
77
77
|
"",
|
|
78
78
|
["ge-table-tree-arrow-collapsed"]
|
|
79
|
-
),
|
|
79
|
+
), o = new F(
|
|
80
80
|
">",
|
|
81
81
|
"color:transparent;",
|
|
82
82
|
["gt-table-tree-arrow-hidden"]
|
|
83
|
-
),
|
|
83
|
+
), s = new F(
|
|
84
84
|
"↕",
|
|
85
85
|
"",
|
|
86
86
|
["gt-table-tree-arrow-expanded-all"]
|
|
87
87
|
)) {
|
|
88
|
-
this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder =
|
|
88
|
+
this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = o, this.arrowExpandCollapseAll = s;
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
class Me {
|
|
92
|
-
constructor(e = new F("↑", "", ["ge-header-sorted-asc"]), t = new F("↓", "", ["ge-header-sorted-desc"]),
|
|
93
|
-
this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder =
|
|
92
|
+
constructor(e = new F("↑", "", ["ge-header-sorted-asc"]), t = new F("↓", "", ["ge-header-sorted-desc"]), o = new F("↑", "color:transparent;", [])) {
|
|
93
|
+
this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = o;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
class
|
|
96
|
+
class $e {
|
|
97
97
|
constructor(e) {
|
|
98
98
|
this.domService = e;
|
|
99
99
|
}
|
|
100
|
-
setStyle(e, t,
|
|
101
|
-
return this.domService.setStyle(e, t,
|
|
100
|
+
setStyle(e, t, o) {
|
|
101
|
+
return this.domService.setStyle(e, t, o), e;
|
|
102
102
|
}
|
|
103
103
|
applyStyle(e, t) {
|
|
104
|
-
for (const
|
|
105
|
-
this.domService.setStyle(e,
|
|
104
|
+
for (const o in t)
|
|
105
|
+
this.domService.setStyle(e, o, t[o]);
|
|
106
106
|
return e;
|
|
107
107
|
}
|
|
108
108
|
applyDisplayNoneStyle(e) {
|
|
@@ -112,7 +112,7 @@ class We {
|
|
|
112
112
|
return this.domService.setStyle(e, "display", "block"), e;
|
|
113
113
|
}
|
|
114
114
|
applyStyleInPx(e, t) {
|
|
115
|
-
return Object.entries(t).forEach(([
|
|
115
|
+
return Object.entries(t).forEach(([o, s]) => this.domService.setStyle(e, o, s + "px")), e;
|
|
116
116
|
}
|
|
117
117
|
applyStylePosistionRelative(e) {
|
|
118
118
|
return this.domService.setStyle(e, "position", "relative"), this.domService.setStyle(e, "overflow", "clip"), e;
|
|
@@ -123,8 +123,8 @@ class We {
|
|
|
123
123
|
applyStyleFullSize(e) {
|
|
124
124
|
return this.domService.setStyle(e, "width", "100%"), this.domService.setStyle(e, "height", "100%"), e;
|
|
125
125
|
}
|
|
126
|
-
applyStyleOverflowAuto(e = "auto", t = "auto",
|
|
127
|
-
return this.domService.setStyle(
|
|
126
|
+
applyStyleOverflowAuto(e = "auto", t = "auto", o) {
|
|
127
|
+
return this.domService.setStyle(o, "overflow-x", e), this.domService.setStyle(o, "overflow-y", t), o;
|
|
128
128
|
}
|
|
129
129
|
applyStyleNoPadding(e) {
|
|
130
130
|
return this.domService.setStyle(e, "padding", "0"), this.domService.setStyle(e, "margin", "0"), this.domService.setStyle(e, "border", "0"), e;
|
|
@@ -140,139 +140,139 @@ class We {
|
|
|
140
140
|
return this.domService.appendChild(e, t), this.applyStylePosistionAbsolute(e), { parent: e, child: t, cache: {} };
|
|
141
141
|
}
|
|
142
142
|
appendText(e, t) {
|
|
143
|
-
const
|
|
144
|
-
return this.domService.appendChild(e,
|
|
143
|
+
const o = this.domService.createText(t);
|
|
144
|
+
return this.domService.appendChild(e, o), o;
|
|
145
145
|
}
|
|
146
146
|
addClass(e, t) {
|
|
147
|
-
return e.includes(" ") ? e.split(" ").forEach((
|
|
147
|
+
return e.includes(" ") ? e.split(" ").forEach((o) => this.domService.addClass(t, o)) : this.domService.addClass(t, e), t;
|
|
148
148
|
}
|
|
149
149
|
removeClass(e, t) {
|
|
150
|
-
return e.includes(" ") ? e.split(" ").forEach((
|
|
150
|
+
return e.includes(" ") ? e.split(" ").forEach((o) => this.domService.removeClass(t, o)) : this.domService.removeClass(t, e), t;
|
|
151
151
|
}
|
|
152
152
|
addClasses(e, t) {
|
|
153
153
|
if (e)
|
|
154
|
-
for (const
|
|
155
|
-
this.domService.addClass(t,
|
|
154
|
+
for (const o of e)
|
|
155
|
+
this.domService.addClass(t, o);
|
|
156
156
|
return t;
|
|
157
157
|
}
|
|
158
|
-
setAttribute(e, t,
|
|
159
|
-
return t &&
|
|
158
|
+
setAttribute(e, t, o) {
|
|
159
|
+
return t && o && this.domService.setAttribute(e, t, o), e;
|
|
160
160
|
}
|
|
161
|
-
createAreaDivWithClass(e, t,
|
|
161
|
+
createAreaDivWithClass(e, t, o, s) {
|
|
162
162
|
const i = this.domService.createElement("div");
|
|
163
|
-
return this.addClass(e, i), this.domService.setAttribute(i, "data-area",
|
|
163
|
+
return this.addClass(e, i), this.domService.setAttribute(i, "data-area", o), this.domService.setAttribute(i, "data-side", s), this.domService.appendChild(t, i), i;
|
|
164
164
|
}
|
|
165
165
|
createDivWithClass(e, t) {
|
|
166
|
-
const
|
|
167
|
-
return this.addClass(e,
|
|
166
|
+
const o = this.domService.createElement("div");
|
|
167
|
+
return this.addClass(e, o), this.domService.appendChild(t, o), o;
|
|
168
168
|
}
|
|
169
|
-
addRowDiv(e, t,
|
|
169
|
+
addRowDiv(e, t, o = -1, s, i, a = "") {
|
|
170
170
|
const n = t.index ?? -1, l = this.getDivOrCreateDiv(n, e);
|
|
171
|
-
if (this.domService.addClass(l, "ge-table-row-div"), this.domService.addClass(l, `ge-table-row-div-${t.index}`),
|
|
171
|
+
if (this.domService.addClass(l, "ge-table-row-div"), this.domService.addClass(l, `ge-table-row-div-${t.index}`), s === "body" && i === "center") {
|
|
172
172
|
const c = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
173
173
|
this.domService.addClass(l, `ge-table-row-${c}`);
|
|
174
174
|
}
|
|
175
|
-
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", `${
|
|
175
|
+
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", `${o}`), this.domService.setAttribute(l, "data-area", `${s}`), a) {
|
|
176
176
|
const c = this.domService.createText(a);
|
|
177
177
|
this.domService.appendChild(l, c);
|
|
178
178
|
}
|
|
179
179
|
return this.domService.appendChild(e.child, l), l;
|
|
180
180
|
}
|
|
181
181
|
addColumnDiv(e) {
|
|
182
|
-
const { parent: t, geo:
|
|
183
|
-
this.domService.addClass(b, "ge-table-col-div"), g && this.domService.addClass(b, "ge-with-checkbox"), this.domService.addClass(b, `ge-table-col-div-${
|
|
184
|
-
const
|
|
185
|
-
if (a === "body" && n === "center" && this.domService.addClass(b, `ge-table-column-${
|
|
186
|
-
const
|
|
187
|
-
this.addLabelDiv(b, l,
|
|
182
|
+
const { parent: t, geo: o, rowIndex: s = -1, columnIndex: i = -1, areaIdent: a, sideIdent: n, text: l = "", treeArrow: c, tableOptions: d, checkedType: p = void 0, sortState: h } = e, m = d == null ? void 0 : d.treeOptions, g = d == null ? void 0 : d.showCheckboxWihoutExtraColumn, b = this.domService.createElement("div");
|
|
183
|
+
this.domService.addClass(b, "ge-table-col-div"), g && this.domService.addClass(b, "ge-with-checkbox"), this.domService.addClass(b, `ge-table-col-div-${o.index}`), this.domService.setAttribute(b, "data-col-index", `${o.index}`), this.domService.setAttribute(b, "data-row-index", `${s}`), this.domService.setAttribute(b, "data-area", `${a}`);
|
|
184
|
+
const u = ((o == null ? void 0 : o.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
185
|
+
if (a === "body" && n === "center" && this.domService.addClass(b, `ge-table-column-${u}`), this.domService.setStyle(b, "display", "clip"), this.domService.setStyle(b, "position", "absolute"), this.domService.setStyle(b, "left", `${o.left}px`), this.domService.setStyle(b, "top", `${o.top}px`), this.domService.setStyle(b, "width", `${o.width}px`), this.domService.setStyle(b, "height", `${o.height}px`), c && c !== "none" && (this.domService.addClass(b, "ge-table-col-tree"), this.addArrowDiv(b, c, m, s, i, a)), g && i === 0 && p && this.addCheckboxToDiv(b, p, a, s), l) {
|
|
186
|
+
const f = c !== "none" && i === 0;
|
|
187
|
+
this.addLabelDiv(b, l, f, s, i, a);
|
|
188
188
|
}
|
|
189
189
|
return h && this.addSortedIcon(b, h, d == null ? void 0 : d.sortedOptions, i), this.domService.appendChild(t, b), b;
|
|
190
190
|
}
|
|
191
|
-
addCheckboxToDiv(e, t,
|
|
191
|
+
addCheckboxToDiv(e, t, o, s) {
|
|
192
192
|
const i = this.domService.createElement("div"), a = t === "full" ? "checked" : "";
|
|
193
193
|
return i.innerHTML = `
|
|
194
194
|
<input
|
|
195
195
|
type="checkbox"
|
|
196
|
-
data-area="${
|
|
197
|
-
data-row-index="${
|
|
196
|
+
data-area="${o}"
|
|
197
|
+
data-row-index="${s}"
|
|
198
198
|
data-input-type="checkbox"
|
|
199
199
|
${a}
|
|
200
|
-
class="ge-table-row-checkbox"> `, this.domService.setStyle(i, "display", "inline"), this.domService.setStyle(i, "width", "inherit"), this.domService.setAttribute(i, "data-row-index", `${
|
|
200
|
+
class="ge-table-row-checkbox"> `, this.domService.setStyle(i, "display", "inline"), this.domService.setStyle(i, "width", "inherit"), this.domService.setAttribute(i, "data-row-index", `${s}`), this.domService.appendChild(e, i), i;
|
|
201
201
|
}
|
|
202
|
-
addLabelDiv(e, t = "",
|
|
202
|
+
addLabelDiv(e, t = "", o = !1, s = -1, i = -1, a = "body") {
|
|
203
203
|
const n = this.domService.createElement("div");
|
|
204
|
-
if (this.domService.addClass(n, "ge-table-label-div"), this.domService.setStyle(n, "position", "relative"), this.domService.setStyle(n, "background", "transparent"), this.domService.setStyle(n, "width", "100%"), this.domService.setStyle(n, "height", "100%"), this.domService.setAttribute(n, "data-row-index", `${
|
|
205
|
-
if (
|
|
204
|
+
if (this.domService.addClass(n, "ge-table-label-div"), this.domService.setStyle(n, "position", "relative"), this.domService.setStyle(n, "background", "transparent"), this.domService.setStyle(n, "width", "100%"), this.domService.setStyle(n, "height", "100%"), this.domService.setAttribute(n, "data-row-index", `${s}`), this.domService.setAttribute(n, "data-col-index", `${i}`), this.domService.setAttribute(n, "data-area", `${a}`), t)
|
|
205
|
+
if (o) {
|
|
206
206
|
const l = this.domService.createText(t);
|
|
207
207
|
this.domService.appendChild(n, l);
|
|
208
208
|
} else {
|
|
209
209
|
const l = this.domService.createElement("div");
|
|
210
210
|
this.domService.appendChild(n, l);
|
|
211
211
|
const c = this.domService.createText(t);
|
|
212
|
-
this.domService.addClass(l, "ge-table-label"), this.domService.appendChild(l, c), this.domService.setAttribute(l, "data-row-index", `${
|
|
212
|
+
this.domService.addClass(l, "ge-table-label"), this.domService.appendChild(l, c), this.domService.setAttribute(l, "data-row-index", `${s}`), this.domService.setAttribute(l, "data-col-index", `${i}`), this.domService.setAttribute(l, "data-area", `${a}`);
|
|
213
213
|
}
|
|
214
214
|
return this.domService.appendChild(e, n), n;
|
|
215
215
|
}
|
|
216
|
-
addSortedIcon(e, t = "",
|
|
216
|
+
addSortedIcon(e, t = "", o = new Me(), s = -1) {
|
|
217
217
|
const i = this.domService.createElement("div");
|
|
218
|
-
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", `${
|
|
218
|
+
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", `${s}`), this.domService.setAttribute(i, "data-area", "header");
|
|
219
219
|
let a;
|
|
220
|
-
t === "asc" ? a =
|
|
220
|
+
t === "asc" ? a = o.iconAsc : t === "desc" ? a = o.iconDesc : a = o.iconPlaceholder;
|
|
221
221
|
const n = a.content, l = this.domService.createText(n);
|
|
222
222
|
this.domService.appendChild(i, l), a.style && this.applyStyleString(i, a.style);
|
|
223
223
|
for (const c of a.classes)
|
|
224
224
|
this.domService.addClass(i, c);
|
|
225
225
|
return this.domService.appendChild(e, i), i;
|
|
226
226
|
}
|
|
227
|
-
addArrowDiv(e, t = "none",
|
|
227
|
+
addArrowDiv(e, t = "none", o = new Ae(), s = -1, i = -1, a = "body") {
|
|
228
228
|
const n = this.domService.createElement("div");
|
|
229
|
-
this.domService.addClass(n, "ge-table-tree-arrow-div"), this.domService.setStyle(n, "display", "inline-block"), this.domService.setStyle(n, "position", ""), this.domService.setStyle(n, "width", "20px"), this.domService.setStyle(n, "background", "transparent"), this.domService.setStyle(n, "cursor", "pointer"), this.domService.setAttribute(n, "data-row-index", `${
|
|
229
|
+
this.domService.addClass(n, "ge-table-tree-arrow-div"), this.domService.setStyle(n, "display", "inline-block"), this.domService.setStyle(n, "position", ""), this.domService.setStyle(n, "width", "20px"), this.domService.setStyle(n, "background", "transparent"), this.domService.setStyle(n, "cursor", "pointer"), this.domService.setAttribute(n, "data-row-index", `${s}`), this.domService.setAttribute(n, "data-col-index", `${i}`), this.domService.setAttribute(n, "data-area", `${a}`);
|
|
230
230
|
let l;
|
|
231
|
-
t === "expanded" ? l =
|
|
231
|
+
t === "expanded" ? l = o.arrowExpanded : t === "collapsed" ? l = o.arrowCollapsed : l = o.arrowPlaceholder;
|
|
232
232
|
const c = l.content, d = this.domService.createText(c);
|
|
233
233
|
this.domService.appendChild(n, d), l.style && this.applyStyleString(n, l.style);
|
|
234
234
|
for (const p of l.classes)
|
|
235
235
|
this.domService.addClass(n, p);
|
|
236
236
|
return this.domService.appendChild(e, n), n;
|
|
237
237
|
}
|
|
238
|
-
addColumnBorderDivs(e, t,
|
|
238
|
+
addColumnBorderDivs(e, t, o, s, i) {
|
|
239
239
|
if (e.verticalBorderVisible) {
|
|
240
|
-
const a = `ge-table-${
|
|
241
|
-
this.addVerticalBorder(
|
|
240
|
+
const a = `ge-table-${s}-${i}-vertical-border`;
|
|
241
|
+
this.addVerticalBorder(o, t, a);
|
|
242
242
|
}
|
|
243
243
|
if (e.horizontalBorderVisible) {
|
|
244
|
-
const a = `ge-table-${
|
|
245
|
-
this.addHorizontalBorder(
|
|
244
|
+
const a = `ge-table-${s}-${i}-horizontal-border`;
|
|
245
|
+
this.addHorizontalBorder(o, t, a);
|
|
246
246
|
}
|
|
247
247
|
return t;
|
|
248
248
|
}
|
|
249
|
-
addHorizontalBorder(e, t,
|
|
250
|
-
const
|
|
251
|
-
return this.domService.addClass(
|
|
249
|
+
addHorizontalBorder(e, t, o = "ge-table-body-center-horizontal-border") {
|
|
250
|
+
const s = this.domService.createElement("div");
|
|
251
|
+
return this.domService.addClass(s, o), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${e.left}px`), this.domService.setStyle(s, "top", `${e.top}px`), this.domService.setStyle(s, "width", `${e.width}px`), this.domService.setStyle(s, "height", "1px"), this.domService.appendChild(t, s), s;
|
|
252
252
|
}
|
|
253
|
-
addFocusBorderDivs(e, t,
|
|
253
|
+
addFocusBorderDivs(e, t, o) {
|
|
254
254
|
t = { ...t, width: t.width + 1, height: t.height + 1 };
|
|
255
|
-
let
|
|
256
|
-
return this.domService.addClass(
|
|
255
|
+
let s = this.domService.createElement("div");
|
|
256
|
+
return this.domService.addClass(s, "ge-table-focus-border"), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${t.left}px`), this.domService.setStyle(s, "top", `${t.top}px`), this.domService.setStyle(s, "width", "1px"), this.domService.setStyle(s, "height", `${t.height}px`), this.domService.setStyle(s, "z-index", "9999"), this.applyStyle(s, o), this.domService.appendChild(e, s), s = this.domService.createElement("div"), this.domService.addClass(s, "ge-table-focus-border"), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${t.left + t.width - 1}px`), this.domService.setStyle(s, "top", `${t.top}px`), this.domService.setStyle(s, "width", "1px"), this.domService.setStyle(s, "height", `${t.height}px`), this.domService.setStyle(s, "z-index", "9999"), this.applyStyle(s, o), this.domService.appendChild(e, s), s = this.domService.createElement("div"), this.domService.addClass(s, "ge-table-focus-border"), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${t.left}px`), this.domService.setStyle(s, "top", `${t.top}px`), this.domService.setStyle(s, "width", `${t.width}px`), this.domService.setStyle(s, "height", "1px"), this.domService.setStyle(s, "z-index", "9999"), this.applyStyle(s, o), this.domService.appendChild(e, s), s = this.domService.createElement("div"), this.domService.addClass(s, "ge-table-focus-border"), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${t.left}px`), this.domService.setStyle(s, "top", `${t.top + t.height - 1}px`), this.domService.setStyle(s, "width", `${t.width}px`), this.domService.setStyle(s, "height", "1px"), this.domService.setStyle(s, "z-index", "9999"), this.applyStyle(s, o), this.domService.appendChild(e, s), e;
|
|
257
257
|
}
|
|
258
|
-
addVerticalBorder(e, t,
|
|
259
|
-
const
|
|
260
|
-
return this.domService.addClass(
|
|
258
|
+
addVerticalBorder(e, t, o = "ge-table-body-center-vertical-border") {
|
|
259
|
+
const s = this.domService.createElement("div");
|
|
260
|
+
return this.domService.addClass(s, o), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${e.left}px`), this.domService.setStyle(s, "top", `${e.top}px`), this.domService.setStyle(s, "width", "1px"), this.domService.setStyle(s, "height", `${e.height}px`), this.domService.appendChild(t, s), s;
|
|
261
261
|
}
|
|
262
|
-
addDiv(e, t,
|
|
263
|
-
const
|
|
264
|
-
return
|
|
262
|
+
addDiv(e, t, o = "") {
|
|
263
|
+
const s = this.domService.createElement("div");
|
|
264
|
+
return o && this.domService.addClass(s, o), this.domService.setStyle(s, "display", "clip"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "left", `${t.left}px`), this.domService.setStyle(s, "top", `${t.top}px`), this.domService.setStyle(s, "width", `${t.width}px`), this.domService.setStyle(s, "height", `${t.height}px`), this.domService.appendChild(e, s), s;
|
|
265
265
|
}
|
|
266
266
|
applyStyleString(e, t) {
|
|
267
|
-
const
|
|
268
|
-
for (const
|
|
269
|
-
const [i, a] =
|
|
267
|
+
const o = t.split(";").map((s) => s.trim()).filter((s) => s);
|
|
268
|
+
for (const s of o) {
|
|
269
|
+
const [i, a] = s.split(":");
|
|
270
270
|
this.domService.setStyle(e, i.trim(), a.trim());
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
getDivOrCreateDiv(e, t) {
|
|
274
|
-
let
|
|
275
|
-
return
|
|
274
|
+
let o = t.cache[e];
|
|
275
|
+
return o ? (o.innerText = "", o) : (o = this.domService.createElement("div"), t.cache[e] = o, o);
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
const J = (r) => r === "header" ? "header" : r === "footer" ? "footer" : "body";
|
|
@@ -280,10 +280,10 @@ class Ve {
|
|
|
280
280
|
constructor(e, t) {
|
|
281
281
|
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)) {
|
|
282
282
|
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"));
|
|
283
|
-
const
|
|
284
|
-
if (
|
|
285
|
-
const
|
|
286
|
-
this.value =
|
|
283
|
+
const o = e.getAttribute("data-area");
|
|
284
|
+
if (o && (this.areaIdent = J(o), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
|
|
285
|
+
const s = e;
|
|
286
|
+
this.value = s.value;
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
}
|
|
@@ -318,24 +318,24 @@ class Ne {
|
|
|
318
318
|
if (t - this.lastClicked < this.doubleClickDelay)
|
|
319
319
|
return;
|
|
320
320
|
this.lastClicked = t;
|
|
321
|
-
const
|
|
322
|
-
if (
|
|
321
|
+
const o = new Ve(e.target, this.tableScope);
|
|
322
|
+
if (o.action === "toggleExpandCollapseAll")
|
|
323
323
|
this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
|
|
324
|
-
else if (
|
|
325
|
-
this.tableScope.toggleHeaderGroup(
|
|
326
|
-
else if (
|
|
327
|
-
this.tableScope.toggleRowCheckbox(
|
|
328
|
-
else if (X(
|
|
329
|
-
const
|
|
330
|
-
if (
|
|
324
|
+
else if (o.action === "toggleHeaderGroup")
|
|
325
|
+
this.tableScope.toggleHeaderGroup(o), e.preventDefault(), e.stopPropagation();
|
|
326
|
+
else if (o.inputType === "checkbox" && o.areaIdent)
|
|
327
|
+
this.tableScope.toggleRowCheckbox(o.rowIdx, o.colIdx, o.areaIdent), e.preventDefault(), e.stopPropagation();
|
|
328
|
+
else if (X(o.row) && o.areaModel) {
|
|
329
|
+
const s = o.colIdx === this.getArrowColumnIndex() && e.altKey, i = o.className.includes("ge-table-tree-arrow-div");
|
|
330
|
+
if (s || i) {
|
|
331
331
|
e.preventDefault(), e.stopPropagation();
|
|
332
|
-
const a =
|
|
333
|
-
a.expanded = !a.expanded, "recalcVisibleTreeRows" in
|
|
332
|
+
const a = o.row;
|
|
333
|
+
a.expanded = !a.expanded, "recalcVisibleTreeRows" in o.areaModel && o.areaModel.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(a);
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
if (
|
|
337
|
-
const
|
|
338
|
-
|
|
336
|
+
if (o.areaIdent === "body" && this.tableScope.tableOptions.getFocusModel) {
|
|
337
|
+
const s = this.tableScope.tableOptions.getFocusModel();
|
|
338
|
+
s == null || s.clear(), s == null || s.setFocus(o.rowIdx, o.colIdx);
|
|
339
339
|
}
|
|
340
340
|
this.publishGeMouseEvent(e, 1);
|
|
341
341
|
}
|
|
@@ -347,12 +347,12 @@ class Ne {
|
|
|
347
347
|
*/
|
|
348
348
|
onHostElementDblClicked(e) {
|
|
349
349
|
if (this.lastClicked = Date.now(), e.target instanceof HTMLElement) {
|
|
350
|
-
const t = e.target,
|
|
351
|
-
if (
|
|
350
|
+
const t = e.target, o = t.getAttribute("data-area"), s = J(o), i = Number(t.getAttribute("data-row-index")), a = Number(t.getAttribute("data-col-index")), n = this.tableScope.tableModel.getAreaModel(s);
|
|
351
|
+
if (o && s === "header")
|
|
352
352
|
this.tableScope.tableModel.isSortable(a) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, i, a));
|
|
353
353
|
else if (t.getAttribute("data-row-index")) {
|
|
354
354
|
const l = n.getRowByIndex(i);
|
|
355
|
-
if (
|
|
355
|
+
if (o && s === "body" && n.isEditable(i, a) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(i, a)), X(l) && a === this.getArrowColumnIndex()) {
|
|
356
356
|
e.preventDefault(), e.stopPropagation();
|
|
357
357
|
const c = l;
|
|
358
358
|
c.expanded = !c.expanded, "recalcVisibleTreeRows" in n && n.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(c);
|
|
@@ -370,8 +370,8 @@ class Ne {
|
|
|
370
370
|
* @return {void}
|
|
371
371
|
*/
|
|
372
372
|
publishGeMouseEvent(e, t) {
|
|
373
|
-
var
|
|
374
|
-
this.mouseEvent = e, this.geMouseEventOld = (
|
|
373
|
+
var o;
|
|
374
|
+
this.mouseEvent = e, this.geMouseEventOld = (o = this.geMouseEvent) == null ? void 0 : o.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();
|
|
375
375
|
}
|
|
376
376
|
/**
|
|
377
377
|
* Update the collapsed/expanded state of a tree row.
|
|
@@ -380,8 +380,8 @@ class Ne {
|
|
|
380
380
|
* @returns {void}
|
|
381
381
|
*/
|
|
382
382
|
updateCollapsedExpandedState(e) {
|
|
383
|
-
var
|
|
384
|
-
const t = (
|
|
383
|
+
var o, s, i, a, n;
|
|
384
|
+
const t = (s = (o = this.tableScope.tableOptions) == null ? void 0 : o.autoRestoreOptions) == null ? void 0 : s.getRowId;
|
|
385
385
|
if (t) {
|
|
386
386
|
const l = (i = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : i.collapsedExpandedStateGet().mode, c = l === "collapsed" && !e.expanded || l === "expanded" && e.expanded, d = l === "collapsed" && e.expanded || l === "expanded" && !e.expanded, p = t(e.data);
|
|
387
387
|
c ? (a = this.tableScope.storeStateCollapsedExpandService) == null || a.collapsedStateIdsPush(p) : d && ((n = this.tableScope.storeStateCollapsedExpandService) == null || n.collapsedStateIdsRemove(p));
|
|
@@ -420,7 +420,7 @@ class Ne {
|
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
|
-
class
|
|
423
|
+
class ze {
|
|
424
424
|
constructor(e) {
|
|
425
425
|
this.tableScope = e;
|
|
426
426
|
}
|
|
@@ -598,23 +598,24 @@ class Ge {
|
|
|
598
598
|
);
|
|
599
599
|
}
|
|
600
600
|
/**
|
|
601
|
-
*
|
|
602
|
-
* Extracts the table data into a 2D matrix and uses the Excel service to generate and download the file.
|
|
601
|
+
* Generates and downloads an Excel file based on the table data.
|
|
603
602
|
*
|
|
604
|
-
* @
|
|
603
|
+
* @param {string} fileName - The name of the Excel file to be downloaded. Defaults to 'table.xlsx'.
|
|
604
|
+
* @param {string} author - The author of the Excel file. If not provided, it will remain empty.
|
|
605
|
+
* @return {void} No return value. Initiates a file download of the Excel document.
|
|
605
606
|
*/
|
|
606
|
-
downloadExcel() {
|
|
607
|
-
const
|
|
608
|
-
for (const
|
|
609
|
-
const
|
|
610
|
-
for (let
|
|
611
|
-
const
|
|
612
|
-
|
|
613
|
-
for (let
|
|
614
|
-
|
|
607
|
+
downloadExcel(e = "table.xlsx", t = "") {
|
|
608
|
+
const o = [], s = this.tableScope.tableModel.getColumnCount(), i = ["header", "body", "footer"];
|
|
609
|
+
for (const a of i) {
|
|
610
|
+
const n = this.tableScope.tableModel.getAreaModel(a), l = (n == null ? void 0 : n.getRowCount()) ?? 0;
|
|
611
|
+
for (let c = 0; c < l; c++) {
|
|
612
|
+
const d = [];
|
|
613
|
+
o.push(d);
|
|
614
|
+
for (let p = 0; p < s; p++)
|
|
615
|
+
d.push(n.getValueAt(c, p));
|
|
615
616
|
}
|
|
616
617
|
}
|
|
617
|
-
return this.tableScope.excelService.downloadExcel(e,
|
|
618
|
+
return this.tableScope.excelService.downloadExcel(o, e, t);
|
|
618
619
|
}
|
|
619
620
|
/**
|
|
620
621
|
* Retrieves the current scope of the table.
|
|
@@ -633,6 +634,18 @@ class Ge {
|
|
|
633
634
|
getSelectionModel() {
|
|
634
635
|
return this.tableScope.selectionModel();
|
|
635
636
|
}
|
|
637
|
+
autoResizeColumns(e = !0) {
|
|
638
|
+
this.tableScope.autoResizeColumns(e);
|
|
639
|
+
}
|
|
640
|
+
recalcWrappers() {
|
|
641
|
+
this.tableScope.recalcWrappers();
|
|
642
|
+
}
|
|
643
|
+
setColumnWidth(e, t) {
|
|
644
|
+
this.tableScope.setColumnWidth(e, t);
|
|
645
|
+
}
|
|
646
|
+
getTableModel() {
|
|
647
|
+
return this.tableScope.tableModel;
|
|
648
|
+
}
|
|
636
649
|
}
|
|
637
650
|
class Z {
|
|
638
651
|
constructor(e) {
|
|
@@ -641,23 +654,23 @@ class Z {
|
|
|
641
654
|
autoConvertMapToObject(e) {
|
|
642
655
|
const t = {};
|
|
643
656
|
if (e instanceof Map) {
|
|
644
|
-
const
|
|
645
|
-
for (const
|
|
657
|
+
const o = e;
|
|
658
|
+
for (const s of [...o]) {
|
|
646
659
|
const [
|
|
647
660
|
i,
|
|
648
661
|
a
|
|
649
|
-
] =
|
|
662
|
+
] = s;
|
|
650
663
|
t[i] = a;
|
|
651
664
|
}
|
|
652
665
|
}
|
|
653
666
|
return t;
|
|
654
667
|
}
|
|
655
668
|
checkAndPersistItem(e, t) {
|
|
656
|
-
const
|
|
657
|
-
if (
|
|
658
|
-
const
|
|
659
|
-
if (
|
|
660
|
-
const i =
|
|
669
|
+
const o = this.getStorageKeyFn;
|
|
670
|
+
if (o) {
|
|
671
|
+
const s = o();
|
|
672
|
+
if (s) {
|
|
673
|
+
const i = s + e;
|
|
661
674
|
if ((t + "").includes("Map")) {
|
|
662
675
|
const a = this.autoConvertMapToObject(t);
|
|
663
676
|
this.persistItem(i, a);
|
|
@@ -709,7 +722,7 @@ class Z {
|
|
|
709
722
|
// }
|
|
710
723
|
// }
|
|
711
724
|
}
|
|
712
|
-
class
|
|
725
|
+
class Ge extends Z {
|
|
713
726
|
constructor(e) {
|
|
714
727
|
super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
|
|
715
728
|
}
|
|
@@ -724,16 +737,16 @@ class ze extends Z {
|
|
|
724
737
|
if (e) {
|
|
725
738
|
const t = e();
|
|
726
739
|
if (t) {
|
|
727
|
-
const
|
|
728
|
-
let
|
|
729
|
-
this.scrollOffset =
|
|
740
|
+
const o = t + this.SCROLL_STATE;
|
|
741
|
+
let s = this.loadFromLocalStorage(o);
|
|
742
|
+
this.scrollOffset = s || [0, 0];
|
|
730
743
|
}
|
|
731
744
|
}
|
|
732
745
|
}
|
|
733
746
|
}
|
|
734
747
|
class Ue {
|
|
735
|
-
constructor(e = "collapsed", t = [],
|
|
736
|
-
this.mode = e, this.rowIds = t, this.allCollapsed =
|
|
748
|
+
constructor(e = "collapsed", t = [], o = !1, s = !1) {
|
|
749
|
+
this.mode = e, this.rowIds = t, this.allCollapsed = o, this.allExpanded = s;
|
|
737
750
|
}
|
|
738
751
|
}
|
|
739
752
|
class je extends Z {
|
|
@@ -761,8 +774,8 @@ class je extends Z {
|
|
|
761
774
|
if (e) {
|
|
762
775
|
const t = e();
|
|
763
776
|
if (t) {
|
|
764
|
-
const
|
|
765
|
-
|
|
777
|
+
const o = t + this.COLLAPSED_EXPANDED_STATE, s = this.loadFromLocalStorage(o);
|
|
778
|
+
s && (this.collapsedExpandedState = s);
|
|
766
779
|
}
|
|
767
780
|
}
|
|
768
781
|
}
|
|
@@ -785,89 +798,89 @@ class Xe extends Z {
|
|
|
785
798
|
if (e) {
|
|
786
799
|
const t = e();
|
|
787
800
|
if (t) {
|
|
788
|
-
const
|
|
789
|
-
this.sortItems =
|
|
801
|
+
const o = t + this.SORTING_STATE, s = this.loadFromLocalStorage(o);
|
|
802
|
+
this.sortItems = s || [];
|
|
790
803
|
}
|
|
791
804
|
}
|
|
792
805
|
}
|
|
793
806
|
}
|
|
794
807
|
class k {
|
|
795
|
-
constructor(e = 0, t = 0,
|
|
796
|
-
this.left = e, this.width = t, this.height =
|
|
808
|
+
constructor(e = 0, t = 0, o = 0, s = 0, i) {
|
|
809
|
+
this.left = e, this.width = t, this.height = o, this.top = s, this.index = i;
|
|
797
810
|
}
|
|
798
811
|
}
|
|
799
812
|
class Ke {
|
|
800
|
-
constructor(e, t,
|
|
801
|
-
this.hostElement = e, this.tableModel = t, this.dom =
|
|
813
|
+
constructor(e, t, o, s) {
|
|
814
|
+
this.hostElement = e, this.tableModel = t, this.dom = o, this.tableOptions = s, this.scrollTop = 0, this.areaBodyWestGeo = new k(), this.areaBodyCenterGeo = new k(), this.areaBodyEastGeo = new k();
|
|
802
815
|
const i = this.hostElement;
|
|
803
816
|
i.innerText = "", this.dom.setAttribute(i, "tabindex", "0"), this.dom.setStyle(
|
|
804
817
|
this.dom.addClass("ge-table", i),
|
|
805
818
|
"position",
|
|
806
819
|
"relative"
|
|
807
|
-
), this.hoverRow =
|
|
808
|
-
|
|
809
|
-
), this.hoverColumn =
|
|
810
|
-
|
|
811
|
-
), this.draggingColumn =
|
|
812
|
-
|
|
813
|
-
), this.areaHeaderWest =
|
|
814
|
-
|
|
815
|
-
|
|
820
|
+
), this.hoverRow = o.applyStylePosistionAbsolute(
|
|
821
|
+
o.createDivWithClass("ge-table-hover-row", i)
|
|
822
|
+
), this.hoverColumn = o.applyStylePosistionAbsolute(
|
|
823
|
+
o.createDivWithClass("ge-table-hover-column", i)
|
|
824
|
+
), this.draggingColumn = o.applyStylePosistionAbsolute(
|
|
825
|
+
o.createDivWithClass("ge-table-dragging-column", i)
|
|
826
|
+
), this.areaHeaderWest = o.appendRelativeChildDiv(
|
|
827
|
+
o.applyStylePosistionAbsolute(
|
|
828
|
+
o.createAreaDivWithClass("ge-table-header ge-table-header-west", i, "header", "west")
|
|
816
829
|
)
|
|
817
|
-
), this.areaHeaderCenter =
|
|
818
|
-
|
|
819
|
-
|
|
830
|
+
), this.areaHeaderCenter = o.appendRelativeChildDiv(
|
|
831
|
+
o.applyStylePosistionAbsolute(
|
|
832
|
+
o.createAreaDivWithClass("ge-table-header ge-table-header-center", i, "header", "center")
|
|
820
833
|
)
|
|
821
|
-
), this.areaHeaderEast =
|
|
822
|
-
|
|
823
|
-
|
|
834
|
+
), this.areaHeaderEast = o.appendRelativeChildDiv(
|
|
835
|
+
o.applyStylePosistionAbsolute(
|
|
836
|
+
o.createAreaDivWithClass("ge-table-header ge-table-header-east", i, "body", "east")
|
|
824
837
|
)
|
|
825
|
-
), this.areaBodyWest =
|
|
826
|
-
|
|
827
|
-
|
|
838
|
+
), this.areaBodyWest = o.appendRelativeChildDiv(
|
|
839
|
+
o.applyStylePosistionAbsolute(
|
|
840
|
+
o.createAreaDivWithClass("ge-table-body ge-table-body-west", i, "body", "west")
|
|
828
841
|
)
|
|
829
|
-
), this.areaBodyEast =
|
|
830
|
-
|
|
831
|
-
|
|
842
|
+
), this.areaBodyEast = o.appendRelativeChildDiv(
|
|
843
|
+
o.applyStylePosistionAbsolute(
|
|
844
|
+
o.createAreaDivWithClass("ge-table-body ge-table-body-east", i, "body", "east")
|
|
832
845
|
)
|
|
833
|
-
), this.areaFooterWest =
|
|
834
|
-
|
|
835
|
-
|
|
846
|
+
), this.areaFooterWest = o.appendRelativeChildDiv(
|
|
847
|
+
o.applyStylePosistionAbsolute(
|
|
848
|
+
o.createAreaDivWithClass("ge-table-footer ge-table-footer-west", i, "footer", "west")
|
|
836
849
|
)
|
|
837
|
-
), this.areaFooterCenter =
|
|
838
|
-
|
|
839
|
-
|
|
850
|
+
), this.areaFooterCenter = o.appendRelativeChildDiv(
|
|
851
|
+
o.applyStylePosistionAbsolute(
|
|
852
|
+
o.createAreaDivWithClass("ge-table-footer ge-table-footer-center", i, "footer", "center")
|
|
840
853
|
)
|
|
841
|
-
), this.areaFooterEast =
|
|
842
|
-
|
|
843
|
-
|
|
854
|
+
), this.areaFooterEast = o.appendRelativeChildDiv(
|
|
855
|
+
o.applyStylePosistionAbsolute(
|
|
856
|
+
o.createAreaDivWithClass("ge-table-footer ge-table-footer-east", i, "footer", "east")
|
|
844
857
|
)
|
|
845
|
-
), this.scrollViewport =
|
|
858
|
+
), this.scrollViewport = o.applyStyleOverflowAuto(
|
|
846
859
|
this.tableOptions.overflowX ?? "auto",
|
|
847
860
|
this.tableOptions.overflowY ?? "auto",
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
861
|
+
o.applyStyleNoPadding(
|
|
862
|
+
o.applyStylePosistionAbsolute(
|
|
863
|
+
o.createAreaDivWithClass("ge-table-scroll-viewport", i, "body", "center")
|
|
851
864
|
)
|
|
852
865
|
)
|
|
853
|
-
), this.contentWrapperDiv =
|
|
854
|
-
|
|
855
|
-
|
|
866
|
+
), this.contentWrapperDiv = o.applyStyleNoPadding(
|
|
867
|
+
o.applyStylePosistionRelative(
|
|
868
|
+
o.createDivWithClass("ge-table-scroll-content-wrapper", this.scrollViewport)
|
|
856
869
|
)
|
|
857
|
-
), this.contentDiv =
|
|
858
|
-
|
|
859
|
-
|
|
870
|
+
), this.contentDiv = o.applyStyleNoPadding(
|
|
871
|
+
o.applyStylePosistionRelative(
|
|
872
|
+
o.createDivWithClass("ge-table-scroll-content", this.contentWrapperDiv)
|
|
860
873
|
)
|
|
861
|
-
), this.areaBodyCenter =
|
|
862
|
-
|
|
863
|
-
), this.borderHeaderBottom =
|
|
864
|
-
|
|
865
|
-
), this.borderFixedWest =
|
|
866
|
-
|
|
867
|
-
), this.borderFixedEast =
|
|
868
|
-
|
|
869
|
-
), this.borderFooterTop =
|
|
870
|
-
|
|
874
|
+
), this.areaBodyCenter = o.appendRelativeChildDiv(
|
|
875
|
+
o.createDivWithClass("ge-table-body-center", this.contentDiv)
|
|
876
|
+
), this.borderHeaderBottom = o.applyStylePosistionAbsolute(
|
|
877
|
+
o.createDivWithClass("ge-table-header-border", i)
|
|
878
|
+
), this.borderFixedWest = o.applyStylePosistionAbsolute(
|
|
879
|
+
o.createDivWithClass("ge-table-west-fixed-column-border", i)
|
|
880
|
+
), this.borderFixedEast = o.applyStylePosistionAbsolute(
|
|
881
|
+
o.createDivWithClass("ge-table-east-fixed-column-border", i)
|
|
882
|
+
), this.borderFooterTop = o.applyStylePosistionAbsolute(
|
|
883
|
+
o.createDivWithClass("ge-table-footer-border", i)
|
|
871
884
|
);
|
|
872
885
|
}
|
|
873
886
|
/**
|
|
@@ -876,10 +889,10 @@ class Ke {
|
|
|
876
889
|
* @return {void}
|
|
877
890
|
*/
|
|
878
891
|
adjustContainersAndRows() {
|
|
879
|
-
const e = this.tableModel.getPadding(), t = this.hostElement.clientWidth,
|
|
892
|
+
const e = this.tableModel.getPadding(), t = this.hostElement.clientWidth, o = this.hostElement.clientHeight;
|
|
880
893
|
this.dom.applyStyle(this.scrollViewport, {
|
|
881
894
|
width: `${t - e.left}px`,
|
|
882
|
-
height: `${
|
|
895
|
+
height: `${o - e.top}px`,
|
|
883
896
|
top: `${e.top}px`,
|
|
884
897
|
left: `${e.left}px`
|
|
885
898
|
}), this.scrollTop = this.scrollViewport.scrollTop, this.dom.applyStyle(this.contentDiv, {
|
|
@@ -887,21 +900,21 @@ class Ke {
|
|
|
887
900
|
height: `${this.scrollViewport.clientHeight}px`,
|
|
888
901
|
top: `${this.scrollTop}px`,
|
|
889
902
|
left: `${this.scrollViewport.scrollLeft}px`
|
|
890
|
-
}), this.areaBodyWestGeo.width = e.left, this.areaBodyWestGeo.height =
|
|
903
|
+
}), this.areaBodyWestGeo.width = e.left, this.areaBodyWestGeo.height = o - 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(
|
|
891
904
|
this.dom.applyStyle(this.borderFixedWest, {
|
|
892
905
|
width: "1px",
|
|
893
906
|
height: `${this.areaBodyWestGeo.height}px`,
|
|
894
907
|
top: `${this.areaBodyWestGeo.top}px`,
|
|
895
908
|
left: `${this.areaBodyWestGeo.width}px`
|
|
896
909
|
})
|
|
897
|
-
) : this.dom.applyDisplayNoneStyle(this.borderFixedWest), this.areaBodyEastGeo.width = e.right, this.areaBodyEastGeo.height =
|
|
910
|
+
) : this.dom.applyDisplayNoneStyle(this.borderFixedWest), this.areaBodyEastGeo.width = e.right, this.areaBodyEastGeo.height = o - 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(
|
|
898
911
|
this.dom.applyStyle(this.borderFixedEast, {
|
|
899
912
|
width: "1px",
|
|
900
913
|
height: `${this.areaBodyEastGeo.height}px`,
|
|
901
914
|
top: `${this.areaBodyEastGeo.top}px`,
|
|
902
915
|
left: `${this.areaBodyEastGeo.left}px`
|
|
903
916
|
})
|
|
904
|
-
) : this.dom.applyDisplayNoneStyle(this.borderFixedEast), this.areaBodyCenterGeo.width = t - e.left - e.right, this.areaBodyCenterGeo.height =
|
|
917
|
+
) : this.dom.applyDisplayNoneStyle(this.borderFixedEast), this.areaBodyCenterGeo.width = t - e.left - e.right, this.areaBodyCenterGeo.height = o - 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, {
|
|
905
918
|
width: `${t - e.left - e.right}px`,
|
|
906
919
|
height: `${e.top}px`,
|
|
907
920
|
top: "0",
|
|
@@ -926,23 +939,23 @@ class Ke {
|
|
|
926
939
|
) : this.dom.applyDisplayNoneStyle(this.borderHeaderBottom), this.dom.applyStyle(this.areaFooterWest.parent, {
|
|
927
940
|
width: `${e.left}px`,
|
|
928
941
|
height: `${e.bottom}px`,
|
|
929
|
-
top: `${
|
|
942
|
+
top: `${o - e.bottom}px`,
|
|
930
943
|
left: "0"
|
|
931
944
|
}), this.dom.applyStyle(this.areaFooterCenter.parent, {
|
|
932
945
|
width: `${t - e.left - e.right}px`,
|
|
933
946
|
height: `${e.bottom}px`,
|
|
934
|
-
top: `${
|
|
947
|
+
top: `${o - e.bottom}px`,
|
|
935
948
|
left: `${e.left}px`
|
|
936
949
|
}), this.dom.applyStyle(this.areaFooterEast.parent, {
|
|
937
950
|
width: `${e.right}px`,
|
|
938
951
|
height: `${e.bottom}px`,
|
|
939
|
-
top: `${
|
|
952
|
+
top: `${o - e.bottom}px`,
|
|
940
953
|
left: `${t - e.right}px`
|
|
941
954
|
}), this.tableOptions.footerSeparatorBorderVisible && this.tableModel.isFooterVisibe() ? this.dom.applyDisplayBlockStyle(
|
|
942
955
|
this.dom.applyStyle(this.borderFooterTop, {
|
|
943
956
|
width: `${t}px`,
|
|
944
957
|
height: "1px",
|
|
945
|
-
top: `${
|
|
958
|
+
top: `${o - e.bottom}px`,
|
|
946
959
|
left: "0px"
|
|
947
960
|
})
|
|
948
961
|
) : this.dom.applyDisplayNoneStyle(this.borderFooterTop), this.adjustAfterScrolling();
|
|
@@ -977,8 +990,8 @@ class _ {
|
|
|
977
990
|
* @param {number} c2 - The value for c2.
|
|
978
991
|
* @param {boolean} [gammaRange=false] - The value for gammaRange. Defaults to false. gammaRange will be used for AreaModelCellGroups, but it's not implemented yet!
|
|
979
992
|
*/
|
|
980
|
-
constructor(e, t,
|
|
981
|
-
this.r1 = e, this.c1 = t, this.r2 =
|
|
993
|
+
constructor(e, t, o, s, i = !1) {
|
|
994
|
+
this.r1 = e, this.c1 = t, this.r2 = o, this.c2 = s, this.gammaRange = i;
|
|
982
995
|
}
|
|
983
996
|
static create(e) {
|
|
984
997
|
return e.gammaRange === void 0 && (e.gammaRange = !1), new _(
|
|
@@ -1011,14 +1024,14 @@ class Ye {
|
|
|
1011
1024
|
return;
|
|
1012
1025
|
this.colAndRowspanRanges = [];
|
|
1013
1026
|
const e = this.areaModel.getRowCount(), t = this.tableModel.getColumnCount();
|
|
1014
|
-
for (let
|
|
1015
|
-
for (let
|
|
1016
|
-
let i = this.areaModel.getColspanAt(
|
|
1027
|
+
for (let o = 0; o < e; o++)
|
|
1028
|
+
for (let s = 0; s < t; s++) {
|
|
1029
|
+
let i = this.areaModel.getColspanAt(o, s), a = this.areaModel.getRowspanAt(o, s);
|
|
1017
1030
|
if (i > 1 || a > 1) {
|
|
1018
1031
|
i === 0 && (i = 1), a === 0 && (a = 1);
|
|
1019
1032
|
const n = "gammaCells" in this.areaModel;
|
|
1020
1033
|
this.colAndRowspanRanges.push(
|
|
1021
|
-
new _(s, o
|
|
1034
|
+
new _(o, s, o + a - 1, s + i - 1, n)
|
|
1022
1035
|
);
|
|
1023
1036
|
}
|
|
1024
1037
|
}
|
|
@@ -1028,22 +1041,22 @@ class Ye {
|
|
|
1028
1041
|
}
|
|
1029
1042
|
isInRange(e, t) {
|
|
1030
1043
|
if (this.colAndRowspanRanges) {
|
|
1031
|
-
for (const
|
|
1032
|
-
if (
|
|
1044
|
+
for (const o of this.colAndRowspanRanges)
|
|
1045
|
+
if (o.isInRange(e, t))
|
|
1033
1046
|
return !0;
|
|
1034
1047
|
}
|
|
1035
1048
|
return !1;
|
|
1036
1049
|
}
|
|
1037
1050
|
}
|
|
1038
1051
|
class qe {
|
|
1039
|
-
constructor(e, t,
|
|
1040
|
-
this.header = e, this.body = t, this.footer =
|
|
1052
|
+
constructor(e, t, o) {
|
|
1053
|
+
this.header = e, this.body = t, this.footer = o;
|
|
1041
1054
|
}
|
|
1042
1055
|
}
|
|
1043
1056
|
class Je extends Ke {
|
|
1044
|
-
constructor(e, t,
|
|
1057
|
+
constructor(e, t, o, s) {
|
|
1045
1058
|
var a, n;
|
|
1046
|
-
super(e, t,
|
|
1059
|
+
super(e, t, o, s), this.dragging = !1, this.editing = !1, this.storedColumnWidths = [], this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
|
|
1047
1060
|
header: [],
|
|
1048
1061
|
body: [],
|
|
1049
1062
|
footer: []
|
|
@@ -1088,10 +1101,10 @@ class Je extends Ke {
|
|
|
1088
1101
|
* @param {number} colIdx - The index of the column.
|
|
1089
1102
|
*/
|
|
1090
1103
|
initRenderEditor(e, t) {
|
|
1091
|
-
var
|
|
1092
|
-
let
|
|
1093
|
-
if (
|
|
1094
|
-
if (this.editorRenderer =
|
|
1104
|
+
var s;
|
|
1105
|
+
let o = (s = this.tableModel.getColumnDef(t)) == null ? void 0 : s.getEditRenderer;
|
|
1106
|
+
if (o || (o = this.tableOptions.getEditRenderer), o)
|
|
1107
|
+
if (this.editorRenderer = o(e, t), this.editorRenderer) {
|
|
1095
1108
|
this.editorRendererRow = e, this.editorRendererColumn = t, this.editing = !0, this.repaint();
|
|
1096
1109
|
const i = document.querySelector("input.ge-table-cell-editor-input");
|
|
1097
1110
|
i && i.focus();
|
|
@@ -1172,8 +1185,8 @@ class Je extends Ke {
|
|
|
1172
1185
|
*/
|
|
1173
1186
|
updateCells(e, t = !1) {
|
|
1174
1187
|
e.forEach(
|
|
1175
|
-
(
|
|
1176
|
-
this.tableModel.getAreaModel(
|
|
1188
|
+
(o) => {
|
|
1189
|
+
this.tableModel.getAreaModel(o.area).setValue(o.rowIndex, o.columnIndex, o.value), t || this.rerenderCellContent(o);
|
|
1177
1190
|
}
|
|
1178
1191
|
), t && this.repaint();
|
|
1179
1192
|
}
|
|
@@ -1186,21 +1199,21 @@ class Je extends Ke {
|
|
|
1186
1199
|
* @param {any} value - The new value to be displayed in the cell.
|
|
1187
1200
|
* @param {string[]} cssClasses - An array of CSS classes to be applied to the cell.
|
|
1188
1201
|
*/
|
|
1189
|
-
rerenderCellContent({ area: e, rowIndex: t, columnIndex:
|
|
1190
|
-
const a = this.tableModel.getAreaModel(e), n = 'div[data-col-index="' +
|
|
1202
|
+
rerenderCellContent({ area: e, rowIndex: t, columnIndex: o, value: s, cssClasses: i }) {
|
|
1203
|
+
const a = this.tableModel.getAreaModel(e), n = 'div[data-col-index="' + o + '"][data-row-index="' + t + '"][data-area="' + e + '"]', l = document.querySelector(n);
|
|
1191
1204
|
if (l) {
|
|
1192
1205
|
let c;
|
|
1193
|
-
const d = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn ===
|
|
1206
|
+
const d = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === o;
|
|
1194
1207
|
let p;
|
|
1195
|
-
if (d ? p = this.editorRenderer : p = a.getCellRenderer(t,
|
|
1196
|
-
c = p.render(l, t,
|
|
1208
|
+
if (d ? p = this.editorRenderer : p = a.getCellRenderer(t, o), l.innerText = "", this.applyCssClasses(l, i), p)
|
|
1209
|
+
c = p.render(l, t, o, e, a, s, this.dom.domService), c && this.cleanupFunctions[e].push(c);
|
|
1197
1210
|
else {
|
|
1198
|
-
const g = `${
|
|
1199
|
-
this.dom.addLabelDiv(l, g, !1, t,
|
|
1211
|
+
const g = `${s}`;
|
|
1212
|
+
this.dom.addLabelDiv(l, g, !1, t, o, e);
|
|
1200
1213
|
}
|
|
1201
|
-
const h = a.getCustomClassesAt(t,
|
|
1214
|
+
const h = a.getCustomClassesAt(t, o);
|
|
1202
1215
|
h.length && this.dom.addClasses(h, l);
|
|
1203
|
-
const m = a.getCustomStyleAt(t,
|
|
1216
|
+
const m = a.getCustomStyleAt(t, o);
|
|
1204
1217
|
if (m)
|
|
1205
1218
|
for (const g in m)
|
|
1206
1219
|
this.dom.setStyle(l, g, m[g]);
|
|
@@ -1215,13 +1228,13 @@ class Je extends Ke {
|
|
|
1215
1228
|
*/
|
|
1216
1229
|
storeColumnWidths() {
|
|
1217
1230
|
const e = this.tableModel.getColumnDefs();
|
|
1218
|
-
e != null && e.length && (this.storedColumnWidths = e.map((t,
|
|
1231
|
+
e != null && e.length && (this.storedColumnWidths = e.map((t, o) => this.tableModel.getColumnWidth(o)));
|
|
1219
1232
|
}
|
|
1220
1233
|
getAreaAndSideIdentByAttr(e) {
|
|
1221
1234
|
if (e) {
|
|
1222
|
-
const t = this.getStringByAttr(e, "data-area"),
|
|
1223
|
-
if (
|
|
1224
|
-
return [t,
|
|
1235
|
+
const t = this.getStringByAttr(e, "data-area"), o = this.getStringByAttr(e, "data-side");
|
|
1236
|
+
if (o && t)
|
|
1237
|
+
return [t, o];
|
|
1225
1238
|
}
|
|
1226
1239
|
return [void 0, void 0];
|
|
1227
1240
|
}
|
|
@@ -1278,11 +1291,11 @@ class Je extends Ke {
|
|
|
1278
1291
|
* @protected
|
|
1279
1292
|
*/
|
|
1280
1293
|
getNumberByAttr(e, t) {
|
|
1281
|
-
var
|
|
1294
|
+
var o;
|
|
1282
1295
|
if (e) {
|
|
1283
|
-
const
|
|
1284
|
-
if (
|
|
1285
|
-
return Number(
|
|
1296
|
+
const s = (o = e.closest("[" + t + "]")) == null ? void 0 : o.getAttribute(t);
|
|
1297
|
+
if (s)
|
|
1298
|
+
return Number(s);
|
|
1286
1299
|
}
|
|
1287
1300
|
return -1;
|
|
1288
1301
|
}
|
|
@@ -1295,11 +1308,11 @@ class Je extends Ke {
|
|
|
1295
1308
|
* @protected
|
|
1296
1309
|
*/
|
|
1297
1310
|
getStringByAttr(e, t) {
|
|
1298
|
-
var
|
|
1311
|
+
var o;
|
|
1299
1312
|
if (e) {
|
|
1300
|
-
const
|
|
1301
|
-
if (
|
|
1302
|
-
return
|
|
1313
|
+
const s = (o = e.closest("[" + t + "]")) == null ? void 0 : o.getAttribute(t);
|
|
1314
|
+
if (s)
|
|
1315
|
+
return s;
|
|
1303
1316
|
}
|
|
1304
1317
|
return "";
|
|
1305
1318
|
}
|
|
@@ -1312,21 +1325,21 @@ class Je extends Ke {
|
|
|
1312
1325
|
* @protected
|
|
1313
1326
|
*/
|
|
1314
1327
|
adjustArea(e, t = 0) {
|
|
1315
|
-
var
|
|
1316
|
-
const
|
|
1317
|
-
|
|
1328
|
+
var u;
|
|
1329
|
+
const o = this.getArea(e, "west"), s = this.getArea(e, "center"), i = this.getArea(e, "east"), a = s.child.clientHeight;
|
|
1330
|
+
o.child.innerText = "", s.child.innerText = "", i.child.innerText = "";
|
|
1318
1331
|
const n = 0, l = this.areaBodyCenterGeo.width, c = this.tableModel.getPadding(), d = this.tableModel.getAreaModel(e), p = d.getRowCount();
|
|
1319
1332
|
for (; this.cleanupFunctions[e].length; ) {
|
|
1320
|
-
const
|
|
1321
|
-
|
|
1333
|
+
const f = this.cleanupFunctions[e].shift();
|
|
1334
|
+
f && f();
|
|
1322
1335
|
}
|
|
1323
1336
|
let h = t;
|
|
1324
1337
|
const m = this.tableModel.getColumnCount(), g = this.tableModel.getFixedRightColumnCount(), b = this.tableModel.getFixedLeftColumnCount();
|
|
1325
|
-
for (let
|
|
1326
|
-
const v = h, x =
|
|
1338
|
+
for (let f = 0; f < p; f++) {
|
|
1339
|
+
const v = h, x = f === p - 1, w = this.tableModel.getRowHeight(e, f);
|
|
1327
1340
|
if (v + w > 0) {
|
|
1328
|
-
this.firstVisibleRowIndex =
|
|
1329
|
-
let y = { left: n, width: l, height: w, top: v, index:
|
|
1341
|
+
this.firstVisibleRowIndex = f;
|
|
1342
|
+
let y = { left: n, width: l, height: w, top: v, index: f }, S = this.dom.addRowDiv(s, y, f, e, "center");
|
|
1330
1343
|
const R = b;
|
|
1331
1344
|
if (this.adjustColumnsToRowParent({
|
|
1332
1345
|
areaIdent: e,
|
|
@@ -1334,34 +1347,34 @@ class Je extends Ke {
|
|
|
1334
1347
|
areaModel: d,
|
|
1335
1348
|
geo: y,
|
|
1336
1349
|
parent: S,
|
|
1337
|
-
rowIndex:
|
|
1350
|
+
rowIndex: f,
|
|
1338
1351
|
columnIndexStart: R,
|
|
1339
1352
|
columnIndexEnd: m - g - 1,
|
|
1340
1353
|
verticalFixed: !1,
|
|
1341
1354
|
lastRowOfModel: x
|
|
1342
|
-
}), c.left > 0 && (y = { left: n, width: this.areaBodyWestGeo.width, height: w, top: v, index:
|
|
1355
|
+
}), c.left > 0 && (y = { left: n, width: this.areaBodyWestGeo.width, height: w, top: v, index: f }, S = this.dom.addRowDiv(o, y, f, e, "west"), this.adjustColumnsToRowParent({
|
|
1343
1356
|
areaIdent: e,
|
|
1344
1357
|
sideIdent: "west",
|
|
1345
1358
|
areaModel: d,
|
|
1346
1359
|
geo: y,
|
|
1347
1360
|
parent: S,
|
|
1348
|
-
rowIndex:
|
|
1361
|
+
rowIndex: f,
|
|
1349
1362
|
columnIndexStart: 0,
|
|
1350
1363
|
columnIndexEnd: R - 1,
|
|
1351
1364
|
verticalFixed: !0,
|
|
1352
1365
|
lastRowOfModel: x
|
|
1353
|
-
})), c.right > 0 && (y = { left: n, width: this.areaBodyEastGeo.width, height: w, top: v, index:
|
|
1366
|
+
})), c.right > 0 && (y = { left: n, width: this.areaBodyEastGeo.width, height: w, top: v, index: f }, S = this.dom.addRowDiv(i, y, f, e, "east"), this.adjustColumnsToRowParent({
|
|
1354
1367
|
areaIdent: e,
|
|
1355
1368
|
sideIdent: "east",
|
|
1356
1369
|
areaModel: d,
|
|
1357
1370
|
geo: y,
|
|
1358
1371
|
parent: S,
|
|
1359
|
-
rowIndex:
|
|
1372
|
+
rowIndex: f,
|
|
1360
1373
|
columnIndexStart: m - g,
|
|
1361
1374
|
columnIndexEnd: m - 1,
|
|
1362
1375
|
verticalFixed: !0,
|
|
1363
1376
|
lastRowOfModel: x
|
|
1364
|
-
})), e === "header" && this.tree &&
|
|
1377
|
+
})), e === "header" && this.tree && f === p - 1) {
|
|
1365
1378
|
const M = this.dom.applyStyle(
|
|
1366
1379
|
this.dom.setAttribute(
|
|
1367
1380
|
this.dom.addDiv(S, new k(16, 20, 20, 8)),
|
|
@@ -1380,12 +1393,12 @@ class Je extends Ke {
|
|
|
1380
1393
|
break;
|
|
1381
1394
|
}
|
|
1382
1395
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
|
|
1383
|
-
const
|
|
1384
|
-
if (
|
|
1385
|
-
for (const v of
|
|
1386
|
-
let x = 0, w =
|
|
1396
|
+
const f = ((u = this.colAndRowspanModels[e]) == null ? void 0 : u.getRanges()) ?? [];
|
|
1397
|
+
if (f.length)
|
|
1398
|
+
for (const v of f) {
|
|
1399
|
+
let x = 0, w = s.child, y = "center";
|
|
1387
1400
|
if (v.c1 < b)
|
|
1388
|
-
w =
|
|
1401
|
+
w = o.child, y = "west";
|
|
1389
1402
|
else if (g > 0 && v.c1 >= m - g)
|
|
1390
1403
|
w = i.child, y = "east";
|
|
1391
1404
|
else {
|
|
@@ -1406,16 +1419,16 @@ class Je extends Ke {
|
|
|
1406
1419
|
* @param sideIdent SideIdent (west,center,east)
|
|
1407
1420
|
* @protected
|
|
1408
1421
|
*/
|
|
1409
|
-
drawBigCell(e, t,
|
|
1410
|
-
const n =
|
|
1422
|
+
drawBigCell(e, t, o, s, i, a) {
|
|
1423
|
+
const n = o + this.getRowHeights(0, e.r1 - 1, s).reduce((u, f) => u + f, 0), l = this.tableModel.getColumnCount(), c = this.tableModel.getFixedRightColumnCount();
|
|
1411
1424
|
let d = 0;
|
|
1412
1425
|
c > 0 && e.c1 >= l - c && (d = l - c);
|
|
1413
|
-
const p = t + this.getColumnWidths(d, e.c1 - 1).reduce((
|
|
1426
|
+
const p = t + this.getColumnWidths(d, e.c1 - 1).reduce((u, f) => u + f, 0), h = this.getRowHeights(e.r1, e.r2, s).reduce((u, f) => u + f, 0), m = this.getColumnWidths(e.c1, e.c2).reduce((u, f) => u + f, 0);
|
|
1414
1427
|
let g = !1;
|
|
1415
1428
|
const b = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
1416
1429
|
b && (g = b.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? this.renderCell({
|
|
1417
|
-
areaModel:
|
|
1418
|
-
areaIdent:
|
|
1430
|
+
areaModel: s,
|
|
1431
|
+
areaIdent: s.areaIdent,
|
|
1419
1432
|
sideIdent: a,
|
|
1420
1433
|
rowIndex: e.r1,
|
|
1421
1434
|
columnIndex: e.c1,
|
|
@@ -1428,8 +1441,8 @@ class Je extends Ke {
|
|
|
1428
1441
|
lastRowOfModel: !0,
|
|
1429
1442
|
gammaRange: e.gammaRange
|
|
1430
1443
|
}) : this.renderCell({
|
|
1431
|
-
areaModel:
|
|
1432
|
-
areaIdent:
|
|
1444
|
+
areaModel: s,
|
|
1445
|
+
areaIdent: s.areaIdent,
|
|
1433
1446
|
sideIdent: a,
|
|
1434
1447
|
rowIndex: e.r1,
|
|
1435
1448
|
columnIndex: e.c1,
|
|
@@ -1441,7 +1454,7 @@ class Je extends Ke {
|
|
|
1441
1454
|
cellSelected: g,
|
|
1442
1455
|
lastRowOfModel: !0,
|
|
1443
1456
|
gammaRange: e.gammaRange
|
|
1444
|
-
}),
|
|
1457
|
+
}), s.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1445
1458
|
rowIndex: e.r1,
|
|
1446
1459
|
columnIndex: e.c1,
|
|
1447
1460
|
cellLeft: p,
|
|
@@ -1460,13 +1473,13 @@ class Je extends Ke {
|
|
|
1460
1473
|
* @returns {number} - The row index of the important rowspan cell, or -1 if not found.
|
|
1461
1474
|
* @protected
|
|
1462
1475
|
*/
|
|
1463
|
-
findRowOfImportantRowspanCell(e, t,
|
|
1464
|
-
const
|
|
1476
|
+
findRowOfImportantRowspanCell(e, t, o) {
|
|
1477
|
+
const s = e.getMaxRowspan();
|
|
1465
1478
|
for (let i = t - 1; i > -1; i--) {
|
|
1466
|
-
const a = e.getRowspanAt(i,
|
|
1479
|
+
const a = e.getRowspanAt(i, o);
|
|
1467
1480
|
if (a > 1 && i + a + 1 >= t)
|
|
1468
1481
|
return i;
|
|
1469
|
-
if (t - i >
|
|
1482
|
+
if (t - i > s)
|
|
1470
1483
|
return -1;
|
|
1471
1484
|
}
|
|
1472
1485
|
return -1;
|
|
@@ -1481,8 +1494,8 @@ class Je extends Ke {
|
|
|
1481
1494
|
adjustColumnsToRowParent({
|
|
1482
1495
|
areaIdent: e,
|
|
1483
1496
|
sideIdent: t,
|
|
1484
|
-
areaModel:
|
|
1485
|
-
geo:
|
|
1497
|
+
areaModel: o,
|
|
1498
|
+
geo: s,
|
|
1486
1499
|
parent: i,
|
|
1487
1500
|
rowIndex: a,
|
|
1488
1501
|
columnIndexStart: n,
|
|
@@ -1494,33 +1507,33 @@ class Je extends Ke {
|
|
|
1494
1507
|
this.scrollViewportLeft = this.scrollViewport.scrollLeft;
|
|
1495
1508
|
let p = 0;
|
|
1496
1509
|
if (!c) {
|
|
1497
|
-
const
|
|
1498
|
-
p = this.scrollFactorX *
|
|
1510
|
+
const u = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1511
|
+
p = this.scrollFactorX * u;
|
|
1499
1512
|
}
|
|
1500
1513
|
const h = 0, m = !!(e === "body" && t);
|
|
1501
1514
|
let g = p;
|
|
1502
|
-
for (let
|
|
1503
|
-
const
|
|
1504
|
-
if (v > 0 &&
|
|
1505
|
-
let x =
|
|
1506
|
-
const w =
|
|
1507
|
-
w > 1 && (x = this.getRowHeights(a, a + w - 1,
|
|
1515
|
+
for (let u = n; u <= l; u++) {
|
|
1516
|
+
const f = g, v = this.tableModel.getColumnWidth(u);
|
|
1517
|
+
if (v > 0 && f + v > 0) {
|
|
1518
|
+
let x = s.height;
|
|
1519
|
+
const w = o.getRowspanAt(a, u), y = o.getColspanAt(a, u);
|
|
1520
|
+
w > 1 && (x = this.getRowHeights(a, a + w - 1, o).reduce((M, T) => M + T, 0));
|
|
1508
1521
|
let S = v;
|
|
1509
|
-
y > 1 && (S = this.getColumnWidths(
|
|
1522
|
+
y > 1 && (S = this.getColumnWidths(u, u + y - 1).reduce((M, T) => M + T, 0));
|
|
1510
1523
|
let R = !1;
|
|
1511
|
-
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (b = this.colAndRowspanModels[e]) != null && b.isInRange(a,
|
|
1512
|
-
this.renderDragTargetDiv(i,
|
|
1513
|
-
const M = { left:
|
|
1524
|
+
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (b = this.colAndRowspanModels[e]) != null && b.isInRange(a, u) && (R = !0), this.draggingTargetColumnIndex === u && e !== "header") {
|
|
1525
|
+
this.renderDragTargetDiv(i, f, h, S, x);
|
|
1526
|
+
const M = { left: f, top: h, width: S, height: x };
|
|
1514
1527
|
this.dom.addColumnBorderDivs(this.tableOptions, i, M, e, t);
|
|
1515
1528
|
} else {
|
|
1516
|
-
const M = this.renderSelectedBackgroundDiv(R, m, t,
|
|
1517
|
-
"gammaCells" in
|
|
1518
|
-
areaModel:
|
|
1529
|
+
const M = this.renderSelectedBackgroundDiv(R, m, t, o, a, u, i, f, h, S, x);
|
|
1530
|
+
"gammaCells" in o && o.getValueAt(a, u) && (R = !1), R || this.renderCell({
|
|
1531
|
+
areaModel: o,
|
|
1519
1532
|
areaIdent: e,
|
|
1520
1533
|
sideIdent: t,
|
|
1521
1534
|
rowIndex: a,
|
|
1522
|
-
columnIndex:
|
|
1523
|
-
left:
|
|
1535
|
+
columnIndex: u,
|
|
1536
|
+
left: f,
|
|
1524
1537
|
top: h,
|
|
1525
1538
|
width: S,
|
|
1526
1539
|
height: x,
|
|
@@ -1530,8 +1543,8 @@ class Je extends Ke {
|
|
|
1530
1543
|
gammaRange: !0
|
|
1531
1544
|
}), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1532
1545
|
rowIndex: a,
|
|
1533
|
-
columnIndex:
|
|
1534
|
-
cellLeft:
|
|
1546
|
+
columnIndex: u,
|
|
1547
|
+
cellLeft: f,
|
|
1535
1548
|
cellTop: h,
|
|
1536
1549
|
cellWidth: S,
|
|
1537
1550
|
cellHeight: x,
|
|
@@ -1542,7 +1555,7 @@ class Je extends Ke {
|
|
|
1542
1555
|
if (g = g + v, g > this.areaBodyCenterGeo.width)
|
|
1543
1556
|
break;
|
|
1544
1557
|
}
|
|
1545
|
-
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new k(g - 1, 1,
|
|
1558
|
+
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new k(g - 1, 1, s.height, 0), i);
|
|
1546
1559
|
}
|
|
1547
1560
|
/**
|
|
1548
1561
|
* Retrieves the column index of the tree arrow column in the table.
|
|
@@ -1559,8 +1572,8 @@ class Je extends Ke {
|
|
|
1559
1572
|
addAndRenderCellDiv({
|
|
1560
1573
|
areaModel: e,
|
|
1561
1574
|
areaIdent: t,
|
|
1562
|
-
sideIdent:
|
|
1563
|
-
rowIndex:
|
|
1575
|
+
sideIdent: o,
|
|
1576
|
+
rowIndex: s,
|
|
1564
1577
|
index: i,
|
|
1565
1578
|
left: a,
|
|
1566
1579
|
width: n,
|
|
@@ -1570,44 +1583,44 @@ class Je extends Ke {
|
|
|
1570
1583
|
lastRowOfModel: p
|
|
1571
1584
|
}) {
|
|
1572
1585
|
var te;
|
|
1573
|
-
const m = this.editorRenderer && this.editorRendererRow ===
|
|
1574
|
-
let
|
|
1586
|
+
const m = this.editorRenderer && this.editorRendererRow === s && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(s, i), g = { left: a, width: n, height: l, top: c, index: i }, b = e.getRowByIndex(s);
|
|
1587
|
+
let u = "none";
|
|
1575
1588
|
if (i === this.getTreeArrowColumnIndex() && X(b)) {
|
|
1576
1589
|
const C = b;
|
|
1577
|
-
(te = C.children) != null && te.length ? C.expanded ?
|
|
1590
|
+
(te = C.children) != null && te.length ? C.expanded ? u = "expanded" : u = "collapsed" : u = "hidden";
|
|
1578
1591
|
}
|
|
1579
1592
|
let v;
|
|
1580
1593
|
if (t === "header") {
|
|
1581
1594
|
const C = this.tableModel.getColumnDef(i);
|
|
1582
1595
|
(!(C != null && C.sortIconVisible) || C != null && C.sortIconVisible()) && (v = C == null ? void 0 : C.sortState);
|
|
1583
1596
|
}
|
|
1584
|
-
const x = e.getValueAt(
|
|
1597
|
+
const x = e.getValueAt(s, i), w = m ? "" : `${x}`, y = e.isRowChecked(s), S = this.dom.addColumnDiv(
|
|
1585
1598
|
{
|
|
1586
1599
|
parent: d,
|
|
1587
1600
|
geo: g,
|
|
1588
|
-
rowIndex:
|
|
1601
|
+
rowIndex: s,
|
|
1589
1602
|
columnIndex: i,
|
|
1590
1603
|
areaIdent: t,
|
|
1591
|
-
sideIdent:
|
|
1604
|
+
sideIdent: o,
|
|
1592
1605
|
text: w,
|
|
1593
|
-
treeArrow:
|
|
1606
|
+
treeArrow: u,
|
|
1594
1607
|
tableOptions: this.tableOptions,
|
|
1595
1608
|
checkedType: y,
|
|
1596
1609
|
sortState: v
|
|
1597
1610
|
}
|
|
1598
|
-
), R = e.getTooltipAt(
|
|
1611
|
+
), R = e.getTooltipAt(s, i);
|
|
1599
1612
|
R && this.dom.setAttribute(S, "title", R);
|
|
1600
1613
|
const M = this.tableModel.getColumnDef(i);
|
|
1601
1614
|
M && M.classes[t] && this.dom.addClasses(M.classes[t], S);
|
|
1602
1615
|
let T;
|
|
1603
|
-
m && (T = m.render(S,
|
|
1604
|
-
const B = e.getCustomClassesAt(
|
|
1605
|
-
if (B.length && this.dom.addClasses(B, S), this.dom.addColumnBorderDivs(this.tableOptions, d, g, t,
|
|
1616
|
+
m && (T = m.render(S, s, i, t, e, x, this.dom.domService));
|
|
1617
|
+
const B = e.getCustomClassesAt(s, i);
|
|
1618
|
+
if (B.length && this.dom.addClasses(B, S), this.dom.addColumnBorderDivs(this.tableOptions, d, g, t, o), p && this.dom.addHorizontalBorder({ left: a, width: n, height: l, top: c + l }, d), this.getFocusModel && t === "body") {
|
|
1606
1619
|
const C = this.getFocusModel();
|
|
1607
|
-
C != null && C.hasFocus(
|
|
1620
|
+
C != null && C.hasFocus(s, i) && this.dom.addFocusBorderDivs(d, g, {});
|
|
1608
1621
|
}
|
|
1609
1622
|
t === "header" && this.dom.setAttribute(S, "data-ge-action", "drag-column");
|
|
1610
|
-
const N = e.getCustomStyleAt(
|
|
1623
|
+
const N = e.getCustomStyleAt(s, i);
|
|
1611
1624
|
if (N)
|
|
1612
1625
|
for (const C in N)
|
|
1613
1626
|
this.dom.setStyle(S, C, N[C]);
|
|
@@ -1621,8 +1634,8 @@ class Je extends Ke {
|
|
|
1621
1634
|
* @protected
|
|
1622
1635
|
*/
|
|
1623
1636
|
applyCssClasses(e, t = {}) {
|
|
1624
|
-
e && Object.entries(t).forEach(([
|
|
1625
|
-
|
|
1637
|
+
e && Object.entries(t).forEach(([o, s]) => {
|
|
1638
|
+
s ? this.dom.addClass(o, e) : this.dom.removeClass(o, e);
|
|
1626
1639
|
});
|
|
1627
1640
|
}
|
|
1628
1641
|
/**
|
|
@@ -1634,10 +1647,10 @@ class Je extends Ke {
|
|
|
1634
1647
|
* @return {number[]} An array containing the widths of the columns within the specified range.
|
|
1635
1648
|
*/
|
|
1636
1649
|
getColumnWidths(e, t) {
|
|
1637
|
-
const
|
|
1638
|
-
for (let
|
|
1639
|
-
|
|
1640
|
-
return
|
|
1650
|
+
const o = [];
|
|
1651
|
+
for (let s = e; s <= t; s++)
|
|
1652
|
+
o.push(this.tableModel.getColumnWidth(s));
|
|
1653
|
+
return o;
|
|
1641
1654
|
}
|
|
1642
1655
|
/**
|
|
1643
1656
|
* Retrieves the heights of rows within a specified range.
|
|
@@ -1647,11 +1660,11 @@ class Je extends Ke {
|
|
|
1647
1660
|
* @param {AreaModelIf} areaModel - The area model.
|
|
1648
1661
|
* @return {number[]} - An array containing the heights of the rows within the specified range.
|
|
1649
1662
|
*/
|
|
1650
|
-
getRowHeights(e, t,
|
|
1651
|
-
const
|
|
1663
|
+
getRowHeights(e, t, o) {
|
|
1664
|
+
const s = [];
|
|
1652
1665
|
for (let i = e; i <= t; i++)
|
|
1653
|
-
|
|
1654
|
-
return
|
|
1666
|
+
s.push(o.getRowHeight(i));
|
|
1667
|
+
return s;
|
|
1655
1668
|
}
|
|
1656
1669
|
/**
|
|
1657
1670
|
* Adjusts the position and size of the hover row based on the mouse move event.
|
|
@@ -1662,12 +1675,12 @@ class Je extends Ke {
|
|
|
1662
1675
|
*/
|
|
1663
1676
|
adjustHoverRows(e) {
|
|
1664
1677
|
if (this.tableOptions.hoverRowVisible && e.rowIndex > -1) {
|
|
1665
|
-
const t = this.hostElement.clientWidth,
|
|
1678
|
+
const t = this.hostElement.clientWidth, o = this.tableModel.getAreaModel("body").getRowHeight(e.rowIndex), s = e.rowTop + this.areaHeaderCenter.parent.clientHeight - this.scrollTop;
|
|
1666
1679
|
this.dom.applyStyle(this.hoverRow, {
|
|
1667
1680
|
left: "0",
|
|
1668
|
-
top:
|
|
1681
|
+
top: s + "px",
|
|
1669
1682
|
width: t + "px",
|
|
1670
|
-
height:
|
|
1683
|
+
height: o + "px",
|
|
1671
1684
|
display: "block"
|
|
1672
1685
|
});
|
|
1673
1686
|
} else
|
|
@@ -1695,11 +1708,11 @@ class Je extends Ke {
|
|
|
1695
1708
|
*/
|
|
1696
1709
|
adjustHoverColumns(e) {
|
|
1697
1710
|
if (this.tableOptions.hoverColumnVisible && e.rowIndex > -1) {
|
|
1698
|
-
const t = this.hostElement.clientHeight,
|
|
1711
|
+
const t = this.hostElement.clientHeight, o = this.tableModel.getColumnWidth(e.columnIndex), s = this.areaBodyWestGeo.width, i = e.columnLeft + this.tableModel.getPadding().left - this.scrollLeft - s;
|
|
1699
1712
|
this.dom.applyStyle(this.hoverColumn, {
|
|
1700
1713
|
left: i + "px",
|
|
1701
1714
|
top: "0px",
|
|
1702
|
-
width:
|
|
1715
|
+
width: o + "px",
|
|
1703
1716
|
height: t + "px",
|
|
1704
1717
|
display: "block"
|
|
1705
1718
|
});
|
|
@@ -1738,17 +1751,17 @@ class Je extends Ke {
|
|
|
1738
1751
|
* @param {number} sourceColumnIndex - The index of the source column.
|
|
1739
1752
|
* @param {boolean} firstDraggingRendering - Indicates if it's the first rendering of the dragging column.
|
|
1740
1753
|
*/
|
|
1741
|
-
adjustDraggingColumn(e, t,
|
|
1742
|
-
var
|
|
1754
|
+
adjustDraggingColumn(e, t, o) {
|
|
1755
|
+
var s, i;
|
|
1743
1756
|
if (this.dragging) {
|
|
1744
1757
|
const a = this.hostElement.clientHeight, n = this.storedColumnWidths[t];
|
|
1745
|
-
if ((
|
|
1758
|
+
if ((s = e.originalEvent) != null && s.clientX) {
|
|
1746
1759
|
const d = { left: ((i = e.originalEvent) == null ? void 0 : i.clientX) - n / 2, width: n, height: a, top: 0, index: t };
|
|
1747
1760
|
this.dom.applyStyle(this.draggingColumn, {
|
|
1748
1761
|
background: "rgba(128,128,128,0.2)",
|
|
1749
1762
|
display: "block",
|
|
1750
1763
|
overfllow: "clip"
|
|
1751
|
-
}), this.dom.applyStyleInPx(this.draggingColumn, d),
|
|
1764
|
+
}), this.dom.applyStyleInPx(this.draggingColumn, d), o && this.renderContentOfDraggingColumn(d);
|
|
1752
1765
|
}
|
|
1753
1766
|
} else
|
|
1754
1767
|
this.hideDraggingColumn();
|
|
@@ -1772,34 +1785,34 @@ class Je extends Ke {
|
|
|
1772
1785
|
* @param {number} [y=0] - The starting y-position.
|
|
1773
1786
|
* @return {number} The final y-position after rendering all the content.
|
|
1774
1787
|
*/
|
|
1775
|
-
renderContentOfDraggingColumnForArea(e, t,
|
|
1776
|
-
const
|
|
1788
|
+
renderContentOfDraggingColumnForArea(e, t, o = 0) {
|
|
1789
|
+
const s = "center", i = this.tableModel.getAreaModel(t), a = i == null ? void 0 : i.getRowCount();
|
|
1777
1790
|
if (a) {
|
|
1778
1791
|
const n = e.index ?? 0, l = this.draggingColumn;
|
|
1779
1792
|
for (let c = 0; c < a; c++) {
|
|
1780
|
-
const d =
|
|
1793
|
+
const d = o, p = i.getRowHeight(c), h = { left: 0, width: e.width, height: p, top: d, index: c }, m = i.getValueAt(c, n), g = i.getCellRenderer(c, n), b = g ? "" : `${m}`, u = {
|
|
1781
1794
|
parent: l,
|
|
1782
1795
|
geo: h,
|
|
1783
1796
|
rowIndex: c,
|
|
1784
1797
|
columnIndex: n,
|
|
1785
1798
|
areaIdent: t,
|
|
1786
|
-
sideIdent:
|
|
1799
|
+
sideIdent: s,
|
|
1787
1800
|
text: b
|
|
1788
|
-
},
|
|
1801
|
+
}, f = this.dom.addColumnDiv(u);
|
|
1789
1802
|
let v;
|
|
1790
|
-
g && (v = g.render(
|
|
1803
|
+
g && (v = g.render(f, c, n, t, i, m, this.dom.domService), v && this.cleanupFunctions[t].push(v));
|
|
1791
1804
|
const x = i.getCustomClassesAt(c, n);
|
|
1792
|
-
x.length && this.dom.addClasses(x,
|
|
1805
|
+
x.length && this.dom.addClasses(x, f);
|
|
1793
1806
|
const w = this.tableModel.getColumnDef(n);
|
|
1794
|
-
w && w.classes[t] && this.dom.addClasses(w.classes[t],
|
|
1807
|
+
w && w.classes[t] && this.dom.addClasses(w.classes[t], f), this.dom.addColumnBorderDivs(this.tableOptions, l, h, t, s);
|
|
1795
1808
|
const y = i.getCustomStyleAt(c, n);
|
|
1796
1809
|
if (y)
|
|
1797
1810
|
for (const S in y)
|
|
1798
|
-
this.dom.setStyle(
|
|
1799
|
-
|
|
1811
|
+
this.dom.setStyle(f, S, y[S]);
|
|
1812
|
+
o = o + p;
|
|
1800
1813
|
}
|
|
1801
1814
|
}
|
|
1802
|
-
return
|
|
1815
|
+
return o;
|
|
1803
1816
|
}
|
|
1804
1817
|
/**
|
|
1805
1818
|
* Hides the dragging column by applying a 'display: none' style to it.
|
|
@@ -1822,11 +1835,11 @@ class Je extends Ke {
|
|
|
1822
1835
|
* @param {number} height - The height of the target div in pixels.
|
|
1823
1836
|
* @return {HTMLDivElement} - The rendered draggable target div element.
|
|
1824
1837
|
*/
|
|
1825
|
-
renderDragTargetDiv(e, t,
|
|
1838
|
+
renderDragTargetDiv(e, t, o, s, i) {
|
|
1826
1839
|
const a = this.dom.applyStylePosistionAbsolute(
|
|
1827
1840
|
this.dom.createDivWithClass("ge-table-drop-zone", e)
|
|
1828
1841
|
);
|
|
1829
|
-
return this.dom.setStyle(a, "left", `${t}px`), this.dom.setStyle(a, "top", `${
|
|
1842
|
+
return this.dom.setStyle(a, "left", `${t}px`), this.dom.setStyle(a, "top", `${o}px`), this.dom.setStyle(a, "width", `${s}px`), this.dom.setStyle(a, "height", `${i}px`), a;
|
|
1830
1843
|
}
|
|
1831
1844
|
/**
|
|
1832
1845
|
* Render selected background div.
|
|
@@ -1845,19 +1858,19 @@ class Je extends Ke {
|
|
|
1845
1858
|
* @param {number} height - The height of the div.
|
|
1846
1859
|
* @returns {boolean} - Whether the cell is selected.
|
|
1847
1860
|
*/
|
|
1848
|
-
renderSelectedBackgroundDiv(e, t,
|
|
1861
|
+
renderSelectedBackgroundDiv(e, t, o, s, i, a, n, l, c, d, p) {
|
|
1849
1862
|
let h = !1;
|
|
1850
|
-
if (!e && t &&
|
|
1863
|
+
if (!e && t && s.isSelectable(i, a) && this.getSelectionModel) {
|
|
1851
1864
|
const m = this.getSelectionModel();
|
|
1852
1865
|
if (m) {
|
|
1853
1866
|
const g = m.getSelectionCount(i, a);
|
|
1854
1867
|
h = g > 0;
|
|
1855
1868
|
for (let b = 0; b < g; b++) {
|
|
1856
|
-
const
|
|
1869
|
+
const u = this.dom.applyStylePosistionAbsolute(
|
|
1857
1870
|
// ge-table-body-west-selected-range
|
|
1858
|
-
this.dom.createDivWithClass(`ge-table-${
|
|
1871
|
+
this.dom.createDivWithClass(`ge-table-${s.areaIdent}-${o}-selected-range`, n)
|
|
1859
1872
|
);
|
|
1860
|
-
this.dom.setStyle(
|
|
1873
|
+
this.dom.setStyle(u, "left", `${l}px`), this.dom.setStyle(u, "top", `${c}px`), this.dom.setStyle(u, "width", `${d}px`), this.dom.setStyle(u, "height", `${p}px`);
|
|
1861
1874
|
}
|
|
1862
1875
|
}
|
|
1863
1876
|
}
|
|
@@ -1885,8 +1898,8 @@ class Je extends Ke {
|
|
|
1885
1898
|
renderCell({
|
|
1886
1899
|
areaModel: e,
|
|
1887
1900
|
areaIdent: t,
|
|
1888
|
-
sideIdent:
|
|
1889
|
-
rowIndex:
|
|
1901
|
+
sideIdent: o,
|
|
1902
|
+
rowIndex: s,
|
|
1890
1903
|
columnIndex: i,
|
|
1891
1904
|
left: a,
|
|
1892
1905
|
top: n,
|
|
@@ -1899,8 +1912,8 @@ class Je extends Ke {
|
|
|
1899
1912
|
const [m, g] = this.addAndRenderCellDiv({
|
|
1900
1913
|
areaModel: e,
|
|
1901
1914
|
areaIdent: t,
|
|
1902
|
-
sideIdent:
|
|
1903
|
-
rowIndex:
|
|
1915
|
+
sideIdent: o,
|
|
1916
|
+
rowIndex: s,
|
|
1904
1917
|
index: i,
|
|
1905
1918
|
left: a,
|
|
1906
1919
|
width: l,
|
|
@@ -1909,7 +1922,7 @@ class Je extends Ke {
|
|
|
1909
1922
|
parent: d,
|
|
1910
1923
|
lastRowOfModel: h
|
|
1911
1924
|
});
|
|
1912
|
-
p && this.dom.addClass(`ge-table-${t}-${
|
|
1925
|
+
p && this.dom.addClass(`ge-table-${t}-${o}-selected-range`, m), g && this.cleanupFunctions[t].push(g);
|
|
1913
1926
|
}
|
|
1914
1927
|
/**
|
|
1915
1928
|
* Render the header cell resize handle.
|
|
@@ -1925,9 +1938,9 @@ class Je extends Ke {
|
|
|
1925
1938
|
*
|
|
1926
1939
|
* @return {void}
|
|
1927
1940
|
*/
|
|
1928
|
-
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft:
|
|
1941
|
+
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: o, cellTop: s, cellWidth: i, cellHeight: a, parent: n }) {
|
|
1929
1942
|
const l = this.dom.domService, c = this.tableOptions.columnResizeHandleWidthInPx ?? 2, d = l.createElement("div");
|
|
1930
|
-
l.setAttribute(d, "data-col-index", `${t}`), l.setAttribute(d, "data-row-index", `${e}`), l.setAttribute(d, "data-area", "header"), l.setAttribute(d, "data-ge-action", "resize-column"), l.addClass(d, "ge-table-column-resize-handle"), l.setStyle(d, "display", "clip"), l.setStyle(d, "position", "absolute"), l.setStyle(d, "cursor", "col-resize"), l.setStyle(d, "left", `${
|
|
1943
|
+
l.setAttribute(d, "data-col-index", `${t}`), l.setAttribute(d, "data-row-index", `${e}`), l.setAttribute(d, "data-area", "header"), l.setAttribute(d, "data-ge-action", "resize-column"), l.addClass(d, "ge-table-column-resize-handle"), l.setStyle(d, "display", "clip"), l.setStyle(d, "position", "absolute"), l.setStyle(d, "cursor", "col-resize"), l.setStyle(d, "left", `${o + i - c}px`), l.setStyle(d, "top", `${s}px`), l.setStyle(d, "width", `${c}px`), l.setStyle(d, "height", `${a}px`), l.appendChild(n, d);
|
|
1931
1944
|
}
|
|
1932
1945
|
}
|
|
1933
1946
|
class Ze {
|
|
@@ -1949,9 +1962,9 @@ class Qe {
|
|
|
1949
1962
|
*/
|
|
1950
1963
|
onHostElementChanged(e) {
|
|
1951
1964
|
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
|
|
1952
|
-
const t = e.target,
|
|
1953
|
-
if (
|
|
1954
|
-
const a = J(
|
|
1965
|
+
const t = e.target, o = t.getAttribute("data-area"), s = t.getAttribute("data-row-index"), i = t.getAttribute("data-col-index");
|
|
1966
|
+
if (o && s && i) {
|
|
1967
|
+
const a = J(o), n = Number(s), l = Number(i);
|
|
1955
1968
|
this.tableScope.updateModelValueAfterEdit(a, n, l, t.value);
|
|
1956
1969
|
}
|
|
1957
1970
|
}
|
|
@@ -1972,29 +1985,29 @@ class Q {
|
|
|
1972
1985
|
}
|
|
1973
1986
|
class tt {
|
|
1974
1987
|
constructor(e) {
|
|
1975
|
-
var t,
|
|
1976
|
-
this.tableScope = e, (t = this.tableScope.tableOptions) != null && t.getSelectionModel && (this.getSelectionModel = this.tableScope.tableOptions.getSelectionModel), (
|
|
1988
|
+
var t, o;
|
|
1989
|
+
this.tableScope = e, (t = this.tableScope.tableOptions) != null && t.getSelectionModel && (this.getSelectionModel = this.tableScope.tableOptions.getSelectionModel), (o = this.tableScope.tableOptions) != null && o.getFocusModel && (this.getFocusModel = this.tableScope.tableOptions.getFocusModel);
|
|
1977
1990
|
}
|
|
1978
1991
|
onMouseClicked(e, t) {
|
|
1979
1992
|
var i, a, n, l, c, d, p;
|
|
1980
|
-
let
|
|
1993
|
+
let o = !1, s = !1;
|
|
1981
1994
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
1982
1995
|
const h = this.getSelectionModel(), m = this.getFocusModel();
|
|
1983
|
-
h && m && (m.hasFocus(e.rowIndex, e.columnIndex) || (m.setFocus(e.rowIndex, e.columnIndex), this.tableScope.onFocusChanged(m),
|
|
1996
|
+
h && m && (m.hasFocus(e.rowIndex, e.columnIndex) || (m.setFocus(e.rowIndex, e.columnIndex), this.tableScope.onFocusChanged(m), o = !0), (i = e.originalEvent) != null && i.shiftKey || h.hasSelection() && (h.clear(), o = !0), (a = e.originalEvent) != null && a.shiftKey && this.previousEvt ? (h.addSelection(this.createRangeByEvents(e, this.previousEvt)), s = !0, o = !0) : (n = e.originalEvent) != null && n.altKey && ((l = e.originalEvent) != null && l.ctrlKey || (c = e.originalEvent) != null && c.metaKey) ? (h.removeSelection(_.singleCell(e.rowIndex, e.columnIndex)), s = !0, o = !0) : (d = e.originalEvent) != null && d.ctrlKey || (p = e.originalEvent) != null && p.metaKey ? (h.addSelection(_.singleCell(e.rowIndex, e.columnIndex)), s = !0, o = !0) : (h.firstClick(e.rowIndex, e.columnIndex), o = !0), this.tableScope.onSelectionChanged(h));
|
|
1984
1997
|
}
|
|
1985
|
-
return
|
|
1998
|
+
return s ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), o;
|
|
1986
1999
|
}
|
|
1987
2000
|
onActionTriggered(e) {
|
|
1988
2001
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
1989
|
-
const t = this.getSelectionModel(),
|
|
1990
|
-
if (t &&
|
|
2002
|
+
const t = this.getSelectionModel(), o = this.getFocusModel();
|
|
2003
|
+
if (t && o) {
|
|
1991
2004
|
if (e === "SELECT_ALL")
|
|
1992
2005
|
return t.selectAll(), this.tableScope.repaint(), !0;
|
|
1993
2006
|
if (e === "DESELECT_ALL")
|
|
1994
2007
|
return t.clear(), this.tableScope.repaint(), !0;
|
|
1995
2008
|
if (e === "TOGGLE_SELECTION") {
|
|
1996
|
-
const [
|
|
1997
|
-
return t.togglePoint(
|
|
2009
|
+
const [s, i] = o.getFocus();
|
|
2010
|
+
return t.togglePoint(s, i), this.tableScope.repaint(), !0;
|
|
1998
2011
|
}
|
|
1999
2012
|
}
|
|
2000
2013
|
}
|
|
@@ -2002,16 +2015,16 @@ class tt {
|
|
|
2002
2015
|
}
|
|
2003
2016
|
createRangeByEvents(e, t) {
|
|
2004
2017
|
t || (t = e);
|
|
2005
|
-
const
|
|
2018
|
+
const o = Math.min(e.rowIndex, t == null ? void 0 : t.rowIndex), s = 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);
|
|
2006
2019
|
return _.create({
|
|
2007
|
-
rowIndex1:
|
|
2020
|
+
rowIndex1: o,
|
|
2008
2021
|
columnIndex1: i,
|
|
2009
|
-
rowIndex2:
|
|
2022
|
+
rowIndex2: s,
|
|
2010
2023
|
columnIndex2: a
|
|
2011
2024
|
});
|
|
2012
2025
|
}
|
|
2013
2026
|
}
|
|
2014
|
-
class
|
|
2027
|
+
class ot {
|
|
2015
2028
|
get() {
|
|
2016
2029
|
return {
|
|
2017
2030
|
f2: "START_EDITING",
|
|
@@ -2031,7 +2044,7 @@ class st {
|
|
|
2031
2044
|
};
|
|
2032
2045
|
}
|
|
2033
2046
|
}
|
|
2034
|
-
class
|
|
2047
|
+
class st {
|
|
2035
2048
|
get() {
|
|
2036
2049
|
return {
|
|
2037
2050
|
f2: "START_EDITING",
|
|
@@ -2074,7 +2087,7 @@ class it {
|
|
|
2074
2087
|
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));
|
|
2075
2088
|
}
|
|
2076
2089
|
assignPredefinedSystemShortcutMappings() {
|
|
2077
|
-
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new
|
|
2090
|
+
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new st().get()) : Object.assign(this.shortcutActionIdMapping, new ot().get());
|
|
2078
2091
|
}
|
|
2079
2092
|
isMacintosh() {
|
|
2080
2093
|
return navigator.platform.indexOf("Mac") > -1;
|
|
@@ -2092,24 +2105,24 @@ class it {
|
|
|
2092
2105
|
emit(e) {
|
|
2093
2106
|
this.isDebug() && console.debug("ShortcutService emit :", e);
|
|
2094
2107
|
let t = !1;
|
|
2095
|
-
for (const
|
|
2096
|
-
|
|
2108
|
+
for (const o of this.listener)
|
|
2109
|
+
o.onActionTriggered(e) && (t = !0);
|
|
2097
2110
|
return t;
|
|
2098
2111
|
}
|
|
2099
2112
|
findEntity(e) {
|
|
2100
2113
|
const t = this.getTokenByEvent(e);
|
|
2101
2114
|
this.isDebug() && console.debug("ShortcutService tokens :", t);
|
|
2102
|
-
for (const
|
|
2103
|
-
const
|
|
2104
|
-
if (this.areTokensEquals(t,
|
|
2105
|
-
return this.shortcutActionIdMapping[
|
|
2115
|
+
for (const o in this.shortcutActionIdMapping) {
|
|
2116
|
+
const s = o.replace(/opt/g, "alt").replace(/cmd/g, "meta").split(/[+ ]/g).sort();
|
|
2117
|
+
if (this.areTokensEquals(t, s))
|
|
2118
|
+
return this.shortcutActionIdMapping[o];
|
|
2106
2119
|
}
|
|
2107
2120
|
}
|
|
2108
2121
|
areTokensEquals(e, t) {
|
|
2109
2122
|
if (e.length !== t.length || e.length === 0)
|
|
2110
2123
|
return !1;
|
|
2111
|
-
for (let
|
|
2112
|
-
if (e[
|
|
2124
|
+
for (let o = 0; o < e.length; o++)
|
|
2125
|
+
if (e[o] !== t[o])
|
|
2113
2126
|
return !1;
|
|
2114
2127
|
return !0;
|
|
2115
2128
|
}
|
|
@@ -2147,18 +2160,18 @@ class ae {
|
|
|
2147
2160
|
}
|
|
2148
2161
|
}
|
|
2149
2162
|
class Te {
|
|
2150
|
-
setStyle(e, t,
|
|
2151
|
-
return e.style[t] =
|
|
2163
|
+
setStyle(e, t, o) {
|
|
2164
|
+
return e.style[t] = o, e;
|
|
2152
2165
|
}
|
|
2153
2166
|
appendText(e, t) {
|
|
2154
|
-
const
|
|
2155
|
-
return this.appendChild(e,
|
|
2167
|
+
const o = this.createText(t);
|
|
2168
|
+
return this.appendChild(e, o), o;
|
|
2156
2169
|
}
|
|
2157
2170
|
addClass(e, t) {
|
|
2158
|
-
return t.includes(" ") ? t.split(" ").forEach((
|
|
2171
|
+
return t.includes(" ") ? t.split(" ").forEach((o) => e.classList.add(o)) : e.classList.add(t), e;
|
|
2159
2172
|
}
|
|
2160
2173
|
removeClass(e, t) {
|
|
2161
|
-
return t.includes(" ") ? t.split(" ").forEach((
|
|
2174
|
+
return t.includes(" ") ? t.split(" ").forEach((o) => e.classList.remove(o)) : e.classList.remove(t), e;
|
|
2162
2175
|
}
|
|
2163
2176
|
appendChild(e, t) {
|
|
2164
2177
|
e.appendChild(t);
|
|
@@ -2169,15 +2182,15 @@ class Te {
|
|
|
2169
2182
|
createText(e) {
|
|
2170
2183
|
return document.createTextNode(e);
|
|
2171
2184
|
}
|
|
2172
|
-
setAttribute(e, t,
|
|
2173
|
-
e.setAttribute(t,
|
|
2185
|
+
setAttribute(e, t, o) {
|
|
2186
|
+
e.setAttribute(t, o);
|
|
2174
2187
|
}
|
|
2175
2188
|
}
|
|
2176
2189
|
class at {
|
|
2177
|
-
render(e, t,
|
|
2178
|
-
if (i.isEditable(t,
|
|
2190
|
+
render(e, t, o, s, i, a, n) {
|
|
2191
|
+
if (i.isEditable(t, o)) {
|
|
2179
2192
|
n.addClass(e, "ge-table-row-input-div");
|
|
2180
|
-
const l = i.getValueAt(t,
|
|
2193
|
+
const l = i.getValueAt(t, o);
|
|
2181
2194
|
e.innerHTML = `
|
|
2182
2195
|
<input
|
|
2183
2196
|
type="text"
|
|
@@ -2185,9 +2198,9 @@ class at {
|
|
|
2185
2198
|
autofocus
|
|
2186
2199
|
onfocus="this.setSelectionRange(0, this.value.length)"
|
|
2187
2200
|
data-listen="change"
|
|
2188
|
-
data-area="${
|
|
2201
|
+
data-area="${s}"
|
|
2189
2202
|
data-row-index="${t}"
|
|
2190
|
-
data-col-index="${
|
|
2203
|
+
data-col-index="${o}"
|
|
2191
2204
|
data-input-type="text"
|
|
2192
2205
|
style="width:calc(100% - 8px);height:100%;border:0;padding:0 0 0 8px;"
|
|
2193
2206
|
class="ge-table-cell-editor-input">`;
|
|
@@ -2216,14 +2229,14 @@ class rt {
|
|
|
2216
2229
|
this.selectionType === "row" ? this.addRange(_.singleRow(e)) : this.selectionType === "column" && this.addRange(_.singleColumn(t));
|
|
2217
2230
|
}
|
|
2218
2231
|
getSelectionCount(e, t) {
|
|
2219
|
-
let
|
|
2220
|
-
for (const
|
|
2221
|
-
|
|
2222
|
-
return this.allSelected &&
|
|
2232
|
+
let o = 0;
|
|
2233
|
+
for (const s of this.ranges)
|
|
2234
|
+
s.isInRange(e, t) && o++;
|
|
2235
|
+
return this.allSelected && o++, this.isInNegativeRange(e, t) && (o = 0), o;
|
|
2223
2236
|
}
|
|
2224
2237
|
isInNegativeRange(e, t) {
|
|
2225
|
-
for (const
|
|
2226
|
-
if (
|
|
2238
|
+
for (const o of this.negativeRanges)
|
|
2239
|
+
if (o.isInRange(e, t))
|
|
2227
2240
|
return !0;
|
|
2228
2241
|
return !1;
|
|
2229
2242
|
}
|
|
@@ -2247,8 +2260,8 @@ class rt {
|
|
|
2247
2260
|
getMergedRowIndices() {
|
|
2248
2261
|
const e = /* @__PURE__ */ new Set();
|
|
2249
2262
|
for (const t of this.ranges)
|
|
2250
|
-
for (let
|
|
2251
|
-
!e.has(
|
|
2263
|
+
for (let o = t.r1; o <= t.r2; o++)
|
|
2264
|
+
!e.has(o) && !this.isInNegativeRange(o, 0) && e.add(o);
|
|
2252
2265
|
return Array.from(e);
|
|
2253
2266
|
}
|
|
2254
2267
|
selectAll() {
|
|
@@ -2347,8 +2360,8 @@ const L = class L {
|
|
|
2347
2360
|
* @return {Promise<string>} A promise that resolves to the copied content as a string.
|
|
2348
2361
|
* @throws {string} Throws an error if neither selection nor focus is defined.
|
|
2349
2362
|
*/
|
|
2350
|
-
createContent(e, t,
|
|
2351
|
-
return new Promise((
|
|
2363
|
+
createContent(e, t, o) {
|
|
2364
|
+
return new Promise((s, i) => {
|
|
2352
2365
|
if (t != null && t.hasSelection()) {
|
|
2353
2366
|
const a = this.mergeRanges(t.getRanges());
|
|
2354
2367
|
if (a) {
|
|
@@ -2362,12 +2375,12 @@ const L = class L {
|
|
|
2362
2375
|
}
|
|
2363
2376
|
n.push(c.join(L.columnSeparatorChar));
|
|
2364
2377
|
}
|
|
2365
|
-
return
|
|
2378
|
+
return s(n.join(L.rowSeparatorChar));
|
|
2366
2379
|
}
|
|
2367
2380
|
}
|
|
2368
|
-
if (
|
|
2369
|
-
const [a, n] =
|
|
2370
|
-
return
|
|
2381
|
+
if (o) {
|
|
2382
|
+
const [a, n] = o.getFocus(), l = e.getBodyModel().getTextValueAt(a, n);
|
|
2383
|
+
return s(l);
|
|
2371
2384
|
}
|
|
2372
2385
|
i("Cannot copy, neither selection nor focus defined.");
|
|
2373
2386
|
});
|
|
@@ -2389,15 +2402,15 @@ const L = class L {
|
|
|
2389
2402
|
* @param {FocusModelIf} focusModel - The focus model of the table.
|
|
2390
2403
|
* @returns {Promise<string>} A promise that resolves with the copied text if successful, or rejects if an error occurs.
|
|
2391
2404
|
*/
|
|
2392
|
-
copyToClipboard(e, t,
|
|
2393
|
-
return new Promise((
|
|
2405
|
+
copyToClipboard(e, t, o) {
|
|
2406
|
+
return new Promise((s, i) => {
|
|
2394
2407
|
this.createContent(
|
|
2395
2408
|
e,
|
|
2396
2409
|
t,
|
|
2397
|
-
|
|
2410
|
+
o
|
|
2398
2411
|
).then((a) => {
|
|
2399
2412
|
a && this.copyContent(a).then((n) => {
|
|
2400
|
-
|
|
2413
|
+
s(a);
|
|
2401
2414
|
}).catch((n) => {
|
|
2402
2415
|
i();
|
|
2403
2416
|
});
|
|
@@ -2414,21 +2427,21 @@ const L = class L {
|
|
|
2414
2427
|
*/
|
|
2415
2428
|
mergeRanges(e) {
|
|
2416
2429
|
let t;
|
|
2417
|
-
for (const
|
|
2418
|
-
t ? (t.r1 = Math.min(t.r1,
|
|
2430
|
+
for (const o of e)
|
|
2431
|
+
t ? (t.r1 = Math.min(t.r1, o.r1), t.c1 = Math.min(t.c1, o.c1), t.r2 = Math.max(t.r2, o.r2), t.c2 = Math.max(t.c2, o.c2)) : t = new _(o.r1, o.c1, o.r2, o.c2);
|
|
2419
2432
|
return t;
|
|
2420
2433
|
}
|
|
2421
2434
|
};
|
|
2422
2435
|
L.columnSeparatorChar = " ", L.rowSeparatorChar = `
|
|
2423
2436
|
`;
|
|
2424
|
-
let
|
|
2437
|
+
let W = L;
|
|
2425
2438
|
class dt {
|
|
2426
2439
|
constructor(e, t = 500) {
|
|
2427
|
-
this.tableScope = e, this.debounceDelay = t, new ResizeObserver(
|
|
2440
|
+
this.tableScope = e, this.debounceDelay = t, new ResizeObserver(We(this.handleResize.bind(this), t)).observe(this.tableScope.hostElement);
|
|
2428
2441
|
}
|
|
2429
2442
|
handleResize(e) {
|
|
2430
|
-
const t = e[0], { width:
|
|
2431
|
-
this.tableScope.recalcColumnWidths(
|
|
2443
|
+
const t = e[0], { width: o } = t.contentRect;
|
|
2444
|
+
this.tableScope.recalcColumnWidths(o);
|
|
2432
2445
|
}
|
|
2433
2446
|
}
|
|
2434
2447
|
class ht {
|
|
@@ -2441,23 +2454,23 @@ class ht {
|
|
|
2441
2454
|
* @return {void} Does not return a value.
|
|
2442
2455
|
* @throws {Error} Throws an error if the input matrix is not a valid 2D array or if the filename is an empty string.
|
|
2443
2456
|
*/
|
|
2444
|
-
downloadExcel(e, t = "file.xlsx",
|
|
2445
|
-
if (!Array.isArray(e) || e.some((
|
|
2457
|
+
downloadExcel(e, t = "file.xlsx", o = "") {
|
|
2458
|
+
if (!Array.isArray(e) || e.some((s) => !Array.isArray(s)))
|
|
2446
2459
|
throw new Error("Invalid matrix format. Expected a 2D array.");
|
|
2447
2460
|
if ((t == null ? void 0 : t.trim()) === "")
|
|
2448
2461
|
throw new Error("Invalid filename. Filename must be a non-empty string.");
|
|
2449
2462
|
try {
|
|
2450
|
-
const
|
|
2463
|
+
const s = this.generateBuffer(e, o), i = new Blob([s], {
|
|
2451
2464
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
2452
2465
|
}), a = document.createElement("a");
|
|
2453
2466
|
a.href = URL.createObjectURL(i), a.download = t, document.body.appendChild(a), a.click(), document.body.removeChild(a);
|
|
2454
|
-
} catch (
|
|
2455
|
-
throw console.error("Error generating Excel file:",
|
|
2467
|
+
} catch (s) {
|
|
2468
|
+
throw console.error("Error generating Excel file:", s), new Error("Failed to download Excel file.");
|
|
2456
2469
|
}
|
|
2457
2470
|
}
|
|
2458
2471
|
generateMap(e, t = "") {
|
|
2459
|
-
const
|
|
2460
|
-
<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>`,
|
|
2472
|
+
const o = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2473
|
+
<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>`, s = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2461
2474
|
<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"?>
|
|
2462
2475
|
<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"?>
|
|
2463
2476
|
<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>`, n = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
@@ -2466,7 +2479,7 @@ class ht {
|
|
|
2466
2479
|
<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>`, d = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2467
2480
|
<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>`, p = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2468
2481
|
<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>`, h = /* @__PURE__ */ new Map();
|
|
2469
|
-
return h.set("_rels/.rels",
|
|
2482
|
+
return h.set("_rels/.rels", o), h.set("docProps/app.xml", s), h.set("docProps/core.xml", i), h.set("xl/_rels/workbook.xml.rels", a), h.set("xl/theme/theme1.xml", n), h.set("xl/worksheets/sheet1.xml", this.getX1WorksheetsSheet1Xml(e)), h.set("xl/sharedStrings.xml", l), h.set("xl/styles.xml", c), h.set("xl/workbook.xml", d), h.set("[Content_Types].xml", p), h;
|
|
2470
2483
|
}
|
|
2471
2484
|
getX1WorksheetsSheet1Xml(e) {
|
|
2472
2485
|
const t = [];
|
|
@@ -2477,11 +2490,11 @@ class ht {
|
|
|
2477
2490
|
<sheetView tabSelected="1" workbookViewId="0"/></sheetViews>
|
|
2478
2491
|
<sheetFormatPr baseColWidth="10" defaultRowHeight="16" x14ac:dyDescent="0.2"/>
|
|
2479
2492
|
<sheetData>`);
|
|
2480
|
-
for (let
|
|
2481
|
-
const
|
|
2493
|
+
for (let o = 0; o < e.length; o++) {
|
|
2494
|
+
const s = e[o];
|
|
2482
2495
|
t.push('<row r="${r + 1}" spans="1:2" x14ac:dyDescent="0.2">');
|
|
2483
|
-
for (let i = 0; i <
|
|
2484
|
-
const a =
|
|
2496
|
+
for (let i = 0; i < s.length; i++) {
|
|
2497
|
+
const a = s[i], n = this.getCellAddress(o, i);
|
|
2485
2498
|
if (typeof a == "number")
|
|
2486
2499
|
t.push(`<c r="${n}"><v>${a}</v></c>`);
|
|
2487
2500
|
else if (a instanceof Date) {
|
|
@@ -2501,31 +2514,31 @@ class ht {
|
|
|
2501
2514
|
return e == null ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2502
2515
|
}
|
|
2503
2516
|
getCellAddress(e, t) {
|
|
2504
|
-
const
|
|
2505
|
-
let
|
|
2517
|
+
const o = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
2518
|
+
let s = "";
|
|
2506
2519
|
for (; t >= 0; )
|
|
2507
|
-
|
|
2508
|
-
return `${
|
|
2520
|
+
s = o[t % 26] + s, t = Math.floor(t / 26) - 1;
|
|
2521
|
+
return `${s}${e + 1}`;
|
|
2509
2522
|
}
|
|
2510
2523
|
createZip(e) {
|
|
2511
2524
|
const t = [];
|
|
2512
|
-
let
|
|
2513
|
-
const
|
|
2525
|
+
let o = 0;
|
|
2526
|
+
const s = [];
|
|
2514
2527
|
e.forEach((p, h) => {
|
|
2515
|
-
const m = new TextEncoder().encode(h), g = new TextEncoder().encode(p), b = new Uint8Array(30 + m.length),
|
|
2516
|
-
b.set([80, 75, 3, 4], 0),
|
|
2528
|
+
const m = new TextEncoder().encode(h), g = new TextEncoder().encode(p), b = new Uint8Array(30 + m.length), u = new DataView(b.buffer);
|
|
2529
|
+
b.set([80, 75, 3, 4], 0), u.setUint16(4, 20, !0), u.setUint16(6, 0, !0), u.setUint16(8, 0, !0), u.setUint16(10, 0, !0), u.setUint16(12, 0, !0), u.setUint32(14, 0, !0), u.setUint32(18, g.length, !0), u.setUint32(22, g.length, !0), u.setUint16(26, m.length, !0), u.setUint16(28, 0, !0), b.set(m, 30), t.push(b, g), s.push({
|
|
2517
2530
|
path: h,
|
|
2518
|
-
offset:
|
|
2531
|
+
offset: o,
|
|
2519
2532
|
contentSize: g.length
|
|
2520
|
-
}),
|
|
2533
|
+
}), o += b.length + g.length;
|
|
2521
2534
|
});
|
|
2522
|
-
const i =
|
|
2523
|
-
|
|
2535
|
+
const i = o;
|
|
2536
|
+
s.forEach((p) => {
|
|
2524
2537
|
const h = new TextEncoder().encode(p.path), m = new Uint8Array(46 + h.length), g = new DataView(m.buffer);
|
|
2525
|
-
m.set([80, 75, 1, 2], 0), g.setUint16(4, 20, !0), g.setUint16(6, 20, !0), g.setUint16(8, 0, !0), g.setUint16(10, 0, !0), g.setUint16(12, 0, !0), g.setUint16(14, 0, !0), g.setUint32(16, 0, !0), g.setUint32(20, p.contentSize, !0), g.setUint32(24, p.contentSize, !0), g.setUint16(28, h.length, !0), g.setUint16(30, 0, !0), g.setUint16(32, 0, !0), g.setUint16(34, 0, !0), g.setUint16(36, 0, !0), g.setUint32(38, 0, !0), g.setUint32(42, p.offset, !0), m.set(h, 46), t.push(m),
|
|
2538
|
+
m.set([80, 75, 1, 2], 0), g.setUint16(4, 20, !0), g.setUint16(6, 20, !0), g.setUint16(8, 0, !0), g.setUint16(10, 0, !0), g.setUint16(12, 0, !0), g.setUint16(14, 0, !0), g.setUint32(16, 0, !0), g.setUint32(20, p.contentSize, !0), g.setUint32(24, p.contentSize, !0), g.setUint16(28, h.length, !0), g.setUint16(30, 0, !0), g.setUint16(32, 0, !0), g.setUint16(34, 0, !0), g.setUint16(36, 0, !0), g.setUint32(38, 0, !0), g.setUint32(42, p.offset, !0), m.set(h, 46), t.push(m), o += m.length;
|
|
2526
2539
|
});
|
|
2527
2540
|
const a = new Uint8Array(22), n = new DataView(a.buffer);
|
|
2528
|
-
a.set([80, 75, 5, 6], 0), n.setUint16(4, 0, !0), n.setUint16(6, 0, !0), n.setUint16(8,
|
|
2541
|
+
a.set([80, 75, 5, 6], 0), n.setUint16(4, 0, !0), n.setUint16(6, 0, !0), n.setUint16(8, s.length, !0), n.setUint16(10, s.length, !0), n.setUint32(12, o - i, !0), n.setUint32(16, i, !0), n.setUint16(20, 0, !0), t.push(a);
|
|
2529
2542
|
const l = t.reduce((p, h) => p + h.length, 0), c = new Uint8Array(l);
|
|
2530
2543
|
let d = 0;
|
|
2531
2544
|
for (const p of t)
|
|
@@ -2533,18 +2546,18 @@ class ht {
|
|
|
2533
2546
|
return c;
|
|
2534
2547
|
}
|
|
2535
2548
|
generateBuffer(e, t = "") {
|
|
2536
|
-
const
|
|
2537
|
-
return this.createZip(
|
|
2549
|
+
const o = this.generateMap(e, t);
|
|
2550
|
+
return this.createZip(o);
|
|
2538
2551
|
}
|
|
2539
2552
|
}
|
|
2540
2553
|
class ee extends Je {
|
|
2541
|
-
constructor(e, t,
|
|
2554
|
+
constructor(e, t, o, s, i, a = new W(), n = new ht()) {
|
|
2542
2555
|
var d;
|
|
2543
|
-
if (super(e, t, new
|
|
2556
|
+
if (super(e, t, new $e(o), s), this.eventListener = i, this.copyService = a, this.excelService = n, this.licenseManager = I.getInstance(), this.selectionService = new tt(this), this.api = new ze(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, t.setTableScope(this), i || (this.eventListener = new ae()), (d = this.tableOptions) != null && d.autoRestoreOptions) {
|
|
2544
2557
|
const p = this.tableOptions.autoRestoreOptions, h = p.getStorageKeyFn;
|
|
2545
|
-
h && (p.autoRestoreScrollPosition && (this.storeScrollPosStateService = new
|
|
2558
|
+
h && (p.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Ge(h)), p.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new je(h)), p.autoRestoreSortingState && (this.storeSortingService = new Xe(h)));
|
|
2546
2559
|
}
|
|
2547
|
-
this.mouseHandler = new Ne(this), this.inputHandler = new Qe(this), this.resizeHandler = new dt(this,
|
|
2560
|
+
this.mouseHandler = new Ne(this), this.inputHandler = new Qe(this), this.resizeHandler = new dt(this, s.resizeEventDebounceDelay), this.shortcutService = new it(this), this.shortcutService.addListener(this.selectionService);
|
|
2548
2561
|
const l = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
2549
2562
|
l && l.addEventSelectionChangedListener(this);
|
|
2550
2563
|
const c = this.getFocusModel ? this.getFocusModel() : void 0;
|
|
@@ -2562,8 +2575,8 @@ class ee extends Je {
|
|
|
2562
2575
|
*
|
|
2563
2576
|
* @return {TableScope} - The newly created TableScope instance.
|
|
2564
2577
|
*/
|
|
2565
|
-
static create(e, t,
|
|
2566
|
-
return new ee(e, t, i,
|
|
2578
|
+
static create(e, t, o = new De(), s = new ae(), i = new Te(), a = new W()) {
|
|
2579
|
+
return new ee(e, t, i, o, s, a);
|
|
2567
2580
|
}
|
|
2568
2581
|
/**
|
|
2569
2582
|
* Triggers an action based on the provided actionId.
|
|
@@ -2579,19 +2592,19 @@ class ee extends Je {
|
|
|
2579
2592
|
if (e === "START_EDITING" && this.getFocusModel) {
|
|
2580
2593
|
const t = this.getFocusModel();
|
|
2581
2594
|
if (t) {
|
|
2582
|
-
const [
|
|
2583
|
-
this.tableModel.getBodyModel().isEditable(
|
|
2595
|
+
const [o, s] = t.getFocus();
|
|
2596
|
+
this.tableModel.getBodyModel().isEditable(o, s) && (this.clearSelection(), this.initRenderEditor(o, s));
|
|
2584
2597
|
}
|
|
2585
2598
|
return !0;
|
|
2586
2599
|
}
|
|
2587
2600
|
if (e === "COPY_2_CLIPBOARD") {
|
|
2588
|
-
const t = this.getSelectionModel ? this.getSelectionModel() : void 0,
|
|
2589
|
-
this.copyService.createContent(this.tableModel, t,
|
|
2601
|
+
const t = this.getSelectionModel ? this.getSelectionModel() : void 0, o = this.getFocusModel ? this.getFocusModel() : void 0;
|
|
2602
|
+
this.copyService.createContent(this.tableModel, t, o).then((s) => this.copyService.copyContent(s));
|
|
2590
2603
|
}
|
|
2591
2604
|
return !1;
|
|
2592
2605
|
}
|
|
2593
|
-
updateModelValueAfterEdit(e, t,
|
|
2594
|
-
e === "body" && this.tableModel.getAreaModel(e).setValue(t,
|
|
2606
|
+
updateModelValueAfterEdit(e, t, o, s) {
|
|
2607
|
+
e === "body" && this.tableModel.getAreaModel(e).setValue(t, o, s) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(Q.createSingle(t, o)), this.hostElement.focus());
|
|
2595
2608
|
}
|
|
2596
2609
|
/**
|
|
2597
2610
|
* Retrieves the TableApi object.
|
|
@@ -2622,14 +2635,14 @@ class ee extends Je {
|
|
|
2622
2635
|
createGeMouseEvent(e) {
|
|
2623
2636
|
const t = new q();
|
|
2624
2637
|
if (t.originalEvent = e, e) {
|
|
2625
|
-
const
|
|
2626
|
-
if ([t.areaIdent, t.sideIdent] = this.getAreaAndSideIdentByAttr(
|
|
2627
|
-
const
|
|
2628
|
-
t.rowTop =
|
|
2638
|
+
const o = e.target;
|
|
2639
|
+
if ([t.areaIdent, t.sideIdent] = this.getAreaAndSideIdentByAttr(o), t.rowIndex = this.getNumberByAttr(o, "data-row-index"), t.columnIndex = this.getNumberByAttr(o, "data-col-index"), t.action = this.getStringByAttr(o, "data-ge-action"), t.areaIdent) {
|
|
2640
|
+
const s = this.tableModel.getAreaModel(t.areaIdent);
|
|
2641
|
+
t.rowTop = s.getYPosByRowIndex(t.rowIndex);
|
|
2629
2642
|
}
|
|
2630
2643
|
if (t.columnLeft = this.tableModel.getXPosByColumnIndex(t.columnIndex), e.ctrlKey && e.altKey) {
|
|
2631
|
-
const
|
|
2632
|
-
this.debugOnce(i,
|
|
2644
|
+
const s = e.clientY - this.hostElement.offsetTop - this.areaHeaderCenter.parent.clientHeight, i = e.clientX - this.hostElement.offsetLeft - this.areaBodyWestGeo.width;
|
|
2645
|
+
this.debugOnce(i, s);
|
|
2633
2646
|
}
|
|
2634
2647
|
}
|
|
2635
2648
|
return t;
|
|
@@ -2688,9 +2701,9 @@ class ee extends Je {
|
|
|
2688
2701
|
* @return {void}
|
|
2689
2702
|
*/
|
|
2690
2703
|
toggleExpandCollapseAll(e = !0) {
|
|
2691
|
-
var
|
|
2704
|
+
var o;
|
|
2692
2705
|
const t = this.tableModel.getBodyModel();
|
|
2693
|
-
K(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (
|
|
2706
|
+
K(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (o = this.storeStateCollapsedExpandService) == null || o.collapsedStateAll(e));
|
|
2694
2707
|
}
|
|
2695
2708
|
/**
|
|
2696
2709
|
* Toggles the checkbox state of a specific row in a table.
|
|
@@ -2701,11 +2714,11 @@ class ee extends Je {
|
|
|
2701
2714
|
*
|
|
2702
2715
|
* @return {void} - This method does not return anything.
|
|
2703
2716
|
*/
|
|
2704
|
-
toggleRowCheckbox(e, t,
|
|
2717
|
+
toggleRowCheckbox(e, t, o) {
|
|
2705
2718
|
var l;
|
|
2706
|
-
const
|
|
2707
|
-
|
|
2708
|
-
const n = (l =
|
|
2719
|
+
const s = this.tableModel.getAreaModel(o), i = s.isRowChecked(e), a = i === void 0 || i === "semi" || i === "none";
|
|
2720
|
+
s.setRowChecked(e, a), this.repaint();
|
|
2721
|
+
const n = (l = s.rowSelectionModel) == null ? void 0 : l.getCheckedRows();
|
|
2709
2722
|
this.eventListener.onCheckboxChanged(n || []);
|
|
2710
2723
|
}
|
|
2711
2724
|
/**
|
|
@@ -2716,13 +2729,13 @@ class ee extends Je {
|
|
|
2716
2729
|
* @returns {void}
|
|
2717
2730
|
*/
|
|
2718
2731
|
onMouseClicked(e, t) {
|
|
2719
|
-
let
|
|
2720
|
-
if (!
|
|
2732
|
+
let o = this.selectionService.onMouseClicked(e, t);
|
|
2733
|
+
if (!o && this.getFocusModel) {
|
|
2721
2734
|
this.resetEditorRenderer();
|
|
2722
|
-
const
|
|
2723
|
-
|
|
2735
|
+
const s = this.getFocusModel();
|
|
2736
|
+
s && (o = s.hasChanged(), s.clearChanged());
|
|
2724
2737
|
}
|
|
2725
|
-
return
|
|
2738
|
+
return o;
|
|
2726
2739
|
}
|
|
2727
2740
|
debounceRepaint() {
|
|
2728
2741
|
this.debounce(this.repaint.bind(this), 1);
|
|
@@ -2755,13 +2768,13 @@ class ee extends Je {
|
|
|
2755
2768
|
*
|
|
2756
2769
|
* @return {void}
|
|
2757
2770
|
*/
|
|
2758
|
-
onHeaderDblClicked(e, t,
|
|
2771
|
+
onHeaderDblClicked(e, t, o) {
|
|
2759
2772
|
var i, a;
|
|
2760
|
-
const
|
|
2761
|
-
if (
|
|
2773
|
+
const s = this.tableModel.getColumnDef(o);
|
|
2774
|
+
if (s != null && s.sortable && s.sortable()) {
|
|
2762
2775
|
e.preventDefault(), e.stopPropagation();
|
|
2763
|
-
const n =
|
|
2764
|
-
this.tableModel.doSort([d]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((h) => h.sortState = ""),
|
|
2776
|
+
const n = s.sortStatesOrder ? s.sortStatesOrder : this.tableOptions.sortOrder, l = s.sortState ?? "", c = n[(n.indexOf(l) + 1) % n.length], d = new Ze(o, c);
|
|
2777
|
+
this.tableModel.doSort([d]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((h) => h.sortState = ""), s.sortState = c), this.repaint(), (a = this.storeSortingService) == null || a.setSortItems([d]);
|
|
2765
2778
|
}
|
|
2766
2779
|
}
|
|
2767
2780
|
/**
|
|
@@ -2783,8 +2796,8 @@ class ee extends Je {
|
|
|
2783
2796
|
* @return {void}
|
|
2784
2797
|
*/
|
|
2785
2798
|
scrollToIndex(e, t) {
|
|
2786
|
-
const
|
|
2787
|
-
this.scrollToPixel(0,
|
|
2799
|
+
const s = this.tableModel.getAreaModel("body").getYPosByRowIndex(t);
|
|
2800
|
+
this.scrollToPixel(0, s);
|
|
2788
2801
|
}
|
|
2789
2802
|
/**
|
|
2790
2803
|
* Sets the selection model for the table.
|
|
@@ -2795,8 +2808,8 @@ class ee extends Je {
|
|
|
2795
2808
|
* @return {void} - This method does not return any value.
|
|
2796
2809
|
*/
|
|
2797
2810
|
setSelectionModel(e, t = !1) {
|
|
2798
|
-
const
|
|
2799
|
-
this.tableOptions.getSelectionModel =
|
|
2811
|
+
const o = () => e;
|
|
2812
|
+
this.tableOptions.getSelectionModel = o, this.getSelectionModel = o, this.selectionService.getSelectionModel = o, t && this.repaint();
|
|
2800
2813
|
}
|
|
2801
2814
|
toggleHeaderGroup(e) {
|
|
2802
2815
|
const t = this.tableModel.getAreaModel("header");
|
|
@@ -2831,10 +2844,10 @@ class ee extends Je {
|
|
|
2831
2844
|
*/
|
|
2832
2845
|
changeFocusCell(e, t) {
|
|
2833
2846
|
if (!this.isEditing() && this.getFocusModel) {
|
|
2834
|
-
const
|
|
2835
|
-
if (
|
|
2836
|
-
const [
|
|
2837
|
-
return
|
|
2847
|
+
const o = this.getFocusModel();
|
|
2848
|
+
if (o) {
|
|
2849
|
+
const [s, i] = o.getFocus();
|
|
2850
|
+
return o.setFocus(s + t, i + e), this.repaint(), !0;
|
|
2838
2851
|
}
|
|
2839
2852
|
}
|
|
2840
2853
|
return !1;
|
|
@@ -2857,8 +2870,8 @@ class ee extends Je {
|
|
|
2857
2870
|
this.getSelectionModel && ((e = this.getSelectionModel()) == null || e.clear());
|
|
2858
2871
|
}
|
|
2859
2872
|
debugOnce(e, t) {
|
|
2860
|
-
var
|
|
2861
|
-
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", (
|
|
2873
|
+
var o;
|
|
2874
|
+
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", (o = this.mouseHandler.mouseEvent) == null ? void 0 : o.clientX), console.info("this.hostElement.offsetLeft", this.hostElement.offsetLeft), console.info("this.areaBodyWestGeo.width", this.areaBodyWestGeo.width);
|
|
2862
2875
|
}
|
|
2863
2876
|
/**
|
|
2864
2877
|
* Restores the scroll position of the table if auto restore options are enabled.
|
|
@@ -2869,8 +2882,8 @@ class ee extends Je {
|
|
|
2869
2882
|
autoRestoreScrollPosition() {
|
|
2870
2883
|
var e;
|
|
2871
2884
|
if ((e = this.tableOptions) != null && e.autoRestoreOptions && this.storeScrollPosStateService && this.tableOptions.autoRestoreOptions.autoRestoreScrollPosition) {
|
|
2872
|
-
const
|
|
2873
|
-
|
|
2885
|
+
const o = this.storeScrollPosStateService.getScrollOffset();
|
|
2886
|
+
o && this.scrollViewport.scrollTo(...o);
|
|
2874
2887
|
}
|
|
2875
2888
|
}
|
|
2876
2889
|
/**
|
|
@@ -2890,8 +2903,8 @@ class ee extends Je {
|
|
|
2890
2903
|
autoRestoreSortingState() {
|
|
2891
2904
|
var e, t;
|
|
2892
2905
|
if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.autoRestoreSortingState && this.storeSortingService) {
|
|
2893
|
-
const
|
|
2894
|
-
|
|
2906
|
+
const o = this.storeSortingService.getSortItems();
|
|
2907
|
+
o != null && o.length && this.tableModel.getBodyModel().doSort(o);
|
|
2895
2908
|
}
|
|
2896
2909
|
}
|
|
2897
2910
|
/**
|
|
@@ -2903,8 +2916,8 @@ class ee extends Je {
|
|
|
2903
2916
|
autoRestoreCollapsedExpandedState() {
|
|
2904
2917
|
var e, t;
|
|
2905
2918
|
if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.getRowId && this.storeStateCollapsedExpandService) {
|
|
2906
|
-
const
|
|
2907
|
-
if (
|
|
2919
|
+
const o = this.tableOptions.autoRestoreOptions, s = o.getRowId;
|
|
2920
|
+
if (o.autoRestoreCollapsedExpandedState && s) {
|
|
2908
2921
|
const i = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), a = this.tableModel.getAreaModel("body");
|
|
2909
2922
|
if (K(a)) {
|
|
2910
2923
|
const n = a, l = a.getRowCount();
|
|
@@ -2916,7 +2929,7 @@ class ee extends Je {
|
|
|
2916
2929
|
else if (i.allCollapsed)
|
|
2917
2930
|
d.expanded = !1;
|
|
2918
2931
|
else {
|
|
2919
|
-
const p =
|
|
2932
|
+
const p = s(d.data);
|
|
2920
2933
|
i.mode === "expanded" ? d.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(p) : i.mode === "collapsed" && (d.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(p));
|
|
2921
2934
|
}
|
|
2922
2935
|
}
|
|
@@ -2925,10 +2938,36 @@ class ee extends Je {
|
|
|
2925
2938
|
}
|
|
2926
2939
|
}
|
|
2927
2940
|
}
|
|
2941
|
+
calcAutoColumnWidths() {
|
|
2942
|
+
const e = this.tableModel.getBodyModel(), t = this.tableModel.getColumnCount(), o = (e == null ? void 0 : e.getRowCount()) ?? 0;
|
|
2943
|
+
if (!e)
|
|
2944
|
+
return console.warn("Body model is not available."), [];
|
|
2945
|
+
const s = new Array(t).fill(0);
|
|
2946
|
+
for (let i = 0; i < o; i++)
|
|
2947
|
+
for (let a = 0; a < t; a++) {
|
|
2948
|
+
const n = e.getValueAt(i, a), l = (n == null ? void 0 : n.toString().length) || 0;
|
|
2949
|
+
l > s[a] && (s[a] = l);
|
|
2950
|
+
}
|
|
2951
|
+
return s.map((i) => Math.max(i * 10, 50));
|
|
2952
|
+
}
|
|
2953
|
+
setColumnWidth(e, t) {
|
|
2954
|
+
this.tableModel.setColumnWidth(e, t);
|
|
2955
|
+
}
|
|
2956
|
+
autoResizeColumns(e = !0) {
|
|
2957
|
+
const t = this.calcAutoColumnWidths();
|
|
2958
|
+
for (let o = 0; o < t.length; o++) {
|
|
2959
|
+
const s = t[o];
|
|
2960
|
+
this.tableModel.setColumnWidth(o, s);
|
|
2961
|
+
}
|
|
2962
|
+
e && this.recalcWrappers();
|
|
2963
|
+
}
|
|
2964
|
+
recalcWrappers() {
|
|
2965
|
+
this.tableModel.recalcPadding(), this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows();
|
|
2966
|
+
}
|
|
2928
2967
|
}
|
|
2929
|
-
const
|
|
2968
|
+
const $ = class $ {
|
|
2930
2969
|
};
|
|
2931
|
-
|
|
2970
|
+
$.themes = ["light", "combat", "paper", "blackboard"], $.vars = {
|
|
2932
2971
|
light: `html[data-theme="light"] {
|
|
2933
2972
|
--ge-table-bg: rgba(255,255,255, 0.5);
|
|
2934
2973
|
--ge-table-header-west-bg: rgba(233, 233, 233, 0.5);
|
|
@@ -3162,41 +3201,41 @@ W.themes = ["light", "combat", "paper", "blackboard"], W.vars = {
|
|
|
3162
3201
|
--ge-table-drop-zone-bg: #758129;
|
|
3163
3202
|
}`
|
|
3164
3203
|
};
|
|
3165
|
-
let re =
|
|
3204
|
+
let re = $;
|
|
3166
3205
|
const V = class V {
|
|
3167
3206
|
constructor(e = new Re()) {
|
|
3168
3207
|
this.headerGroupOptions = e;
|
|
3169
3208
|
}
|
|
3170
|
-
render(e, t,
|
|
3209
|
+
render(e, t, o, s, i, a, n) {
|
|
3171
3210
|
const l = a != null && a.data ? a.data : "";
|
|
3172
3211
|
if (a) {
|
|
3173
3212
|
const { toggle: c, visibility: d, closed: p } = a, h = c ? V.toggleHeaderGroup : "";
|
|
3174
|
-
this.addText(e,
|
|
3213
|
+
this.addText(e, s, t, o, l, h), c && d !== "always" && this.addArrowDiv(n, e, !p, t, o, s, h);
|
|
3175
3214
|
} else
|
|
3176
|
-
this.addText(e,
|
|
3215
|
+
this.addText(e, s, t, o, l, "");
|
|
3177
3216
|
}
|
|
3178
|
-
addText(e, t,
|
|
3217
|
+
addText(e, t, o, s, i, a) {
|
|
3179
3218
|
e.innerHTML = `<span
|
|
3180
3219
|
data-ge-action="${a}"
|
|
3181
3220
|
data-area="${t}"
|
|
3182
|
-
data-row-index="${
|
|
3183
|
-
data-col-index="${
|
|
3221
|
+
data-row-index="${o}"
|
|
3222
|
+
data-col-index="${s}"
|
|
3184
3223
|
>${i}</span>`;
|
|
3185
3224
|
}
|
|
3186
|
-
addArrowDiv(e, t,
|
|
3225
|
+
addArrowDiv(e, t, o = !0, s = -1, i = -1, a = "header", n) {
|
|
3187
3226
|
const l = e.createElement("div");
|
|
3188
|
-
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", `${
|
|
3227
|
+
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", `${s}`), e.setAttribute(l, "data-col-index", `${i}`), e.setAttribute(l, "data-area", `${a}`), e.setAttribute(l, "data-ge-action", `${n}`);
|
|
3189
3228
|
let c;
|
|
3190
|
-
|
|
3229
|
+
o ? c = this.headerGroupOptions.iconExpanded : c = this.headerGroupOptions.iconCollapsed;
|
|
3191
3230
|
const d = c.content, p = e.createText(d);
|
|
3192
3231
|
e.appendChild(l, p), c.style && this.applyStyleString(e, l, c.style);
|
|
3193
3232
|
for (const h of c.classes)
|
|
3194
3233
|
e.addClass(l, h);
|
|
3195
3234
|
return e.appendChild(t, l), l;
|
|
3196
3235
|
}
|
|
3197
|
-
applyStyleString(e, t,
|
|
3198
|
-
const
|
|
3199
|
-
for (const i of
|
|
3236
|
+
applyStyleString(e, t, o) {
|
|
3237
|
+
const s = o.split(";").map((i) => i.trim()).filter((i) => i);
|
|
3238
|
+
for (const i of s) {
|
|
3200
3239
|
const [a, n] = i.split(":");
|
|
3201
3240
|
e.setStyle(t, a.trim(), n.trim());
|
|
3202
3241
|
}
|
|
@@ -3207,7 +3246,7 @@ let le = V;
|
|
|
3207
3246
|
class Ft extends O {
|
|
3208
3247
|
constructor(t) {
|
|
3209
3248
|
super(t);
|
|
3210
|
-
|
|
3249
|
+
oe(this, "ref", Pe());
|
|
3211
3250
|
}
|
|
3212
3251
|
componentDidMount() {
|
|
3213
3252
|
const t = this.ref.current;
|
|
@@ -3215,36 +3254,36 @@ class Ft extends O {
|
|
|
3215
3254
|
}
|
|
3216
3255
|
componentWillUnmount() {
|
|
3217
3256
|
}
|
|
3218
|
-
initTable(t,
|
|
3219
|
-
const
|
|
3257
|
+
initTable(t, o) {
|
|
3258
|
+
const s = {
|
|
3220
3259
|
onSelectionChanged(a) {
|
|
3221
|
-
|
|
3260
|
+
o.selectionChanged && o.selectionChanged(a);
|
|
3222
3261
|
},
|
|
3223
3262
|
onFocusChanged(a) {
|
|
3224
|
-
|
|
3263
|
+
o.focusChanged && o.focusChanged(a);
|
|
3225
3264
|
},
|
|
3226
3265
|
onCheckboxChanged: (a) => {
|
|
3227
|
-
|
|
3266
|
+
o.checkboxChanged && o.checkboxChanged(a);
|
|
3228
3267
|
},
|
|
3229
3268
|
onContextmenu: (a) => {
|
|
3230
|
-
|
|
3269
|
+
o.contextmenu && o.contextmenu(a);
|
|
3231
3270
|
},
|
|
3232
3271
|
onModelChanged: (a) => {
|
|
3233
|
-
|
|
3272
|
+
o.modelChanged && o.modelChanged(a);
|
|
3234
3273
|
},
|
|
3235
3274
|
onMouseClicked: (a) => {
|
|
3236
|
-
|
|
3275
|
+
o.mouseClicked && o.mouseClicked(a);
|
|
3237
3276
|
},
|
|
3238
3277
|
onMouseDragging: (a) => {
|
|
3239
|
-
|
|
3278
|
+
o.mouseDragging && o.mouseDragging(a);
|
|
3240
3279
|
},
|
|
3241
3280
|
onMouseDraggingEnd: (a) => {
|
|
3242
|
-
|
|
3281
|
+
o.mouseDraggingEnd && o.mouseDraggingEnd(a);
|
|
3243
3282
|
},
|
|
3244
3283
|
onMouseMoved: (a) => {
|
|
3245
3284
|
}
|
|
3246
|
-
}, i = new ee(t,
|
|
3247
|
-
i.firstInit(),
|
|
3285
|
+
}, i = new ee(t, o.tableModel, new Te(), o.tableOptions ?? new De(), s);
|
|
3286
|
+
i.firstInit(), o.tableReady && o.tableReady(i.getApi()), o.licenseKey && I.getInstance().setLicenseKey(o.licenseKey);
|
|
3248
3287
|
}
|
|
3249
3288
|
render() {
|
|
3250
3289
|
return He("div", {
|
|
@@ -3260,7 +3299,7 @@ class Ft extends O {
|
|
|
3260
3299
|
});
|
|
3261
3300
|
}
|
|
3262
3301
|
}
|
|
3263
|
-
var D,
|
|
3302
|
+
var D, z, ne, ke = [], G = [], E = A, ce = E.__b, de = E.__r, he = E.diffed, pe = E.__c, ge = E.unmount, ue = E.__;
|
|
3264
3303
|
function pt() {
|
|
3265
3304
|
for (var r; r = ke.shift(); )
|
|
3266
3305
|
if (r.__P && r.__H)
|
|
@@ -3273,48 +3312,48 @@ function pt() {
|
|
|
3273
3312
|
E.__b = function(r) {
|
|
3274
3313
|
D = null, ce && ce(r);
|
|
3275
3314
|
}, E.__ = function(r, e) {
|
|
3276
|
-
e.__k && e.__k.__m && (r.__m = e.__k.__m),
|
|
3315
|
+
e.__k && e.__k.__m && (r.__m = e.__k.__m), ue && ue(r, e);
|
|
3277
3316
|
}, E.__r = function(r) {
|
|
3278
3317
|
de && de(r);
|
|
3279
3318
|
var e = (D = r.__c).__H;
|
|
3280
|
-
e && (
|
|
3281
|
-
t.__N && (t.__ = t.__N), t.__V =
|
|
3282
|
-
})) : (e.__h.forEach(H), e.__h.forEach(Y), e.__h = [])),
|
|
3319
|
+
e && (z === D ? (e.__h = [], D.__h = [], e.__.forEach(function(t) {
|
|
3320
|
+
t.__N && (t.__ = t.__N), t.__V = G, t.__N = t.i = void 0;
|
|
3321
|
+
})) : (e.__h.forEach(H), e.__h.forEach(Y), e.__h = [])), z = D;
|
|
3283
3322
|
}, E.diffed = function(r) {
|
|
3284
3323
|
he && he(r);
|
|
3285
3324
|
var e = r.__c;
|
|
3286
3325
|
e && e.__H && (e.__H.__h.length && (ke.push(e) !== 1 && ne === E.requestAnimationFrame || ((ne = E.requestAnimationFrame) || gt)(pt)), e.__H.__.forEach(function(t) {
|
|
3287
|
-
t.i && (t.__H = t.i), t.__V !==
|
|
3288
|
-
})),
|
|
3326
|
+
t.i && (t.__H = t.i), t.__V !== G && (t.__ = t.__V), t.i = void 0, t.__V = G;
|
|
3327
|
+
})), z = D = null;
|
|
3289
3328
|
}, E.__c = function(r, e) {
|
|
3290
3329
|
e.some(function(t) {
|
|
3291
3330
|
try {
|
|
3292
|
-
t.__h.forEach(H), t.__h = t.__h.filter(function(
|
|
3293
|
-
return !
|
|
3331
|
+
t.__h.forEach(H), t.__h = t.__h.filter(function(o) {
|
|
3332
|
+
return !o.__ || Y(o);
|
|
3294
3333
|
});
|
|
3295
|
-
} catch (
|
|
3296
|
-
e.some(function(
|
|
3297
|
-
|
|
3298
|
-
}), e = [], E.__e(
|
|
3334
|
+
} catch (o) {
|
|
3335
|
+
e.some(function(s) {
|
|
3336
|
+
s.__h && (s.__h = []);
|
|
3337
|
+
}), e = [], E.__e(o, t.__v);
|
|
3299
3338
|
}
|
|
3300
3339
|
}), pe && pe(r, e);
|
|
3301
3340
|
}, E.unmount = function(r) {
|
|
3302
3341
|
ge && ge(r);
|
|
3303
3342
|
var e, t = r.__c;
|
|
3304
|
-
t && t.__H && (t.__H.__.forEach(function(
|
|
3343
|
+
t && t.__H && (t.__H.__.forEach(function(o) {
|
|
3305
3344
|
try {
|
|
3306
|
-
H(
|
|
3307
|
-
} catch (
|
|
3308
|
-
e =
|
|
3345
|
+
H(o);
|
|
3346
|
+
} catch (s) {
|
|
3347
|
+
e = s;
|
|
3309
3348
|
}
|
|
3310
3349
|
}), t.__H = void 0, e && E.__e(e, t.__v));
|
|
3311
3350
|
};
|
|
3312
|
-
var
|
|
3351
|
+
var fe = typeof requestAnimationFrame == "function";
|
|
3313
3352
|
function gt(r) {
|
|
3314
3353
|
var e, t = function() {
|
|
3315
|
-
clearTimeout(
|
|
3316
|
-
},
|
|
3317
|
-
|
|
3354
|
+
clearTimeout(o), fe && cancelAnimationFrame(e), setTimeout(r);
|
|
3355
|
+
}, o = setTimeout(t, 100);
|
|
3356
|
+
fe && (e = requestAnimationFrame(t));
|
|
3318
3357
|
}
|
|
3319
3358
|
function H(r) {
|
|
3320
3359
|
var e = D, t = r.__c;
|
|
@@ -3324,7 +3363,7 @@ function Y(r) {
|
|
|
3324
3363
|
var e = D;
|
|
3325
3364
|
r.__c = r.__(), D = e;
|
|
3326
3365
|
}
|
|
3327
|
-
function
|
|
3366
|
+
function ut(r, e) {
|
|
3328
3367
|
for (var t in e)
|
|
3329
3368
|
r[t] = e[t];
|
|
3330
3369
|
return r;
|
|
@@ -3333,8 +3372,8 @@ function me(r, e) {
|
|
|
3333
3372
|
for (var t in r)
|
|
3334
3373
|
if (t !== "__source" && !(t in e))
|
|
3335
3374
|
return !0;
|
|
3336
|
-
for (var
|
|
3337
|
-
if (
|
|
3375
|
+
for (var o in e)
|
|
3376
|
+
if (o !== "__source" && r[o] !== e[o])
|
|
3338
3377
|
return !0;
|
|
3339
3378
|
return !1;
|
|
3340
3379
|
}
|
|
@@ -3348,26 +3387,26 @@ var Se = A.__b;
|
|
|
3348
3387
|
A.__b = function(r) {
|
|
3349
3388
|
r.type && r.type.__f && r.ref && (r.props.ref = r.ref, r.ref = null), Se && Se(r);
|
|
3350
3389
|
};
|
|
3351
|
-
var
|
|
3352
|
-
A.__e = function(r, e, t,
|
|
3390
|
+
var ft = A.__e;
|
|
3391
|
+
A.__e = function(r, e, t, o) {
|
|
3353
3392
|
if (r.then) {
|
|
3354
|
-
for (var
|
|
3355
|
-
if ((
|
|
3356
|
-
return e.__e == null && (e.__e = t.__e, e.__k = t.__k),
|
|
3393
|
+
for (var s, i = e; i = i.__; )
|
|
3394
|
+
if ((s = i.__c) && s.__c)
|
|
3395
|
+
return e.__e == null && (e.__e = t.__e, e.__k = t.__k), s.__c(r, e);
|
|
3357
3396
|
}
|
|
3358
|
-
|
|
3397
|
+
ft(r, e, t, o);
|
|
3359
3398
|
};
|
|
3360
3399
|
var ye = A.unmount;
|
|
3361
3400
|
function Fe(r, e, t) {
|
|
3362
|
-
return r && (r.__c && r.__c.__H && (r.__c.__H.__.forEach(function(
|
|
3363
|
-
typeof
|
|
3364
|
-
}), r.__c.__H = null), (r =
|
|
3365
|
-
return Fe(
|
|
3401
|
+
return r && (r.__c && r.__c.__H && (r.__c.__H.__.forEach(function(o) {
|
|
3402
|
+
typeof o.__c == "function" && o.__c();
|
|
3403
|
+
}), r.__c.__H = null), (r = ut({}, r)).__c != null && (r.__c.__P === t && (r.__c.__P = e), r.__c = null), r.__k = r.__k && r.__k.map(function(o) {
|
|
3404
|
+
return Fe(o, e, t);
|
|
3366
3405
|
})), r;
|
|
3367
3406
|
}
|
|
3368
3407
|
function Ie(r, e, t) {
|
|
3369
|
-
return r && t && (r.__v = null, r.__k = r.__k && r.__k.map(function(
|
|
3370
|
-
return Ie(
|
|
3408
|
+
return r && t && (r.__v = null, r.__k = r.__k && r.__k.map(function(o) {
|
|
3409
|
+
return Ie(o, e, t);
|
|
3371
3410
|
}), r.__c && r.__c.__P === e && (r.__e && t.appendChild(r.__e), r.__c.__e = !0, r.__c.__P = t)), r;
|
|
3372
3411
|
}
|
|
3373
3412
|
function U() {
|
|
@@ -3384,36 +3423,36 @@ A.unmount = function(r) {
|
|
|
3384
3423
|
var e = r.__c;
|
|
3385
3424
|
e && e.__R && e.__R(), e && 32 & r.__u && (r.type = null), ye && ye(r);
|
|
3386
3425
|
}, (U.prototype = new O()).__c = function(r, e) {
|
|
3387
|
-
var t = e.__c,
|
|
3388
|
-
|
|
3389
|
-
var
|
|
3390
|
-
i || (i = !0, t.__R = null,
|
|
3426
|
+
var t = e.__c, o = this;
|
|
3427
|
+
o.t == null && (o.t = []), o.t.push(t);
|
|
3428
|
+
var s = Le(o.__v), i = !1, a = function() {
|
|
3429
|
+
i || (i = !0, t.__R = null, s ? s(n) : n());
|
|
3391
3430
|
};
|
|
3392
3431
|
t.__R = a;
|
|
3393
3432
|
var n = function() {
|
|
3394
|
-
if (!--
|
|
3395
|
-
if (
|
|
3396
|
-
var l =
|
|
3397
|
-
|
|
3433
|
+
if (!--o.__u) {
|
|
3434
|
+
if (o.state.__a) {
|
|
3435
|
+
var l = o.state.__a;
|
|
3436
|
+
o.__v.__k[0] = Ie(l, l.__c.__P, l.__c.__O);
|
|
3398
3437
|
}
|
|
3399
3438
|
var c;
|
|
3400
|
-
for (
|
|
3439
|
+
for (o.setState({ __a: o.__b = null }); c = o.t.pop(); )
|
|
3401
3440
|
c.forceUpdate();
|
|
3402
3441
|
}
|
|
3403
3442
|
};
|
|
3404
|
-
|
|
3443
|
+
o.__u++ || 32 & e.__u || o.setState({ __a: o.__b = o.__v.__k[0] }), r.then(a, a);
|
|
3405
3444
|
}, U.prototype.componentWillUnmount = function() {
|
|
3406
3445
|
this.t = [];
|
|
3407
3446
|
}, U.prototype.render = function(r, e) {
|
|
3408
3447
|
if (this.__b) {
|
|
3409
3448
|
if (this.__v.__k) {
|
|
3410
|
-
var t = document.createElement("div"),
|
|
3411
|
-
this.__v.__k[0] = Fe(this.__b, t,
|
|
3449
|
+
var t = document.createElement("div"), o = this.__v.__k[0].__c;
|
|
3450
|
+
this.__v.__k[0] = Fe(this.__b, t, o.__O = o.__P);
|
|
3412
3451
|
}
|
|
3413
3452
|
this.__b = null;
|
|
3414
3453
|
}
|
|
3415
|
-
var
|
|
3416
|
-
return
|
|
3454
|
+
var s = e.__a && se(ie, null, r.fallback);
|
|
3455
|
+
return s && (s.__u &= -33), [se(ie, null, e.__a ? null : r.children), s];
|
|
3417
3456
|
};
|
|
3418
3457
|
var ve = function(r, e, t) {
|
|
3419
3458
|
if (++t[1] === t[0] && r.o.delete(e), r.props.revealOrder && (r.props.revealOrder[0] !== "t" || !r.o.size))
|
|
@@ -3426,10 +3465,10 @@ var ve = function(r, e, t) {
|
|
|
3426
3465
|
}
|
|
3427
3466
|
};
|
|
3428
3467
|
(P.prototype = new O()).__a = function(r) {
|
|
3429
|
-
var e = this, t = Le(e.__v),
|
|
3430
|
-
return
|
|
3468
|
+
var e = this, t = Le(e.__v), o = e.o.get(r);
|
|
3469
|
+
return o[0]++, function(s) {
|
|
3431
3470
|
var i = function() {
|
|
3432
|
-
e.props.revealOrder ? (
|
|
3471
|
+
e.props.revealOrder ? (o.push(s), ve(e, r, o)) : s();
|
|
3433
3472
|
};
|
|
3434
3473
|
t ? t(i) : i();
|
|
3435
3474
|
};
|
|
@@ -3476,19 +3515,19 @@ var At = { enumerable: !1, configurable: !0, get: function() {
|
|
|
3476
3515
|
} }, Ce = A.vnode;
|
|
3477
3516
|
A.vnode = function(r) {
|
|
3478
3517
|
typeof r.type == "string" && function(e) {
|
|
3479
|
-
var t = e.props,
|
|
3518
|
+
var t = e.props, o = e.type, s = {};
|
|
3480
3519
|
for (var i in t) {
|
|
3481
3520
|
var a = t[i];
|
|
3482
|
-
if (!(i === "value" && "defaultValue" in t && a == null || vt && i === "children" &&
|
|
3521
|
+
if (!(i === "value" && "defaultValue" in t && a == null || vt && i === "children" && o === "noscript" || i === "class" || i === "className")) {
|
|
3483
3522
|
var n = i.toLowerCase();
|
|
3484
|
-
i === "defaultValue" && "value" in t && t.value == null ? i = "value" : i === "download" && a === !0 ? a = "" : n === "ondoubleclick" ? i = "ondblclick" : n !== "onchange" ||
|
|
3523
|
+
i === "defaultValue" && "value" in t && t.value == null ? i = "value" : i === "download" && a === !0 ? a = "" : n === "ondoubleclick" ? i = "ondblclick" : n !== "onchange" || o !== "input" && o !== "textarea" || xt(t.type) ? n === "onfocus" ? i = "onfocusin" : n === "onblur" ? i = "onfocusout" : St.test(i) ? i = n : o.indexOf("-") === -1 && bt.test(i) ? i = i.replace(yt, "-$&").toLowerCase() : a === null && (a = void 0) : n = i = "oninput", n === "oninput" && s[i = n] && (i = "oninputCapture"), s[i] = a;
|
|
3485
3524
|
}
|
|
3486
3525
|
}
|
|
3487
|
-
|
|
3488
|
-
l.props.selected =
|
|
3489
|
-
})),
|
|
3490
|
-
l.props.selected =
|
|
3491
|
-
})), t.class && !t.className ? (
|
|
3526
|
+
o == "select" && s.multiple && Array.isArray(s.value) && (s.value = j(t.children).forEach(function(l) {
|
|
3527
|
+
l.props.selected = s.value.indexOf(l.props.value) != -1;
|
|
3528
|
+
})), o == "select" && s.defaultValue != null && (s.value = j(t.children).forEach(function(l) {
|
|
3529
|
+
l.props.selected = s.multiple ? s.defaultValue.indexOf(l.props.value) != -1 : s.defaultValue == l.props.value;
|
|
3530
|
+
})), t.class && !t.className ? (s.class = t.class, Object.defineProperty(s, "className", At)) : (t.className && !t.class || t.class && t.className) && (s.class = s.className = t.className), e.props = s;
|
|
3492
3531
|
}(r), r.$$typeof = mt, Ce && Ce(r);
|
|
3493
3532
|
};
|
|
3494
3533
|
var we = A.__r;
|
|
@@ -3518,12 +3557,12 @@ class It {
|
|
|
3518
3557
|
constructor(e) {
|
|
3519
3558
|
this.Component = e, console.info(e);
|
|
3520
3559
|
}
|
|
3521
|
-
render(e, t,
|
|
3560
|
+
render(e, t, o, s, i, a, n) {
|
|
3522
3561
|
const l = {
|
|
3523
3562
|
cellDiv: e,
|
|
3524
3563
|
rowIndex: t,
|
|
3525
|
-
columnIndex:
|
|
3526
|
-
areaIdent:
|
|
3564
|
+
columnIndex: o,
|
|
3565
|
+
areaIdent: s,
|
|
3527
3566
|
areaModel: i,
|
|
3528
3567
|
cellValue: a
|
|
3529
3568
|
}, c = Tt(e);
|