@guiexpert/table 1.0.15 → 1.1.0
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/css/main.css +27 -28
- package/css/table-color-vars.css +27 -28
- package/index.cjs +28 -28
- package/index.js +586 -554
- package/lib/table/data/common/event/input/table-cell-update-event.d.ts +6 -1
- package/lib/table/data/common/event/input/table-cell-update-event.if.d.ts +3 -0
- package/lib/table/data/tablemodel/areamodel/area-model.if.d.ts +1 -1
- package/lib/table/render-scope.d.ts +5 -1
- package/lib/table/service/convenience-dom.service.d.ts +1 -0
- package/lib/table/service/dom-service.if.d.ts +1 -0
- package/lib/table/service/simple-dom-service.d.ts +1 -0
- package/lib/table/table-api.d.ts +1 -1
- package/package.json +2 -1
package/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
function O(h) {
|
|
2
2
|
return h && h.type === "TreeRow";
|
|
3
3
|
}
|
|
4
|
-
function
|
|
4
|
+
function N(h) {
|
|
5
5
|
return h && h.type === "AreaModelTree";
|
|
6
6
|
}
|
|
7
7
|
function be(h) {
|
|
8
8
|
return h && h.type === "CheckboxColumnDef";
|
|
9
9
|
}
|
|
10
10
|
class X {
|
|
11
|
-
constructor(e = -1, t = -1, o = -1,
|
|
12
|
-
this.rowIndex = e, this.rowTop = t, this.columnIndex = o, this.columnLeft =
|
|
11
|
+
constructor(e = -1, t = -1, o = -1, s = -1, i, r, l, n = 0, d = 0, a = 0, c = "") {
|
|
12
|
+
this.rowIndex = e, this.rowTop = t, this.columnIndex = o, this.columnLeft = s, this.areaIdent = i, this.sideIdent = r, this.originalEvent = l, this.clickCount = n, this.draggingX = d, this.draggingY = a, this.action = c;
|
|
13
13
|
}
|
|
14
14
|
clone() {
|
|
15
15
|
return new X(
|
|
@@ -45,12 +45,12 @@ class ae {
|
|
|
45
45
|
">",
|
|
46
46
|
"color:transparent;",
|
|
47
47
|
["gt-table-tree-arrow-hidden"]
|
|
48
|
-
),
|
|
48
|
+
), s = new F(
|
|
49
49
|
"↕",
|
|
50
50
|
"",
|
|
51
51
|
["gt-table-tree-arrow-expanded-all"]
|
|
52
52
|
)) {
|
|
53
|
-
this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = o, this.arrowExpandCollapseAll =
|
|
53
|
+
this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = o, this.arrowExpandCollapseAll = s;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
class de {
|
|
@@ -77,7 +77,7 @@ class pe {
|
|
|
77
77
|
return this.domService.setStyle(e, "display", "block"), e;
|
|
78
78
|
}
|
|
79
79
|
applyStyleInPx(e, t) {
|
|
80
|
-
return Object.entries(t).forEach(([o,
|
|
80
|
+
return Object.entries(t).forEach(([o, s]) => this.domService.setStyle(e, o, s + "px")), e;
|
|
81
81
|
}
|
|
82
82
|
applyStylePosistionRelative(e) {
|
|
83
83
|
return this.domService.setStyle(e, "position", "relative"), this.domService.setStyle(e, "overflow", "clip"), e;
|
|
@@ -111,6 +111,9 @@ class pe {
|
|
|
111
111
|
addClass(e, t) {
|
|
112
112
|
return e.includes(" ") ? e.split(" ").forEach((o) => this.domService.addClass(t, o)) : this.domService.addClass(t, e), t;
|
|
113
113
|
}
|
|
114
|
+
removeClass(e, t) {
|
|
115
|
+
return e.includes(" ") ? e.split(" ").forEach((o) => this.domService.removeClass(t, o)) : this.domService.removeClass(t, e), t;
|
|
116
|
+
}
|
|
114
117
|
addClasses(e, t) {
|
|
115
118
|
if (e)
|
|
116
119
|
for (const o of e)
|
|
@@ -120,50 +123,50 @@ class pe {
|
|
|
120
123
|
setAttribute(e, t, o) {
|
|
121
124
|
return t && o && this.domService.setAttribute(e, t, o), e;
|
|
122
125
|
}
|
|
123
|
-
createAreaDivWithClass(e, t, o,
|
|
124
|
-
const
|
|
125
|
-
return this.addClass(e,
|
|
126
|
+
createAreaDivWithClass(e, t, o, s) {
|
|
127
|
+
const i = this.domService.createElement("div");
|
|
128
|
+
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;
|
|
126
129
|
}
|
|
127
130
|
createDivWithClass(e, t) {
|
|
128
131
|
const o = this.domService.createElement("div");
|
|
129
132
|
return this.addClass(e, o), this.domService.appendChild(t, o), o;
|
|
130
133
|
}
|
|
131
|
-
addRowDiv(e, t, o = -1,
|
|
134
|
+
addRowDiv(e, t, o = -1, s, i, r = "") {
|
|
132
135
|
const l = t.index ?? -1, n = this.getDivOrCreateDiv(l, e);
|
|
133
|
-
if (this.domService.addClass(n, "ge-table-row-div"), this.domService.addClass(n, `ge-table-row-div-${t.index}`),
|
|
136
|
+
if (this.domService.addClass(n, "ge-table-row-div"), this.domService.addClass(n, `ge-table-row-div-${t.index}`), s === "body" && i === "center") {
|
|
134
137
|
const d = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
135
138
|
this.domService.addClass(n, `ge-table-row-${d}`);
|
|
136
139
|
}
|
|
137
|
-
if (this.domService.setStyle(n, "display", "clip"), this.domService.setStyle(n, "position", "absolute"), this.domService.setStyle(n, "left", `${t.left}px`), this.domService.setStyle(n, "top", `${t.top}px`), this.domService.setStyle(n, "width", `${t.width}px`), this.domService.setStyle(n, "height", `${t.height}px`), this.domService.setAttribute(n, "data-row-index", `${o}`), this.domService.setAttribute(n, "data-area", `${
|
|
140
|
+
if (this.domService.setStyle(n, "display", "clip"), this.domService.setStyle(n, "position", "absolute"), this.domService.setStyle(n, "left", `${t.left}px`), this.domService.setStyle(n, "top", `${t.top}px`), this.domService.setStyle(n, "width", `${t.width}px`), this.domService.setStyle(n, "height", `${t.height}px`), this.domService.setAttribute(n, "data-row-index", `${o}`), this.domService.setAttribute(n, "data-area", `${s}`), r) {
|
|
138
141
|
const d = this.domService.createText(r);
|
|
139
142
|
this.domService.appendChild(n, d);
|
|
140
143
|
}
|
|
141
144
|
return this.domService.appendChild(e.child, n), n;
|
|
142
145
|
}
|
|
143
|
-
addColumnDiv(e, t, o = -1,
|
|
144
|
-
const
|
|
145
|
-
this.domService.addClass(b, "ge-table-col-div"), this.domService.addClass(b, `ge-table-col-div-${t.index}`), this.domService.setAttribute(b, "data-col-index", `${t.index}`), this.domService.setAttribute(b, "data-row-index", `${o}`), this.domService.setAttribute(b, "data-area", `${
|
|
146
|
+
addColumnDiv(e, t, o = -1, s = -1, i, r, l = "", n, d, a = void 0, c) {
|
|
147
|
+
const u = d == null ? void 0 : d.treeOptions, m = d == null ? void 0 : d.showCheckboxWihoutExtraColumn, b = this.domService.createElement("div");
|
|
148
|
+
this.domService.addClass(b, "ge-table-col-div"), this.domService.addClass(b, `ge-table-col-div-${t.index}`), this.domService.setAttribute(b, "data-col-index", `${t.index}`), this.domService.setAttribute(b, "data-row-index", `${o}`), this.domService.setAttribute(b, "data-area", `${i}`);
|
|
146
149
|
const w = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
147
|
-
if (
|
|
148
|
-
const
|
|
149
|
-
this.addLabelDiv(b, l,
|
|
150
|
+
if (i === "body" && r === "center" && this.domService.addClass(b, `ge-table-column-${w}`), this.domService.setStyle(b, "display", "clip"), this.domService.setStyle(b, "position", "absolute"), this.domService.setStyle(b, "left", `${t.left}px`), this.domService.setStyle(b, "top", `${t.top}px`), this.domService.setStyle(b, "width", `${t.width}px`), this.domService.setStyle(b, "height", `${t.height}px`), n && n !== "none" && (this.domService.addClass(b, "ge-table-col-tree"), this.addArrowDiv(b, n, u, o, s, i)), m && s === 0 && a && this.addCheckboxToDiv(b, a, i, o), l) {
|
|
151
|
+
const g = n !== "none" && s === 0;
|
|
152
|
+
this.addLabelDiv(b, l, g, o, s, i);
|
|
150
153
|
}
|
|
151
|
-
return c && this.addSortedIcon(b, c, d == null ? void 0 : d.sortedOptions,
|
|
154
|
+
return c && this.addSortedIcon(b, c, d == null ? void 0 : d.sortedOptions, s), this.domService.appendChild(e, b), b;
|
|
152
155
|
}
|
|
153
|
-
addCheckboxToDiv(e, t, o,
|
|
154
|
-
const
|
|
155
|
-
return
|
|
156
|
+
addCheckboxToDiv(e, t, o, s) {
|
|
157
|
+
const i = this.domService.createElement("div"), r = t === "full" ? "checked" : "";
|
|
158
|
+
return i.innerHTML = `
|
|
156
159
|
<input
|
|
157
160
|
type="checkbox"
|
|
158
161
|
data-area="${o}"
|
|
159
|
-
data-row-index="${
|
|
162
|
+
data-row-index="${s}"
|
|
160
163
|
data-input-type="checkbox"
|
|
161
164
|
${r}
|
|
162
|
-
class="ge-table-row-checkbox"> `, this.domService.setStyle(
|
|
165
|
+
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;
|
|
163
166
|
}
|
|
164
|
-
addLabelDiv(e, t = "", o = !1,
|
|
167
|
+
addLabelDiv(e, t = "", o = !1, s = -1, i = -1, r = "body") {
|
|
165
168
|
const l = this.domService.createElement("div");
|
|
166
|
-
if (this.domService.addClass(l, "ge-table-label-div"), this.domService.setStyle(l, "position", "relative"), this.domService.setStyle(l, "background", "transparent"), this.domService.setStyle(l, "width", "100%"), this.domService.setStyle(l, "height", "100%"), this.domService.setAttribute(l, "data-row-index", `${
|
|
169
|
+
if (this.domService.addClass(l, "ge-table-label-div"), this.domService.setStyle(l, "position", "relative"), this.domService.setStyle(l, "background", "transparent"), this.domService.setStyle(l, "width", "100%"), this.domService.setStyle(l, "height", "100%"), this.domService.setAttribute(l, "data-row-index", `${s}`), this.domService.setAttribute(l, "data-col-index", `${i}`), this.domService.setAttribute(l, "data-area", `${r}`), t)
|
|
167
170
|
if (o) {
|
|
168
171
|
const n = this.domService.createText(t);
|
|
169
172
|
this.domService.appendChild(l, n);
|
|
@@ -171,24 +174,24 @@ class pe {
|
|
|
171
174
|
const n = this.domService.createElement("div");
|
|
172
175
|
this.domService.appendChild(l, n);
|
|
173
176
|
const d = this.domService.createText(t);
|
|
174
|
-
this.domService.addClass(n, "ge-table-label"), this.domService.appendChild(n, d), this.domService.setAttribute(n, "data-row-index", `${
|
|
177
|
+
this.domService.addClass(n, "ge-table-label"), this.domService.appendChild(n, d), this.domService.setAttribute(n, "data-row-index", `${s}`), this.domService.setAttribute(n, "data-col-index", `${i}`), this.domService.setAttribute(n, "data-area", `${r}`);
|
|
175
178
|
}
|
|
176
179
|
return this.domService.appendChild(e, l), l;
|
|
177
180
|
}
|
|
178
|
-
addSortedIcon(e, t = "", o = new de(),
|
|
179
|
-
const
|
|
180
|
-
this.domService.addClass(
|
|
181
|
+
addSortedIcon(e, t = "", o = new de(), s = -1) {
|
|
182
|
+
const i = this.domService.createElement("div");
|
|
183
|
+
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");
|
|
181
184
|
let r;
|
|
182
185
|
t === "asc" ? r = o.iconAsc : t === "desc" ? r = o.iconDesc : r = o.iconPlaceholder;
|
|
183
186
|
const l = r.content, n = this.domService.createText(l);
|
|
184
|
-
this.domService.appendChild(
|
|
187
|
+
this.domService.appendChild(i, n), r.style && this.applyStyleString(i, r.style);
|
|
185
188
|
for (const d of r.classes)
|
|
186
|
-
this.domService.addClass(
|
|
187
|
-
return this.domService.appendChild(e,
|
|
189
|
+
this.domService.addClass(i, d);
|
|
190
|
+
return this.domService.appendChild(e, i), i;
|
|
188
191
|
}
|
|
189
|
-
addArrowDiv(e, t = "none", o = new ae(),
|
|
192
|
+
addArrowDiv(e, t = "none", o = new ae(), s = -1, i = -1, r = "body") {
|
|
190
193
|
const l = this.domService.createElement("div");
|
|
191
|
-
this.domService.addClass(l, "ge-table-tree-arrow-div"), this.domService.setStyle(l, "display", "inline-block"), this.domService.setStyle(l, "position", ""), this.domService.setStyle(l, "width", "20px"), this.domService.setStyle(l, "background", "transparent"), this.domService.setStyle(l, "cursor", "pointer"), this.domService.setAttribute(l, "data-row-index", `${
|
|
194
|
+
this.domService.addClass(l, "ge-table-tree-arrow-div"), this.domService.setStyle(l, "display", "inline-block"), this.domService.setStyle(l, "position", ""), this.domService.setStyle(l, "width", "20px"), this.domService.setStyle(l, "background", "transparent"), this.domService.setStyle(l, "cursor", "pointer"), this.domService.setAttribute(l, "data-row-index", `${s}`), this.domService.setAttribute(l, "data-col-index", `${i}`), this.domService.setAttribute(l, "data-area", `${r}`);
|
|
192
195
|
let n;
|
|
193
196
|
t === "expanded" ? n = o.arrowExpanded : t === "collapsed" ? n = o.arrowCollapsed : n = o.arrowPlaceholder;
|
|
194
197
|
const d = n.content, a = this.domService.createText(d);
|
|
@@ -197,38 +200,38 @@ class pe {
|
|
|
197
200
|
this.domService.addClass(l, c);
|
|
198
201
|
return this.domService.appendChild(e, l), l;
|
|
199
202
|
}
|
|
200
|
-
addColumnBorderDivs(e, t, o,
|
|
203
|
+
addColumnBorderDivs(e, t, o, s, i) {
|
|
201
204
|
if (e.verticalBorderVisible) {
|
|
202
|
-
const r = `ge-table-${
|
|
205
|
+
const r = `ge-table-${s}-${i}-vertical-border`;
|
|
203
206
|
this.addVerticalBorder(o, t, r);
|
|
204
207
|
}
|
|
205
208
|
if (e.horizontalBorderVisible) {
|
|
206
|
-
const r = `ge-table-${
|
|
209
|
+
const r = `ge-table-${s}-${i}-horizontal-border`;
|
|
207
210
|
this.addHorizontalBorder(o, t, r);
|
|
208
211
|
}
|
|
209
212
|
return t;
|
|
210
213
|
}
|
|
211
214
|
addHorizontalBorder(e, t, o = "ge-table-body-center-horizontal-border") {
|
|
212
|
-
const
|
|
213
|
-
return this.domService.addClass(
|
|
215
|
+
const s = this.domService.createElement("div");
|
|
216
|
+
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;
|
|
214
217
|
}
|
|
215
218
|
addFocusBorderDivs(e, t, o) {
|
|
216
|
-
let
|
|
217
|
-
return this.domService.addClass(
|
|
219
|
+
let s = this.domService.createElement("div");
|
|
220
|
+
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.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.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.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.applyStyle(s, o), this.domService.appendChild(e, s), e;
|
|
218
221
|
}
|
|
219
222
|
addVerticalBorder(e, t, o = "ge-table-body-center-vertical-border") {
|
|
220
|
-
const
|
|
221
|
-
return this.domService.addClass(
|
|
223
|
+
const s = this.domService.createElement("div");
|
|
224
|
+
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;
|
|
222
225
|
}
|
|
223
226
|
addDiv(e, t, o = "") {
|
|
224
|
-
const
|
|
225
|
-
return o && this.domService.addClass(
|
|
227
|
+
const s = this.domService.createElement("div");
|
|
228
|
+
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;
|
|
226
229
|
}
|
|
227
230
|
applyStyleString(e, t) {
|
|
228
|
-
const o = t.split(";").map((
|
|
229
|
-
for (const
|
|
230
|
-
const [
|
|
231
|
-
this.domService.setStyle(e,
|
|
231
|
+
const o = t.split(";").map((s) => s.trim()).filter((s) => s);
|
|
232
|
+
for (const s of o) {
|
|
233
|
+
const [i, r] = s.split(":");
|
|
234
|
+
this.domService.setStyle(e, i.trim(), r.trim());
|
|
232
235
|
}
|
|
233
236
|
}
|
|
234
237
|
getDivOrCreateDiv(e, t) {
|
|
@@ -243,8 +246,8 @@ class fe {
|
|
|
243
246
|
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"));
|
|
244
247
|
const o = e.getAttribute("data-area");
|
|
245
248
|
if (o && (this.areaIdent = Y(o), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
|
|
246
|
-
const
|
|
247
|
-
this.value =
|
|
249
|
+
const s = e;
|
|
250
|
+
this.value = s.value;
|
|
248
251
|
}
|
|
249
252
|
}
|
|
250
253
|
}
|
|
@@ -267,11 +270,11 @@ class me {
|
|
|
267
270
|
else if (t.inputType === "checkbox" && t.areaIdent)
|
|
268
271
|
this.tableScope.toggleRowCheckbox(t.rowIdx, t.colIdx, t.areaIdent), e.preventDefault(), e.stopPropagation();
|
|
269
272
|
else if (O(t.row) && t.areaModel) {
|
|
270
|
-
const o = t.colIdx === this.getArrowColumnIndex() && e.altKey,
|
|
271
|
-
if (console.info(
|
|
273
|
+
const o = t.colIdx === this.getArrowColumnIndex() && e.altKey, s = t.className.includes("ge-table-tree-arrow-div");
|
|
274
|
+
if (console.info(s, o), o || s) {
|
|
272
275
|
e.preventDefault(), e.stopPropagation();
|
|
273
|
-
const
|
|
274
|
-
|
|
276
|
+
const i = t.row;
|
|
277
|
+
i.expanded = !i.expanded, "recalcVisibleTreeRows" in t.areaModel && t.areaModel.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(i);
|
|
275
278
|
}
|
|
276
279
|
}
|
|
277
280
|
if (t.areaIdent === "body" && this.tableScope.tableOptions.getFocusModel) {
|
|
@@ -282,12 +285,12 @@ class me {
|
|
|
282
285
|
}
|
|
283
286
|
onHostElementDblClicked(e) {
|
|
284
287
|
if (e.target instanceof HTMLElement) {
|
|
285
|
-
const t = e.target, o = t.getAttribute("data-area"),
|
|
286
|
-
if (o &&
|
|
287
|
-
this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e,
|
|
288
|
+
const t = e.target, o = t.getAttribute("data-area"), s = Y(o), i = Number(t.getAttribute("data-row-index")), r = Number(t.getAttribute("data-col-index")), l = this.tableScope.tableModel.getAreaModel(s);
|
|
289
|
+
if (o && s === "header")
|
|
290
|
+
this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, i, r));
|
|
288
291
|
else if (t.getAttribute("data-row-index")) {
|
|
289
|
-
const n = l.getRowByIndex(
|
|
290
|
-
if (o &&
|
|
292
|
+
const n = l.getRowByIndex(i);
|
|
293
|
+
if (o && s === "body" && l.isEditable(i, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(i, r)), O(n) && r === this.getArrowColumnIndex()) {
|
|
291
294
|
e.preventDefault(), e.stopPropagation();
|
|
292
295
|
const d = n;
|
|
293
296
|
d.expanded = !d.expanded, "recalcVisibleTreeRows" in l && l.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(d);
|
|
@@ -301,10 +304,10 @@ class me {
|
|
|
301
304
|
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);
|
|
302
305
|
}
|
|
303
306
|
updateCollapsedExpandedState(e) {
|
|
304
|
-
var o,
|
|
305
|
-
const t = (
|
|
307
|
+
var o, s, i, r, l;
|
|
308
|
+
const t = (s = (o = this.tableScope.tableOptions) == null ? void 0 : o.autoRestoreOptions) == null ? void 0 : s.getRowId;
|
|
306
309
|
if (t) {
|
|
307
|
-
const n = (
|
|
310
|
+
const n = (i = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : i.collapsedExpandedStateGet().mode, d = n === "collapsed" && !e.expanded || n === "expanded" && e.expanded, a = n === "collapsed" && e.expanded || n === "expanded" && !e.expanded, c = t(e.data);
|
|
308
311
|
d ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(c) : a && ((l = this.tableScope.storeStateCollapsedExpandService) == null || l.collapsedStateIdsRemove(c));
|
|
309
312
|
}
|
|
310
313
|
}
|
|
@@ -345,8 +348,8 @@ class we {
|
|
|
345
348
|
constructor(e) {
|
|
346
349
|
this.tableScope = e;
|
|
347
350
|
}
|
|
348
|
-
updateCells(e) {
|
|
349
|
-
this.tableScope.updateCells(e);
|
|
351
|
+
updateCells(e, t = !1) {
|
|
352
|
+
this.tableScope.updateCells(e, t);
|
|
350
353
|
}
|
|
351
354
|
externalFilterChanged() {
|
|
352
355
|
this.tableScope.externalFilterChanged();
|
|
@@ -382,12 +385,12 @@ class K {
|
|
|
382
385
|
const t = {};
|
|
383
386
|
if (e instanceof Map) {
|
|
384
387
|
const o = e;
|
|
385
|
-
for (const
|
|
388
|
+
for (const s of [...o]) {
|
|
386
389
|
const [
|
|
387
|
-
|
|
390
|
+
i,
|
|
388
391
|
r
|
|
389
|
-
] =
|
|
390
|
-
t[
|
|
392
|
+
] = s;
|
|
393
|
+
t[i] = r;
|
|
391
394
|
}
|
|
392
395
|
}
|
|
393
396
|
return t;
|
|
@@ -395,14 +398,14 @@ class K {
|
|
|
395
398
|
checkAndPersistItem(e, t) {
|
|
396
399
|
const o = this.getStorageKeyFn;
|
|
397
400
|
if (o) {
|
|
398
|
-
const
|
|
399
|
-
if (
|
|
400
|
-
const
|
|
401
|
+
const s = o();
|
|
402
|
+
if (s) {
|
|
403
|
+
const i = s + e;
|
|
401
404
|
if ((t + "").includes("Map")) {
|
|
402
405
|
const r = this.autoConvertMapToObject(t);
|
|
403
|
-
this.persistItem(
|
|
406
|
+
this.persistItem(i, r);
|
|
404
407
|
} else
|
|
405
|
-
this.persistItem(
|
|
408
|
+
this.persistItem(i, t);
|
|
406
409
|
}
|
|
407
410
|
}
|
|
408
411
|
}
|
|
@@ -465,15 +468,15 @@ class Se extends K {
|
|
|
465
468
|
const t = e();
|
|
466
469
|
if (t) {
|
|
467
470
|
const o = t + this.SCROLL_STATE;
|
|
468
|
-
let
|
|
469
|
-
this.scrollOffset =
|
|
471
|
+
let s = this.loadFromLocalStorage(o);
|
|
472
|
+
this.scrollOffset = s || [0, 0];
|
|
470
473
|
}
|
|
471
474
|
}
|
|
472
475
|
}
|
|
473
476
|
}
|
|
474
477
|
class xe {
|
|
475
|
-
constructor(e = "collapsed", t = [], o = !1,
|
|
476
|
-
this.mode = e, this.rowIds = t, this.allCollapsed = o, this.allExpanded =
|
|
478
|
+
constructor(e = "collapsed", t = [], o = !1, s = !1) {
|
|
479
|
+
this.mode = e, this.rowIds = t, this.allCollapsed = o, this.allExpanded = s;
|
|
477
480
|
}
|
|
478
481
|
}
|
|
479
482
|
class ye extends K {
|
|
@@ -501,8 +504,8 @@ class ye extends K {
|
|
|
501
504
|
if (e) {
|
|
502
505
|
const t = e();
|
|
503
506
|
if (t) {
|
|
504
|
-
const o = t + this.COLLAPSED_EXPANDED_STATE,
|
|
505
|
-
|
|
507
|
+
const o = t + this.COLLAPSED_EXPANDED_STATE, s = this.loadFromLocalStorage(o);
|
|
508
|
+
s && (this.collapsedExpandedState = s);
|
|
506
509
|
}
|
|
507
510
|
}
|
|
508
511
|
}
|
|
@@ -526,67 +529,67 @@ class Ce extends K {
|
|
|
526
529
|
const t = e();
|
|
527
530
|
if (t) {
|
|
528
531
|
const o = t + this.SORTING_STATE;
|
|
529
|
-
let
|
|
530
|
-
this.sortItems =
|
|
532
|
+
let s = this.loadFromLocalStorage(o);
|
|
533
|
+
this.sortItems = s || [];
|
|
531
534
|
}
|
|
532
535
|
}
|
|
533
536
|
}
|
|
534
537
|
}
|
|
535
538
|
class $ {
|
|
536
|
-
constructor(e = 0, t = 0, o = 0,
|
|
537
|
-
this.left = e, this.width = t, this.height = o, this.top =
|
|
539
|
+
constructor(e = 0, t = 0, o = 0, s = 0, i) {
|
|
540
|
+
this.left = e, this.width = t, this.height = o, this.top = s, this.index = i;
|
|
538
541
|
}
|
|
539
542
|
}
|
|
540
543
|
class ve {
|
|
541
|
-
constructor(e, t, o,
|
|
542
|
-
this.hostElement = e, this.tableModel = t, this.dom = o, this.tableOptions =
|
|
543
|
-
const
|
|
544
|
-
|
|
545
|
-
this.dom.addClass("ge-table",
|
|
544
|
+
constructor(e, t, o, s) {
|
|
545
|
+
this.hostElement = e, this.tableModel = t, this.dom = o, this.tableOptions = s, this.scrollTop = 0, this.areaBodyWestGeo = new $(), this.areaBodyCenterGeo = new $(), this.areaBodyEastGeo = new $();
|
|
546
|
+
const i = this.hostElement;
|
|
547
|
+
i.innerText = "", this.dom.setAttribute(i, "tabindex", "0"), this.dom.setStyle(
|
|
548
|
+
this.dom.addClass("ge-table", i),
|
|
546
549
|
"position",
|
|
547
550
|
"relative"
|
|
548
551
|
), this.hoverRow = o.applyStylePosistionAbsolute(
|
|
549
|
-
o.createDivWithClass("ge-table-hover-row",
|
|
552
|
+
o.createDivWithClass("ge-table-hover-row", i)
|
|
550
553
|
), this.hoverColumn = o.applyStylePosistionAbsolute(
|
|
551
|
-
o.createDivWithClass("ge-table-hover-column",
|
|
554
|
+
o.createDivWithClass("ge-table-hover-column", i)
|
|
552
555
|
), this.areaHeaderWest = o.appendRelativeChildDiv(
|
|
553
556
|
o.applyStylePosistionAbsolute(
|
|
554
|
-
o.createAreaDivWithClass("ge-table-header ge-table-header-west",
|
|
557
|
+
o.createAreaDivWithClass("ge-table-header ge-table-header-west", i, "header", "west")
|
|
555
558
|
)
|
|
556
559
|
), this.areaHeaderCenter = o.appendRelativeChildDiv(
|
|
557
560
|
o.applyStylePosistionAbsolute(
|
|
558
|
-
o.createAreaDivWithClass("ge-table-header ge-table-header-center",
|
|
561
|
+
o.createAreaDivWithClass("ge-table-header ge-table-header-center", i, "header", "center")
|
|
559
562
|
)
|
|
560
563
|
), this.areaHeaderEast = o.appendRelativeChildDiv(
|
|
561
564
|
o.applyStylePosistionAbsolute(
|
|
562
|
-
o.createAreaDivWithClass("ge-table-header ge-table-header-east",
|
|
565
|
+
o.createAreaDivWithClass("ge-table-header ge-table-header-east", i, "body", "east")
|
|
563
566
|
)
|
|
564
567
|
), this.areaBodyWest = o.appendRelativeChildDiv(
|
|
565
568
|
o.applyStylePosistionAbsolute(
|
|
566
|
-
o.createAreaDivWithClass("ge-table-body ge-table-body-west",
|
|
569
|
+
o.createAreaDivWithClass("ge-table-body ge-table-body-west", i, "body", "west")
|
|
567
570
|
)
|
|
568
571
|
), this.areaBodyEast = o.appendRelativeChildDiv(
|
|
569
572
|
o.applyStylePosistionAbsolute(
|
|
570
|
-
o.createAreaDivWithClass("ge-table-body ge-table-body-east",
|
|
573
|
+
o.createAreaDivWithClass("ge-table-body ge-table-body-east", i, "body", "east")
|
|
571
574
|
)
|
|
572
575
|
), this.areaFooterWest = o.appendRelativeChildDiv(
|
|
573
576
|
o.applyStylePosistionAbsolute(
|
|
574
|
-
o.createAreaDivWithClass("ge-table-footer ge-table-footer-west",
|
|
577
|
+
o.createAreaDivWithClass("ge-table-footer ge-table-footer-west", i, "footer", "west")
|
|
575
578
|
)
|
|
576
579
|
), this.areaFooterCenter = o.appendRelativeChildDiv(
|
|
577
580
|
o.applyStylePosistionAbsolute(
|
|
578
|
-
o.createAreaDivWithClass("ge-table-footer ge-table-footer-center",
|
|
581
|
+
o.createAreaDivWithClass("ge-table-footer ge-table-footer-center", i, "footer", "center")
|
|
579
582
|
)
|
|
580
583
|
), this.areaFooterEast = o.appendRelativeChildDiv(
|
|
581
584
|
o.applyStylePosistionAbsolute(
|
|
582
|
-
o.createAreaDivWithClass("ge-table-footer ge-table-footer-east",
|
|
585
|
+
o.createAreaDivWithClass("ge-table-footer ge-table-footer-east", i, "footer", "east")
|
|
583
586
|
)
|
|
584
587
|
), this.scrollViewport = o.applyStyleOverflowAuto(
|
|
585
588
|
this.tableOptions.overflowX ?? "auto",
|
|
586
589
|
this.tableOptions.overflowY ?? "auto",
|
|
587
590
|
o.applyStyleNoPadding(
|
|
588
591
|
o.applyStylePosistionAbsolute(
|
|
589
|
-
o.createAreaDivWithClass("ge-table-scroll-viewport",
|
|
592
|
+
o.createAreaDivWithClass("ge-table-scroll-viewport", i, "body", "center")
|
|
590
593
|
)
|
|
591
594
|
)
|
|
592
595
|
), this.contentWrapperDiv = o.applyStyleNoPadding(
|
|
@@ -600,13 +603,13 @@ class ve {
|
|
|
600
603
|
), this.areaBodyCenter = o.appendRelativeChildDiv(
|
|
601
604
|
o.createDivWithClass("ge-table-body-center", this.contentDiv)
|
|
602
605
|
), this.borderHeaderBottom = o.applyStylePosistionAbsolute(
|
|
603
|
-
o.createDivWithClass("ge-table-header-border",
|
|
606
|
+
o.createDivWithClass("ge-table-header-border", i)
|
|
604
607
|
), this.borderFixedWest = o.applyStylePosistionAbsolute(
|
|
605
|
-
o.createDivWithClass("ge-table-west-fixed-column-border",
|
|
608
|
+
o.createDivWithClass("ge-table-west-fixed-column-border", i)
|
|
606
609
|
), this.borderFixedEast = o.applyStylePosistionAbsolute(
|
|
607
|
-
o.createDivWithClass("ge-table-east-fixed-column-border",
|
|
610
|
+
o.createDivWithClass("ge-table-east-fixed-column-border", i)
|
|
608
611
|
), this.borderFooterTop = o.applyStylePosistionAbsolute(
|
|
609
|
-
o.createDivWithClass("ge-table-footer-border",
|
|
612
|
+
o.createDivWithClass("ge-table-footer-border", i)
|
|
610
613
|
);
|
|
611
614
|
}
|
|
612
615
|
adjustContainersAndRows() {
|
|
@@ -689,8 +692,8 @@ class ve {
|
|
|
689
692
|
}
|
|
690
693
|
}
|
|
691
694
|
class E {
|
|
692
|
-
constructor(e, t, o,
|
|
693
|
-
this.r1 = e, this.c1 = t, this.r2 = o, this.c2 =
|
|
695
|
+
constructor(e, t, o, s, i = !1) {
|
|
696
|
+
this.r1 = e, this.c1 = t, this.r2 = o, this.c2 = s, this.gammaRange = i;
|
|
694
697
|
}
|
|
695
698
|
static create(e) {
|
|
696
699
|
return e.gammaRange === void 0 && (e.gammaRange = !1), new E(
|
|
@@ -724,13 +727,13 @@ class Re {
|
|
|
724
727
|
this.colAndRowspanRanges = [];
|
|
725
728
|
const e = this.areaModel.getRowCount(), t = this.tableModel.getColumnCount();
|
|
726
729
|
for (let o = 0; o < e; o++)
|
|
727
|
-
for (let
|
|
728
|
-
let
|
|
729
|
-
if (
|
|
730
|
-
|
|
730
|
+
for (let s = 0; s < t; s++) {
|
|
731
|
+
let i = this.areaModel.getColspanAt(o, s), r = this.areaModel.getRowspanAt(o, s);
|
|
732
|
+
if (i > 1 || r > 1) {
|
|
733
|
+
i === 0 && (i = 1), r === 0 && (r = 1);
|
|
731
734
|
const l = this.areaModel.hasOwnProperty("gammaCells");
|
|
732
735
|
this.colAndRowspanRanges.push(
|
|
733
|
-
new E(o,
|
|
736
|
+
new E(o, s, o + r - 1, s + i - 1, l)
|
|
734
737
|
);
|
|
735
738
|
}
|
|
736
739
|
}
|
|
@@ -747,19 +750,19 @@ class Re {
|
|
|
747
750
|
return !1;
|
|
748
751
|
}
|
|
749
752
|
}
|
|
750
|
-
class
|
|
753
|
+
class I {
|
|
751
754
|
constructor(e, t, o) {
|
|
752
755
|
this.header = e, this.body = t, this.footer = o;
|
|
753
756
|
}
|
|
754
757
|
}
|
|
755
758
|
class Ae extends ve {
|
|
756
|
-
constructor(e, t, o,
|
|
759
|
+
constructor(e, t, o, s) {
|
|
757
760
|
var r, l;
|
|
758
|
-
super(e, t, o,
|
|
761
|
+
super(e, t, o, s), this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
|
|
759
762
|
header: [],
|
|
760
763
|
body: [],
|
|
761
764
|
footer: []
|
|
762
|
-
}, this.tree = !1, this.colAndRowspanModels = new
|
|
765
|
+
}, this.tree = !1, this.colAndRowspanModels = new I(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.editing = !1, this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (r = this.tableOptions) != null && r.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (l = this.tableOptions) != null && l.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), N(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
|
|
763
766
|
(n) => {
|
|
764
767
|
var d;
|
|
765
768
|
this.colAndRowspanModels[n] = new Re(t, t.getAreaModel(n)), (d = this.colAndRowspanModels[n]) == null || d.init();
|
|
@@ -779,13 +782,13 @@ class Ae extends ve {
|
|
|
779
782
|
}
|
|
780
783
|
}
|
|
781
784
|
initRenderEditor(e, t) {
|
|
782
|
-
var
|
|
783
|
-
let o = (
|
|
785
|
+
var s;
|
|
786
|
+
let o = (s = this.tableModel.getColumnDef(t)) == null ? void 0 : s.getEditRenderer;
|
|
784
787
|
if (o || (o = this.tableOptions.getEditRenderer), o)
|
|
785
788
|
if (this.editorRenderer = o(e, t), this.editorRenderer) {
|
|
786
789
|
this.editorRendererRow = e, this.editorRendererColumn = t, this.editing = !0, this.repaint();
|
|
787
|
-
const
|
|
788
|
-
|
|
790
|
+
const i = document.querySelector("input.ge-table-cell-editor-input");
|
|
791
|
+
i && i.focus();
|
|
789
792
|
} else
|
|
790
793
|
this.resetEditorRenderer();
|
|
791
794
|
}
|
|
@@ -818,10 +821,12 @@ class Ae extends ve {
|
|
|
818
821
|
var e, t;
|
|
819
822
|
this.storeScrollPosStateService && ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.autoRestoreScrollPosition) && this.storeScrollPosStateService.updateScrollOffset([this.scrollLeft, this.scrollTop]);
|
|
820
823
|
}
|
|
821
|
-
updateCells(e) {
|
|
824
|
+
updateCells(e, t = !1) {
|
|
822
825
|
e.forEach(
|
|
823
|
-
(
|
|
824
|
-
|
|
826
|
+
(o) => {
|
|
827
|
+
this.tableModel.getAreaModel(o.area).setValue(o.rowIndex, o.columnIndex, o.value), t || this.rerenderCellContent(o);
|
|
828
|
+
}
|
|
829
|
+
), t && this.repaint();
|
|
825
830
|
}
|
|
826
831
|
getAreaAndSideIdentByAttr(e) {
|
|
827
832
|
if (e) {
|
|
@@ -863,37 +868,37 @@ class Ae extends ve {
|
|
|
863
868
|
getNumberByAttr(e, t) {
|
|
864
869
|
var o;
|
|
865
870
|
if (e) {
|
|
866
|
-
const
|
|
867
|
-
if (
|
|
868
|
-
return Number(
|
|
871
|
+
const s = (o = e.closest("[" + t + "]")) == null ? void 0 : o.getAttribute(t);
|
|
872
|
+
if (s)
|
|
873
|
+
return Number(s);
|
|
869
874
|
}
|
|
870
875
|
return -1;
|
|
871
876
|
}
|
|
872
877
|
getStringByAttr(e, t) {
|
|
873
878
|
var o;
|
|
874
879
|
if (e) {
|
|
875
|
-
const
|
|
876
|
-
if (
|
|
877
|
-
return
|
|
880
|
+
const s = (o = e.closest("[" + t + "]")) == null ? void 0 : o.getAttribute(t);
|
|
881
|
+
if (s)
|
|
882
|
+
return s;
|
|
878
883
|
}
|
|
879
884
|
return "";
|
|
880
885
|
}
|
|
881
886
|
adjustArea(e, t = 0) {
|
|
882
|
-
var
|
|
883
|
-
const o = this.getArea(e, "west"),
|
|
884
|
-
o.child.innerText = "",
|
|
887
|
+
var g;
|
|
888
|
+
const o = this.getArea(e, "west"), s = this.getArea(e, "center"), i = this.getArea(e, "east"), r = s.child.clientHeight;
|
|
889
|
+
o.child.innerText = "", s.child.innerText = "", i.child.innerText = "";
|
|
885
890
|
const l = 0, n = this.areaBodyCenterGeo.width, d = this.tableModel.getPadding(), a = this.tableModel.getAreaModel(e), c = a.getRowCount();
|
|
886
891
|
for (; this.cleanupFunctions[e].length; ) {
|
|
887
892
|
const p = this.cleanupFunctions[e].shift();
|
|
888
893
|
p && p();
|
|
889
894
|
}
|
|
890
|
-
let
|
|
895
|
+
let u = t;
|
|
891
896
|
const m = this.tableModel.getColumnCount(), b = this.tableModel.getFixedRightColumnCount(), w = this.tableModel.getFixedLeftColumnCount();
|
|
892
897
|
for (let p = 0; p < c; p++) {
|
|
893
|
-
const C =
|
|
898
|
+
const C = u, v = p === c - 1, R = this.tableModel.getRowHeight(e, p);
|
|
894
899
|
if (C + R > 0) {
|
|
895
900
|
this.firstVisibleRowIndex = p;
|
|
896
|
-
let y = { left: l, width: n, height: R, top: C, index: p }, S = this.dom.addRowDiv(
|
|
901
|
+
let y = { left: l, width: n, height: R, top: C, index: p }, S = this.dom.addRowDiv(s, y, p, e, "center");
|
|
897
902
|
const T = w;
|
|
898
903
|
if (this.adjustColumnsToRowParent({
|
|
899
904
|
areaIdent: e,
|
|
@@ -917,7 +922,7 @@ class Ae extends ve {
|
|
|
917
922
|
columnIndexEnd: T - 1,
|
|
918
923
|
verticalFixed: !0,
|
|
919
924
|
lastRowOfModel: v
|
|
920
|
-
})), d.right > 0 && (y = { left: l, width: this.areaBodyEastGeo.width, height: R, top: C, index: p }, S = this.dom.addRowDiv(
|
|
925
|
+
})), d.right > 0 && (y = { left: l, width: this.areaBodyEastGeo.width, height: R, top: C, index: p }, S = this.dom.addRowDiv(i, y, p, e, "east"), this.adjustColumnsToRowParent({
|
|
921
926
|
areaIdent: e,
|
|
922
927
|
sideIdent: "east",
|
|
923
928
|
areaModel: a,
|
|
@@ -943,18 +948,18 @@ class Ae extends ve {
|
|
|
943
948
|
}
|
|
944
949
|
}
|
|
945
950
|
}
|
|
946
|
-
if (
|
|
951
|
+
if (u = u + R, u > r)
|
|
947
952
|
break;
|
|
948
953
|
}
|
|
949
954
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
|
|
950
|
-
const p = ((
|
|
955
|
+
const p = ((g = this.colAndRowspanModels[e]) == null ? void 0 : g.getRanges()) ?? [];
|
|
951
956
|
if (p.length)
|
|
952
957
|
for (const C of p) {
|
|
953
|
-
let v = 0, R =
|
|
958
|
+
let v = 0, R = s.child, y = "center";
|
|
954
959
|
if (C.c1 < w)
|
|
955
960
|
R = o.child, y = "west";
|
|
956
961
|
else if (b > 0 && C.c1 >= m - b)
|
|
957
|
-
R =
|
|
962
|
+
R = i.child, y = "east";
|
|
958
963
|
else {
|
|
959
964
|
const S = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
960
965
|
v = this.scrollFactorX * S - this.areaBodyWestGeo.width, y = "center";
|
|
@@ -973,58 +978,58 @@ class Ae extends ve {
|
|
|
973
978
|
* @param sideIdent SideIdent (west,center,east)
|
|
974
979
|
* @protected
|
|
975
980
|
*/
|
|
976
|
-
drawBigCell(e, t, o,
|
|
977
|
-
const l = o + this.getRowHeights(0, e.r1 - 1,
|
|
981
|
+
drawBigCell(e, t, o, s, i, r) {
|
|
982
|
+
const l = o + this.getRowHeights(0, e.r1 - 1, s).reduce((g, p) => g + p, 0), n = this.tableModel.getColumnCount(), d = this.tableModel.getFixedRightColumnCount();
|
|
978
983
|
let a = 0;
|
|
979
984
|
d > 0 && e.c1 >= n - d && (a = n - d);
|
|
980
|
-
const c = t + this.getColumnWidths(a, e.c1 - 1).reduce((
|
|
985
|
+
const c = t + this.getColumnWidths(a, e.c1 - 1).reduce((g, p) => g + p, 0), u = this.getRowHeights(e.r1, e.r2, s).reduce((g, p) => g + p, 0), m = this.getColumnWidths(e.c1, e.c2).reduce((g, p) => g + p, 0);
|
|
981
986
|
let b = !1;
|
|
982
987
|
const w = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
983
988
|
w && (b = w.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? (console.info("TODO here", e), this.renderCell({
|
|
984
|
-
areaModel:
|
|
985
|
-
areaIdent:
|
|
989
|
+
areaModel: s,
|
|
990
|
+
areaIdent: s.areaIdent,
|
|
986
991
|
sideIdent: r,
|
|
987
992
|
rowIndex: e.r1,
|
|
988
993
|
columnIndex: e.c1,
|
|
989
994
|
left: c,
|
|
990
995
|
top: l,
|
|
991
996
|
width: m,
|
|
992
|
-
height:
|
|
993
|
-
parent:
|
|
997
|
+
height: u,
|
|
998
|
+
parent: i,
|
|
994
999
|
cellSelected: b,
|
|
995
1000
|
lastRowOfModel: !0,
|
|
996
1001
|
gammaRange: e.gammaRange
|
|
997
1002
|
})) : this.renderCell({
|
|
998
|
-
areaModel:
|
|
999
|
-
areaIdent:
|
|
1003
|
+
areaModel: s,
|
|
1004
|
+
areaIdent: s.areaIdent,
|
|
1000
1005
|
sideIdent: r,
|
|
1001
1006
|
rowIndex: e.r1,
|
|
1002
1007
|
columnIndex: e.c1,
|
|
1003
1008
|
left: c,
|
|
1004
1009
|
top: l,
|
|
1005
1010
|
width: m,
|
|
1006
|
-
height:
|
|
1007
|
-
parent:
|
|
1011
|
+
height: u,
|
|
1012
|
+
parent: i,
|
|
1008
1013
|
cellSelected: b,
|
|
1009
1014
|
lastRowOfModel: !0,
|
|
1010
1015
|
gammaRange: e.gammaRange
|
|
1011
|
-
}),
|
|
1016
|
+
}), s.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1012
1017
|
rowIndex: e.r1,
|
|
1013
1018
|
columnIndex: e.c1,
|
|
1014
1019
|
cellLeft: c,
|
|
1015
1020
|
cellTop: l,
|
|
1016
1021
|
cellWidth: m,
|
|
1017
|
-
cellHeight:
|
|
1018
|
-
parent:
|
|
1022
|
+
cellHeight: u,
|
|
1023
|
+
parent: i
|
|
1019
1024
|
});
|
|
1020
1025
|
}
|
|
1021
1026
|
findRowOfImportantRowspanCell(e, t, o) {
|
|
1022
|
-
const
|
|
1023
|
-
for (let
|
|
1024
|
-
const r = e.getRowspanAt(
|
|
1025
|
-
if (r > 1 &&
|
|
1026
|
-
return
|
|
1027
|
-
if (t -
|
|
1027
|
+
const s = e.getMaxRowspan();
|
|
1028
|
+
for (let i = t - 1; i > -1; i--) {
|
|
1029
|
+
const r = e.getRowspanAt(i, o);
|
|
1030
|
+
if (r > 1 && i + r + 1 >= t)
|
|
1031
|
+
return i;
|
|
1032
|
+
if (t - i > s)
|
|
1028
1033
|
return -1;
|
|
1029
1034
|
}
|
|
1030
1035
|
return -1;
|
|
@@ -1033,8 +1038,8 @@ class Ae extends ve {
|
|
|
1033
1038
|
areaIdent: e,
|
|
1034
1039
|
sideIdent: t,
|
|
1035
1040
|
areaModel: o,
|
|
1036
|
-
geo:
|
|
1037
|
-
parent:
|
|
1041
|
+
geo: s,
|
|
1042
|
+
parent: i,
|
|
1038
1043
|
rowIndex: r,
|
|
1039
1044
|
columnIndexStart: l,
|
|
1040
1045
|
columnIndexEnd: n,
|
|
@@ -1045,55 +1050,55 @@ class Ae extends ve {
|
|
|
1045
1050
|
this.scrollViewportLeft = this.scrollViewport.scrollLeft;
|
|
1046
1051
|
let c = 0;
|
|
1047
1052
|
if (!d) {
|
|
1048
|
-
const
|
|
1049
|
-
c = this.scrollFactorX *
|
|
1053
|
+
const g = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1054
|
+
c = this.scrollFactorX * g;
|
|
1050
1055
|
}
|
|
1051
|
-
const
|
|
1056
|
+
const u = 0, m = !!(e === "body" && t);
|
|
1052
1057
|
let b = c;
|
|
1053
|
-
for (let
|
|
1054
|
-
const p = b, C = this.tableModel.getColumnWidth(
|
|
1058
|
+
for (let g = l; g <= n; g++) {
|
|
1059
|
+
const p = b, C = this.tableModel.getColumnWidth(g);
|
|
1055
1060
|
if (C > 0 && p + C > 0) {
|
|
1056
|
-
let v =
|
|
1057
|
-
const R = o.getRowspanAt(r,
|
|
1061
|
+
let v = s.height;
|
|
1062
|
+
const R = o.getRowspanAt(r, g), y = o.getColspanAt(r, g);
|
|
1058
1063
|
R > 1 && (v = this.getRowHeights(r, r + R - 1, o).reduce((A, M) => A + M, 0));
|
|
1059
1064
|
let S = C;
|
|
1060
|
-
y > 1 && (S = this.getColumnWidths(
|
|
1065
|
+
y > 1 && (S = this.getColumnWidths(g, g + y - 1).reduce((A, M) => A + M, 0));
|
|
1061
1066
|
let T = !1;
|
|
1062
|
-
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (w = this.colAndRowspanModels[e]) != null && w.isInRange(r,
|
|
1063
|
-
this.renderDragTargetDiv(
|
|
1064
|
-
const A = { left: p, top:
|
|
1065
|
-
this.dom.addColumnBorderDivs(this.tableOptions,
|
|
1067
|
+
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (w = this.colAndRowspanModels[e]) != null && w.isInRange(r, g) && (T = !0), this.draggingTargetColumnIndex === g && e !== "header") {
|
|
1068
|
+
this.renderDragTargetDiv(i, p, u, S, v);
|
|
1069
|
+
const A = { left: p, top: u, width: S, height: v };
|
|
1070
|
+
this.dom.addColumnBorderDivs(this.tableOptions, i, A, e, t);
|
|
1066
1071
|
} else {
|
|
1067
|
-
const A = this.renderSelectedBackgroundDiv(T, m, t, o, r,
|
|
1072
|
+
const A = this.renderSelectedBackgroundDiv(T, m, t, o, r, g, i, p, u, S, v);
|
|
1068
1073
|
T || this.renderCell({
|
|
1069
1074
|
areaModel: o,
|
|
1070
1075
|
areaIdent: e,
|
|
1071
1076
|
sideIdent: t,
|
|
1072
1077
|
rowIndex: r,
|
|
1073
|
-
columnIndex:
|
|
1078
|
+
columnIndex: g,
|
|
1074
1079
|
left: p,
|
|
1075
|
-
top:
|
|
1080
|
+
top: u,
|
|
1076
1081
|
width: S,
|
|
1077
1082
|
height: v,
|
|
1078
|
-
parent:
|
|
1083
|
+
parent: i,
|
|
1079
1084
|
cellSelected: A,
|
|
1080
1085
|
lastRowOfModel: a,
|
|
1081
1086
|
gammaRange: !0
|
|
1082
1087
|
}), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1083
1088
|
rowIndex: r,
|
|
1084
|
-
columnIndex:
|
|
1089
|
+
columnIndex: g,
|
|
1085
1090
|
cellLeft: p,
|
|
1086
|
-
cellTop:
|
|
1091
|
+
cellTop: u,
|
|
1087
1092
|
cellWidth: S,
|
|
1088
1093
|
cellHeight: v,
|
|
1089
|
-
parent:
|
|
1094
|
+
parent: i
|
|
1090
1095
|
});
|
|
1091
1096
|
}
|
|
1092
1097
|
}
|
|
1093
1098
|
if (b = b + C, b > this.areaBodyCenterGeo.width)
|
|
1094
1099
|
break;
|
|
1095
1100
|
}
|
|
1096
|
-
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new $(b - 1, 1,
|
|
1101
|
+
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new $(b - 1, 1, s.height, 0), i);
|
|
1097
1102
|
}
|
|
1098
1103
|
getTreeArrowColumnIndex() {
|
|
1099
1104
|
return this.tableOptions.showCheckboxWihoutExtraColumn ? 0 : this.tableModel.isRowCheckboxVisible() ? 1 : 0;
|
|
@@ -1102,8 +1107,8 @@ class Ae extends ve {
|
|
|
1102
1107
|
areaModel: e,
|
|
1103
1108
|
areaIdent: t,
|
|
1104
1109
|
sideIdent: o,
|
|
1105
|
-
rowIndex:
|
|
1106
|
-
index:
|
|
1110
|
+
rowIndex: s,
|
|
1111
|
+
index: i,
|
|
1107
1112
|
left: r,
|
|
1108
1113
|
width: l,
|
|
1109
1114
|
height: n,
|
|
@@ -1112,65 +1117,89 @@ class Ae extends ve {
|
|
|
1112
1117
|
lastRowOfModel: c
|
|
1113
1118
|
}) {
|
|
1114
1119
|
var J;
|
|
1115
|
-
const m = this.editorRenderer && this.editorRendererRow ===
|
|
1116
|
-
let
|
|
1117
|
-
if (
|
|
1120
|
+
const m = this.editorRenderer && this.editorRendererRow === s && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(s, i), b = { left: r, width: l, height: n, top: d, index: i }, w = e.getRowByIndex(s);
|
|
1121
|
+
let g = "none";
|
|
1122
|
+
if (i === this.getTreeArrowColumnIndex() && O(w)) {
|
|
1118
1123
|
const x = w;
|
|
1119
|
-
(J = x.children) != null && J.length ? x.expanded ?
|
|
1124
|
+
(J = x.children) != null && J.length ? x.expanded ? g = "expanded" : g = "collapsed" : g = "hidden";
|
|
1120
1125
|
}
|
|
1121
1126
|
let C;
|
|
1122
1127
|
if (t === "header") {
|
|
1123
|
-
const x = this.tableModel.getColumnDef(
|
|
1128
|
+
const x = this.tableModel.getColumnDef(i);
|
|
1124
1129
|
(!(x != null && x.sortIconVisible) || x != null && x.sortIconVisible()) && (C = x == null ? void 0 : x.sortState);
|
|
1125
1130
|
}
|
|
1126
|
-
const v = e.getValueAt(
|
|
1131
|
+
const v = e.getValueAt(s, i), R = m ? "" : `${v}`, y = e.isRowChecked(s), S = this.dom.addColumnDiv(
|
|
1127
1132
|
a,
|
|
1128
1133
|
b,
|
|
1129
|
-
i,
|
|
1130
1134
|
s,
|
|
1135
|
+
i,
|
|
1131
1136
|
t,
|
|
1132
1137
|
o,
|
|
1133
1138
|
R,
|
|
1134
|
-
|
|
1139
|
+
g,
|
|
1135
1140
|
this.tableOptions,
|
|
1136
1141
|
y,
|
|
1137
1142
|
C
|
|
1138
|
-
), T = e.getTooltipAt(
|
|
1143
|
+
), T = e.getTooltipAt(s, i);
|
|
1139
1144
|
T && this.dom.setAttribute(S, "title", T);
|
|
1140
|
-
const A = this.tableModel.getColumnDef(
|
|
1145
|
+
const A = this.tableModel.getColumnDef(i);
|
|
1141
1146
|
A && A.classes[t] && this.dom.addClasses(A.classes[t], S);
|
|
1142
1147
|
let M;
|
|
1143
|
-
m && (M = m.render(S,
|
|
1144
|
-
const V = e.getCustomClassesAt(
|
|
1148
|
+
m && (M = m.render(S, s, i, t, e, v, this.dom.domService));
|
|
1149
|
+
const V = e.getCustomClassesAt(s, i);
|
|
1145
1150
|
if (V.length && this.dom.addClasses(V, S), this.dom.addColumnBorderDivs(this.tableOptions, a, b, t, o), c && this.dom.addHorizontalBorder({ left: r, width: l, height: n, top: d + n }, a), this.getFocusModel && t === "body") {
|
|
1146
1151
|
const x = this.getFocusModel();
|
|
1147
|
-
x != null && x.hasFocus(
|
|
1152
|
+
x != null && x.hasFocus(s, i) && this.dom.addFocusBorderDivs(a, b, {});
|
|
1148
1153
|
}
|
|
1149
1154
|
t === "header" && this.dom.setAttribute(S, "data-ge-action", "drag-column");
|
|
1150
|
-
const W = e.getCustomStyleAt(
|
|
1155
|
+
const W = e.getCustomStyleAt(s, i);
|
|
1151
1156
|
if (W)
|
|
1152
1157
|
for (const x in W)
|
|
1153
1158
|
this.dom.setStyle(S, x, W[x]);
|
|
1154
1159
|
return [S, M];
|
|
1155
1160
|
}
|
|
1161
|
+
applyCssClasses(e, t = {}) {
|
|
1162
|
+
e && Object.entries(t).forEach(([o, s]) => {
|
|
1163
|
+
s ? this.dom.addClass(o, e) : this.dom.removeClass(o, e);
|
|
1164
|
+
});
|
|
1165
|
+
}
|
|
1166
|
+
rerenderCellContent({ area: e, rowIndex: t, columnIndex: o, value: s, cssClasses: i }) {
|
|
1167
|
+
const r = this.tableModel.getAreaModel(e), l = 'div[data-col-index="' + o + '"][data-row-index="' + t + '"][data-area="' + e + '"]', n = document.querySelector(l);
|
|
1168
|
+
if (n) {
|
|
1169
|
+
let d;
|
|
1170
|
+
const c = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === o ? this.editorRenderer : r.getCellRenderer(t, o);
|
|
1171
|
+
if (n.innerText = "", this.applyCssClasses(n, i), c)
|
|
1172
|
+
d = c.render(n, t, o, e, r, s, this.dom.domService), d && this.cleanupFunctions[e].push(d);
|
|
1173
|
+
else {
|
|
1174
|
+
const b = `${s}`;
|
|
1175
|
+
this.dom.addLabelDiv(n, b, !1, t, o, e);
|
|
1176
|
+
}
|
|
1177
|
+
const u = r.getCustomClassesAt(t, o);
|
|
1178
|
+
u.length && this.dom.addClasses(u, n);
|
|
1179
|
+
const m = r.getCustomStyleAt(t, o);
|
|
1180
|
+
if (m)
|
|
1181
|
+
for (const b in m)
|
|
1182
|
+
this.dom.setStyle(n, b, m[b]);
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1156
1185
|
getColumnWidths(e, t) {
|
|
1157
1186
|
const o = [];
|
|
1158
|
-
for (let
|
|
1159
|
-
o.push(this.tableModel.getColumnWidth(
|
|
1187
|
+
for (let s = e; s <= t; s++)
|
|
1188
|
+
o.push(this.tableModel.getColumnWidth(s));
|
|
1160
1189
|
return o;
|
|
1161
1190
|
}
|
|
1162
1191
|
getRowHeights(e, t, o) {
|
|
1163
|
-
const
|
|
1164
|
-
for (let
|
|
1165
|
-
|
|
1166
|
-
return
|
|
1192
|
+
const s = [];
|
|
1193
|
+
for (let i = e; i <= t; i++)
|
|
1194
|
+
s.push(o.getRowHeight(i));
|
|
1195
|
+
return s;
|
|
1167
1196
|
}
|
|
1168
1197
|
adjustHoverRows(e) {
|
|
1169
1198
|
if (this.tableOptions.hoverRowVisible && e.rowIndex > -1) {
|
|
1170
|
-
const t = this.hostElement.clientWidth, o = this.tableModel.getAreaModel("body").getRowHeight(e.rowIndex),
|
|
1199
|
+
const t = this.hostElement.clientWidth, o = this.tableModel.getAreaModel("body").getRowHeight(e.rowIndex), s = e.rowTop + this.areaHeaderCenter.parent.clientHeight - this.scrollTop;
|
|
1171
1200
|
this.dom.applyStyle(this.hoverRow, {
|
|
1172
1201
|
left: "0",
|
|
1173
|
-
top:
|
|
1202
|
+
top: s + "px",
|
|
1174
1203
|
width: t + "px",
|
|
1175
1204
|
height: o + "px",
|
|
1176
1205
|
display: "block"
|
|
@@ -1185,9 +1214,9 @@ class Ae extends ve {
|
|
|
1185
1214
|
}
|
|
1186
1215
|
adjustHoverColumns(e) {
|
|
1187
1216
|
if (this.tableOptions.hoverColumnVisible && e.rowIndex > -1) {
|
|
1188
|
-
const t = this.hostElement.clientHeight, o = this.tableModel.getColumnWidth(e.columnIndex),
|
|
1217
|
+
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;
|
|
1189
1218
|
this.dom.applyStyle(this.hoverColumn, {
|
|
1190
|
-
left:
|
|
1219
|
+
left: i + "px",
|
|
1191
1220
|
top: "0px",
|
|
1192
1221
|
width: o + "px",
|
|
1193
1222
|
height: t + "px",
|
|
@@ -1204,64 +1233,64 @@ class Ae extends ve {
|
|
|
1204
1233
|
debounce(e, t = 1e3) {
|
|
1205
1234
|
this.debounceTimeout && clearTimeout(this.debounceTimeout), this.debounceTimeout = setTimeout(e.bind(this), t);
|
|
1206
1235
|
}
|
|
1207
|
-
renderDragTargetDiv(e, t, o,
|
|
1236
|
+
renderDragTargetDiv(e, t, o, s, i) {
|
|
1208
1237
|
const r = this.dom.applyStylePosistionAbsolute(
|
|
1209
1238
|
this.dom.createDivWithClass("ge-table-drop-zone", e)
|
|
1210
1239
|
);
|
|
1211
|
-
return this.dom.setStyle(r, "left", `${t}px`), this.dom.setStyle(r, "top", `${o}px`), this.dom.setStyle(r, "width", `${
|
|
1240
|
+
return this.dom.setStyle(r, "left", `${t}px`), this.dom.setStyle(r, "top", `${o}px`), this.dom.setStyle(r, "width", `${s}px`), this.dom.setStyle(r, "height", `${i}px`), r;
|
|
1212
1241
|
}
|
|
1213
|
-
renderSelectedBackgroundDiv(e, t, o,
|
|
1214
|
-
let
|
|
1215
|
-
if (!e && t &&
|
|
1242
|
+
renderSelectedBackgroundDiv(e, t, o, s, i, r, l, n, d, a, c) {
|
|
1243
|
+
let u = !1;
|
|
1244
|
+
if (!e && t && s.isSelectable(i, r) && this.getSelectionModel) {
|
|
1216
1245
|
const m = this.getSelectionModel();
|
|
1217
1246
|
if (m) {
|
|
1218
|
-
const b = m.getSelectionCount(
|
|
1219
|
-
|
|
1247
|
+
const b = m.getSelectionCount(i, r);
|
|
1248
|
+
u = b > 0;
|
|
1220
1249
|
for (let w = 0; w < b; w++) {
|
|
1221
|
-
const
|
|
1250
|
+
const g = this.dom.applyStylePosistionAbsolute(
|
|
1222
1251
|
// ge-table-body-west-selected-range
|
|
1223
|
-
this.dom.createDivWithClass(`ge-table-${
|
|
1252
|
+
this.dom.createDivWithClass(`ge-table-${s.areaIdent}-${o}-selected-range`, l)
|
|
1224
1253
|
);
|
|
1225
|
-
this.dom.setStyle(
|
|
1254
|
+
this.dom.setStyle(g, "left", `${n}px`), this.dom.setStyle(g, "top", `${d}px`), this.dom.setStyle(g, "width", `${a}px`), this.dom.setStyle(g, "height", `${c}px`);
|
|
1226
1255
|
}
|
|
1227
1256
|
}
|
|
1228
1257
|
}
|
|
1229
|
-
return
|
|
1258
|
+
return u;
|
|
1230
1259
|
}
|
|
1231
1260
|
renderCell({
|
|
1232
1261
|
areaModel: e,
|
|
1233
1262
|
areaIdent: t,
|
|
1234
1263
|
sideIdent: o,
|
|
1235
|
-
rowIndex:
|
|
1236
|
-
columnIndex:
|
|
1264
|
+
rowIndex: s,
|
|
1265
|
+
columnIndex: i,
|
|
1237
1266
|
left: r,
|
|
1238
1267
|
top: l,
|
|
1239
1268
|
width: n,
|
|
1240
1269
|
height: d,
|
|
1241
1270
|
parent: a,
|
|
1242
1271
|
cellSelected: c,
|
|
1243
|
-
lastRowOfModel:
|
|
1272
|
+
lastRowOfModel: u,
|
|
1244
1273
|
gammaRange: m
|
|
1245
1274
|
}) {
|
|
1246
1275
|
const [b, w] = this.addAndRenderCellDiv({
|
|
1247
1276
|
areaModel: e,
|
|
1248
1277
|
areaIdent: t,
|
|
1249
1278
|
sideIdent: o,
|
|
1250
|
-
rowIndex:
|
|
1251
|
-
index:
|
|
1279
|
+
rowIndex: s,
|
|
1280
|
+
index: i,
|
|
1252
1281
|
left: r,
|
|
1253
1282
|
width: n,
|
|
1254
1283
|
height: d,
|
|
1255
1284
|
top: l,
|
|
1256
1285
|
parent: a,
|
|
1257
|
-
lastRowOfModel:
|
|
1286
|
+
lastRowOfModel: u,
|
|
1258
1287
|
gammaRange: m
|
|
1259
1288
|
});
|
|
1260
1289
|
c && this.dom.addClass(`ge-table-${t}-${o}-selected-range`, b), w && this.cleanupFunctions[t].push(w);
|
|
1261
1290
|
}
|
|
1262
|
-
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: o, cellTop:
|
|
1291
|
+
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: o, cellTop: s, cellWidth: i, cellHeight: r, parent: l }) {
|
|
1263
1292
|
const n = this.dom.domService, d = this.tableOptions.columnResizeHandleWidthInPx ?? 2, a = n.createElement("div");
|
|
1264
|
-
n.setAttribute(a, "data-col-index", `${t}`), n.setAttribute(a, "data-row-index", `${e}`), n.setAttribute(a, "data-area", "header"), n.setAttribute(a, "data-ge-action", "resize-column"), n.addClass(a, "ge-table-column-resize-handle"), n.setStyle(a, "display", "clip"), n.setStyle(a, "position", "absolute"), n.setStyle(a, "cursor", "col-resize"), n.setStyle(a, "left", `${o +
|
|
1293
|
+
n.setAttribute(a, "data-col-index", `${t}`), n.setAttribute(a, "data-row-index", `${e}`), n.setAttribute(a, "data-area", "header"), n.setAttribute(a, "data-ge-action", "resize-column"), n.addClass(a, "ge-table-column-resize-handle"), n.setStyle(a, "display", "clip"), n.setStyle(a, "position", "absolute"), n.setStyle(a, "cursor", "col-resize"), n.setStyle(a, "left", `${o + i - d}px`), n.setStyle(a, "top", `${s}px`), n.setStyle(a, "width", `${d}px`), n.setStyle(a, "height", `${r}px`), n.appendChild(l, a);
|
|
1265
1294
|
}
|
|
1266
1295
|
}
|
|
1267
1296
|
class Ee {
|
|
@@ -1275,15 +1304,15 @@ class Me {
|
|
|
1275
1304
|
}
|
|
1276
1305
|
onHostElementChanged(e) {
|
|
1277
1306
|
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
|
|
1278
|
-
const t = e.target, o = t.getAttribute("data-area"),
|
|
1279
|
-
if (o &&
|
|
1280
|
-
const r = Y(o), l = Number(
|
|
1307
|
+
const t = e.target, o = t.getAttribute("data-area"), s = t.getAttribute("data-row-index"), i = t.getAttribute("data-col-index");
|
|
1308
|
+
if (o && s && i) {
|
|
1309
|
+
const r = Y(o), l = Number(s), n = Number(i);
|
|
1281
1310
|
this.tableScope.updateModelValueAfterEdit(r, l, n, t.value);
|
|
1282
1311
|
}
|
|
1283
1312
|
}
|
|
1284
1313
|
}
|
|
1285
1314
|
}
|
|
1286
|
-
class
|
|
1315
|
+
class ke {
|
|
1287
1316
|
constructor(e = -1, t = -1) {
|
|
1288
1317
|
this.rowIndex = e, this.columnIndex = t;
|
|
1289
1318
|
}
|
|
@@ -1293,22 +1322,22 @@ class U {
|
|
|
1293
1322
|
this.cells = e;
|
|
1294
1323
|
}
|
|
1295
1324
|
static createSingle(e, t) {
|
|
1296
|
-
return new U([new
|
|
1325
|
+
return new U([new ke(e, t)]);
|
|
1297
1326
|
}
|
|
1298
1327
|
}
|
|
1299
|
-
class
|
|
1328
|
+
class Ie {
|
|
1300
1329
|
constructor(e) {
|
|
1301
1330
|
var t, o;
|
|
1302
1331
|
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);
|
|
1303
1332
|
}
|
|
1304
1333
|
onMouseClicked(e, t) {
|
|
1305
|
-
var
|
|
1306
|
-
let o = !1,
|
|
1334
|
+
var i, r, l, n, d, a, c;
|
|
1335
|
+
let o = !1, s = !1;
|
|
1307
1336
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
1308
|
-
const
|
|
1309
|
-
|
|
1337
|
+
const u = this.getSelectionModel(), m = this.getFocusModel();
|
|
1338
|
+
u && m && (m.hasFocus(e.rowIndex, e.columnIndex) || (m.setFocus(e.rowIndex, e.columnIndex), o = !0), (i = e.originalEvent) != null && i.shiftKey || u.hasSelection() && (u.clear(), o = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (u.addSelection(this.createRangeByEvents(e, this.previousEvt)), s = !0, o = !0) : (l = e.originalEvent) != null && l.ctrlKey || (n = e.originalEvent) != null && n.metaKey ? (u.addSelection(E.singleCell(e.rowIndex, e.columnIndex)), s = !0, o = !0) : (d = e.originalEvent) != null && d.altKey && ((a = e.originalEvent) != null && a.ctrlKey || (c = e.originalEvent) != null && c.metaKey) && (u.removeSelection(E.singleCell(e.rowIndex, e.columnIndex)), s = !0, o = !0));
|
|
1310
1339
|
}
|
|
1311
|
-
return
|
|
1340
|
+
return s ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), o;
|
|
1312
1341
|
}
|
|
1313
1342
|
onActionTriggered(e) {
|
|
1314
1343
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
@@ -1319,8 +1348,8 @@ class ke {
|
|
|
1319
1348
|
if (e === "DESELECT_ALL")
|
|
1320
1349
|
return t.clear(), this.tableScope.repaint(), !0;
|
|
1321
1350
|
if (e === "TOGGLE_SELECTION") {
|
|
1322
|
-
const [
|
|
1323
|
-
return t.togglePoint(
|
|
1351
|
+
const [s, i] = o.getFocus();
|
|
1352
|
+
return t.togglePoint(s, i), this.tableScope.repaint(), !0;
|
|
1324
1353
|
}
|
|
1325
1354
|
}
|
|
1326
1355
|
}
|
|
@@ -1328,11 +1357,11 @@ class ke {
|
|
|
1328
1357
|
}
|
|
1329
1358
|
createRangeByEvents(e, t) {
|
|
1330
1359
|
t || (t = e);
|
|
1331
|
-
const o = Math.min(e.rowIndex, t == null ? void 0 : t.rowIndex),
|
|
1360
|
+
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), r = Math.max(e.columnIndex, t == null ? void 0 : t.columnIndex);
|
|
1332
1361
|
return E.create({
|
|
1333
1362
|
rowIndex1: o,
|
|
1334
|
-
columnIndex1:
|
|
1335
|
-
rowIndex2:
|
|
1363
|
+
columnIndex1: i,
|
|
1364
|
+
rowIndex2: s,
|
|
1336
1365
|
columnIndex2: r
|
|
1337
1366
|
});
|
|
1338
1367
|
}
|
|
@@ -1409,8 +1438,8 @@ class De {
|
|
|
1409
1438
|
const t = this.getTokenByEvent(e);
|
|
1410
1439
|
this.isDebug() && console.debug("ShortcutService tokens:", t);
|
|
1411
1440
|
for (const o in this.shortcutActionIdMapping) {
|
|
1412
|
-
const
|
|
1413
|
-
if (this.areTokensEquals(t,
|
|
1441
|
+
const s = o.replace(/opt/g, "alt").replace(/cmd/g, "meta").split(/[\+ ]/g).sort();
|
|
1442
|
+
if (this.areTokensEquals(t, s))
|
|
1414
1443
|
return this.shortcutActionIdMapping[o];
|
|
1415
1444
|
}
|
|
1416
1445
|
}
|
|
@@ -1454,6 +1483,9 @@ class $e {
|
|
|
1454
1483
|
addClass(e, t) {
|
|
1455
1484
|
return t.includes(" ") ? t.split(" ").forEach((o) => e.classList.add(o)) : e.classList.add(t), e;
|
|
1456
1485
|
}
|
|
1486
|
+
removeClass(e, t) {
|
|
1487
|
+
return t.includes(" ") ? t.split(" ").forEach((o) => e.classList.remove(o)) : e.classList.remove(t), e;
|
|
1488
|
+
}
|
|
1457
1489
|
appendChild(e, t) {
|
|
1458
1490
|
e.appendChild(t);
|
|
1459
1491
|
}
|
|
@@ -1468,10 +1500,10 @@ class $e {
|
|
|
1468
1500
|
}
|
|
1469
1501
|
}
|
|
1470
1502
|
class Fe {
|
|
1471
|
-
render(e, t, o,
|
|
1472
|
-
if (
|
|
1503
|
+
render(e, t, o, s, i, r, l) {
|
|
1504
|
+
if (i.isEditable(t, o)) {
|
|
1473
1505
|
l.addClass(e, "ge-table-row-input-div");
|
|
1474
|
-
const n =
|
|
1506
|
+
const n = i.getValueAt(t, o);
|
|
1475
1507
|
e.innerHTML = `
|
|
1476
1508
|
<input
|
|
1477
1509
|
type="text"
|
|
@@ -1479,7 +1511,7 @@ class Fe {
|
|
|
1479
1511
|
autofocus
|
|
1480
1512
|
onfocus="this.setSelectionRange(0, this.value.length)"
|
|
1481
1513
|
data-listen="change"
|
|
1482
|
-
data-area="${
|
|
1514
|
+
data-area="${s}"
|
|
1483
1515
|
data-row-index="${t}"
|
|
1484
1516
|
data-col-index="${o}"
|
|
1485
1517
|
data-input-type="text"
|
|
@@ -1494,8 +1526,8 @@ class Le {
|
|
|
1494
1526
|
}
|
|
1495
1527
|
getSelectionCount(e, t) {
|
|
1496
1528
|
let o = 0;
|
|
1497
|
-
for (const
|
|
1498
|
-
|
|
1529
|
+
for (const s of this.ranges)
|
|
1530
|
+
s.isInRange(e, t) && o++;
|
|
1499
1531
|
return this.allSelected && o++, this.isInNegativeRange(e, t) && (o = 0), o;
|
|
1500
1532
|
}
|
|
1501
1533
|
isInNegativeRange(e, t) {
|
|
@@ -1556,7 +1588,7 @@ class Oe {
|
|
|
1556
1588
|
}
|
|
1557
1589
|
}
|
|
1558
1590
|
const Pe = new Le(), He = new Oe("cell");
|
|
1559
|
-
class
|
|
1591
|
+
class z {
|
|
1560
1592
|
constructor() {
|
|
1561
1593
|
this.overflowX = "auto", this.overflowY = "auto", this.horizontalBorderVisible = !0, this.verticalBorderVisible = !0, this.footerSeparatorBorderVisible = !0, this.headerSeparatorBorderVisible = !0, this.fixedEastSeparatorBorderVisible = !0, this.fixedWestSeparatorBorderVisible = !0, this.tableTopBorderVisible = !0, this.tableBottomBorderVisible = !0, this.hoverRowVisible = !0, this.hoverColumnVisible = !0, this.columnsResizable = !0, this.columnsDraggable = !0, this.columnResizeHandleWidthInPx = 4, this.defaultRowHeights = {
|
|
1562
1594
|
header: 34,
|
|
@@ -1566,26 +1598,26 @@ class N {
|
|
|
1566
1598
|
}
|
|
1567
1599
|
}
|
|
1568
1600
|
class he extends Ae {
|
|
1569
|
-
constructor(e, t, o,
|
|
1601
|
+
constructor(e, t, o, s, i) {
|
|
1570
1602
|
var r;
|
|
1571
1603
|
if (super(
|
|
1572
1604
|
e,
|
|
1573
1605
|
t,
|
|
1574
1606
|
new pe(o),
|
|
1575
|
-
|
|
1576
|
-
), this.eventListener =
|
|
1607
|
+
s
|
|
1608
|
+
), this.eventListener = i, this.selectionService = new Ie(this), this.api = new we(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, i || (this.eventListener = new Q()), (r = this.tableOptions) != null && r.autoRestoreOptions) {
|
|
1577
1609
|
const l = this.tableOptions.autoRestoreOptions, n = l.getStorageKeyFn;
|
|
1578
1610
|
n && (l.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Se(n)), l.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new ye(n)), l.autoRestoreSortingState && (this.storeSortingService = new Ce(n)));
|
|
1579
1611
|
}
|
|
1580
1612
|
this.mouseHandler = new me(this), this.inputHandler = new Me(this), this.shortcutService = new De(this), this.shortcutService.addListener(this.selectionService);
|
|
1581
1613
|
}
|
|
1582
|
-
static create(e, t, o = new
|
|
1614
|
+
static create(e, t, o = new z(), s = new Q(), i = new $e()) {
|
|
1583
1615
|
return new he(
|
|
1584
1616
|
e,
|
|
1585
1617
|
t,
|
|
1586
|
-
|
|
1618
|
+
i,
|
|
1587
1619
|
o,
|
|
1588
|
-
|
|
1620
|
+
s
|
|
1589
1621
|
);
|
|
1590
1622
|
}
|
|
1591
1623
|
onActionTriggered(e) {
|
|
@@ -1594,15 +1626,15 @@ class he extends Ae {
|
|
|
1594
1626
|
if (e === "START_EDITING" && this.getFocusModel) {
|
|
1595
1627
|
const t = this.getFocusModel();
|
|
1596
1628
|
if (t) {
|
|
1597
|
-
const [o,
|
|
1598
|
-
this.tableModel.getBodyModel().isEditable(o,
|
|
1629
|
+
const [o, s] = t.getFocus();
|
|
1630
|
+
this.tableModel.getBodyModel().isEditable(o, s) && (this.clearSelection(), this.initRenderEditor(o, s));
|
|
1599
1631
|
}
|
|
1600
1632
|
return !0;
|
|
1601
1633
|
}
|
|
1602
1634
|
return !1;
|
|
1603
1635
|
}
|
|
1604
|
-
updateModelValueAfterEdit(e, t, o,
|
|
1605
|
-
e === "body" && this.tableModel.getAreaModel(e).setValue(t, o,
|
|
1636
|
+
updateModelValueAfterEdit(e, t, o, s) {
|
|
1637
|
+
e === "body" && this.tableModel.getAreaModel(e).setValue(t, o, s) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(U.createSingle(t, o)), this.hostElement.focus());
|
|
1606
1638
|
}
|
|
1607
1639
|
getApi() {
|
|
1608
1640
|
return this.api;
|
|
@@ -1619,12 +1651,12 @@ class he extends Ae {
|
|
|
1619
1651
|
if (t.originalEvent = e, e) {
|
|
1620
1652
|
const o = e.target;
|
|
1621
1653
|
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) {
|
|
1622
|
-
const
|
|
1623
|
-
t.rowTop =
|
|
1654
|
+
const s = this.tableModel.getAreaModel(t.areaIdent);
|
|
1655
|
+
t.rowTop = s.getYPosByRowIndex(t.rowIndex);
|
|
1624
1656
|
}
|
|
1625
1657
|
if (t.columnLeft = this.tableModel.getXPosByColumnIndex(t.columnIndex), e.ctrlKey && e.altKey) {
|
|
1626
|
-
const
|
|
1627
|
-
this.debugOnce(
|
|
1658
|
+
const s = e.clientY - this.hostElement.offsetTop - this.areaHeaderCenter.parent.clientHeight, i = e.clientX - this.hostElement.offsetLeft - this.areaBodyWestGeo.width;
|
|
1659
|
+
this.debugOnce(i, s);
|
|
1628
1660
|
}
|
|
1629
1661
|
}
|
|
1630
1662
|
return t;
|
|
@@ -1647,20 +1679,20 @@ class he extends Ae {
|
|
|
1647
1679
|
toggleExpandCollapseAll(e = !0) {
|
|
1648
1680
|
var o;
|
|
1649
1681
|
const t = this.tableModel.getBodyModel();
|
|
1650
|
-
|
|
1682
|
+
N(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (o = this.storeStateCollapsedExpandService) == null || o.collapsedStateAll(e));
|
|
1651
1683
|
}
|
|
1652
1684
|
toggleRowCheckbox(e, t, o) {
|
|
1653
1685
|
var n;
|
|
1654
|
-
const
|
|
1655
|
-
|
|
1656
|
-
const l = (n =
|
|
1686
|
+
const s = this.tableModel.getAreaModel(o), i = s.isRowChecked(e), r = i === void 0 || i === "semi" || i === "none";
|
|
1687
|
+
s.setRowChecked(e, r), this.repaint();
|
|
1688
|
+
const l = (n = s.rowSelectionModel) == null ? void 0 : n.getCheckedRows();
|
|
1657
1689
|
this.eventListener.onCheckboxChanged(l || []);
|
|
1658
1690
|
}
|
|
1659
1691
|
onMouseClicked(e, t) {
|
|
1660
1692
|
let o = this.selectionService.onMouseClicked(e, t);
|
|
1661
1693
|
if (!o && this.getFocusModel) {
|
|
1662
|
-
const
|
|
1663
|
-
|
|
1694
|
+
const s = this.getFocusModel();
|
|
1695
|
+
s && (o = s.hasChanged(), s.clearChanged(), o && this.resetEditorRenderer());
|
|
1664
1696
|
}
|
|
1665
1697
|
this.eventListener.onMouseClicked(e), o && this.debounce(this.repaint.bind(this), 10);
|
|
1666
1698
|
}
|
|
@@ -1669,20 +1701,20 @@ class he extends Ae {
|
|
|
1669
1701
|
t && (e && this.clearSelectionModel(), this.tableModel.externalFilterChanged(t), this.scrollViewport.scrollTo(0, 0), this.tableModel.recalcHeightAndPadding(), this.resetSizeOfWrapperDiv(), this.repaint());
|
|
1670
1702
|
}
|
|
1671
1703
|
onHeaderDblClicked(e, t, o) {
|
|
1672
|
-
var
|
|
1673
|
-
const
|
|
1674
|
-
if (
|
|
1704
|
+
var i, r;
|
|
1705
|
+
const s = this.tableModel.getColumnDef(o);
|
|
1706
|
+
if (s != null && s.sortable && s.sortable()) {
|
|
1675
1707
|
e.preventDefault(), e.stopPropagation();
|
|
1676
|
-
const l =
|
|
1677
|
-
this.tableModel.doSort([a]) && ((
|
|
1708
|
+
const l = s.sortStatesOrder ? s.sortStatesOrder : this.tableOptions.sortOrder, n = s.sortState ?? "", d = l[(l.indexOf(n) + 1) % l.length], a = new Ee(o, d);
|
|
1709
|
+
this.tableModel.doSort([a]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((u) => u.sortState = ""), s.sortState = d), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([a]);
|
|
1678
1710
|
}
|
|
1679
1711
|
}
|
|
1680
1712
|
changeFocusCell(e, t) {
|
|
1681
1713
|
if (!this.isEditing() && this.getFocusModel) {
|
|
1682
1714
|
const o = this.getFocusModel();
|
|
1683
1715
|
if (o) {
|
|
1684
|
-
const [
|
|
1685
|
-
return o.setFocus(
|
|
1716
|
+
const [s, i] = o.getFocus();
|
|
1717
|
+
return o.setFocus(s + t, i + e), this.repaint(), !0;
|
|
1686
1718
|
}
|
|
1687
1719
|
}
|
|
1688
1720
|
return !1;
|
|
@@ -1715,21 +1747,21 @@ class he extends Ae {
|
|
|
1715
1747
|
autoRestoreCollapsedExpandedState() {
|
|
1716
1748
|
var e, t;
|
|
1717
1749
|
if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.getRowId && this.storeStateCollapsedExpandService) {
|
|
1718
|
-
const o = this.tableOptions.autoRestoreOptions,
|
|
1719
|
-
if (o.autoRestoreCollapsedExpandedState &&
|
|
1720
|
-
const
|
|
1721
|
-
if (
|
|
1750
|
+
const o = this.tableOptions.autoRestoreOptions, s = o.getRowId;
|
|
1751
|
+
if (o.autoRestoreCollapsedExpandedState && s) {
|
|
1752
|
+
const i = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), r = this.tableModel.getAreaModel("body");
|
|
1753
|
+
if (N(r)) {
|
|
1722
1754
|
const l = r, n = r.getRowCount();
|
|
1723
1755
|
for (let d = 0; d < n; d++) {
|
|
1724
1756
|
const a = r.getRowByIndex(d);
|
|
1725
1757
|
if (a)
|
|
1726
|
-
if (
|
|
1758
|
+
if (i.allExpanded)
|
|
1727
1759
|
a.expanded = !0;
|
|
1728
|
-
else if (
|
|
1760
|
+
else if (i.allCollapsed)
|
|
1729
1761
|
a.expanded = !1;
|
|
1730
1762
|
else {
|
|
1731
|
-
const c =
|
|
1732
|
-
|
|
1763
|
+
const c = s(a.data);
|
|
1764
|
+
i.mode === "expanded" ? a.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(c) : i.mode === "collapsed" && (a.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(c));
|
|
1733
1765
|
}
|
|
1734
1766
|
}
|
|
1735
1767
|
l.recalcVisibleTreeRows();
|
|
@@ -1742,7 +1774,7 @@ class ce {
|
|
|
1742
1774
|
}
|
|
1743
1775
|
ce.themes = ["light", "combat", "paper", "blackboard"];
|
|
1744
1776
|
ce.vars = {
|
|
1745
|
-
light:
|
|
1777
|
+
light: `html[data-theme="light"] {
|
|
1746
1778
|
--ge-table-bg: rgba(255,255,255, 0.5);
|
|
1747
1779
|
--ge-table-header-west-bg: rgba(233, 233, 233, 0.5);
|
|
1748
1780
|
--ge-table-header-center-bg: rgba(233, 233, 233, 0.5);
|
|
@@ -1800,7 +1832,7 @@ ce.vars = {
|
|
|
1800
1832
|
--ge-table-dragged-col-div-bg: lightcyan;
|
|
1801
1833
|
--ge-table-drop-zone-bg: rgba(244, 255, 242, 0.6);
|
|
1802
1834
|
}`,
|
|
1803
|
-
combat:
|
|
1835
|
+
combat: `html[data-theme="combat"] {
|
|
1804
1836
|
--ge-table-bg: #101010;
|
|
1805
1837
|
--ge-table-header-west-bg: #101010;
|
|
1806
1838
|
--ge-table-header-center-bg: #101010;
|
|
@@ -1858,7 +1890,7 @@ ce.vars = {
|
|
|
1858
1890
|
--ge-table-dragged-col-div-bg: #2c2e33;
|
|
1859
1891
|
--ge-table-drop-zone-bg: #101010;
|
|
1860
1892
|
}`,
|
|
1861
|
-
paper:
|
|
1893
|
+
paper: `html[data-theme="paper"] {
|
|
1862
1894
|
--ge-table-bg: #e7e5df;
|
|
1863
1895
|
--ge-table-header-west-bg: oklch(80% 0.02 99 / 48%);
|
|
1864
1896
|
--ge-table-header-center-bg: oklch(80% 0.02 99 / 48%);
|
|
@@ -1916,7 +1948,7 @@ ce.vars = {
|
|
|
1916
1948
|
--ge-table-dragged-col-div-bg: #2c2e33;
|
|
1917
1949
|
--ge-table-drop-zone-bg: #e7e5df;
|
|
1918
1950
|
}`,
|
|
1919
|
-
blackboard:
|
|
1951
|
+
blackboard: `html[data-theme="dark"] {
|
|
1920
1952
|
--ge-table-bg: #0c1021;
|
|
1921
1953
|
--ge-table-header-west-bg: #0c1021;
|
|
1922
1954
|
--ge-table-header-center-bg: #0c1021;
|
|
@@ -1976,32 +2008,32 @@ ce.vars = {
|
|
|
1976
2008
|
}`
|
|
1977
2009
|
};
|
|
1978
2010
|
class Z {
|
|
1979
|
-
constructor(e, t = !0, o,
|
|
1980
|
-
this.data = e, this.expanded = t, this.children = o, this.parent =
|
|
2011
|
+
constructor(e, t = !0, o, s, i = 0, r = !1, l = !1) {
|
|
2012
|
+
this.data = e, this.expanded = t, this.children = o, this.parent = s, this.deep = i, this.checked = r, this.keep = l, this.type = "TreeRow";
|
|
1981
2013
|
}
|
|
1982
2014
|
}
|
|
1983
2015
|
class j {
|
|
1984
2016
|
static buildTreeRows(e, t = "children", o = 12) {
|
|
1985
|
-
const
|
|
1986
|
-
for (const
|
|
1987
|
-
|
|
1988
|
-
return
|
|
2017
|
+
const s = [];
|
|
2018
|
+
for (const i of e)
|
|
2019
|
+
s.push(j.buildTreeRow(i, t, void 0, 0, o));
|
|
2020
|
+
return s;
|
|
1989
2021
|
}
|
|
1990
|
-
static buildTreeRow(e, t = "children", o = new Z(e, !0, [], void 0, 0),
|
|
2022
|
+
static buildTreeRow(e, t = "children", o = new Z(e, !0, [], void 0, 0), s = 0, i = 12) {
|
|
1991
2023
|
var l;
|
|
1992
|
-
if (
|
|
1993
|
-
return console.warn("Max deep limit reached: ",
|
|
2024
|
+
if (s > i)
|
|
2025
|
+
return console.warn("Max deep limit reached: ", s), o;
|
|
1994
2026
|
const r = e[t];
|
|
1995
2027
|
if (r)
|
|
1996
2028
|
for (const n of r) {
|
|
1997
|
-
const d = new Z(n, !0, [], o,
|
|
2029
|
+
const d = new Z(n, !0, [], o, s + 1);
|
|
1998
2030
|
if ((l = o.children) == null || l.push(d), j.buildTreeRow(
|
|
1999
2031
|
n,
|
|
2000
2032
|
t,
|
|
2001
2033
|
d,
|
|
2002
|
-
|
|
2003
|
-
),
|
|
2004
|
-
return console.warn("Max deep limit reached: ",
|
|
2034
|
+
s + 1
|
|
2035
|
+
), s > i)
|
|
2036
|
+
return console.warn("Max deep limit reached: ", s), o;
|
|
2005
2037
|
}
|
|
2006
2038
|
return o;
|
|
2007
2039
|
}
|
|
@@ -2018,26 +2050,26 @@ class f {
|
|
|
2018
2050
|
}
|
|
2019
2051
|
const Ve = () => !0, ee = () => !1;
|
|
2020
2052
|
class H {
|
|
2021
|
-
constructor(e, t, o = new f(100, "px"),
|
|
2022
|
-
this.property = e, this.headerLabel = t, this.width = o, this.classes =
|
|
2053
|
+
constructor(e, t, o = new f(100, "px"), s = new I(), i = new I(), r = new f(100, "px"), l = new f(100, "px"), n, d, a, c, u, m, b, w, g = () => this.visible) {
|
|
2054
|
+
this.property = e, this.headerLabel = t, this.width = o, this.classes = s, this.rendererMap = i, this.minWidth = r, this.maxWidth = l, this.sortable = n, this.sortComparator = d, this.sortState = a, this.sortStatesOrder = c, this.sortIconVisible = u, this.editable = m, this.getEditRenderer = b, this.editInputPipe = w, this.isVisible = g, this.visible = !0;
|
|
2023
2055
|
}
|
|
2024
2056
|
static bodyRenderer(e) {
|
|
2025
|
-
return new
|
|
2057
|
+
return new I(
|
|
2026
2058
|
void 0,
|
|
2027
2059
|
e,
|
|
2028
2060
|
void 0
|
|
2029
2061
|
);
|
|
2030
2062
|
}
|
|
2031
2063
|
static create(e) {
|
|
2032
|
-
const t = new
|
|
2064
|
+
const t = new I(
|
|
2033
2065
|
e.headerRenderer,
|
|
2034
2066
|
e.bodyRenderer,
|
|
2035
2067
|
e.footerRenderer
|
|
2036
|
-
), o = new
|
|
2068
|
+
), o = new I(
|
|
2037
2069
|
e.headerClasses,
|
|
2038
2070
|
e.bodyClasses,
|
|
2039
2071
|
e.footerClasses
|
|
2040
|
-
),
|
|
2072
|
+
), s = e.sortIconVisible ?? e.sortable ?? ee, i = e.editable ?? e.editable ?? ee, r = e.isVisible ?? e.isVisible ?? Ve;
|
|
2041
2073
|
return new H(
|
|
2042
2074
|
e.property ?? "",
|
|
2043
2075
|
e.headerLabel ?? "",
|
|
@@ -2050,18 +2082,18 @@ class H {
|
|
|
2050
2082
|
e.sortComparator,
|
|
2051
2083
|
e.sortState,
|
|
2052
2084
|
e.sortStatesOrder,
|
|
2053
|
-
i,
|
|
2054
2085
|
s,
|
|
2086
|
+
i,
|
|
2055
2087
|
e.getEditRenderer,
|
|
2056
2088
|
e.editInputPipe,
|
|
2057
2089
|
r
|
|
2058
2090
|
);
|
|
2059
2091
|
}
|
|
2060
2092
|
}
|
|
2061
|
-
const Ke = new f(300, "px"), Ue = new f(290, "px"), qe = new f(280, "px"), Je = new f(270, "px"), Qe = new f(260, "px"), Ze = new f(250, "px"), et = new f(240, "px"), tt = new f(230, "px"), ot = new f(220, "px"),
|
|
2093
|
+
const Ke = new f(300, "px"), Ue = new f(290, "px"), qe = new f(280, "px"), Je = new f(270, "px"), Qe = new f(260, "px"), Ze = new f(250, "px"), et = new f(240, "px"), tt = new f(230, "px"), ot = new f(220, "px"), st = new f(210, "px"), te = new f(200, "px"), it = new f(190, "px"), rt = new f(180, "px"), lt = new f(170, "px"), nt = new f(160, "px"), at = new f(150, "px"), dt = new f(140, "px"), ht = new f(130, "px"), ct = new f(120, "px"), ut = new f(110, "px"), gt = new f(100, "px"), bt = new f(90, "px"), pt = new f(80, "px"), ft = new f(70, "px"), mt = new f(60, "px"), wt = new f(50, "px"), St = new f(40, "px"), xt = new f(30, "px"), yt = new f(20, "px"), Ct = new f(10, "px"), vt = new f(0, "px");
|
|
2062
2094
|
class q {
|
|
2063
2095
|
constructor(e, t = [], o = -1) {
|
|
2064
|
-
this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = o, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((
|
|
2096
|
+
this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = o, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((s) => s.rendererMap[e]);
|
|
2065
2097
|
}
|
|
2066
2098
|
getTooltipAt(e, t) {
|
|
2067
2099
|
return "";
|
|
@@ -2120,10 +2152,10 @@ class q {
|
|
|
2120
2152
|
}
|
|
2121
2153
|
setValue(e, t, o) {
|
|
2122
2154
|
var l;
|
|
2123
|
-
const
|
|
2124
|
-
|
|
2125
|
-
const
|
|
2126
|
-
return r.includes(".") ? this.setPropertyValue(
|
|
2155
|
+
const s = (l = this.columnDefs[t]) == null ? void 0 : l.editInputPipe;
|
|
2156
|
+
s && (o = s(o, e, t));
|
|
2157
|
+
const i = this.getRowByIndex(e), r = this.columnDefs[t].property;
|
|
2158
|
+
return r.includes(".") ? this.setPropertyValue(i, r.split("."), o) : (i[r] = o, !0);
|
|
2127
2159
|
}
|
|
2128
2160
|
isSelectable(e, t) {
|
|
2129
2161
|
return !0;
|
|
@@ -2132,16 +2164,16 @@ class q {
|
|
|
2132
2164
|
this.arrayMove(this.cellRenderers, e, t);
|
|
2133
2165
|
}
|
|
2134
2166
|
setPropertyValue(e, t, o) {
|
|
2135
|
-
const
|
|
2136
|
-
if (
|
|
2137
|
-
let
|
|
2138
|
-
return
|
|
2167
|
+
const s = t.shift();
|
|
2168
|
+
if (s) {
|
|
2169
|
+
let i = e[s];
|
|
2170
|
+
return i && t.length ? this.setPropertyValue(i, t, o) : (e[s] = o, !0);
|
|
2139
2171
|
}
|
|
2140
2172
|
return !1;
|
|
2141
2173
|
}
|
|
2142
2174
|
arrayMove(e, t, o) {
|
|
2143
|
-
const
|
|
2144
|
-
return e.splice(o, 0,
|
|
2175
|
+
const s = e.splice(t, 1)[0];
|
|
2176
|
+
return e.splice(o, 0, s), e;
|
|
2145
2177
|
}
|
|
2146
2178
|
calcYPositions() {
|
|
2147
2179
|
const e = this.getRowCount();
|
|
@@ -2151,8 +2183,8 @@ class q {
|
|
|
2151
2183
|
}
|
|
2152
2184
|
}
|
|
2153
2185
|
class _ extends q {
|
|
2154
|
-
constructor(e, t, o,
|
|
2155
|
-
super(e,
|
|
2186
|
+
constructor(e, t, o, s = []) {
|
|
2187
|
+
super(e, s, o), this.areaIdent = e, this.arr = t, this.defaultRowHeight = o, this.columnDefs = s, this.filteredArr = [...t];
|
|
2156
2188
|
}
|
|
2157
2189
|
externalFilterChanged(e) {
|
|
2158
2190
|
this.filteredArr = this.arr ? this.arr.filter(e) : [];
|
|
@@ -2164,9 +2196,9 @@ class _ extends q {
|
|
|
2164
2196
|
return this.filteredArr[e][t];
|
|
2165
2197
|
}
|
|
2166
2198
|
setValue(e, t, o) {
|
|
2167
|
-
var
|
|
2168
|
-
const
|
|
2169
|
-
return
|
|
2199
|
+
var i;
|
|
2200
|
+
const s = (i = this.columnDefs[t]) == null ? void 0 : i.editInputPipe;
|
|
2201
|
+
return s && (o = s(o, e, t)), this.arr[e][t] = o, !0;
|
|
2170
2202
|
}
|
|
2171
2203
|
getRowByIndex(e) {
|
|
2172
2204
|
return this.filteredArr[e];
|
|
@@ -2250,8 +2282,8 @@ class D {
|
|
|
2250
2282
|
class Be {
|
|
2251
2283
|
flattenTree(e, t = []) {
|
|
2252
2284
|
var o;
|
|
2253
|
-
for (const
|
|
2254
|
-
this.isVisible(
|
|
2285
|
+
for (const s of e)
|
|
2286
|
+
this.isVisible(s) && t.push(s), (o = s.children) != null && o.length && this.flattenTree(s.children, t);
|
|
2255
2287
|
return t;
|
|
2256
2288
|
}
|
|
2257
2289
|
isVisible(e) {
|
|
@@ -2269,16 +2301,16 @@ class ue {
|
|
|
2269
2301
|
if (e instanceof Date && t instanceof Date)
|
|
2270
2302
|
return o * (e.getTime() - t.getTime());
|
|
2271
2303
|
if (e instanceof Array && t instanceof Array) {
|
|
2272
|
-
const
|
|
2273
|
-
if (
|
|
2274
|
-
return this.genericSortComparator(
|
|
2304
|
+
const s = e, i = t;
|
|
2305
|
+
if (s.length && i.length)
|
|
2306
|
+
return this.genericSortComparator(s[0], i[0], o);
|
|
2275
2307
|
}
|
|
2276
2308
|
return o * ("" + e).localeCompare("" + t);
|
|
2277
2309
|
}
|
|
2278
2310
|
}
|
|
2279
2311
|
class oe extends q {
|
|
2280
|
-
constructor(e, t, o,
|
|
2281
|
-
super(e,
|
|
2312
|
+
constructor(e, t, o, s = []) {
|
|
2313
|
+
super(e, s, o), this.areaIdent = e, this.rows = t, this.defaultRowHeight = o, this.columnDefs = s, this.type = "AreaModelTree", this.sorterService = new ue(), this.service = new Be(), this.properties = s.map((i) => i.property), this.flattenRows = this.service.flattenTree(t), this.filteredFlattenRows = [...this.flattenRows];
|
|
2282
2314
|
}
|
|
2283
2315
|
changeColumnOrder(e, t) {
|
|
2284
2316
|
this.arrayMove(this.properties, e, t), super.changeColumnOrder(e, t);
|
|
@@ -2298,9 +2330,9 @@ class oe extends q {
|
|
|
2298
2330
|
getValueAt(e, t) {
|
|
2299
2331
|
const o = this.getRowByIndex(e);
|
|
2300
2332
|
if (o) {
|
|
2301
|
-
const
|
|
2302
|
-
if (
|
|
2303
|
-
return
|
|
2333
|
+
const s = this.properties[t];
|
|
2334
|
+
if (s)
|
|
2335
|
+
return s.includes(".") ? this.getPropertyValue(o.data, s.split(".")) : o.data[s];
|
|
2304
2336
|
}
|
|
2305
2337
|
return "";
|
|
2306
2338
|
}
|
|
@@ -2320,8 +2352,8 @@ class oe extends q {
|
|
|
2320
2352
|
this.lastPredictFn = e, this.doFiltering();
|
|
2321
2353
|
}
|
|
2322
2354
|
doSort(e) {
|
|
2323
|
-
const { columnIndex: t, sortState: o } = e[e.length - 1],
|
|
2324
|
-
return this.treeSort(this.rows,
|
|
2355
|
+
const { columnIndex: t, sortState: o } = e[e.length - 1], s = o === "asc" ? 1 : o === "desc" ? -1 : 0, i = this.properties[t];
|
|
2356
|
+
return this.treeSort(this.rows, i, s), this.flattenRows = this.service.flattenTree(this.rows), this.filteredFlattenRows = [...this.flattenRows], !0;
|
|
2325
2357
|
}
|
|
2326
2358
|
toggleExpandCollapseAll(e) {
|
|
2327
2359
|
this.expandAllRecursive(this.rows, e), this.flattenRows = this.service.flattenTree(this.rows), this.doFiltering();
|
|
@@ -2331,19 +2363,19 @@ class oe extends q {
|
|
|
2331
2363
|
}
|
|
2332
2364
|
setValue(e, t, o) {
|
|
2333
2365
|
var r;
|
|
2334
|
-
const
|
|
2335
|
-
|
|
2336
|
-
const
|
|
2337
|
-
if (
|
|
2338
|
-
const l =
|
|
2366
|
+
const s = (r = this.columnDefs[t]) == null ? void 0 : r.editInputPipe;
|
|
2367
|
+
s && (o = s(o, e, t));
|
|
2368
|
+
const i = this.getRowByIndex(e);
|
|
2369
|
+
if (i) {
|
|
2370
|
+
const l = i.data, n = this.columnDefs[t].property;
|
|
2339
2371
|
return n.includes(".") ? this.setPropertyValue(l, n.split("."), o) : (l[n] = o, !0);
|
|
2340
2372
|
}
|
|
2341
2373
|
return !1;
|
|
2342
2374
|
}
|
|
2343
2375
|
genericTreeTableSortComparator(e, t) {
|
|
2344
|
-
return (o,
|
|
2345
|
-
const
|
|
2346
|
-
return this.sorterService.genericSortComparator(
|
|
2376
|
+
return (o, s) => {
|
|
2377
|
+
const i = this.getValueByT(o.data, e), r = this.getValueByT(s.data, e);
|
|
2378
|
+
return this.sorterService.genericSortComparator(i, r, t);
|
|
2347
2379
|
};
|
|
2348
2380
|
}
|
|
2349
2381
|
expandAllRecursive(e, t) {
|
|
@@ -2360,27 +2392,27 @@ class oe extends q {
|
|
|
2360
2392
|
e = Math.max(e, o.deep);
|
|
2361
2393
|
});
|
|
2362
2394
|
const t = this.flattenRows.filter(
|
|
2363
|
-
(o,
|
|
2395
|
+
(o, s, i) => this.lastPredictFn(o, s, i)
|
|
2364
2396
|
);
|
|
2365
2397
|
this.flattenRows.forEach((o) => o.keep = !1), this.flattenRows.forEach((o) => {
|
|
2366
2398
|
t.includes(o) && (o.keep = !0, this.setAllParentsOk(o));
|
|
2367
2399
|
}), this.filteredFlattenRows = this.flattenRows.filter(
|
|
2368
|
-
(o,
|
|
2400
|
+
(o, s, i) => o.keep
|
|
2369
2401
|
);
|
|
2370
2402
|
}
|
|
2371
2403
|
}
|
|
2372
2404
|
getPropertyValue(e, t) {
|
|
2373
2405
|
const o = t.shift();
|
|
2374
|
-
let
|
|
2375
|
-
return
|
|
2406
|
+
let s = e[o];
|
|
2407
|
+
return s && t.length ? this.getPropertyValue(s, t) : s;
|
|
2376
2408
|
}
|
|
2377
2409
|
treeSort(e, t, o) {
|
|
2378
2410
|
e.sort(this.genericTreeTableSortComparator(t, o));
|
|
2379
|
-
for (const
|
|
2380
|
-
|
|
2411
|
+
for (const s of e)
|
|
2412
|
+
s.children && this.treeSort(s.children, t, o);
|
|
2381
2413
|
}
|
|
2382
2414
|
}
|
|
2383
|
-
class
|
|
2415
|
+
class se {
|
|
2384
2416
|
constructor(e = []) {
|
|
2385
2417
|
this.allRootNodes = e;
|
|
2386
2418
|
}
|
|
@@ -2420,8 +2452,8 @@ class ie {
|
|
|
2420
2452
|
areAllChildrenChecked(e) {
|
|
2421
2453
|
var t, o;
|
|
2422
2454
|
if ((t = e.children) != null && t.length) {
|
|
2423
|
-
for (const
|
|
2424
|
-
if (!
|
|
2455
|
+
for (const s of e.children)
|
|
2456
|
+
if (!s.checked || (o = s.children) != null && o.length && !this.areAllChildrenChecked(s))
|
|
2425
2457
|
return !1;
|
|
2426
2458
|
}
|
|
2427
2459
|
return !0;
|
|
@@ -2429,8 +2461,8 @@ class ie {
|
|
|
2429
2461
|
areAllChildrenUnchecked(e) {
|
|
2430
2462
|
var t, o;
|
|
2431
2463
|
if ((t = e.children) != null && t.length) {
|
|
2432
|
-
for (const
|
|
2433
|
-
if (
|
|
2464
|
+
for (const s of e.children)
|
|
2465
|
+
if (s.checked || (o = s.children) != null && o.length && !this.areAllChildrenUnchecked(s))
|
|
2434
2466
|
return !1;
|
|
2435
2467
|
}
|
|
2436
2468
|
return !0;
|
|
@@ -2440,9 +2472,9 @@ class ie {
|
|
|
2440
2472
|
o.checked && t.push(o), o.children && this.addSelectedRecursive(o.children, t);
|
|
2441
2473
|
}
|
|
2442
2474
|
}
|
|
2443
|
-
class
|
|
2444
|
-
constructor(e = 0, t = 0, o = 0,
|
|
2445
|
-
this.top = e, this.right = t, this.bottom = o, this.left =
|
|
2475
|
+
class ie {
|
|
2476
|
+
constructor(e = 0, t = 0, o = 0, s = 0) {
|
|
2477
|
+
this.top = e, this.right = t, this.bottom = o, this.left = s;
|
|
2446
2478
|
}
|
|
2447
2479
|
}
|
|
2448
2480
|
class We {
|
|
@@ -2477,10 +2509,10 @@ class We {
|
|
|
2477
2509
|
}
|
|
2478
2510
|
}
|
|
2479
2511
|
class G {
|
|
2480
|
-
constructor(e, t, o,
|
|
2512
|
+
constructor(e, t, o, s = 0, i = 0, r = !1, l = new P(), n = [], d = [], a = -1, c = 0, u = 400, m = () => {
|
|
2481
2513
|
}) {
|
|
2482
|
-
var b, w,
|
|
2483
|
-
this.headerAreaModel = e, this.bodyAreaModel = t, this.footerAreaModel = o, this.fixedLeftColumnCount =
|
|
2514
|
+
var b, w, g, p;
|
|
2515
|
+
this.headerAreaModel = e, this.bodyAreaModel = t, this.footerAreaModel = o, this.fixedLeftColumnCount = s, this.fixedRightColumnCount = i, this.rowCheckboxVisible = r, this.defaultRowHeights = l, this.columnDefs = n, this.columnSizes = d, this.overridingColumnWidth = a, this.columnCount = c, this.parentSize = u, this.getSelectionModel = m, this.rowCount = 0, this.contentHeightInPx = 0, this.contentWidthInPx = 0, this.padding = new ie(0, 0, 0, 0), this.xPositions = [], e.areaIdent = "header", t.areaIdent = "body", o.areaIdent = "footer", this.columnCount || ((b = this.columnDefs) != null && b.length ? this.columnCount = this.columnDefs.length : (w = this.columnSizes) != null && w.length && (this.columnCount = (g = this.columnSizes) == null ? void 0 : g.length)), (p = this.columnDefs) != null && p.length && be(this.columnDefs[0]) && !t.rowSelectionModel && (t.rowSelectionModel = new We());
|
|
2484
2516
|
}
|
|
2485
2517
|
init() {
|
|
2486
2518
|
this.recalcSize(this.parentSize), this.overridingColumnWidth === -1 && this.calcXPositions(), this.headerAreaModel && this.headerAreaModel.init(), this.bodyAreaModel && this.bodyAreaModel.init(), this.footerAreaModel && this.footerAreaModel.init();
|
|
@@ -2508,11 +2540,11 @@ class G {
|
|
|
2508
2540
|
this.rowCount = e.getRowCount(), this.contentHeightInPx = this.getAreaHeight("body"), this.recalcContentWidthInPx(), this.recalcPadding();
|
|
2509
2541
|
}
|
|
2510
2542
|
recalcPadding() {
|
|
2511
|
-
const e = this.getSideAreaWidth("west"), t = this.getSideAreaWidth("east"), o = this.getAreaHeight("header"),
|
|
2512
|
-
this.padding = new
|
|
2543
|
+
const e = this.getSideAreaWidth("west"), t = this.getSideAreaWidth("east"), o = this.getAreaHeight("header"), s = this.getAreaHeight("footer");
|
|
2544
|
+
this.padding = new ie(
|
|
2513
2545
|
o,
|
|
2514
2546
|
t,
|
|
2515
|
-
|
|
2547
|
+
s,
|
|
2516
2548
|
e
|
|
2517
2549
|
);
|
|
2518
2550
|
}
|
|
@@ -2535,22 +2567,22 @@ class G {
|
|
|
2535
2567
|
const t = this.getModel(e), o = t.getRowCount();
|
|
2536
2568
|
if (this.defaultRowHeights[e])
|
|
2537
2569
|
return o * this.defaultRowHeights[e];
|
|
2538
|
-
let
|
|
2539
|
-
for (let
|
|
2540
|
-
|
|
2541
|
-
return
|
|
2570
|
+
let s = 0;
|
|
2571
|
+
for (let i = 0; i < o; i++)
|
|
2572
|
+
s = s + t.getRowHeight(i);
|
|
2573
|
+
return s;
|
|
2542
2574
|
}
|
|
2543
2575
|
getSideAreaWidth(e) {
|
|
2544
2576
|
const [t, o] = this.getSideStartAndEndColumnIndex(e);
|
|
2545
|
-
let
|
|
2546
|
-
for (let
|
|
2547
|
-
|
|
2548
|
-
return
|
|
2577
|
+
let s = 0;
|
|
2578
|
+
for (let i = t; i <= o; i++)
|
|
2579
|
+
s = s + this.getColumnWidth(i);
|
|
2580
|
+
return s;
|
|
2549
2581
|
}
|
|
2550
2582
|
getSideStartAndEndColumnIndex(e) {
|
|
2551
2583
|
const t = this.getFixedLeftColumnCount(), o = this.getFixedRightColumnCount();
|
|
2552
|
-
let
|
|
2553
|
-
return e === "west" ?
|
|
2584
|
+
let s = 0, i = this.columnCount - 1;
|
|
2585
|
+
return e === "west" ? i = t - 1 : e === "east" ? s = this.columnCount - o : (s = t, i = this.columnCount - o - 1), [s, i];
|
|
2554
2586
|
}
|
|
2555
2587
|
getColumnDef(e) {
|
|
2556
2588
|
if (e < this.columnDefs.length)
|
|
@@ -2604,30 +2636,30 @@ class G {
|
|
|
2604
2636
|
return this.columnDefs && e < this.columnDefs.length && this.columnDefs[e].sortable ? this.columnDefs[e].sortable() : !1;
|
|
2605
2637
|
}
|
|
2606
2638
|
changeColumnOrder(e, t) {
|
|
2607
|
-
var o,
|
|
2608
|
-
this.arrayMove(this.columnDefs, e, t), this.arrayMove(this.columnSizes, e, t), (o = this.headerAreaModel) == null || o.changeColumnOrder(e, t), (
|
|
2639
|
+
var o, s, i;
|
|
2640
|
+
this.arrayMove(this.columnDefs, e, t), this.arrayMove(this.columnSizes, e, t), (o = this.headerAreaModel) == null || o.changeColumnOrder(e, t), (s = this.bodyAreaModel) == null || s.changeColumnOrder(e, t), (i = this.footerAreaModel) == null || i.changeColumnOrder(e, t), this.calcXPositions();
|
|
2609
2641
|
}
|
|
2610
2642
|
recalcColumnWidthes(e) {
|
|
2611
|
-
var t, o,
|
|
2612
|
-
!((t = this.columnDefs) != null && t.length) && !((o = this.columnSizes) != null && o.length) && (this.columnSizes = new Array(this.getColumnCount()).fill(this.overridingColumnWidth)), (
|
|
2613
|
-
if (
|
|
2614
|
-
let r = Math.floor(
|
|
2615
|
-
if (
|
|
2616
|
-
let l =
|
|
2643
|
+
var t, o, s;
|
|
2644
|
+
!((t = this.columnDefs) != null && t.length) && !((o = this.columnSizes) != null && o.length) && (this.columnSizes = new Array(this.getColumnCount()).fill(this.overridingColumnWidth)), (s = this.columnDefs) != null && s.length && (this.columnSizes = this.columnDefs.map((i) => {
|
|
2645
|
+
if (i.width.unit === "%" && e) {
|
|
2646
|
+
let r = Math.floor(i.width.value * e / 100);
|
|
2647
|
+
if (i.minWidth) {
|
|
2648
|
+
let l = i.minWidth.unit === "px" ? i.minWidth.value : Math.floor(i.minWidth.value * e / 100);
|
|
2617
2649
|
r = Math.max(l, r);
|
|
2618
2650
|
}
|
|
2619
|
-
if (
|
|
2620
|
-
let l =
|
|
2651
|
+
if (i.maxWidth) {
|
|
2652
|
+
let l = i.maxWidth.unit === "px" ? i.maxWidth.value : Math.floor(i.maxWidth.value * e / 100);
|
|
2621
2653
|
r = Math.min(l, r);
|
|
2622
2654
|
}
|
|
2623
2655
|
return r;
|
|
2624
2656
|
}
|
|
2625
|
-
return
|
|
2657
|
+
return i.width.value;
|
|
2626
2658
|
}));
|
|
2627
2659
|
}
|
|
2628
2660
|
arrayMove(e, t, o) {
|
|
2629
|
-
const
|
|
2630
|
-
return e.splice(o, 0,
|
|
2661
|
+
const s = e.splice(t, 1)[0];
|
|
2662
|
+
return e.splice(o, 0, s), e;
|
|
2631
2663
|
}
|
|
2632
2664
|
recalcContentWidthInPx() {
|
|
2633
2665
|
this.contentWidthInPx = this.getSideAreaWidth("center");
|
|
@@ -2640,8 +2672,8 @@ class G {
|
|
|
2640
2672
|
}
|
|
2641
2673
|
}
|
|
2642
2674
|
class Ge extends q {
|
|
2643
|
-
constructor(e, t, o,
|
|
2644
|
-
super(e,
|
|
2675
|
+
constructor(e, t, o, s = []) {
|
|
2676
|
+
super(e, s, o), this.areaIdent = e, this.rows = t, this.defaultRowHeight = o, this.columnDefs = s, this.sorterService = new ue(), this.filteredRows = [...t], this.properties = s.map((i) => i.property);
|
|
2645
2677
|
}
|
|
2646
2678
|
getRowCount() {
|
|
2647
2679
|
var e;
|
|
@@ -2649,8 +2681,8 @@ class Ge extends q {
|
|
|
2649
2681
|
}
|
|
2650
2682
|
getValueAt(e, t) {
|
|
2651
2683
|
const o = this.properties[t];
|
|
2652
|
-
let
|
|
2653
|
-
return O(
|
|
2684
|
+
let s = this.filteredRows[e];
|
|
2685
|
+
return O(s) && (s = s.data), s ? this.getValueByT(s, o) : "";
|
|
2654
2686
|
}
|
|
2655
2687
|
getFilteredRows() {
|
|
2656
2688
|
return this.filteredRows;
|
|
@@ -2669,8 +2701,8 @@ class Ge extends q {
|
|
|
2669
2701
|
}
|
|
2670
2702
|
doSort(e) {
|
|
2671
2703
|
for (const t of e) {
|
|
2672
|
-
const { columnIndex: o, sortState:
|
|
2673
|
-
this.filteredRows = this.filteredRows.sort(this.genericFlatTableSortComparator(r,
|
|
2704
|
+
const { columnIndex: o, sortState: s } = t, i = s === "asc" ? 1 : s === "desc" ? -1 : 0, r = this.properties[o];
|
|
2705
|
+
this.filteredRows = this.filteredRows.sort(this.genericFlatTableSortComparator(r, i));
|
|
2674
2706
|
}
|
|
2675
2707
|
return !0;
|
|
2676
2708
|
}
|
|
@@ -2681,55 +2713,55 @@ class Ge extends q {
|
|
|
2681
2713
|
this.arrayMove(this.properties, e, t), super.changeColumnOrder(e, t);
|
|
2682
2714
|
}
|
|
2683
2715
|
genericFlatTableSortComparator(e, t) {
|
|
2684
|
-
return (o,
|
|
2685
|
-
const
|
|
2686
|
-
return this.sorterService.genericSortComparator(
|
|
2716
|
+
return (o, s) => {
|
|
2717
|
+
const i = this.getValueByT(o, e), r = this.getValueByT(s, e);
|
|
2718
|
+
return this.sorterService.genericSortComparator(i, r, t);
|
|
2687
2719
|
};
|
|
2688
2720
|
}
|
|
2689
2721
|
getPropertyValue(e, t) {
|
|
2690
2722
|
const o = t.shift();
|
|
2691
|
-
let
|
|
2692
|
-
return
|
|
2723
|
+
let s = e[o];
|
|
2724
|
+
return s && t.length ? this.getPropertyValue(s, t) : s;
|
|
2693
2725
|
}
|
|
2694
2726
|
}
|
|
2695
2727
|
class re extends Ge {
|
|
2696
|
-
constructor(e, t, o,
|
|
2728
|
+
constructor(e, t, o, s) {
|
|
2697
2729
|
super(
|
|
2698
2730
|
e,
|
|
2699
2731
|
t,
|
|
2700
|
-
|
|
2732
|
+
s,
|
|
2701
2733
|
o
|
|
2702
|
-
), this.areaIdent = e, this.rows = t, this.columnDefs = o, this.defaultRowHeight =
|
|
2734
|
+
), this.areaIdent = e, this.rows = t, this.columnDefs = o, this.defaultRowHeight = s;
|
|
2703
2735
|
}
|
|
2704
2736
|
}
|
|
2705
2737
|
class L {
|
|
2706
2738
|
static createTableModel(e) {
|
|
2707
|
-
var t, o,
|
|
2739
|
+
var t, o, s, i, r, l, n, d, a, c, u, m, b, w;
|
|
2708
2740
|
if (e.defaultRowHeights === void 0)
|
|
2709
2741
|
if ((t = e.tableOptions) != null && t.defaultRowHeights)
|
|
2710
2742
|
e.defaultRowHeights = e.tableOptions.defaultRowHeights;
|
|
2711
2743
|
else {
|
|
2712
2744
|
if (e.defaultRowHeights = new P(), e.headerAreaModel && "defaultRowHeight" in e.headerAreaModel) {
|
|
2713
|
-
const
|
|
2714
|
-
|
|
2745
|
+
const g = e.headerAreaModel.defaultRowHeight;
|
|
2746
|
+
g > -1 && (e.defaultRowHeights.header = g);
|
|
2715
2747
|
}
|
|
2716
2748
|
if (e.bodyAreaModel && "defaultRowHeight" in e.bodyAreaModel) {
|
|
2717
|
-
const
|
|
2718
|
-
|
|
2749
|
+
const g = e.bodyAreaModel.defaultRowHeight;
|
|
2750
|
+
g > -1 && (e.defaultRowHeights.body = g);
|
|
2719
2751
|
}
|
|
2720
2752
|
if (e.footerAreaModel && "defaultRowHeight" in e.footerAreaModel) {
|
|
2721
|
-
const
|
|
2722
|
-
|
|
2753
|
+
const g = e.footerAreaModel.defaultRowHeight;
|
|
2754
|
+
g > -1 && (e.defaultRowHeights.footer = g);
|
|
2723
2755
|
}
|
|
2724
2756
|
}
|
|
2725
|
-
if (e.columnDefs === void 0 && ((o = e.properties) != null && o.length ? e.columnDefs = e.properties.map((
|
|
2757
|
+
if (e.columnDefs === void 0 && ((o = e.properties) != null && o.length ? e.columnDefs = e.properties.map((g) => new H(g, g.toUpperCase(), te)) : (s = e.rows) != null && s.length ? e.columnDefs = Object.keys(e.rows[0]).map((g) => new H(g, g.toUpperCase(), te)) : e.columnDefs = []), e.columnCount === void 0 && ((i = e.columnDefs) != null && i.length ? e.columnCount = e.columnDefs.length : (r = e.headerData) != null && r.length ? e.columnCount = e.headerData[0].length : (l = e.columnSizes) != null && l.length ? e.columnCount = (n = e.columnSizes) == null ? void 0 : n.length : console.warn('Property "columnCount" is missing and cannot be derived from other properties.')), e.headerAreaModel || ((d = e.headerData) != null && d.length ? e.headerAreaModel = new _(
|
|
2726
2758
|
"header",
|
|
2727
2759
|
e.headerData,
|
|
2728
2760
|
e.defaultRowHeights.header,
|
|
2729
2761
|
e.columnDefs
|
|
2730
2762
|
) : (a = e.columnDefs) != null && a.length ? e.headerAreaModel = new _(
|
|
2731
2763
|
"header",
|
|
2732
|
-
[e.columnDefs.map((
|
|
2764
|
+
[e.columnDefs.map((g) => g.headerLabel)],
|
|
2733
2765
|
e.defaultRowHeights.header,
|
|
2734
2766
|
e.columnDefs
|
|
2735
2767
|
) : e.headerAreaModel = new D("header")), e.footerAreaModel || ((c = e.footerData) != null && c.length ? e.footerAreaModel = new _(
|
|
@@ -2739,14 +2771,14 @@ class L {
|
|
|
2739
2771
|
e.columnDefs
|
|
2740
2772
|
) : e.footerAreaModel = new D("footer")), !e.bodyAreaModel)
|
|
2741
2773
|
if (e.rows)
|
|
2742
|
-
if ((
|
|
2743
|
-
const
|
|
2774
|
+
if ((u = e.rows) != null && u.length && O(e.rows[0])) {
|
|
2775
|
+
const g = e.rows;
|
|
2744
2776
|
e.bodyAreaModel = new oe(
|
|
2745
2777
|
"body",
|
|
2746
|
-
|
|
2778
|
+
g,
|
|
2747
2779
|
e.defaultRowHeights.body,
|
|
2748
2780
|
e.columnDefs
|
|
2749
|
-
), (e.columnDefs[0].property === "CheckboxColumn" || (m = e.tableOptions) != null && m.showCheckboxWihoutExtraColumn) && (e.bodyAreaModel.rowSelectionModel = new
|
|
2781
|
+
), (e.columnDefs[0].property === "CheckboxColumn" || (m = e.tableOptions) != null && m.showCheckboxWihoutExtraColumn) && (e.bodyAreaModel.rowSelectionModel = new se(g));
|
|
2750
2782
|
} else
|
|
2751
2783
|
e.bodyAreaModel = new re(
|
|
2752
2784
|
"body",
|
|
@@ -2780,12 +2812,12 @@ class L {
|
|
|
2780
2812
|
return L.buildByTypedRows(
|
|
2781
2813
|
e.rows ?? [],
|
|
2782
2814
|
e.columnDefs,
|
|
2783
|
-
e.tableOptions ?? new
|
|
2815
|
+
e.tableOptions ?? new z(),
|
|
2784
2816
|
e.fixedLeftColumnCount ?? 0,
|
|
2785
2817
|
e.fixedRightColumnCount ?? 0
|
|
2786
2818
|
);
|
|
2787
2819
|
}
|
|
2788
|
-
static buildByTypedRows(e, t, o = new
|
|
2820
|
+
static buildByTypedRows(e, t, o = new z(), s = 0, i = 0) {
|
|
2789
2821
|
const r = o.defaultRowHeights, l = t[0].property === "CheckboxColumn";
|
|
2790
2822
|
if (e != null && e.length && O(e[0])) {
|
|
2791
2823
|
const n = e, d = new oe(
|
|
@@ -2794,13 +2826,13 @@ class L {
|
|
|
2794
2826
|
r.body,
|
|
2795
2827
|
t
|
|
2796
2828
|
);
|
|
2797
|
-
return (l || o.showCheckboxWihoutExtraColumn) && (d.rowSelectionModel = new
|
|
2829
|
+
return (l || o.showCheckboxWihoutExtraColumn) && (d.rowSelectionModel = new se(n)), L.createByAreaModelsParam({
|
|
2798
2830
|
headerAreaModel: new _("header", [t.map((a) => a.headerLabel)], r.header),
|
|
2799
2831
|
bodyAreaModel: d,
|
|
2800
2832
|
footerAreaModel: new _("footer", [], r.footer),
|
|
2801
2833
|
columnDefs: t,
|
|
2802
|
-
fixedLeftColumnCount:
|
|
2803
|
-
fixedRightColumnCount:
|
|
2834
|
+
fixedLeftColumnCount: s,
|
|
2835
|
+
fixedRightColumnCount: i,
|
|
2804
2836
|
defaultRowHeights: o.defaultRowHeights,
|
|
2805
2837
|
rowCheckboxVisible: !1,
|
|
2806
2838
|
columnSizes: [],
|
|
@@ -2811,8 +2843,8 @@ class L {
|
|
|
2811
2843
|
return L.createByObjectArrayParam({
|
|
2812
2844
|
rows: e,
|
|
2813
2845
|
columnDefs: t,
|
|
2814
|
-
fixedLeftColumnCount:
|
|
2815
|
-
fixedRightColumnCount:
|
|
2846
|
+
fixedLeftColumnCount: s,
|
|
2847
|
+
fixedRightColumnCount: i,
|
|
2816
2848
|
defaultRowHeights: o.defaultRowHeights
|
|
2817
2849
|
});
|
|
2818
2850
|
}
|
|
@@ -2830,13 +2862,13 @@ class L {
|
|
|
2830
2862
|
e.columnSizes ?? []
|
|
2831
2863
|
);
|
|
2832
2864
|
}
|
|
2833
|
-
static createByAreaModels(e = new D(), t, o = new D(),
|
|
2865
|
+
static createByAreaModels(e = new D(), t, o = new D(), s = 0, i = 0, r = !1, l = new P(), n, d = [], a = -1, c) {
|
|
2834
2866
|
return new G(
|
|
2835
2867
|
e,
|
|
2836
2868
|
t,
|
|
2837
2869
|
o,
|
|
2838
|
-
i,
|
|
2839
2870
|
s,
|
|
2871
|
+
i,
|
|
2840
2872
|
r,
|
|
2841
2873
|
l,
|
|
2842
2874
|
n,
|
|
@@ -2860,16 +2892,16 @@ class L {
|
|
|
2860
2892
|
e.columnCount ?? 0
|
|
2861
2893
|
);
|
|
2862
2894
|
}
|
|
2863
|
-
static createByObjectArray(e, t = [], o = [],
|
|
2895
|
+
static createByObjectArray(e, t = [], o = [], s = 0, i = 0, r = !1, l = new P(), n, d = []) {
|
|
2864
2896
|
let a;
|
|
2865
2897
|
t != null && t.length ? a = new _("header", t, l.header, n) : n != null && n.length ? a = new _("header", [n.map((m) => m.headerLabel)], l.header, n) : a = new D();
|
|
2866
|
-
const c = o ? new _("footer", o, l.footer, n) : new D(),
|
|
2898
|
+
const c = o ? new _("footer", o, l.footer, n) : new D(), u = new re("body", e, n, l.body);
|
|
2867
2899
|
return new G(
|
|
2868
2900
|
a,
|
|
2869
|
-
|
|
2901
|
+
u,
|
|
2870
2902
|
c,
|
|
2871
|
-
i,
|
|
2872
2903
|
s,
|
|
2904
|
+
i,
|
|
2873
2905
|
r,
|
|
2874
2906
|
l,
|
|
2875
2907
|
n,
|
|
@@ -2900,25 +2932,25 @@ class At {
|
|
|
2900
2932
|
this.tableModel = e, this.tableOptions = t;
|
|
2901
2933
|
}
|
|
2902
2934
|
}
|
|
2903
|
-
class
|
|
2904
|
-
constructor(e, t, o,
|
|
2905
|
-
this.emmitDataKey = e, this.emmitCancelKey = t, this.queryId = o, this.filter =
|
|
2935
|
+
class Ne {
|
|
2936
|
+
constructor(e, t, o, s, i, r, l) {
|
|
2937
|
+
this.emmitDataKey = e, this.emmitCancelKey = t, this.queryId = o, this.filter = s, this.sorting = i, this.startIndex = r, this.endIndex = l;
|
|
2906
2938
|
}
|
|
2907
2939
|
}
|
|
2908
|
-
class Et extends
|
|
2909
|
-
constructor(e, t, o,
|
|
2940
|
+
class Et extends Ne {
|
|
2941
|
+
constructor(e, t, o, s, i, r, l, n) {
|
|
2910
2942
|
super(
|
|
2911
2943
|
e,
|
|
2912
2944
|
t,
|
|
2913
2945
|
o,
|
|
2914
|
-
i,
|
|
2915
2946
|
s,
|
|
2947
|
+
i,
|
|
2916
2948
|
r,
|
|
2917
2949
|
l
|
|
2918
2950
|
), this.rows = n;
|
|
2919
2951
|
}
|
|
2920
2952
|
}
|
|
2921
|
-
class
|
|
2953
|
+
class ze {
|
|
2922
2954
|
constructor(e, t) {
|
|
2923
2955
|
this.value = e, this.label = t;
|
|
2924
2956
|
}
|
|
@@ -2928,7 +2960,7 @@ class Mt {
|
|
|
2928
2960
|
this.index = e, this.px = t;
|
|
2929
2961
|
}
|
|
2930
2962
|
}
|
|
2931
|
-
const
|
|
2963
|
+
const kt = { body: ["ge-table-text-align-left"] }, It = { body: ["ge-table-text-align-center"] }, Tt = { body: ["ge-table-text-align-right"] }, _t = {
|
|
2932
2964
|
header: ["ge-table-text-align-left"],
|
|
2933
2965
|
body: ["ge-table-text-align-left"],
|
|
2934
2966
|
footer: ["ge-table-text-align-left"]
|
|
@@ -2942,14 +2974,14 @@ const It = { body: ["ge-table-text-align-left"] }, kt = { body: ["ge-table-text-
|
|
|
2942
2974
|
footer: ["ge-table-text-align-right"]
|
|
2943
2975
|
};
|
|
2944
2976
|
class le {
|
|
2945
|
-
render(e, t, o,
|
|
2946
|
-
if (
|
|
2977
|
+
render(e, t, o, s, i, r, l) {
|
|
2978
|
+
if (i.isRowCheckable(t)) {
|
|
2947
2979
|
l.addClass(e, "ge-table-row-checkbox-div");
|
|
2948
|
-
const n =
|
|
2980
|
+
const n = i.isRowChecked(t), d = n === "full" ? "checked" : "", a = n === "semi" ? '<span style="opacity: 0.4;">✓<span>' : "";
|
|
2949
2981
|
e.innerHTML = `
|
|
2950
2982
|
<input
|
|
2951
2983
|
type="checkbox"
|
|
2952
|
-
data-area="${
|
|
2984
|
+
data-area="${s}"
|
|
2953
2985
|
data-row-index="${t}"
|
|
2954
2986
|
data-col-index="${o}"
|
|
2955
2987
|
data-input-type="checkbox"
|
|
@@ -2961,7 +2993,7 @@ class le {
|
|
|
2961
2993
|
}
|
|
2962
2994
|
class Ft {
|
|
2963
2995
|
constructor() {
|
|
2964
|
-
this.type = "CheckboxColumnDef", this.property = "CheckboxColumn", this.headerLabel = "", this.width = new f(50, "px"), this.minWidth = new f(50, "px"), this.maxWidth = new f(100, "px"), this.rendererMap = new
|
|
2996
|
+
this.type = "CheckboxColumnDef", this.property = "CheckboxColumn", this.headerLabel = "", this.width = new f(50, "px"), this.minWidth = new f(50, "px"), this.maxWidth = new f(100, "px"), this.rendererMap = new I(new le(), new le(), void 0), this.classes = new I(
|
|
2965
2997
|
[],
|
|
2966
2998
|
["ge-table-text-align-left"],
|
|
2967
2999
|
[]
|
|
@@ -2970,7 +3002,7 @@ class Ft {
|
|
|
2970
3002
|
}
|
|
2971
3003
|
class Lt {
|
|
2972
3004
|
static body(e) {
|
|
2973
|
-
return new
|
|
3005
|
+
return new I(
|
|
2974
3006
|
void 0,
|
|
2975
3007
|
e,
|
|
2976
3008
|
void 0
|
|
@@ -2983,16 +3015,16 @@ class Ot {
|
|
|
2983
3015
|
}
|
|
2984
3016
|
}
|
|
2985
3017
|
class Pt {
|
|
2986
|
-
constructor(e, t, o, i) {
|
|
2987
|
-
this.area = e, this.rowIndex = t, this.columnIndex = o, this.value = i;
|
|
3018
|
+
constructor(e, t, o, s, i = {}) {
|
|
3019
|
+
this.area = e, this.rowIndex = t, this.columnIndex = o, this.value = s, this.cssClasses = i;
|
|
2988
3020
|
}
|
|
2989
3021
|
}
|
|
2990
3022
|
class Ht {
|
|
2991
3023
|
constructor() {
|
|
2992
3024
|
this.autoRestoreSortingState = !1, this.autoRestoreCollapsedExpandedState = !1, this.autoRestoreScrollPosition = !1, this.autoRestoreCheckedState = !1, this.autoRestoreSelectedState = !1, this.getStorageKeyFn = void 0, this.isSame = (e, t, o) => {
|
|
2993
3025
|
if (e && t && o.getRowId) {
|
|
2994
|
-
const
|
|
2995
|
-
return
|
|
3026
|
+
const s = o.getRowId(e), i = o.getRowId(t);
|
|
3027
|
+
return s === i;
|
|
2996
3028
|
}
|
|
2997
3029
|
return !1;
|
|
2998
3030
|
}, this.getRowId = (e) => {
|
|
@@ -3013,12 +3045,12 @@ class Ht {
|
|
|
3013
3045
|
}
|
|
3014
3046
|
}
|
|
3015
3047
|
class je {
|
|
3016
|
-
constructor(e, t, o,
|
|
3017
|
-
this.data = e, this.property = t, this.toggle = o, this.closed =
|
|
3048
|
+
constructor(e, t, o, s = !1, i = "normal", r = void 0) {
|
|
3049
|
+
this.data = e, this.property = t, this.toggle = o, this.closed = s, this.visibility = i, this.children = r, this.impl = "CellGroup";
|
|
3018
3050
|
}
|
|
3019
3051
|
}
|
|
3020
3052
|
class Xe extends je {
|
|
3021
|
-
constructor(e, t = 0, o = 0,
|
|
3053
|
+
constructor(e, t = 0, o = 0, s) {
|
|
3022
3054
|
super(
|
|
3023
3055
|
e.data,
|
|
3024
3056
|
e.property,
|
|
@@ -3026,7 +3058,7 @@ class Xe extends je {
|
|
|
3026
3058
|
e.closed,
|
|
3027
3059
|
e.visibility,
|
|
3028
3060
|
e.children
|
|
3029
|
-
), this.rowIndex = t, this.childIndex = o, this.parent =
|
|
3061
|
+
), this.rowIndex = t, this.childIndex = o, this.parent = s, this.impl = "CellGroupExt", this.children = void 0, this.leftNeighbour = void 0, this.rightNeighbour = void 0;
|
|
3030
3062
|
}
|
|
3031
3063
|
ownColumn() {
|
|
3032
3064
|
return !!this.property;
|
|
@@ -3079,8 +3111,8 @@ class Xe extends je {
|
|
|
3079
3111
|
getColumnCount(e = this, t = 0) {
|
|
3080
3112
|
var o;
|
|
3081
3113
|
if (e != null && e.claimsSpace() && t++, (o = e == null ? void 0 : e.children) != null && o.length)
|
|
3082
|
-
for (const
|
|
3083
|
-
t = this.getColumnCount(
|
|
3114
|
+
for (const s of e.children)
|
|
3115
|
+
t = this.getColumnCount(s, t);
|
|
3084
3116
|
return t;
|
|
3085
3117
|
}
|
|
3086
3118
|
getRowSpan(e = this, t) {
|
|
@@ -3090,7 +3122,7 @@ class Xe extends je {
|
|
|
3090
3122
|
return e.parent && (t = t + 1 + this.getParentCount(e.parent, t)), t;
|
|
3091
3123
|
}
|
|
3092
3124
|
log(e) {
|
|
3093
|
-
const t = " ".substring(0, 2 * this.rowIndex), o = `${this.getColumnIndex()}`,
|
|
3125
|
+
const t = " ".substring(0, 2 * this.rowIndex), o = `${this.getColumnIndex()}`, s = `${this.getColumnCount(this)}`, i = `${this.getRowSpan(this, e)}`, r = `${this.getParentCount(this)}`;
|
|
3094
3126
|
if (console.info(`${t + this.data}
|
|
3095
3127
|
childIndex:${this.childIndex}
|
|
3096
3128
|
row:${this.rowIndex}
|
|
@@ -3100,14 +3132,14 @@ class Xe extends je {
|
|
|
3100
3132
|
isVisible:${this.isVisible()}
|
|
3101
3133
|
ownColumn:${this.ownColumn()}
|
|
3102
3134
|
claimsSpace:${this.claimsSpace()}
|
|
3103
|
-
colCount:${
|
|
3104
|
-
rowSpan:${
|
|
3135
|
+
colCount:${s}
|
|
3136
|
+
rowSpan:${i}
|
|
3105
3137
|
pc:${r}`.replace(/[ \n]+/g, " ")), this.children)
|
|
3106
3138
|
for (const l of this.children)
|
|
3107
3139
|
l.log(e);
|
|
3108
3140
|
}
|
|
3109
3141
|
}
|
|
3110
|
-
class
|
|
3142
|
+
class k {
|
|
3111
3143
|
static buildColumnDefs(e, t = []) {
|
|
3112
3144
|
for (const o of e)
|
|
3113
3145
|
o.property && t.push(
|
|
@@ -3116,7 +3148,7 @@ class I {
|
|
|
3116
3148
|
headerLabel: o.data ? o.data : o.property,
|
|
3117
3149
|
isVisible: () => typeof o.isVisible == "function" ? o.isVisible() : !0
|
|
3118
3150
|
})
|
|
3119
|
-
), o.children &&
|
|
3151
|
+
), o.children && k.buildColumnDefs(o.children, t);
|
|
3120
3152
|
return t;
|
|
3121
3153
|
}
|
|
3122
3154
|
/*
|
|
@@ -3137,17 +3169,17 @@ class I {
|
|
|
3137
3169
|
return ret;
|
|
3138
3170
|
}
|
|
3139
3171
|
*/
|
|
3140
|
-
static buildGroupExts(e, t = [], o = 0,
|
|
3141
|
-
let
|
|
3172
|
+
static buildGroupExts(e, t = [], o = 0, s) {
|
|
3173
|
+
let i;
|
|
3142
3174
|
for (let r = 0; r < e.length; r++) {
|
|
3143
|
-
const l = e[r], n = new Xe(l, o, r,
|
|
3144
|
-
|
|
3175
|
+
const l = e[r], n = new Xe(l, o, r, s);
|
|
3176
|
+
i && (n.leftNeighbour = i, i.rightNeighbour = n), t.push(n), l.children && (n.children = k.buildGroupExts(l.children, [], o + 1, n)), i = n;
|
|
3145
3177
|
}
|
|
3146
3178
|
return t;
|
|
3147
3179
|
}
|
|
3148
3180
|
static flattenGroupExts(e, t = []) {
|
|
3149
3181
|
for (const o of e)
|
|
3150
|
-
t.push(o), o.children &&
|
|
3182
|
+
t.push(o), o.children && k.flattenGroupExts(o.children, t);
|
|
3151
3183
|
return t;
|
|
3152
3184
|
}
|
|
3153
3185
|
/*
|
|
@@ -3158,15 +3190,15 @@ class I {
|
|
|
3158
3190
|
|
|
3159
3191
|
*/
|
|
3160
3192
|
static buildArrayOfArrays(e, t) {
|
|
3161
|
-
var
|
|
3162
|
-
let o = -1,
|
|
3193
|
+
var i;
|
|
3194
|
+
let o = -1, s = 99999;
|
|
3163
3195
|
for (const r of e) {
|
|
3164
|
-
if (r.rowIndex <=
|
|
3196
|
+
if (r.rowIndex <= s) {
|
|
3165
3197
|
o++;
|
|
3166
3198
|
for (let l = 0; l < t.length; l++)
|
|
3167
3199
|
t[l][o] = null;
|
|
3168
3200
|
}
|
|
3169
|
-
if (t[r.rowIndex][o] = r,
|
|
3201
|
+
if (t[r.rowIndex][o] = r, s = r.rowIndex, r.ownColumn() && ((i = r.children) != null && i.length)) {
|
|
3170
3202
|
for (let l = r.rowIndex + 1; l < t.length; l++)
|
|
3171
3203
|
t[l][o] = void 0;
|
|
3172
3204
|
o++;
|
|
@@ -3178,8 +3210,8 @@ class I {
|
|
|
3178
3210
|
}
|
|
3179
3211
|
static iterateThrowColumns(e = [], t) {
|
|
3180
3212
|
var o;
|
|
3181
|
-
for (const
|
|
3182
|
-
e.push(
|
|
3213
|
+
for (const s of t)
|
|
3214
|
+
e.push(s.data + " rowIndex:" + s.rowIndex), (o = s.children) != null && o.length && k.iterateThrowColumns(e, s.children);
|
|
3183
3215
|
}
|
|
3184
3216
|
}
|
|
3185
3217
|
class Vt {
|
|
@@ -3250,21 +3282,21 @@ class Vt {
|
|
|
3250
3282
|
}
|
|
3251
3283
|
}
|
|
3252
3284
|
class Ye {
|
|
3253
|
-
render(e, t, o,
|
|
3285
|
+
render(e, t, o, s, i, r, l) {
|
|
3254
3286
|
const n = r != null && r.data ? r.data : "";
|
|
3255
3287
|
e.innerHTML = `${n}`;
|
|
3256
3288
|
}
|
|
3257
3289
|
}
|
|
3258
3290
|
class Bt {
|
|
3259
|
-
constructor(e = "header", t, o = [],
|
|
3260
|
-
var
|
|
3261
|
-
this.areaIdent = e, this.groups = t, this.columnDefs = o, this.defaultRowHeight =
|
|
3291
|
+
constructor(e = "header", t, o = [], s) {
|
|
3292
|
+
var i;
|
|
3293
|
+
this.areaIdent = e, this.groups = t, this.columnDefs = o, this.defaultRowHeight = s, this.gammaCells = !0, this.groupExts = [], this.cellGroupExtCellRenderer = new Ye(), this.groupExts = k.buildGroupExts(t), console.info(this.groupExts), console.info(this.getAllLeafs()), console.info(this.getMaxRowCount());
|
|
3262
3294
|
for (const r of this.groupExts)
|
|
3263
3295
|
r.log(this.getMaxRowCount());
|
|
3264
|
-
this.arr = this.buildArray(), !((
|
|
3296
|
+
this.arr = this.buildArray(), !((i = this.columnDefs) != null && i.length) && e === "header" && (this.columnDefs = k.buildColumnDefs(t)), console.info("this.columnDefs", this.columnDefs), console.info("this.arr", this.arr);
|
|
3265
3297
|
}
|
|
3266
3298
|
getAllLeafs() {
|
|
3267
|
-
return
|
|
3299
|
+
return k.flattenGroupExts(this.groupExts).filter((t) => !t.children);
|
|
3268
3300
|
}
|
|
3269
3301
|
getMaxRowCount() {
|
|
3270
3302
|
const e = this.getAllLeafs();
|
|
@@ -3272,13 +3304,13 @@ class Bt {
|
|
|
3272
3304
|
}
|
|
3273
3305
|
buildArray() {
|
|
3274
3306
|
console.info("");
|
|
3275
|
-
let e =
|
|
3307
|
+
let e = k.flattenGroupExts(this.groupExts);
|
|
3276
3308
|
const t = e.length, o = 1 + Math.max(...e.map((l) => l.rowIndex));
|
|
3277
3309
|
console.info("max row/col:", o + "/" + t);
|
|
3278
|
-
const
|
|
3279
|
-
|
|
3280
|
-
const
|
|
3281
|
-
let r =
|
|
3310
|
+
const s = [];
|
|
3311
|
+
k.iterateThrowColumns(s, this.groupExts), console.info(s);
|
|
3312
|
+
const i = Array.from(Array(o).keys()).map((l) => []);
|
|
3313
|
+
let r = k.buildArrayOfArrays(e, i);
|
|
3282
3314
|
return console.table(r), r;
|
|
3283
3315
|
}
|
|
3284
3316
|
changeColumnOrder(e, t) {
|
|
@@ -3314,8 +3346,8 @@ class Bt {
|
|
|
3314
3346
|
getRowspanAt(e, t) {
|
|
3315
3347
|
const o = this.getValueAt(e, t);
|
|
3316
3348
|
if (o) {
|
|
3317
|
-
const
|
|
3318
|
-
return o.getRowSpan(o,
|
|
3349
|
+
const s = this.getRowCount();
|
|
3350
|
+
return o.getRowSpan(o, s);
|
|
3319
3351
|
}
|
|
3320
3352
|
return 0;
|
|
3321
3353
|
}
|
|
@@ -3360,7 +3392,7 @@ class Wt {
|
|
|
3360
3392
|
if (!t)
|
|
3361
3393
|
return !0;
|
|
3362
3394
|
t = t.toLowerCase();
|
|
3363
|
-
const
|
|
3395
|
+
const s = "+", i = "-", r = t.toLowerCase().split(" ").filter((c) => c !== s && c !== i && c !== ""), l = r.filter((c) => !c.startsWith(s) && !c.startsWith(i)), n = r.filter((c) => c.startsWith(s)).map((c) => c.replace(/\+/g, "")), d = r.filter((c) => c.startsWith(i)).map((c) => c.replace(/-/g, ""));
|
|
3364
3396
|
let a = !l.length;
|
|
3365
3397
|
for (let c = 0; c < l.length; c++)
|
|
3366
3398
|
(a || o(e).includes(l[c])) && (a = !0);
|
|
@@ -3374,24 +3406,24 @@ class Wt {
|
|
|
3374
3406
|
return !1;
|
|
3375
3407
|
return !0;
|
|
3376
3408
|
}
|
|
3377
|
-
filterRows(e, t, o = (
|
|
3409
|
+
filterRows(e, t, o = (s) => JSON.stringify(s).toLowerCase()) {
|
|
3378
3410
|
if (!e)
|
|
3379
3411
|
return [];
|
|
3380
3412
|
if (!t)
|
|
3381
3413
|
return [...e];
|
|
3382
3414
|
t = t.toLowerCase();
|
|
3383
|
-
const
|
|
3415
|
+
const s = "+", i = "-", r = t.toLowerCase().split(" ").filter((a) => a !== s && a !== i && a !== ""), l = r.filter((a) => !a.startsWith(s) && !a.startsWith(i)), n = r.filter((a) => a.startsWith(s)).map((a) => a.replace(/\+/g, "")), d = r.filter((a) => a.startsWith(i)).map((a) => a.replace(/-/g, ""));
|
|
3384
3416
|
return e == null ? void 0 : e.filter((a) => {
|
|
3385
3417
|
let c = !l.length;
|
|
3386
|
-
for (let
|
|
3387
|
-
(c || o(a).includes(l[
|
|
3418
|
+
for (let u = 0; u < l.length; u++)
|
|
3419
|
+
(c || o(a).includes(l[u])) && (c = !0);
|
|
3388
3420
|
if (!c)
|
|
3389
3421
|
return !1;
|
|
3390
|
-
for (let
|
|
3391
|
-
if (!o(a).includes(n[
|
|
3422
|
+
for (let u = 0; u < n.length; u++)
|
|
3423
|
+
if (!o(a).includes(n[u]))
|
|
3392
3424
|
return !1;
|
|
3393
|
-
for (let
|
|
3394
|
-
if (o(a).includes(d[
|
|
3425
|
+
for (let u = 0; u < d.length; u++)
|
|
3426
|
+
if (o(a).includes(d[u]))
|
|
3395
3427
|
return !1;
|
|
3396
3428
|
return !0;
|
|
3397
3429
|
});
|
|
@@ -3400,30 +3432,30 @@ class Wt {
|
|
|
3400
3432
|
if (!e)
|
|
3401
3433
|
return "";
|
|
3402
3434
|
const t = [], o = Object.keys(e);
|
|
3403
|
-
for (let
|
|
3404
|
-
const
|
|
3405
|
-
t.push(e[
|
|
3435
|
+
for (let s = 0; s < o.length; s++) {
|
|
3436
|
+
const i = o[s];
|
|
3437
|
+
t.push(e[i]);
|
|
3406
3438
|
}
|
|
3407
3439
|
return t.join(" ").toLowerCase();
|
|
3408
3440
|
}
|
|
3409
3441
|
}
|
|
3410
3442
|
class Gt {
|
|
3411
3443
|
static bodyRenderer(e) {
|
|
3412
|
-
return new
|
|
3444
|
+
return new I(void 0, e, void 0);
|
|
3413
3445
|
}
|
|
3414
3446
|
}
|
|
3415
|
-
class
|
|
3447
|
+
class Nt {
|
|
3416
3448
|
constructor(e, t = !0, o = !1) {
|
|
3417
3449
|
this.property = e, this.skipCheckableCheck = t, this.readonly = o;
|
|
3418
3450
|
}
|
|
3419
|
-
render(e, t, o,
|
|
3420
|
-
if (this.readonly || this.skipCheckableCheck ||
|
|
3451
|
+
render(e, t, o, s, i, r, l) {
|
|
3452
|
+
if (this.readonly || this.skipCheckableCheck || i.isRowCheckable(t)) {
|
|
3421
3453
|
l.addClass(e, "ge-table-row-checkbox-div");
|
|
3422
|
-
const n =
|
|
3454
|
+
const n = i.getRowByIndex(t), a = i.getValueByT(n, this.property) === !0 ? "checked" : "", c = this.readonly ? " readonly " : "";
|
|
3423
3455
|
if (l.addClass(e, "ge-padding-property-checkbox"), e.innerHTML = `
|
|
3424
3456
|
<input
|
|
3425
3457
|
type="checkbox"
|
|
3426
|
-
data-area="${
|
|
3458
|
+
data-area="${s}"
|
|
3427
3459
|
data-row-index="${t}"
|
|
3428
3460
|
data-col-index="${o}"
|
|
3429
3461
|
data-property-index="${this.property}"
|
|
@@ -3431,14 +3463,14 @@ class zt {
|
|
|
3431
3463
|
${a}
|
|
3432
3464
|
${c}
|
|
3433
3465
|
class="ge-input-checkbox">`, !this.readonly) {
|
|
3434
|
-
const
|
|
3435
|
-
|
|
3466
|
+
const u = e.querySelector(".ge-input-checkbox");
|
|
3467
|
+
u && u.addEventListener("click", (m, b) => (n[this.property] = !n[this.property], !0));
|
|
3436
3468
|
}
|
|
3437
3469
|
}
|
|
3438
3470
|
}
|
|
3439
3471
|
}
|
|
3440
|
-
class
|
|
3441
|
-
render(e, t, o,
|
|
3472
|
+
class zt {
|
|
3473
|
+
render(e, t, o, s, i, r, l) {
|
|
3442
3474
|
r && (e.innerText = new Date(r).toISOString());
|
|
3443
3475
|
}
|
|
3444
3476
|
}
|
|
@@ -3450,7 +3482,7 @@ class jt {
|
|
|
3450
3482
|
day: "2-digit"
|
|
3451
3483
|
});
|
|
3452
3484
|
}
|
|
3453
|
-
render(e, t, o,
|
|
3485
|
+
render(e, t, o, s, i, r, l) {
|
|
3454
3486
|
if (r) {
|
|
3455
3487
|
let n = "";
|
|
3456
3488
|
try {
|
|
@@ -3459,29 +3491,29 @@ class jt {
|
|
|
3459
3491
|
n = r;
|
|
3460
3492
|
}
|
|
3461
3493
|
e.innerHTML = `
|
|
3462
|
-
<div class="ge-table-label-div" data-row-index="${t}" data-col-index="${o}" data-area="${
|
|
3463
|
-
<div class="ge-table-label" data-row-index="${t}" data-col-index="${o}" data-area="${
|
|
3494
|
+
<div class="ge-table-label-div" data-row-index="${t}" data-col-index="${o}" data-area="${s}" style="position: relative; background: transparent; width: 100%; height: 100%;">
|
|
3495
|
+
<div class="ge-table-label" data-row-index="${t}" data-col-index="${o}" data-area="${s}">${n}</div>
|
|
3464
3496
|
</div>`;
|
|
3465
3497
|
}
|
|
3466
3498
|
}
|
|
3467
3499
|
}
|
|
3468
3500
|
class Xt {
|
|
3469
|
-
render(e, t, o,
|
|
3501
|
+
render(e, t, o, s, i, r, l) {
|
|
3470
3502
|
r && (e.innerText = new Date(r).toLocaleDateString());
|
|
3471
3503
|
}
|
|
3472
3504
|
}
|
|
3473
3505
|
class Yt {
|
|
3474
|
-
render(e, t, o,
|
|
3506
|
+
render(e, t, o, s, i, r, l) {
|
|
3475
3507
|
r === "male" || r === "m" ? e.innerText = "♂" : (r === "female" || r === "f") && (e.innerText = "♀");
|
|
3476
3508
|
}
|
|
3477
3509
|
}
|
|
3478
3510
|
class Kt {
|
|
3479
|
-
render(e, t, o,
|
|
3511
|
+
render(e, t, o, s, i, r, l) {
|
|
3480
3512
|
r === "true" || r === !0 ? e.innerHTML = '<span class="ge-true-text-color">✅</span>' : r === "false" || r === !1 ? e.innerHTML = '<span class="ge-false-text-color">❌</span>' : e.innerText = "";
|
|
3481
3513
|
}
|
|
3482
3514
|
}
|
|
3483
3515
|
class Ut {
|
|
3484
|
-
render(e, t, o,
|
|
3516
|
+
render(e, t, o, s, i, r, l) {
|
|
3485
3517
|
r && (e.innerText = new Date(r).toISOString().replace(/T/g, " ").replace(/\..*/g, ""));
|
|
3486
3518
|
}
|
|
3487
3519
|
}
|
|
@@ -3489,7 +3521,7 @@ class qt {
|
|
|
3489
3521
|
constructor(e = Number.MIN_SAFE_INTEGER, t = Number.MAX_SAFE_INTEGER) {
|
|
3490
3522
|
this.min = e, this.max = t;
|
|
3491
3523
|
}
|
|
3492
|
-
render(e, t, o,
|
|
3524
|
+
render(e, t, o, s, i, r, l) {
|
|
3493
3525
|
r && (e.innerText = r, (typeof r == "string" || isNaN(r) || r < this.min || r > this.max) && l.addClass(e, "ge-cell-error"));
|
|
3494
3526
|
}
|
|
3495
3527
|
}
|
|
@@ -3497,17 +3529,17 @@ class Jt {
|
|
|
3497
3529
|
constructor(e) {
|
|
3498
3530
|
this.property = e;
|
|
3499
3531
|
}
|
|
3500
|
-
render(e, t, o,
|
|
3532
|
+
render(e, t, o, s, i, r, l) {
|
|
3501
3533
|
l.addClass(e, "ge-star-rating-div");
|
|
3502
|
-
const n =
|
|
3534
|
+
const n = i.getRowByIndex(t), d = +("" + i.getValueByT(n, this.property));
|
|
3503
3535
|
if (!isNaN(d)) {
|
|
3504
3536
|
const a = [];
|
|
3505
|
-
for (let
|
|
3537
|
+
for (let u = 0; u < d; u++)
|
|
3506
3538
|
a.push("★");
|
|
3507
3539
|
const c = a.join(" ");
|
|
3508
3540
|
e.innerHTML = `
|
|
3509
|
-
<div class="ge-table-label-div" data-row-index="${t}" data-col-index="${o}" data-area="${
|
|
3510
|
-
<div class="ge-table-label" data-row-index="${t}" data-col-index="${o}" data-area="${
|
|
3541
|
+
<div class="ge-table-label-div" data-row-index="${t}" data-col-index="${o}" data-area="${s}" style="position: relative; background: transparent; width: 100%; height: 100%;">
|
|
3542
|
+
<div class="ge-table-label" data-row-index="${t}" data-col-index="${o}" data-area="${s}">${c}</div>
|
|
3511
3543
|
</div>`;
|
|
3512
3544
|
}
|
|
3513
3545
|
}
|
|
@@ -3516,28 +3548,28 @@ class Qt {
|
|
|
3516
3548
|
constructor(e, t = 100, o = !1) {
|
|
3517
3549
|
this.property = e, this.maxValue = t, this.labelVisible = o;
|
|
3518
3550
|
}
|
|
3519
|
-
render(e, t, o,
|
|
3551
|
+
render(e, t, o, s, i, r, l) {
|
|
3520
3552
|
l.addClass(e, "ge-star-rating-div");
|
|
3521
|
-
const n =
|
|
3553
|
+
const n = i.getRowByIndex(t), d = +("" + i.getValueByT(n, this.property));
|
|
3522
3554
|
if (!isNaN(d)) {
|
|
3523
3555
|
const a = d * 100 / this.maxValue, c = this.labelVisible ? Math.round(a) + "%" : "";
|
|
3524
3556
|
e.innerHTML = `
|
|
3525
3557
|
<div class="ge-table-label-div"
|
|
3526
3558
|
data-row-index="${t}"
|
|
3527
3559
|
data-col-index="${o}"
|
|
3528
|
-
data-area="${
|
|
3560
|
+
data-area="${s}"
|
|
3529
3561
|
title="${c}"
|
|
3530
3562
|
style="position: relative; background: transparent; width: 100%; height: 100%;">
|
|
3531
3563
|
<div class="ge-table-progress-container"
|
|
3532
3564
|
style="width:100%;height:50%;padding:0;margin-top:6px;"
|
|
3533
3565
|
data-row-index="${t}"
|
|
3534
3566
|
data-col-index="${o}"
|
|
3535
|
-
data-area="${
|
|
3567
|
+
data-area="${s}">
|
|
3536
3568
|
<div class="ge-table-progress-bar"
|
|
3537
3569
|
style="width:${a}%;height:100%;padding:0;margin:0;"
|
|
3538
3570
|
data-row-index="${t}"
|
|
3539
3571
|
data-col-index="${o}"
|
|
3540
|
-
data-area="${
|
|
3572
|
+
data-area="${s}">
|
|
3541
3573
|
</div>
|
|
3542
3574
|
</div>
|
|
3543
3575
|
</div>`;
|
|
@@ -3553,17 +3585,17 @@ class ge {
|
|
|
3553
3585
|
}
|
|
3554
3586
|
static create(e) {
|
|
3555
3587
|
return new ge(
|
|
3556
|
-
e.map((t) => new
|
|
3588
|
+
e.map((t) => new ze(t, t))
|
|
3557
3589
|
);
|
|
3558
3590
|
}
|
|
3559
|
-
render(e, t, o,
|
|
3560
|
-
if (
|
|
3591
|
+
render(e, t, o, s, i, r, l) {
|
|
3592
|
+
if (i.isEditable(t, o)) {
|
|
3561
3593
|
l.addClass(e, "ge-table-row-select-div");
|
|
3562
|
-
const n =
|
|
3594
|
+
const n = i.getValueAt(t, o);
|
|
3563
3595
|
let d = [];
|
|
3564
3596
|
for (let c of this.options) {
|
|
3565
|
-
const
|
|
3566
|
-
d.push(`<option value="${c.value}" ${
|
|
3597
|
+
const u = c.value === n ? " selected " : "";
|
|
3598
|
+
d.push(`<option value="${c.value}" ${u}>${c.label}</option>`);
|
|
3567
3599
|
}
|
|
3568
3600
|
const a = d.join("");
|
|
3569
3601
|
e.innerHTML = `
|
|
@@ -3572,7 +3604,7 @@ class ge {
|
|
|
3572
3604
|
value="${n}"
|
|
3573
3605
|
autofocus
|
|
3574
3606
|
data-listen="change"
|
|
3575
|
-
data-area="${
|
|
3607
|
+
data-area="${s}"
|
|
3576
3608
|
data-row-index="${t}"
|
|
3577
3609
|
data-col-index="${o}"
|
|
3578
3610
|
data-input-type="text"
|
|
@@ -3587,16 +3619,16 @@ class eo {
|
|
|
3587
3619
|
}
|
|
3588
3620
|
}
|
|
3589
3621
|
class ne {
|
|
3590
|
-
constructor(e, t, o,
|
|
3591
|
-
this.minValue = e, this.minColor = t, this.maxValue = o, this.maxColor =
|
|
3622
|
+
constructor(e, t, o, s) {
|
|
3623
|
+
this.minValue = e, this.minColor = t, this.maxValue = o, this.maxColor = s;
|
|
3592
3624
|
}
|
|
3593
3625
|
}
|
|
3594
3626
|
class B {
|
|
3595
|
-
static normalize(e, t, o,
|
|
3596
|
-
return (e - t) / (o - t) * (
|
|
3627
|
+
static normalize(e, t, o, s = 0, i = 1) {
|
|
3628
|
+
return (e - t) / (o - t) * (i - s) + s;
|
|
3597
3629
|
}
|
|
3598
3630
|
static getTwoColorGradientRGB(e, t) {
|
|
3599
|
-
const o = B.normalize(e, t.minValue, t.maxValue, 0, 1),
|
|
3631
|
+
const o = B.normalize(e, t.minValue, t.maxValue, 0, 1), s = t.maxColor.r - t.minColor.r, i = t.maxColor.g - t.minColor.g, r = t.maxColor.b - t.minColor.b, l = s * o + t.minColor.r, n = i * o + t.minColor.g, d = r * o + t.minColor.b;
|
|
3600
3632
|
return `rgb(${Math.round(l)}, ${Math.round(n)}, ${Math.round(d)})`;
|
|
3601
3633
|
}
|
|
3602
3634
|
static getThreeColorGradientRGB(e, t) {
|
|
@@ -3604,8 +3636,8 @@ class B {
|
|
|
3604
3636
|
}
|
|
3605
3637
|
}
|
|
3606
3638
|
class to {
|
|
3607
|
-
constructor(e, t, o,
|
|
3608
|
-
this.minValue = e, this.minColor = t, this.middleValue = o, this.middleColor =
|
|
3639
|
+
constructor(e, t, o, s, i, r) {
|
|
3640
|
+
this.minValue = e, this.minColor = t, this.middleValue = o, this.middleColor = s, this.maxValue = i, this.maxColor = r;
|
|
3609
3641
|
}
|
|
3610
3642
|
}
|
|
3611
3643
|
export {
|
|
@@ -3618,14 +3650,14 @@ export {
|
|
|
3618
3650
|
re as AreaModelObjectArrayWithColumndefs,
|
|
3619
3651
|
Ge as AreaModelObjectyArray,
|
|
3620
3652
|
oe as AreaModelTree,
|
|
3621
|
-
|
|
3653
|
+
I as AreaObjectMap,
|
|
3622
3654
|
Ht as AutoRestoreOptions,
|
|
3623
3655
|
je as CellGroup,
|
|
3624
3656
|
Xe as CellGroupExt,
|
|
3625
3657
|
Ye as CellGroupExtCellRenderer,
|
|
3626
3658
|
E as CellRange,
|
|
3627
|
-
|
|
3628
|
-
|
|
3659
|
+
k as CellgroupFactory,
|
|
3660
|
+
Nt as CheckboxBooleanPropertyCellRenderer,
|
|
3629
3661
|
le as CheckboxCellRenderer,
|
|
3630
3662
|
Ft as CheckboxColumnDef,
|
|
3631
3663
|
We as CheckboxModel,
|
|
@@ -3637,7 +3669,7 @@ export {
|
|
|
3637
3669
|
pe as ConvenienceDomService,
|
|
3638
3670
|
ce as CssVars,
|
|
3639
3671
|
jt as DateToIntlDDMMYYYYCellRenderer,
|
|
3640
|
-
|
|
3672
|
+
zt as DateToIsoCellRenderer,
|
|
3641
3673
|
Xt as DateToLocaleDateCellRenderer,
|
|
3642
3674
|
Ut as DateToTecCellRenderer,
|
|
3643
3675
|
P as DefaultRowHeights,
|
|
@@ -3645,7 +3677,7 @@ export {
|
|
|
3645
3677
|
Q as EventAdapter,
|
|
3646
3678
|
ee as FalseFn,
|
|
3647
3679
|
Oe as FocusModel,
|
|
3648
|
-
|
|
3680
|
+
ke as GeCellIndices,
|
|
3649
3681
|
B as GeCssColorUtil,
|
|
3650
3682
|
Wt as GeFilterService,
|
|
3651
3683
|
Ot as GeKeyEvent,
|
|
@@ -3661,14 +3693,14 @@ export {
|
|
|
3661
3693
|
fe as MouseTargetData,
|
|
3662
3694
|
qt as NumberCellRenderer,
|
|
3663
3695
|
_e as OsxShortcutActionIdMapping,
|
|
3664
|
-
|
|
3696
|
+
ie as Padding,
|
|
3665
3697
|
Qt as ProgressBarCellRenderer,
|
|
3666
3698
|
Ae as RenderScope,
|
|
3667
3699
|
Gt as Renderer,
|
|
3668
|
-
|
|
3700
|
+
Ne as RequestChunk,
|
|
3669
3701
|
ge as SelectCellRenderer,
|
|
3670
3702
|
Le as SelectionModel,
|
|
3671
|
-
|
|
3703
|
+
Ie as SelectionService,
|
|
3672
3704
|
De as ShortcutService,
|
|
3673
3705
|
$e as SimpleDomService,
|
|
3674
3706
|
f as Size,
|
|
@@ -3683,10 +3715,10 @@ export {
|
|
|
3683
3715
|
L as TableFactory,
|
|
3684
3716
|
G as TableModel,
|
|
3685
3717
|
At as TableModelAndOptions,
|
|
3686
|
-
|
|
3718
|
+
z as TableOptions,
|
|
3687
3719
|
he as TableScope,
|
|
3688
3720
|
to as ThreeColorGradientArg,
|
|
3689
|
-
|
|
3721
|
+
se as TreeCheckboxModel,
|
|
3690
3722
|
j as TreeFactory,
|
|
3691
3723
|
ae as TreeOptions,
|
|
3692
3724
|
Z as TreeRow,
|
|
@@ -3694,18 +3726,18 @@ export {
|
|
|
3694
3726
|
Kt as TrueFalseCellRenderer,
|
|
3695
3727
|
Ve as TrueFn,
|
|
3696
3728
|
ne as TwoColorGradientArg,
|
|
3697
|
-
|
|
3729
|
+
ze as ValueLabel,
|
|
3698
3730
|
Te as WindowsShortcutActionIdMapping,
|
|
3699
3731
|
Rt as actionIds,
|
|
3700
3732
|
Dt as allCenter,
|
|
3701
3733
|
_t as allLeft,
|
|
3702
3734
|
$t as allRight,
|
|
3703
|
-
|
|
3704
|
-
|
|
3735
|
+
It as bodyCenter,
|
|
3736
|
+
kt as bodyLeft,
|
|
3705
3737
|
Tt as bodyRight,
|
|
3706
3738
|
Zt as editInputPipeForNumber,
|
|
3707
3739
|
Y as getAreaIdentByString,
|
|
3708
|
-
|
|
3740
|
+
N as isAreaModelTree,
|
|
3709
3741
|
be as isCheckboxColumnDef,
|
|
3710
3742
|
O as isTreeRow,
|
|
3711
3743
|
vt as px0,
|
|
@@ -3719,10 +3751,10 @@ export {
|
|
|
3719
3751
|
nt as px160,
|
|
3720
3752
|
lt as px170,
|
|
3721
3753
|
rt as px180,
|
|
3722
|
-
|
|
3754
|
+
it as px190,
|
|
3723
3755
|
yt as px20,
|
|
3724
3756
|
te as px200,
|
|
3725
|
-
|
|
3757
|
+
st as px210,
|
|
3726
3758
|
ot as px220,
|
|
3727
3759
|
tt as px230,
|
|
3728
3760
|
et as px240,
|