@guiexpert/svelte-table 4.1.83 → 4.1.84
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/ComponentRendererWrapper.d.ts +1 -0
- package/index.cjs +15 -248
- package/index.d.ts +2 -2
- package/index.js +768 -1043
- package/package.json +8 -6
package/index.js
CHANGED
|
@@ -1,154 +1,154 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { createEventDispatcher as
|
|
5
|
-
function
|
|
1
|
+
var me = Object.defineProperty;
|
|
2
|
+
var ge = (a, e, t) => e in a ? me(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
|
|
3
|
+
var j = (a, e, t) => ge(a, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { createEventDispatcher as Se, onMount as ye } from "svelte";
|
|
5
|
+
function k() {
|
|
6
6
|
}
|
|
7
|
-
function
|
|
8
|
-
return
|
|
7
|
+
function ae(a) {
|
|
8
|
+
return a();
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function ie() {
|
|
11
11
|
return /* @__PURE__ */ Object.create(null);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
|
|
13
|
+
function N(a) {
|
|
14
|
+
a.forEach(ae);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
return typeof
|
|
16
|
+
function ne(a) {
|
|
17
|
+
return typeof a == "function";
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
return
|
|
19
|
+
function be(a, e) {
|
|
20
|
+
return a != a ? e == e : a !== e || a && typeof a == "object" || typeof a == "function";
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
return Object.keys(
|
|
22
|
+
function xe(a) {
|
|
23
|
+
return Object.keys(a).length === 0;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
25
|
+
function we(a, e, t) {
|
|
26
|
+
a.insertBefore(e, t || null);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
|
|
28
|
+
function ce(a) {
|
|
29
|
+
a.parentNode && a.parentNode.removeChild(a);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
return document.createElement(
|
|
31
|
+
function Ce(a) {
|
|
32
|
+
return document.createElement(a);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
|
|
34
|
+
function ve(a, e, t) {
|
|
35
|
+
a.getAttribute(e) !== t && a.setAttribute(e, t);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
return Array.from(
|
|
37
|
+
function Re(a) {
|
|
38
|
+
return Array.from(a.childNodes);
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
t == null ?
|
|
40
|
+
function P(a, e, t, s) {
|
|
41
|
+
t == null ? a.style.removeProperty(e) : a.style.setProperty(e, t, "");
|
|
42
42
|
}
|
|
43
|
-
let
|
|
44
|
-
function _(
|
|
45
|
-
|
|
43
|
+
let J;
|
|
44
|
+
function _(a) {
|
|
45
|
+
J = a;
|
|
46
46
|
}
|
|
47
|
-
const
|
|
48
|
-
let
|
|
49
|
-
const
|
|
50
|
-
let
|
|
51
|
-
function
|
|
52
|
-
|
|
47
|
+
const O = [], X = [];
|
|
48
|
+
let V = [];
|
|
49
|
+
const oe = [], Ae = /* @__PURE__ */ Promise.resolve();
|
|
50
|
+
let z = !1;
|
|
51
|
+
function Ee() {
|
|
52
|
+
z || (z = !0, Ae.then(de));
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
|
|
54
|
+
function K(a) {
|
|
55
|
+
V.push(a);
|
|
56
56
|
}
|
|
57
|
-
const
|
|
58
|
-
let
|
|
59
|
-
function
|
|
60
|
-
if (
|
|
57
|
+
const U = /* @__PURE__ */ new Set();
|
|
58
|
+
let L = 0;
|
|
59
|
+
function de() {
|
|
60
|
+
if (L !== 0)
|
|
61
61
|
return;
|
|
62
|
-
const
|
|
62
|
+
const a = J;
|
|
63
63
|
do {
|
|
64
64
|
try {
|
|
65
|
-
for (;
|
|
66
|
-
const e = L
|
|
67
|
-
|
|
65
|
+
for (; L < O.length; ) {
|
|
66
|
+
const e = O[L];
|
|
67
|
+
L++, _(e), Me(e.$$);
|
|
68
68
|
}
|
|
69
69
|
} catch (e) {
|
|
70
|
-
throw
|
|
70
|
+
throw O.length = 0, L = 0, e;
|
|
71
71
|
}
|
|
72
|
-
for (_(null),
|
|
73
|
-
for (let e = 0; e <
|
|
74
|
-
const t =
|
|
75
|
-
|
|
72
|
+
for (_(null), O.length = 0, L = 0; X.length; ) X.pop()();
|
|
73
|
+
for (let e = 0; e < V.length; e += 1) {
|
|
74
|
+
const t = V[e];
|
|
75
|
+
U.has(t) || (U.add(t), t());
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
} while (
|
|
79
|
-
for (;
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
V.length = 0;
|
|
78
|
+
} while (O.length);
|
|
79
|
+
for (; oe.length; )
|
|
80
|
+
oe.pop()();
|
|
81
|
+
z = !1, U.clear(), _(a);
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
if (
|
|
85
|
-
|
|
86
|
-
const e =
|
|
87
|
-
|
|
83
|
+
function Me(a) {
|
|
84
|
+
if (a.fragment !== null) {
|
|
85
|
+
a.update(), N(a.before_update);
|
|
86
|
+
const e = a.dirty;
|
|
87
|
+
a.dirty = [-1], a.fragment && a.fragment.p(a.ctx, e), a.after_update.forEach(K);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function Te(a) {
|
|
91
91
|
const e = [], t = [];
|
|
92
|
-
|
|
92
|
+
V.forEach((s) => a.indexOf(s) === -1 ? e.push(s) : t.push(s)), t.forEach((s) => s()), V = e;
|
|
93
93
|
}
|
|
94
|
-
const
|
|
95
|
-
function
|
|
96
|
-
|
|
94
|
+
const Fe = /* @__PURE__ */ new Set();
|
|
95
|
+
function De(a, e) {
|
|
96
|
+
a && a.i && (Fe.delete(a), a.i(e));
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
const { fragment: s, after_update:
|
|
100
|
-
s && s.m(e, t),
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
}),
|
|
98
|
+
function Ie(a, e, t) {
|
|
99
|
+
const { fragment: s, after_update: i } = a.$$;
|
|
100
|
+
s && s.m(e, t), K(() => {
|
|
101
|
+
const o = a.$$.on_mount.map(ae).filter(ne);
|
|
102
|
+
a.$$.on_destroy ? a.$$.on_destroy.push(...o) : N(o), a.$$.on_mount = [];
|
|
103
|
+
}), i.forEach(K);
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
const t =
|
|
107
|
-
t.fragment !== null && (
|
|
105
|
+
function Le(a, e) {
|
|
106
|
+
const t = a.$$;
|
|
107
|
+
t.fragment !== null && (Te(t.after_update), N(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
110
|
-
|
|
109
|
+
function Oe(a, e) {
|
|
110
|
+
a.$$.dirty[0] === -1 && (O.push(a), Ee(), a.$$.dirty.fill(0)), a.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
const
|
|
114
|
-
_(
|
|
115
|
-
const c =
|
|
112
|
+
function Be(a, e, t, s, i, o, r = null, l = [-1]) {
|
|
113
|
+
const n = J;
|
|
114
|
+
_(a);
|
|
115
|
+
const c = a.$$ = {
|
|
116
116
|
fragment: null,
|
|
117
117
|
ctx: [],
|
|
118
118
|
// state
|
|
119
|
-
props:
|
|
120
|
-
update:
|
|
121
|
-
not_equal:
|
|
122
|
-
bound:
|
|
119
|
+
props: o,
|
|
120
|
+
update: k,
|
|
121
|
+
not_equal: i,
|
|
122
|
+
bound: ie(),
|
|
123
123
|
// lifecycle
|
|
124
124
|
on_mount: [],
|
|
125
125
|
on_destroy: [],
|
|
126
126
|
on_disconnect: [],
|
|
127
127
|
before_update: [],
|
|
128
128
|
after_update: [],
|
|
129
|
-
context: new Map(e.context || (
|
|
129
|
+
context: new Map(e.context || (n ? n.$$.context : [])),
|
|
130
130
|
// everything else
|
|
131
|
-
callbacks:
|
|
132
|
-
dirty:
|
|
131
|
+
callbacks: ie(),
|
|
132
|
+
dirty: l,
|
|
133
133
|
skip_bound: !1,
|
|
134
|
-
root: e.target ||
|
|
134
|
+
root: e.target || n.$$.root
|
|
135
135
|
};
|
|
136
136
|
r && r(c.root);
|
|
137
137
|
let h = !1;
|
|
138
|
-
if (c.ctx = t ? t(
|
|
139
|
-
const
|
|
140
|
-
return c.ctx &&
|
|
141
|
-
}) : [], c.update(), h = !0,
|
|
138
|
+
if (c.ctx = t ? t(a, e.props || {}, (d, p, ...g) => {
|
|
139
|
+
const u = g.length ? g[0] : p;
|
|
140
|
+
return c.ctx && i(c.ctx[d], c.ctx[d] = u) && (!c.skip_bound && c.bound[d] && c.bound[d](u), h && Oe(a, d)), p;
|
|
141
|
+
}) : [], c.update(), h = !0, N(c.before_update), c.fragment = s ? s(c.ctx) : !1, e.target) {
|
|
142
142
|
if (e.hydrate) {
|
|
143
|
-
const d =
|
|
144
|
-
c.fragment && c.fragment.l(d), d.forEach(
|
|
143
|
+
const d = Re(e.target);
|
|
144
|
+
c.fragment && c.fragment.l(d), d.forEach(ce);
|
|
145
145
|
} else
|
|
146
146
|
c.fragment && c.fragment.c();
|
|
147
|
-
e.intro &&
|
|
147
|
+
e.intro && De(a.$$.fragment), Ie(a, e.target, e.anchor), de();
|
|
148
148
|
}
|
|
149
|
-
_(
|
|
149
|
+
_(n);
|
|
150
150
|
}
|
|
151
|
-
class
|
|
151
|
+
class ke {
|
|
152
152
|
constructor() {
|
|
153
153
|
/**
|
|
154
154
|
* ### PRIVATE API
|
|
@@ -157,7 +157,7 @@ class We {
|
|
|
157
157
|
*
|
|
158
158
|
* @type {any}
|
|
159
159
|
*/
|
|
160
|
-
|
|
160
|
+
j(this, "$$");
|
|
161
161
|
/**
|
|
162
162
|
* ### PRIVATE API
|
|
163
163
|
*
|
|
@@ -165,11 +165,11 @@ class We {
|
|
|
165
165
|
*
|
|
166
166
|
* @type {any}
|
|
167
167
|
*/
|
|
168
|
-
|
|
168
|
+
j(this, "$$set");
|
|
169
169
|
}
|
|
170
170
|
/** @returns {void} */
|
|
171
171
|
$destroy() {
|
|
172
|
-
|
|
172
|
+
Le(this, 1), this.$destroy = k;
|
|
173
173
|
}
|
|
174
174
|
/**
|
|
175
175
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -178,12 +178,12 @@ class We {
|
|
|
178
178
|
* @returns {() => void}
|
|
179
179
|
*/
|
|
180
180
|
$on(e, t) {
|
|
181
|
-
if (!
|
|
182
|
-
return
|
|
181
|
+
if (!ne(t))
|
|
182
|
+
return k;
|
|
183
183
|
const s = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
184
184
|
return s.push(t), () => {
|
|
185
|
-
const
|
|
186
|
-
|
|
185
|
+
const i = s.indexOf(t);
|
|
186
|
+
i !== -1 && s.splice(i, 1);
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
189
|
/**
|
|
@@ -191,16 +191,16 @@ class We {
|
|
|
191
191
|
* @returns {void}
|
|
192
192
|
*/
|
|
193
193
|
$set(e) {
|
|
194
|
-
this.$$set && !
|
|
194
|
+
this.$$set && !xe(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
const
|
|
198
|
-
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(
|
|
199
|
-
function
|
|
197
|
+
const Ve = "4";
|
|
198
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Ve);
|
|
199
|
+
function Pe(a, e = 500) {
|
|
200
200
|
let t = null;
|
|
201
201
|
return function(...s) {
|
|
202
202
|
t && window.clearTimeout(t), t = window.setTimeout(() => {
|
|
203
|
-
|
|
203
|
+
a.apply(this, s), t = null;
|
|
204
204
|
}, e);
|
|
205
205
|
};
|
|
206
206
|
}
|
|
@@ -229,18 +229,18 @@ class I {
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
|
-
function
|
|
233
|
-
return
|
|
232
|
+
function $(a) {
|
|
233
|
+
return a && a.type === "TreeRow";
|
|
234
234
|
}
|
|
235
|
-
function
|
|
236
|
-
return
|
|
235
|
+
function Y(a) {
|
|
236
|
+
return a && a.type === "AreaModelTree";
|
|
237
237
|
}
|
|
238
|
-
class
|
|
239
|
-
constructor(e = -1, t = -1, s = -1,
|
|
240
|
-
this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft =
|
|
238
|
+
class q {
|
|
239
|
+
constructor(e = -1, t = -1, s = -1, i = -1, o, r, l, n = 0, c = 0, h = 0, d = "") {
|
|
240
|
+
this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = i, this.areaIdent = o, this.sideIdent = r, this.originalEvent = l, this.clickCount = n, this.draggingX = c, this.draggingY = h, this.action = d;
|
|
241
241
|
}
|
|
242
242
|
clone() {
|
|
243
|
-
return new
|
|
243
|
+
return new q(
|
|
244
244
|
this.rowIndex,
|
|
245
245
|
this.rowTop,
|
|
246
246
|
this.columnIndex,
|
|
@@ -260,7 +260,7 @@ class F {
|
|
|
260
260
|
this.content = e, this.style = t, this.classes = s;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
class
|
|
263
|
+
class he {
|
|
264
264
|
constructor(e = new F(
|
|
265
265
|
">",
|
|
266
266
|
"transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
|
|
@@ -273,20 +273,20 @@ class ue {
|
|
|
273
273
|
">",
|
|
274
274
|
"color:transparent;",
|
|
275
275
|
["gt-table-tree-arrow-hidden"]
|
|
276
|
-
),
|
|
276
|
+
), i = new F(
|
|
277
277
|
"↕",
|
|
278
278
|
"",
|
|
279
279
|
["gt-table-tree-arrow-expanded-all"]
|
|
280
280
|
)) {
|
|
281
|
-
this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = s, this.arrowExpandCollapseAll =
|
|
281
|
+
this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = s, this.arrowExpandCollapseAll = i;
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
|
-
class
|
|
284
|
+
class pe {
|
|
285
285
|
constructor(e = new F("↑", "", ["ge-header-sorted-asc"]), t = new F("↓", "", ["ge-header-sorted-desc"]), s = new F("↑", "color:transparent;", [])) {
|
|
286
286
|
this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = s;
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
class
|
|
289
|
+
class _e {
|
|
290
290
|
constructor(e) {
|
|
291
291
|
this.domService = e;
|
|
292
292
|
}
|
|
@@ -305,7 +305,7 @@ class Ne {
|
|
|
305
305
|
return this.domService.setStyle(e, "display", "block"), e;
|
|
306
306
|
}
|
|
307
307
|
applyStyleInPx(e, t) {
|
|
308
|
-
return Object.entries(t).forEach(([s,
|
|
308
|
+
return Object.entries(t).forEach(([s, i]) => this.domService.setStyle(e, s, i + "px")), e;
|
|
309
309
|
}
|
|
310
310
|
applyStylePosistionRelative(e) {
|
|
311
311
|
return this.domService.setStyle(e, "position", "relative"), this.domService.setStyle(e, "overflow", "clip"), e;
|
|
@@ -351,116 +351,116 @@ class Ne {
|
|
|
351
351
|
setAttribute(e, t, s) {
|
|
352
352
|
return t && s && this.domService.setAttribute(e, t, s), e;
|
|
353
353
|
}
|
|
354
|
-
createAreaDivWithClass(e, t, s,
|
|
355
|
-
const
|
|
356
|
-
return this.addClass(e,
|
|
354
|
+
createAreaDivWithClass(e, t, s, i) {
|
|
355
|
+
const o = this.domService.createElement("div");
|
|
356
|
+
return this.addClass(e, o), this.domService.setAttribute(o, "data-area", s), this.domService.setAttribute(o, "data-side", i), this.domService.appendChild(t, o), o;
|
|
357
357
|
}
|
|
358
358
|
createDivWithClass(e, t) {
|
|
359
359
|
const s = this.domService.createElement("div");
|
|
360
360
|
return this.addClass(e, s), this.domService.appendChild(t, s), s;
|
|
361
361
|
}
|
|
362
|
-
addRowDiv(e, t, s = -1,
|
|
363
|
-
const
|
|
364
|
-
if (this.domService.addClass(
|
|
362
|
+
addRowDiv(e, t, s = -1, i, o, r = "") {
|
|
363
|
+
const l = t.index ?? -1, n = this.getDivOrCreateDiv(l, e);
|
|
364
|
+
if (this.domService.addClass(n, "ge-table-row-div"), this.domService.addClass(n, `ge-table-row-div-${t.index}`), i === "body" && o === "center") {
|
|
365
365
|
const c = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
366
|
-
this.domService.addClass(
|
|
366
|
+
this.domService.addClass(n, `ge-table-row-${c}`);
|
|
367
367
|
}
|
|
368
|
-
if (this.domService.setStyle(
|
|
368
|
+
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", `${s}`), this.domService.setAttribute(n, "data-area", `${i}`), r) {
|
|
369
369
|
const c = this.domService.createText(r);
|
|
370
|
-
this.domService.appendChild(
|
|
370
|
+
this.domService.appendChild(n, c);
|
|
371
371
|
}
|
|
372
|
-
return this.domService.appendChild(e.child,
|
|
372
|
+
return this.domService.appendChild(e.child, n), n;
|
|
373
373
|
}
|
|
374
374
|
addColumnDiv(e) {
|
|
375
|
-
const { parent: t, geo: s, rowIndex:
|
|
376
|
-
this.domService.addClass(
|
|
375
|
+
const { parent: t, geo: s, rowIndex: i = -1, columnIndex: o = -1, areaIdent: r, sideIdent: l, text: n = "", treeArrow: c, tableOptions: h, checkedType: d = void 0, sortState: p } = e, g = h == null ? void 0 : h.treeOptions, u = h == null ? void 0 : h.showCheckboxWihoutExtraColumn, S = this.domService.createElement("div");
|
|
376
|
+
this.domService.addClass(S, "ge-table-col-div"), u && this.domService.addClass(S, "ge-with-checkbox"), this.domService.addClass(S, `ge-table-col-div-${s.index}`), this.domService.setAttribute(S, "data-col-index", `${s.index}`), this.domService.setAttribute(S, "data-row-index", `${i}`), this.domService.setAttribute(S, "data-area", `${r}`);
|
|
377
377
|
const f = ((s == null ? void 0 : s.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
378
|
-
if (r === "body" &&
|
|
379
|
-
const
|
|
380
|
-
this.addLabelDiv(
|
|
378
|
+
if (r === "body" && l === "center" && this.domService.addClass(S, `ge-table-column-${f}`), this.domService.setStyle(S, "display", "clip"), this.domService.setStyle(S, "position", "absolute"), this.domService.setStyle(S, "left", `${s.left}px`), this.domService.setStyle(S, "top", `${s.top}px`), this.domService.setStyle(S, "width", `${s.width}px`), this.domService.setStyle(S, "height", `${s.height}px`), c && c !== "none" && (this.domService.addClass(S, "ge-table-col-tree"), this.addArrowDiv(S, c, g, i, o, r)), u && o === 0 && d && this.addCheckboxToDiv(S, d, r, i), n) {
|
|
379
|
+
const m = c !== "none" && o === 0;
|
|
380
|
+
this.addLabelDiv(S, n, m, i, o, r);
|
|
381
381
|
}
|
|
382
|
-
return p && this.addSortedIcon(
|
|
382
|
+
return p && this.addSortedIcon(S, p, h == null ? void 0 : h.sortedOptions, o), this.domService.appendChild(t, S), S;
|
|
383
383
|
}
|
|
384
|
-
addCheckboxToDiv(e, t, s,
|
|
385
|
-
const
|
|
386
|
-
return
|
|
384
|
+
addCheckboxToDiv(e, t, s, i) {
|
|
385
|
+
const o = this.domService.createElement("div"), r = t === "full" ? "checked" : "";
|
|
386
|
+
return o.innerHTML = `
|
|
387
387
|
<input
|
|
388
388
|
type="checkbox"
|
|
389
389
|
data-area="${s}"
|
|
390
|
-
data-row-index="${
|
|
390
|
+
data-row-index="${i}"
|
|
391
391
|
data-input-type="checkbox"
|
|
392
392
|
${r}
|
|
393
|
-
class="ge-table-row-checkbox"> `, this.domService.setStyle(
|
|
393
|
+
class="ge-table-row-checkbox"> `, this.domService.setStyle(o, "display", "inline"), this.domService.setStyle(o, "width", "inherit"), this.domService.setAttribute(o, "data-row-index", `${i}`), this.domService.appendChild(e, o), o;
|
|
394
394
|
}
|
|
395
|
-
addLabelDiv(e, t = "", s = !1,
|
|
396
|
-
const
|
|
397
|
-
if (this.domService.addClass(
|
|
395
|
+
addLabelDiv(e, t = "", s = !1, i = -1, o = -1, r = "body") {
|
|
396
|
+
const l = this.domService.createElement("div");
|
|
397
|
+
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", `${i}`), this.domService.setAttribute(l, "data-col-index", `${o}`), this.domService.setAttribute(l, "data-area", `${r}`), t)
|
|
398
398
|
if (s) {
|
|
399
|
-
const
|
|
400
|
-
this.domService.appendChild(
|
|
399
|
+
const n = this.domService.createText(t);
|
|
400
|
+
this.domService.appendChild(l, n);
|
|
401
401
|
} else {
|
|
402
|
-
const
|
|
403
|
-
this.domService.appendChild(
|
|
402
|
+
const n = this.domService.createElement("div");
|
|
403
|
+
this.domService.appendChild(l, n);
|
|
404
404
|
const c = this.domService.createText(t);
|
|
405
|
-
this.domService.addClass(
|
|
405
|
+
this.domService.addClass(n, "ge-table-label"), this.domService.appendChild(n, c), this.domService.setAttribute(n, "data-row-index", `${i}`), this.domService.setAttribute(n, "data-col-index", `${o}`), this.domService.setAttribute(n, "data-area", `${r}`);
|
|
406
406
|
}
|
|
407
|
-
return this.domService.appendChild(e,
|
|
407
|
+
return this.domService.appendChild(e, l), l;
|
|
408
408
|
}
|
|
409
|
-
addSortedIcon(e, t = "", s = new
|
|
410
|
-
const
|
|
411
|
-
this.domService.addClass(
|
|
409
|
+
addSortedIcon(e, t = "", s = new pe(), i = -1) {
|
|
410
|
+
const o = this.domService.createElement("div");
|
|
411
|
+
this.domService.addClass(o, "ge-table-sorted-icon-div"), this.domService.setStyle(o, "position", "absolute"), this.domService.setStyle(o, "top", "0"), this.domService.setStyle(o, "right", "0"), this.domService.setStyle(o, "width", "20px"), this.domService.setStyle(o, "background", "transparent"), this.domService.setStyle(o, "cursor", "pointer"), this.domService.setAttribute(o, "data-col-index", `${i}`), this.domService.setAttribute(o, "data-area", "header");
|
|
412
412
|
let r;
|
|
413
413
|
t === "asc" ? r = s.iconAsc : t === "desc" ? r = s.iconDesc : r = s.iconPlaceholder;
|
|
414
|
-
const
|
|
415
|
-
this.domService.appendChild(
|
|
414
|
+
const l = r.content, n = this.domService.createText(l);
|
|
415
|
+
this.domService.appendChild(o, n), r.style && this.applyStyleString(o, r.style);
|
|
416
416
|
for (const c of r.classes)
|
|
417
|
-
this.domService.addClass(
|
|
418
|
-
return this.domService.appendChild(e,
|
|
419
|
-
}
|
|
420
|
-
addArrowDiv(e, t = "none", s = new
|
|
421
|
-
const
|
|
422
|
-
this.domService.addClass(
|
|
423
|
-
let
|
|
424
|
-
t === "expanded" ?
|
|
425
|
-
const c =
|
|
426
|
-
this.domService.appendChild(
|
|
427
|
-
for (const d of
|
|
428
|
-
this.domService.addClass(
|
|
429
|
-
return this.domService.appendChild(e,
|
|
430
|
-
}
|
|
431
|
-
addColumnBorderDivs(e, t, s,
|
|
417
|
+
this.domService.addClass(o, c);
|
|
418
|
+
return this.domService.appendChild(e, o), o;
|
|
419
|
+
}
|
|
420
|
+
addArrowDiv(e, t = "none", s = new he(), i = -1, o = -1, r = "body") {
|
|
421
|
+
const l = this.domService.createElement("div");
|
|
422
|
+
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", `${i}`), this.domService.setAttribute(l, "data-col-index", `${o}`), this.domService.setAttribute(l, "data-area", `${r}`);
|
|
423
|
+
let n;
|
|
424
|
+
t === "expanded" ? n = s.arrowExpanded : t === "collapsed" ? n = s.arrowCollapsed : n = s.arrowPlaceholder;
|
|
425
|
+
const c = n.content, h = this.domService.createText(c);
|
|
426
|
+
this.domService.appendChild(l, h), n.style && this.applyStyleString(l, n.style);
|
|
427
|
+
for (const d of n.classes)
|
|
428
|
+
this.domService.addClass(l, d);
|
|
429
|
+
return this.domService.appendChild(e, l), l;
|
|
430
|
+
}
|
|
431
|
+
addColumnBorderDivs(e, t, s, i, o) {
|
|
432
432
|
if (e.verticalBorderVisible) {
|
|
433
|
-
const r = `ge-table-${
|
|
433
|
+
const r = `ge-table-${i}-${o}-vertical-border`;
|
|
434
434
|
this.addVerticalBorder(s, t, r);
|
|
435
435
|
}
|
|
436
436
|
if (e.horizontalBorderVisible) {
|
|
437
|
-
const r = `ge-table-${
|
|
437
|
+
const r = `ge-table-${i}-${o}-horizontal-border`;
|
|
438
438
|
this.addHorizontalBorder(s, t, r);
|
|
439
439
|
}
|
|
440
440
|
return t;
|
|
441
441
|
}
|
|
442
442
|
addHorizontalBorder(e, t, s = "ge-table-body-center-horizontal-border") {
|
|
443
|
-
const
|
|
444
|
-
return this.domService.addClass(
|
|
443
|
+
const i = this.domService.createElement("div");
|
|
444
|
+
return this.domService.addClass(i, s), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${e.left}px`), this.domService.setStyle(i, "top", `${e.top}px`), this.domService.setStyle(i, "width", `${e.width}px`), this.domService.setStyle(i, "height", "1px"), this.domService.appendChild(t, i), i;
|
|
445
445
|
}
|
|
446
446
|
addFocusBorderDivs(e, t, s) {
|
|
447
447
|
t = { ...t, width: t.width + 1, height: t.height + 1 };
|
|
448
|
-
let
|
|
449
|
-
return this.domService.addClass(
|
|
448
|
+
let i = this.domService.createElement("div");
|
|
449
|
+
return this.domService.addClass(i, "ge-table-focus-border"), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left}px`), this.domService.setStyle(i, "top", `${t.top}px`), this.domService.setStyle(i, "width", "1px"), this.domService.setStyle(i, "height", `${t.height}px`), this.domService.setStyle(i, "z-index", "9999"), this.applyStyle(i, s), this.domService.appendChild(e, i), i = this.domService.createElement("div"), this.domService.addClass(i, "ge-table-focus-border"), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left + t.width - 1}px`), this.domService.setStyle(i, "top", `${t.top}px`), this.domService.setStyle(i, "width", "1px"), this.domService.setStyle(i, "height", `${t.height}px`), this.domService.setStyle(i, "z-index", "9999"), this.applyStyle(i, s), this.domService.appendChild(e, i), i = this.domService.createElement("div"), this.domService.addClass(i, "ge-table-focus-border"), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left}px`), this.domService.setStyle(i, "top", `${t.top}px`), this.domService.setStyle(i, "width", `${t.width}px`), this.domService.setStyle(i, "height", "1px"), this.domService.setStyle(i, "z-index", "9999"), this.applyStyle(i, s), this.domService.appendChild(e, i), i = this.domService.createElement("div"), this.domService.addClass(i, "ge-table-focus-border"), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left}px`), this.domService.setStyle(i, "top", `${t.top + t.height - 1}px`), this.domService.setStyle(i, "width", `${t.width}px`), this.domService.setStyle(i, "height", "1px"), this.domService.setStyle(i, "z-index", "9999"), this.applyStyle(i, s), this.domService.appendChild(e, i), e;
|
|
450
450
|
}
|
|
451
451
|
addVerticalBorder(e, t, s = "ge-table-body-center-vertical-border") {
|
|
452
|
-
const
|
|
453
|
-
return this.domService.addClass(
|
|
452
|
+
const i = this.domService.createElement("div");
|
|
453
|
+
return this.domService.addClass(i, s), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${e.left}px`), this.domService.setStyle(i, "top", `${e.top}px`), this.domService.setStyle(i, "width", "1px"), this.domService.setStyle(i, "height", `${e.height}px`), this.domService.appendChild(t, i), i;
|
|
454
454
|
}
|
|
455
455
|
addDiv(e, t, s = "") {
|
|
456
|
-
const
|
|
457
|
-
return s && this.domService.addClass(
|
|
456
|
+
const i = this.domService.createElement("div");
|
|
457
|
+
return s && this.domService.addClass(i, s), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left}px`), this.domService.setStyle(i, "top", `${t.top}px`), this.domService.setStyle(i, "width", `${t.width}px`), this.domService.setStyle(i, "height", `${t.height}px`), this.domService.appendChild(e, i), i;
|
|
458
458
|
}
|
|
459
459
|
applyStyleString(e, t) {
|
|
460
|
-
const s = t.split(";").map((
|
|
461
|
-
for (const
|
|
462
|
-
const [
|
|
463
|
-
this.domService.setStyle(e,
|
|
460
|
+
const s = t.split(";").map((i) => i.trim()).filter((i) => i);
|
|
461
|
+
for (const i of s) {
|
|
462
|
+
const [o, r] = i.split(":");
|
|
463
|
+
this.domService.setStyle(e, o.trim(), r.trim());
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
466
|
getDivOrCreateDiv(e, t) {
|
|
@@ -468,20 +468,20 @@ class Ne {
|
|
|
468
468
|
return s ? (s.innerText = "", s) : (s = this.domService.createElement("div"), t.cache[e] = s, s);
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
|
-
const
|
|
472
|
-
class
|
|
471
|
+
const Z = (a) => a === "header" ? "header" : a === "footer" ? "footer" : "body";
|
|
472
|
+
class We {
|
|
473
473
|
constructor(e, t) {
|
|
474
474
|
if (this.rowIdx = -1, this.colIdx = -1, this.action = null, this.inputType = null, this.className = "", e !== null && (e instanceof HTMLDivElement || e instanceof HTMLSpanElement || e instanceof HTMLInputElement)) {
|
|
475
475
|
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"));
|
|
476
476
|
const s = e.getAttribute("data-area");
|
|
477
|
-
if (s && (this.areaIdent =
|
|
478
|
-
const
|
|
479
|
-
this.value =
|
|
477
|
+
if (s && (this.areaIdent = Z(s), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
|
|
478
|
+
const i = e;
|
|
479
|
+
this.value = i.value;
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
483
|
}
|
|
484
|
-
class
|
|
484
|
+
class $e {
|
|
485
485
|
constructor(e) {
|
|
486
486
|
this.tableScope = e, this.doubleClickDelay = 500, this.expandedAll = !0, this.mouseDown = !1, this.dragging = !1, this.lastClicked = 0, this.tableScope.hostElement.addEventListener("click", this.onHostElementClicked.bind(this)), this.tableScope.hostElement.addEventListener("dblclick", this.onHostElementDblClicked.bind(this)), this.tableScope.hostElement.addEventListener("mousedown", this.onMouseDown.bind(this)), this.tableScope.hostElement.addEventListener("mousemove", this.onMouseMove.bind(this)), this.tableScope.hostElement.addEventListener("mouseup", this.onMouseUp.bind(this)), this.tableScope.hostElement.addEventListener("contextmenu", this.onContextmenu.bind(this)), this.tableScope.hostElement._MouseHandler = "true", this.tableScope.scrollViewport.addEventListener("scroll", this.tableScope.adjustAfterScrolling.bind(this.tableScope)), [window, this.tableScope.hostElement].forEach(
|
|
487
487
|
(t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
|
|
@@ -513,24 +513,24 @@ class je {
|
|
|
513
513
|
return;
|
|
514
514
|
}
|
|
515
515
|
this.lastClicked = t;
|
|
516
|
-
const s = new
|
|
516
|
+
const s = new We(e.target, this.tableScope);
|
|
517
517
|
if (s.action === "toggleExpandCollapseAll")
|
|
518
518
|
this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
|
|
519
519
|
else if (s.action === "toggleHeaderGroup")
|
|
520
520
|
this.tableScope.toggleHeaderGroup(s), e.preventDefault(), e.stopPropagation();
|
|
521
521
|
else if (s.inputType === "checkbox" && s.areaIdent)
|
|
522
522
|
this.tableScope.toggleRowCheckbox(s.rowIdx, s.colIdx, s.areaIdent), e.preventDefault(), e.stopPropagation();
|
|
523
|
-
else if (
|
|
524
|
-
const
|
|
525
|
-
if (
|
|
523
|
+
else if ($(s.row) && s.areaModel) {
|
|
524
|
+
const i = s.colIdx === this.getArrowColumnIndex() && e.altKey, o = s.className.includes("ge-table-tree-arrow-div");
|
|
525
|
+
if (i || o) {
|
|
526
526
|
e.preventDefault(), e.stopPropagation();
|
|
527
527
|
const r = s.row;
|
|
528
528
|
r.expanded = !r.expanded, "recalcVisibleTreeRows" in s.areaModel && s.areaModel.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(r);
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
531
|
if (s.areaIdent === "body" && this.tableScope.tableOptions.getFocusModel) {
|
|
532
|
-
const
|
|
533
|
-
|
|
532
|
+
const i = this.tableScope.tableOptions.getFocusModel();
|
|
533
|
+
i == null || i.clear(), i == null || i.setFocus(s.rowIdx, s.colIdx);
|
|
534
534
|
}
|
|
535
535
|
this.publishGeMouseEvent(e, 1);
|
|
536
536
|
}
|
|
@@ -542,15 +542,15 @@ class je {
|
|
|
542
542
|
*/
|
|
543
543
|
onHostElementDblClicked(e) {
|
|
544
544
|
if (this.lastClicked = Date.now(), e.target instanceof HTMLElement) {
|
|
545
|
-
const t = e.target, s = t.getAttribute("data-area"),
|
|
546
|
-
if (s &&
|
|
547
|
-
this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e,
|
|
545
|
+
const t = e.target, s = t.getAttribute("data-area"), i = Z(s), o = Number(t.getAttribute("data-row-index")), r = Number(t.getAttribute("data-col-index")), l = this.tableScope.tableModel.getAreaModel(i);
|
|
546
|
+
if (s && i === "header")
|
|
547
|
+
this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, o, r));
|
|
548
548
|
else if (t.getAttribute("data-row-index")) {
|
|
549
|
-
const
|
|
550
|
-
if (s &&
|
|
549
|
+
const n = l.getRowByIndex(o);
|
|
550
|
+
if (s && i === "body" && l.isEditable(o, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(o, r)), $(n) && r === this.getArrowColumnIndex()) {
|
|
551
551
|
e.preventDefault(), e.stopPropagation();
|
|
552
|
-
const c =
|
|
553
|
-
c.expanded = !c.expanded, "recalcVisibleTreeRows" in
|
|
552
|
+
const c = n;
|
|
553
|
+
c.expanded = !c.expanded, "recalcVisibleTreeRows" in l && l.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(c);
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
556
|
}
|
|
@@ -575,11 +575,11 @@ class je {
|
|
|
575
575
|
* @returns {void}
|
|
576
576
|
*/
|
|
577
577
|
updateCollapsedExpandedState(e) {
|
|
578
|
-
var s,
|
|
579
|
-
const t = (
|
|
578
|
+
var s, i, o, r, l;
|
|
579
|
+
const t = (i = (s = this.tableScope.tableOptions) == null ? void 0 : s.autoRestoreOptions) == null ? void 0 : i.getRowId;
|
|
580
580
|
if (t) {
|
|
581
|
-
const
|
|
582
|
-
c ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(d) : h && ((
|
|
581
|
+
const n = (o = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : o.collapsedExpandedStateGet().mode, c = n === "collapsed" && !e.expanded || n === "expanded" && e.expanded, h = n === "collapsed" && e.expanded || n === "expanded" && !e.expanded, d = t(e.data);
|
|
582
|
+
c ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(d) : h && ((l = this.tableScope.storeStateCollapsedExpandService) == null || l.collapsedStateIdsRemove(d));
|
|
583
583
|
}
|
|
584
584
|
}
|
|
585
585
|
getArrowColumnIndex() {
|
|
@@ -615,9 +615,9 @@ class je {
|
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
|
-
class
|
|
618
|
+
class He {
|
|
619
619
|
constructor(e, t = [], s = -1) {
|
|
620
|
-
this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = s, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((
|
|
620
|
+
this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = s, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((i) => i.rendererMap[e]);
|
|
621
621
|
}
|
|
622
622
|
getTextValueAt(e, t) {
|
|
623
623
|
return "" + this.getValueAt(e, t);
|
|
@@ -677,16 +677,16 @@ class Ue {
|
|
|
677
677
|
sort(e) {
|
|
678
678
|
}
|
|
679
679
|
isEditable(e, t) {
|
|
680
|
-
var
|
|
681
|
-
const s = (
|
|
682
|
-
return ((
|
|
680
|
+
var i, o;
|
|
681
|
+
const s = (i = this.columnDefs) == null ? void 0 : i[t];
|
|
682
|
+
return ((o = s == null ? void 0 : s.editable) == null ? void 0 : o.call(s)) ?? !1;
|
|
683
683
|
}
|
|
684
684
|
setValue(e, t, s) {
|
|
685
|
-
var
|
|
686
|
-
const
|
|
687
|
-
|
|
688
|
-
const
|
|
689
|
-
return r.includes(".") ? this.setPropertyValue(
|
|
685
|
+
var l;
|
|
686
|
+
const i = (l = this.columnDefs[t]) == null ? void 0 : l.editInputPipe;
|
|
687
|
+
i && (s = i(s, e, t));
|
|
688
|
+
const o = this.getRowByIndex(e), r = this.columnDefs[t].property;
|
|
689
|
+
return r.includes(".") ? this.setPropertyValue(o, r.split("."), s) : (o[r] = s, !0);
|
|
690
690
|
}
|
|
691
691
|
isSelectable(e, t) {
|
|
692
692
|
return !0;
|
|
@@ -695,16 +695,16 @@ class Ue {
|
|
|
695
695
|
this.arrayMove(this.cellRenderers, e, t);
|
|
696
696
|
}
|
|
697
697
|
setPropertyValue(e, t, s) {
|
|
698
|
-
const
|
|
699
|
-
if (
|
|
700
|
-
const
|
|
701
|
-
return
|
|
698
|
+
const i = t.shift();
|
|
699
|
+
if (i) {
|
|
700
|
+
const o = e[i];
|
|
701
|
+
return o && t.length ? this.setPropertyValue(o, t, s) : (e[i] = s, !0);
|
|
702
702
|
}
|
|
703
703
|
return !1;
|
|
704
704
|
}
|
|
705
705
|
arrayMove(e, t, s) {
|
|
706
|
-
const
|
|
707
|
-
return e.splice(s, 0,
|
|
706
|
+
const i = e.splice(t, 1)[0];
|
|
707
|
+
return e.splice(s, 0, i), e;
|
|
708
708
|
}
|
|
709
709
|
calcYPositions() {
|
|
710
710
|
const e = this.getRowCount();
|
|
@@ -713,7 +713,7 @@ class Ue {
|
|
|
713
713
|
this.yPositions[t + 1] = this.getRowHeight(t) + this.yPositions[t];
|
|
714
714
|
}
|
|
715
715
|
}
|
|
716
|
-
class
|
|
716
|
+
class Ne {
|
|
717
717
|
genericSortComparator(e, t, s) {
|
|
718
718
|
if (typeof e == "number" && typeof t == "number")
|
|
719
719
|
return s * (e - t);
|
|
@@ -724,14 +724,14 @@ class Xe {
|
|
|
724
724
|
if (e instanceof Date && t instanceof Date)
|
|
725
725
|
return s * (e.getTime() - t.getTime());
|
|
726
726
|
if (e instanceof Array && t instanceof Array) {
|
|
727
|
-
const
|
|
728
|
-
if (
|
|
729
|
-
return this.genericSortComparator(
|
|
727
|
+
const i = e, o = t;
|
|
728
|
+
if (i.length && o.length)
|
|
729
|
+
return this.genericSortComparator(i[0], o[0], s);
|
|
730
730
|
}
|
|
731
731
|
return s * ("" + e).localeCompare("" + t);
|
|
732
732
|
}
|
|
733
733
|
}
|
|
734
|
-
class D extends
|
|
734
|
+
class D extends He {
|
|
735
735
|
/**
|
|
736
736
|
* Creates an instance of AreaModelObjectArray.
|
|
737
737
|
*
|
|
@@ -761,8 +761,8 @@ class D extends Ue {
|
|
|
761
761
|
* columnDefs
|
|
762
762
|
* );
|
|
763
763
|
*/
|
|
764
|
-
constructor(e, t, s,
|
|
765
|
-
super(e,
|
|
764
|
+
constructor(e, t, s, i = [], o = "ge-selected-row", r = "ge-focused-row") {
|
|
765
|
+
super(e, i, s), this.areaIdent = e, this.rows = t, this.defaultRowHeight = s, this.columnDefs = i, this.selectedRowClass = o, this.focusedRowClass = r, this.sorterService = new Ne(), this._focusedRowIndex = 0, this.filteredRows = [...t], this.properties = i.map((l) => l.property);
|
|
766
766
|
}
|
|
767
767
|
/**
|
|
768
768
|
* Gets the index of the currently focused row.
|
|
@@ -856,8 +856,8 @@ class D extends Ue {
|
|
|
856
856
|
*/
|
|
857
857
|
getValueAt(e, t) {
|
|
858
858
|
const s = this.properties[t];
|
|
859
|
-
let
|
|
860
|
-
return
|
|
859
|
+
let i = this.filteredRows[e];
|
|
860
|
+
return $(i) && (i = i.data), i ? this.getValueByT(i, s) : "";
|
|
861
861
|
}
|
|
862
862
|
/**
|
|
863
863
|
* Retrieves the filtered and sorted rows from the dataset.
|
|
@@ -1034,8 +1034,8 @@ class D extends Ue {
|
|
|
1034
1034
|
*/
|
|
1035
1035
|
doSort(e) {
|
|
1036
1036
|
for (const t of e) {
|
|
1037
|
-
const { columnIndex: s, sortState:
|
|
1038
|
-
this.filteredRows = this.filteredRows.sort(this.genericFlatTableSortComparator(r,
|
|
1037
|
+
const { columnIndex: s, sortState: i } = t, o = i === "asc" ? 1 : i === "desc" ? -1 : 0, r = this.properties[s];
|
|
1038
|
+
this.filteredRows = this.filteredRows.sort(this.genericFlatTableSortComparator(r, o));
|
|
1039
1039
|
}
|
|
1040
1040
|
return !0;
|
|
1041
1041
|
}
|
|
@@ -1144,10 +1144,10 @@ class D extends Ue {
|
|
|
1144
1144
|
* const sortedRows = [...bodyAreaModel.getFilteredRows()].sort(comparator);
|
|
1145
1145
|
*/
|
|
1146
1146
|
genericFlatTableSortComparator(e, t) {
|
|
1147
|
-
const s = this.columnDefs.find((
|
|
1148
|
-
return (
|
|
1149
|
-
const r = this.getValueByT(
|
|
1150
|
-
return s != null && s.sortComparator ? t * s.sortComparator(r,
|
|
1147
|
+
const s = this.columnDefs.find((i) => i.property === e);
|
|
1148
|
+
return (i, o) => {
|
|
1149
|
+
const r = this.getValueByT(i, e), l = this.getValueByT(o, e);
|
|
1150
|
+
return s != null && s.sortComparator ? t * s.sortComparator(r, l, i, o, t) : this.sorterService.genericSortComparator(r, l, t);
|
|
1151
1151
|
};
|
|
1152
1152
|
}
|
|
1153
1153
|
/**
|
|
@@ -1161,11 +1161,11 @@ class D extends Ue {
|
|
|
1161
1161
|
* @private
|
|
1162
1162
|
*/
|
|
1163
1163
|
getPropertyValue(e, t) {
|
|
1164
|
-
const s = t.shift(),
|
|
1165
|
-
return
|
|
1164
|
+
const s = t.shift(), i = e[s];
|
|
1165
|
+
return i && t.length ? this.getPropertyValue(i, t) : i;
|
|
1166
1166
|
}
|
|
1167
1167
|
}
|
|
1168
|
-
class
|
|
1168
|
+
class Ge {
|
|
1169
1169
|
constructor(e) {
|
|
1170
1170
|
this.tableScope = e;
|
|
1171
1171
|
}
|
|
@@ -1781,14 +1781,14 @@ class Ke {
|
|
|
1781
1781
|
* tableApi.downloadExcel('quarterly-data.xlsx');
|
|
1782
1782
|
*/
|
|
1783
1783
|
downloadExcel(e = "table.xlsx", t = "") {
|
|
1784
|
-
const s = [],
|
|
1785
|
-
for (const r of
|
|
1786
|
-
const
|
|
1787
|
-
for (let c = 0; c <
|
|
1784
|
+
const s = [], i = this.tableScope.tableModel.getColumnCount(), o = ["header", "body", "footer"];
|
|
1785
|
+
for (const r of o) {
|
|
1786
|
+
const l = this.tableScope.tableModel.getAreaModel(r), n = (l == null ? void 0 : l.getRowCount()) ?? 0;
|
|
1787
|
+
for (let c = 0; c < n; c++) {
|
|
1788
1788
|
const h = [];
|
|
1789
1789
|
s.push(h);
|
|
1790
|
-
for (let d = 0; d <
|
|
1791
|
-
h.push(
|
|
1790
|
+
for (let d = 0; d < i; d++)
|
|
1791
|
+
h.push(l.getValueAt(c, d));
|
|
1792
1792
|
}
|
|
1793
1793
|
}
|
|
1794
1794
|
return this.tableScope.excelService.downloadExcel(s, e, t);
|
|
@@ -1946,8 +1946,8 @@ class Ke {
|
|
|
1946
1946
|
const t = this.getBodyModel();
|
|
1947
1947
|
if (t instanceof D) {
|
|
1948
1948
|
const s = t;
|
|
1949
|
-
let
|
|
1950
|
-
s.setRows([...
|
|
1949
|
+
let i = s.getAllRows();
|
|
1950
|
+
s.setRows([...i, ...e]);
|
|
1951
1951
|
} else
|
|
1952
1952
|
console.warn("addRows<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ", typeof t, t);
|
|
1953
1953
|
}
|
|
@@ -1970,9 +1970,9 @@ class Ke {
|
|
|
1970
1970
|
addRowsAt(e, t) {
|
|
1971
1971
|
const s = this.getBodyModel();
|
|
1972
1972
|
if (s instanceof D) {
|
|
1973
|
-
const
|
|
1974
|
-
let
|
|
1975
|
-
|
|
1973
|
+
const i = s;
|
|
1974
|
+
let o = i.getAllRows();
|
|
1975
|
+
i.setRows([...o.slice(0, t), ...e, ...o.slice(t)]);
|
|
1976
1976
|
} else
|
|
1977
1977
|
console.warn("addRowsAt<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ", typeof s, s);
|
|
1978
1978
|
}
|
|
@@ -1993,11 +1993,11 @@ class Ke {
|
|
|
1993
1993
|
*
|
|
1994
1994
|
* @throws {Warning} Logs a console warning if the table's body model is not an AreaModelObjectArray
|
|
1995
1995
|
*/
|
|
1996
|
-
removeRows(e, t = (s,
|
|
1996
|
+
removeRows(e, t = (s, i) => s === i) {
|
|
1997
1997
|
const s = this.getBodyModel();
|
|
1998
1998
|
if (s instanceof D) {
|
|
1999
|
-
const
|
|
2000
|
-
|
|
1999
|
+
const i = s, o = i.getAllRows().filter((r) => !e.some((l) => t(r, l)));
|
|
2000
|
+
i.setRows(o);
|
|
2001
2001
|
} else
|
|
2002
2002
|
console.warn("removeRows<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ", typeof s, s);
|
|
2003
2003
|
}
|
|
@@ -2034,9 +2034,9 @@ class Ke {
|
|
|
2034
2034
|
*
|
|
2035
2035
|
* @throws {Warning} Logs a console warning if the table's body model is not an AreaModelObjectArray
|
|
2036
2036
|
*/
|
|
2037
|
-
findRows(e, t = (s,
|
|
2037
|
+
findRows(e, t = (s, i) => s === i) {
|
|
2038
2038
|
const s = this.getBodyModel();
|
|
2039
|
-
return s instanceof D ? s.getAllRows().filter((
|
|
2039
|
+
return s instanceof D ? s.getAllRows().filter((o) => e.some((r) => t(o, r))) : (console.warn("findRows<T>(rows: T[], predicate: (a: T, b: T) => boolean) only works with AreaModelObjectArray<T>, but this body area model is ", typeof s, s), []);
|
|
2040
2040
|
}
|
|
2041
2041
|
/**
|
|
2042
2042
|
* Searches through the filtered rows of the table to find a row that matches specific criteria.
|
|
@@ -2094,7 +2094,7 @@ class Ke {
|
|
|
2094
2094
|
findRowFromFilteredRowsByAllCriteria(e, t) {
|
|
2095
2095
|
const s = this.getBodyModel();
|
|
2096
2096
|
if (s instanceof D)
|
|
2097
|
-
return s.getFilteredRows().find((
|
|
2097
|
+
return s.getFilteredRows().find((o) => t(e, o));
|
|
2098
2098
|
console.warn("findRowFromFilteredRowsByAllCriteria(...) only works with AreaModelObjectArray<T>, but this body area model is ", typeof s, s);
|
|
2099
2099
|
}
|
|
2100
2100
|
/**
|
|
@@ -2141,7 +2141,7 @@ class Ke {
|
|
|
2141
2141
|
findRowFromAllRowsByAllCriteria(e, t) {
|
|
2142
2142
|
const s = this.getBodyModel();
|
|
2143
2143
|
if (s instanceof D)
|
|
2144
|
-
return s.getAllRows().find((
|
|
2144
|
+
return s.getAllRows().find((o) => t(e, o));
|
|
2145
2145
|
console.warn("findRowFromAllRowsByAllCriteria(...) only works with AreaModelObjectArray<T>, but this body area model is ", typeof s, s);
|
|
2146
2146
|
}
|
|
2147
2147
|
/**
|
|
@@ -2163,15 +2163,15 @@ class Ke {
|
|
|
2163
2163
|
*
|
|
2164
2164
|
* @throws {Warning} Logs a console warning if the table's body model is not an AreaModelObjectArray
|
|
2165
2165
|
*/
|
|
2166
|
-
updateRows(e, t = (s,
|
|
2166
|
+
updateRows(e, t = (s, i) => s === i) {
|
|
2167
2167
|
const s = this.getBodyModel();
|
|
2168
2168
|
if (s instanceof D) {
|
|
2169
|
-
let
|
|
2170
|
-
for (const r of
|
|
2171
|
-
for (const
|
|
2172
|
-
if (t(r,
|
|
2173
|
-
for (const
|
|
2174
|
-
r[
|
|
2169
|
+
let o = s.getAllRows();
|
|
2170
|
+
for (const r of o)
|
|
2171
|
+
for (const l of e)
|
|
2172
|
+
if (t(r, l))
|
|
2173
|
+
for (const n of Object.keys(l))
|
|
2174
|
+
r[n] = l[n];
|
|
2175
2175
|
} else
|
|
2176
2176
|
console.warn("updateRows<T>(rows: T[], predicate: (a: T, b: T) => boolean) only works with AreaModelObjectArray<T>, but this body area model is ", typeof s, s);
|
|
2177
2177
|
}
|
|
@@ -2513,27 +2513,27 @@ class Ke {
|
|
|
2513
2513
|
return this.tableScope.loggingActive;
|
|
2514
2514
|
}
|
|
2515
2515
|
}
|
|
2516
|
-
class
|
|
2516
|
+
class Q {
|
|
2517
2517
|
constructor(e) {
|
|
2518
2518
|
this.getStorageKeyFn = e;
|
|
2519
2519
|
}
|
|
2520
2520
|
autoConvertMapToObject(e) {
|
|
2521
2521
|
const t = {};
|
|
2522
|
-
return e instanceof Map && e.forEach((
|
|
2523
|
-
t[
|
|
2522
|
+
return e instanceof Map && e.forEach((i, o) => {
|
|
2523
|
+
t[i] = o;
|
|
2524
2524
|
}), t;
|
|
2525
2525
|
}
|
|
2526
2526
|
checkAndPersistItem(e, t) {
|
|
2527
2527
|
const s = this.getStorageKeyFn;
|
|
2528
2528
|
if (s) {
|
|
2529
|
-
const
|
|
2530
|
-
if (
|
|
2531
|
-
const
|
|
2529
|
+
const i = s();
|
|
2530
|
+
if (i) {
|
|
2531
|
+
const o = i + e;
|
|
2532
2532
|
if ((t + "").includes("Map")) {
|
|
2533
2533
|
const r = this.autoConvertMapToObject(t);
|
|
2534
|
-
this.persistItem(
|
|
2534
|
+
this.persistItem(o, r);
|
|
2535
2535
|
} else
|
|
2536
|
-
this.persistItem(
|
|
2536
|
+
this.persistItem(o, t);
|
|
2537
2537
|
}
|
|
2538
2538
|
}
|
|
2539
2539
|
}
|
|
@@ -2580,7 +2580,7 @@ class te {
|
|
|
2580
2580
|
// }
|
|
2581
2581
|
// }
|
|
2582
2582
|
}
|
|
2583
|
-
class
|
|
2583
|
+
class je extends Q {
|
|
2584
2584
|
constructor(e) {
|
|
2585
2585
|
super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
|
|
2586
2586
|
}
|
|
@@ -2596,20 +2596,20 @@ class Ye extends te {
|
|
|
2596
2596
|
const t = e();
|
|
2597
2597
|
if (t) {
|
|
2598
2598
|
const s = t + this.SCROLL_STATE;
|
|
2599
|
-
let
|
|
2600
|
-
this.scrollOffset =
|
|
2599
|
+
let i = this.loadFromLocalStorage(s);
|
|
2600
|
+
this.scrollOffset = i || [0, 0];
|
|
2601
2601
|
}
|
|
2602
2602
|
}
|
|
2603
2603
|
}
|
|
2604
2604
|
}
|
|
2605
|
-
class
|
|
2606
|
-
constructor(e = "collapsed", t = [], s = !1,
|
|
2607
|
-
this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded =
|
|
2605
|
+
class Ue {
|
|
2606
|
+
constructor(e = "collapsed", t = [], s = !1, i = !1) {
|
|
2607
|
+
this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = i;
|
|
2608
2608
|
}
|
|
2609
2609
|
}
|
|
2610
|
-
class
|
|
2610
|
+
class Xe extends Q {
|
|
2611
2611
|
constructor(e) {
|
|
2612
|
-
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new
|
|
2612
|
+
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new Ue(), this.load();
|
|
2613
2613
|
}
|
|
2614
2614
|
collapsedExpandedStateGet() {
|
|
2615
2615
|
return this.collapsedExpandedState;
|
|
@@ -2632,8 +2632,8 @@ class qe extends te {
|
|
|
2632
2632
|
if (e) {
|
|
2633
2633
|
const t = e();
|
|
2634
2634
|
if (t) {
|
|
2635
|
-
const s = t + this.COLLAPSED_EXPANDED_STATE,
|
|
2636
|
-
|
|
2635
|
+
const s = t + this.COLLAPSED_EXPANDED_STATE, i = this.loadFromLocalStorage(s);
|
|
2636
|
+
i && (this.collapsedExpandedState = i);
|
|
2637
2637
|
}
|
|
2638
2638
|
}
|
|
2639
2639
|
}
|
|
@@ -2641,7 +2641,7 @@ class qe extends te {
|
|
|
2641
2641
|
this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
|
|
2642
2642
|
}
|
|
2643
2643
|
}
|
|
2644
|
-
class
|
|
2644
|
+
class ze extends Q {
|
|
2645
2645
|
constructor(e) {
|
|
2646
2646
|
super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
|
|
2647
2647
|
}
|
|
@@ -2656,69 +2656,69 @@ class Ze extends te {
|
|
|
2656
2656
|
if (e) {
|
|
2657
2657
|
const t = e();
|
|
2658
2658
|
if (t) {
|
|
2659
|
-
const s = t + this.SORTING_STATE,
|
|
2660
|
-
this.sortItems =
|
|
2659
|
+
const s = t + this.SORTING_STATE, i = this.loadFromLocalStorage(s);
|
|
2660
|
+
this.sortItems = i || [];
|
|
2661
2661
|
}
|
|
2662
2662
|
}
|
|
2663
2663
|
}
|
|
2664
2664
|
}
|
|
2665
2665
|
class T {
|
|
2666
|
-
constructor(e = 0, t = 0, s = 0,
|
|
2667
|
-
this.left = e, this.width = t, this.height = s, this.top =
|
|
2666
|
+
constructor(e = 0, t = 0, s = 0, i = 0, o) {
|
|
2667
|
+
this.left = e, this.width = t, this.height = s, this.top = i, this.index = o;
|
|
2668
2668
|
}
|
|
2669
2669
|
}
|
|
2670
|
-
class
|
|
2671
|
-
constructor(e, t, s,
|
|
2672
|
-
this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions =
|
|
2673
|
-
const
|
|
2674
|
-
|
|
2675
|
-
this.dom.addClass("ge-table",
|
|
2670
|
+
class Ke {
|
|
2671
|
+
constructor(e, t, s, i) {
|
|
2672
|
+
this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = i, this.scrollTop = 0, this.areaBodyWestGeo = new T(), this.areaBodyCenterGeo = new T(), this.areaBodyEastGeo = new T();
|
|
2673
|
+
const o = this.hostElement;
|
|
2674
|
+
o.innerText = "", this.dom.setAttribute(o, "tabindex", "0"), this.dom.setStyle(
|
|
2675
|
+
this.dom.addClass("ge-table", o),
|
|
2676
2676
|
"position",
|
|
2677
2677
|
"relative"
|
|
2678
2678
|
), this.hoverRow = s.applyStylePosistionAbsolute(
|
|
2679
|
-
s.createDivWithClass("ge-table-hover-row",
|
|
2679
|
+
s.createDivWithClass("ge-table-hover-row", o)
|
|
2680
2680
|
), this.hoverColumn = s.applyStylePosistionAbsolute(
|
|
2681
|
-
s.createDivWithClass("ge-table-hover-column",
|
|
2681
|
+
s.createDivWithClass("ge-table-hover-column", o)
|
|
2682
2682
|
), this.draggingColumn = s.applyStylePosistionAbsolute(
|
|
2683
|
-
s.createDivWithClass("ge-table-dragging-column",
|
|
2683
|
+
s.createDivWithClass("ge-table-dragging-column", o)
|
|
2684
2684
|
), this.areaHeaderWest = s.appendRelativeChildDiv(
|
|
2685
2685
|
s.applyStylePosistionAbsolute(
|
|
2686
|
-
s.createAreaDivWithClass("ge-table-header ge-table-header-west",
|
|
2686
|
+
s.createAreaDivWithClass("ge-table-header ge-table-header-west", o, "header", "west")
|
|
2687
2687
|
)
|
|
2688
2688
|
), this.areaHeaderCenter = s.appendRelativeChildDiv(
|
|
2689
2689
|
s.applyStylePosistionAbsolute(
|
|
2690
|
-
s.createAreaDivWithClass("ge-table-header ge-table-header-center",
|
|
2690
|
+
s.createAreaDivWithClass("ge-table-header ge-table-header-center", o, "header", "center")
|
|
2691
2691
|
)
|
|
2692
2692
|
), this.areaHeaderEast = s.appendRelativeChildDiv(
|
|
2693
2693
|
s.applyStylePosistionAbsolute(
|
|
2694
|
-
s.createAreaDivWithClass("ge-table-header ge-table-header-east",
|
|
2694
|
+
s.createAreaDivWithClass("ge-table-header ge-table-header-east", o, "body", "east")
|
|
2695
2695
|
)
|
|
2696
2696
|
), this.areaBodyWest = s.appendRelativeChildDiv(
|
|
2697
2697
|
s.applyStylePosistionAbsolute(
|
|
2698
|
-
s.createAreaDivWithClass("ge-table-body ge-table-body-west",
|
|
2698
|
+
s.createAreaDivWithClass("ge-table-body ge-table-body-west", o, "body", "west")
|
|
2699
2699
|
)
|
|
2700
2700
|
), this.areaBodyEast = s.appendRelativeChildDiv(
|
|
2701
2701
|
s.applyStylePosistionAbsolute(
|
|
2702
|
-
s.createAreaDivWithClass("ge-table-body ge-table-body-east",
|
|
2702
|
+
s.createAreaDivWithClass("ge-table-body ge-table-body-east", o, "body", "east")
|
|
2703
2703
|
)
|
|
2704
2704
|
), this.areaFooterWest = s.appendRelativeChildDiv(
|
|
2705
2705
|
s.applyStylePosistionAbsolute(
|
|
2706
|
-
s.createAreaDivWithClass("ge-table-footer ge-table-footer-west",
|
|
2706
|
+
s.createAreaDivWithClass("ge-table-footer ge-table-footer-west", o, "footer", "west")
|
|
2707
2707
|
)
|
|
2708
2708
|
), this.areaFooterCenter = s.appendRelativeChildDiv(
|
|
2709
2709
|
s.applyStylePosistionAbsolute(
|
|
2710
|
-
s.createAreaDivWithClass("ge-table-footer ge-table-footer-center",
|
|
2710
|
+
s.createAreaDivWithClass("ge-table-footer ge-table-footer-center", o, "footer", "center")
|
|
2711
2711
|
)
|
|
2712
2712
|
), this.areaFooterEast = s.appendRelativeChildDiv(
|
|
2713
2713
|
s.applyStylePosistionAbsolute(
|
|
2714
|
-
s.createAreaDivWithClass("ge-table-footer ge-table-footer-east",
|
|
2714
|
+
s.createAreaDivWithClass("ge-table-footer ge-table-footer-east", o, "footer", "east")
|
|
2715
2715
|
)
|
|
2716
2716
|
), this.scrollViewport = s.applyStyleOverflowAuto(
|
|
2717
2717
|
this.tableOptions.overflowX ?? "auto",
|
|
2718
2718
|
this.tableOptions.overflowY ?? "auto",
|
|
2719
2719
|
s.applyStyleNoPadding(
|
|
2720
2720
|
s.applyStylePosistionAbsolute(
|
|
2721
|
-
s.createAreaDivWithClass("ge-table-scroll-viewport",
|
|
2721
|
+
s.createAreaDivWithClass("ge-table-scroll-viewport", o, "body", "center")
|
|
2722
2722
|
)
|
|
2723
2723
|
)
|
|
2724
2724
|
), this.contentWrapperDiv = s.applyStyleNoPadding(
|
|
@@ -2732,13 +2732,13 @@ class Qe {
|
|
|
2732
2732
|
), this.areaBodyCenter = s.appendRelativeChildDiv(
|
|
2733
2733
|
s.createDivWithClass("ge-table-body-center", this.contentDiv)
|
|
2734
2734
|
), this.borderHeaderBottom = s.applyStylePosistionAbsolute(
|
|
2735
|
-
s.createDivWithClass("ge-table-header-border",
|
|
2735
|
+
s.createDivWithClass("ge-table-header-border", o)
|
|
2736
2736
|
), this.borderFixedWest = s.applyStylePosistionAbsolute(
|
|
2737
|
-
s.createDivWithClass("ge-table-west-fixed-column-border",
|
|
2737
|
+
s.createDivWithClass("ge-table-west-fixed-column-border", o)
|
|
2738
2738
|
), this.borderFixedEast = s.applyStylePosistionAbsolute(
|
|
2739
|
-
s.createDivWithClass("ge-table-east-fixed-column-border",
|
|
2739
|
+
s.createDivWithClass("ge-table-east-fixed-column-border", o)
|
|
2740
2740
|
), this.borderFooterTop = s.applyStylePosistionAbsolute(
|
|
2741
|
-
s.createDivWithClass("ge-table-footer-border",
|
|
2741
|
+
s.createDivWithClass("ge-table-footer-border", o)
|
|
2742
2742
|
);
|
|
2743
2743
|
}
|
|
2744
2744
|
/**
|
|
@@ -2838,7 +2838,7 @@ class Qe {
|
|
|
2838
2838
|
this.dom.setStyle(this.contentWrapperDiv, "width", e), this.dom.setStyle(this.contentWrapperDiv, "height", t);
|
|
2839
2839
|
}
|
|
2840
2840
|
}
|
|
2841
|
-
class
|
|
2841
|
+
class R {
|
|
2842
2842
|
/**
|
|
2843
2843
|
* Represents a constructor for a class.
|
|
2844
2844
|
* @constructor
|
|
@@ -2848,11 +2848,11 @@ class A {
|
|
|
2848
2848
|
* @param {number} c2 - The value for c2.
|
|
2849
2849
|
* @param {boolean} [gammaRange=false] - The value for gammaRange. Defaults to false. gammaRange will be used for AreaModelCellGroups, but it's not implemented yet!
|
|
2850
2850
|
*/
|
|
2851
|
-
constructor(e, t, s,
|
|
2852
|
-
this.r1 = e, this.c1 = t, this.r2 = s, this.c2 =
|
|
2851
|
+
constructor(e, t, s, i, o = !1) {
|
|
2852
|
+
this.r1 = e, this.c1 = t, this.r2 = s, this.c2 = i, this.gammaRange = o;
|
|
2853
2853
|
}
|
|
2854
2854
|
static create(e) {
|
|
2855
|
-
return e.gammaRange === void 0 && (e.gammaRange = !1), new
|
|
2855
|
+
return e.gammaRange === void 0 && (e.gammaRange = !1), new R(
|
|
2856
2856
|
e.rowIndex1,
|
|
2857
2857
|
e.columnIndex1,
|
|
2858
2858
|
e.rowIndex2,
|
|
@@ -2861,19 +2861,19 @@ class A {
|
|
|
2861
2861
|
);
|
|
2862
2862
|
}
|
|
2863
2863
|
static singleCell(e, t) {
|
|
2864
|
-
return new
|
|
2864
|
+
return new R(e, t, e, t);
|
|
2865
2865
|
}
|
|
2866
2866
|
static singleRow(e) {
|
|
2867
|
-
return new
|
|
2867
|
+
return new R(e, 0, e, Number.MAX_SAFE_INTEGER);
|
|
2868
2868
|
}
|
|
2869
2869
|
static singleColumn(e) {
|
|
2870
|
-
return new
|
|
2870
|
+
return new R(0, e, Number.MAX_SAFE_INTEGER, e);
|
|
2871
2871
|
}
|
|
2872
2872
|
isInRange(e, t) {
|
|
2873
2873
|
return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
|
|
2874
2874
|
}
|
|
2875
2875
|
}
|
|
2876
|
-
class
|
|
2876
|
+
class Ye {
|
|
2877
2877
|
constructor(e, t) {
|
|
2878
2878
|
this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
|
|
2879
2879
|
}
|
|
@@ -2883,13 +2883,13 @@ class et {
|
|
|
2883
2883
|
this.colAndRowspanRanges = [];
|
|
2884
2884
|
const e = this.areaModel.getRowCount(), t = this.tableModel.getColumnCount();
|
|
2885
2885
|
for (let s = 0; s < e; s++)
|
|
2886
|
-
for (let
|
|
2887
|
-
let
|
|
2888
|
-
if (
|
|
2889
|
-
|
|
2890
|
-
const
|
|
2886
|
+
for (let i = 0; i < t; i++) {
|
|
2887
|
+
let o = this.areaModel.getColspanAt(s, i), r = this.areaModel.getRowspanAt(s, i);
|
|
2888
|
+
if (o > 1 || r > 1) {
|
|
2889
|
+
o === 0 && (o = 1), r === 0 && (r = 1);
|
|
2890
|
+
const l = "gammaCells" in this.areaModel;
|
|
2891
2891
|
this.colAndRowspanRanges.push(
|
|
2892
|
-
new
|
|
2892
|
+
new R(s, i, s + r - 1, i + o - 1, l)
|
|
2893
2893
|
);
|
|
2894
2894
|
}
|
|
2895
2895
|
}
|
|
@@ -2906,22 +2906,22 @@ class et {
|
|
|
2906
2906
|
return !1;
|
|
2907
2907
|
}
|
|
2908
2908
|
}
|
|
2909
|
-
class
|
|
2909
|
+
class Je {
|
|
2910
2910
|
constructor(e, t, s) {
|
|
2911
2911
|
this.header = e, this.body = t, this.footer = s;
|
|
2912
2912
|
}
|
|
2913
2913
|
}
|
|
2914
|
-
class
|
|
2915
|
-
constructor(e, t, s,
|
|
2916
|
-
var r,
|
|
2917
|
-
super(e, t, s,
|
|
2914
|
+
class qe extends Ke {
|
|
2915
|
+
constructor(e, t, s, i) {
|
|
2916
|
+
var r, l;
|
|
2917
|
+
super(e, t, s, i), this.firstVisibleRowIndex = -1, this.lastVisibleRowIndex = -1, this.firstFullVisibleRowIndex = -1, this.lastFullVisibleRowIndex = -1, this.displayedRowCount = 0, this.pixelLimitForFullVisible = 5, this.loggingActive = !1, this.dragging = !1, this.editing = !1, this.storedColumnWidths = [], this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
|
|
2918
2918
|
header: [],
|
|
2919
2919
|
body: [],
|
|
2920
2920
|
footer: []
|
|
2921
|
-
}, this.tree = !1, this.colAndRowspanModels = new
|
|
2922
|
-
(
|
|
2921
|
+
}, this.tree = !1, this.colAndRowspanModels = new Je(), this.draggingTargetColumnIndex = -1, this.removables = [], 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), Y(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
|
|
2922
|
+
(n) => {
|
|
2923
2923
|
var c;
|
|
2924
|
-
this.colAndRowspanModels[
|
|
2924
|
+
this.colAndRowspanModels[n] = new Ye(t, t.getAreaModel(n)), (c = this.colAndRowspanModels[n]) == null || c.init();
|
|
2925
2925
|
}
|
|
2926
2926
|
);
|
|
2927
2927
|
}
|
|
@@ -2959,13 +2959,13 @@ class st extends Qe {
|
|
|
2959
2959
|
* @param {number} colIdx - The index of the column.
|
|
2960
2960
|
*/
|
|
2961
2961
|
initRenderEditor(e, t) {
|
|
2962
|
-
var
|
|
2963
|
-
let s = (
|
|
2962
|
+
var i;
|
|
2963
|
+
let s = (i = this.tableModel.getColumnDef(t)) == null ? void 0 : i.getEditRenderer;
|
|
2964
2964
|
if (s || (s = this.tableOptions.getEditRenderer), s)
|
|
2965
2965
|
if (this.editorRenderer = s(e, t), this.editorRenderer) {
|
|
2966
2966
|
this.editorRendererRow = e, this.editorRendererColumn = t, this.editing = !0, this.repaint();
|
|
2967
|
-
const
|
|
2968
|
-
|
|
2967
|
+
const o = document.querySelector("input.ge-table-cell-editor-input");
|
|
2968
|
+
o && o.focus();
|
|
2969
2969
|
} else
|
|
2970
2970
|
this.resetEditorRenderer();
|
|
2971
2971
|
}
|
|
@@ -3057,24 +3057,24 @@ class st extends Qe {
|
|
|
3057
3057
|
* @param {any} value - The new value to be displayed in the cell.
|
|
3058
3058
|
* @param {string[]} cssClasses - An array of CSS classes to be applied to the cell.
|
|
3059
3059
|
*/
|
|
3060
|
-
rerenderCellContent({ area: e, rowIndex: t, columnIndex: s, value:
|
|
3061
|
-
const r = this.tableModel.getAreaModel(e),
|
|
3062
|
-
if (
|
|
3060
|
+
rerenderCellContent({ area: e, rowIndex: t, columnIndex: s, value: i, cssClasses: o }) {
|
|
3061
|
+
const r = this.tableModel.getAreaModel(e), l = 'div[data-col-index="' + s + '"][data-row-index="' + t + '"][data-area="' + e + '"]', n = document.querySelector(l);
|
|
3062
|
+
if (n) {
|
|
3063
3063
|
let c;
|
|
3064
3064
|
const h = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === s;
|
|
3065
3065
|
let d;
|
|
3066
|
-
if (h ? d = this.editorRenderer : d = r.getCellRenderer(t, s),
|
|
3067
|
-
c = d.render(
|
|
3066
|
+
if (h ? d = this.editorRenderer : d = r.getCellRenderer(t, s), n.innerText = "", this.applyCssClasses(n, o), d)
|
|
3067
|
+
c = d.render(n, t, s, e, r, i, this.dom.domService), c && this.cleanupFunctions[e].push(c);
|
|
3068
3068
|
else {
|
|
3069
|
-
const
|
|
3070
|
-
this.dom.addLabelDiv(
|
|
3069
|
+
const u = `${i}`;
|
|
3070
|
+
this.dom.addLabelDiv(n, u, !1, t, s, e);
|
|
3071
3071
|
}
|
|
3072
3072
|
const p = r.getCustomClassesAt(t, s);
|
|
3073
|
-
p.length && this.dom.addClasses(p,
|
|
3074
|
-
const
|
|
3075
|
-
if (
|
|
3076
|
-
for (const
|
|
3077
|
-
this.dom.setStyle(
|
|
3073
|
+
p.length && this.dom.addClasses(p, n);
|
|
3074
|
+
const g = r.getCustomStyleAt(t, s);
|
|
3075
|
+
if (g)
|
|
3076
|
+
for (const u in g)
|
|
3077
|
+
this.dom.setStyle(n, u, g[u]);
|
|
3078
3078
|
}
|
|
3079
3079
|
}
|
|
3080
3080
|
getFirstVisibleRowIndex() {
|
|
@@ -3157,8 +3157,8 @@ class st extends Qe {
|
|
|
3157
3157
|
getNumberByAttr(e, t) {
|
|
3158
3158
|
var s;
|
|
3159
3159
|
if (e) {
|
|
3160
|
-
const
|
|
3161
|
-
if (
|
|
3160
|
+
const i = (s = e.closest("[" + t + "]")) == null ? void 0 : s.getAttribute(t);
|
|
3161
|
+
if (i) return Number(i);
|
|
3162
3162
|
}
|
|
3163
3163
|
return -1;
|
|
3164
3164
|
}
|
|
@@ -3173,8 +3173,8 @@ class st extends Qe {
|
|
|
3173
3173
|
getStringByAttr(e, t) {
|
|
3174
3174
|
var s;
|
|
3175
3175
|
if (e) {
|
|
3176
|
-
const
|
|
3177
|
-
if (
|
|
3176
|
+
const i = (s = e.closest("[" + t + "]")) == null ? void 0 : s.getAttribute(t);
|
|
3177
|
+
if (i) return i;
|
|
3178
3178
|
}
|
|
3179
3179
|
return "";
|
|
3180
3180
|
}
|
|
@@ -3188,72 +3188,72 @@ class st extends Qe {
|
|
|
3188
3188
|
*/
|
|
3189
3189
|
adjustArea(e, t = 0) {
|
|
3190
3190
|
var f;
|
|
3191
|
-
const s = this.getArea(e, "west"),
|
|
3192
|
-
s.child.innerText = "",
|
|
3193
|
-
const
|
|
3191
|
+
const s = this.getArea(e, "west"), i = this.getArea(e, "center"), o = this.getArea(e, "east"), r = i.child.clientHeight;
|
|
3192
|
+
s.child.innerText = "", i.child.innerText = "", o.child.innerText = "";
|
|
3193
|
+
const l = 0, n = this.areaBodyCenterGeo.width, c = this.tableModel.getPadding(), h = this.tableModel.getAreaModel(e), d = h.getRowCount();
|
|
3194
3194
|
for (; this.cleanupFunctions[e].length; ) {
|
|
3195
|
-
const
|
|
3196
|
-
|
|
3195
|
+
const m = this.cleanupFunctions[e].shift();
|
|
3196
|
+
m && m();
|
|
3197
3197
|
}
|
|
3198
3198
|
let p = t;
|
|
3199
|
-
const
|
|
3199
|
+
const g = this.tableModel.getColumnCount(), u = this.tableModel.getFixedRightColumnCount(), S = this.tableModel.getFixedLeftColumnCount();
|
|
3200
3200
|
e === "body" && (this.firstVisibleRowIndex = -1, this.firstFullVisibleRowIndex = -1, this.lastVisibleRowIndex = -1, this.lastFullVisibleRowIndex = -1);
|
|
3201
|
-
for (let
|
|
3202
|
-
const
|
|
3203
|
-
if (
|
|
3204
|
-
e === "body" && this.firstVisibleRowIndex === -1 && (this.firstVisibleRowIndex =
|
|
3205
|
-
let
|
|
3206
|
-
const M =
|
|
3201
|
+
for (let m = 0; m < d; m++) {
|
|
3202
|
+
const x = p, w = m === d - 1, v = this.tableModel.getRowHeight(e, m);
|
|
3203
|
+
if (x + v > 0) {
|
|
3204
|
+
e === "body" && this.firstVisibleRowIndex === -1 && (this.firstVisibleRowIndex = m, this.firstFullVisibleRowIndex = x < -this.pixelLimitForFullVisible ? this.firstVisibleRowIndex + 1 : this.firstVisibleRowIndex);
|
|
3205
|
+
let b = { left: l, width: n, height: v, top: x, index: m }, y = this.dom.addRowDiv(i, b, m, e, "center");
|
|
3206
|
+
const M = S;
|
|
3207
3207
|
if (this.adjustColumnsToRowParent({
|
|
3208
3208
|
areaIdent: e,
|
|
3209
3209
|
sideIdent: "center",
|
|
3210
3210
|
areaModel: h,
|
|
3211
|
-
geo:
|
|
3212
|
-
parent:
|
|
3213
|
-
rowIndex:
|
|
3211
|
+
geo: b,
|
|
3212
|
+
parent: y,
|
|
3213
|
+
rowIndex: m,
|
|
3214
3214
|
columnIndexStart: M,
|
|
3215
|
-
columnIndexEnd:
|
|
3215
|
+
columnIndexEnd: g - u - 1,
|
|
3216
3216
|
verticalFixed: !1,
|
|
3217
|
-
lastRowOfModel:
|
|
3218
|
-
}), c.left > 0 && (
|
|
3217
|
+
lastRowOfModel: w
|
|
3218
|
+
}), c.left > 0 && (b = { left: l, width: this.areaBodyWestGeo.width, height: v, top: x, index: m }, y = this.dom.addRowDiv(s, b, m, e, "west"), this.adjustColumnsToRowParent({
|
|
3219
3219
|
areaIdent: e,
|
|
3220
3220
|
sideIdent: "west",
|
|
3221
3221
|
areaModel: h,
|
|
3222
|
-
geo:
|
|
3223
|
-
parent:
|
|
3224
|
-
rowIndex:
|
|
3222
|
+
geo: b,
|
|
3223
|
+
parent: y,
|
|
3224
|
+
rowIndex: m,
|
|
3225
3225
|
columnIndexStart: 0,
|
|
3226
3226
|
columnIndexEnd: M - 1,
|
|
3227
3227
|
verticalFixed: !0,
|
|
3228
|
-
lastRowOfModel:
|
|
3229
|
-
})), c.right > 0 && (
|
|
3228
|
+
lastRowOfModel: w
|
|
3229
|
+
})), c.right > 0 && (b = { left: l, width: this.areaBodyEastGeo.width, height: v, top: x, index: m }, y = this.dom.addRowDiv(o, b, m, e, "east"), this.adjustColumnsToRowParent({
|
|
3230
3230
|
areaIdent: e,
|
|
3231
3231
|
sideIdent: "east",
|
|
3232
3232
|
areaModel: h,
|
|
3233
|
-
geo:
|
|
3234
|
-
parent:
|
|
3235
|
-
rowIndex:
|
|
3236
|
-
columnIndexStart:
|
|
3237
|
-
columnIndexEnd:
|
|
3233
|
+
geo: b,
|
|
3234
|
+
parent: y,
|
|
3235
|
+
rowIndex: m,
|
|
3236
|
+
columnIndexStart: g - u,
|
|
3237
|
+
columnIndexEnd: g - 1,
|
|
3238
3238
|
verticalFixed: !0,
|
|
3239
|
-
lastRowOfModel:
|
|
3240
|
-
})), e === "header" && this.tree &&
|
|
3241
|
-
const
|
|
3239
|
+
lastRowOfModel: w
|
|
3240
|
+
})), e === "header" && this.tree && m === d - 1) {
|
|
3241
|
+
const A = this.dom.applyStyle(
|
|
3242
3242
|
this.dom.setAttribute(
|
|
3243
|
-
this.dom.addDiv(
|
|
3243
|
+
this.dom.addDiv(y, new T(16, 20, 20, 8)),
|
|
3244
3244
|
"data-ge-action",
|
|
3245
3245
|
"toggleExpandCollapseAll"
|
|
3246
3246
|
),
|
|
3247
3247
|
{ cursor: "pointer" }
|
|
3248
3248
|
), E = this.tableOptions.treeOptions.arrowExpandCollapseAll;
|
|
3249
3249
|
if (E) {
|
|
3250
|
-
const
|
|
3251
|
-
this.dom.domService.appendChild(
|
|
3250
|
+
const W = this.dom.domService.createText(E.content);
|
|
3251
|
+
this.dom.domService.appendChild(A, W), E.style && this.dom.applyStyleString(A, E.style);
|
|
3252
3252
|
}
|
|
3253
3253
|
}
|
|
3254
3254
|
}
|
|
3255
3255
|
if (p = p + v, p > r) {
|
|
3256
|
-
e === "body" && (this.lastVisibleRowIndex =
|
|
3256
|
+
e === "body" && (this.lastVisibleRowIndex = m, this.lastFullVisibleRowIndex = r - p < -this.pixelLimitForFullVisible ? m - 1 : m, this.displayedRowCount = this.lastFullVisibleRowIndex - this.firstFullVisibleRowIndex + 1);
|
|
3257
3257
|
break;
|
|
3258
3258
|
}
|
|
3259
3259
|
}
|
|
@@ -3261,19 +3261,19 @@ class st extends Qe {
|
|
|
3261
3261
|
render scope: this.firstFullVisibleRowIndex <- ` + this.firstFullVisibleRowIndex + `
|
|
3262
3262
|
render scope: this.lastVisibleRowIndex <- ` + this.lastVisibleRowIndex + `
|
|
3263
3263
|
render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex), this.colAndRowspanModels && this.colAndRowspanModels[e]) {
|
|
3264
|
-
const
|
|
3265
|
-
if (
|
|
3266
|
-
for (const
|
|
3267
|
-
let
|
|
3268
|
-
if (
|
|
3269
|
-
v = s.child,
|
|
3270
|
-
else if (
|
|
3271
|
-
v =
|
|
3264
|
+
const m = ((f = this.colAndRowspanModels[e]) == null ? void 0 : f.getRanges()) ?? [];
|
|
3265
|
+
if (m.length)
|
|
3266
|
+
for (const x of m) {
|
|
3267
|
+
let w = 0, v = i.child, b = "center";
|
|
3268
|
+
if (x.c1 < S)
|
|
3269
|
+
v = s.child, b = "west";
|
|
3270
|
+
else if (u > 0 && x.c1 >= g - u)
|
|
3271
|
+
v = o.child, b = "east";
|
|
3272
3272
|
else {
|
|
3273
|
-
const
|
|
3274
|
-
|
|
3273
|
+
const y = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
3274
|
+
w = this.scrollFactorX * y - this.areaBodyWestGeo.width, b = "center";
|
|
3275
3275
|
}
|
|
3276
|
-
this.drawBigCell(
|
|
3276
|
+
this.drawBigCell(x, w, t, h, v, b);
|
|
3277
3277
|
}
|
|
3278
3278
|
}
|
|
3279
3279
|
}
|
|
@@ -3287,49 +3287,49 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3287
3287
|
* @param sideIdent SideIdent (west,center,east)
|
|
3288
3288
|
* @protected
|
|
3289
3289
|
*/
|
|
3290
|
-
drawBigCell(e, t, s,
|
|
3291
|
-
const
|
|
3290
|
+
drawBigCell(e, t, s, i, o, r) {
|
|
3291
|
+
const l = s + this.getRowHeights(0, e.r1 - 1, i).reduce((f, m) => f + m, 0), n = this.tableModel.getColumnCount(), c = this.tableModel.getFixedRightColumnCount();
|
|
3292
3292
|
let h = 0;
|
|
3293
|
-
c > 0 && e.c1 >=
|
|
3294
|
-
const d = t + this.getColumnWidths(h, e.c1 - 1).reduce((f,
|
|
3295
|
-
let
|
|
3296
|
-
const
|
|
3297
|
-
|
|
3298
|
-
areaModel:
|
|
3299
|
-
areaIdent:
|
|
3293
|
+
c > 0 && e.c1 >= n - c && (h = n - c);
|
|
3294
|
+
const d = t + this.getColumnWidths(h, e.c1 - 1).reduce((f, m) => f + m, 0), p = this.getRowHeights(e.r1, e.r2, i).reduce((f, m) => f + m, 0), g = this.getColumnWidths(e.c1, e.c2).reduce((f, m) => f + m, 0);
|
|
3295
|
+
let u = !1;
|
|
3296
|
+
const S = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
3297
|
+
S && (u = S.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? this.renderCell({
|
|
3298
|
+
areaModel: i,
|
|
3299
|
+
areaIdent: i.areaIdent,
|
|
3300
3300
|
sideIdent: r,
|
|
3301
3301
|
rowIndex: e.r1,
|
|
3302
3302
|
columnIndex: e.c1,
|
|
3303
3303
|
left: d,
|
|
3304
|
-
top:
|
|
3305
|
-
width:
|
|
3304
|
+
top: l,
|
|
3305
|
+
width: g,
|
|
3306
3306
|
height: p,
|
|
3307
|
-
parent:
|
|
3308
|
-
cellSelected:
|
|
3307
|
+
parent: o,
|
|
3308
|
+
cellSelected: u,
|
|
3309
3309
|
lastRowOfModel: !0,
|
|
3310
3310
|
gammaRange: e.gammaRange
|
|
3311
3311
|
}) : this.renderCell({
|
|
3312
|
-
areaModel:
|
|
3313
|
-
areaIdent:
|
|
3312
|
+
areaModel: i,
|
|
3313
|
+
areaIdent: i.areaIdent,
|
|
3314
3314
|
sideIdent: r,
|
|
3315
3315
|
rowIndex: e.r1,
|
|
3316
3316
|
columnIndex: e.c1,
|
|
3317
3317
|
left: d,
|
|
3318
|
-
top:
|
|
3319
|
-
width:
|
|
3318
|
+
top: l,
|
|
3319
|
+
width: g,
|
|
3320
3320
|
height: p,
|
|
3321
|
-
parent:
|
|
3322
|
-
cellSelected:
|
|
3321
|
+
parent: o,
|
|
3322
|
+
cellSelected: u,
|
|
3323
3323
|
lastRowOfModel: !0,
|
|
3324
3324
|
gammaRange: e.gammaRange
|
|
3325
|
-
}),
|
|
3325
|
+
}), i.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
3326
3326
|
rowIndex: e.r1,
|
|
3327
3327
|
columnIndex: e.c1,
|
|
3328
3328
|
cellLeft: d,
|
|
3329
|
-
cellTop:
|
|
3330
|
-
cellWidth:
|
|
3329
|
+
cellTop: l,
|
|
3330
|
+
cellWidth: g,
|
|
3331
3331
|
cellHeight: p,
|
|
3332
|
-
parent:
|
|
3332
|
+
parent: o
|
|
3333
3333
|
});
|
|
3334
3334
|
}
|
|
3335
3335
|
/**
|
|
@@ -3342,12 +3342,12 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3342
3342
|
* @protected
|
|
3343
3343
|
*/
|
|
3344
3344
|
findRowOfImportantRowspanCell(e, t, s) {
|
|
3345
|
-
const
|
|
3346
|
-
for (let
|
|
3347
|
-
const r = e.getRowspanAt(
|
|
3348
|
-
if (r > 1 &&
|
|
3349
|
-
return
|
|
3350
|
-
if (t -
|
|
3345
|
+
const i = e.getMaxRowspan();
|
|
3346
|
+
for (let o = t - 1; o > -1; o--) {
|
|
3347
|
+
const r = e.getRowspanAt(o, s);
|
|
3348
|
+
if (r > 1 && o + r + 1 >= t)
|
|
3349
|
+
return o;
|
|
3350
|
+
if (t - o > i)
|
|
3351
3351
|
return -1;
|
|
3352
3352
|
}
|
|
3353
3353
|
return -1;
|
|
@@ -3363,67 +3363,67 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3363
3363
|
areaIdent: e,
|
|
3364
3364
|
sideIdent: t,
|
|
3365
3365
|
areaModel: s,
|
|
3366
|
-
geo:
|
|
3367
|
-
parent:
|
|
3366
|
+
geo: i,
|
|
3367
|
+
parent: o,
|
|
3368
3368
|
rowIndex: r,
|
|
3369
|
-
columnIndexStart:
|
|
3370
|
-
columnIndexEnd:
|
|
3369
|
+
columnIndexStart: l,
|
|
3370
|
+
columnIndexEnd: n,
|
|
3371
3371
|
verticalFixed: c = !1,
|
|
3372
3372
|
lastRowOfModel: h = !1
|
|
3373
3373
|
}) {
|
|
3374
|
-
var
|
|
3374
|
+
var S;
|
|
3375
3375
|
this.scrollViewportLeft = this.scrollViewport.scrollLeft;
|
|
3376
3376
|
let d = 0;
|
|
3377
3377
|
if (!c) {
|
|
3378
3378
|
const f = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
3379
3379
|
d = this.scrollFactorX * f;
|
|
3380
3380
|
}
|
|
3381
|
-
const p = 0,
|
|
3382
|
-
let
|
|
3383
|
-
for (let f =
|
|
3384
|
-
const
|
|
3385
|
-
if (
|
|
3386
|
-
let
|
|
3387
|
-
const v = s.getRowspanAt(r, f),
|
|
3388
|
-
v > 1 && (
|
|
3389
|
-
let
|
|
3390
|
-
|
|
3381
|
+
const p = 0, g = !!(e === "body" && t);
|
|
3382
|
+
let u = d;
|
|
3383
|
+
for (let f = l; f <= n; f++) {
|
|
3384
|
+
const m = u, x = this.tableModel.getColumnWidth(f);
|
|
3385
|
+
if (x > 0 && m + x > 0) {
|
|
3386
|
+
let w = i.height;
|
|
3387
|
+
const v = s.getRowspanAt(r, f), b = s.getColspanAt(r, f);
|
|
3388
|
+
v > 1 && (w = this.getRowHeights(r, r + v - 1, s).reduce((A, E) => A + E, 0));
|
|
3389
|
+
let y = x;
|
|
3390
|
+
b > 1 && (y = this.getColumnWidths(f, f + b - 1).reduce((A, E) => A + E, 0));
|
|
3391
3391
|
let M = !1;
|
|
3392
|
-
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (
|
|
3393
|
-
this.renderDragTargetDiv(
|
|
3394
|
-
const
|
|
3395
|
-
this.dom.addColumnBorderDivs(this.tableOptions,
|
|
3392
|
+
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (S = this.colAndRowspanModels[e]) != null && S.isInRange(r, f) && (M = !0), this.draggingTargetColumnIndex === f && e !== "header") {
|
|
3393
|
+
this.renderDragTargetDiv(o, m, p, y, w);
|
|
3394
|
+
const A = { left: m, top: p, width: y, height: w };
|
|
3395
|
+
this.dom.addColumnBorderDivs(this.tableOptions, o, A, e, t);
|
|
3396
3396
|
} else {
|
|
3397
|
-
const
|
|
3397
|
+
const A = this.renderSelectedBackgroundDiv(M, g, t, s, r, f, o, m, p, y, w);
|
|
3398
3398
|
"gammaCells" in s && s.getValueAt(r, f) && (M = !1), M || this.renderCell({
|
|
3399
3399
|
areaModel: s,
|
|
3400
3400
|
areaIdent: e,
|
|
3401
3401
|
sideIdent: t,
|
|
3402
3402
|
rowIndex: r,
|
|
3403
3403
|
columnIndex: f,
|
|
3404
|
-
left:
|
|
3404
|
+
left: m,
|
|
3405
3405
|
top: p,
|
|
3406
|
-
width:
|
|
3407
|
-
height:
|
|
3408
|
-
parent:
|
|
3409
|
-
cellSelected:
|
|
3406
|
+
width: y,
|
|
3407
|
+
height: w,
|
|
3408
|
+
parent: o,
|
|
3409
|
+
cellSelected: A,
|
|
3410
3410
|
lastRowOfModel: h,
|
|
3411
3411
|
gammaRange: !0
|
|
3412
3412
|
}), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
3413
3413
|
rowIndex: r,
|
|
3414
3414
|
columnIndex: f,
|
|
3415
|
-
cellLeft:
|
|
3415
|
+
cellLeft: m,
|
|
3416
3416
|
cellTop: p,
|
|
3417
|
-
cellWidth:
|
|
3418
|
-
cellHeight:
|
|
3419
|
-
parent:
|
|
3417
|
+
cellWidth: y,
|
|
3418
|
+
cellHeight: w,
|
|
3419
|
+
parent: o
|
|
3420
3420
|
});
|
|
3421
3421
|
}
|
|
3422
3422
|
}
|
|
3423
|
-
if (
|
|
3423
|
+
if (u = u + x, u > this.areaBodyCenterGeo.width)
|
|
3424
3424
|
break;
|
|
3425
3425
|
}
|
|
3426
|
-
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new T(
|
|
3426
|
+
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new T(u - 1, 1, i.height, 0), o);
|
|
3427
3427
|
}
|
|
3428
3428
|
/**
|
|
3429
3429
|
* Retrieves the column index of the tree arrow column in the table.
|
|
@@ -3441,58 +3441,58 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3441
3441
|
areaModel: e,
|
|
3442
3442
|
areaIdent: t,
|
|
3443
3443
|
sideIdent: s,
|
|
3444
|
-
rowIndex:
|
|
3445
|
-
index:
|
|
3444
|
+
rowIndex: i,
|
|
3445
|
+
index: o,
|
|
3446
3446
|
left: r,
|
|
3447
|
-
width:
|
|
3448
|
-
height:
|
|
3447
|
+
width: l,
|
|
3448
|
+
height: n,
|
|
3449
3449
|
top: c,
|
|
3450
3450
|
parent: h,
|
|
3451
3451
|
lastRowOfModel: d
|
|
3452
3452
|
}) {
|
|
3453
|
-
var
|
|
3454
|
-
const
|
|
3453
|
+
var se;
|
|
3454
|
+
const g = this.editorRenderer && this.editorRendererRow === i && this.editorRendererColumn === o ? this.editorRenderer : e.getCellRenderer(i, o), u = { left: r, width: l, height: n, top: c, index: o }, S = e.getRowByIndex(i);
|
|
3455
3455
|
let f = "none";
|
|
3456
|
-
if (
|
|
3457
|
-
const C =
|
|
3458
|
-
(
|
|
3456
|
+
if (o === this.getTreeArrowColumnIndex() && $(S)) {
|
|
3457
|
+
const C = S;
|
|
3458
|
+
(se = C.children) != null && se.length ? C.expanded ? f = "expanded" : f = "collapsed" : f = "hidden";
|
|
3459
3459
|
}
|
|
3460
|
-
let
|
|
3460
|
+
let x;
|
|
3461
3461
|
if (t === "header") {
|
|
3462
|
-
const C = this.tableModel.getColumnDef(
|
|
3463
|
-
(!(C != null && C.sortIconVisible) || C != null && C.sortIconVisible()) && (
|
|
3462
|
+
const C = this.tableModel.getColumnDef(o);
|
|
3463
|
+
(!(C != null && C.sortIconVisible) || C != null && C.sortIconVisible()) && (x = C == null ? void 0 : C.sortState);
|
|
3464
3464
|
}
|
|
3465
|
-
const
|
|
3465
|
+
const w = e.getValueAt(i, o), v = g ? "" : `${w}`, b = e.isRowChecked(i), y = this.dom.addColumnDiv(
|
|
3466
3466
|
{
|
|
3467
3467
|
parent: h,
|
|
3468
|
-
geo:
|
|
3469
|
-
rowIndex:
|
|
3470
|
-
columnIndex:
|
|
3468
|
+
geo: u,
|
|
3469
|
+
rowIndex: i,
|
|
3470
|
+
columnIndex: o,
|
|
3471
3471
|
areaIdent: t,
|
|
3472
3472
|
sideIdent: s,
|
|
3473
3473
|
text: v,
|
|
3474
3474
|
treeArrow: f,
|
|
3475
3475
|
tableOptions: this.tableOptions,
|
|
3476
|
-
checkedType:
|
|
3477
|
-
sortState:
|
|
3476
|
+
checkedType: b,
|
|
3477
|
+
sortState: x
|
|
3478
3478
|
}
|
|
3479
|
-
), M = e.getTooltipAt(
|
|
3480
|
-
M && this.dom.setAttribute(
|
|
3481
|
-
const
|
|
3482
|
-
|
|
3479
|
+
), M = e.getTooltipAt(i, o);
|
|
3480
|
+
M && this.dom.setAttribute(y, "title", M);
|
|
3481
|
+
const A = this.tableModel.getColumnDef(o);
|
|
3482
|
+
A && A.classes[t] && this.dom.addClasses(A.classes[t], y);
|
|
3483
3483
|
let E;
|
|
3484
|
-
|
|
3485
|
-
const
|
|
3486
|
-
if (
|
|
3484
|
+
g && (E = g.render(y, i, o, t, e, w, this.dom.domService));
|
|
3485
|
+
const W = e.getCustomClassesAt(i, o);
|
|
3486
|
+
if (W.length && this.dom.addClasses(W, y), this.dom.addColumnBorderDivs(this.tableOptions, h, u, t, s), d && this.dom.addHorizontalBorder({ left: r, width: l, height: n, top: c + n }, h), this.getFocusModel && t === "body") {
|
|
3487
3487
|
const C = this.getFocusModel();
|
|
3488
|
-
C != null && C.hasFocus(
|
|
3488
|
+
C != null && C.hasFocus(i, o) && this.dom.addFocusBorderDivs(h, u, {});
|
|
3489
3489
|
}
|
|
3490
|
-
t === "header" && this.dom.setAttribute(
|
|
3491
|
-
const
|
|
3492
|
-
if (
|
|
3493
|
-
for (const C in
|
|
3494
|
-
this.dom.setStyle(
|
|
3495
|
-
return [
|
|
3490
|
+
t === "header" && this.dom.setAttribute(y, "data-ge-action", "drag-column");
|
|
3491
|
+
const G = e.getCustomStyleAt(i, o);
|
|
3492
|
+
if (G)
|
|
3493
|
+
for (const C in G)
|
|
3494
|
+
this.dom.setStyle(y, C, G[C]);
|
|
3495
|
+
return [y, E];
|
|
3496
3496
|
}
|
|
3497
3497
|
/**
|
|
3498
3498
|
* Applies CSS classes to an HTML element.
|
|
@@ -3502,8 +3502,8 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3502
3502
|
* @protected
|
|
3503
3503
|
*/
|
|
3504
3504
|
applyCssClasses(e, t = {}) {
|
|
3505
|
-
e && Object.entries(t).forEach(([s,
|
|
3506
|
-
|
|
3505
|
+
e && Object.entries(t).forEach(([s, i]) => {
|
|
3506
|
+
i ? this.dom.addClass(s, e) : this.dom.removeClass(s, e);
|
|
3507
3507
|
});
|
|
3508
3508
|
}
|
|
3509
3509
|
/**
|
|
@@ -3516,8 +3516,8 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3516
3516
|
*/
|
|
3517
3517
|
getColumnWidths(e, t) {
|
|
3518
3518
|
const s = [];
|
|
3519
|
-
for (let
|
|
3520
|
-
s.push(this.tableModel.getColumnWidth(
|
|
3519
|
+
for (let i = e; i <= t; i++)
|
|
3520
|
+
s.push(this.tableModel.getColumnWidth(i));
|
|
3521
3521
|
return s;
|
|
3522
3522
|
}
|
|
3523
3523
|
/**
|
|
@@ -3529,10 +3529,10 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3529
3529
|
* @return {number[]} - An array containing the heights of the rows within the specified range.
|
|
3530
3530
|
*/
|
|
3531
3531
|
getRowHeights(e, t, s) {
|
|
3532
|
-
const
|
|
3533
|
-
for (let
|
|
3534
|
-
|
|
3535
|
-
return
|
|
3532
|
+
const i = [];
|
|
3533
|
+
for (let o = e; o <= t; o++)
|
|
3534
|
+
i.push(s.getRowHeight(o));
|
|
3535
|
+
return i;
|
|
3536
3536
|
}
|
|
3537
3537
|
/**
|
|
3538
3538
|
* Adjusts the position and size of the hover row based on the mouse move event.
|
|
@@ -3543,10 +3543,10 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3543
3543
|
*/
|
|
3544
3544
|
adjustHoverRows(e) {
|
|
3545
3545
|
if (this.tableOptions.hoverRowVisible && e.rowIndex > -1) {
|
|
3546
|
-
const t = this.hostElement.clientWidth, s = this.tableModel.getAreaModel("body").getRowHeight(e.rowIndex),
|
|
3546
|
+
const t = this.hostElement.clientWidth, s = this.tableModel.getAreaModel("body").getRowHeight(e.rowIndex), i = e.rowTop + this.areaHeaderCenter.parent.clientHeight - this.scrollTop;
|
|
3547
3547
|
this.dom.applyStyle(this.hoverRow, {
|
|
3548
3548
|
left: "0",
|
|
3549
|
-
top:
|
|
3549
|
+
top: i + "px",
|
|
3550
3550
|
width: t + "px",
|
|
3551
3551
|
height: s + "px",
|
|
3552
3552
|
display: "block"
|
|
@@ -3576,9 +3576,9 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3576
3576
|
*/
|
|
3577
3577
|
adjustHoverColumns(e) {
|
|
3578
3578
|
if (this.tableOptions.hoverColumnVisible && e.rowIndex > -1) {
|
|
3579
|
-
const t = this.hostElement.clientHeight, s = this.tableModel.getColumnWidth(e.columnIndex),
|
|
3579
|
+
const t = this.hostElement.clientHeight, s = this.tableModel.getColumnWidth(e.columnIndex), i = this.areaBodyWestGeo.width, o = e.columnLeft + this.tableModel.getPadding().left - this.scrollLeft - i;
|
|
3580
3580
|
this.dom.applyStyle(this.hoverColumn, {
|
|
3581
|
-
left:
|
|
3581
|
+
left: o + "px",
|
|
3582
3582
|
top: "0px",
|
|
3583
3583
|
width: s + "px",
|
|
3584
3584
|
height: t + "px",
|
|
@@ -3620,11 +3620,11 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3620
3620
|
* @param {boolean} firstDraggingRendering - Indicates if it's the first rendering of the dragging column.
|
|
3621
3621
|
*/
|
|
3622
3622
|
adjustDraggingColumn(e, t, s) {
|
|
3623
|
-
var
|
|
3623
|
+
var i, o;
|
|
3624
3624
|
if (this.dragging) {
|
|
3625
|
-
const r = this.hostElement.clientHeight,
|
|
3626
|
-
if ((
|
|
3627
|
-
const h = { left: ((
|
|
3625
|
+
const r = this.hostElement.clientHeight, l = this.storedColumnWidths[t];
|
|
3626
|
+
if ((i = e.originalEvent) != null && i.clientX) {
|
|
3627
|
+
const h = { left: ((o = e.originalEvent) == null ? void 0 : o.clientX) - l / 2, width: l, height: r, top: 0, index: t };
|
|
3628
3628
|
this.dom.applyStyle(this.draggingColumn, {
|
|
3629
3629
|
background: "rgba(128,128,128,0.2)",
|
|
3630
3630
|
display: "block",
|
|
@@ -3654,29 +3654,29 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3654
3654
|
* @return {number} The final y-position after rendering all the content.
|
|
3655
3655
|
*/
|
|
3656
3656
|
renderContentOfDraggingColumnForArea(e, t, s = 0) {
|
|
3657
|
-
const
|
|
3657
|
+
const i = "center", o = this.tableModel.getAreaModel(t), r = o == null ? void 0 : o.getRowCount();
|
|
3658
3658
|
if (r) {
|
|
3659
|
-
const
|
|
3659
|
+
const l = e.index ?? 0, n = this.draggingColumn;
|
|
3660
3660
|
for (let c = 0; c < r; c++) {
|
|
3661
|
-
const h = s, d =
|
|
3662
|
-
parent:
|
|
3661
|
+
const h = s, d = o.getRowHeight(c), p = { left: 0, width: e.width, height: d, top: h, index: c }, g = o.getValueAt(c, l), u = o.getCellRenderer(c, l), S = u ? "" : `${g}`, f = {
|
|
3662
|
+
parent: n,
|
|
3663
3663
|
geo: p,
|
|
3664
3664
|
rowIndex: c,
|
|
3665
|
-
columnIndex:
|
|
3665
|
+
columnIndex: l,
|
|
3666
3666
|
areaIdent: t,
|
|
3667
|
-
sideIdent:
|
|
3668
|
-
text:
|
|
3669
|
-
},
|
|
3670
|
-
let
|
|
3671
|
-
|
|
3672
|
-
const
|
|
3673
|
-
|
|
3674
|
-
const v = this.tableModel.getColumnDef(
|
|
3675
|
-
v && v.classes[t] && this.dom.addClasses(v.classes[t],
|
|
3676
|
-
const
|
|
3677
|
-
if (
|
|
3678
|
-
for (const
|
|
3679
|
-
this.dom.setStyle(
|
|
3667
|
+
sideIdent: i,
|
|
3668
|
+
text: S
|
|
3669
|
+
}, m = this.dom.addColumnDiv(f);
|
|
3670
|
+
let x;
|
|
3671
|
+
u && (x = u.render(m, c, l, t, o, g, this.dom.domService), x && this.cleanupFunctions[t].push(x));
|
|
3672
|
+
const w = o.getCustomClassesAt(c, l);
|
|
3673
|
+
w.length && this.dom.addClasses(w, m);
|
|
3674
|
+
const v = this.tableModel.getColumnDef(l);
|
|
3675
|
+
v && v.classes[t] && this.dom.addClasses(v.classes[t], m), this.dom.addColumnBorderDivs(this.tableOptions, n, p, t, i);
|
|
3676
|
+
const b = o.getCustomStyleAt(c, l);
|
|
3677
|
+
if (b)
|
|
3678
|
+
for (const y in b)
|
|
3679
|
+
this.dom.setStyle(m, y, b[y]);
|
|
3680
3680
|
s = s + d;
|
|
3681
3681
|
}
|
|
3682
3682
|
}
|
|
@@ -3703,11 +3703,11 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3703
3703
|
* @param {number} height - The height of the target div in pixels.
|
|
3704
3704
|
* @return {HTMLDivElement} - The rendered draggable target div element.
|
|
3705
3705
|
*/
|
|
3706
|
-
renderDragTargetDiv(e, t, s,
|
|
3706
|
+
renderDragTargetDiv(e, t, s, i, o) {
|
|
3707
3707
|
const r = this.dom.applyStylePosistionAbsolute(
|
|
3708
3708
|
this.dom.createDivWithClass("ge-table-drop-zone", e)
|
|
3709
3709
|
);
|
|
3710
|
-
return this.dom.setStyle(r, "left", `${t}px`), this.dom.setStyle(r, "top", `${s}px`), this.dom.setStyle(r, "width", `${
|
|
3710
|
+
return this.dom.setStyle(r, "left", `${t}px`), this.dom.setStyle(r, "top", `${s}px`), this.dom.setStyle(r, "width", `${i}px`), this.dom.setStyle(r, "height", `${o}px`), r;
|
|
3711
3711
|
}
|
|
3712
3712
|
/**
|
|
3713
3713
|
* Render selected background div.
|
|
@@ -3726,19 +3726,19 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3726
3726
|
* @param {number} height - The height of the div.
|
|
3727
3727
|
* @returns {boolean} - Whether the cell is selected.
|
|
3728
3728
|
*/
|
|
3729
|
-
renderSelectedBackgroundDiv(e, t, s,
|
|
3729
|
+
renderSelectedBackgroundDiv(e, t, s, i, o, r, l, n, c, h, d) {
|
|
3730
3730
|
let p = !1;
|
|
3731
|
-
if (!e && t &&
|
|
3732
|
-
const
|
|
3733
|
-
if (
|
|
3734
|
-
const
|
|
3735
|
-
p =
|
|
3736
|
-
for (let
|
|
3731
|
+
if (!e && t && i.isSelectable(o, r) && this.getSelectionModel) {
|
|
3732
|
+
const g = this.getSelectionModel();
|
|
3733
|
+
if (g) {
|
|
3734
|
+
const u = g.getSelectionCount(o, r);
|
|
3735
|
+
p = u > 0;
|
|
3736
|
+
for (let S = 0; S < u; S++) {
|
|
3737
3737
|
const f = this.dom.applyStylePosistionAbsolute(
|
|
3738
3738
|
// ge-table-body-west-selected-range
|
|
3739
|
-
this.dom.createDivWithClass(`ge-table-${
|
|
3739
|
+
this.dom.createDivWithClass(`ge-table-${i.areaIdent}-${s}-selected-range`, l)
|
|
3740
3740
|
);
|
|
3741
|
-
this.dom.setStyle(f, "left", `${
|
|
3741
|
+
this.dom.setStyle(f, "left", `${n}px`), this.dom.setStyle(f, "top", `${c}px`), this.dom.setStyle(f, "width", `${h}px`), this.dom.setStyle(f, "height", `${d}px`);
|
|
3742
3742
|
}
|
|
3743
3743
|
}
|
|
3744
3744
|
}
|
|
@@ -3767,30 +3767,30 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3767
3767
|
areaModel: e,
|
|
3768
3768
|
areaIdent: t,
|
|
3769
3769
|
sideIdent: s,
|
|
3770
|
-
rowIndex:
|
|
3771
|
-
columnIndex:
|
|
3770
|
+
rowIndex: i,
|
|
3771
|
+
columnIndex: o,
|
|
3772
3772
|
left: r,
|
|
3773
|
-
top:
|
|
3774
|
-
width:
|
|
3773
|
+
top: l,
|
|
3774
|
+
width: n,
|
|
3775
3775
|
height: c,
|
|
3776
3776
|
parent: h,
|
|
3777
3777
|
cellSelected: d,
|
|
3778
3778
|
lastRowOfModel: p
|
|
3779
3779
|
}) {
|
|
3780
|
-
const [
|
|
3780
|
+
const [g, u] = this.addAndRenderCellDiv({
|
|
3781
3781
|
areaModel: e,
|
|
3782
3782
|
areaIdent: t,
|
|
3783
3783
|
sideIdent: s,
|
|
3784
|
-
rowIndex:
|
|
3785
|
-
index:
|
|
3784
|
+
rowIndex: i,
|
|
3785
|
+
index: o,
|
|
3786
3786
|
left: r,
|
|
3787
|
-
width:
|
|
3787
|
+
width: n,
|
|
3788
3788
|
height: c,
|
|
3789
|
-
top:
|
|
3789
|
+
top: l,
|
|
3790
3790
|
parent: h,
|
|
3791
3791
|
lastRowOfModel: p
|
|
3792
3792
|
});
|
|
3793
|
-
d && this.dom.addClass(`ge-table-${t}-${s}-selected-range`,
|
|
3793
|
+
d && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, g), u && this.cleanupFunctions[t].push(u);
|
|
3794
3794
|
}
|
|
3795
3795
|
/**
|
|
3796
3796
|
* Render the header cell resize handle.
|
|
@@ -3806,17 +3806,17 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
|
|
|
3806
3806
|
*
|
|
3807
3807
|
* @return {void}
|
|
3808
3808
|
*/
|
|
3809
|
-
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop:
|
|
3810
|
-
const
|
|
3811
|
-
|
|
3809
|
+
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: i, cellWidth: o, cellHeight: r, parent: l }) {
|
|
3810
|
+
const n = this.dom.domService, c = this.tableOptions.columnResizeHandleWidthInPx ?? 2, h = n.createElement("div");
|
|
3811
|
+
n.setAttribute(h, "data-col-index", `${t}`), n.setAttribute(h, "data-row-index", `${e}`), n.setAttribute(h, "data-area", "header"), n.setAttribute(h, "data-ge-action", "resize-column"), n.addClass(h, "ge-table-column-resize-handle"), n.setStyle(h, "display", "clip"), n.setStyle(h, "position", "absolute"), n.setStyle(h, "cursor", "col-resize"), n.setStyle(h, "left", `${s + o - c}px`), n.setStyle(h, "top", `${i}px`), n.setStyle(h, "width", `${c}px`), n.setStyle(h, "height", `${r}px`), n.appendChild(l, h);
|
|
3812
3812
|
}
|
|
3813
3813
|
}
|
|
3814
|
-
class
|
|
3814
|
+
class Ze {
|
|
3815
3815
|
constructor(e, t) {
|
|
3816
3816
|
this.columnIndex = e, this.sortState = t;
|
|
3817
3817
|
}
|
|
3818
3818
|
}
|
|
3819
|
-
class
|
|
3819
|
+
class Qe {
|
|
3820
3820
|
constructor(e) {
|
|
3821
3821
|
this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
|
|
3822
3822
|
}
|
|
@@ -3830,45 +3830,45 @@ class it {
|
|
|
3830
3830
|
*/
|
|
3831
3831
|
onHostElementChanged(e) {
|
|
3832
3832
|
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
|
|
3833
|
-
const t = e.target, s = t.getAttribute("data-area"),
|
|
3834
|
-
if (s &&
|
|
3835
|
-
const r =
|
|
3836
|
-
this.tableScope.updateModelValueAfterEdit(r,
|
|
3833
|
+
const t = e.target, s = t.getAttribute("data-area"), i = t.getAttribute("data-row-index"), o = t.getAttribute("data-col-index");
|
|
3834
|
+
if (s && i && o) {
|
|
3835
|
+
const r = Z(s), l = Number(i), n = Number(o);
|
|
3836
|
+
this.tableScope.updateModelValueAfterEdit(r, l, n, t.value);
|
|
3837
3837
|
}
|
|
3838
3838
|
}
|
|
3839
3839
|
}
|
|
3840
3840
|
}
|
|
3841
|
-
class
|
|
3841
|
+
class et {
|
|
3842
3842
|
constructor(e = -1, t = -1) {
|
|
3843
3843
|
this.rowIndex = e, this.columnIndex = t;
|
|
3844
3844
|
}
|
|
3845
3845
|
}
|
|
3846
|
-
class
|
|
3846
|
+
class ee {
|
|
3847
3847
|
constructor(e) {
|
|
3848
3848
|
this.cells = e;
|
|
3849
3849
|
}
|
|
3850
3850
|
static createSingle(e, t) {
|
|
3851
|
-
return new
|
|
3851
|
+
return new ee([new et(e, t)]);
|
|
3852
3852
|
}
|
|
3853
3853
|
}
|
|
3854
|
-
class
|
|
3855
|
-
constructor(e, t, s,
|
|
3856
|
-
this.scrollTop = e, this.scrollLeft = t, this.scrollHeight = s, this.scrollWidth =
|
|
3854
|
+
class tt {
|
|
3855
|
+
constructor(e, t, s, i, o, r, l, n) {
|
|
3856
|
+
this.scrollTop = e, this.scrollLeft = t, this.scrollHeight = s, this.scrollWidth = i, this.clientHeight = o, this.clientWidth = r, this.scrollFactorY = l, this.scrollFactorX = n;
|
|
3857
3857
|
}
|
|
3858
3858
|
}
|
|
3859
|
-
class
|
|
3859
|
+
class st {
|
|
3860
3860
|
constructor(e) {
|
|
3861
3861
|
var t, s;
|
|
3862
3862
|
this.tableScope = e, (t = this.tableScope.tableOptions) != null && t.getSelectionModel && (this.getSelectionModel = this.tableScope.tableOptions.getSelectionModel), (s = this.tableScope.tableOptions) != null && s.getFocusModel && (this.getFocusModel = this.tableScope.tableOptions.getFocusModel);
|
|
3863
3863
|
}
|
|
3864
3864
|
onMouseClicked(e, t) {
|
|
3865
|
-
var
|
|
3866
|
-
let s = !1,
|
|
3865
|
+
var o, r, l, n, c, h, d;
|
|
3866
|
+
let s = !1, i = !1;
|
|
3867
3867
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
3868
|
-
const p = this.getSelectionModel(),
|
|
3869
|
-
p &&
|
|
3868
|
+
const p = this.getSelectionModel(), g = this.getFocusModel();
|
|
3869
|
+
p && g && (g.hasFocus(e.rowIndex, e.columnIndex) || (g.setFocus(e.rowIndex, e.columnIndex), this.tableScope.onFocusChanged(g), s = !0), (o = e.originalEvent) != null && o.shiftKey || p.hasSelection() && (p.clear(), s = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (p.addSelection(this.createRangeByEvents(e, this.previousEvt)), i = !0, s = !0) : (l = e.originalEvent) != null && l.altKey && ((n = e.originalEvent) != null && n.ctrlKey || (c = e.originalEvent) != null && c.metaKey) ? (p.removeSelection(R.singleCell(e.rowIndex, e.columnIndex)), i = !0, s = !0) : (h = e.originalEvent) != null && h.ctrlKey || (d = e.originalEvent) != null && d.metaKey ? (p.addSelection(R.singleCell(e.rowIndex, e.columnIndex)), i = !0, s = !0) : (p.firstClick(e.rowIndex, e.columnIndex), s = !0), this.tableScope.onSelectionChanged(p));
|
|
3870
3870
|
}
|
|
3871
|
-
return
|
|
3871
|
+
return i ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), s;
|
|
3872
3872
|
}
|
|
3873
3873
|
onActionTriggered(e) {
|
|
3874
3874
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
@@ -3879,8 +3879,8 @@ class lt {
|
|
|
3879
3879
|
if (e === "DESELECT_ALL")
|
|
3880
3880
|
return t.clear(), this.tableScope.repaint(), !0;
|
|
3881
3881
|
if (e === "TOGGLE_SELECTION") {
|
|
3882
|
-
const [
|
|
3883
|
-
return t.togglePoint(
|
|
3882
|
+
const [i, o] = s.getFocus();
|
|
3883
|
+
return t.togglePoint(i, o), this.tableScope.repaint(), !0;
|
|
3884
3884
|
}
|
|
3885
3885
|
}
|
|
3886
3886
|
}
|
|
@@ -3888,16 +3888,16 @@ class lt {
|
|
|
3888
3888
|
}
|
|
3889
3889
|
createRangeByEvents(e, t) {
|
|
3890
3890
|
t || (t = e);
|
|
3891
|
-
const s = Math.min(e.rowIndex, t == null ? void 0 : t.rowIndex),
|
|
3892
|
-
return
|
|
3891
|
+
const s = Math.min(e.rowIndex, t == null ? void 0 : t.rowIndex), i = Math.max(e.rowIndex, t == null ? void 0 : t.rowIndex), o = Math.min(e.columnIndex, t == null ? void 0 : t.columnIndex), r = Math.max(e.columnIndex, t == null ? void 0 : t.columnIndex);
|
|
3892
|
+
return R.create({
|
|
3893
3893
|
rowIndex1: s,
|
|
3894
|
-
columnIndex1:
|
|
3895
|
-
rowIndex2:
|
|
3894
|
+
columnIndex1: o,
|
|
3895
|
+
rowIndex2: i,
|
|
3896
3896
|
columnIndex2: r
|
|
3897
3897
|
});
|
|
3898
3898
|
}
|
|
3899
3899
|
}
|
|
3900
|
-
class
|
|
3900
|
+
class it {
|
|
3901
3901
|
get() {
|
|
3902
3902
|
return {
|
|
3903
3903
|
f2: "START_EDITING",
|
|
@@ -3917,7 +3917,7 @@ class nt {
|
|
|
3917
3917
|
};
|
|
3918
3918
|
}
|
|
3919
3919
|
}
|
|
3920
|
-
class
|
|
3920
|
+
class ot {
|
|
3921
3921
|
get() {
|
|
3922
3922
|
return {
|
|
3923
3923
|
f2: "START_EDITING",
|
|
@@ -3939,23 +3939,23 @@ class ct {
|
|
|
3939
3939
|
};
|
|
3940
3940
|
}
|
|
3941
3941
|
}
|
|
3942
|
-
function
|
|
3943
|
-
return
|
|
3944
|
-
const s = { cmd: 1, ctrl: 2, alt: 3, shift: 4 },
|
|
3945
|
-
return
|
|
3942
|
+
function rt(a) {
|
|
3943
|
+
return a.trim().replace(/\+/g, " ").replace(/ +/g, " ").replace(/⌫/g, "backspace").replace(/↩/g, "enter").replace(/⇧/g, "shift").replace(/⌥/g, "alt").replace(/option/g, "alt").replace(/opt/g, "alt").replace(/⌃/g, "ctrl").replace(/control/g, "ctrl").replace(/command/g, "cmd").replace(/meta/g, "cmd").replace(/escape/g, "esc").replace(/⌘/g, "cmd").replace(/\*/g, "multiply").split(" ").filter((e) => e).filter((e, t, s) => s.indexOf(e) === t).sort((e, t) => {
|
|
3944
|
+
const s = { cmd: 1, ctrl: 2, alt: 3, shift: 4 }, i = s[e] || 5, o = s[t] || 5;
|
|
3945
|
+
return i !== o ? i - o : e.localeCompare(t);
|
|
3946
3946
|
}).join(" ");
|
|
3947
3947
|
}
|
|
3948
|
-
function
|
|
3949
|
-
let e =
|
|
3950
|
-
if (e === " " && (e = "space"), e === "arrowleft" && (e = "left"), e === "arrowright" && (e = "right"), e === "arrowup" && (e = "up"), e === "arrowdown" && (e = "down"), e === "delete" &&
|
|
3951
|
-
const s =
|
|
3948
|
+
function re(a) {
|
|
3949
|
+
let e = a.key.toLowerCase();
|
|
3950
|
+
if (e === " " && (e = "space"), e === "arrowleft" && (e = "left"), e === "arrowright" && (e = "right"), e === "arrowup" && (e = "up"), e === "arrowdown" && (e = "down"), e === "delete" && a.code === "Delete" && (e = "delete"), e === "backspace" && (e = "backspace"), e === "escape" && (e = "esc"), e === "return" && (e = "enter"), a.code.startsWith("Numpad")) {
|
|
3951
|
+
const s = a.code.replace("Numpad", "").toLowerCase();
|
|
3952
3952
|
s === "add" ? e = "num_add" : s === "subtract" ? e = "num_subtract" : s === "multiply" ? e = "num_multiply" : s === "divide" ? e = "num_divide" : s === "decimal" ? e = "num_decimal" : s === "enter" ? e = "num_enter" : e = "num_" + s;
|
|
3953
3953
|
}
|
|
3954
|
-
|
|
3954
|
+
a.code.match(/^F\d+$/) && (e = a.code.toLowerCase()), a.code.match(/^Digit\d+$/) && (e = a.code.replace(/Digit/g, ""));
|
|
3955
3955
|
let t = "";
|
|
3956
|
-
return
|
|
3956
|
+
return a.ctrlKey && (t += " ctrl"), a.altKey && (t += t + " alt"), a.shiftKey && (t += t + " shift"), a.metaKey && (t += t + " cmd"), rt(t + " " + e);
|
|
3957
3957
|
}
|
|
3958
|
-
class
|
|
3958
|
+
class lt {
|
|
3959
3959
|
constructor(e) {
|
|
3960
3960
|
this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
|
|
3961
3961
|
}
|
|
@@ -3977,7 +3977,7 @@ class ht {
|
|
|
3977
3977
|
(t = (e = this.tableScope) == null ? void 0 : e.tableOptions) != null && t.shortcutActionsDisabled ? this.isDebug() && console.debug("ShortcutService skipped.") : (this.assignPredefinedSystemShortcutMappings(), Object.assign(this.shortcutActionIdMapping, this.tableScope.tableOptions.shortcutActionIdMapping), this.isDebug() && console.debug("ShortcutService", this.shortcutActionIdMapping), this.tableScope.hostElement.addEventListener("keydown", this.onKeyDown.bind(this)));
|
|
3978
3978
|
}
|
|
3979
3979
|
assignPredefinedSystemShortcutMappings() {
|
|
3980
|
-
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new
|
|
3980
|
+
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new ot().get()) : Object.assign(this.shortcutActionIdMapping, new it().get());
|
|
3981
3981
|
}
|
|
3982
3982
|
isMacintosh() {
|
|
3983
3983
|
return navigator.platform.indexOf("Mac") > -1;
|
|
@@ -4000,10 +4000,10 @@ class ht {
|
|
|
4000
4000
|
return t;
|
|
4001
4001
|
}
|
|
4002
4002
|
findEntity(e) {
|
|
4003
|
-
const t =
|
|
4003
|
+
const t = re(e);
|
|
4004
4004
|
this.isDebug() && console.debug("ShortcutService shortcut :", t);
|
|
4005
4005
|
for (const s in this.shortcutActionIdMapping)
|
|
4006
|
-
if (
|
|
4006
|
+
if (re(e) === t)
|
|
4007
4007
|
return this.isDebug() && console.debug("ShortcutService action :", this.shortcutActionIdMapping[s]), this.shortcutActionIdMapping[s];
|
|
4008
4008
|
}
|
|
4009
4009
|
// private areTokensEquals(tokens1: string[], tokens2: string[]): boolean {
|
|
@@ -4050,7 +4050,7 @@ class ht {
|
|
|
4050
4050
|
return this.shortcutActionIdMapping;
|
|
4051
4051
|
}
|
|
4052
4052
|
}
|
|
4053
|
-
class
|
|
4053
|
+
class le {
|
|
4054
4054
|
onCheckboxChanged(e) {
|
|
4055
4055
|
}
|
|
4056
4056
|
onContextmenu(e) {
|
|
@@ -4072,7 +4072,7 @@ class ne {
|
|
|
4072
4072
|
onFocusChanged(e) {
|
|
4073
4073
|
}
|
|
4074
4074
|
}
|
|
4075
|
-
class
|
|
4075
|
+
class ue {
|
|
4076
4076
|
setStyle(e, t, s) {
|
|
4077
4077
|
return e.style[t] = s, e;
|
|
4078
4078
|
}
|
|
@@ -4099,19 +4099,19 @@ class be {
|
|
|
4099
4099
|
e.setAttribute(t, s);
|
|
4100
4100
|
}
|
|
4101
4101
|
}
|
|
4102
|
-
class
|
|
4103
|
-
render(e, t, s,
|
|
4104
|
-
if (
|
|
4105
|
-
|
|
4106
|
-
const
|
|
4102
|
+
class at {
|
|
4103
|
+
render(e, t, s, i, o, r, l) {
|
|
4104
|
+
if (o.isEditable(t, s)) {
|
|
4105
|
+
l.addClass(e, "ge-table-row-input-div");
|
|
4106
|
+
const n = o.getValueAt(t, s);
|
|
4107
4107
|
e.innerHTML = `
|
|
4108
4108
|
<input
|
|
4109
4109
|
type="text"
|
|
4110
|
-
value="${
|
|
4110
|
+
value="${n}"
|
|
4111
4111
|
autofocus
|
|
4112
4112
|
onfocus="this.setSelectionRange(0, this.value.length)"
|
|
4113
4113
|
data-listen="change"
|
|
4114
|
-
data-area="${
|
|
4114
|
+
data-area="${i}"
|
|
4115
4115
|
data-row-index="${t}"
|
|
4116
4116
|
data-col-index="${s}"
|
|
4117
4117
|
data-input-type="text"
|
|
@@ -4120,7 +4120,7 @@ class pt {
|
|
|
4120
4120
|
}
|
|
4121
4121
|
}
|
|
4122
4122
|
}
|
|
4123
|
-
class
|
|
4123
|
+
class nt {
|
|
4124
4124
|
constructor(e = "none", t = "single") {
|
|
4125
4125
|
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1, this.silent = !1, this.listenerArr = [];
|
|
4126
4126
|
}
|
|
@@ -4139,12 +4139,12 @@ class gt {
|
|
|
4139
4139
|
this.silent || this.listenerArr.forEach((e) => e.onSelectionChanged(this));
|
|
4140
4140
|
}
|
|
4141
4141
|
firstClick(e, t) {
|
|
4142
|
-
this.selectionType === "row" ? this.addRange(
|
|
4142
|
+
this.selectionType === "row" ? this.addRange(R.singleRow(e)) : this.selectionType === "column" && this.addRange(R.singleColumn(t));
|
|
4143
4143
|
}
|
|
4144
4144
|
getSelectionCount(e, t) {
|
|
4145
4145
|
let s = 0;
|
|
4146
|
-
for (const
|
|
4147
|
-
|
|
4146
|
+
for (const i of this.ranges)
|
|
4147
|
+
i.isInRange(e, t) && s++;
|
|
4148
4148
|
return this.allSelected && s++, this.isInNegativeRange(e, t) && (s = 0), s;
|
|
4149
4149
|
}
|
|
4150
4150
|
isInNegativeRange(e, t) {
|
|
@@ -4190,10 +4190,10 @@ class gt {
|
|
|
4190
4190
|
if (this.selectionType === "none")
|
|
4191
4191
|
return;
|
|
4192
4192
|
let t = e;
|
|
4193
|
-
this.selectionType === "row" ? t =
|
|
4193
|
+
this.selectionType === "row" ? t = R.singleRow(e.r1) : this.selectionType === "column" && (t = R.singleColumn(e.c1)), this.negativeRanges.push(t), this.fireChangeEvent();
|
|
4194
4194
|
}
|
|
4195
4195
|
togglePoint(e, t) {
|
|
4196
|
-
this.getSelectionCount(e, t) > 0 ? this.removeSelection(
|
|
4196
|
+
this.getSelectionCount(e, t) > 0 ? this.removeSelection(R.singleCell(e, t)) : this.addSelection(R.singleCell(e, t));
|
|
4197
4197
|
}
|
|
4198
4198
|
isSelected(e, t) {
|
|
4199
4199
|
return this.getSelectionCount(e, t) > 0;
|
|
@@ -4202,7 +4202,7 @@ class gt {
|
|
|
4202
4202
|
this.selectionType !== "none" && (this.allSelected = !1, this.selectionMode === "single" && (this.ranges = []), this.selectionType === "row" ? (e.c1 = 0, e.c2 = Number.MAX_SAFE_INTEGER) : this.selectionType === "column" ? (e.r1 = 0, e.r2 = Number.MAX_SAFE_INTEGER) : this.selectionType === "cell" ? (e.r2 = e.r1, e.c2 = e.c1) : this.selectionType, this.ranges.push(e), this.fireChangeEvent());
|
|
4203
4203
|
}
|
|
4204
4204
|
}
|
|
4205
|
-
class
|
|
4205
|
+
class ct {
|
|
4206
4206
|
constructor(e = "none") {
|
|
4207
4207
|
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1, this.listenerArr = [];
|
|
4208
4208
|
}
|
|
@@ -4239,7 +4239,7 @@ class ft {
|
|
|
4239
4239
|
return [this.rowIndex, this.columnIndex];
|
|
4240
4240
|
}
|
|
4241
4241
|
}
|
|
4242
|
-
class
|
|
4242
|
+
class dt {
|
|
4243
4243
|
constructor(e = new F(
|
|
4244
4244
|
"❯",
|
|
4245
4245
|
"",
|
|
@@ -4253,17 +4253,17 @@ class Se {
|
|
|
4253
4253
|
}
|
|
4254
4254
|
// `⊖ `, `⊕ `;
|
|
4255
4255
|
}
|
|
4256
|
-
const
|
|
4257
|
-
class
|
|
4256
|
+
const ht = new nt(), pt = new ct("cell");
|
|
4257
|
+
class fe {
|
|
4258
4258
|
constructor() {
|
|
4259
4259
|
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 = {
|
|
4260
4260
|
header: 34,
|
|
4261
4261
|
body: 34,
|
|
4262
4262
|
footer: 34
|
|
4263
|
-
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new
|
|
4263
|
+
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new he(), this.headerGroupOptions = new dt(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new pe(), this.sortOrder = ["asc", "desc"], this.shortcutActionsDisabled = !1, this.resizeEventDebounceDelay = 500, this.getEditRenderer = (e, t) => new at(), this.getSelectionModel = () => ht, this.getFocusModel = () => pt;
|
|
4264
4264
|
}
|
|
4265
4265
|
}
|
|
4266
|
-
const
|
|
4266
|
+
const B = class B {
|
|
4267
4267
|
/**
|
|
4268
4268
|
* Returns the content to be copied based on the provided table model, selection model, and focus model.
|
|
4269
4269
|
*
|
|
@@ -4274,28 +4274,28 @@ const O = class O {
|
|
|
4274
4274
|
* @throws {string} Throws an error if neither selection nor focus is defined.
|
|
4275
4275
|
*/
|
|
4276
4276
|
createContent(e, t, s) {
|
|
4277
|
-
return new Promise((
|
|
4277
|
+
return new Promise((i, o) => {
|
|
4278
4278
|
if (t != null && t.hasSelection()) {
|
|
4279
4279
|
const r = this.mergeRanges(t.getRanges());
|
|
4280
4280
|
if (r) {
|
|
4281
4281
|
r.c2 = Math.min(r.c2, e.getColumnCount() - 1), r.r2 = Math.min(r.r2, e.getBodyModel().getRowCount() - 1);
|
|
4282
|
-
const
|
|
4283
|
-
for (let
|
|
4282
|
+
const l = [];
|
|
4283
|
+
for (let n = r.r1; n <= r.r2; n++) {
|
|
4284
4284
|
const c = [];
|
|
4285
4285
|
for (let h = r.c1; h <= r.c2; h++) {
|
|
4286
|
-
const d = t.isSelected(
|
|
4286
|
+
const d = t.isSelected(n, h) ? e.getBodyModel().getTextValueAt(n, h) : "";
|
|
4287
4287
|
c.push(d);
|
|
4288
4288
|
}
|
|
4289
|
-
|
|
4289
|
+
l.push(c.join(B.columnSeparatorChar));
|
|
4290
4290
|
}
|
|
4291
|
-
return
|
|
4291
|
+
return i(l.join(B.rowSeparatorChar));
|
|
4292
4292
|
}
|
|
4293
4293
|
}
|
|
4294
4294
|
if (s) {
|
|
4295
|
-
const [r,
|
|
4296
|
-
return
|
|
4295
|
+
const [r, l] = s.getFocus(), n = e.getBodyModel().getTextValueAt(r, l);
|
|
4296
|
+
return i(n);
|
|
4297
4297
|
}
|
|
4298
|
-
|
|
4298
|
+
o("Cannot copy, neither selection nor focus defined.");
|
|
4299
4299
|
});
|
|
4300
4300
|
}
|
|
4301
4301
|
/**
|
|
@@ -4316,19 +4316,19 @@ const O = class O {
|
|
|
4316
4316
|
* @returns {Promise<string>} A promise that resolves with the copied text if successful, or rejects if an error occurs.
|
|
4317
4317
|
*/
|
|
4318
4318
|
copyToClipboard(e, t, s) {
|
|
4319
|
-
return new Promise((
|
|
4319
|
+
return new Promise((i, o) => {
|
|
4320
4320
|
this.createContent(
|
|
4321
4321
|
e,
|
|
4322
4322
|
t,
|
|
4323
4323
|
s
|
|
4324
4324
|
).then((r) => {
|
|
4325
|
-
r && this.copyContent(r).then((
|
|
4326
|
-
|
|
4327
|
-
}).catch((
|
|
4328
|
-
|
|
4325
|
+
r && this.copyContent(r).then((l) => {
|
|
4326
|
+
i(r);
|
|
4327
|
+
}).catch((l) => {
|
|
4328
|
+
o();
|
|
4329
4329
|
});
|
|
4330
4330
|
}).catch((r) => {
|
|
4331
|
-
|
|
4331
|
+
o();
|
|
4332
4332
|
});
|
|
4333
4333
|
});
|
|
4334
4334
|
}
|
|
@@ -4341,23 +4341,23 @@ const O = class O {
|
|
|
4341
4341
|
mergeRanges(e) {
|
|
4342
4342
|
let t;
|
|
4343
4343
|
for (const s of e)
|
|
4344
|
-
t ? (t.r1 = Math.min(t.r1, s.r1), t.c1 = Math.min(t.c1, s.c1), t.r2 = Math.max(t.r2, s.r2), t.c2 = Math.max(t.c2, s.c2)) : t = new
|
|
4344
|
+
t ? (t.r1 = Math.min(t.r1, s.r1), t.c1 = Math.min(t.c1, s.c1), t.r2 = Math.max(t.r2, s.r2), t.c2 = Math.max(t.c2, s.c2)) : t = new R(s.r1, s.c1, s.r2, s.c2);
|
|
4345
4345
|
return t;
|
|
4346
4346
|
}
|
|
4347
4347
|
};
|
|
4348
|
-
|
|
4348
|
+
B.columnSeparatorChar = " ", B.rowSeparatorChar = `
|
|
4349
4349
|
`;
|
|
4350
|
-
let H =
|
|
4351
|
-
class
|
|
4350
|
+
let H = B;
|
|
4351
|
+
class ut {
|
|
4352
4352
|
constructor(e, t = 500) {
|
|
4353
|
-
this.tableScope = e, this.debounceDelay = t, new ResizeObserver(
|
|
4353
|
+
this.tableScope = e, this.debounceDelay = t, new ResizeObserver(Pe(this.handleResize.bind(this), t)).observe(this.tableScope.hostElement);
|
|
4354
4354
|
}
|
|
4355
4355
|
handleResize(e) {
|
|
4356
4356
|
const t = e[0], { width: s } = t.contentRect;
|
|
4357
4357
|
this.tableScope.recalcColumnWidths(s);
|
|
4358
4358
|
}
|
|
4359
4359
|
}
|
|
4360
|
-
class
|
|
4360
|
+
class ft {
|
|
4361
4361
|
/**
|
|
4362
4362
|
* Downloads a matrix data as an Excel file.
|
|
4363
4363
|
*
|
|
@@ -4368,31 +4368,31 @@ class St {
|
|
|
4368
4368
|
* @throws {Error} Throws an error if the input matrix is not a valid 2D array or if the filename is an empty string.
|
|
4369
4369
|
*/
|
|
4370
4370
|
downloadExcel(e, t = "file.xlsx", s = "") {
|
|
4371
|
-
if (!Array.isArray(e) || e.some((
|
|
4371
|
+
if (!Array.isArray(e) || e.some((i) => !Array.isArray(i)))
|
|
4372
4372
|
throw new Error("Invalid matrix format. Expected a 2D array.");
|
|
4373
4373
|
if ((t == null ? void 0 : t.trim()) === "")
|
|
4374
4374
|
throw new Error("Invalid filename. Filename must be a non-empty string.");
|
|
4375
4375
|
try {
|
|
4376
|
-
const
|
|
4376
|
+
const i = this.generateBuffer(e, s), o = new Blob([i], {
|
|
4377
4377
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
4378
4378
|
}), r = document.createElement("a");
|
|
4379
|
-
r.href = URL.createObjectURL(
|
|
4380
|
-
} catch (
|
|
4381
|
-
throw console.error("Error generating Excel file:",
|
|
4379
|
+
r.href = URL.createObjectURL(o), r.download = t, document.body.appendChild(r), r.click(), document.body.removeChild(r);
|
|
4380
|
+
} catch (i) {
|
|
4381
|
+
throw console.error("Error generating Excel file:", i), new Error("Failed to download Excel file.");
|
|
4382
4382
|
}
|
|
4383
4383
|
}
|
|
4384
4384
|
generateMap(e, t = "") {
|
|
4385
4385
|
const s = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
4386
|
-
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>`,
|
|
4387
|
-
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"><Application>Microsoft Macintosh Excel</Application><DocSecurity>0</DocSecurity><ScaleCrop>false</ScaleCrop><HeadingPairs><vt:vector size="2" baseType="variant"><vt:variant><vt:lpstr>Worksheets</vt:lpstr></vt:variant><vt:variant><vt:i4>1</vt:i4></vt:variant></vt:vector></HeadingPairs><TitlesOfParts><vt:vector size="1" baseType="lpstr"><vt:lpstr>Sheet1</vt:lpstr></vt:vector></TitlesOfParts><Company></Company><LinksUpToDate>false</LinksUpToDate><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>16.0300</AppVersion></Properties>`,
|
|
4386
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>`, i = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
4387
|
+
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"><Application>Microsoft Macintosh Excel</Application><DocSecurity>0</DocSecurity><ScaleCrop>false</ScaleCrop><HeadingPairs><vt:vector size="2" baseType="variant"><vt:variant><vt:lpstr>Worksheets</vt:lpstr></vt:variant><vt:variant><vt:i4>1</vt:i4></vt:variant></vt:vector></HeadingPairs><TitlesOfParts><vt:vector size="1" baseType="lpstr"><vt:lpstr>Sheet1</vt:lpstr></vt:vector></TitlesOfParts><Company></Company><LinksUpToDate>false</LinksUpToDate><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>16.0300</AppVersion></Properties>`, o = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
4388
4388
|
<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:creator>${t}</dc:creator><cp:lastModifiedBy>${t}</cp:lastModifiedBy><dcterms:created xsi:type="dcterms:W3CDTF">2024-12-13T19:45:08Z</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">2024-12-13T19:45:35Z</dcterms:modified></cp:coreProperties>`, r = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
4389
|
-
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml"/></Relationships>`,
|
|
4390
|
-
<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="0E2841"/></a:dk2><a:lt2><a:srgbClr val="E8E8E8"/></a:lt2><a:accent1><a:srgbClr val="156082"/></a:accent1><a:accent2><a:srgbClr val="E97132"/></a:accent2><a:accent3><a:srgbClr val="196B24"/></a:accent3><a:accent4><a:srgbClr val="0F9ED5"/></a:accent4><a:accent5><a:srgbClr val="A02B93"/></a:accent5><a:accent6><a:srgbClr val="4EA72E"/></a:accent6><a:hlink><a:srgbClr val="467886"/></a:hlink><a:folHlink><a:srgbClr val="96607D"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Aptos Display" panose="02110004020202020204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック Light"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线 Light"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:majorFont><a:minorFont><a:latin typeface="Aptos Narrow" panose="02110004020202020204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:lumMod val="110000"/><a:satMod val="105000"/><a:tint val="67000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="103000"/><a:tint val="73000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="109000"/><a:tint val="81000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:satMod val="103000"/><a:lumMod val="102000"/><a:tint val="94000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:satMod val="110000"/><a:lumMod val="100000"/><a:shade val="100000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="99000"/><a:satMod val="120000"/><a:shade val="78000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="12700" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="19050" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="57150" dist="19050" dir="5400000" algn="ctr" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="63000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:tint val="95000"/><a:satMod val="170000"/></a:schemeClr></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="93000"/><a:satMod val="150000"/><a:shade val="98000"/><a:lumMod val="102000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:tint val="98000"/><a:satMod val="130000"/><a:shade val="90000"/><a:lumMod val="103000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="63000"/><a:satMod val="120000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults><a:lnDef><a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style></a:lnDef></a:objectDefaults><a:extraClrSchemeLst/><a:extLst><a:ext uri="{05A4C25C-085E-4340-85A3-A5531E510DB2}"><thm15:themeFamily xmlns:thm15="http://schemas.microsoft.com/office/thememl/2012/main" name="Office Theme" id="{2E142A2C-CD16-42D6-873A-C26D2A0506FA}" vid="{1BDDFF52-6CD6-40A5-AB3C-68EB2F1E4D0A}"/></a:ext></a:extLst></a:theme>`,
|
|
4389
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml"/></Relationships>`, l = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
4390
|
+
<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="0E2841"/></a:dk2><a:lt2><a:srgbClr val="E8E8E8"/></a:lt2><a:accent1><a:srgbClr val="156082"/></a:accent1><a:accent2><a:srgbClr val="E97132"/></a:accent2><a:accent3><a:srgbClr val="196B24"/></a:accent3><a:accent4><a:srgbClr val="0F9ED5"/></a:accent4><a:accent5><a:srgbClr val="A02B93"/></a:accent5><a:accent6><a:srgbClr val="4EA72E"/></a:accent6><a:hlink><a:srgbClr val="467886"/></a:hlink><a:folHlink><a:srgbClr val="96607D"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Aptos Display" panose="02110004020202020204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック Light"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线 Light"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:majorFont><a:minorFont><a:latin typeface="Aptos Narrow" panose="02110004020202020204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:lumMod val="110000"/><a:satMod val="105000"/><a:tint val="67000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="103000"/><a:tint val="73000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="109000"/><a:tint val="81000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:satMod val="103000"/><a:lumMod val="102000"/><a:tint val="94000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:satMod val="110000"/><a:lumMod val="100000"/><a:shade val="100000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="99000"/><a:satMod val="120000"/><a:shade val="78000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="12700" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="19050" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="57150" dist="19050" dir="5400000" algn="ctr" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="63000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:tint val="95000"/><a:satMod val="170000"/></a:schemeClr></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="93000"/><a:satMod val="150000"/><a:shade val="98000"/><a:lumMod val="102000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:tint val="98000"/><a:satMod val="130000"/><a:shade val="90000"/><a:lumMod val="103000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="63000"/><a:satMod val="120000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults><a:lnDef><a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style></a:lnDef></a:objectDefaults><a:extraClrSchemeLst/><a:extLst><a:ext uri="{05A4C25C-085E-4340-85A3-A5531E510DB2}"><thm15:themeFamily xmlns:thm15="http://schemas.microsoft.com/office/thememl/2012/main" name="Office Theme" id="{2E142A2C-CD16-42D6-873A-C26D2A0506FA}" vid="{1BDDFF52-6CD6-40A5-AB3C-68EB2F1E4D0A}"/></a:ext></a:extLst></a:theme>`, n = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
4391
4391
|
<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="3" uniqueCount="3"><si><t>a</t></si><si><t>b</t></si><si><t>c</t></si></sst>`, c = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
4392
4392
|
<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac x16r2 xr" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:x16r2="http://schemas.microsoft.com/office/spreadsheetml/2015/02/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision"><fonts count="1" x14ac:knownFonts="1"><font><sz val="12"/><color theme="1"/><name val="Aptos Narrow"/><family val="2"/><scheme val="minor"/></font></fonts><fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs><cellXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/></cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles><dxfs count="0"/><tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleLight16"/><extLst><ext uri="{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"><x14:slicerStyles defaultSlicerStyle="SlicerStyleLight1"/></ext><ext uri="{9260A510-F301-46a8-8635-F512D64BE5F5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:timelineStyles defaultTimelineStyle="TimeSlicerStyleLight1"/></ext></extLst></styleSheet>`, h = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
4393
4393
|
<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x15 xr xr6 xr10 xr2" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr6="http://schemas.microsoft.com/office/spreadsheetml/2016/revision6" xmlns:xr10="http://schemas.microsoft.com/office/spreadsheetml/2016/revision10" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2"><fileVersion appName="xl" lastEdited="7" lowestEdited="7" rupBuild="11207"/><workbookPr defaultThemeVersion="202300"/><mc:AlternateContent xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"><mc:Choice Requires="x15"><x15ac:absPath url="/" xmlns:x15ac="http://schemas.microsoft.com/office/spreadsheetml/2010/11/ac"/></mc:Choice></mc:AlternateContent><xr:revisionPtr revIDLastSave="0" documentId="8_{292BF245-1F37-B045-B1A5-26C42FB62779}" xr6:coauthVersionLast="47" xr6:coauthVersionMax="47" xr10:uidLastSave="{00000000-0000-0000-0000-000000000000}"/><bookViews><workbookView xWindow="11340" yWindow="5060" windowWidth="28040" windowHeight="17440" xr2:uid="{858B8D3F-6246-774D-8903-6D38687B7BC6}"/></bookViews><sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets><calcPr calcId="181029"/><extLst><ext uri="{140A7094-0E35-4892-8432-C4D2E57EDEB5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:workbookPr chartTrackingRefBase="1"/></ext><ext uri="{B58B0392-4F1F-4190-BB64-5DF3571DCE5F}" xmlns:xcalcf="http://schemas.microsoft.com/office/spreadsheetml/2018/calcfeatures"><xcalcf:calcFeatures><xcalcf:feature name="microsoft.com:RD"/><xcalcf:feature name="microsoft.com:Single"/><xcalcf:feature name="microsoft.com:FV"/><xcalcf:feature name="microsoft.com:CNMTM"/><xcalcf:feature name="microsoft.com:LET_WF"/><xcalcf:feature name="microsoft.com:LAMBDA_WF"/><xcalcf:feature name="microsoft.com:ARRAYTEXT_WF"/></xcalcf:calcFeatures></ext></extLst></workbook>`, d = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
4394
4394
|
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/><Override PartName="/xl/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/><Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/></Types>`, p = /* @__PURE__ */ new Map();
|
|
4395
|
-
return p.set("_rels/.rels", s), p.set("docProps/app.xml",
|
|
4395
|
+
return p.set("_rels/.rels", s), p.set("docProps/app.xml", i), p.set("docProps/core.xml", o), p.set("xl/_rels/workbook.xml.rels", r), p.set("xl/theme/theme1.xml", l), p.set("xl/worksheets/sheet1.xml", this.getX1WorksheetsSheet1Xml(e)), p.set("xl/sharedStrings.xml", n), p.set("xl/styles.xml", c), p.set("xl/workbook.xml", h), p.set("[Content_Types].xml", d), p;
|
|
4396
4396
|
}
|
|
4397
4397
|
getX1WorksheetsSheet1Xml(e) {
|
|
4398
4398
|
const t = [];
|
|
@@ -4404,18 +4404,18 @@ class St {
|
|
|
4404
4404
|
<sheetFormatPr baseColWidth="10" defaultRowHeight="16" x14ac:dyDescent="0.2"/>
|
|
4405
4405
|
<sheetData>`);
|
|
4406
4406
|
for (let s = 0; s < e.length; s++) {
|
|
4407
|
-
const
|
|
4407
|
+
const i = e[s];
|
|
4408
4408
|
t.push('<row r="${r + 1}" spans="1:2" x14ac:dyDescent="0.2">');
|
|
4409
|
-
for (let
|
|
4410
|
-
const r = o
|
|
4409
|
+
for (let o = 0; o < i.length; o++) {
|
|
4410
|
+
const r = i[o], l = this.getCellAddress(s, o);
|
|
4411
4411
|
if (typeof r == "number")
|
|
4412
|
-
t.push(`<c r="${
|
|
4412
|
+
t.push(`<c r="${l}"><v>${r}</v></c>`);
|
|
4413
4413
|
else if (r instanceof Date) {
|
|
4414
|
-
const
|
|
4415
|
-
t.push(`<c r="${
|
|
4414
|
+
const n = r;
|
|
4415
|
+
t.push(`<c r="${l}" t="inlineStr"><is><t>${n.toISOString()}</t></is></c>`);
|
|
4416
4416
|
} else {
|
|
4417
|
-
const
|
|
4418
|
-
t.push(`<c r="${
|
|
4417
|
+
const n = r != null ? this.escapeXml(String(r)) : "";
|
|
4418
|
+
t.push(`<c r="${l}" t="inlineStr"><is><t>${n}</t></is></c>`);
|
|
4419
4419
|
}
|
|
4420
4420
|
}
|
|
4421
4421
|
t.push("</row>");
|
|
@@ -4428,31 +4428,31 @@ class St {
|
|
|
4428
4428
|
}
|
|
4429
4429
|
getCellAddress(e, t) {
|
|
4430
4430
|
const s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
4431
|
-
let
|
|
4431
|
+
let i = "";
|
|
4432
4432
|
for (; t >= 0; )
|
|
4433
|
-
|
|
4434
|
-
return `${
|
|
4433
|
+
i = s[t % 26] + i, t = Math.floor(t / 26) - 1;
|
|
4434
|
+
return `${i}${e + 1}`;
|
|
4435
4435
|
}
|
|
4436
4436
|
createZip(e) {
|
|
4437
4437
|
const t = [];
|
|
4438
4438
|
let s = 0;
|
|
4439
|
-
const
|
|
4439
|
+
const i = [];
|
|
4440
4440
|
e.forEach((d, p) => {
|
|
4441
|
-
const
|
|
4442
|
-
|
|
4441
|
+
const g = new TextEncoder().encode(p), u = new TextEncoder().encode(d), S = new Uint8Array(30 + g.length), f = new DataView(S.buffer);
|
|
4442
|
+
S.set([80, 75, 3, 4], 0), f.setUint16(4, 20, !0), f.setUint16(6, 0, !0), f.setUint16(8, 0, !0), f.setUint16(10, 0, !0), f.setUint16(12, 0, !0), f.setUint32(14, 0, !0), f.setUint32(18, u.length, !0), f.setUint32(22, u.length, !0), f.setUint16(26, g.length, !0), f.setUint16(28, 0, !0), S.set(g, 30), t.push(S, u), i.push({
|
|
4443
4443
|
path: p,
|
|
4444
4444
|
offset: s,
|
|
4445
|
-
contentSize:
|
|
4446
|
-
}), s +=
|
|
4445
|
+
contentSize: u.length
|
|
4446
|
+
}), s += S.length + u.length;
|
|
4447
4447
|
});
|
|
4448
|
-
const
|
|
4449
|
-
|
|
4450
|
-
const p = new TextEncoder().encode(d.path),
|
|
4451
|
-
|
|
4448
|
+
const o = s;
|
|
4449
|
+
i.forEach((d) => {
|
|
4450
|
+
const p = new TextEncoder().encode(d.path), g = new Uint8Array(46 + p.length), u = new DataView(g.buffer);
|
|
4451
|
+
g.set([80, 75, 1, 2], 0), u.setUint16(4, 20, !0), u.setUint16(6, 20, !0), u.setUint16(8, 0, !0), u.setUint16(10, 0, !0), u.setUint16(12, 0, !0), u.setUint16(14, 0, !0), u.setUint32(16, 0, !0), u.setUint32(20, d.contentSize, !0), u.setUint32(24, d.contentSize, !0), u.setUint16(28, p.length, !0), u.setUint16(30, 0, !0), u.setUint16(32, 0, !0), u.setUint16(34, 0, !0), u.setUint16(36, 0, !0), u.setUint32(38, 0, !0), u.setUint32(42, d.offset, !0), g.set(p, 46), t.push(g), s += g.length;
|
|
4452
4452
|
});
|
|
4453
|
-
const r = new Uint8Array(22),
|
|
4454
|
-
r.set([80, 75, 5, 6], 0),
|
|
4455
|
-
const
|
|
4453
|
+
const r = new Uint8Array(22), l = new DataView(r.buffer);
|
|
4454
|
+
r.set([80, 75, 5, 6], 0), l.setUint16(4, 0, !0), l.setUint16(6, 0, !0), l.setUint16(8, i.length, !0), l.setUint16(10, i.length, !0), l.setUint32(12, s - o, !0), l.setUint32(16, o, !0), l.setUint16(20, 0, !0), t.push(r);
|
|
4455
|
+
const n = t.reduce((d, p) => d + p.length, 0), c = new Uint8Array(n);
|
|
4456
4456
|
let h = 0;
|
|
4457
4457
|
for (const d of t)
|
|
4458
4458
|
c.set(d, h), h += d.length;
|
|
@@ -4463,16 +4463,16 @@ class St {
|
|
|
4463
4463
|
return this.createZip(s);
|
|
4464
4464
|
}
|
|
4465
4465
|
}
|
|
4466
|
-
class
|
|
4467
|
-
constructor(e, t, s,
|
|
4466
|
+
class te extends qe {
|
|
4467
|
+
constructor(e, t, s, i, o, r = new H(), l = new ft()) {
|
|
4468
4468
|
var h;
|
|
4469
|
-
if (super(e, t, new
|
|
4469
|
+
if (super(e, t, new _e(s), i), this.eventListener = o, this.copyService = r, this.excelService = l, this.licenseManager = I.getInstance(), this.selectionService = new st(this), this.api = new Ge(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, this.lastContextmenu = Date.now(), t.setTableScope(this), o || (this.eventListener = new le()), (h = this.tableOptions) != null && h.autoRestoreOptions) {
|
|
4470
4470
|
const d = this.tableOptions.autoRestoreOptions, p = d.getStorageKeyFn;
|
|
4471
|
-
p && (d.autoRestoreScrollPosition && (this.storeScrollPosStateService = new
|
|
4471
|
+
p && (d.autoRestoreScrollPosition && (this.storeScrollPosStateService = new je(p)), d.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new Xe(p)), d.autoRestoreSortingState && (this.storeSortingService = new ze(p)));
|
|
4472
4472
|
}
|
|
4473
|
-
this.mouseHandler = new
|
|
4474
|
-
const
|
|
4475
|
-
|
|
4473
|
+
this.mouseHandler = new $e(this), this.inputHandler = new Qe(this), this.resizeHandler = new ut(this, i.resizeEventDebounceDelay), this.shortcutService = new lt(this), this.shortcutService.addListener(this.selectionService);
|
|
4474
|
+
const n = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
4475
|
+
n && n.addEventSelectionChangedListener(this);
|
|
4476
4476
|
const c = this.getFocusModel ? this.getFocusModel() : void 0;
|
|
4477
4477
|
c && c.addEventFocusChangedListener(this);
|
|
4478
4478
|
}
|
|
@@ -4488,8 +4488,8 @@ class oe extends st {
|
|
|
4488
4488
|
*
|
|
4489
4489
|
* @return {TableScope} - The newly created TableScope instance.
|
|
4490
4490
|
*/
|
|
4491
|
-
static create(e, t, s = new
|
|
4492
|
-
return new
|
|
4491
|
+
static create(e, t, s = new fe(), i = new le(), o = new ue(), r = new H()) {
|
|
4492
|
+
return new te(e, t, o, s, i, r);
|
|
4493
4493
|
}
|
|
4494
4494
|
/**
|
|
4495
4495
|
* Triggers an action based on the provided actionId.
|
|
@@ -4505,19 +4505,19 @@ class oe extends st {
|
|
|
4505
4505
|
if (e === "START_EDITING" && this.getFocusModel) {
|
|
4506
4506
|
const t = this.getFocusModel();
|
|
4507
4507
|
if (t) {
|
|
4508
|
-
const [s,
|
|
4509
|
-
this.tableModel.getBodyModel().isEditable(s,
|
|
4508
|
+
const [s, i] = t.getFocus();
|
|
4509
|
+
this.tableModel.getBodyModel().isEditable(s, i) && (this.clearSelection(), this.initRenderEditor(s, i));
|
|
4510
4510
|
}
|
|
4511
4511
|
return !0;
|
|
4512
4512
|
}
|
|
4513
4513
|
if (e === "COPY_2_CLIPBOARD") {
|
|
4514
4514
|
const t = this.getSelectionModel ? this.getSelectionModel() : void 0, s = this.getFocusModel ? this.getFocusModel() : void 0;
|
|
4515
|
-
this.copyService.createContent(this.tableModel, t, s).then((
|
|
4515
|
+
this.copyService.createContent(this.tableModel, t, s).then((i) => this.copyService.copyContent(i));
|
|
4516
4516
|
}
|
|
4517
4517
|
return !1;
|
|
4518
4518
|
}
|
|
4519
|
-
updateModelValueAfterEdit(e, t, s,
|
|
4520
|
-
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s,
|
|
4519
|
+
updateModelValueAfterEdit(e, t, s, i) {
|
|
4520
|
+
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, i) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(ee.createSingle(t, s)), this.hostElement.focus());
|
|
4521
4521
|
}
|
|
4522
4522
|
/**
|
|
4523
4523
|
* Retrieves the TableApi object.
|
|
@@ -4546,16 +4546,16 @@ class oe extends st {
|
|
|
4546
4546
|
* @return {GeMouseEvent} - The created GeMouseEvent object.
|
|
4547
4547
|
*/
|
|
4548
4548
|
createGeMouseEvent(e) {
|
|
4549
|
-
const t = new
|
|
4549
|
+
const t = new q();
|
|
4550
4550
|
if (t.originalEvent = e, e) {
|
|
4551
4551
|
const s = e.target;
|
|
4552
4552
|
if ([t.areaIdent, t.sideIdent] = this.getAreaAndSideIdentByAttr(s), t.rowIndex = this.getNumberByAttr(s, "data-row-index"), t.columnIndex = this.getNumberByAttr(s, "data-col-index"), t.action = this.getStringByAttr(s, "data-ge-action"), t.areaIdent) {
|
|
4553
|
-
const
|
|
4554
|
-
t.rowTop =
|
|
4553
|
+
const i = this.tableModel.getAreaModel(t.areaIdent);
|
|
4554
|
+
t.rowTop = i.getYPosByRowIndex(t.rowIndex);
|
|
4555
4555
|
}
|
|
4556
4556
|
if (t.columnLeft = this.tableModel.getXPosByColumnIndex(t.columnIndex), e.ctrlKey && e.altKey) {
|
|
4557
|
-
const
|
|
4558
|
-
this.debugOnce(
|
|
4557
|
+
const i = e.clientY - this.hostElement.offsetTop - this.areaHeaderCenter.parent.clientHeight, o = e.clientX - this.hostElement.offsetLeft - this.areaBodyWestGeo.width;
|
|
4558
|
+
this.debugOnce(o, i);
|
|
4559
4559
|
}
|
|
4560
4560
|
}
|
|
4561
4561
|
return t;
|
|
@@ -4604,10 +4604,10 @@ class oe extends st {
|
|
|
4604
4604
|
* @return {void}
|
|
4605
4605
|
*/
|
|
4606
4606
|
contextmenu(e) {
|
|
4607
|
-
var s,
|
|
4607
|
+
var s, i;
|
|
4608
4608
|
const t = Date.now();
|
|
4609
4609
|
if (t - this.lastContextmenu < 50) {
|
|
4610
|
-
this.lastContextmenu = t, (s = e.originalEvent) == null || s.preventDefault(), (
|
|
4610
|
+
this.lastContextmenu = t, (s = e.originalEvent) == null || s.preventDefault(), (i = e.originalEvent) == null || i.stopImmediatePropagation();
|
|
4611
4611
|
return;
|
|
4612
4612
|
}
|
|
4613
4613
|
this.lastContextmenu = t, this.eventListener.onContextmenu(e);
|
|
@@ -4622,7 +4622,7 @@ class oe extends st {
|
|
|
4622
4622
|
toggleExpandCollapseAll(e = !0) {
|
|
4623
4623
|
var s;
|
|
4624
4624
|
const t = this.tableModel.getBodyModel();
|
|
4625
|
-
|
|
4625
|
+
Y(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (s = this.storeStateCollapsedExpandService) == null || s.collapsedStateAll(e));
|
|
4626
4626
|
}
|
|
4627
4627
|
/**
|
|
4628
4628
|
* Toggles the checkbox state of a specific row in a table.
|
|
@@ -4634,11 +4634,11 @@ class oe extends st {
|
|
|
4634
4634
|
* @return {void} - This method does not return anything.
|
|
4635
4635
|
*/
|
|
4636
4636
|
toggleRowCheckbox(e, t, s) {
|
|
4637
|
-
var
|
|
4638
|
-
const
|
|
4639
|
-
|
|
4640
|
-
const
|
|
4641
|
-
this.eventListener.onCheckboxChanged(
|
|
4637
|
+
var n;
|
|
4638
|
+
const i = this.tableModel.getAreaModel(s), o = i.isRowChecked(e), r = o === void 0 || o === "semi" || o === "none";
|
|
4639
|
+
i.setRowChecked(e, r), this.repaint();
|
|
4640
|
+
const l = (n = i.rowSelectionModel) == null ? void 0 : n.getCheckedRows();
|
|
4641
|
+
this.eventListener.onCheckboxChanged(l || []);
|
|
4642
4642
|
}
|
|
4643
4643
|
/**
|
|
4644
4644
|
* Handle mouse click events.
|
|
@@ -4651,8 +4651,8 @@ class oe extends st {
|
|
|
4651
4651
|
let s = this.selectionService.onMouseClicked(e, t);
|
|
4652
4652
|
if (!s && this.getFocusModel) {
|
|
4653
4653
|
this.resetEditorRenderer();
|
|
4654
|
-
const
|
|
4655
|
-
|
|
4654
|
+
const i = this.getFocusModel();
|
|
4655
|
+
i && (s = i.hasChanged(), i.clearChanged());
|
|
4656
4656
|
}
|
|
4657
4657
|
return s;
|
|
4658
4658
|
}
|
|
@@ -4688,12 +4688,12 @@ class oe extends st {
|
|
|
4688
4688
|
* @return {void}
|
|
4689
4689
|
*/
|
|
4690
4690
|
onHeaderDblClicked(e, t, s) {
|
|
4691
|
-
var
|
|
4692
|
-
const
|
|
4693
|
-
if (
|
|
4691
|
+
var o, r;
|
|
4692
|
+
const i = this.tableModel.getColumnDef(s);
|
|
4693
|
+
if (i != null && i.sortable && i.sortable()) {
|
|
4694
4694
|
e.preventDefault(), e.stopPropagation();
|
|
4695
|
-
const
|
|
4696
|
-
this.tableModel.doSort([h]) && ((
|
|
4695
|
+
const l = i.sortStatesOrder ? i.sortStatesOrder : this.tableOptions.sortOrder, n = i.sortState ?? "", c = l[(l.indexOf(n) + 1) % l.length], h = new Ze(s, c);
|
|
4696
|
+
this.tableModel.doSort([h]) && ((o = this.tableModel.getColumnDefs()) == null || o.forEach((p) => p.sortState = ""), i.sortState = c), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([h]);
|
|
4697
4697
|
}
|
|
4698
4698
|
}
|
|
4699
4699
|
/**
|
|
@@ -4715,13 +4715,13 @@ class oe extends st {
|
|
|
4715
4715
|
* @return {void}
|
|
4716
4716
|
*/
|
|
4717
4717
|
scrollToIndex(e, t) {
|
|
4718
|
-
const
|
|
4719
|
-
this.scrollToPixel(0,
|
|
4718
|
+
const i = this.tableModel.getAreaModel("body").getYPosByRowIndex(t);
|
|
4719
|
+
this.scrollToPixel(0, i);
|
|
4720
4720
|
}
|
|
4721
4721
|
adjustAfterScrolling() {
|
|
4722
4722
|
super.adjustAfterScrolling();
|
|
4723
4723
|
const e = this.scrollViewport;
|
|
4724
|
-
this.eventListener.onScroll(new
|
|
4724
|
+
this.eventListener.onScroll(new tt(
|
|
4725
4725
|
this.scrollTop,
|
|
4726
4726
|
this.scrollLeft,
|
|
4727
4727
|
e.scrollHeight,
|
|
@@ -4779,8 +4779,8 @@ class oe extends st {
|
|
|
4779
4779
|
if (!this.isEditing() && this.getFocusModel) {
|
|
4780
4780
|
const s = this.getFocusModel();
|
|
4781
4781
|
if (s) {
|
|
4782
|
-
const [
|
|
4783
|
-
return s.setFocus(
|
|
4782
|
+
const [i, o] = s.getFocus();
|
|
4783
|
+
return s.setFocus(i + t, o + e), this.repaint(), !0;
|
|
4784
4784
|
}
|
|
4785
4785
|
}
|
|
4786
4786
|
return !1;
|
|
@@ -4849,24 +4849,24 @@ class oe extends st {
|
|
|
4849
4849
|
autoRestoreCollapsedExpandedState() {
|
|
4850
4850
|
var e, t;
|
|
4851
4851
|
if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.getRowId && this.storeStateCollapsedExpandService) {
|
|
4852
|
-
const s = this.tableOptions.autoRestoreOptions,
|
|
4853
|
-
if (s.autoRestoreCollapsedExpandedState &&
|
|
4854
|
-
const
|
|
4855
|
-
if (
|
|
4856
|
-
const
|
|
4857
|
-
for (let c = 0; c <
|
|
4852
|
+
const s = this.tableOptions.autoRestoreOptions, i = s.getRowId;
|
|
4853
|
+
if (s.autoRestoreCollapsedExpandedState && i) {
|
|
4854
|
+
const o = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), r = this.tableModel.getAreaModel("body");
|
|
4855
|
+
if (Y(r)) {
|
|
4856
|
+
const l = r, n = r.getRowCount();
|
|
4857
|
+
for (let c = 0; c < n; c++) {
|
|
4858
4858
|
const h = r.getRowByIndex(c);
|
|
4859
4859
|
if (h)
|
|
4860
|
-
if (
|
|
4860
|
+
if (o.allExpanded)
|
|
4861
4861
|
h.expanded = !0;
|
|
4862
|
-
else if (
|
|
4862
|
+
else if (o.allCollapsed)
|
|
4863
4863
|
h.expanded = !1;
|
|
4864
4864
|
else {
|
|
4865
|
-
const d =
|
|
4866
|
-
|
|
4865
|
+
const d = i(h.data);
|
|
4866
|
+
o.mode === "expanded" ? h.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(d) : o.mode === "collapsed" && (h.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(d));
|
|
4867
4867
|
}
|
|
4868
4868
|
}
|
|
4869
|
-
|
|
4869
|
+
l.recalcVisibleTreeRows();
|
|
4870
4870
|
}
|
|
4871
4871
|
}
|
|
4872
4872
|
}
|
|
@@ -4875,13 +4875,13 @@ class oe extends st {
|
|
|
4875
4875
|
const e = this.tableModel.getBodyModel(), t = this.tableModel.getColumnCount(), s = (e == null ? void 0 : e.getRowCount()) ?? 0;
|
|
4876
4876
|
if (!e)
|
|
4877
4877
|
return console.warn("Body model is not available."), [];
|
|
4878
|
-
const
|
|
4879
|
-
for (let
|
|
4878
|
+
const i = new Array(t).fill(0);
|
|
4879
|
+
for (let o = 0; o < s; o++)
|
|
4880
4880
|
for (let r = 0; r < t; r++) {
|
|
4881
|
-
const
|
|
4882
|
-
|
|
4881
|
+
const l = e.getValueAt(o, r), n = (l == null ? void 0 : l.toString().length) || 0;
|
|
4882
|
+
n > i[r] && (i[r] = n);
|
|
4883
4883
|
}
|
|
4884
|
-
return
|
|
4884
|
+
return i.map((o) => Math.max(o * 10, 50));
|
|
4885
4885
|
}
|
|
4886
4886
|
setColumnWidth(e, t) {
|
|
4887
4887
|
this.tableModel.setColumnWidth(e, t);
|
|
@@ -4889,8 +4889,8 @@ class oe extends st {
|
|
|
4889
4889
|
autoResizeColumns(e = !0) {
|
|
4890
4890
|
const t = this.calcAutoColumnWidths();
|
|
4891
4891
|
for (let s = 0; s < t.length; s++) {
|
|
4892
|
-
const
|
|
4893
|
-
this.tableModel.setColumnWidth(s,
|
|
4892
|
+
const i = t[s];
|
|
4893
|
+
this.tableModel.setColumnWidth(s, i);
|
|
4894
4894
|
}
|
|
4895
4895
|
e && this.recalcWrappers();
|
|
4896
4896
|
}
|
|
@@ -4957,380 +4957,105 @@ class oe extends st {
|
|
|
4957
4957
|
* @see {@link getDisplayedRowCount} - Related method for getting visible row count
|
|
4958
4958
|
*/
|
|
4959
4959
|
ensureRowIsVisible(e) {
|
|
4960
|
-
const t = this.getFirstFullVisibleRowIndex(), s = this.getLastFullVisibleRowIndex(),
|
|
4961
|
-
return e < t ? (this.scrollToIndex(0, e), !0) : e > s ? (this.scrollToIndex(0, e -
|
|
4960
|
+
const t = this.getFirstFullVisibleRowIndex(), s = this.getLastFullVisibleRowIndex(), i = this.getDisplayedRowCount();
|
|
4961
|
+
return e < t ? (this.scrollToIndex(0, e), !0) : e > s ? (this.scrollToIndex(0, e - i + 1), !0) : !1;
|
|
4962
4962
|
}
|
|
4963
4963
|
}
|
|
4964
|
-
|
|
4965
|
-
};
|
|
4966
|
-
G.themes = ["light", "combat", "paper", "blackboard"], G.vars = {
|
|
4967
|
-
light: `html[data-theme="light"] {
|
|
4968
|
-
--ge-table-bg: rgba(255,255,255, 0.5);
|
|
4969
|
-
--ge-table-header-west-bg: rgba(233, 233, 233, 0.5);
|
|
4970
|
-
--ge-table-header-center-bg: rgba(233, 233, 233, 0.5);
|
|
4971
|
-
--ge-table-header-east-bg: rgba(233, 233, 233, 0.5);
|
|
4972
|
-
--ge-table-header-west-text: #000;
|
|
4973
|
-
--ge-table-header-center-text: #000;
|
|
4974
|
-
--ge-table-header-east-text: #000;
|
|
4975
|
-
--ge-table-header-west-horizontal-border: #ddd;
|
|
4976
|
-
--ge-table-header-west-vertical-border: #ccc;
|
|
4977
|
-
--ge-table-header-center-horizontal-border: #ddd;
|
|
4978
|
-
--ge-table-header-center-vertical-border: #ccc;
|
|
4979
|
-
--ge-table-header-east-horizontal-border: #ddd;
|
|
4980
|
-
--ge-table-header-east-vertical-border: #ccc;
|
|
4981
|
-
--ge-table-body-west-bg: rgba(233, 233, 233, 0.5);
|
|
4982
|
-
--ge-table-body-center-bg: rgba(255,255,255, 0.5);
|
|
4983
|
-
--ge-table-body-east-bg: rgba(233, 233, 233, 0.5);
|
|
4984
|
-
--ge-table-body-west-text: #000;
|
|
4985
|
-
--ge-table-body-center-text: #000;
|
|
4986
|
-
--ge-table-body-east-text: #000;
|
|
4987
|
-
--ge-table-body-west-horizontal-border: #ddd;
|
|
4988
|
-
--ge-table-body-west-vertical-border: #ccc;
|
|
4989
|
-
--ge-table-body-center-horizontal-border: #bbb;
|
|
4990
|
-
--ge-table-body-center-vertical-border: #ddd;
|
|
4991
|
-
--ge-table-body-east-horizontal-border: #ddd;
|
|
4992
|
-
--ge-table-body-east-vertical-border: #ccc;
|
|
4993
|
-
--ge-table-body-west-selected-range-bg: rgba(0, 152, 219, 0.4);
|
|
4994
|
-
--ge-table-body-center-selected-range-bg: rgba(0, 152, 219, 0.4);
|
|
4995
|
-
--ge-table-body-east-selected-range-bg: rgba(0, 152, 219, 0.4);
|
|
4996
|
-
--ge-table-body-west-selected-range-text: #000;
|
|
4997
|
-
--ge-table-body-center-selected-range-text: #000;
|
|
4998
|
-
--ge-table-body-east-selected-range-text: #000;
|
|
4999
|
-
--ge-table-footer-west-bg: rgba(233, 233, 233, 0.5);
|
|
5000
|
-
--ge-table-footer-center-bg: rgba(233, 233, 233, 0.5);
|
|
5001
|
-
--ge-table-footer-east-bg: rgba(233, 233, 233, 0.5);
|
|
5002
|
-
--ge-table-footer-west-text: #000;
|
|
5003
|
-
--ge-table-footer-center-text: #000;
|
|
5004
|
-
--ge-table-footer-east-text: #000;
|
|
5005
|
-
--ge-table-footer-west-horizontal-border: #ddd;
|
|
5006
|
-
--ge-table-footer-west-vertical-border: #ccc;
|
|
5007
|
-
--ge-table-footer-center-horizontal-border: #ddd;
|
|
5008
|
-
--ge-table-footer-center-vertical-border: #ccc;
|
|
5009
|
-
--ge-table-footer-east-horizontal-border: #ddd;
|
|
5010
|
-
--ge-table-footer-east-vertical-border: #ccc;
|
|
5011
|
-
--ge-table-border: #ccc;
|
|
5012
|
-
--ge-table-row-odd-bg: transparent;
|
|
5013
|
-
--ge-table-row-even-bg: transparent;
|
|
5014
|
-
--ge-table-column-odd-bg: transparent;
|
|
5015
|
-
--ge-table-column-even-bg: transparent;
|
|
5016
|
-
--ge-table-hover-column-bg: rgba(0, 224, 255, 0.27);
|
|
5017
|
-
--ge-table-hover-row-bg: rgba(0, 224, 255, 0.27);
|
|
5018
|
-
--ge-table-focus-border: rgb(0, 255, 255);
|
|
5019
|
-
--ge-table-color-error-text: #e00034;
|
|
5020
|
-
--ge-table-tree-arrow-collapsed-color: #e00034;
|
|
5021
|
-
--ge-table-column-resize-handle-border: rgb(0, 255, 255);
|
|
5022
|
-
--ge-table-dragged-col-div-bg: lightcyan;
|
|
5023
|
-
--ge-table-drop-zone-bg: rgba(244, 255, 242, 0.6);
|
|
5024
|
-
}`,
|
|
5025
|
-
combat: `html[data-theme="combat"] {
|
|
5026
|
-
--ge-table-bg: #101010;
|
|
5027
|
-
--ge-table-header-west-bg: #101010;
|
|
5028
|
-
--ge-table-header-center-bg: #101010;
|
|
5029
|
-
--ge-table-header-east-bg: #101010;
|
|
5030
|
-
--ge-table-header-west-text: oklch(100% 0 0);
|
|
5031
|
-
--ge-table-header-center-text: oklch(100% 0 0);
|
|
5032
|
-
--ge-table-header-east-text: oklch(100% 0 0);
|
|
5033
|
-
--ge-table-header-west-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5034
|
-
--ge-table-header-west-vertical-border: oklch(100% 0 0 / 0%);
|
|
5035
|
-
--ge-table-header-center-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5036
|
-
--ge-table-header-center-vertical-border: oklch(100% 0 0 / 0%);
|
|
5037
|
-
--ge-table-header-east-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5038
|
-
--ge-table-header-east-vertical-border: oklch(100% 0 0 / 0%);
|
|
5039
|
-
--ge-table-body-west-bg: #101010;
|
|
5040
|
-
--ge-table-body-center-bg: #101010;
|
|
5041
|
-
--ge-table-body-east-bg: #101010;
|
|
5042
|
-
--ge-table-body-west-text: #b6b4b4;
|
|
5043
|
-
--ge-table-body-center-text: #b6b4b4;
|
|
5044
|
-
--ge-table-body-east-text: #b6b4b4;
|
|
5045
|
-
--ge-table-body-west-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5046
|
-
--ge-table-body-west-vertical-border: oklch(100% 0 0 / 0%);
|
|
5047
|
-
--ge-table-body-center-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5048
|
-
--ge-table-body-center-vertical-border: oklch(100% 0 0 / 0%);
|
|
5049
|
-
--ge-table-body-east-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5050
|
-
--ge-table-body-east-vertical-border: oklch(100% 0 0 / 0%);
|
|
5051
|
-
--ge-table-body-west-selected-range-bg: oklch(20% 0.2 39.6 / 37%);
|
|
5052
|
-
--ge-table-body-center-selected-range-bg: oklch(20% 0.2 39.6 / 37%);
|
|
5053
|
-
--ge-table-body-east-selected-range-bg: oklch(20% 0.2 39.6 / 37%);
|
|
5054
|
-
--ge-table-body-west-selected-range-text: #f00032;
|
|
5055
|
-
--ge-table-body-center-selected-range-text: #f00032;
|
|
5056
|
-
--ge-table-body-east-selected-range-text: #f00032;
|
|
5057
|
-
--ge-table-footer-west-bg: #101010;
|
|
5058
|
-
--ge-table-footer-center-bg: #101010;
|
|
5059
|
-
--ge-table-footer-east-bg: #101010;
|
|
5060
|
-
--ge-table-footer-west-text: oklch(100% 0 0);
|
|
5061
|
-
--ge-table-footer-center-text: oklch(100% 0 0);
|
|
5062
|
-
--ge-table-footer-east-text: oklch(100% 0 0);
|
|
5063
|
-
--ge-table-footer-west-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5064
|
-
--ge-table-footer-west-vertical-border: oklch(100% 0 0 / 0%);
|
|
5065
|
-
--ge-table-footer-center-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5066
|
-
--ge-table-footer-center-vertical-border: oklch(100% 0 0 / 0%);
|
|
5067
|
-
--ge-table-footer-east-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5068
|
-
--ge-table-footer-east-vertical-border: oklch(100% 0 0 / 0%);
|
|
5069
|
-
--ge-table-border: oklch(100% 0 0 / 0%);
|
|
5070
|
-
--ge-table-row-odd-bg: oklch(100% 0 0 / 0%);
|
|
5071
|
-
--ge-table-row-even-bg: oklch(100% 0 0 / 0%);
|
|
5072
|
-
--ge-table-column-odd-bg: oklch(100% 0 0 / 0%);
|
|
5073
|
-
--ge-table-column-even-bg: oklch(100% 0 0 / 0%);
|
|
5074
|
-
--ge-table-hover-column-bg: oklch(34% 0.25 3.6 / 27%);
|
|
5075
|
-
--ge-table-hover-row-bg: oklch(34% 0.25 3.6 / 27%);
|
|
5076
|
-
--ge-table-focus-border: oklch(40% 0.25 3.6);
|
|
5077
|
-
--ge-table-color-error-text: oklch(65% 0.31 43.2);
|
|
5078
|
-
--ge-table-tree-arrow-collapsed-color: #e00034;
|
|
5079
|
-
--ge-table-column-resize-handle-border: oklch(63% 0.31 43.2);
|
|
5080
|
-
--ge-table-dragged-col-div-bg: #2c2e33;
|
|
5081
|
-
--ge-table-drop-zone-bg: #101010;
|
|
5082
|
-
}`,
|
|
5083
|
-
paper: `html[data-theme="paper"] {
|
|
5084
|
-
--ge-table-bg: #e7e5df;
|
|
5085
|
-
--ge-table-header-west-bg: oklch(80% 0.02 99 / 48%);
|
|
5086
|
-
--ge-table-header-center-bg: oklch(80% 0.02 99 / 48%);
|
|
5087
|
-
--ge-table-header-east-bg: oklch(80% 0.02 99 / 48%);
|
|
5088
|
-
--ge-table-header-west-text: #111;
|
|
5089
|
-
--ge-table-header-center-text: #111;
|
|
5090
|
-
--ge-table-header-east-text: #111;
|
|
5091
|
-
--ge-table-header-west-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5092
|
-
--ge-table-header-west-vertical-border: oklch(100% 0 0 / 0%);
|
|
5093
|
-
--ge-table-header-center-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5094
|
-
--ge-table-header-center-vertical-border: oklch(100% 0 0 / 0%);
|
|
5095
|
-
--ge-table-header-east-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5096
|
-
--ge-table-header-east-vertical-border: oklch(100% 0 0 / 0%);
|
|
5097
|
-
--ge-table-body-west-bg: oklch(80% 0.02 99 / 48%);
|
|
5098
|
-
--ge-table-body-center-bg: #e7e5df;
|
|
5099
|
-
--ge-table-body-east-bg: oklch(80% 0.02 99 / 48%);
|
|
5100
|
-
--ge-table-body-west-text: #000;
|
|
5101
|
-
--ge-table-body-center-text: #000;
|
|
5102
|
-
--ge-table-body-east-text: #000;
|
|
5103
|
-
--ge-table-body-west-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5104
|
-
--ge-table-body-west-vertical-border: oklch(100% 0 0 / 0%);
|
|
5105
|
-
--ge-table-body-center-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5106
|
-
--ge-table-body-center-vertical-border: oklch(100% 0 0 / 0%);
|
|
5107
|
-
--ge-table-body-east-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5108
|
-
--ge-table-body-east-vertical-border: oklch(100% 0 0 / 0%);
|
|
5109
|
-
--ge-table-body-west-selected-range-bg: #cfcdc2;
|
|
5110
|
-
--ge-table-body-center-selected-range-bg: #cfcdc2;
|
|
5111
|
-
--ge-table-body-east-selected-range-bg: #cfcdc2;
|
|
5112
|
-
--ge-table-body-west-selected-range-text: #000;
|
|
5113
|
-
--ge-table-body-center-selected-range-text: #000;
|
|
5114
|
-
--ge-table-body-east-selected-range-text: #000;
|
|
5115
|
-
--ge-table-footer-west-bg: oklch(80% 0.02 99 / 48%);
|
|
5116
|
-
--ge-table-footer-center-bg: oklch(80% 0.02 99 / 48%);
|
|
5117
|
-
--ge-table-footer-east-bg: oklch(80% 0.02 99 / 48%);
|
|
5118
|
-
--ge-table-footer-west-text: #111;
|
|
5119
|
-
--ge-table-footer-center-text: #111;
|
|
5120
|
-
--ge-table-footer-east-text: #111;
|
|
5121
|
-
--ge-table-footer-west-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5122
|
-
--ge-table-footer-west-vertical-border: oklch(100% 0 0 / 0%);
|
|
5123
|
-
--ge-table-footer-center-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5124
|
-
--ge-table-footer-center-vertical-border: oklch(100% 0 0 / 0%);
|
|
5125
|
-
--ge-table-footer-east-horizontal-border: oklch(100% 0 0 / 0%);
|
|
5126
|
-
--ge-table-footer-east-vertical-border: oklch(100% 0 0 / 0%);
|
|
5127
|
-
--ge-table-border: oklch(100% 0 0 / 0%);
|
|
5128
|
-
--ge-table-row-odd-bg: oklch(100% 0 0 / 0%);
|
|
5129
|
-
--ge-table-row-even-bg: oklch(100% 0 0 / 0%);
|
|
5130
|
-
--ge-table-column-odd-bg: oklch(100% 0 0 / 0%);
|
|
5131
|
-
--ge-table-column-even-bg: oklch(100% 0 0 / 0%);
|
|
5132
|
-
--ge-table-hover-column-bg: oklch(5% 0.2 266.40000000000003 / 9%);
|
|
5133
|
-
--ge-table-hover-row-bg: oklch(5% 0.2 266.40000000000003 / 9%);
|
|
5134
|
-
--ge-table-focus-border: oklch(100% 0.19 205.20000000000002);
|
|
5135
|
-
--ge-table-color-error-text: oklch(45% 0.25 43.2);
|
|
5136
|
-
--ge-table-tree-arrow-collapsed-color: #e00034;
|
|
5137
|
-
--ge-table-column-resize-handle-border: oklch(100% 0.19 205.20000000000002 / 71%);
|
|
5138
|
-
--ge-table-dragged-col-div-bg: #2c2e33;
|
|
5139
|
-
--ge-table-drop-zone-bg: #e7e5df;
|
|
5140
|
-
}`,
|
|
5141
|
-
blackboard: `html[data-theme="dark"] {
|
|
5142
|
-
--ge-table-bg: #0c1021;
|
|
5143
|
-
--ge-table-header-west-bg: #0c1021;
|
|
5144
|
-
--ge-table-header-center-bg: #0c1021;
|
|
5145
|
-
--ge-table-header-east-bg: #0c1021;
|
|
5146
|
-
--ge-table-header-west-text: #e0df85;
|
|
5147
|
-
--ge-table-header-center-text: #e0df85;
|
|
5148
|
-
--ge-table-header-east-text: #e0df85;
|
|
5149
|
-
--ge-table-header-west-horizontal-border: transparent;
|
|
5150
|
-
--ge-table-header-west-vertical-border: transparent;
|
|
5151
|
-
--ge-table-header-center-horizontal-border: transparent;
|
|
5152
|
-
--ge-table-header-center-vertical-border: transparent;
|
|
5153
|
-
--ge-table-header-east-horizontal-border: transparent;
|
|
5154
|
-
--ge-table-header-east-vertical-border: transparent;
|
|
5155
|
-
--ge-table-body-west-bg: #0c1021;
|
|
5156
|
-
--ge-table-body-center-bg: #0c1021;
|
|
5157
|
-
--ge-table-body-east-bg: #0c1021;
|
|
5158
|
-
--ge-table-body-west-text: #a7a7a7;
|
|
5159
|
-
--ge-table-body-center-text: #a7a7a7;
|
|
5160
|
-
--ge-table-body-east-text: #a7a7a7;
|
|
5161
|
-
--ge-table-body-west-horizontal-border: transparent;
|
|
5162
|
-
--ge-table-body-west-vertical-border: transparent;
|
|
5163
|
-
--ge-table-body-center-horizontal-border: transparent;
|
|
5164
|
-
--ge-table-body-center-vertical-border: transparent;
|
|
5165
|
-
--ge-table-body-east-horizontal-border: transparent;
|
|
5166
|
-
--ge-table-body-east-vertical-border: transparent;
|
|
5167
|
-
--ge-table-body-west-selected-range-bg: #758129;
|
|
5168
|
-
--ge-table-body-center-selected-range-bg: #758129;
|
|
5169
|
-
--ge-table-body-east-selected-range-bg: #758129;
|
|
5170
|
-
--ge-table-body-west-selected-range-text: oklch(100% 0 0);
|
|
5171
|
-
--ge-table-body-center-selected-range-text: oklch(100% 0 0);
|
|
5172
|
-
--ge-table-body-east-selected-range-text: oklch(100% 0 0);
|
|
5173
|
-
--ge-table-footer-west-bg: #0c1021;
|
|
5174
|
-
--ge-table-footer-center-bg: #0c1021;
|
|
5175
|
-
--ge-table-footer-east-bg: #0c1021;
|
|
5176
|
-
--ge-table-footer-west-text: #e0df85;
|
|
5177
|
-
--ge-table-footer-center-text: #e0df85;
|
|
5178
|
-
--ge-table-footer-east-text: #e0df85;
|
|
5179
|
-
--ge-table-footer-west-horizontal-border: transparent;
|
|
5180
|
-
--ge-table-footer-west-vertical-border: transparent;
|
|
5181
|
-
--ge-table-footer-center-horizontal-border: transparent;
|
|
5182
|
-
--ge-table-footer-center-vertical-border: otransparent;
|
|
5183
|
-
--ge-table-footer-east-horizontal-border: transparent;
|
|
5184
|
-
--ge-table-footer-east-vertical-border: transparent;
|
|
5185
|
-
--ge-table-border: oklch(0% 0 0);
|
|
5186
|
-
--ge-table-row-odd-bg: oklch(100% 0 0 / 0%);
|
|
5187
|
-
--ge-table-row-even-bg: oklch(100% 0 0 / 0%);
|
|
5188
|
-
--ge-table-column-odd-bg: oklch(100% 0 0 / 0%);
|
|
5189
|
-
--ge-table-column-even-bg: oklch(100% 0 0 / 0%);
|
|
5190
|
-
--ge-table-hover-column-bg: #a9a9a9;
|
|
5191
|
-
--ge-table-hover-row-bg: #a9a9a9;
|
|
5192
|
-
--ge-table-focus-border: #e1ff00;
|
|
5193
|
-
--ge-table-color-error-text: #ff0040;
|
|
5194
|
-
--ge-table-tree-arrow-collapsed-color: #e00034;
|
|
5195
|
-
--ge-table-column-resize-handle-border: oklch(0% 0 0);
|
|
5196
|
-
--ge-table-dragged-col-div-bg: #2c2e33;
|
|
5197
|
-
--ge-table-drop-zone-bg: #758129;
|
|
5198
|
-
}`
|
|
5199
|
-
};
|
|
5200
|
-
let ce = G;
|
|
5201
|
-
const N = class N {
|
|
5202
|
-
constructor(e = new Se()) {
|
|
5203
|
-
this.headerGroupOptions = e;
|
|
5204
|
-
}
|
|
5205
|
-
render(e, t, s, o, i, r, a) {
|
|
5206
|
-
const l = r != null && r.data ? r.data : "";
|
|
5207
|
-
if (r) {
|
|
5208
|
-
const { toggle: c, visibility: h, closed: d } = r, p = c ? N.toggleHeaderGroup : "";
|
|
5209
|
-
this.addText(e, o, t, s, l, p), c && h !== "always" && this.addArrowDiv(a, e, !d, t, s, o, p);
|
|
5210
|
-
} else
|
|
5211
|
-
this.addText(e, o, t, s, l, "");
|
|
5212
|
-
}
|
|
5213
|
-
addText(e, t, s, o, i, r) {
|
|
5214
|
-
e.innerHTML = `<span
|
|
5215
|
-
data-ge-action="${r}"
|
|
5216
|
-
data-area="${t}"
|
|
5217
|
-
data-row-index="${s}"
|
|
5218
|
-
data-col-index="${o}"
|
|
5219
|
-
>${i}</span>`;
|
|
5220
|
-
}
|
|
5221
|
-
addArrowDiv(e, t, s = !0, o = -1, i = -1, r = "header", a) {
|
|
5222
|
-
const l = e.createElement("div");
|
|
5223
|
-
e.addClass(l, "ge-table-toggle-icon-div"), e.setStyle(l, "display", "inline-block"), e.setStyle(l, "position", ""), e.setStyle(l, "width", "20px"), e.setStyle(l, "background", "transparent"), e.setStyle(l, "cursor", "pointer"), e.setAttribute(l, "data-row-index", `${o}`), e.setAttribute(l, "data-col-index", `${i}`), e.setAttribute(l, "data-area", `${r}`), e.setAttribute(l, "data-ge-action", `${a}`);
|
|
5224
|
-
let c;
|
|
5225
|
-
s ? c = this.headerGroupOptions.iconExpanded : c = this.headerGroupOptions.iconCollapsed;
|
|
5226
|
-
const h = c.content, d = e.createText(h);
|
|
5227
|
-
e.appendChild(l, d), c.style && this.applyStyleString(e, l, c.style);
|
|
5228
|
-
for (const p of c.classes)
|
|
5229
|
-
e.addClass(l, p);
|
|
5230
|
-
return e.appendChild(t, l), l;
|
|
5231
|
-
}
|
|
5232
|
-
applyStyleString(e, t, s) {
|
|
5233
|
-
const o = s.split(";").map((i) => i.trim()).filter((i) => i);
|
|
5234
|
-
for (const i of o) {
|
|
5235
|
-
const [r, a] = i.split(":");
|
|
5236
|
-
e.setStyle(t, r.trim(), a.trim());
|
|
5237
|
-
}
|
|
5238
|
-
}
|
|
5239
|
-
};
|
|
5240
|
-
N.toggleHeaderGroup = "toggleHeaderGroup";
|
|
5241
|
-
let de = N;
|
|
5242
|
-
function yt(n) {
|
|
4964
|
+
function mt(a) {
|
|
5243
4965
|
let e;
|
|
5244
4966
|
return {
|
|
5245
4967
|
c() {
|
|
5246
|
-
e =
|
|
4968
|
+
e = Ce("div"), ve(e, "class", "ge-table"), P(e, "width", "100%"), P(e, "height", "100%"), P(e, "background-color", "transparent"), P(e, "padding", "0"), P(e, "margin", "0");
|
|
5247
4969
|
},
|
|
5248
4970
|
m(t, s) {
|
|
5249
|
-
|
|
4971
|
+
we(t, e, s), a[4](e);
|
|
5250
4972
|
},
|
|
5251
|
-
p:
|
|
5252
|
-
i:
|
|
5253
|
-
o:
|
|
4973
|
+
p: k,
|
|
4974
|
+
i: k,
|
|
4975
|
+
o: k,
|
|
5254
4976
|
d(t) {
|
|
5255
|
-
t &&
|
|
4977
|
+
t && ce(e), a[4](null);
|
|
5256
4978
|
}
|
|
5257
4979
|
};
|
|
5258
4980
|
}
|
|
5259
|
-
function
|
|
5260
|
-
let { tableModel: s } = e, { tableOptions:
|
|
5261
|
-
const
|
|
5262
|
-
|
|
4981
|
+
function gt(a, e, t) {
|
|
4982
|
+
let { tableModel: s } = e, { tableOptions: i = new fe() } = e, { licenseKey: o } = e, r;
|
|
4983
|
+
const l = Se();
|
|
4984
|
+
ye(() => {
|
|
5263
4985
|
const c = {
|
|
5264
4986
|
onSelectionChanged(d) {
|
|
5265
|
-
|
|
4987
|
+
l("selectionChanged", d);
|
|
5266
4988
|
},
|
|
5267
4989
|
onFocusChanged(d) {
|
|
5268
|
-
|
|
4990
|
+
l("focusChanged", d);
|
|
5269
4991
|
},
|
|
5270
4992
|
onCheckboxChanged: (d) => {
|
|
5271
|
-
|
|
4993
|
+
l("checkboxChanged", d);
|
|
5272
4994
|
},
|
|
5273
4995
|
onContextmenu: (d) => {
|
|
5274
|
-
|
|
4996
|
+
l("contextmenu", d);
|
|
5275
4997
|
},
|
|
5276
4998
|
onModelChanged: (d) => {
|
|
5277
|
-
|
|
4999
|
+
l("modelChanged", d);
|
|
5278
5000
|
},
|
|
5279
5001
|
onMouseClicked: (d) => {
|
|
5280
|
-
|
|
5002
|
+
l("mouseClicked", d);
|
|
5281
5003
|
},
|
|
5282
5004
|
onMouseDragging: (d) => {
|
|
5283
|
-
|
|
5005
|
+
l("mouseDragging", d);
|
|
5284
5006
|
},
|
|
5285
5007
|
onMouseDraggingEnd: (d) => {
|
|
5286
|
-
|
|
5008
|
+
l("mouseDraggingEnd", d);
|
|
5287
5009
|
},
|
|
5288
5010
|
onMouseMoved: (d) => {
|
|
5289
|
-
|
|
5011
|
+
l("mouseMoved", d);
|
|
5012
|
+
},
|
|
5013
|
+
onScroll: (d) => {
|
|
5014
|
+
l("scroll", d);
|
|
5290
5015
|
}
|
|
5291
|
-
}, h = new
|
|
5292
|
-
h.firstInit(),
|
|
5016
|
+
}, h = new te(r, s, new ue(), i, c);
|
|
5017
|
+
h.firstInit(), l("tableReady", h.getApi()), o && I.getInstance().setLicenseKey(o);
|
|
5293
5018
|
});
|
|
5294
|
-
function
|
|
5295
|
-
|
|
5019
|
+
function n(c) {
|
|
5020
|
+
X[c ? "unshift" : "push"](() => {
|
|
5296
5021
|
r = c, t(0, r);
|
|
5297
5022
|
});
|
|
5298
5023
|
}
|
|
5299
|
-
return
|
|
5300
|
-
"tableModel" in c && t(1, s = c.tableModel), "tableOptions" in c && t(2,
|
|
5301
|
-
}, [r, s,
|
|
5024
|
+
return a.$$set = (c) => {
|
|
5025
|
+
"tableModel" in c && t(1, s = c.tableModel), "tableOptions" in c && t(2, i = c.tableOptions), "licenseKey" in c && t(3, o = c.licenseKey);
|
|
5026
|
+
}, [r, s, i, o, n];
|
|
5302
5027
|
}
|
|
5303
|
-
class
|
|
5028
|
+
class bt extends ke {
|
|
5304
5029
|
constructor(e) {
|
|
5305
|
-
super(),
|
|
5030
|
+
super(), Be(this, e, gt, mt, be, {
|
|
5306
5031
|
tableModel: 1,
|
|
5307
5032
|
tableOptions: 2,
|
|
5308
5033
|
licenseKey: 3
|
|
5309
5034
|
});
|
|
5310
5035
|
}
|
|
5311
5036
|
}
|
|
5312
|
-
class
|
|
5037
|
+
class xt {
|
|
5313
5038
|
constructor(e) {
|
|
5314
5039
|
this.Component = e;
|
|
5315
5040
|
}
|
|
5316
|
-
render(e, t, s,
|
|
5317
|
-
const
|
|
5041
|
+
render(e, t, s, i, o, r, l) {
|
|
5042
|
+
const n = new this.Component({
|
|
5318
5043
|
target: e,
|
|
5319
5044
|
props: {
|
|
5320
5045
|
cellDiv: e,
|
|
5321
5046
|
rowIndex: t,
|
|
5322
5047
|
columnIndex: s,
|
|
5323
|
-
areaIdent:
|
|
5324
|
-
areaModel:
|
|
5048
|
+
areaIdent: i,
|
|
5049
|
+
areaModel: o,
|
|
5325
5050
|
cellValue: r
|
|
5326
5051
|
}
|
|
5327
5052
|
});
|
|
5328
5053
|
return () => {
|
|
5329
|
-
|
|
5054
|
+
n.$destroy();
|
|
5330
5055
|
};
|
|
5331
5056
|
}
|
|
5332
5057
|
}
|
|
5333
5058
|
export {
|
|
5334
|
-
|
|
5335
|
-
|
|
5059
|
+
xt as ComponentRendererWrapper,
|
|
5060
|
+
bt as GuiexpertTable
|
|
5336
5061
|
};
|