@guiexpert/solid-table 1.1.59 → 1.1.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +7 -7
- package/index.js +184 -141
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
const
|
|
2
|
-
equals:
|
|
1
|
+
const ke = (a, e) => a === e, se = Symbol("solid-proxy"), Fe = typeof Proxy == "function", ge = {
|
|
2
|
+
equals: ke
|
|
3
3
|
};
|
|
4
|
-
let
|
|
5
|
-
const L = 1, G = 2,
|
|
4
|
+
let ye = we;
|
|
5
|
+
const L = 1, G = 2, xe = {
|
|
6
6
|
owned: null,
|
|
7
7
|
cleanups: null,
|
|
8
8
|
context: null,
|
|
9
9
|
owner: null
|
|
10
10
|
};
|
|
11
11
|
var R = null;
|
|
12
|
-
let ee = null,
|
|
13
|
-
function
|
|
14
|
-
const t = w, s = R, o = a.length === 0, i = e === void 0 ? s : e, r = o ?
|
|
12
|
+
let ee = null, Ie = null, w = null, M = null, O = null, q = 0;
|
|
13
|
+
function Oe(a, e) {
|
|
14
|
+
const t = w, s = R, o = a.length === 0, i = e === void 0 ? s : e, r = o ? xe : {
|
|
15
15
|
owned: null,
|
|
16
16
|
cleanups: null,
|
|
17
17
|
context: i ? i.context : null,
|
|
@@ -28,15 +28,15 @@ function oe(a, e, t) {
|
|
|
28
28
|
const s = ae(a, e, !1, L);
|
|
29
29
|
$(s);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
|
|
31
|
+
function Le(a, e, t) {
|
|
32
|
+
ye = _e;
|
|
33
33
|
const s = ae(a, e, !1, L);
|
|
34
34
|
s.user = !0, O ? O.push(s) : $(s);
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function Be(a, e, t) {
|
|
37
37
|
t = t ? Object.assign({}, ge, t) : ge;
|
|
38
38
|
const s = ae(a, e, !0, 0);
|
|
39
|
-
return s.observers = null, s.observerSlots = null, s.comparator = t.equals || void 0, $(s),
|
|
39
|
+
return s.observers = null, s.observerSlots = null, s.comparator = t.equals || void 0, $(s), We.bind(s);
|
|
40
40
|
}
|
|
41
41
|
function Z(a) {
|
|
42
42
|
if (w === null) return a();
|
|
@@ -48,10 +48,10 @@ function Z(a) {
|
|
|
48
48
|
w = e;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
|
|
51
|
+
function Pe(a) {
|
|
52
|
+
Le(() => Z(a));
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function We() {
|
|
55
55
|
if (this.sources && this.state)
|
|
56
56
|
if (this.state === L) $(this);
|
|
57
57
|
else {
|
|
@@ -64,12 +64,12 @@ function Pe() {
|
|
|
64
64
|
}
|
|
65
65
|
return this.value;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function He(a, e, t) {
|
|
68
68
|
let s = a.value;
|
|
69
69
|
return (!a.comparator || !a.comparator(s, e)) && (a.value = e, a.observers && a.observers.length && V(() => {
|
|
70
70
|
for (let o = 0; o < a.observers.length; o += 1) {
|
|
71
71
|
const i = a.observers[o], r = ee && ee.running;
|
|
72
|
-
r && ee.disposed.has(i), (r ? !i.tState : !i.state) && (i.pure ? M.push(i) : O.push(i), i.observers &&
|
|
72
|
+
r && ee.disposed.has(i), (r ? !i.tState : !i.state) && (i.pure ? M.push(i) : O.push(i), i.observers && ve(i)), r || (i.state = L);
|
|
73
73
|
}
|
|
74
74
|
if (M.length > 1e6)
|
|
75
75
|
throw M = [], new Error();
|
|
@@ -79,24 +79,24 @@ function $(a) {
|
|
|
79
79
|
if (!a.fn) return;
|
|
80
80
|
H(a);
|
|
81
81
|
const e = q;
|
|
82
|
-
|
|
82
|
+
$e(
|
|
83
83
|
a,
|
|
84
84
|
a.value,
|
|
85
85
|
e
|
|
86
86
|
);
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function $e(a, e, t) {
|
|
89
89
|
let s;
|
|
90
90
|
const o = R, i = w;
|
|
91
91
|
w = R = a;
|
|
92
92
|
try {
|
|
93
93
|
s = a.fn(e);
|
|
94
94
|
} catch (r) {
|
|
95
|
-
return a.pure && (a.state = L, a.owned && a.owned.forEach(H), a.owned = null), a.updatedAt = t + 1,
|
|
95
|
+
return a.pure && (a.state = L, a.owned && a.owned.forEach(H), a.owned = null), a.updatedAt = t + 1, Ce(r);
|
|
96
96
|
} finally {
|
|
97
97
|
w = i, R = o;
|
|
98
98
|
}
|
|
99
|
-
(!a.updatedAt || a.updatedAt <= t) && (a.updatedAt != null && "observers" in a ?
|
|
99
|
+
(!a.updatedAt || a.updatedAt <= t) && (a.updatedAt != null && "observers" in a ? He(a, s) : a.value = s, a.updatedAt = t);
|
|
100
100
|
}
|
|
101
101
|
function ae(a, e, t, s = L, o) {
|
|
102
102
|
const i = {
|
|
@@ -112,7 +112,7 @@ function ae(a, e, t, s = L, o) {
|
|
|
112
112
|
context: R ? R.context : null,
|
|
113
113
|
pure: t
|
|
114
114
|
};
|
|
115
|
-
return R === null || R !==
|
|
115
|
+
return R === null || R !== xe && (R.owned ? R.owned.push(i) : R.owned = [i]), i;
|
|
116
116
|
}
|
|
117
117
|
function z(a) {
|
|
118
118
|
if (a.state === 0) return;
|
|
@@ -135,20 +135,20 @@ function V(a, e) {
|
|
|
135
135
|
e || (M = []), O ? t = !0 : O = [], q++;
|
|
136
136
|
try {
|
|
137
137
|
const s = a();
|
|
138
|
-
return
|
|
138
|
+
return Ve(t), s;
|
|
139
139
|
} catch (s) {
|
|
140
|
-
t || (O = null), M = null,
|
|
140
|
+
t || (O = null), M = null, Ce(s);
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
-
function
|
|
144
|
-
if (M && (
|
|
143
|
+
function Ve(a) {
|
|
144
|
+
if (M && (we(M), M = null), a) return;
|
|
145
145
|
const e = O;
|
|
146
|
-
O = null, e.length && V(() =>
|
|
146
|
+
O = null, e.length && V(() => ye(e), !1);
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function we(a) {
|
|
149
149
|
for (let e = 0; e < a.length; e++) z(a[e]);
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function _e(a) {
|
|
152
152
|
let e, t = 0;
|
|
153
153
|
for (e = 0; e < a.length; e++) {
|
|
154
154
|
const s = a[e];
|
|
@@ -166,10 +166,10 @@ function U(a, e) {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function ve(a) {
|
|
170
170
|
for (let e = 0; e < a.observers.length; e += 1) {
|
|
171
171
|
const t = a.observers[e];
|
|
172
|
-
t.state || (t.state = G, t.pure ? M.push(t) : O.push(t), t.observers &&
|
|
172
|
+
t.state || (t.state = G, t.pure ? M.push(t) : O.push(t), t.observers && ve(t));
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
function H(a) {
|
|
@@ -196,18 +196,18 @@ function H(a) {
|
|
|
196
196
|
}
|
|
197
197
|
a.state = 0;
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function Ne(a) {
|
|
200
200
|
return a instanceof Error ? a : new Error(typeof a == "string" ? a : "Unknown error", {
|
|
201
201
|
cause: a
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
throw
|
|
204
|
+
function Ce(a, e = R) {
|
|
205
|
+
throw Ne(a);
|
|
206
206
|
}
|
|
207
207
|
function N() {
|
|
208
208
|
return !0;
|
|
209
209
|
}
|
|
210
|
-
const
|
|
210
|
+
const Ge = {
|
|
211
211
|
get(a, e, t) {
|
|
212
212
|
return e === se ? t : a.get(e);
|
|
213
213
|
},
|
|
@@ -234,19 +234,19 @@ const Ne = {
|
|
|
234
234
|
function te(a) {
|
|
235
235
|
return (a = typeof a == "function" ? a() : a) ? a : {};
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function ze() {
|
|
238
238
|
for (let a = 0, e = this.length; a < e; ++a) {
|
|
239
239
|
const t = this[a]();
|
|
240
240
|
if (t !== void 0) return t;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function Ee(...a) {
|
|
244
244
|
let e = !1;
|
|
245
245
|
for (let r = 0; r < a.length; r++) {
|
|
246
246
|
const l = a[r];
|
|
247
|
-
e = e || !!l && se in l, a[r] = typeof l == "function" ? (e = !0,
|
|
247
|
+
e = e || !!l && se in l, a[r] = typeof l == "function" ? (e = !0, Be(l)) : l;
|
|
248
248
|
}
|
|
249
|
-
if (
|
|
249
|
+
if (Fe && e)
|
|
250
250
|
return new Proxy(
|
|
251
251
|
{
|
|
252
252
|
get(r) {
|
|
@@ -267,7 +267,7 @@ function Ce(...a) {
|
|
|
267
267
|
return [...new Set(r)];
|
|
268
268
|
}
|
|
269
269
|
},
|
|
270
|
-
|
|
270
|
+
Ge
|
|
271
271
|
);
|
|
272
272
|
const t = {}, s = /* @__PURE__ */ Object.create(null);
|
|
273
273
|
for (let r = a.length - 1; r >= 0; r--) {
|
|
@@ -282,7 +282,7 @@ function Ce(...a) {
|
|
|
282
282
|
s[c] = h.get ? {
|
|
283
283
|
enumerable: !0,
|
|
284
284
|
configurable: !0,
|
|
285
|
-
get:
|
|
285
|
+
get: ze.bind(t[c] = [h.get.bind(l)])
|
|
286
286
|
} : h.value !== void 0 ? h : void 0;
|
|
287
287
|
else {
|
|
288
288
|
const p = t[c];
|
|
@@ -297,7 +297,7 @@ function Ce(...a) {
|
|
|
297
297
|
}
|
|
298
298
|
return o;
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function Ue(a, e, t) {
|
|
301
301
|
let s = t.length, o = e.length, i = s, r = 0, l = 0, n = e[o - 1].nextSibling, d = null;
|
|
302
302
|
for (; r < o || l < i; ) {
|
|
303
303
|
if (e[r] === t[l]) {
|
|
@@ -336,15 +336,15 @@ function ze(a, e, t) {
|
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function je(a, e, t, s = {}) {
|
|
340
340
|
let o;
|
|
341
|
-
return
|
|
342
|
-
o = i, e === document ? a() :
|
|
341
|
+
return Oe((i) => {
|
|
342
|
+
o = i, e === document ? a() : Ye(e, a(), e.firstChild ? null : void 0, t);
|
|
343
343
|
}, s.owner), () => {
|
|
344
344
|
o(), e.textContent = "";
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function Xe(a, e, t) {
|
|
348
348
|
let s;
|
|
349
349
|
const o = () => {
|
|
350
350
|
const r = document.createElement("template");
|
|
@@ -352,10 +352,10 @@ function je(a, e, t) {
|
|
|
352
352
|
}, i = () => (s || (s = o())).cloneNode(!0);
|
|
353
353
|
return i.cloneNode = i, i;
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function Ke(a, e, t) {
|
|
356
356
|
return Z(() => a(e, t));
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function Ye(a, e, t, s) {
|
|
359
359
|
if (t !== void 0 && !s && (s = []), typeof e != "function") return j(a, e, s, t);
|
|
360
360
|
oe((o) => j(a, e(), o, t), s);
|
|
361
361
|
}
|
|
@@ -386,7 +386,7 @@ function j(a, e, t, s, o) {
|
|
|
386
386
|
return oe(() => t = j(a, l, t, s, !0)), () => t;
|
|
387
387
|
if (l.length === 0) {
|
|
388
388
|
if (t = P(a, t, s), r) return t;
|
|
389
|
-
} else n ? t.length === 0 ? fe(a, l, s) :
|
|
389
|
+
} else n ? t.length === 0 ? fe(a, l, s) : Ue(a, t, l) : (t && P(a), fe(a, l));
|
|
390
390
|
t = l;
|
|
391
391
|
} else if (e.nodeType) {
|
|
392
392
|
if (Array.isArray(t)) {
|
|
@@ -441,28 +441,28 @@ function P(a, e, t, s) {
|
|
|
441
441
|
} else a.insertBefore(o, t);
|
|
442
442
|
return [o];
|
|
443
443
|
}
|
|
444
|
-
class
|
|
444
|
+
class Tt {
|
|
445
445
|
constructor(e) {
|
|
446
446
|
this.code = e;
|
|
447
447
|
}
|
|
448
448
|
render(e, t, s, o, i, r, l) {
|
|
449
|
-
const n =
|
|
449
|
+
const n = Ee({
|
|
450
450
|
rowIndex: t,
|
|
451
451
|
columnIndex: s,
|
|
452
452
|
areaIdent: o,
|
|
453
453
|
areaModel: i,
|
|
454
454
|
cellValue: r
|
|
455
455
|
});
|
|
456
|
-
|
|
456
|
+
je(
|
|
457
457
|
() => this.code(n),
|
|
458
458
|
e
|
|
459
459
|
);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
const
|
|
462
|
+
const Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
463
463
|
__proto__: null
|
|
464
464
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
465
|
-
function
|
|
465
|
+
function Je(a, e = 500) {
|
|
466
466
|
let t = null;
|
|
467
467
|
return function(...s) {
|
|
468
468
|
t && window.clearTimeout(t), t = window.setTimeout(() => {
|
|
@@ -526,7 +526,7 @@ class I {
|
|
|
526
526
|
this.content = e, this.style = t, this.classes = s;
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
|
-
class
|
|
529
|
+
class Ae {
|
|
530
530
|
constructor(e = new I(
|
|
531
531
|
">",
|
|
532
532
|
"transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
|
|
@@ -547,12 +547,12 @@ class Ee {
|
|
|
547
547
|
this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = s, this.arrowExpandCollapseAll = o;
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
class
|
|
550
|
+
class Me {
|
|
551
551
|
constructor(e = new I("↑", "", ["ge-header-sorted-asc"]), t = new I("↓", "", ["ge-header-sorted-desc"]), s = new I("↑", "color:transparent;", [])) {
|
|
552
552
|
this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = s;
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
class
|
|
555
|
+
class qe {
|
|
556
556
|
constructor(e) {
|
|
557
557
|
this.domService = e;
|
|
558
558
|
}
|
|
@@ -672,7 +672,7 @@ class Je {
|
|
|
672
672
|
}
|
|
673
673
|
return this.domService.appendChild(e, l), l;
|
|
674
674
|
}
|
|
675
|
-
addSortedIcon(e, t = "", s = new
|
|
675
|
+
addSortedIcon(e, t = "", s = new Me(), o = -1) {
|
|
676
676
|
const i = this.domService.createElement("div");
|
|
677
677
|
this.domService.addClass(i, "ge-table-sorted-icon-div"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "top", "0"), this.domService.setStyle(i, "right", "0"), this.domService.setStyle(i, "width", "20px"), this.domService.setStyle(i, "background", "transparent"), this.domService.setStyle(i, "cursor", "pointer"), this.domService.setAttribute(i, "data-col-index", `${o}`), this.domService.setAttribute(i, "data-area", "header");
|
|
678
678
|
let r;
|
|
@@ -683,7 +683,7 @@ class Je {
|
|
|
683
683
|
this.domService.addClass(i, d);
|
|
684
684
|
return this.domService.appendChild(e, i), i;
|
|
685
685
|
}
|
|
686
|
-
addArrowDiv(e, t = "none", s = new
|
|
686
|
+
addArrowDiv(e, t = "none", s = new Ae(), o = -1, i = -1, r = "body") {
|
|
687
687
|
const l = this.domService.createElement("div");
|
|
688
688
|
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", `${o}`), this.domService.setAttribute(l, "data-col-index", `${i}`), this.domService.setAttribute(l, "data-area", `${r}`);
|
|
689
689
|
let n;
|
|
@@ -735,7 +735,7 @@ class Je {
|
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
737
|
const ne = (a) => a === "header" ? "header" : a === "footer" ? "footer" : "body";
|
|
738
|
-
class
|
|
738
|
+
class Ze {
|
|
739
739
|
constructor(e, t) {
|
|
740
740
|
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)) {
|
|
741
741
|
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"));
|
|
@@ -747,7 +747,7 @@ class qe {
|
|
|
747
747
|
}
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
|
-
class
|
|
750
|
+
class Qe {
|
|
751
751
|
constructor(e) {
|
|
752
752
|
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(
|
|
753
753
|
(t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
|
|
@@ -777,7 +777,7 @@ class Ze {
|
|
|
777
777
|
if (t - this.lastClicked < this.doubleClickDelay)
|
|
778
778
|
return;
|
|
779
779
|
this.lastClicked = t;
|
|
780
|
-
const s = new
|
|
780
|
+
const s = new Ze(e.target, this.tableScope);
|
|
781
781
|
if (s.action === "toggleExpandCollapseAll")
|
|
782
782
|
this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
|
|
783
783
|
else if (s.action === "toggleHeaderGroup")
|
|
@@ -879,7 +879,7 @@ class Ze {
|
|
|
879
879
|
}
|
|
880
880
|
}
|
|
881
881
|
}
|
|
882
|
-
class
|
|
882
|
+
class et {
|
|
883
883
|
constructor(e, t = [], s = -1) {
|
|
884
884
|
this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = s, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((o) => o.rendererMap[e]);
|
|
885
885
|
}
|
|
@@ -975,7 +975,7 @@ class Qe {
|
|
|
975
975
|
this.yPositions[t + 1] = this.getRowHeight(t) + this.yPositions[t];
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
|
-
class
|
|
978
|
+
class tt {
|
|
979
979
|
genericSortComparator(e, t, s) {
|
|
980
980
|
if (typeof e == "number" && typeof t == "number")
|
|
981
981
|
return s * (e - t);
|
|
@@ -993,9 +993,9 @@ class et {
|
|
|
993
993
|
return s * ("" + e).localeCompare("" + t);
|
|
994
994
|
}
|
|
995
995
|
}
|
|
996
|
-
class
|
|
996
|
+
class st extends et {
|
|
997
997
|
constructor(e, t, s, o = []) {
|
|
998
|
-
super(e, o, s), this.areaIdent = e, this.rows = t, this.defaultRowHeight = s, this.columnDefs = o, this.sorterService = new
|
|
998
|
+
super(e, o, s), this.areaIdent = e, this.rows = t, this.defaultRowHeight = s, this.columnDefs = o, this.sorterService = new tt(), this.filteredRows = [...t], this.properties = o.map((i) => i.property);
|
|
999
999
|
}
|
|
1000
1000
|
setRows(e) {
|
|
1001
1001
|
this.rows = e, this.filteredRows = [...e];
|
|
@@ -1052,7 +1052,7 @@ class tt extends Qe {
|
|
|
1052
1052
|
return o && t.length ? this.getPropertyValue(o, t) : o;
|
|
1053
1053
|
}
|
|
1054
1054
|
}
|
|
1055
|
-
class
|
|
1055
|
+
class ot {
|
|
1056
1056
|
constructor(e) {
|
|
1057
1057
|
this.tableScope = e;
|
|
1058
1058
|
}
|
|
@@ -1283,7 +1283,7 @@ class st {
|
|
|
1283
1283
|
}
|
|
1284
1284
|
setRows(e) {
|
|
1285
1285
|
const t = this.getBodyModel();
|
|
1286
|
-
t instanceof
|
|
1286
|
+
t instanceof st ? t.setRows(e) : console.warn("setRows<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ", typeof t);
|
|
1287
1287
|
}
|
|
1288
1288
|
reSort() {
|
|
1289
1289
|
this.tableScope.reSort();
|
|
@@ -1356,7 +1356,7 @@ class ce {
|
|
|
1356
1356
|
// }
|
|
1357
1357
|
// }
|
|
1358
1358
|
}
|
|
1359
|
-
class
|
|
1359
|
+
class it extends ce {
|
|
1360
1360
|
constructor(e) {
|
|
1361
1361
|
super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
|
|
1362
1362
|
}
|
|
@@ -1378,14 +1378,14 @@ class ot extends ce {
|
|
|
1378
1378
|
}
|
|
1379
1379
|
}
|
|
1380
1380
|
}
|
|
1381
|
-
class
|
|
1381
|
+
class rt {
|
|
1382
1382
|
constructor(e = "collapsed", t = [], s = !1, o = !1) {
|
|
1383
1383
|
this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = o;
|
|
1384
1384
|
}
|
|
1385
1385
|
}
|
|
1386
|
-
class
|
|
1386
|
+
class at extends ce {
|
|
1387
1387
|
constructor(e) {
|
|
1388
|
-
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new
|
|
1388
|
+
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new rt(), this.load();
|
|
1389
1389
|
}
|
|
1390
1390
|
collapsedExpandedStateGet() {
|
|
1391
1391
|
return this.collapsedExpandedState;
|
|
@@ -1417,7 +1417,7 @@ class rt extends ce {
|
|
|
1417
1417
|
this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
|
|
1418
1418
|
}
|
|
1419
1419
|
}
|
|
1420
|
-
class
|
|
1420
|
+
class lt extends ce {
|
|
1421
1421
|
constructor(e) {
|
|
1422
1422
|
super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
|
|
1423
1423
|
}
|
|
@@ -1443,7 +1443,7 @@ class F {
|
|
|
1443
1443
|
this.left = e, this.width = t, this.height = s, this.top = o, this.index = i;
|
|
1444
1444
|
}
|
|
1445
1445
|
}
|
|
1446
|
-
class
|
|
1446
|
+
class nt {
|
|
1447
1447
|
constructor(e, t, s, o) {
|
|
1448
1448
|
this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = o, this.scrollTop = 0, this.areaBodyWestGeo = new F(), this.areaBodyCenterGeo = new F(), this.areaBodyEastGeo = new F();
|
|
1449
1449
|
const i = this.hostElement;
|
|
@@ -1649,7 +1649,7 @@ class A {
|
|
|
1649
1649
|
return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
|
|
1650
1650
|
}
|
|
1651
1651
|
}
|
|
1652
|
-
class
|
|
1652
|
+
class ct {
|
|
1653
1653
|
constructor(e, t) {
|
|
1654
1654
|
this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
|
|
1655
1655
|
}
|
|
@@ -1682,22 +1682,22 @@ class nt {
|
|
|
1682
1682
|
return !1;
|
|
1683
1683
|
}
|
|
1684
1684
|
}
|
|
1685
|
-
class
|
|
1685
|
+
class dt {
|
|
1686
1686
|
constructor(e, t, s) {
|
|
1687
1687
|
this.header = e, this.body = t, this.footer = s;
|
|
1688
1688
|
}
|
|
1689
1689
|
}
|
|
1690
|
-
class
|
|
1690
|
+
class ht extends nt {
|
|
1691
1691
|
constructor(e, t, s, o) {
|
|
1692
1692
|
var r, l;
|
|
1693
1693
|
super(e, t, s, o), this.dragging = !1, this.editing = !1, this.storedColumnWidths = [], this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
|
|
1694
1694
|
header: [],
|
|
1695
1695
|
body: [],
|
|
1696
1696
|
footer: []
|
|
1697
|
-
}, this.tree = !1, this.colAndRowspanModels = new
|
|
1697
|
+
}, this.tree = !1, this.colAndRowspanModels = new dt(), this.firstVisibleRowIndex = -1, 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), re(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
|
|
1698
1698
|
(n) => {
|
|
1699
1699
|
var d;
|
|
1700
|
-
this.colAndRowspanModels[n] = new
|
|
1700
|
+
this.colAndRowspanModels[n] = new ct(t, t.getAreaModel(n)), (d = this.colAndRowspanModels[n]) == null || d.init();
|
|
1701
1701
|
}
|
|
1702
1702
|
);
|
|
1703
1703
|
}
|
|
@@ -2566,12 +2566,12 @@ class dt extends lt {
|
|
|
2566
2566
|
n.setAttribute(c, "data-col-index", `${t}`), n.setAttribute(c, "data-row-index", `${e}`), n.setAttribute(c, "data-area", "header"), n.setAttribute(c, "data-ge-action", "resize-column"), n.addClass(c, "ge-table-column-resize-handle"), n.setStyle(c, "display", "clip"), n.setStyle(c, "position", "absolute"), n.setStyle(c, "cursor", "col-resize"), n.setStyle(c, "left", `${s + i - d}px`), n.setStyle(c, "top", `${o}px`), n.setStyle(c, "width", `${d}px`), n.setStyle(c, "height", `${r}px`), n.appendChild(l, c);
|
|
2567
2567
|
}
|
|
2568
2568
|
}
|
|
2569
|
-
class
|
|
2569
|
+
class pt {
|
|
2570
2570
|
constructor(e, t) {
|
|
2571
2571
|
this.columnIndex = e, this.sortState = t;
|
|
2572
2572
|
}
|
|
2573
2573
|
}
|
|
2574
|
-
class
|
|
2574
|
+
class gt {
|
|
2575
2575
|
constructor(e) {
|
|
2576
2576
|
this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
|
|
2577
2577
|
}
|
|
@@ -2593,7 +2593,7 @@ class pt {
|
|
|
2593
2593
|
}
|
|
2594
2594
|
}
|
|
2595
2595
|
}
|
|
2596
|
-
class
|
|
2596
|
+
class ft {
|
|
2597
2597
|
constructor(e = -1, t = -1) {
|
|
2598
2598
|
this.rowIndex = e, this.columnIndex = t;
|
|
2599
2599
|
}
|
|
@@ -2603,10 +2603,10 @@ class de {
|
|
|
2603
2603
|
this.cells = e;
|
|
2604
2604
|
}
|
|
2605
2605
|
static createSingle(e, t) {
|
|
2606
|
-
return new de([new
|
|
2606
|
+
return new de([new ft(e, t)]);
|
|
2607
2607
|
}
|
|
2608
2608
|
}
|
|
2609
|
-
class
|
|
2609
|
+
class ut {
|
|
2610
2610
|
constructor(e) {
|
|
2611
2611
|
var t, s;
|
|
2612
2612
|
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);
|
|
@@ -2647,7 +2647,7 @@ class ft {
|
|
|
2647
2647
|
});
|
|
2648
2648
|
}
|
|
2649
2649
|
}
|
|
2650
|
-
class
|
|
2650
|
+
class mt {
|
|
2651
2651
|
get() {
|
|
2652
2652
|
return {
|
|
2653
2653
|
f2: "START_EDITING",
|
|
@@ -2667,7 +2667,7 @@ class ut {
|
|
|
2667
2667
|
};
|
|
2668
2668
|
}
|
|
2669
2669
|
}
|
|
2670
|
-
class
|
|
2670
|
+
class bt {
|
|
2671
2671
|
get() {
|
|
2672
2672
|
return {
|
|
2673
2673
|
f2: "START_EDITING",
|
|
@@ -2689,7 +2689,23 @@ class mt {
|
|
|
2689
2689
|
};
|
|
2690
2690
|
}
|
|
2691
2691
|
}
|
|
2692
|
-
|
|
2692
|
+
function St(a) {
|
|
2693
|
+
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).sort((e, t) => {
|
|
2694
|
+
const s = { cmd: 1, ctrl: 2, alt: 3, shift: 4 }, o = s[e] || 5, i = s[t] || 5;
|
|
2695
|
+
return o !== i ? o - i : e.localeCompare(t);
|
|
2696
|
+
}).join(" ");
|
|
2697
|
+
}
|
|
2698
|
+
function ue(a) {
|
|
2699
|
+
let e = a.key.toLowerCase();
|
|
2700
|
+
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")) {
|
|
2701
|
+
const s = a.code.replace("Numpad", "").toLowerCase();
|
|
2702
|
+
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;
|
|
2703
|
+
}
|
|
2704
|
+
a.code.match(/^F\d+$/) && (e = a.code.toLowerCase()), a.code.match(/^Digit\d+$/) && (e = a.code.replace(/Digit/g, ""));
|
|
2705
|
+
let t = "";
|
|
2706
|
+
return a.ctrlKey && (t += " ctrl"), a.altKey && (t += t + " alt"), a.shiftKey && (t += t + " shift"), a.metaKey && (t += t + " cmd"), St(t + " " + e);
|
|
2707
|
+
}
|
|
2708
|
+
class yt {
|
|
2693
2709
|
constructor(e) {
|
|
2694
2710
|
this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
|
|
2695
2711
|
}
|
|
@@ -2710,7 +2726,7 @@ class bt {
|
|
|
2710
2726
|
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));
|
|
2711
2727
|
}
|
|
2712
2728
|
assignPredefinedSystemShortcutMappings() {
|
|
2713
|
-
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new
|
|
2729
|
+
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new bt().get()) : Object.assign(this.shortcutActionIdMapping, new mt().get());
|
|
2714
2730
|
}
|
|
2715
2731
|
isMacintosh() {
|
|
2716
2732
|
return navigator.platform.indexOf("Mac") > -1;
|
|
@@ -2733,26 +2749,47 @@ class bt {
|
|
|
2733
2749
|
return t;
|
|
2734
2750
|
}
|
|
2735
2751
|
findEntity(e) {
|
|
2736
|
-
const t =
|
|
2737
|
-
this.isDebug() && console.debug("ShortcutService
|
|
2738
|
-
for (const s in this.shortcutActionIdMapping)
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2752
|
+
const t = ue(e);
|
|
2753
|
+
this.isDebug() && console.debug("ShortcutService shortcut :", t);
|
|
2754
|
+
for (const s in this.shortcutActionIdMapping)
|
|
2755
|
+
if (ue(e) === t)
|
|
2756
|
+
return this.isDebug() && console.debug("ShortcutService action :", this.shortcutActionIdMapping[s]), this.shortcutActionIdMapping[s];
|
|
2757
|
+
}
|
|
2758
|
+
// private areTokensEquals(tokens1: string[], tokens2: string[]): boolean {
|
|
2759
|
+
// if (tokens1.length !== tokens2.length) {
|
|
2760
|
+
// return false;
|
|
2761
|
+
// }
|
|
2762
|
+
// if (tokens1.length === 0) {
|
|
2763
|
+
// return false;
|
|
2764
|
+
// }
|
|
2765
|
+
// for (let i = 0; i < tokens1.length; i++) {
|
|
2766
|
+
// if (tokens1[i] !== tokens2[i]) {
|
|
2767
|
+
// return false;
|
|
2768
|
+
// }
|
|
2769
|
+
// }
|
|
2770
|
+
//
|
|
2771
|
+
// return true;
|
|
2772
|
+
// }
|
|
2773
|
+
//
|
|
2774
|
+
// private getTokenByEvent(evt: KeyboardEvent): string[] {
|
|
2775
|
+
// const tokens: string[] = [];
|
|
2776
|
+
// if (evt.altKey) {
|
|
2777
|
+
// tokens.push("alt");
|
|
2778
|
+
// }
|
|
2779
|
+
// if (evt.shiftKey) {
|
|
2780
|
+
// tokens.push("shift");
|
|
2781
|
+
// }
|
|
2782
|
+
// if (evt.ctrlKey) {
|
|
2783
|
+
// tokens.push("ctrl");
|
|
2784
|
+
// }
|
|
2785
|
+
// if (evt.metaKey) {
|
|
2786
|
+
// tokens.push("meta");
|
|
2787
|
+
// }
|
|
2788
|
+
// if (evt.code) {
|
|
2789
|
+
// tokens.push(evt.code.toLowerCase().replace(/key/g, ""));
|
|
2790
|
+
// }
|
|
2791
|
+
// return tokens.sort();
|
|
2792
|
+
// }
|
|
2756
2793
|
/**
|
|
2757
2794
|
* Retrieves the shortcut action mapping object.
|
|
2758
2795
|
*
|
|
@@ -2762,7 +2799,7 @@ class bt {
|
|
|
2762
2799
|
return this.shortcutActionIdMapping;
|
|
2763
2800
|
}
|
|
2764
2801
|
}
|
|
2765
|
-
class
|
|
2802
|
+
class me {
|
|
2766
2803
|
onCheckboxChanged(e) {
|
|
2767
2804
|
}
|
|
2768
2805
|
onContextmenu(e) {
|
|
@@ -2782,7 +2819,7 @@ class ue {
|
|
|
2782
2819
|
onFocusChanged(e) {
|
|
2783
2820
|
}
|
|
2784
2821
|
}
|
|
2785
|
-
class
|
|
2822
|
+
class Re {
|
|
2786
2823
|
setStyle(e, t, s) {
|
|
2787
2824
|
return e.style[t] = s, e;
|
|
2788
2825
|
}
|
|
@@ -2809,7 +2846,7 @@ class Me {
|
|
|
2809
2846
|
e.setAttribute(t, s);
|
|
2810
2847
|
}
|
|
2811
2848
|
}
|
|
2812
|
-
class
|
|
2849
|
+
class xt {
|
|
2813
2850
|
render(e, t, s, o, i, r, l) {
|
|
2814
2851
|
if (i.isEditable(t, s)) {
|
|
2815
2852
|
l.addClass(e, "ge-table-row-input-div");
|
|
@@ -2830,7 +2867,7 @@ class St {
|
|
|
2830
2867
|
}
|
|
2831
2868
|
}
|
|
2832
2869
|
}
|
|
2833
|
-
class
|
|
2870
|
+
class wt {
|
|
2834
2871
|
constructor(e = "none", t = "single") {
|
|
2835
2872
|
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1, this.silent = !1, this.listenerArr = [];
|
|
2836
2873
|
}
|
|
@@ -2912,7 +2949,7 @@ class yt {
|
|
|
2912
2949
|
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());
|
|
2913
2950
|
}
|
|
2914
2951
|
}
|
|
2915
|
-
class
|
|
2952
|
+
class vt {
|
|
2916
2953
|
constructor(e = "none") {
|
|
2917
2954
|
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1, this.listenerArr = [];
|
|
2918
2955
|
}
|
|
@@ -2949,7 +2986,7 @@ class xt {
|
|
|
2949
2986
|
return [this.rowIndex, this.columnIndex];
|
|
2950
2987
|
}
|
|
2951
2988
|
}
|
|
2952
|
-
class
|
|
2989
|
+
class Te {
|
|
2953
2990
|
constructor(e = new I(
|
|
2954
2991
|
"❯",
|
|
2955
2992
|
"",
|
|
@@ -2963,14 +3000,14 @@ class Re {
|
|
|
2963
3000
|
}
|
|
2964
3001
|
// `⊖ `, `⊕ `;
|
|
2965
3002
|
}
|
|
2966
|
-
const
|
|
2967
|
-
class
|
|
3003
|
+
const Ct = new wt(), Et = new vt("cell");
|
|
3004
|
+
class De {
|
|
2968
3005
|
constructor() {
|
|
2969
3006
|
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 = {
|
|
2970
3007
|
header: 34,
|
|
2971
3008
|
body: 34,
|
|
2972
3009
|
footer: 34
|
|
2973
|
-
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new
|
|
3010
|
+
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new Ae(), this.headerGroupOptions = new Te(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new Me(), this.sortOrder = ["asc", "desc"], this.resizeEventDebounceDelay = 500, this.getEditRenderer = (e, t) => new xt(), this.getSelectionModel = () => Ct, this.getFocusModel = () => Et;
|
|
2974
3011
|
}
|
|
2975
3012
|
}
|
|
2976
3013
|
const W = class W {
|
|
@@ -3058,16 +3095,16 @@ const W = class W {
|
|
|
3058
3095
|
W.columnSeparatorChar = " ", W.rowSeparatorChar = `
|
|
3059
3096
|
`;
|
|
3060
3097
|
let K = W;
|
|
3061
|
-
class
|
|
3098
|
+
class At {
|
|
3062
3099
|
constructor(e, t = 500) {
|
|
3063
|
-
this.tableScope = e, this.debounceDelay = t, new ResizeObserver(
|
|
3100
|
+
this.tableScope = e, this.debounceDelay = t, new ResizeObserver(Je(this.handleResize.bind(this), t)).observe(this.tableScope.hostElement);
|
|
3064
3101
|
}
|
|
3065
3102
|
handleResize(e) {
|
|
3066
3103
|
const t = e[0], { width: s } = t.contentRect;
|
|
3067
3104
|
this.tableScope.recalcColumnWidths(s);
|
|
3068
3105
|
}
|
|
3069
3106
|
}
|
|
3070
|
-
class
|
|
3107
|
+
class Mt {
|
|
3071
3108
|
/**
|
|
3072
3109
|
* Downloads a matrix data as an Excel file.
|
|
3073
3110
|
*
|
|
@@ -3173,14 +3210,14 @@ class Et {
|
|
|
3173
3210
|
return this.createZip(s);
|
|
3174
3211
|
}
|
|
3175
3212
|
}
|
|
3176
|
-
class he extends
|
|
3177
|
-
constructor(e, t, s, o, i, r = new K(), l = new
|
|
3213
|
+
class he extends ht {
|
|
3214
|
+
constructor(e, t, s, o, i, r = new K(), l = new Mt()) {
|
|
3178
3215
|
var c;
|
|
3179
|
-
if (super(e, t, new
|
|
3216
|
+
if (super(e, t, new qe(s), o), this.eventListener = i, this.copyService = r, this.excelService = l, this.licenseManager = B.getInstance(), this.selectionService = new ut(this), this.api = new ot(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), i || (this.eventListener = new me()), (c = this.tableOptions) != null && c.autoRestoreOptions) {
|
|
3180
3217
|
const h = this.tableOptions.autoRestoreOptions, p = h.getStorageKeyFn;
|
|
3181
|
-
p && (h.autoRestoreScrollPosition && (this.storeScrollPosStateService = new
|
|
3218
|
+
p && (h.autoRestoreScrollPosition && (this.storeScrollPosStateService = new it(p)), h.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new at(p)), h.autoRestoreSortingState && (this.storeSortingService = new lt(p)));
|
|
3182
3219
|
}
|
|
3183
|
-
this.mouseHandler = new
|
|
3220
|
+
this.mouseHandler = new Qe(this), this.inputHandler = new gt(this), this.resizeHandler = new At(this, o.resizeEventDebounceDelay), this.shortcutService = new yt(this), this.shortcutService.addListener(this.selectionService);
|
|
3184
3221
|
const n = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
3185
3222
|
n && n.addEventSelectionChangedListener(this);
|
|
3186
3223
|
const d = this.getFocusModel ? this.getFocusModel() : void 0;
|
|
@@ -3198,7 +3235,7 @@ class he extends dt {
|
|
|
3198
3235
|
*
|
|
3199
3236
|
* @return {TableScope} - The newly created TableScope instance.
|
|
3200
3237
|
*/
|
|
3201
|
-
static create(e, t, s = new
|
|
3238
|
+
static create(e, t, s = new De(), o = new me(), i = new Re(), r = new K()) {
|
|
3202
3239
|
return new he(e, t, i, s, o, r);
|
|
3203
3240
|
}
|
|
3204
3241
|
/**
|
|
@@ -3314,7 +3351,13 @@ class he extends dt {
|
|
|
3314
3351
|
* @return {void}
|
|
3315
3352
|
*/
|
|
3316
3353
|
contextmenu(e) {
|
|
3317
|
-
|
|
3354
|
+
var s, o;
|
|
3355
|
+
const t = Date.now();
|
|
3356
|
+
if (t - this.lastContextmenu < 50) {
|
|
3357
|
+
this.lastContextmenu = t, (s = e.originalEvent) == null || s.preventDefault(), (o = e.originalEvent) == null || o.stopImmediatePropagation();
|
|
3358
|
+
return;
|
|
3359
|
+
}
|
|
3360
|
+
this.lastContextmenu = t, this.eventListener.onContextmenu(e);
|
|
3318
3361
|
}
|
|
3319
3362
|
/**
|
|
3320
3363
|
* Toggles the expand or collapse state of all items in the body area model.
|
|
@@ -3396,7 +3439,7 @@ class he extends dt {
|
|
|
3396
3439
|
const o = this.tableModel.getColumnDef(s);
|
|
3397
3440
|
if (o != null && o.sortable && o.sortable()) {
|
|
3398
3441
|
e.preventDefault(), e.stopPropagation();
|
|
3399
|
-
const l = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, n = o.sortState ?? "", d = l[(l.indexOf(n) + 1) % l.length], c = new
|
|
3442
|
+
const l = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, n = o.sortState ?? "", d = l[(l.indexOf(n) + 1) % l.length], c = new pt(s, d);
|
|
3400
3443
|
this.tableModel.doSort([c]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((p) => p.sortState = ""), o.sortState = d), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([c]);
|
|
3401
3444
|
}
|
|
3402
3445
|
}
|
|
@@ -3829,9 +3872,9 @@ Y.themes = ["light", "combat", "paper", "blackboard"], Y.vars = {
|
|
|
3829
3872
|
--ge-table-drop-zone-bg: #758129;
|
|
3830
3873
|
}`
|
|
3831
3874
|
};
|
|
3832
|
-
let
|
|
3875
|
+
let be = Y;
|
|
3833
3876
|
const J = class J {
|
|
3834
|
-
constructor(e = new
|
|
3877
|
+
constructor(e = new Te()) {
|
|
3835
3878
|
this.headerGroupOptions = e;
|
|
3836
3879
|
}
|
|
3837
3880
|
render(e, t, s, o, i, r, l) {
|
|
@@ -3870,15 +3913,15 @@ const J = class J {
|
|
|
3870
3913
|
}
|
|
3871
3914
|
};
|
|
3872
3915
|
J.toggleHeaderGroup = "toggleHeaderGroup";
|
|
3873
|
-
let
|
|
3874
|
-
var
|
|
3875
|
-
const
|
|
3916
|
+
let Se = J;
|
|
3917
|
+
var Rt = /* @__PURE__ */ Xe("<div>");
|
|
3918
|
+
const kt = (a) => {
|
|
3876
3919
|
let e;
|
|
3877
|
-
const t =
|
|
3920
|
+
const t = Ee({
|
|
3878
3921
|
tableModel: null,
|
|
3879
|
-
tableOptions: new
|
|
3922
|
+
tableOptions: new De()
|
|
3880
3923
|
}, a);
|
|
3881
|
-
return
|
|
3924
|
+
return Pe(() => {
|
|
3882
3925
|
const s = {
|
|
3883
3926
|
onSelectionChanged(r) {
|
|
3884
3927
|
const l = new CustomEvent("selectionChanged", {
|
|
@@ -3943,7 +3986,7 @@ const Tt = (a) => {
|
|
|
3943
3986
|
});
|
|
3944
3987
|
e && e.dispatchEvent(l);
|
|
3945
3988
|
}
|
|
3946
|
-
}, o = new he(e, t.tableModel, new
|
|
3989
|
+
}, o = new he(e, t.tableModel, new Re(), t.tableOptions, s);
|
|
3947
3990
|
o.firstInit();
|
|
3948
3991
|
const i = new CustomEvent("tableReady", {
|
|
3949
3992
|
detail: o.getApi(),
|
|
@@ -3951,12 +3994,12 @@ const Tt = (a) => {
|
|
|
3951
3994
|
});
|
|
3952
3995
|
e && e.dispatchEvent(i), t.licenseKey && B.getInstance().setLicenseKey(t.licenseKey);
|
|
3953
3996
|
}), (() => {
|
|
3954
|
-
var s =
|
|
3955
|
-
return typeof o == "function" ?
|
|
3997
|
+
var s = Rt(), o = e;
|
|
3998
|
+
return typeof o == "function" ? Ke(o, s) : e = s, s;
|
|
3956
3999
|
})();
|
|
3957
4000
|
};
|
|
3958
4001
|
export {
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
4002
|
+
Tt as ComponentRendererWrapper,
|
|
4003
|
+
kt as GuiexpertTable,
|
|
4004
|
+
Dt as GuiexpertTableProps
|
|
3962
4005
|
};
|