@guiexpert/svelte-table 4.1.60 → 4.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 +208 -165
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var U = (n, e, t) =>
|
|
4
|
-
import { createEventDispatcher as
|
|
1
|
+
var ye = Object.defineProperty;
|
|
2
|
+
var xe = (n, e, t) => e in n ? ye(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var U = (n, e, t) => xe(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { createEventDispatcher as we, onMount as Ce } from "svelte";
|
|
5
5
|
function O() {
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function de(n) {
|
|
8
8
|
return n();
|
|
9
9
|
}
|
|
10
10
|
function ie() {
|
|
11
11
|
return /* @__PURE__ */ Object.create(null);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
n.forEach(
|
|
13
|
+
function z(n) {
|
|
14
|
+
n.forEach(de);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function he(n) {
|
|
17
17
|
return typeof n == "function";
|
|
18
18
|
}
|
|
19
19
|
function ve(n, e) {
|
|
20
20
|
return n != n ? e == e : n !== e || n && typeof n == "object" || typeof n == "function";
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function Ee(n) {
|
|
23
23
|
return Object.keys(n).length === 0;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function Ae(n, e, t) {
|
|
26
26
|
n.insertBefore(e, t || null);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function pe(n) {
|
|
29
29
|
n.parentNode && n.parentNode.removeChild(n);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Me(n) {
|
|
32
32
|
return document.createElement(n);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function Re(n, e, t) {
|
|
35
35
|
n.getAttribute(e) !== t && n.setAttribute(e, t);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function Te(n) {
|
|
38
38
|
return Array.from(n.childNodes);
|
|
39
39
|
}
|
|
40
40
|
function P(n, e, t, s) {
|
|
@@ -46,17 +46,17 @@ function $(n) {
|
|
|
46
46
|
}
|
|
47
47
|
const I = [], X = [];
|
|
48
48
|
let B = [];
|
|
49
|
-
const re = [],
|
|
49
|
+
const re = [], De = /* @__PURE__ */ Promise.resolve();
|
|
50
50
|
let K = !1;
|
|
51
|
-
function
|
|
52
|
-
K || (K = !0,
|
|
51
|
+
function ke() {
|
|
52
|
+
K || (K = !0, De.then(ge));
|
|
53
53
|
}
|
|
54
54
|
function Y(n) {
|
|
55
55
|
B.push(n);
|
|
56
56
|
}
|
|
57
57
|
const j = /* @__PURE__ */ new Set();
|
|
58
58
|
let F = 0;
|
|
59
|
-
function
|
|
59
|
+
function ge() {
|
|
60
60
|
if (F !== 0)
|
|
61
61
|
return;
|
|
62
62
|
const n = q;
|
|
@@ -64,7 +64,7 @@ function pe() {
|
|
|
64
64
|
try {
|
|
65
65
|
for (; F < I.length; ) {
|
|
66
66
|
const e = I[F];
|
|
67
|
-
F++, $(e),
|
|
67
|
+
F++, $(e), Fe(e.$$);
|
|
68
68
|
}
|
|
69
69
|
} catch (e) {
|
|
70
70
|
throw I.length = 0, F = 0, e;
|
|
@@ -80,36 +80,36 @@ function pe() {
|
|
|
80
80
|
re.pop()();
|
|
81
81
|
K = !1, j.clear(), $(n);
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function Fe(n) {
|
|
84
84
|
if (n.fragment !== null) {
|
|
85
|
-
n.update(),
|
|
85
|
+
n.update(), z(n.before_update);
|
|
86
86
|
const e = n.dirty;
|
|
87
87
|
n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, e), n.after_update.forEach(Y);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function Ie(n) {
|
|
91
91
|
const e = [], t = [];
|
|
92
92
|
B.forEach((s) => n.indexOf(s) === -1 ? e.push(s) : t.push(s)), t.forEach((s) => s()), B = e;
|
|
93
93
|
}
|
|
94
|
-
const
|
|
95
|
-
function
|
|
96
|
-
n && n.i && (
|
|
94
|
+
const Le = /* @__PURE__ */ new Set();
|
|
95
|
+
function Oe(n, e) {
|
|
96
|
+
n && n.i && (Le.delete(n), n.i(e));
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function Be(n, e, t) {
|
|
99
99
|
const { fragment: s, after_update: o } = n.$$;
|
|
100
100
|
s && s.m(e, t), Y(() => {
|
|
101
|
-
const i = n.$$.on_mount.map(
|
|
102
|
-
n.$$.on_destroy ? n.$$.on_destroy.push(...i) :
|
|
101
|
+
const i = n.$$.on_mount.map(de).filter(he);
|
|
102
|
+
n.$$.on_destroy ? n.$$.on_destroy.push(...i) : z(i), n.$$.on_mount = [];
|
|
103
103
|
}), o.forEach(Y);
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function Pe(n, e) {
|
|
106
106
|
const t = n.$$;
|
|
107
|
-
t.fragment !== null && (
|
|
107
|
+
t.fragment !== null && (Ie(t.after_update), z(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
110
|
-
n.$$.dirty[0] === -1 && (I.push(n),
|
|
109
|
+
function $e(n, e) {
|
|
110
|
+
n.$$.dirty[0] === -1 && (I.push(n), ke(), n.$$.dirty.fill(0)), n.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function _e(n, e, t, s, o, i, r = null, l = [-1]) {
|
|
113
113
|
const a = q;
|
|
114
114
|
$(n);
|
|
115
115
|
const c = n.$$ = {
|
|
@@ -137,18 +137,18 @@ function $e(n, e, t, s, o, i, r = null, l = [-1]) {
|
|
|
137
137
|
let h = !1;
|
|
138
138
|
if (c.ctx = t ? t(n, e.props || {}, (d, p, ...u) => {
|
|
139
139
|
const g = u.length ? u[0] : p;
|
|
140
|
-
return c.ctx && o(c.ctx[d], c.ctx[d] = g) && (!c.skip_bound && c.bound[d] && c.bound[d](g), h &&
|
|
141
|
-
}) : [], c.update(), h = !0,
|
|
140
|
+
return c.ctx && o(c.ctx[d], c.ctx[d] = g) && (!c.skip_bound && c.bound[d] && c.bound[d](g), h && $e(n, d)), p;
|
|
141
|
+
}) : [], c.update(), h = !0, z(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 = Te(e.target);
|
|
144
|
+
c.fragment && c.fragment.l(d), d.forEach(pe);
|
|
145
145
|
} else
|
|
146
146
|
c.fragment && c.fragment.c();
|
|
147
|
-
e.intro &&
|
|
147
|
+
e.intro && Oe(n.$$.fragment), Be(n, e.target, e.anchor), ge();
|
|
148
148
|
}
|
|
149
149
|
$(a);
|
|
150
150
|
}
|
|
151
|
-
class
|
|
151
|
+
class We {
|
|
152
152
|
constructor() {
|
|
153
153
|
/**
|
|
154
154
|
* ### PRIVATE API
|
|
@@ -169,7 +169,7 @@ class _e {
|
|
|
169
169
|
}
|
|
170
170
|
/** @returns {void} */
|
|
171
171
|
$destroy() {
|
|
172
|
-
|
|
172
|
+
Pe(this, 1), this.$destroy = O;
|
|
173
173
|
}
|
|
174
174
|
/**
|
|
175
175
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -178,7 +178,7 @@ class _e {
|
|
|
178
178
|
* @returns {() => void}
|
|
179
179
|
*/
|
|
180
180
|
$on(e, t) {
|
|
181
|
-
if (!
|
|
181
|
+
if (!he(t))
|
|
182
182
|
return O;
|
|
183
183
|
const s = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
184
184
|
return s.push(t), () => {
|
|
@@ -191,12 +191,12 @@ class _e {
|
|
|
191
191
|
* @returns {void}
|
|
192
192
|
*/
|
|
193
193
|
$set(e) {
|
|
194
|
-
this.$$set && !
|
|
194
|
+
this.$$set && !Ee(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 He = "4";
|
|
198
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(He);
|
|
199
|
+
function Ve(n, e = 500) {
|
|
200
200
|
let t = null;
|
|
201
201
|
return function(...s) {
|
|
202
202
|
t && window.clearTimeout(t), t = window.setTimeout(() => {
|
|
@@ -260,7 +260,7 @@ class D {
|
|
|
260
260
|
this.content = e, this.style = t, this.classes = s;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
class
|
|
263
|
+
class fe {
|
|
264
264
|
constructor(e = new D(
|
|
265
265
|
">",
|
|
266
266
|
"transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
|
|
@@ -281,12 +281,12 @@ class ge {
|
|
|
281
281
|
this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = s, this.arrowExpandCollapseAll = o;
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
|
-
class
|
|
284
|
+
class ue {
|
|
285
285
|
constructor(e = new D("↑", "", ["ge-header-sorted-asc"]), t = new D("↓", "", ["ge-header-sorted-desc"]), s = new D("↑", "color:transparent;", [])) {
|
|
286
286
|
this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = s;
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
class
|
|
289
|
+
class Ne {
|
|
290
290
|
constructor(e) {
|
|
291
291
|
this.domService = e;
|
|
292
292
|
}
|
|
@@ -406,7 +406,7 @@ class Ve {
|
|
|
406
406
|
}
|
|
407
407
|
return this.domService.appendChild(e, l), l;
|
|
408
408
|
}
|
|
409
|
-
addSortedIcon(e, t = "", s = new
|
|
409
|
+
addSortedIcon(e, t = "", s = new ue(), o = -1) {
|
|
410
410
|
const i = this.domService.createElement("div");
|
|
411
411
|
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");
|
|
412
412
|
let r;
|
|
@@ -417,7 +417,7 @@ class Ve {
|
|
|
417
417
|
this.domService.addClass(i, c);
|
|
418
418
|
return this.domService.appendChild(e, i), i;
|
|
419
419
|
}
|
|
420
|
-
addArrowDiv(e, t = "none", s = new
|
|
420
|
+
addArrowDiv(e, t = "none", s = new fe(), o = -1, i = -1, r = "body") {
|
|
421
421
|
const l = this.domService.createElement("div");
|
|
422
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", `${o}`), this.domService.setAttribute(l, "data-col-index", `${i}`), this.domService.setAttribute(l, "data-area", `${r}`);
|
|
423
423
|
let a;
|
|
@@ -469,7 +469,7 @@ class Ve {
|
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
471
|
const Q = (n) => n === "header" ? "header" : n === "footer" ? "footer" : "body";
|
|
472
|
-
class
|
|
472
|
+
class ze {
|
|
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"));
|
|
@@ -481,7 +481,7 @@ class Ge {
|
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
483
|
}
|
|
484
|
-
class
|
|
484
|
+
class Ge {
|
|
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))
|
|
@@ -511,7 +511,7 @@ class Ne {
|
|
|
511
511
|
if (t - this.lastClicked < this.doubleClickDelay)
|
|
512
512
|
return;
|
|
513
513
|
this.lastClicked = t;
|
|
514
|
-
const s = new
|
|
514
|
+
const s = new ze(e.target, this.tableScope);
|
|
515
515
|
if (s.action === "toggleExpandCollapseAll")
|
|
516
516
|
this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
|
|
517
517
|
else if (s.action === "toggleHeaderGroup")
|
|
@@ -613,7 +613,7 @@ class Ne {
|
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
|
-
class
|
|
616
|
+
class Ue {
|
|
617
617
|
constructor(e, t = [], s = -1) {
|
|
618
618
|
this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = s, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((o) => o.rendererMap[e]);
|
|
619
619
|
}
|
|
@@ -709,7 +709,7 @@ class ze {
|
|
|
709
709
|
this.yPositions[t + 1] = this.getRowHeight(t) + this.yPositions[t];
|
|
710
710
|
}
|
|
711
711
|
}
|
|
712
|
-
class
|
|
712
|
+
class je {
|
|
713
713
|
genericSortComparator(e, t, s) {
|
|
714
714
|
if (typeof e == "number" && typeof t == "number")
|
|
715
715
|
return s * (e - t);
|
|
@@ -727,9 +727,9 @@ class Ue {
|
|
|
727
727
|
return s * ("" + e).localeCompare("" + t);
|
|
728
728
|
}
|
|
729
729
|
}
|
|
730
|
-
class
|
|
730
|
+
class Xe extends Ue {
|
|
731
731
|
constructor(e, t, s, o = []) {
|
|
732
|
-
super(e, o, s), this.areaIdent = e, this.rows = t, this.defaultRowHeight = s, this.columnDefs = o, this.sorterService = new
|
|
732
|
+
super(e, o, s), this.areaIdent = e, this.rows = t, this.defaultRowHeight = s, this.columnDefs = o, this.sorterService = new je(), this.filteredRows = [...t], this.properties = o.map((i) => i.property);
|
|
733
733
|
}
|
|
734
734
|
setRows(e) {
|
|
735
735
|
this.rows = e, this.filteredRows = [...e];
|
|
@@ -786,7 +786,7 @@ class je extends ze {
|
|
|
786
786
|
return o && t.length ? this.getPropertyValue(o, t) : o;
|
|
787
787
|
}
|
|
788
788
|
}
|
|
789
|
-
class
|
|
789
|
+
class Ke {
|
|
790
790
|
constructor(e) {
|
|
791
791
|
this.tableScope = e;
|
|
792
792
|
}
|
|
@@ -1017,7 +1017,7 @@ class Xe {
|
|
|
1017
1017
|
}
|
|
1018
1018
|
setRows(e) {
|
|
1019
1019
|
const t = this.getBodyModel();
|
|
1020
|
-
t instanceof
|
|
1020
|
+
t instanceof Xe ? t.setRows(e) : console.warn("setRows<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ", typeof t);
|
|
1021
1021
|
}
|
|
1022
1022
|
reSort() {
|
|
1023
1023
|
this.tableScope.reSort();
|
|
@@ -1090,7 +1090,7 @@ class ee {
|
|
|
1090
1090
|
// }
|
|
1091
1091
|
// }
|
|
1092
1092
|
}
|
|
1093
|
-
class
|
|
1093
|
+
class Ye extends ee {
|
|
1094
1094
|
constructor(e) {
|
|
1095
1095
|
super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
|
|
1096
1096
|
}
|
|
@@ -1112,14 +1112,14 @@ class Ke extends ee {
|
|
|
1112
1112
|
}
|
|
1113
1113
|
}
|
|
1114
1114
|
}
|
|
1115
|
-
class
|
|
1115
|
+
class Je {
|
|
1116
1116
|
constructor(e = "collapsed", t = [], s = !1, o = !1) {
|
|
1117
1117
|
this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = o;
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
|
-
class
|
|
1120
|
+
class qe extends ee {
|
|
1121
1121
|
constructor(e) {
|
|
1122
|
-
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new
|
|
1122
|
+
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new Je(), this.load();
|
|
1123
1123
|
}
|
|
1124
1124
|
collapsedExpandedStateGet() {
|
|
1125
1125
|
return this.collapsedExpandedState;
|
|
@@ -1151,7 +1151,7 @@ class Je extends ee {
|
|
|
1151
1151
|
this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
|
|
1152
1152
|
}
|
|
1153
1153
|
}
|
|
1154
|
-
class
|
|
1154
|
+
class Ze extends ee {
|
|
1155
1155
|
constructor(e) {
|
|
1156
1156
|
super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
|
|
1157
1157
|
}
|
|
@@ -1177,7 +1177,7 @@ class T {
|
|
|
1177
1177
|
this.left = e, this.width = t, this.height = s, this.top = o, this.index = i;
|
|
1178
1178
|
}
|
|
1179
1179
|
}
|
|
1180
|
-
class
|
|
1180
|
+
class Qe {
|
|
1181
1181
|
constructor(e, t, s, o) {
|
|
1182
1182
|
this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = o, this.scrollTop = 0, this.areaBodyWestGeo = new T(), this.areaBodyCenterGeo = new T(), this.areaBodyEastGeo = new T();
|
|
1183
1183
|
const i = this.hostElement;
|
|
@@ -1383,7 +1383,7 @@ class E {
|
|
|
1383
1383
|
return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
|
|
1384
1384
|
}
|
|
1385
1385
|
}
|
|
1386
|
-
class
|
|
1386
|
+
class et {
|
|
1387
1387
|
constructor(e, t) {
|
|
1388
1388
|
this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
|
|
1389
1389
|
}
|
|
@@ -1416,22 +1416,22 @@ class Qe {
|
|
|
1416
1416
|
return !1;
|
|
1417
1417
|
}
|
|
1418
1418
|
}
|
|
1419
|
-
class
|
|
1419
|
+
class tt {
|
|
1420
1420
|
constructor(e, t, s) {
|
|
1421
1421
|
this.header = e, this.body = t, this.footer = s;
|
|
1422
1422
|
}
|
|
1423
1423
|
}
|
|
1424
|
-
class
|
|
1424
|
+
class st extends Qe {
|
|
1425
1425
|
constructor(e, t, s, o) {
|
|
1426
1426
|
var r, l;
|
|
1427
1427
|
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 = {
|
|
1428
1428
|
header: [],
|
|
1429
1429
|
body: [],
|
|
1430
1430
|
footer: []
|
|
1431
|
-
}, this.tree = !1, this.colAndRowspanModels = new
|
|
1431
|
+
}, this.tree = !1, this.colAndRowspanModels = new tt(), 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), J(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
|
|
1432
1432
|
(a) => {
|
|
1433
1433
|
var c;
|
|
1434
|
-
this.colAndRowspanModels[a] = new
|
|
1434
|
+
this.colAndRowspanModels[a] = new et(t, t.getAreaModel(a)), (c = this.colAndRowspanModels[a]) == null || c.init();
|
|
1435
1435
|
}
|
|
1436
1436
|
);
|
|
1437
1437
|
}
|
|
@@ -1693,10 +1693,10 @@ class tt extends Ze {
|
|
|
1693
1693
|
let p = t;
|
|
1694
1694
|
const u = this.tableModel.getColumnCount(), g = this.tableModel.getFixedRightColumnCount(), b = this.tableModel.getFixedLeftColumnCount();
|
|
1695
1695
|
for (let m = 0; m < d; m++) {
|
|
1696
|
-
const x = p, w = m === d - 1,
|
|
1697
|
-
if (x +
|
|
1696
|
+
const x = p, w = m === d - 1, v = this.tableModel.getRowHeight(e, m);
|
|
1697
|
+
if (x + v > 0) {
|
|
1698
1698
|
this.firstVisibleRowIndex = m;
|
|
1699
|
-
let y = { left: l, width: a, height:
|
|
1699
|
+
let y = { left: l, width: a, height: v, top: x, index: m }, S = this.dom.addRowDiv(o, y, m, e, "center");
|
|
1700
1700
|
const R = b;
|
|
1701
1701
|
if (this.adjustColumnsToRowParent({
|
|
1702
1702
|
areaIdent: e,
|
|
@@ -1709,7 +1709,7 @@ class tt extends Ze {
|
|
|
1709
1709
|
columnIndexEnd: u - g - 1,
|
|
1710
1710
|
verticalFixed: !1,
|
|
1711
1711
|
lastRowOfModel: w
|
|
1712
|
-
}), c.left > 0 && (y = { left: l, width: this.areaBodyWestGeo.width, height:
|
|
1712
|
+
}), c.left > 0 && (y = { left: l, width: this.areaBodyWestGeo.width, height: v, top: x, index: m }, S = this.dom.addRowDiv(s, y, m, e, "west"), this.adjustColumnsToRowParent({
|
|
1713
1713
|
areaIdent: e,
|
|
1714
1714
|
sideIdent: "west",
|
|
1715
1715
|
areaModel: h,
|
|
@@ -1720,7 +1720,7 @@ class tt extends Ze {
|
|
|
1720
1720
|
columnIndexEnd: R - 1,
|
|
1721
1721
|
verticalFixed: !0,
|
|
1722
1722
|
lastRowOfModel: w
|
|
1723
|
-
})), c.right > 0 && (y = { left: l, width: this.areaBodyEastGeo.width, height:
|
|
1723
|
+
})), c.right > 0 && (y = { left: l, width: this.areaBodyEastGeo.width, height: v, top: x, index: m }, S = this.dom.addRowDiv(i, y, m, e, "east"), this.adjustColumnsToRowParent({
|
|
1724
1724
|
areaIdent: e,
|
|
1725
1725
|
sideIdent: "east",
|
|
1726
1726
|
areaModel: h,
|
|
@@ -1746,23 +1746,23 @@ class tt extends Ze {
|
|
|
1746
1746
|
}
|
|
1747
1747
|
}
|
|
1748
1748
|
}
|
|
1749
|
-
if (p = p +
|
|
1749
|
+
if (p = p + v, p > r)
|
|
1750
1750
|
break;
|
|
1751
1751
|
}
|
|
1752
1752
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
|
|
1753
1753
|
const m = ((f = this.colAndRowspanModels[e]) == null ? void 0 : f.getRanges()) ?? [];
|
|
1754
1754
|
if (m.length)
|
|
1755
1755
|
for (const x of m) {
|
|
1756
|
-
let w = 0,
|
|
1756
|
+
let w = 0, v = o.child, y = "center";
|
|
1757
1757
|
if (x.c1 < b)
|
|
1758
|
-
|
|
1758
|
+
v = s.child, y = "west";
|
|
1759
1759
|
else if (g > 0 && x.c1 >= u - g)
|
|
1760
|
-
|
|
1760
|
+
v = i.child, y = "east";
|
|
1761
1761
|
else {
|
|
1762
1762
|
const S = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1763
1763
|
w = this.scrollFactorX * S - this.areaBodyWestGeo.width, y = "center";
|
|
1764
1764
|
}
|
|
1765
|
-
this.drawBigCell(x, w, t, h,
|
|
1765
|
+
this.drawBigCell(x, w, t, h, v, y);
|
|
1766
1766
|
}
|
|
1767
1767
|
}
|
|
1768
1768
|
}
|
|
@@ -1873,8 +1873,8 @@ class tt extends Ze {
|
|
|
1873
1873
|
const m = g, x = this.tableModel.getColumnWidth(f);
|
|
1874
1874
|
if (x > 0 && m + x > 0) {
|
|
1875
1875
|
let w = o.height;
|
|
1876
|
-
const
|
|
1877
|
-
|
|
1876
|
+
const v = s.getRowspanAt(r, f), y = s.getColspanAt(r, f);
|
|
1877
|
+
v > 1 && (w = this.getRowHeights(r, r + v - 1, s).reduce((A, M) => A + M, 0));
|
|
1878
1878
|
let S = x;
|
|
1879
1879
|
y > 1 && (S = this.getColumnWidths(f, f + y - 1).reduce((A, M) => A + M, 0));
|
|
1880
1880
|
let R = !1;
|
|
@@ -1943,15 +1943,15 @@ class tt extends Ze {
|
|
|
1943
1943
|
const u = this.editorRenderer && this.editorRendererRow === o && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(o, i), g = { left: r, width: l, height: a, top: c, index: i }, b = e.getRowByIndex(o);
|
|
1944
1944
|
let f = "none";
|
|
1945
1945
|
if (i === this.getTreeArrowColumnIndex() && W(b)) {
|
|
1946
|
-
const
|
|
1947
|
-
(oe =
|
|
1946
|
+
const C = b;
|
|
1947
|
+
(oe = C.children) != null && oe.length ? C.expanded ? f = "expanded" : f = "collapsed" : f = "hidden";
|
|
1948
1948
|
}
|
|
1949
1949
|
let x;
|
|
1950
1950
|
if (t === "header") {
|
|
1951
|
-
const
|
|
1952
|
-
(!(
|
|
1951
|
+
const C = this.tableModel.getColumnDef(i);
|
|
1952
|
+
(!(C != null && C.sortIconVisible) || C != null && C.sortIconVisible()) && (x = C == null ? void 0 : C.sortState);
|
|
1953
1953
|
}
|
|
1954
|
-
const w = e.getValueAt(o, i),
|
|
1954
|
+
const w = e.getValueAt(o, i), v = u ? "" : `${w}`, y = e.isRowChecked(o), S = this.dom.addColumnDiv(
|
|
1955
1955
|
{
|
|
1956
1956
|
parent: h,
|
|
1957
1957
|
geo: g,
|
|
@@ -1959,7 +1959,7 @@ class tt extends Ze {
|
|
|
1959
1959
|
columnIndex: i,
|
|
1960
1960
|
areaIdent: t,
|
|
1961
1961
|
sideIdent: s,
|
|
1962
|
-
text:
|
|
1962
|
+
text: v,
|
|
1963
1963
|
treeArrow: f,
|
|
1964
1964
|
tableOptions: this.tableOptions,
|
|
1965
1965
|
checkedType: y,
|
|
@@ -1973,14 +1973,14 @@ class tt extends Ze {
|
|
|
1973
1973
|
u && (M = u.render(S, o, i, t, e, w, this.dom.domService));
|
|
1974
1974
|
const _ = e.getCustomClassesAt(o, i);
|
|
1975
1975
|
if (_.length && this.dom.addClasses(_, S), this.dom.addColumnBorderDivs(this.tableOptions, h, g, t, s), d && this.dom.addHorizontalBorder({ left: r, width: l, height: a, top: c + a }, h), this.getFocusModel && t === "body") {
|
|
1976
|
-
const
|
|
1977
|
-
|
|
1976
|
+
const C = this.getFocusModel();
|
|
1977
|
+
C != null && C.hasFocus(o, i) && this.dom.addFocusBorderDivs(h, g, {});
|
|
1978
1978
|
}
|
|
1979
1979
|
t === "header" && this.dom.setAttribute(S, "data-ge-action", "drag-column");
|
|
1980
|
-
const
|
|
1981
|
-
if (
|
|
1982
|
-
for (const
|
|
1983
|
-
this.dom.setStyle(S,
|
|
1980
|
+
const G = e.getCustomStyleAt(o, i);
|
|
1981
|
+
if (G)
|
|
1982
|
+
for (const C in G)
|
|
1983
|
+
this.dom.setStyle(S, C, G[C]);
|
|
1984
1984
|
return [S, M];
|
|
1985
1985
|
}
|
|
1986
1986
|
/**
|
|
@@ -2160,8 +2160,8 @@ class tt extends Ze {
|
|
|
2160
2160
|
g && (x = g.render(m, c, l, t, i, u, this.dom.domService), x && this.cleanupFunctions[t].push(x));
|
|
2161
2161
|
const w = i.getCustomClassesAt(c, l);
|
|
2162
2162
|
w.length && this.dom.addClasses(w, m);
|
|
2163
|
-
const
|
|
2164
|
-
|
|
2163
|
+
const v = this.tableModel.getColumnDef(l);
|
|
2164
|
+
v && v.classes[t] && this.dom.addClasses(v.classes[t], m), this.dom.addColumnBorderDivs(this.tableOptions, a, p, t, o);
|
|
2165
2165
|
const y = i.getCustomStyleAt(c, l);
|
|
2166
2166
|
if (y)
|
|
2167
2167
|
for (const S in y)
|
|
@@ -2300,12 +2300,12 @@ class tt extends Ze {
|
|
|
2300
2300
|
a.setAttribute(h, "data-col-index", `${t}`), a.setAttribute(h, "data-row-index", `${e}`), a.setAttribute(h, "data-area", "header"), a.setAttribute(h, "data-ge-action", "resize-column"), a.addClass(h, "ge-table-column-resize-handle"), a.setStyle(h, "display", "clip"), a.setStyle(h, "position", "absolute"), a.setStyle(h, "cursor", "col-resize"), a.setStyle(h, "left", `${s + i - c}px`), a.setStyle(h, "top", `${o}px`), a.setStyle(h, "width", `${c}px`), a.setStyle(h, "height", `${r}px`), a.appendChild(l, h);
|
|
2301
2301
|
}
|
|
2302
2302
|
}
|
|
2303
|
-
class
|
|
2303
|
+
class ot {
|
|
2304
2304
|
constructor(e, t) {
|
|
2305
2305
|
this.columnIndex = e, this.sortState = t;
|
|
2306
2306
|
}
|
|
2307
2307
|
}
|
|
2308
|
-
class
|
|
2308
|
+
class it {
|
|
2309
2309
|
constructor(e) {
|
|
2310
2310
|
this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
|
|
2311
2311
|
}
|
|
@@ -2327,7 +2327,7 @@ class ot {
|
|
|
2327
2327
|
}
|
|
2328
2328
|
}
|
|
2329
2329
|
}
|
|
2330
|
-
class
|
|
2330
|
+
class rt {
|
|
2331
2331
|
constructor(e = -1, t = -1) {
|
|
2332
2332
|
this.rowIndex = e, this.columnIndex = t;
|
|
2333
2333
|
}
|
|
@@ -2337,10 +2337,10 @@ class te {
|
|
|
2337
2337
|
this.cells = e;
|
|
2338
2338
|
}
|
|
2339
2339
|
static createSingle(e, t) {
|
|
2340
|
-
return new te([new
|
|
2340
|
+
return new te([new rt(e, t)]);
|
|
2341
2341
|
}
|
|
2342
2342
|
}
|
|
2343
|
-
class
|
|
2343
|
+
class at {
|
|
2344
2344
|
constructor(e) {
|
|
2345
2345
|
var t, s;
|
|
2346
2346
|
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);
|
|
@@ -2381,7 +2381,7 @@ class rt {
|
|
|
2381
2381
|
});
|
|
2382
2382
|
}
|
|
2383
2383
|
}
|
|
2384
|
-
class
|
|
2384
|
+
class lt {
|
|
2385
2385
|
get() {
|
|
2386
2386
|
return {
|
|
2387
2387
|
f2: "START_EDITING",
|
|
@@ -2401,7 +2401,7 @@ class at {
|
|
|
2401
2401
|
};
|
|
2402
2402
|
}
|
|
2403
2403
|
}
|
|
2404
|
-
class
|
|
2404
|
+
class nt {
|
|
2405
2405
|
get() {
|
|
2406
2406
|
return {
|
|
2407
2407
|
f2: "START_EDITING",
|
|
@@ -2423,7 +2423,23 @@ class lt {
|
|
|
2423
2423
|
};
|
|
2424
2424
|
}
|
|
2425
2425
|
}
|
|
2426
|
-
|
|
2426
|
+
function ct(n) {
|
|
2427
|
+
return n.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) => {
|
|
2428
|
+
const s = { cmd: 1, ctrl: 2, alt: 3, shift: 4 }, o = s[e] || 5, i = s[t] || 5;
|
|
2429
|
+
return o !== i ? o - i : e.localeCompare(t);
|
|
2430
|
+
}).join(" ");
|
|
2431
|
+
}
|
|
2432
|
+
function ae(n) {
|
|
2433
|
+
let e = n.key.toLowerCase();
|
|
2434
|
+
if (e === " " && (e = "space"), e === "arrowleft" && (e = "left"), e === "arrowright" && (e = "right"), e === "arrowup" && (e = "up"), e === "arrowdown" && (e = "down"), e === "delete" && n.code === "Delete" && (e = "delete"), e === "backspace" && (e = "backspace"), e === "escape" && (e = "esc"), e === "return" && (e = "enter"), n.code.startsWith("Numpad")) {
|
|
2435
|
+
const s = n.code.replace("Numpad", "").toLowerCase();
|
|
2436
|
+
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;
|
|
2437
|
+
}
|
|
2438
|
+
n.code.match(/^F\d+$/) && (e = n.code.toLowerCase()), n.code.match(/^Digit\d+$/) && (e = n.code.replace(/Digit/g, ""));
|
|
2439
|
+
let t = "";
|
|
2440
|
+
return n.ctrlKey && (t += " ctrl"), n.altKey && (t += t + " alt"), n.shiftKey && (t += t + " shift"), n.metaKey && (t += t + " cmd"), ct(t + " " + e);
|
|
2441
|
+
}
|
|
2442
|
+
class dt {
|
|
2427
2443
|
constructor(e) {
|
|
2428
2444
|
this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
|
|
2429
2445
|
}
|
|
@@ -2444,7 +2460,7 @@ class nt {
|
|
|
2444
2460
|
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));
|
|
2445
2461
|
}
|
|
2446
2462
|
assignPredefinedSystemShortcutMappings() {
|
|
2447
|
-
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new
|
|
2463
|
+
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new nt().get()) : Object.assign(this.shortcutActionIdMapping, new lt().get());
|
|
2448
2464
|
}
|
|
2449
2465
|
isMacintosh() {
|
|
2450
2466
|
return navigator.platform.indexOf("Mac") > -1;
|
|
@@ -2467,26 +2483,47 @@ class nt {
|
|
|
2467
2483
|
return t;
|
|
2468
2484
|
}
|
|
2469
2485
|
findEntity(e) {
|
|
2470
|
-
const t =
|
|
2471
|
-
this.isDebug() && console.debug("ShortcutService
|
|
2472
|
-
for (const s in this.shortcutActionIdMapping)
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2486
|
+
const t = ae(e);
|
|
2487
|
+
this.isDebug() && console.debug("ShortcutService shortcut :", t);
|
|
2488
|
+
for (const s in this.shortcutActionIdMapping)
|
|
2489
|
+
if (ae(e) === t)
|
|
2490
|
+
return this.isDebug() && console.debug("ShortcutService action :", this.shortcutActionIdMapping[s]), this.shortcutActionIdMapping[s];
|
|
2491
|
+
}
|
|
2492
|
+
// private areTokensEquals(tokens1: string[], tokens2: string[]): boolean {
|
|
2493
|
+
// if (tokens1.length !== tokens2.length) {
|
|
2494
|
+
// return false;
|
|
2495
|
+
// }
|
|
2496
|
+
// if (tokens1.length === 0) {
|
|
2497
|
+
// return false;
|
|
2498
|
+
// }
|
|
2499
|
+
// for (let i = 0; i < tokens1.length; i++) {
|
|
2500
|
+
// if (tokens1[i] !== tokens2[i]) {
|
|
2501
|
+
// return false;
|
|
2502
|
+
// }
|
|
2503
|
+
// }
|
|
2504
|
+
//
|
|
2505
|
+
// return true;
|
|
2506
|
+
// }
|
|
2507
|
+
//
|
|
2508
|
+
// private getTokenByEvent(evt: KeyboardEvent): string[] {
|
|
2509
|
+
// const tokens: string[] = [];
|
|
2510
|
+
// if (evt.altKey) {
|
|
2511
|
+
// tokens.push("alt");
|
|
2512
|
+
// }
|
|
2513
|
+
// if (evt.shiftKey) {
|
|
2514
|
+
// tokens.push("shift");
|
|
2515
|
+
// }
|
|
2516
|
+
// if (evt.ctrlKey) {
|
|
2517
|
+
// tokens.push("ctrl");
|
|
2518
|
+
// }
|
|
2519
|
+
// if (evt.metaKey) {
|
|
2520
|
+
// tokens.push("meta");
|
|
2521
|
+
// }
|
|
2522
|
+
// if (evt.code) {
|
|
2523
|
+
// tokens.push(evt.code.toLowerCase().replace(/key/g, ""));
|
|
2524
|
+
// }
|
|
2525
|
+
// return tokens.sort();
|
|
2526
|
+
// }
|
|
2490
2527
|
/**
|
|
2491
2528
|
* Retrieves the shortcut action mapping object.
|
|
2492
2529
|
*
|
|
@@ -2496,7 +2533,7 @@ class nt {
|
|
|
2496
2533
|
return this.shortcutActionIdMapping;
|
|
2497
2534
|
}
|
|
2498
2535
|
}
|
|
2499
|
-
class
|
|
2536
|
+
class le {
|
|
2500
2537
|
onCheckboxChanged(e) {
|
|
2501
2538
|
}
|
|
2502
2539
|
onContextmenu(e) {
|
|
@@ -2516,7 +2553,7 @@ class ae {
|
|
|
2516
2553
|
onFocusChanged(e) {
|
|
2517
2554
|
}
|
|
2518
2555
|
}
|
|
2519
|
-
class
|
|
2556
|
+
class me {
|
|
2520
2557
|
setStyle(e, t, s) {
|
|
2521
2558
|
return e.style[t] = s, e;
|
|
2522
2559
|
}
|
|
@@ -2543,7 +2580,7 @@ class ue {
|
|
|
2543
2580
|
e.setAttribute(t, s);
|
|
2544
2581
|
}
|
|
2545
2582
|
}
|
|
2546
|
-
class
|
|
2583
|
+
class ht {
|
|
2547
2584
|
render(e, t, s, o, i, r, l) {
|
|
2548
2585
|
if (i.isEditable(t, s)) {
|
|
2549
2586
|
l.addClass(e, "ge-table-row-input-div");
|
|
@@ -2564,7 +2601,7 @@ class ct {
|
|
|
2564
2601
|
}
|
|
2565
2602
|
}
|
|
2566
2603
|
}
|
|
2567
|
-
class
|
|
2604
|
+
class pt {
|
|
2568
2605
|
constructor(e = "none", t = "single") {
|
|
2569
2606
|
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1, this.silent = !1, this.listenerArr = [];
|
|
2570
2607
|
}
|
|
@@ -2646,7 +2683,7 @@ class dt {
|
|
|
2646
2683
|
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());
|
|
2647
2684
|
}
|
|
2648
2685
|
}
|
|
2649
|
-
class
|
|
2686
|
+
class gt {
|
|
2650
2687
|
constructor(e = "none") {
|
|
2651
2688
|
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1, this.listenerArr = [];
|
|
2652
2689
|
}
|
|
@@ -2683,7 +2720,7 @@ class ht {
|
|
|
2683
2720
|
return [this.rowIndex, this.columnIndex];
|
|
2684
2721
|
}
|
|
2685
2722
|
}
|
|
2686
|
-
class
|
|
2723
|
+
class be {
|
|
2687
2724
|
constructor(e = new D(
|
|
2688
2725
|
"❯",
|
|
2689
2726
|
"",
|
|
@@ -2697,14 +2734,14 @@ class me {
|
|
|
2697
2734
|
}
|
|
2698
2735
|
// `⊖ `, `⊕ `;
|
|
2699
2736
|
}
|
|
2700
|
-
const
|
|
2701
|
-
class
|
|
2737
|
+
const ft = new pt(), ut = new gt("cell");
|
|
2738
|
+
class Se {
|
|
2702
2739
|
constructor() {
|
|
2703
2740
|
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 = {
|
|
2704
2741
|
header: 34,
|
|
2705
2742
|
body: 34,
|
|
2706
2743
|
footer: 34
|
|
2707
|
-
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new
|
|
2744
|
+
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new fe(), this.headerGroupOptions = new be(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new ue(), this.sortOrder = ["asc", "desc"], this.resizeEventDebounceDelay = 500, this.getEditRenderer = (e, t) => new ht(), this.getSelectionModel = () => ft, this.getFocusModel = () => ut;
|
|
2708
2745
|
}
|
|
2709
2746
|
}
|
|
2710
2747
|
const L = class L {
|
|
@@ -2792,16 +2829,16 @@ const L = class L {
|
|
|
2792
2829
|
L.columnSeparatorChar = " ", L.rowSeparatorChar = `
|
|
2793
2830
|
`;
|
|
2794
2831
|
let H = L;
|
|
2795
|
-
class
|
|
2832
|
+
class mt {
|
|
2796
2833
|
constructor(e, t = 500) {
|
|
2797
|
-
this.tableScope = e, this.debounceDelay = t, new ResizeObserver(
|
|
2834
|
+
this.tableScope = e, this.debounceDelay = t, new ResizeObserver(Ve(this.handleResize.bind(this), t)).observe(this.tableScope.hostElement);
|
|
2798
2835
|
}
|
|
2799
2836
|
handleResize(e) {
|
|
2800
2837
|
const t = e[0], { width: s } = t.contentRect;
|
|
2801
2838
|
this.tableScope.recalcColumnWidths(s);
|
|
2802
2839
|
}
|
|
2803
2840
|
}
|
|
2804
|
-
class
|
|
2841
|
+
class bt {
|
|
2805
2842
|
/**
|
|
2806
2843
|
* Downloads a matrix data as an Excel file.
|
|
2807
2844
|
*
|
|
@@ -2907,14 +2944,14 @@ class ut {
|
|
|
2907
2944
|
return this.createZip(s);
|
|
2908
2945
|
}
|
|
2909
2946
|
}
|
|
2910
|
-
class se extends
|
|
2911
|
-
constructor(e, t, s, o, i, r = new H(), l = new
|
|
2947
|
+
class se extends st {
|
|
2948
|
+
constructor(e, t, s, o, i, r = new H(), l = new bt()) {
|
|
2912
2949
|
var h;
|
|
2913
|
-
if (super(e, t, new
|
|
2950
|
+
if (super(e, t, new Ne(s), o), this.eventListener = i, this.copyService = r, this.excelService = l, this.licenseManager = k.getInstance(), this.selectionService = new at(this), this.api = new Ke(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 le()), (h = this.tableOptions) != null && h.autoRestoreOptions) {
|
|
2914
2951
|
const d = this.tableOptions.autoRestoreOptions, p = d.getStorageKeyFn;
|
|
2915
|
-
p && (d.autoRestoreScrollPosition && (this.storeScrollPosStateService = new
|
|
2952
|
+
p && (d.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Ye(p)), d.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new qe(p)), d.autoRestoreSortingState && (this.storeSortingService = new Ze(p)));
|
|
2916
2953
|
}
|
|
2917
|
-
this.mouseHandler = new
|
|
2954
|
+
this.mouseHandler = new Ge(this), this.inputHandler = new it(this), this.resizeHandler = new mt(this, o.resizeEventDebounceDelay), this.shortcutService = new dt(this), this.shortcutService.addListener(this.selectionService);
|
|
2918
2955
|
const a = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
2919
2956
|
a && a.addEventSelectionChangedListener(this);
|
|
2920
2957
|
const c = this.getFocusModel ? this.getFocusModel() : void 0;
|
|
@@ -2932,7 +2969,7 @@ class se extends tt {
|
|
|
2932
2969
|
*
|
|
2933
2970
|
* @return {TableScope} - The newly created TableScope instance.
|
|
2934
2971
|
*/
|
|
2935
|
-
static create(e, t, s = new
|
|
2972
|
+
static create(e, t, s = new Se(), o = new le(), i = new me(), r = new H()) {
|
|
2936
2973
|
return new se(e, t, i, s, o, r);
|
|
2937
2974
|
}
|
|
2938
2975
|
/**
|
|
@@ -3048,7 +3085,13 @@ class se extends tt {
|
|
|
3048
3085
|
* @return {void}
|
|
3049
3086
|
*/
|
|
3050
3087
|
contextmenu(e) {
|
|
3051
|
-
|
|
3088
|
+
var s, o;
|
|
3089
|
+
const t = Date.now();
|
|
3090
|
+
if (t - this.lastContextmenu < 50) {
|
|
3091
|
+
this.lastContextmenu = t, (s = e.originalEvent) == null || s.preventDefault(), (o = e.originalEvent) == null || o.stopImmediatePropagation();
|
|
3092
|
+
return;
|
|
3093
|
+
}
|
|
3094
|
+
this.lastContextmenu = t, this.eventListener.onContextmenu(e);
|
|
3052
3095
|
}
|
|
3053
3096
|
/**
|
|
3054
3097
|
* Toggles the expand or collapse state of all items in the body area model.
|
|
@@ -3130,7 +3173,7 @@ class se extends tt {
|
|
|
3130
3173
|
const o = this.tableModel.getColumnDef(s);
|
|
3131
3174
|
if (o != null && o.sortable && o.sortable()) {
|
|
3132
3175
|
e.preventDefault(), e.stopPropagation();
|
|
3133
|
-
const l = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, a = o.sortState ?? "", c = l[(l.indexOf(a) + 1) % l.length], h = new
|
|
3176
|
+
const l = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, a = o.sortState ?? "", c = l[(l.indexOf(a) + 1) % l.length], h = new ot(s, c);
|
|
3134
3177
|
this.tableModel.doSort([h]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((p) => p.sortState = ""), o.sortState = c), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([h]);
|
|
3135
3178
|
}
|
|
3136
3179
|
}
|
|
@@ -3563,15 +3606,15 @@ V.themes = ["light", "combat", "paper", "blackboard"], V.vars = {
|
|
|
3563
3606
|
--ge-table-drop-zone-bg: #758129;
|
|
3564
3607
|
}`
|
|
3565
3608
|
};
|
|
3566
|
-
let
|
|
3567
|
-
const
|
|
3568
|
-
constructor(e = new
|
|
3609
|
+
let ne = V;
|
|
3610
|
+
const N = class N {
|
|
3611
|
+
constructor(e = new be()) {
|
|
3569
3612
|
this.headerGroupOptions = e;
|
|
3570
3613
|
}
|
|
3571
3614
|
render(e, t, s, o, i, r, l) {
|
|
3572
3615
|
const a = r != null && r.data ? r.data : "";
|
|
3573
3616
|
if (r) {
|
|
3574
|
-
const { toggle: c, visibility: h, closed: d } = r, p = c ?
|
|
3617
|
+
const { toggle: c, visibility: h, closed: d } = r, p = c ? N.toggleHeaderGroup : "";
|
|
3575
3618
|
this.addText(e, o, t, s, a, p), c && h !== "always" && this.addArrowDiv(l, e, !d, t, s, o, p);
|
|
3576
3619
|
} else
|
|
3577
3620
|
this.addText(e, o, t, s, a, "");
|
|
@@ -3603,29 +3646,29 @@ const G = class G {
|
|
|
3603
3646
|
}
|
|
3604
3647
|
}
|
|
3605
3648
|
};
|
|
3606
|
-
|
|
3607
|
-
let
|
|
3608
|
-
function
|
|
3649
|
+
N.toggleHeaderGroup = "toggleHeaderGroup";
|
|
3650
|
+
let ce = N;
|
|
3651
|
+
function St(n) {
|
|
3609
3652
|
let e;
|
|
3610
3653
|
return {
|
|
3611
3654
|
c() {
|
|
3612
|
-
e =
|
|
3655
|
+
e = Me("div"), Re(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");
|
|
3613
3656
|
},
|
|
3614
3657
|
m(t, s) {
|
|
3615
|
-
|
|
3658
|
+
Ae(t, e, s), n[4](e);
|
|
3616
3659
|
},
|
|
3617
3660
|
p: O,
|
|
3618
3661
|
i: O,
|
|
3619
3662
|
o: O,
|
|
3620
3663
|
d(t) {
|
|
3621
|
-
t &&
|
|
3664
|
+
t && pe(e), n[4](null);
|
|
3622
3665
|
}
|
|
3623
3666
|
};
|
|
3624
3667
|
}
|
|
3625
|
-
function
|
|
3626
|
-
let { tableModel: s } = e, { tableOptions: o = new
|
|
3627
|
-
const l =
|
|
3628
|
-
|
|
3668
|
+
function yt(n, e, t) {
|
|
3669
|
+
let { tableModel: s } = e, { tableOptions: o = new Se() } = e, { licenseKey: i } = e, r;
|
|
3670
|
+
const l = we();
|
|
3671
|
+
Ce(() => {
|
|
3629
3672
|
const c = {
|
|
3630
3673
|
onSelectionChanged(d) {
|
|
3631
3674
|
l("selectionChanged", d);
|
|
@@ -3654,7 +3697,7 @@ function bt(n, e, t) {
|
|
|
3654
3697
|
onMouseMoved: (d) => {
|
|
3655
3698
|
l("mouseMoved", d);
|
|
3656
3699
|
}
|
|
3657
|
-
}, h = new se(r, s, new
|
|
3700
|
+
}, h = new se(r, s, new me(), o, c);
|
|
3658
3701
|
h.firstInit(), l("tableReady", h.getApi()), i && k.getInstance().setLicenseKey(i);
|
|
3659
3702
|
});
|
|
3660
3703
|
function a(c) {
|
|
@@ -3666,16 +3709,16 @@ function bt(n, e, t) {
|
|
|
3666
3709
|
"tableModel" in c && t(1, s = c.tableModel), "tableOptions" in c && t(2, o = c.tableOptions), "licenseKey" in c && t(3, i = c.licenseKey);
|
|
3667
3710
|
}, [r, s, o, i, a];
|
|
3668
3711
|
}
|
|
3669
|
-
class
|
|
3712
|
+
class Ct extends We {
|
|
3670
3713
|
constructor(e) {
|
|
3671
|
-
super(),
|
|
3714
|
+
super(), _e(this, e, yt, St, ve, {
|
|
3672
3715
|
tableModel: 1,
|
|
3673
3716
|
tableOptions: 2,
|
|
3674
3717
|
licenseKey: 3
|
|
3675
3718
|
});
|
|
3676
3719
|
}
|
|
3677
3720
|
}
|
|
3678
|
-
class
|
|
3721
|
+
class vt {
|
|
3679
3722
|
constructor(e) {
|
|
3680
3723
|
this.Component = e;
|
|
3681
3724
|
}
|
|
@@ -3697,6 +3740,6 @@ class wt {
|
|
|
3697
3740
|
}
|
|
3698
3741
|
}
|
|
3699
3742
|
export {
|
|
3700
|
-
|
|
3701
|
-
|
|
3743
|
+
vt as ComponentRendererWrapper,
|
|
3744
|
+
Ct as GuiexpertTable
|
|
3702
3745
|
};
|