@guiexpert/svelte-table 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +5 -5
- package/index.js +421 -368
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,155 +1,155 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var k = (l, e, t) => (
|
|
4
|
-
import { createEventDispatcher as
|
|
5
|
-
function
|
|
1
|
+
var pe = Object.defineProperty;
|
|
2
|
+
var ue = (l, e, t) => e in l ? pe(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t;
|
|
3
|
+
var k = (l, e, t) => (ue(l, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
+
import { createEventDispatcher as Se, onMount as ge } from "svelte";
|
|
5
|
+
function L() {
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function oe(l) {
|
|
8
8
|
return l();
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function te() {
|
|
11
11
|
return /* @__PURE__ */ Object.create(null);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
l.forEach(
|
|
13
|
+
function H(l) {
|
|
14
|
+
l.forEach(oe);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function le(l) {
|
|
17
17
|
return typeof l == "function";
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function fe(l, e) {
|
|
20
20
|
return l != l ? e == e : l !== e || l && typeof l == "object" || typeof l == "function";
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function me(l) {
|
|
23
23
|
return Object.keys(l).length === 0;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function be(l, e, t) {
|
|
26
26
|
l.insertBefore(e, t || null);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function re(l) {
|
|
29
29
|
l.parentNode && l.parentNode.removeChild(l);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function ye(l) {
|
|
32
32
|
return document.createElement(l);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function ve(l, e, t) {
|
|
35
35
|
t == null ? l.removeAttribute(e) : l.getAttribute(e) !== t && l.setAttribute(e, t);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function xe(l) {
|
|
38
38
|
return Array.from(l.childNodes);
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function _(l, e, t, s) {
|
|
41
41
|
t == null ? l.style.removeProperty(e) : l.style.setProperty(e, t, s ? "important" : "");
|
|
42
42
|
}
|
|
43
43
|
let z;
|
|
44
|
-
function
|
|
44
|
+
function B(l) {
|
|
45
45
|
z = l;
|
|
46
46
|
}
|
|
47
|
-
const
|
|
48
|
-
let
|
|
49
|
-
const
|
|
50
|
-
let
|
|
51
|
-
function
|
|
52
|
-
|
|
47
|
+
const O = [], G = [];
|
|
48
|
+
let $ = [];
|
|
49
|
+
const se = [], Ce = /* @__PURE__ */ Promise.resolve();
|
|
50
|
+
let N = !1;
|
|
51
|
+
function we() {
|
|
52
|
+
N || (N = !0, Ce.then(ne));
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
|
|
54
|
+
function j(l) {
|
|
55
|
+
$.push(l);
|
|
56
56
|
}
|
|
57
|
-
const
|
|
58
|
-
let
|
|
59
|
-
function
|
|
60
|
-
if (
|
|
57
|
+
const V = /* @__PURE__ */ new Set();
|
|
58
|
+
let F = 0;
|
|
59
|
+
function ne() {
|
|
60
|
+
if (F !== 0)
|
|
61
61
|
return;
|
|
62
62
|
const l = z;
|
|
63
63
|
do {
|
|
64
64
|
try {
|
|
65
|
-
for (;
|
|
66
|
-
const e =
|
|
67
|
-
|
|
65
|
+
for (; F < O.length; ) {
|
|
66
|
+
const e = O[F];
|
|
67
|
+
F++, B(e), Ee(e.$$);
|
|
68
68
|
}
|
|
69
69
|
} catch (e) {
|
|
70
|
-
throw
|
|
70
|
+
throw O.length = 0, F = 0, e;
|
|
71
71
|
}
|
|
72
|
-
for (
|
|
73
|
-
|
|
74
|
-
for (let e = 0; e <
|
|
75
|
-
const t =
|
|
76
|
-
|
|
72
|
+
for (B(null), O.length = 0, F = 0; G.length; )
|
|
73
|
+
G.pop()();
|
|
74
|
+
for (let e = 0; e < $.length; e += 1) {
|
|
75
|
+
const t = $[e];
|
|
76
|
+
V.has(t) || (V.add(t), t());
|
|
77
77
|
}
|
|
78
|
-
|
|
79
|
-
} while (
|
|
80
|
-
for (;
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
$.length = 0;
|
|
79
|
+
} while (O.length);
|
|
80
|
+
for (; se.length; )
|
|
81
|
+
se.pop()();
|
|
82
|
+
N = !1, V.clear(), B(l);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function Ee(l) {
|
|
85
85
|
if (l.fragment !== null) {
|
|
86
|
-
l.update(),
|
|
86
|
+
l.update(), H(l.before_update);
|
|
87
87
|
const e = l.dirty;
|
|
88
|
-
l.dirty = [-1], l.fragment && l.fragment.p(l.ctx, e), l.after_update.forEach(
|
|
88
|
+
l.dirty = [-1], l.fragment && l.fragment.p(l.ctx, e), l.after_update.forEach(j);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function Ae(l) {
|
|
92
92
|
const e = [], t = [];
|
|
93
|
-
|
|
93
|
+
$.forEach((s) => l.indexOf(s) === -1 ? e.push(s) : t.push(s)), t.forEach((s) => s()), $ = e;
|
|
94
94
|
}
|
|
95
|
-
const
|
|
96
|
-
function
|
|
97
|
-
l && l.i && (
|
|
95
|
+
const Me = /* @__PURE__ */ new Set();
|
|
96
|
+
function Re(l, e) {
|
|
97
|
+
l && l.i && (Me.delete(l), l.i(e));
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Te(l, e, t) {
|
|
100
100
|
const { fragment: s, after_update: i } = l.$$;
|
|
101
|
-
s && s.m(e, t),
|
|
102
|
-
const o = l.$$.on_mount.map(
|
|
103
|
-
l.$$.on_destroy ? l.$$.on_destroy.push(...o) :
|
|
104
|
-
}), i.forEach(
|
|
101
|
+
s && s.m(e, t), j(() => {
|
|
102
|
+
const o = l.$$.on_mount.map(oe).filter(le);
|
|
103
|
+
l.$$.on_destroy ? l.$$.on_destroy.push(...o) : H(o), l.$$.on_mount = [];
|
|
104
|
+
}), i.forEach(j);
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function De(l, e) {
|
|
107
107
|
const t = l.$$;
|
|
108
|
-
t.fragment !== null && (
|
|
108
|
+
t.fragment !== null && (Ae(t.after_update), H(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
l.$$.dirty[0] === -1 && (
|
|
110
|
+
function Ie(l, e) {
|
|
111
|
+
l.$$.dirty[0] === -1 && (O.push(l), we(), l.$$.dirty.fill(0)), l.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
const
|
|
115
|
-
|
|
113
|
+
function Fe(l, e, t, s, i, o, r = null, a = [-1]) {
|
|
114
|
+
const n = z;
|
|
115
|
+
B(l);
|
|
116
116
|
const d = l.$$ = {
|
|
117
117
|
fragment: null,
|
|
118
118
|
ctx: [],
|
|
119
119
|
// state
|
|
120
120
|
props: o,
|
|
121
|
-
update:
|
|
121
|
+
update: L,
|
|
122
122
|
not_equal: i,
|
|
123
|
-
bound:
|
|
123
|
+
bound: te(),
|
|
124
124
|
// lifecycle
|
|
125
125
|
on_mount: [],
|
|
126
126
|
on_destroy: [],
|
|
127
127
|
on_disconnect: [],
|
|
128
128
|
before_update: [],
|
|
129
129
|
after_update: [],
|
|
130
|
-
context: new Map(e.context || (
|
|
130
|
+
context: new Map(e.context || (n ? n.$$.context : [])),
|
|
131
131
|
// everything else
|
|
132
|
-
callbacks:
|
|
132
|
+
callbacks: te(),
|
|
133
133
|
dirty: a,
|
|
134
134
|
skip_bound: !1,
|
|
135
|
-
root: e.target ||
|
|
135
|
+
root: e.target || n.$$.root
|
|
136
136
|
};
|
|
137
|
-
|
|
137
|
+
r && r(d.root);
|
|
138
138
|
let h = !1;
|
|
139
|
-
if (d.ctx = t ? t(l, e.props || {}, (
|
|
140
|
-
const
|
|
141
|
-
return d.ctx && i(d.ctx[
|
|
142
|
-
}) : [], d.update(), h = !0,
|
|
139
|
+
if (d.ctx = t ? t(l, e.props || {}, (c, S, ...f) => {
|
|
140
|
+
const p = f.length ? f[0] : S;
|
|
141
|
+
return d.ctx && i(d.ctx[c], d.ctx[c] = p) && (!d.skip_bound && d.bound[c] && d.bound[c](p), h && Ie(l, c)), S;
|
|
142
|
+
}) : [], d.update(), h = !0, H(d.before_update), d.fragment = s ? s(d.ctx) : !1, e.target) {
|
|
143
143
|
if (e.hydrate) {
|
|
144
|
-
const
|
|
145
|
-
d.fragment && d.fragment.l(
|
|
144
|
+
const c = xe(e.target);
|
|
145
|
+
d.fragment && d.fragment.l(c), c.forEach(re);
|
|
146
146
|
} else
|
|
147
147
|
d.fragment && d.fragment.c();
|
|
148
|
-
e.intro &&
|
|
148
|
+
e.intro && Re(l.$$.fragment), Te(l, e.target, e.anchor), ne();
|
|
149
149
|
}
|
|
150
|
-
|
|
150
|
+
B(n);
|
|
151
151
|
}
|
|
152
|
-
class
|
|
152
|
+
class Oe {
|
|
153
153
|
constructor() {
|
|
154
154
|
/**
|
|
155
155
|
* ### PRIVATE API
|
|
@@ -170,7 +170,7 @@ class $e {
|
|
|
170
170
|
}
|
|
171
171
|
/** @returns {void} */
|
|
172
172
|
$destroy() {
|
|
173
|
-
|
|
173
|
+
De(this, 1), this.$destroy = L;
|
|
174
174
|
}
|
|
175
175
|
/**
|
|
176
176
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -179,8 +179,8 @@ class $e {
|
|
|
179
179
|
* @returns {() => void}
|
|
180
180
|
*/
|
|
181
181
|
$on(e, t) {
|
|
182
|
-
if (!
|
|
183
|
-
return
|
|
182
|
+
if (!le(t))
|
|
183
|
+
return L;
|
|
184
184
|
const s = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
185
185
|
return s.push(t), () => {
|
|
186
186
|
const i = s.indexOf(t);
|
|
@@ -192,23 +192,48 @@ class $e {
|
|
|
192
192
|
* @returns {void}
|
|
193
193
|
*/
|
|
194
194
|
$set(e) {
|
|
195
|
-
this.$$set && !
|
|
195
|
+
this.$$set && !me(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
const
|
|
199
|
-
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(
|
|
200
|
-
|
|
198
|
+
const Le = "4";
|
|
199
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Le);
|
|
200
|
+
class D {
|
|
201
|
+
// The constructor is private to prevent direct construction calls
|
|
202
|
+
// with the `new` operator
|
|
203
|
+
constructor() {
|
|
204
|
+
this.alreadySet = !1;
|
|
205
|
+
}
|
|
206
|
+
static getInstance() {
|
|
207
|
+
return D.instance || (D.instance = new D()), D.instance;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Method to set the license key for the application.
|
|
211
|
+
* A 'meta' element is created with content as 'guiexperttable=<license key>'
|
|
212
|
+
* and appended into the head section of the document
|
|
213
|
+
*
|
|
214
|
+
* @param {string} key - The license key to set for the application.
|
|
215
|
+
*
|
|
216
|
+
* @return {void} - This method does not return anything
|
|
217
|
+
*/
|
|
218
|
+
setLicenseKey(e) {
|
|
219
|
+
if (e && !this.alreadySet) {
|
|
220
|
+
const t = document.createElement("meta");
|
|
221
|
+
t.content = "license=" + e, t.name = "guiexperttable", document.getElementsByTagName("head")[0].appendChild(t), this.alreadySet = !0;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
function K(l) {
|
|
201
226
|
return l && l.type === "TreeRow";
|
|
202
227
|
}
|
|
203
228
|
function X(l) {
|
|
204
229
|
return l && l.type === "AreaModelTree";
|
|
205
230
|
}
|
|
206
|
-
class
|
|
207
|
-
constructor(e = -1, t = -1, s = -1, i = -1, o,
|
|
208
|
-
this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = i, this.areaIdent = o, this.sideIdent =
|
|
231
|
+
class Y {
|
|
232
|
+
constructor(e = -1, t = -1, s = -1, i = -1, o, r, a, n = 0, d = 0, h = 0, c = "") {
|
|
233
|
+
this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = i, this.areaIdent = o, this.sideIdent = r, this.originalEvent = a, this.clickCount = n, this.draggingX = d, this.draggingY = h, this.action = c;
|
|
209
234
|
}
|
|
210
235
|
clone() {
|
|
211
|
-
return new
|
|
236
|
+
return new Y(
|
|
212
237
|
this.rowIndex,
|
|
213
238
|
this.rowTop,
|
|
214
239
|
this.columnIndex,
|
|
@@ -223,25 +248,25 @@ class K {
|
|
|
223
248
|
);
|
|
224
249
|
}
|
|
225
250
|
}
|
|
226
|
-
class
|
|
251
|
+
class I {
|
|
227
252
|
constructor(e = ">", t = "", s = []) {
|
|
228
253
|
this.content = e, this.style = t, this.classes = s;
|
|
229
254
|
}
|
|
230
255
|
}
|
|
231
|
-
class
|
|
232
|
-
constructor(e = new
|
|
256
|
+
class ae {
|
|
257
|
+
constructor(e = new I(
|
|
233
258
|
">",
|
|
234
259
|
"transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
|
|
235
260
|
["gt-table-tree-arrow-expanded"]
|
|
236
|
-
), t = new
|
|
261
|
+
), t = new I(
|
|
237
262
|
">",
|
|
238
263
|
"",
|
|
239
264
|
["ge-table-tree-arrow-collapsed"]
|
|
240
|
-
), s = new
|
|
265
|
+
), s = new I(
|
|
241
266
|
">",
|
|
242
267
|
"color:transparent;",
|
|
243
268
|
["gt-table-tree-arrow-hidden"]
|
|
244
|
-
), i = new
|
|
269
|
+
), i = new I(
|
|
245
270
|
"↕",
|
|
246
271
|
"",
|
|
247
272
|
["gt-table-tree-arrow-expanded-all"]
|
|
@@ -249,12 +274,12 @@ class ne {
|
|
|
249
274
|
this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = s, this.arrowExpandCollapseAll = i;
|
|
250
275
|
}
|
|
251
276
|
}
|
|
252
|
-
class
|
|
253
|
-
constructor(e = new
|
|
277
|
+
class de {
|
|
278
|
+
constructor(e = new I("↑", "", ["ge-header-sorted-asc"]), t = new I("↓", "", ["ge-header-sorted-desc"]), s = new I("↑", "color:transparent;", [])) {
|
|
254
279
|
this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = s;
|
|
255
280
|
}
|
|
256
281
|
}
|
|
257
|
-
class
|
|
282
|
+
class $e {
|
|
258
283
|
constructor(e) {
|
|
259
284
|
this.domService = e;
|
|
260
285
|
}
|
|
@@ -327,83 +352,83 @@ class Oe {
|
|
|
327
352
|
const s = this.domService.createElement("div");
|
|
328
353
|
return this.addClass(e, s), this.domService.appendChild(t, s), s;
|
|
329
354
|
}
|
|
330
|
-
addRowDiv(e, t, s = -1, i, o,
|
|
331
|
-
const a = t.index ?? -1,
|
|
332
|
-
if (this.domService.addClass(
|
|
355
|
+
addRowDiv(e, t, s = -1, i, o, r = "") {
|
|
356
|
+
const a = t.index ?? -1, n = this.getDivOrCreateDiv(a, e);
|
|
357
|
+
if (this.domService.addClass(n, "ge-table-row-div"), this.domService.addClass(n, `ge-table-row-div-${t.index}`), i === "body" && o === "center") {
|
|
333
358
|
const d = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
334
|
-
this.domService.addClass(
|
|
359
|
+
this.domService.addClass(n, `ge-table-row-${d}`);
|
|
335
360
|
}
|
|
336
|
-
if (this.domService.setStyle(
|
|
337
|
-
const d = this.domService.createText(
|
|
338
|
-
this.domService.appendChild(
|
|
361
|
+
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) {
|
|
362
|
+
const d = this.domService.createText(r);
|
|
363
|
+
this.domService.appendChild(n, d);
|
|
339
364
|
}
|
|
340
|
-
return this.domService.appendChild(e.child,
|
|
365
|
+
return this.domService.appendChild(e.child, n), n;
|
|
341
366
|
}
|
|
342
|
-
addColumnDiv(e, t, s = -1, i = -1, o,
|
|
343
|
-
const S = d == null ? void 0 : d.treeOptions, f = d == null ? void 0 : d.showCheckboxWihoutExtraColumn,
|
|
344
|
-
this.domService.addClass(
|
|
367
|
+
addColumnDiv(e, t, s = -1, i = -1, o, r, a = "", n, d, h = void 0, c) {
|
|
368
|
+
const S = d == null ? void 0 : d.treeOptions, f = d == null ? void 0 : d.showCheckboxWihoutExtraColumn, p = this.domService.createElement("div");
|
|
369
|
+
this.domService.addClass(p, "ge-table-col-div"), this.domService.addClass(p, `ge-table-col-div-${t.index}`), this.domService.setAttribute(p, "data-col-index", `${t.index}`), this.domService.setAttribute(p, "data-row-index", `${s}`), this.domService.setAttribute(p, "data-area", `${o}`);
|
|
345
370
|
const m = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
346
|
-
if (o === "body" &&
|
|
347
|
-
const g =
|
|
348
|
-
this.addLabelDiv(
|
|
371
|
+
if (o === "body" && r === "center" && this.domService.addClass(p, `ge-table-column-${m}`), this.domService.setStyle(p, "display", "clip"), this.domService.setStyle(p, "position", "absolute"), this.domService.setStyle(p, "left", `${t.left}px`), this.domService.setStyle(p, "top", `${t.top}px`), this.domService.setStyle(p, "width", `${t.width}px`), this.domService.setStyle(p, "height", `${t.height}px`), n && n !== "none" && (this.domService.addClass(p, "ge-table-col-tree"), this.addArrowDiv(p, n, S, s, i, o)), f && i === 0 && h && this.addCheckboxToDiv(p, h, o, s), a) {
|
|
372
|
+
const g = n !== "none" && i === 0;
|
|
373
|
+
this.addLabelDiv(p, a, g, s, i, o);
|
|
349
374
|
}
|
|
350
|
-
return
|
|
375
|
+
return c && this.addSortedIcon(p, c, d == null ? void 0 : d.sortedOptions, i), this.domService.appendChild(e, p), p;
|
|
351
376
|
}
|
|
352
377
|
addCheckboxToDiv(e, t, s, i) {
|
|
353
|
-
const o = this.domService.createElement("div"),
|
|
378
|
+
const o = this.domService.createElement("div"), r = t === "full" ? "checked" : "";
|
|
354
379
|
return o.innerHTML = `
|
|
355
380
|
<input
|
|
356
381
|
type="checkbox"
|
|
357
382
|
data-area="${s}"
|
|
358
383
|
data-row-index="${i}"
|
|
359
384
|
data-input-type="checkbox"
|
|
360
|
-
${
|
|
385
|
+
${r}
|
|
361
386
|
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;
|
|
362
387
|
}
|
|
363
|
-
addLabelDiv(e, t = "", s = !1, i = -1, o = -1,
|
|
388
|
+
addLabelDiv(e, t = "", s = !1, i = -1, o = -1, r = "body") {
|
|
364
389
|
const a = this.domService.createElement("div");
|
|
365
|
-
if (this.domService.addClass(a, "ge-table-label-div"), this.domService.setStyle(a, "position", "relative"), this.domService.setStyle(a, "background", "transparent"), this.domService.setStyle(a, "width", "100%"), this.domService.setStyle(a, "height", "100%"), this.domService.setAttribute(a, "data-row-index", `${i}`), this.domService.setAttribute(a, "data-col-index", `${o}`), this.domService.setAttribute(a, "data-area", `${
|
|
390
|
+
if (this.domService.addClass(a, "ge-table-label-div"), this.domService.setStyle(a, "position", "relative"), this.domService.setStyle(a, "background", "transparent"), this.domService.setStyle(a, "width", "100%"), this.domService.setStyle(a, "height", "100%"), this.domService.setAttribute(a, "data-row-index", `${i}`), this.domService.setAttribute(a, "data-col-index", `${o}`), this.domService.setAttribute(a, "data-area", `${r}`), t)
|
|
366
391
|
if (s) {
|
|
367
|
-
const
|
|
368
|
-
this.domService.appendChild(a,
|
|
392
|
+
const n = this.domService.createText(t);
|
|
393
|
+
this.domService.appendChild(a, n);
|
|
369
394
|
} else {
|
|
370
|
-
const
|
|
371
|
-
this.domService.appendChild(a,
|
|
395
|
+
const n = this.domService.createElement("div");
|
|
396
|
+
this.domService.appendChild(a, n);
|
|
372
397
|
const d = this.domService.createText(t);
|
|
373
|
-
this.domService.addClass(
|
|
398
|
+
this.domService.addClass(n, "ge-table-label"), this.domService.appendChild(n, d), this.domService.setAttribute(n, "data-row-index", `${i}`), this.domService.setAttribute(n, "data-col-index", `${o}`), this.domService.setAttribute(n, "data-area", `${r}`);
|
|
374
399
|
}
|
|
375
400
|
return this.domService.appendChild(e, a), a;
|
|
376
401
|
}
|
|
377
|
-
addSortedIcon(e, t = "", s = new
|
|
402
|
+
addSortedIcon(e, t = "", s = new de(), i = -1) {
|
|
378
403
|
const o = this.domService.createElement("div");
|
|
379
404
|
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");
|
|
380
|
-
let
|
|
381
|
-
t === "asc" ?
|
|
382
|
-
const a =
|
|
383
|
-
this.domService.appendChild(o,
|
|
384
|
-
for (const d of
|
|
405
|
+
let r;
|
|
406
|
+
t === "asc" ? r = s.iconAsc : t === "desc" ? r = s.iconDesc : r = s.iconPlaceholder;
|
|
407
|
+
const a = r.content, n = this.domService.createText(a);
|
|
408
|
+
this.domService.appendChild(o, n), r.style && this.applyStyleString(o, r.style);
|
|
409
|
+
for (const d of r.classes)
|
|
385
410
|
this.domService.addClass(o, d);
|
|
386
411
|
return this.domService.appendChild(e, o), o;
|
|
387
412
|
}
|
|
388
|
-
addArrowDiv(e, t = "none", s = new
|
|
413
|
+
addArrowDiv(e, t = "none", s = new ae(), i = -1, o = -1, r = "body") {
|
|
389
414
|
const a = this.domService.createElement("div");
|
|
390
|
-
this.domService.addClass(a, "ge-table-tree-arrow-div"), this.domService.setStyle(a, "display", "inline-block"), this.domService.setStyle(a, "position", ""), this.domService.setStyle(a, "width", "20px"), this.domService.setStyle(a, "background", "transparent"), this.domService.setStyle(a, "cursor", "pointer"), this.domService.setAttribute(a, "data-row-index", `${i}`), this.domService.setAttribute(a, "data-col-index", `${o}`), this.domService.setAttribute(a, "data-area", `${
|
|
391
|
-
let
|
|
392
|
-
t === "expanded" ?
|
|
393
|
-
const d =
|
|
394
|
-
this.domService.appendChild(a, h),
|
|
395
|
-
for (const
|
|
396
|
-
this.domService.addClass(a,
|
|
415
|
+
this.domService.addClass(a, "ge-table-tree-arrow-div"), this.domService.setStyle(a, "display", "inline-block"), this.domService.setStyle(a, "position", ""), this.domService.setStyle(a, "width", "20px"), this.domService.setStyle(a, "background", "transparent"), this.domService.setStyle(a, "cursor", "pointer"), this.domService.setAttribute(a, "data-row-index", `${i}`), this.domService.setAttribute(a, "data-col-index", `${o}`), this.domService.setAttribute(a, "data-area", `${r}`);
|
|
416
|
+
let n;
|
|
417
|
+
t === "expanded" ? n = s.arrowExpanded : t === "collapsed" ? n = s.arrowCollapsed : n = s.arrowPlaceholder;
|
|
418
|
+
const d = n.content, h = this.domService.createText(d);
|
|
419
|
+
this.domService.appendChild(a, h), n.style && this.applyStyleString(a, n.style);
|
|
420
|
+
for (const c of n.classes)
|
|
421
|
+
this.domService.addClass(a, c);
|
|
397
422
|
return this.domService.appendChild(e, a), a;
|
|
398
423
|
}
|
|
399
424
|
addColumnBorderDivs(e, t, s, i, o) {
|
|
400
425
|
if (e.verticalBorderVisible) {
|
|
401
|
-
const
|
|
402
|
-
this.addVerticalBorder(s, t,
|
|
426
|
+
const r = `ge-table-${i}-${o}-vertical-border`;
|
|
427
|
+
this.addVerticalBorder(s, t, r);
|
|
403
428
|
}
|
|
404
429
|
if (e.horizontalBorderVisible) {
|
|
405
|
-
const
|
|
406
|
-
this.addHorizontalBorder(s, t,
|
|
430
|
+
const r = `ge-table-${i}-${o}-horizontal-border`;
|
|
431
|
+
this.addHorizontalBorder(s, t, r);
|
|
407
432
|
}
|
|
408
433
|
return t;
|
|
409
434
|
}
|
|
@@ -426,8 +451,8 @@ class Oe {
|
|
|
426
451
|
applyStyleString(e, t) {
|
|
427
452
|
const s = t.split(";").map((i) => i.trim()).filter((i) => i);
|
|
428
453
|
for (const i of s) {
|
|
429
|
-
const [o,
|
|
430
|
-
this.domService.setStyle(e, o.trim(),
|
|
454
|
+
const [o, r] = i.split(":");
|
|
455
|
+
this.domService.setStyle(e, o.trim(), r.trim());
|
|
431
456
|
}
|
|
432
457
|
}
|
|
433
458
|
getDivOrCreateDiv(e, t) {
|
|
@@ -435,20 +460,20 @@ class Oe {
|
|
|
435
460
|
return s ? (s.innerText = "", s) : (s = this.domService.createElement("div"), t.cache[e] = s, s);
|
|
436
461
|
}
|
|
437
462
|
}
|
|
438
|
-
const
|
|
439
|
-
class
|
|
463
|
+
const q = (l) => l === "header" ? "header" : l === "footer" ? "footer" : "body";
|
|
464
|
+
class _e {
|
|
440
465
|
constructor(e, t) {
|
|
441
466
|
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)) {
|
|
442
467
|
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"));
|
|
443
468
|
const s = e.getAttribute("data-area");
|
|
444
|
-
if (s && (this.areaIdent =
|
|
469
|
+
if (s && (this.areaIdent = q(s), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
|
|
445
470
|
const i = e;
|
|
446
471
|
this.value = i.value;
|
|
447
472
|
}
|
|
448
473
|
}
|
|
449
474
|
}
|
|
450
475
|
}
|
|
451
|
-
class
|
|
476
|
+
class Be {
|
|
452
477
|
constructor(e) {
|
|
453
478
|
this.tableScope = e, this.expandedAll = !0, this.mouseDown = !1, this.dragging = !1, 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(
|
|
454
479
|
(t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
|
|
@@ -474,12 +499,12 @@ class _e {
|
|
|
474
499
|
* @return {void}
|
|
475
500
|
*/
|
|
476
501
|
onHostElementClicked(e) {
|
|
477
|
-
const t = new
|
|
502
|
+
const t = new _e(e.target, this.tableScope);
|
|
478
503
|
if (t.action === "toggleExpandCollapseAll")
|
|
479
504
|
this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
|
|
480
505
|
else if (t.inputType === "checkbox" && t.areaIdent)
|
|
481
506
|
this.tableScope.toggleRowCheckbox(t.rowIdx, t.colIdx, t.areaIdent), e.preventDefault(), e.stopPropagation();
|
|
482
|
-
else if (
|
|
507
|
+
else if (K(t.row) && t.areaModel) {
|
|
483
508
|
const s = t.colIdx === this.getArrowColumnIndex() && e.altKey, i = t.className.includes("ge-table-tree-arrow-div");
|
|
484
509
|
if (console.info(i, s), s || i) {
|
|
485
510
|
e.preventDefault(), e.stopPropagation();
|
|
@@ -501,14 +526,14 @@ class _e {
|
|
|
501
526
|
*/
|
|
502
527
|
onHostElementDblClicked(e) {
|
|
503
528
|
if (e.target instanceof HTMLElement) {
|
|
504
|
-
const t = e.target, s = t.getAttribute("data-area"), i =
|
|
529
|
+
const t = e.target, s = t.getAttribute("data-area"), i = q(s), o = Number(t.getAttribute("data-row-index")), r = Number(t.getAttribute("data-col-index")), a = this.tableScope.tableModel.getAreaModel(i);
|
|
505
530
|
if (s && i === "header")
|
|
506
|
-
this.tableScope.tableModel.isSortable(
|
|
531
|
+
this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, o, r));
|
|
507
532
|
else if (t.getAttribute("data-row-index")) {
|
|
508
|
-
const
|
|
509
|
-
if (s && i === "body" && a.isEditable(o,
|
|
533
|
+
const n = a.getRowByIndex(o);
|
|
534
|
+
if (s && i === "body" && a.isEditable(o, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(o, r)), K(n) && r === this.getArrowColumnIndex()) {
|
|
510
535
|
e.preventDefault(), e.stopPropagation();
|
|
511
|
-
const d =
|
|
536
|
+
const d = n;
|
|
512
537
|
d.expanded = !d.expanded, "recalcVisibleTreeRows" in a && a.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(d);
|
|
513
538
|
}
|
|
514
539
|
}
|
|
@@ -534,11 +559,11 @@ class _e {
|
|
|
534
559
|
* @returns {void}
|
|
535
560
|
*/
|
|
536
561
|
updateCollapsedExpandedState(e) {
|
|
537
|
-
var s, i, o,
|
|
562
|
+
var s, i, o, r, a;
|
|
538
563
|
const t = (i = (s = this.tableScope.tableOptions) == null ? void 0 : s.autoRestoreOptions) == null ? void 0 : i.getRowId;
|
|
539
564
|
if (t) {
|
|
540
|
-
const
|
|
541
|
-
d ? (
|
|
565
|
+
const n = (o = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : o.collapsedExpandedStateGet().mode, d = n === "collapsed" && !e.expanded || n === "expanded" && e.expanded, h = n === "collapsed" && e.expanded || n === "expanded" && !e.expanded, c = t(e.data);
|
|
566
|
+
d ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(c) : h && ((a = this.tableScope.storeStateCollapsedExpandService) == null || a.collapsedStateIdsRemove(c));
|
|
542
567
|
}
|
|
543
568
|
}
|
|
544
569
|
getArrowColumnIndex() {
|
|
@@ -574,7 +599,7 @@ class _e {
|
|
|
574
599
|
}
|
|
575
600
|
}
|
|
576
601
|
}
|
|
577
|
-
class
|
|
602
|
+
class We {
|
|
578
603
|
constructor(e) {
|
|
579
604
|
this.tableScope = e;
|
|
580
605
|
}
|
|
@@ -600,21 +625,23 @@ class Be {
|
|
|
600
625
|
/**
|
|
601
626
|
* Scrolls the table body to the specified pixel coordinates.
|
|
602
627
|
*
|
|
603
|
-
* @param {number}
|
|
604
|
-
* @param {number}
|
|
628
|
+
* @param {number} px - The horizontal pixel coordinate to scroll to. Defaults to 0.
|
|
629
|
+
* @param {number} py - The vertical pixel coordinate to scroll to. Defaults to 0.
|
|
605
630
|
* @return {void}
|
|
606
631
|
*/
|
|
607
632
|
scrollToPixel(e = 0, t = 0) {
|
|
633
|
+
this.tableScope.scrollToPixel(e, t);
|
|
608
634
|
}
|
|
609
635
|
/**
|
|
610
636
|
* Scrolls to the specified index in both horizontal and vertical directions.
|
|
611
637
|
*
|
|
612
|
-
* @param {number}
|
|
613
|
-
* @param {number}
|
|
638
|
+
* @param {number} indexX - The index of the column to scroll to in the horizontal direction. Default is 0.
|
|
639
|
+
* @param {number} indexY - The index of the row to scroll to in the vertical direction. Default is 0.
|
|
614
640
|
*
|
|
615
641
|
* @return undefined
|
|
616
642
|
*/
|
|
617
643
|
scrollToIndex(e = 0, t = 0) {
|
|
644
|
+
this.tableScope.scrollToIndex(e, t);
|
|
618
645
|
}
|
|
619
646
|
/**
|
|
620
647
|
* Sets whether the header is visible or not.
|
|
@@ -679,7 +706,7 @@ class Be {
|
|
|
679
706
|
this.tableScope.repaint();
|
|
680
707
|
}
|
|
681
708
|
}
|
|
682
|
-
class
|
|
709
|
+
class U {
|
|
683
710
|
constructor(e) {
|
|
684
711
|
this.getStorageKeyFn = e;
|
|
685
712
|
}
|
|
@@ -690,9 +717,9 @@ class q {
|
|
|
690
717
|
for (const i of [...s]) {
|
|
691
718
|
const [
|
|
692
719
|
o,
|
|
693
|
-
|
|
720
|
+
r
|
|
694
721
|
] = i;
|
|
695
|
-
t[o] =
|
|
722
|
+
t[o] = r;
|
|
696
723
|
}
|
|
697
724
|
}
|
|
698
725
|
return t;
|
|
@@ -704,8 +731,8 @@ class q {
|
|
|
704
731
|
if (i) {
|
|
705
732
|
const o = i + e;
|
|
706
733
|
if ((t + "").includes("Map")) {
|
|
707
|
-
const
|
|
708
|
-
this.persistItem(o,
|
|
734
|
+
const r = this.autoConvertMapToObject(t);
|
|
735
|
+
this.persistItem(o, r);
|
|
709
736
|
} else
|
|
710
737
|
this.persistItem(o, t);
|
|
711
738
|
}
|
|
@@ -754,7 +781,7 @@ class q {
|
|
|
754
781
|
// }
|
|
755
782
|
// }
|
|
756
783
|
}
|
|
757
|
-
class
|
|
784
|
+
class He extends U {
|
|
758
785
|
constructor(e) {
|
|
759
786
|
super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
|
|
760
787
|
}
|
|
@@ -776,14 +803,14 @@ class We extends q {
|
|
|
776
803
|
}
|
|
777
804
|
}
|
|
778
805
|
}
|
|
779
|
-
class
|
|
806
|
+
class Pe {
|
|
780
807
|
constructor(e = "collapsed", t = [], s = !1, i = !1) {
|
|
781
808
|
this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = i;
|
|
782
809
|
}
|
|
783
810
|
}
|
|
784
|
-
class ke extends
|
|
811
|
+
class ke extends U {
|
|
785
812
|
constructor(e) {
|
|
786
|
-
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new
|
|
813
|
+
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new Pe(), this.load();
|
|
787
814
|
}
|
|
788
815
|
collapsedExpandedStateGet() {
|
|
789
816
|
return this.collapsedExpandedState;
|
|
@@ -815,7 +842,7 @@ class ke extends q {
|
|
|
815
842
|
this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
|
|
816
843
|
}
|
|
817
844
|
}
|
|
818
|
-
class
|
|
845
|
+
class Ve extends U {
|
|
819
846
|
constructor(e) {
|
|
820
847
|
super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
|
|
821
848
|
}
|
|
@@ -842,7 +869,7 @@ class T {
|
|
|
842
869
|
this.left = e, this.width = t, this.height = s, this.top = i, this.index = o;
|
|
843
870
|
}
|
|
844
871
|
}
|
|
845
|
-
class
|
|
872
|
+
class Ge {
|
|
846
873
|
constructor(e, t, s, i) {
|
|
847
874
|
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();
|
|
848
875
|
const o = this.hostElement;
|
|
@@ -1028,7 +1055,7 @@ class M {
|
|
|
1028
1055
|
return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
|
|
1029
1056
|
}
|
|
1030
1057
|
}
|
|
1031
|
-
class
|
|
1058
|
+
class Ne {
|
|
1032
1059
|
constructor(e, t) {
|
|
1033
1060
|
this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
|
|
1034
1061
|
}
|
|
@@ -1039,12 +1066,12 @@ class Ge {
|
|
|
1039
1066
|
const e = this.areaModel.getRowCount(), t = this.tableModel.getColumnCount();
|
|
1040
1067
|
for (let s = 0; s < e; s++)
|
|
1041
1068
|
for (let i = 0; i < t; i++) {
|
|
1042
|
-
let o = this.areaModel.getColspanAt(s, i),
|
|
1043
|
-
if (o > 1 ||
|
|
1044
|
-
o === 0 && (o = 1),
|
|
1069
|
+
let o = this.areaModel.getColspanAt(s, i), r = this.areaModel.getRowspanAt(s, i);
|
|
1070
|
+
if (o > 1 || r > 1) {
|
|
1071
|
+
o === 0 && (o = 1), r === 0 && (r = 1);
|
|
1045
1072
|
const a = this.areaModel.hasOwnProperty("gammaCells");
|
|
1046
1073
|
this.colAndRowspanRanges.push(
|
|
1047
|
-
new M(s, i, s +
|
|
1074
|
+
new M(s, i, s + r - 1, i + o - 1, a)
|
|
1048
1075
|
);
|
|
1049
1076
|
}
|
|
1050
1077
|
}
|
|
@@ -1061,22 +1088,22 @@ class Ge {
|
|
|
1061
1088
|
return !1;
|
|
1062
1089
|
}
|
|
1063
1090
|
}
|
|
1064
|
-
class
|
|
1091
|
+
class je {
|
|
1065
1092
|
constructor(e, t, s) {
|
|
1066
1093
|
this.header = e, this.body = t, this.footer = s;
|
|
1067
1094
|
}
|
|
1068
1095
|
}
|
|
1069
|
-
class
|
|
1096
|
+
class Ke extends Ge {
|
|
1070
1097
|
constructor(e, t, s, i) {
|
|
1071
|
-
var
|
|
1098
|
+
var r, a;
|
|
1072
1099
|
super(e, t, s, i), this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
|
|
1073
1100
|
header: [],
|
|
1074
1101
|
body: [],
|
|
1075
1102
|
footer: []
|
|
1076
|
-
}, this.tree = !1, this.colAndRowspanModels = new
|
|
1077
|
-
(
|
|
1103
|
+
}, this.tree = !1, this.colAndRowspanModels = new je(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.editing = !1, this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (r = this.tableOptions) != null && r.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (a = this.tableOptions) != null && a.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), X(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
|
|
1104
|
+
(n) => {
|
|
1078
1105
|
var d;
|
|
1079
|
-
this.colAndRowspanModels[
|
|
1106
|
+
this.colAndRowspanModels[n] = new Ne(t, t.getAreaModel(n)), (d = this.colAndRowspanModels[n]) == null || d.init();
|
|
1080
1107
|
}
|
|
1081
1108
|
);
|
|
1082
1109
|
}
|
|
@@ -1196,20 +1223,20 @@ class je extends Ve {
|
|
|
1196
1223
|
}
|
|
1197
1224
|
adjustArea(e, t = 0) {
|
|
1198
1225
|
var g;
|
|
1199
|
-
const s = this.getArea(e, "west"), i = this.getArea(e, "center"), o = this.getArea(e, "east"),
|
|
1226
|
+
const s = this.getArea(e, "west"), i = this.getArea(e, "center"), o = this.getArea(e, "east"), r = i.child.clientHeight;
|
|
1200
1227
|
s.child.innerText = "", i.child.innerText = "", o.child.innerText = "";
|
|
1201
|
-
const a = 0,
|
|
1228
|
+
const a = 0, n = this.areaBodyCenterGeo.width, d = this.tableModel.getPadding(), h = this.tableModel.getAreaModel(e), c = h.getRowCount();
|
|
1202
1229
|
for (; this.cleanupFunctions[e].length; ) {
|
|
1203
1230
|
const u = this.cleanupFunctions[e].shift();
|
|
1204
1231
|
u && u();
|
|
1205
1232
|
}
|
|
1206
1233
|
let S = t;
|
|
1207
|
-
const f = this.tableModel.getColumnCount(),
|
|
1208
|
-
for (let u = 0; u <
|
|
1209
|
-
const w = S, x = u ===
|
|
1234
|
+
const f = this.tableModel.getColumnCount(), p = this.tableModel.getFixedRightColumnCount(), m = this.tableModel.getFixedLeftColumnCount();
|
|
1235
|
+
for (let u = 0; u < c; u++) {
|
|
1236
|
+
const w = S, x = u === c - 1, C = this.tableModel.getRowHeight(e, u);
|
|
1210
1237
|
if (w + C > 0) {
|
|
1211
1238
|
this.firstVisibleRowIndex = u;
|
|
1212
|
-
let y = { left: a, width:
|
|
1239
|
+
let y = { left: a, width: n, height: C, top: w, index: u }, v = this.dom.addRowDiv(i, y, u, e, "center");
|
|
1213
1240
|
const E = m;
|
|
1214
1241
|
if (this.adjustColumnsToRowParent({
|
|
1215
1242
|
areaIdent: e,
|
|
@@ -1219,7 +1246,7 @@ class je extends Ve {
|
|
|
1219
1246
|
parent: v,
|
|
1220
1247
|
rowIndex: u,
|
|
1221
1248
|
columnIndexStart: E,
|
|
1222
|
-
columnIndexEnd: f -
|
|
1249
|
+
columnIndexEnd: f - p - 1,
|
|
1223
1250
|
verticalFixed: !1,
|
|
1224
1251
|
lastRowOfModel: x
|
|
1225
1252
|
}), d.left > 0 && (y = { left: a, width: this.areaBodyWestGeo.width, height: C, top: w, index: u }, v = this.dom.addRowDiv(s, y, u, e, "west"), this.adjustColumnsToRowParent({
|
|
@@ -1240,11 +1267,11 @@ class je extends Ve {
|
|
|
1240
1267
|
geo: y,
|
|
1241
1268
|
parent: v,
|
|
1242
1269
|
rowIndex: u,
|
|
1243
|
-
columnIndexStart: f -
|
|
1270
|
+
columnIndexStart: f - p,
|
|
1244
1271
|
columnIndexEnd: f - 1,
|
|
1245
1272
|
verticalFixed: !0,
|
|
1246
1273
|
lastRowOfModel: x
|
|
1247
|
-
})), e === "header" && this.tree && u ===
|
|
1274
|
+
})), e === "header" && this.tree && u === c - 1) {
|
|
1248
1275
|
const A = this.dom.applyStyle(
|
|
1249
1276
|
this.dom.setAttribute(
|
|
1250
1277
|
this.dom.addDiv(v, new T(16, 20, 20, 8)),
|
|
@@ -1254,12 +1281,12 @@ class je extends Ve {
|
|
|
1254
1281
|
{ cursor: "pointer" }
|
|
1255
1282
|
), R = this.tableOptions.treeOptions.arrowExpandCollapseAll;
|
|
1256
1283
|
if (R) {
|
|
1257
|
-
const
|
|
1258
|
-
this.dom.domService.appendChild(A,
|
|
1284
|
+
const W = this.dom.domService.createText(R.content);
|
|
1285
|
+
this.dom.domService.appendChild(A, W), R.style && this.dom.applyStyleString(A, R.style);
|
|
1259
1286
|
}
|
|
1260
1287
|
}
|
|
1261
1288
|
}
|
|
1262
|
-
if (S = S + C, S >
|
|
1289
|
+
if (S = S + C, S > r)
|
|
1263
1290
|
break;
|
|
1264
1291
|
}
|
|
1265
1292
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
|
|
@@ -1269,7 +1296,7 @@ class je extends Ve {
|
|
|
1269
1296
|
let x = 0, C = i.child, y = "center";
|
|
1270
1297
|
if (w.c1 < m)
|
|
1271
1298
|
C = s.child, y = "west";
|
|
1272
|
-
else if (
|
|
1299
|
+
else if (p > 0 && w.c1 >= f - p)
|
|
1273
1300
|
C = o.child, y = "east";
|
|
1274
1301
|
else {
|
|
1275
1302
|
const v = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
@@ -1289,45 +1316,45 @@ class je extends Ve {
|
|
|
1289
1316
|
* @param sideIdent SideIdent (west,center,east)
|
|
1290
1317
|
* @protected
|
|
1291
1318
|
*/
|
|
1292
|
-
drawBigCell(e, t, s, i, o,
|
|
1293
|
-
const a = s + this.getRowHeights(0, e.r1 - 1, i).reduce((g, u) => g + u, 0),
|
|
1319
|
+
drawBigCell(e, t, s, i, o, r) {
|
|
1320
|
+
const a = s + this.getRowHeights(0, e.r1 - 1, i).reduce((g, u) => g + u, 0), n = this.tableModel.getColumnCount(), d = this.tableModel.getFixedRightColumnCount();
|
|
1294
1321
|
let h = 0;
|
|
1295
|
-
d > 0 && e.c1 >=
|
|
1296
|
-
const
|
|
1297
|
-
let
|
|
1322
|
+
d > 0 && e.c1 >= n - d && (h = n - d);
|
|
1323
|
+
const c = t + this.getColumnWidths(h, e.c1 - 1).reduce((g, u) => g + u, 0), S = this.getRowHeights(e.r1, e.r2, i).reduce((g, u) => g + u, 0), f = this.getColumnWidths(e.c1, e.c2).reduce((g, u) => g + u, 0);
|
|
1324
|
+
let p = !1;
|
|
1298
1325
|
const m = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
1299
|
-
m && (
|
|
1326
|
+
m && (p = m.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? (console.info("TODO here", e), this.renderCell({
|
|
1300
1327
|
areaModel: i,
|
|
1301
1328
|
areaIdent: i.areaIdent,
|
|
1302
|
-
sideIdent:
|
|
1329
|
+
sideIdent: r,
|
|
1303
1330
|
rowIndex: e.r1,
|
|
1304
1331
|
columnIndex: e.c1,
|
|
1305
|
-
left:
|
|
1332
|
+
left: c,
|
|
1306
1333
|
top: a,
|
|
1307
1334
|
width: f,
|
|
1308
1335
|
height: S,
|
|
1309
1336
|
parent: o,
|
|
1310
|
-
cellSelected:
|
|
1337
|
+
cellSelected: p,
|
|
1311
1338
|
lastRowOfModel: !0,
|
|
1312
1339
|
gammaRange: e.gammaRange
|
|
1313
1340
|
})) : this.renderCell({
|
|
1314
1341
|
areaModel: i,
|
|
1315
1342
|
areaIdent: i.areaIdent,
|
|
1316
|
-
sideIdent:
|
|
1343
|
+
sideIdent: r,
|
|
1317
1344
|
rowIndex: e.r1,
|
|
1318
1345
|
columnIndex: e.c1,
|
|
1319
|
-
left:
|
|
1346
|
+
left: c,
|
|
1320
1347
|
top: a,
|
|
1321
1348
|
width: f,
|
|
1322
1349
|
height: S,
|
|
1323
1350
|
parent: o,
|
|
1324
|
-
cellSelected:
|
|
1351
|
+
cellSelected: p,
|
|
1325
1352
|
lastRowOfModel: !0,
|
|
1326
1353
|
gammaRange: e.gammaRange
|
|
1327
1354
|
}), i.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1328
1355
|
rowIndex: e.r1,
|
|
1329
1356
|
columnIndex: e.c1,
|
|
1330
|
-
cellLeft:
|
|
1357
|
+
cellLeft: c,
|
|
1331
1358
|
cellTop: a,
|
|
1332
1359
|
cellWidth: f,
|
|
1333
1360
|
cellHeight: S,
|
|
@@ -1337,8 +1364,8 @@ class je extends Ve {
|
|
|
1337
1364
|
findRowOfImportantRowspanCell(e, t, s) {
|
|
1338
1365
|
const i = e.getMaxRowspan();
|
|
1339
1366
|
for (let o = t - 1; o > -1; o--) {
|
|
1340
|
-
const
|
|
1341
|
-
if (
|
|
1367
|
+
const r = e.getRowspanAt(o, s);
|
|
1368
|
+
if (r > 1 && o + r + 1 >= t)
|
|
1342
1369
|
return o;
|
|
1343
1370
|
if (t - o > i)
|
|
1344
1371
|
return -1;
|
|
@@ -1351,41 +1378,41 @@ class je extends Ve {
|
|
|
1351
1378
|
areaModel: s,
|
|
1352
1379
|
geo: i,
|
|
1353
1380
|
parent: o,
|
|
1354
|
-
rowIndex:
|
|
1381
|
+
rowIndex: r,
|
|
1355
1382
|
columnIndexStart: a,
|
|
1356
|
-
columnIndexEnd:
|
|
1383
|
+
columnIndexEnd: n,
|
|
1357
1384
|
verticalFixed: d = !1,
|
|
1358
1385
|
lastRowOfModel: h = !1
|
|
1359
1386
|
}) {
|
|
1360
1387
|
var m;
|
|
1361
1388
|
this.scrollViewportLeft = this.scrollViewport.scrollLeft;
|
|
1362
|
-
let
|
|
1389
|
+
let c = 0;
|
|
1363
1390
|
if (!d) {
|
|
1364
1391
|
const g = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1365
|
-
|
|
1392
|
+
c = this.scrollFactorX * g;
|
|
1366
1393
|
}
|
|
1367
1394
|
const S = 0, f = !!(e === "body" && t);
|
|
1368
|
-
let
|
|
1369
|
-
for (let g = a; g <=
|
|
1370
|
-
const u =
|
|
1395
|
+
let p = c;
|
|
1396
|
+
for (let g = a; g <= n; g++) {
|
|
1397
|
+
const u = p, w = this.tableModel.getColumnWidth(g);
|
|
1371
1398
|
if (w > 0 && u + w > 0) {
|
|
1372
1399
|
let x = i.height;
|
|
1373
|
-
const C = s.getRowspanAt(
|
|
1374
|
-
C > 1 && (x = this.getRowHeights(
|
|
1400
|
+
const C = s.getRowspanAt(r, g), y = s.getColspanAt(r, g);
|
|
1401
|
+
C > 1 && (x = this.getRowHeights(r, r + C - 1, s).reduce((A, R) => A + R, 0));
|
|
1375
1402
|
let v = w;
|
|
1376
1403
|
y > 1 && (v = this.getColumnWidths(g, g + y - 1).reduce((A, R) => A + R, 0));
|
|
1377
1404
|
let E = !1;
|
|
1378
|
-
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (m = this.colAndRowspanModels[e]) != null && m.isInRange(
|
|
1405
|
+
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (m = this.colAndRowspanModels[e]) != null && m.isInRange(r, g) && (E = !0), this.draggingTargetColumnIndex === g && e !== "header") {
|
|
1379
1406
|
this.renderDragTargetDiv(o, u, S, v, x);
|
|
1380
1407
|
const A = { left: u, top: S, width: v, height: x };
|
|
1381
1408
|
this.dom.addColumnBorderDivs(this.tableOptions, o, A, e, t);
|
|
1382
1409
|
} else {
|
|
1383
|
-
const A = this.renderSelectedBackgroundDiv(E, f, t, s,
|
|
1410
|
+
const A = this.renderSelectedBackgroundDiv(E, f, t, s, r, g, o, u, S, v, x);
|
|
1384
1411
|
E || this.renderCell({
|
|
1385
1412
|
areaModel: s,
|
|
1386
1413
|
areaIdent: e,
|
|
1387
1414
|
sideIdent: t,
|
|
1388
|
-
rowIndex:
|
|
1415
|
+
rowIndex: r,
|
|
1389
1416
|
columnIndex: g,
|
|
1390
1417
|
left: u,
|
|
1391
1418
|
top: S,
|
|
@@ -1396,7 +1423,7 @@ class je extends Ve {
|
|
|
1396
1423
|
lastRowOfModel: h,
|
|
1397
1424
|
gammaRange: !0
|
|
1398
1425
|
}), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1399
|
-
rowIndex:
|
|
1426
|
+
rowIndex: r,
|
|
1400
1427
|
columnIndex: g,
|
|
1401
1428
|
cellLeft: u,
|
|
1402
1429
|
cellTop: S,
|
|
@@ -1406,10 +1433,10 @@ class je extends Ve {
|
|
|
1406
1433
|
});
|
|
1407
1434
|
}
|
|
1408
1435
|
}
|
|
1409
|
-
if (
|
|
1436
|
+
if (p = p + w, p > this.areaBodyCenterGeo.width)
|
|
1410
1437
|
break;
|
|
1411
1438
|
}
|
|
1412
|
-
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new T(
|
|
1439
|
+
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new T(p - 1, 1, i.height, 0), o);
|
|
1413
1440
|
}
|
|
1414
1441
|
getTreeArrowColumnIndex() {
|
|
1415
1442
|
return this.tableOptions.showCheckboxWihoutExtraColumn ? 0 : this.tableModel.isRowCheckboxVisible() ? 1 : 0;
|
|
@@ -1420,27 +1447,27 @@ class je extends Ve {
|
|
|
1420
1447
|
sideIdent: s,
|
|
1421
1448
|
rowIndex: i,
|
|
1422
1449
|
index: o,
|
|
1423
|
-
left:
|
|
1450
|
+
left: r,
|
|
1424
1451
|
width: a,
|
|
1425
|
-
height:
|
|
1452
|
+
height: n,
|
|
1426
1453
|
top: d,
|
|
1427
1454
|
parent: h,
|
|
1428
|
-
lastRowOfModel:
|
|
1455
|
+
lastRowOfModel: c,
|
|
1429
1456
|
gammaRange: S
|
|
1430
1457
|
}) {
|
|
1431
|
-
var
|
|
1432
|
-
const
|
|
1458
|
+
var ee;
|
|
1459
|
+
const p = this.editorRenderer && this.editorRendererRow === i && this.editorRendererColumn === o ? this.editorRenderer : e.getCellRenderer(i, o), m = { left: r, width: a, height: n, top: d, index: o }, g = e.getRowByIndex(i);
|
|
1433
1460
|
let u = "none";
|
|
1434
|
-
if (o === this.getTreeArrowColumnIndex() &&
|
|
1461
|
+
if (o === this.getTreeArrowColumnIndex() && K(g)) {
|
|
1435
1462
|
const b = g;
|
|
1436
|
-
(
|
|
1463
|
+
(ee = b.children) != null && ee.length ? b.expanded ? u = "expanded" : u = "collapsed" : u = "hidden";
|
|
1437
1464
|
}
|
|
1438
1465
|
let x;
|
|
1439
1466
|
if (t === "header") {
|
|
1440
1467
|
const b = this.tableModel.getColumnDef(o);
|
|
1441
1468
|
(!(b != null && b.sortIconVisible) || b != null && b.sortIconVisible()) && (x = b == null ? void 0 : b.sortState);
|
|
1442
1469
|
}
|
|
1443
|
-
const C = e.getValueAt(i, o), y =
|
|
1470
|
+
const C = e.getValueAt(i, o), y = p ? "" : `${C}`, v = e.isRowChecked(i), E = this.dom.addColumnDiv(
|
|
1444
1471
|
h,
|
|
1445
1472
|
m,
|
|
1446
1473
|
i,
|
|
@@ -1456,19 +1483,19 @@ class je extends Ve {
|
|
|
1456
1483
|
A && this.dom.setAttribute(E, "title", A);
|
|
1457
1484
|
const R = this.tableModel.getColumnDef(o);
|
|
1458
1485
|
R && R.classes[t] && this.dom.addClasses(R.classes[t], E);
|
|
1459
|
-
let
|
|
1460
|
-
|
|
1461
|
-
const
|
|
1462
|
-
if (
|
|
1486
|
+
let W;
|
|
1487
|
+
p && (W = p.render(E, i, o, t, e, C, this.dom.domService));
|
|
1488
|
+
const Z = e.getCustomClassesAt(i, o);
|
|
1489
|
+
if (Z.length && this.dom.addClasses(Z, E), this.dom.addColumnBorderDivs(this.tableOptions, h, m, t, s), c && this.dom.addHorizontalBorder({ left: r, width: a, height: n, top: d + n }, h), this.getFocusModel && t === "body") {
|
|
1463
1490
|
const b = this.getFocusModel();
|
|
1464
1491
|
b != null && b.hasFocus(i, o) && this.dom.addFocusBorderDivs(h, m, {});
|
|
1465
1492
|
}
|
|
1466
1493
|
t === "header" && this.dom.setAttribute(E, "data-ge-action", "drag-column");
|
|
1467
|
-
const
|
|
1468
|
-
if (
|
|
1469
|
-
for (const b in
|
|
1470
|
-
this.dom.setStyle(E, b,
|
|
1471
|
-
return [E,
|
|
1494
|
+
const P = e.getCustomStyleAt(i, o);
|
|
1495
|
+
if (P)
|
|
1496
|
+
for (const b in P)
|
|
1497
|
+
this.dom.setStyle(E, b, P[b]);
|
|
1498
|
+
return [E, W];
|
|
1472
1499
|
}
|
|
1473
1500
|
applyCssClasses(e, t = {}) {
|
|
1474
1501
|
e && Object.entries(t).forEach(([s, i]) => {
|
|
@@ -1476,22 +1503,22 @@ class je extends Ve {
|
|
|
1476
1503
|
});
|
|
1477
1504
|
}
|
|
1478
1505
|
rerenderCellContent({ area: e, rowIndex: t, columnIndex: s, value: i, cssClasses: o }) {
|
|
1479
|
-
const
|
|
1480
|
-
if (
|
|
1506
|
+
const r = this.tableModel.getAreaModel(e), a = 'div[data-col-index="' + s + '"][data-row-index="' + t + '"][data-area="' + e + '"]', n = document.querySelector(a);
|
|
1507
|
+
if (n) {
|
|
1481
1508
|
let d;
|
|
1482
|
-
const
|
|
1483
|
-
if (
|
|
1484
|
-
d =
|
|
1509
|
+
const c = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === s ? this.editorRenderer : r.getCellRenderer(t, s);
|
|
1510
|
+
if (n.innerText = "", this.applyCssClasses(n, o), c)
|
|
1511
|
+
d = c.render(n, t, s, e, r, i, this.dom.domService), d && this.cleanupFunctions[e].push(d);
|
|
1485
1512
|
else {
|
|
1486
|
-
const
|
|
1487
|
-
this.dom.addLabelDiv(
|
|
1513
|
+
const p = `${i}`;
|
|
1514
|
+
this.dom.addLabelDiv(n, p, !1, t, s, e);
|
|
1488
1515
|
}
|
|
1489
|
-
const S =
|
|
1490
|
-
S.length && this.dom.addClasses(S,
|
|
1491
|
-
const f =
|
|
1516
|
+
const S = r.getCustomClassesAt(t, s);
|
|
1517
|
+
S.length && this.dom.addClasses(S, n);
|
|
1518
|
+
const f = r.getCustomStyleAt(t, s);
|
|
1492
1519
|
if (f)
|
|
1493
|
-
for (const
|
|
1494
|
-
this.dom.setStyle(
|
|
1520
|
+
for (const p in f)
|
|
1521
|
+
this.dom.setStyle(n, p, f[p]);
|
|
1495
1522
|
}
|
|
1496
1523
|
}
|
|
1497
1524
|
getColumnWidths(e, t) {
|
|
@@ -1546,24 +1573,24 @@ class je extends Ve {
|
|
|
1546
1573
|
this.debounceTimeout && clearTimeout(this.debounceTimeout), this.debounceTimeout = setTimeout(e.bind(this), t);
|
|
1547
1574
|
}
|
|
1548
1575
|
renderDragTargetDiv(e, t, s, i, o) {
|
|
1549
|
-
const
|
|
1576
|
+
const r = this.dom.applyStylePosistionAbsolute(
|
|
1550
1577
|
this.dom.createDivWithClass("ge-table-drop-zone", e)
|
|
1551
1578
|
);
|
|
1552
|
-
return this.dom.setStyle(
|
|
1579
|
+
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;
|
|
1553
1580
|
}
|
|
1554
|
-
renderSelectedBackgroundDiv(e, t, s, i, o,
|
|
1581
|
+
renderSelectedBackgroundDiv(e, t, s, i, o, r, a, n, d, h, c) {
|
|
1555
1582
|
let S = !1;
|
|
1556
|
-
if (!e && t && i.isSelectable(o,
|
|
1583
|
+
if (!e && t && i.isSelectable(o, r) && this.getSelectionModel) {
|
|
1557
1584
|
const f = this.getSelectionModel();
|
|
1558
1585
|
if (f) {
|
|
1559
|
-
const
|
|
1560
|
-
S =
|
|
1561
|
-
for (let m = 0; m <
|
|
1586
|
+
const p = f.getSelectionCount(o, r);
|
|
1587
|
+
S = p > 0;
|
|
1588
|
+
for (let m = 0; m < p; m++) {
|
|
1562
1589
|
const g = this.dom.applyStylePosistionAbsolute(
|
|
1563
1590
|
// ge-table-body-west-selected-range
|
|
1564
1591
|
this.dom.createDivWithClass(`ge-table-${i.areaIdent}-${s}-selected-range`, a)
|
|
1565
1592
|
);
|
|
1566
|
-
this.dom.setStyle(g, "left", `${
|
|
1593
|
+
this.dom.setStyle(g, "left", `${n}px`), this.dom.setStyle(g, "top", `${d}px`), this.dom.setStyle(g, "width", `${h}px`), this.dom.setStyle(g, "height", `${c}px`);
|
|
1567
1594
|
}
|
|
1568
1595
|
}
|
|
1569
1596
|
}
|
|
@@ -1575,34 +1602,34 @@ class je extends Ve {
|
|
|
1575
1602
|
sideIdent: s,
|
|
1576
1603
|
rowIndex: i,
|
|
1577
1604
|
columnIndex: o,
|
|
1578
|
-
left:
|
|
1605
|
+
left: r,
|
|
1579
1606
|
top: a,
|
|
1580
|
-
width:
|
|
1607
|
+
width: n,
|
|
1581
1608
|
height: d,
|
|
1582
1609
|
parent: h,
|
|
1583
|
-
cellSelected:
|
|
1610
|
+
cellSelected: c,
|
|
1584
1611
|
lastRowOfModel: S,
|
|
1585
1612
|
gammaRange: f
|
|
1586
1613
|
}) {
|
|
1587
|
-
const [
|
|
1614
|
+
const [p, m] = this.addAndRenderCellDiv({
|
|
1588
1615
|
areaModel: e,
|
|
1589
1616
|
areaIdent: t,
|
|
1590
1617
|
sideIdent: s,
|
|
1591
1618
|
rowIndex: i,
|
|
1592
1619
|
index: o,
|
|
1593
|
-
left:
|
|
1594
|
-
width:
|
|
1620
|
+
left: r,
|
|
1621
|
+
width: n,
|
|
1595
1622
|
height: d,
|
|
1596
1623
|
top: a,
|
|
1597
1624
|
parent: h,
|
|
1598
1625
|
lastRowOfModel: S,
|
|
1599
1626
|
gammaRange: f
|
|
1600
1627
|
});
|
|
1601
|
-
|
|
1628
|
+
c && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, p), m && this.cleanupFunctions[t].push(m);
|
|
1602
1629
|
}
|
|
1603
|
-
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: i, cellWidth: o, cellHeight:
|
|
1604
|
-
const
|
|
1605
|
-
|
|
1630
|
+
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: i, cellWidth: o, cellHeight: r, parent: a }) {
|
|
1631
|
+
const n = this.dom.domService, d = this.tableOptions.columnResizeHandleWidthInPx ?? 2, h = n.createElement("div");
|
|
1632
|
+
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 - d}px`), n.setStyle(h, "top", `${i}px`), n.setStyle(h, "width", `${d}px`), n.setStyle(h, "height", `${r}px`), n.appendChild(a, h);
|
|
1606
1633
|
}
|
|
1607
1634
|
}
|
|
1608
1635
|
class Xe {
|
|
@@ -1626,36 +1653,36 @@ class ze {
|
|
|
1626
1653
|
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
|
|
1627
1654
|
const t = e.target, s = t.getAttribute("data-area"), i = t.getAttribute("data-row-index"), o = t.getAttribute("data-col-index");
|
|
1628
1655
|
if (s && i && o) {
|
|
1629
|
-
const
|
|
1630
|
-
this.tableScope.updateModelValueAfterEdit(
|
|
1656
|
+
const r = q(s), a = Number(i), n = Number(o);
|
|
1657
|
+
this.tableScope.updateModelValueAfterEdit(r, a, n, t.value);
|
|
1631
1658
|
}
|
|
1632
1659
|
}
|
|
1633
1660
|
}
|
|
1634
1661
|
}
|
|
1635
|
-
class
|
|
1662
|
+
class Ye {
|
|
1636
1663
|
constructor(e = -1, t = -1) {
|
|
1637
1664
|
this.rowIndex = e, this.columnIndex = t;
|
|
1638
1665
|
}
|
|
1639
1666
|
}
|
|
1640
|
-
class
|
|
1667
|
+
class J {
|
|
1641
1668
|
constructor(e) {
|
|
1642
1669
|
this.cells = e;
|
|
1643
1670
|
}
|
|
1644
1671
|
static createSingle(e, t) {
|
|
1645
|
-
return new
|
|
1672
|
+
return new J([new Ye(e, t)]);
|
|
1646
1673
|
}
|
|
1647
1674
|
}
|
|
1648
|
-
class
|
|
1675
|
+
class qe {
|
|
1649
1676
|
constructor(e) {
|
|
1650
1677
|
var t, s;
|
|
1651
1678
|
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);
|
|
1652
1679
|
}
|
|
1653
1680
|
onMouseClicked(e, t) {
|
|
1654
|
-
var o,
|
|
1681
|
+
var o, r, a, n, d, h, c;
|
|
1655
1682
|
let s = !1, i = !1;
|
|
1656
1683
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
1657
1684
|
const S = this.getSelectionModel(), f = this.getFocusModel();
|
|
1658
|
-
S && f && (f.hasFocus(e.rowIndex, e.columnIndex) || (f.setFocus(e.rowIndex, e.columnIndex), s = !0), (o = e.originalEvent) != null && o.shiftKey || S.hasSelection() && (S.clear(), s = !0), (
|
|
1685
|
+
S && f && (f.hasFocus(e.rowIndex, e.columnIndex) || (f.setFocus(e.rowIndex, e.columnIndex), s = !0), (o = e.originalEvent) != null && o.shiftKey || S.hasSelection() && (S.clear(), s = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (S.addSelection(this.createRangeByEvents(e, this.previousEvt)), i = !0, s = !0) : (a = e.originalEvent) != null && a.ctrlKey || (n = e.originalEvent) != null && n.metaKey ? (S.addSelection(M.singleCell(e.rowIndex, e.columnIndex)), i = !0, s = !0) : (d = e.originalEvent) != null && d.altKey && ((h = e.originalEvent) != null && h.ctrlKey || (c = e.originalEvent) != null && c.metaKey) && (S.removeSelection(M.singleCell(e.rowIndex, e.columnIndex)), i = !0, s = !0));
|
|
1659
1686
|
}
|
|
1660
1687
|
return i ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), s;
|
|
1661
1688
|
}
|
|
@@ -1677,16 +1704,16 @@ class Ye {
|
|
|
1677
1704
|
}
|
|
1678
1705
|
createRangeByEvents(e, t) {
|
|
1679
1706
|
t || (t = e);
|
|
1680
|
-
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),
|
|
1707
|
+
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);
|
|
1681
1708
|
return M.create({
|
|
1682
1709
|
rowIndex1: s,
|
|
1683
1710
|
columnIndex1: o,
|
|
1684
1711
|
rowIndex2: i,
|
|
1685
|
-
columnIndex2:
|
|
1712
|
+
columnIndex2: r
|
|
1686
1713
|
});
|
|
1687
1714
|
}
|
|
1688
1715
|
}
|
|
1689
|
-
class
|
|
1716
|
+
class Ue {
|
|
1690
1717
|
get() {
|
|
1691
1718
|
return {
|
|
1692
1719
|
f2: "START_EDITING",
|
|
@@ -1704,7 +1731,7 @@ class qe {
|
|
|
1704
1731
|
};
|
|
1705
1732
|
}
|
|
1706
1733
|
}
|
|
1707
|
-
class
|
|
1734
|
+
class Je {
|
|
1708
1735
|
get() {
|
|
1709
1736
|
return {
|
|
1710
1737
|
f2: "START_EDITING",
|
|
@@ -1724,7 +1751,7 @@ class Ue {
|
|
|
1724
1751
|
};
|
|
1725
1752
|
}
|
|
1726
1753
|
}
|
|
1727
|
-
class
|
|
1754
|
+
class Qe {
|
|
1728
1755
|
constructor(e) {
|
|
1729
1756
|
this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
|
|
1730
1757
|
}
|
|
@@ -1732,7 +1759,7 @@ class Je {
|
|
|
1732
1759
|
this.listener.includes(e) || this.listener.push(e);
|
|
1733
1760
|
}
|
|
1734
1761
|
init() {
|
|
1735
|
-
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new
|
|
1762
|
+
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new Je().get()) : Object.assign(this.shortcutActionIdMapping, new Ue().get()), Object.assign(this.shortcutActionIdMapping, this.tableScope.tableOptions.shortcutActionIdMapping), this.isDebug() && console.debug("ShortcutService", this.shortcutActionIdMapping), this.tableScope.hostElement.addEventListener("keydown", this.onKeyDown.bind(this));
|
|
1736
1763
|
}
|
|
1737
1764
|
isMacintosh() {
|
|
1738
1765
|
return navigator.platform.indexOf("Mac") > -1;
|
|
@@ -1776,7 +1803,7 @@ class Je {
|
|
|
1776
1803
|
return e.altKey && t.push("alt"), e.shiftKey && t.push("shift"), e.ctrlKey && t.push("ctrl"), e.metaKey && t.push("meta"), e.code && t.push(e.code.toLowerCase().replace(/key/g, "")), t.sort();
|
|
1777
1804
|
}
|
|
1778
1805
|
}
|
|
1779
|
-
class
|
|
1806
|
+
class ie {
|
|
1780
1807
|
onCheckboxChanged(e) {
|
|
1781
1808
|
}
|
|
1782
1809
|
onContextmenu(e) {
|
|
@@ -1792,7 +1819,7 @@ class se {
|
|
|
1792
1819
|
onMouseMoved(e) {
|
|
1793
1820
|
}
|
|
1794
1821
|
}
|
|
1795
|
-
class
|
|
1822
|
+
class he {
|
|
1796
1823
|
setStyle(e, t, s) {
|
|
1797
1824
|
return e.style[t] = s, e;
|
|
1798
1825
|
}
|
|
@@ -1819,15 +1846,15 @@ class de {
|
|
|
1819
1846
|
e.setAttribute(t, s);
|
|
1820
1847
|
}
|
|
1821
1848
|
}
|
|
1822
|
-
class
|
|
1823
|
-
render(e, t, s, i, o,
|
|
1849
|
+
class Ze {
|
|
1850
|
+
render(e, t, s, i, o, r, a) {
|
|
1824
1851
|
if (o.isEditable(t, s)) {
|
|
1825
1852
|
a.addClass(e, "ge-table-row-input-div");
|
|
1826
|
-
const
|
|
1853
|
+
const n = o.getValueAt(t, s);
|
|
1827
1854
|
e.innerHTML = `
|
|
1828
1855
|
<input
|
|
1829
1856
|
type="text"
|
|
1830
|
-
value="${
|
|
1857
|
+
value="${n}"
|
|
1831
1858
|
autofocus
|
|
1832
1859
|
onfocus="this.setSelectionRange(0, this.value.length)"
|
|
1833
1860
|
data-listen="change"
|
|
@@ -1840,7 +1867,7 @@ class Qe {
|
|
|
1840
1867
|
}
|
|
1841
1868
|
}
|
|
1842
1869
|
}
|
|
1843
|
-
class
|
|
1870
|
+
class et {
|
|
1844
1871
|
constructor(e = "none", t = "single") {
|
|
1845
1872
|
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
|
|
1846
1873
|
}
|
|
@@ -1884,7 +1911,7 @@ class Ze {
|
|
|
1884
1911
|
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));
|
|
1885
1912
|
}
|
|
1886
1913
|
}
|
|
1887
|
-
class
|
|
1914
|
+
class tt {
|
|
1888
1915
|
constructor(e = "none") {
|
|
1889
1916
|
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1;
|
|
1890
1917
|
}
|
|
@@ -1907,29 +1934,29 @@ class et {
|
|
|
1907
1934
|
return [this.rowIndex, this.columnIndex];
|
|
1908
1935
|
}
|
|
1909
1936
|
}
|
|
1910
|
-
const
|
|
1911
|
-
class
|
|
1937
|
+
const st = new et(), it = new tt("cell");
|
|
1938
|
+
class ce {
|
|
1912
1939
|
constructor() {
|
|
1913
1940
|
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 = {
|
|
1914
1941
|
header: 34,
|
|
1915
1942
|
body: 34,
|
|
1916
1943
|
footer: 34
|
|
1917
|
-
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new
|
|
1944
|
+
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new ae(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new de(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new Ze(), this.getSelectionModel = () => st, this.getFocusModel = () => it;
|
|
1918
1945
|
}
|
|
1919
1946
|
}
|
|
1920
|
-
class
|
|
1947
|
+
class Q extends Ke {
|
|
1921
1948
|
constructor(e, t, s, i, o) {
|
|
1922
|
-
var
|
|
1949
|
+
var r;
|
|
1923
1950
|
if (super(
|
|
1924
1951
|
e,
|
|
1925
1952
|
t,
|
|
1926
|
-
new
|
|
1953
|
+
new $e(s),
|
|
1927
1954
|
i
|
|
1928
|
-
), this.eventListener = o, this.selectionService = new
|
|
1929
|
-
const a = this.tableOptions.autoRestoreOptions,
|
|
1930
|
-
|
|
1955
|
+
), this.eventListener = o, this.licenseManager = D.getInstance(), this.selectionService = new qe(this), this.api = new We(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, o || (this.eventListener = new ie()), (r = this.tableOptions) != null && r.autoRestoreOptions) {
|
|
1956
|
+
const a = this.tableOptions.autoRestoreOptions, n = a.getStorageKeyFn;
|
|
1957
|
+
n && (a.autoRestoreScrollPosition && (this.storeScrollPosStateService = new He(n)), a.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new ke(n)), a.autoRestoreSortingState && (this.storeSortingService = new Ve(n)));
|
|
1931
1958
|
}
|
|
1932
|
-
this.mouseHandler = new
|
|
1959
|
+
this.mouseHandler = new Be(this), this.inputHandler = new ze(this), this.shortcutService = new Qe(this), this.shortcutService.addListener(this.selectionService);
|
|
1933
1960
|
}
|
|
1934
1961
|
/**
|
|
1935
1962
|
* Creates a TableScope instance.
|
|
@@ -1942,8 +1969,8 @@ class J extends je {
|
|
|
1942
1969
|
*
|
|
1943
1970
|
* @return {TableScope} - The newly created TableScope instance.
|
|
1944
1971
|
*/
|
|
1945
|
-
static create(e, t, s = new
|
|
1946
|
-
return new
|
|
1972
|
+
static create(e, t, s = new ce(), i = new ie(), o = new he()) {
|
|
1973
|
+
return new Q(
|
|
1947
1974
|
e,
|
|
1948
1975
|
t,
|
|
1949
1976
|
o,
|
|
@@ -1965,7 +1992,7 @@ class J extends je {
|
|
|
1965
1992
|
return !1;
|
|
1966
1993
|
}
|
|
1967
1994
|
updateModelValueAfterEdit(e, t, s, i) {
|
|
1968
|
-
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, i) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(
|
|
1995
|
+
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, i) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(J.createSingle(t, s)), this.hostElement.focus());
|
|
1969
1996
|
}
|
|
1970
1997
|
/**
|
|
1971
1998
|
* Retrieves the TableApi object.
|
|
@@ -1994,7 +2021,7 @@ class J extends je {
|
|
|
1994
2021
|
* @return {GeMouseEvent} - The created GeMouseEvent object.
|
|
1995
2022
|
*/
|
|
1996
2023
|
createGeMouseEvent(e) {
|
|
1997
|
-
const t = new
|
|
2024
|
+
const t = new Y();
|
|
1998
2025
|
if (t.originalEvent = e, e) {
|
|
1999
2026
|
const s = e.target;
|
|
2000
2027
|
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) {
|
|
@@ -2075,10 +2102,10 @@ class J extends je {
|
|
|
2075
2102
|
* @return {void} - This method does not return anything.
|
|
2076
2103
|
*/
|
|
2077
2104
|
toggleRowCheckbox(e, t, s) {
|
|
2078
|
-
var
|
|
2079
|
-
const i = this.tableModel.getAreaModel(s), o = i.isRowChecked(e),
|
|
2080
|
-
i.setRowChecked(e,
|
|
2081
|
-
const a = (
|
|
2105
|
+
var n;
|
|
2106
|
+
const i = this.tableModel.getAreaModel(s), o = i.isRowChecked(e), r = o === void 0 || o === "semi" || o === "none";
|
|
2107
|
+
i.setRowChecked(e, r), this.repaint();
|
|
2108
|
+
const a = (n = i.rowSelectionModel) == null ? void 0 : n.getCheckedRows();
|
|
2082
2109
|
this.eventListener.onCheckboxChanged(a || []);
|
|
2083
2110
|
}
|
|
2084
2111
|
/**
|
|
@@ -2116,12 +2143,12 @@ class J extends je {
|
|
|
2116
2143
|
* @return {void}
|
|
2117
2144
|
*/
|
|
2118
2145
|
onHeaderDblClicked(e, t, s) {
|
|
2119
|
-
var o,
|
|
2146
|
+
var o, r;
|
|
2120
2147
|
const i = this.tableModel.getColumnDef(s);
|
|
2121
2148
|
if (i != null && i.sortable && i.sortable()) {
|
|
2122
2149
|
e.preventDefault(), e.stopPropagation();
|
|
2123
|
-
const a = i.sortStatesOrder ? i.sortStatesOrder : this.tableOptions.sortOrder,
|
|
2124
|
-
this.tableModel.doSort([h]) && ((o = this.tableModel.getColumnDefs()) == null || o.forEach((S) => S.sortState = ""), i.sortState = d), this.repaint(), (
|
|
2150
|
+
const a = i.sortStatesOrder ? i.sortStatesOrder : this.tableOptions.sortOrder, n = i.sortState ?? "", d = a[(a.indexOf(n) + 1) % a.length], h = new Xe(s, d);
|
|
2151
|
+
this.tableModel.doSort([h]) && ((o = this.tableModel.getColumnDefs()) == null || o.forEach((S) => S.sortState = ""), i.sortState = d), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([h]);
|
|
2125
2152
|
}
|
|
2126
2153
|
}
|
|
2127
2154
|
/**
|
|
@@ -2209,19 +2236,19 @@ class J extends je {
|
|
|
2209
2236
|
if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.getRowId && this.storeStateCollapsedExpandService) {
|
|
2210
2237
|
const s = this.tableOptions.autoRestoreOptions, i = s.getRowId;
|
|
2211
2238
|
if (s.autoRestoreCollapsedExpandedState && i) {
|
|
2212
|
-
const o = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(),
|
|
2213
|
-
if (X(
|
|
2214
|
-
const a =
|
|
2215
|
-
for (let d = 0; d <
|
|
2216
|
-
const h =
|
|
2239
|
+
const o = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), r = this.tableModel.getAreaModel("body");
|
|
2240
|
+
if (X(r)) {
|
|
2241
|
+
const a = r, n = r.getRowCount();
|
|
2242
|
+
for (let d = 0; d < n; d++) {
|
|
2243
|
+
const h = r.getRowByIndex(d);
|
|
2217
2244
|
if (h)
|
|
2218
2245
|
if (o.allExpanded)
|
|
2219
2246
|
h.expanded = !0;
|
|
2220
2247
|
else if (o.allCollapsed)
|
|
2221
2248
|
h.expanded = !1;
|
|
2222
2249
|
else {
|
|
2223
|
-
const
|
|
2224
|
-
o.mode === "expanded" ? h.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(
|
|
2250
|
+
const c = i(h.data);
|
|
2251
|
+
o.mode === "expanded" ? h.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(c) : o.mode === "collapsed" && (h.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(c));
|
|
2225
2252
|
}
|
|
2226
2253
|
}
|
|
2227
2254
|
a.recalcVisibleTreeRows();
|
|
@@ -2229,73 +2256,99 @@ class J extends je {
|
|
|
2229
2256
|
}
|
|
2230
2257
|
}
|
|
2231
2258
|
}
|
|
2259
|
+
/**
|
|
2260
|
+
* Scrolls the viewport to the specified pixel coordinates.
|
|
2261
|
+
*
|
|
2262
|
+
* @param {number} px - The horizontal pixel coordinate to scroll to.
|
|
2263
|
+
* @param {number} py - The vertical pixel coordinate to scroll to.
|
|
2264
|
+
*
|
|
2265
|
+
* @return {void}
|
|
2266
|
+
*/
|
|
2267
|
+
scrollToPixel(e, t) {
|
|
2268
|
+
this.scrollViewport.scrollTo(e, t);
|
|
2269
|
+
}
|
|
2270
|
+
/**
|
|
2271
|
+
* Scrolls to the specified index in the table.
|
|
2272
|
+
*
|
|
2273
|
+
* @param {number} _indexX - The horizontal index of the table where scrolling is needed.
|
|
2274
|
+
* @param {number} indexY - The vertical index of the table where scrolling is needed.
|
|
2275
|
+
* @return {void}
|
|
2276
|
+
*/
|
|
2277
|
+
scrollToIndex(e, t) {
|
|
2278
|
+
const i = this.tableModel.getAreaModel("body").getYPosByRowIndex(t);
|
|
2279
|
+
this.scrollToPixel(0, i);
|
|
2280
|
+
}
|
|
2232
2281
|
}
|
|
2233
|
-
function
|
|
2282
|
+
function ot(l) {
|
|
2234
2283
|
let e;
|
|
2235
2284
|
return {
|
|
2236
2285
|
c() {
|
|
2237
|
-
e =
|
|
2286
|
+
e = ye("div"), ve(e, "class", "ge-table"), _(e, "width", "100%"), _(e, "height", "100%"), _(e, "background-color", "transparent"), _(e, "padding", "0"), _(e, "margin", "0");
|
|
2238
2287
|
},
|
|
2239
2288
|
m(t, s) {
|
|
2240
|
-
|
|
2289
|
+
be(t, e, s), l[4](e);
|
|
2241
2290
|
},
|
|
2242
|
-
p:
|
|
2243
|
-
i:
|
|
2244
|
-
o:
|
|
2291
|
+
p: L,
|
|
2292
|
+
i: L,
|
|
2293
|
+
o: L,
|
|
2245
2294
|
d(t) {
|
|
2246
|
-
t &&
|
|
2295
|
+
t && re(e), l[4](null);
|
|
2247
2296
|
}
|
|
2248
2297
|
};
|
|
2249
2298
|
}
|
|
2250
|
-
function
|
|
2251
|
-
let { tableModel: s } = e, { tableOptions: i = new
|
|
2252
|
-
const
|
|
2253
|
-
|
|
2254
|
-
const
|
|
2255
|
-
onCheckboxChanged: (
|
|
2256
|
-
|
|
2299
|
+
function lt(l, e, t) {
|
|
2300
|
+
let { tableModel: s } = e, { tableOptions: i = new ce() } = e, { licenseKey: o } = e, r;
|
|
2301
|
+
const a = Se();
|
|
2302
|
+
ge(() => {
|
|
2303
|
+
const d = {
|
|
2304
|
+
onCheckboxChanged: (c) => {
|
|
2305
|
+
a("checkboxChanged", c);
|
|
2257
2306
|
},
|
|
2258
|
-
onContextmenu: (
|
|
2259
|
-
|
|
2307
|
+
onContextmenu: (c) => {
|
|
2308
|
+
a("contextmenu", c);
|
|
2260
2309
|
},
|
|
2261
|
-
onModelChanged: (
|
|
2262
|
-
|
|
2310
|
+
onModelChanged: (c) => {
|
|
2311
|
+
a("modelChanged", c);
|
|
2263
2312
|
},
|
|
2264
|
-
onMouseClicked: (
|
|
2265
|
-
|
|
2313
|
+
onMouseClicked: (c) => {
|
|
2314
|
+
a("mouseClicked", c);
|
|
2266
2315
|
},
|
|
2267
|
-
onMouseDragging: (
|
|
2268
|
-
|
|
2316
|
+
onMouseDragging: (c) => {
|
|
2317
|
+
a("mouseDragging", c);
|
|
2269
2318
|
},
|
|
2270
|
-
onMouseDraggingEnd: (
|
|
2271
|
-
|
|
2319
|
+
onMouseDraggingEnd: (c) => {
|
|
2320
|
+
a("mouseDraggingEnd", c);
|
|
2272
2321
|
},
|
|
2273
|
-
onMouseMoved: (
|
|
2274
|
-
|
|
2322
|
+
onMouseMoved: (c) => {
|
|
2323
|
+
a("mouseMoved", c);
|
|
2275
2324
|
}
|
|
2276
|
-
},
|
|
2277
|
-
|
|
2325
|
+
}, h = new Q(r, s, new he(), i, d);
|
|
2326
|
+
h.firstInit(), a("tableReady", h.getApi()), o && D.getInstance().setLicenseKey(o);
|
|
2278
2327
|
});
|
|
2279
|
-
function
|
|
2280
|
-
|
|
2281
|
-
|
|
2328
|
+
function n(d) {
|
|
2329
|
+
G[d ? "unshift" : "push"](() => {
|
|
2330
|
+
r = d, t(0, r);
|
|
2282
2331
|
});
|
|
2283
2332
|
}
|
|
2284
|
-
return l.$$set = (
|
|
2285
|
-
"tableModel" in
|
|
2286
|
-
}, [
|
|
2333
|
+
return l.$$set = (d) => {
|
|
2334
|
+
"tableModel" in d && t(1, s = d.tableModel), "tableOptions" in d && t(2, i = d.tableOptions), "licenseKey" in d && t(3, o = d.licenseKey);
|
|
2335
|
+
}, [r, s, i, o, n];
|
|
2287
2336
|
}
|
|
2288
|
-
class
|
|
2337
|
+
class at extends Oe {
|
|
2289
2338
|
constructor(e) {
|
|
2290
|
-
super(),
|
|
2339
|
+
super(), Fe(this, e, lt, ot, fe, {
|
|
2340
|
+
tableModel: 1,
|
|
2341
|
+
tableOptions: 2,
|
|
2342
|
+
licenseKey: 3
|
|
2343
|
+
});
|
|
2291
2344
|
}
|
|
2292
2345
|
}
|
|
2293
|
-
class
|
|
2346
|
+
class dt {
|
|
2294
2347
|
constructor(e) {
|
|
2295
2348
|
this.Component = e;
|
|
2296
2349
|
}
|
|
2297
|
-
render(e, t, s, i, o,
|
|
2298
|
-
const
|
|
2350
|
+
render(e, t, s, i, o, r, a) {
|
|
2351
|
+
const n = new this.Component({
|
|
2299
2352
|
target: e,
|
|
2300
2353
|
props: {
|
|
2301
2354
|
cellDiv: e,
|
|
@@ -2303,15 +2356,15 @@ class at {
|
|
|
2303
2356
|
columnIndex: s,
|
|
2304
2357
|
areaIdent: i,
|
|
2305
2358
|
areaModel: o,
|
|
2306
|
-
cellValue:
|
|
2359
|
+
cellValue: r
|
|
2307
2360
|
}
|
|
2308
2361
|
});
|
|
2309
2362
|
return () => {
|
|
2310
|
-
|
|
2363
|
+
n.$destroy();
|
|
2311
2364
|
};
|
|
2312
2365
|
}
|
|
2313
2366
|
}
|
|
2314
2367
|
export {
|
|
2315
|
-
|
|
2316
|
-
|
|
2368
|
+
dt as ComponentRendererWrapper,
|
|
2369
|
+
at as GuiexpertTable
|
|
2317
2370
|
};
|