@guiexpert/table 1.1.40 → 1.1.42
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 +69 -69
- package/index.d.ts +4 -0
- package/index.js +1231 -889
- package/lib/common/generator/domain/property-type.d.ts +41 -0
- package/lib/common/generator/domain/value-info.d.ts +8 -0
- package/lib/common/generator/property-item-tree.service.d.ts +101 -0
- package/lib/common/generator/scheme-generator-service.d.ts +85 -0
- package/lib/common/generator/scheme-generator-service.demo.d.ts +1 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function vt(h, e = 500) {
|
|
2
2
|
let t = null, s = 0;
|
|
3
3
|
return function(...o) {
|
|
4
4
|
const i = Date.now(), r = e - (i - s);
|
|
@@ -7,7 +7,7 @@ function ut(h, e = 500) {
|
|
|
7
7
|
}, r));
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function ke(h, e = 500) {
|
|
11
11
|
let t = null;
|
|
12
12
|
return function(...s) {
|
|
13
13
|
t && window.clearTimeout(t), t = window.setTimeout(() => {
|
|
@@ -15,7 +15,7 @@ function Re(h, e = 500) {
|
|
|
15
15
|
}, e);
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function At(h = 500) {
|
|
19
19
|
return function(e, t, s) {
|
|
20
20
|
let o = 0;
|
|
21
21
|
const i = s.value;
|
|
@@ -25,14 +25,339 @@ function gt(h = 500) {
|
|
|
25
25
|
}, s;
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
class
|
|
28
|
+
class Ce {
|
|
29
|
+
constructor() {
|
|
30
|
+
this.type = "any";
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
class de {
|
|
34
|
+
constructor() {
|
|
35
|
+
this.type = "undefined";
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
class De {
|
|
39
|
+
constructor() {
|
|
40
|
+
this.type = "null";
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
class Fe {
|
|
44
|
+
constructor() {
|
|
45
|
+
this.type = "string";
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
class Pe {
|
|
49
|
+
constructor() {
|
|
50
|
+
this.type = "number";
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
class Le {
|
|
54
|
+
constructor() {
|
|
55
|
+
this.type = "boolean";
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
class G {
|
|
59
|
+
constructor(e = []) {
|
|
60
|
+
this.items = e, this.type = "Array";
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
class ve {
|
|
64
|
+
constructor(e, t = []) {
|
|
65
|
+
this.name = e, this.types = t;
|
|
66
|
+
}
|
|
67
|
+
toString() {
|
|
68
|
+
return `PropertyItem(name: ${this.name}, types: [${this.types.map((e) => e.type).join(", ")}])`;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
class O {
|
|
72
|
+
constructor(e, t = []) {
|
|
73
|
+
this.name = e, this.properties = t, this.type = "object";
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
class $e {
|
|
77
|
+
constructor() {
|
|
78
|
+
this.property = "", this.value = "", this.path = "", this.propertyItem = new ve("", [new Ce()]);
|
|
79
|
+
}
|
|
80
|
+
toString() {
|
|
81
|
+
var e;
|
|
82
|
+
return `${this.path} -> : ${((e = this.propertyItem) == null ? void 0 : e.toString()) ?? ""}`;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
class Oe {
|
|
86
|
+
constructor() {
|
|
87
|
+
this.entitySuffix = "Entity";
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Converts a json or object structure like this:
|
|
91
|
+
* [
|
|
92
|
+
* {
|
|
93
|
+
* id: 1,
|
|
94
|
+
* name: "Alice",
|
|
95
|
+
* description: "Lorem ipsum dolor",
|
|
96
|
+
* isActive: true,
|
|
97
|
+
* tags: ["typescript", "javascript"],
|
|
98
|
+
* profile: { age: 30, location: "Berlin" },
|
|
99
|
+
* preferences: [{ key: "theme", value: "dark" }],
|
|
100
|
+
* },
|
|
101
|
+
* {
|
|
102
|
+
* id: 2,
|
|
103
|
+
* name: "Marc",
|
|
104
|
+
* description: "Lorem ipsum dolor",
|
|
105
|
+
* isActive: false,
|
|
106
|
+
* tags: ["java", "javascript"],
|
|
107
|
+
* profile: { age: 55, location: "Frankfurt" },
|
|
108
|
+
* preferences: [{ key: "theme", value: "light" }],
|
|
109
|
+
* },
|
|
110
|
+
* {
|
|
111
|
+
* id: null,
|
|
112
|
+
* name: "Bob",
|
|
113
|
+
* isActive: false,
|
|
114
|
+
* tags: null,
|
|
115
|
+
* profile: { age: 25, location: "Frankfurt" },
|
|
116
|
+
* preferences: [{ key: "language", value: "de" }],
|
|
117
|
+
* },
|
|
118
|
+
* ]
|
|
119
|
+
*
|
|
120
|
+
* into a PropertyTape tree structure like this:
|
|
121
|
+
*
|
|
122
|
+
* return new ArrayPropertyType(
|
|
123
|
+
* [
|
|
124
|
+
* new ObjectPropertyType('XyzRowEntity', [
|
|
125
|
+
* new PropertyItem('id', [new NumberPropertyType(), new NullPropertyType()]),
|
|
126
|
+
* new PropertyItem('name', [new StringPropertyType()]),
|
|
127
|
+
* new PropertyItem('description', [new StringPropertyType(), new UndefinedPropertyType()]),
|
|
128
|
+
* new PropertyItem('isActive', [new BooleanPropertyType()]),
|
|
129
|
+
* new PropertyItem('tags', [
|
|
130
|
+
* new ArrayPropertyType(
|
|
131
|
+
* [new StringPropertyType()]
|
|
132
|
+
* ),
|
|
133
|
+
* new NullPropertyType()
|
|
134
|
+
* ]),
|
|
135
|
+
* new PropertyItem('profile', [
|
|
136
|
+
* new ObjectPropertyType('profile', [
|
|
137
|
+
* new PropertyItem('age', [new NumberPropertyType()]),
|
|
138
|
+
* new PropertyItem('location', [new StringPropertyType()])
|
|
139
|
+
* ])
|
|
140
|
+
* ]),
|
|
141
|
+
* new PropertyItem('preferences', [
|
|
142
|
+
* new ArrayPropertyType(
|
|
143
|
+
* [
|
|
144
|
+
* new ObjectPropertyType('preference', [
|
|
145
|
+
* new PropertyItem('key', [new StringPropertyType()]),
|
|
146
|
+
* new PropertyItem('value', [new StringPropertyType()])
|
|
147
|
+
* ])
|
|
148
|
+
* ])
|
|
149
|
+
* ])
|
|
150
|
+
* ])
|
|
151
|
+
* ]);
|
|
152
|
+
*
|
|
153
|
+
* The PropertyTape tree structure can be rendered as TypeScript interface definitions with the SchemeGenerator:
|
|
154
|
+
*
|
|
155
|
+
* export interface XyzRowEntity {
|
|
156
|
+
* description: string;
|
|
157
|
+
* id: (null | number);
|
|
158
|
+
* isActive: boolean;
|
|
159
|
+
* name: string;
|
|
160
|
+
* preferences: Array<(PreferenceEntity)>;
|
|
161
|
+
* profile: ProfileEntity;
|
|
162
|
+
* tags: (null | Array<()> | string);
|
|
163
|
+
* }
|
|
164
|
+
*
|
|
165
|
+
* export interface PreferencesEntity {
|
|
166
|
+
* key: string;
|
|
167
|
+
* value: string;
|
|
168
|
+
* }
|
|
169
|
+
*
|
|
170
|
+
* export interface ProfileEntity {
|
|
171
|
+
* age: number;
|
|
172
|
+
* location: string;
|
|
173
|
+
* }
|
|
174
|
+
*
|
|
175
|
+
* @param parsedObject
|
|
176
|
+
* @param rootName
|
|
177
|
+
*/
|
|
178
|
+
object2PropertyType(e, t = "") {
|
|
179
|
+
const s = this.extractValueInfos(e, t), o = this.mergeValueInfos(s);
|
|
180
|
+
return o.length > 0 && (o[0].propertyItem.name = t), this.valueInfos2PropertyType(o);
|
|
181
|
+
}
|
|
182
|
+
valueInfos2PropertyType(e) {
|
|
183
|
+
const t = e[0].propertyItem.types[0], s = /* @__PURE__ */ new Map();
|
|
184
|
+
for (const o of e)
|
|
185
|
+
s.set(o.path, o);
|
|
186
|
+
for (const o of e) {
|
|
187
|
+
const i = this.getParentPath(o.path);
|
|
188
|
+
if (i) {
|
|
189
|
+
const r = s.get(i);
|
|
190
|
+
if (r) {
|
|
191
|
+
let l = !1;
|
|
192
|
+
if (r.propertyItem.types.length === 1) {
|
|
193
|
+
const n = r.propertyItem.types[0];
|
|
194
|
+
if (n instanceof G) {
|
|
195
|
+
l = !0;
|
|
196
|
+
for (const a of o.propertyItem.types)
|
|
197
|
+
n.items.push(a);
|
|
198
|
+
} else
|
|
199
|
+
n instanceof O && (l = !0, n.properties.push(o.propertyItem));
|
|
200
|
+
}
|
|
201
|
+
if (!l)
|
|
202
|
+
for (const n of o.propertyItem.types)
|
|
203
|
+
r.propertyItem.types.push(n);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return t || new Ce();
|
|
208
|
+
}
|
|
209
|
+
getParentPath(e) {
|
|
210
|
+
const t = e.lastIndexOf("/");
|
|
211
|
+
return t === -1 ? "" : e.substring(0, t);
|
|
212
|
+
}
|
|
213
|
+
logValueInfos(e) {
|
|
214
|
+
for (let t = 0; t < e.length; t++) {
|
|
215
|
+
const s = e[t];
|
|
216
|
+
s.value = null;
|
|
217
|
+
const o = t.toString().padStart(2, "0");
|
|
218
|
+
console.info(o + ") " + s.toString() + " parent: " + this.getParentPath(s.path));
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
mergeValueInfos(e) {
|
|
222
|
+
const t = [];
|
|
223
|
+
let s = e.length - 1;
|
|
224
|
+
t.push(e[s]);
|
|
225
|
+
let o = e[s].path;
|
|
226
|
+
for (let i = s - 1; i >= 0; i--) {
|
|
227
|
+
if (e[i].path === o) {
|
|
228
|
+
let r = e[i].propertyItem.types[0];
|
|
229
|
+
e[s].propertyItem.types.some((l) => l.type === r.type) || e[s].propertyItem.types.push(r);
|
|
230
|
+
}
|
|
231
|
+
(i === 0 || e[i].path !== o) && (s = i, t.push(e[i]), o = e[s].path);
|
|
232
|
+
}
|
|
233
|
+
return t.reverse(), t;
|
|
234
|
+
}
|
|
235
|
+
extractValueInfos(e, t) {
|
|
236
|
+
const s = [], o = (i, r, l) => {
|
|
237
|
+
const n = new $e();
|
|
238
|
+
let a = r.split("/").pop() || "";
|
|
239
|
+
if (a === "[]" ? a = l + this.entitySuffix : a === "root" && (a = t), n.property = a, n.value = i, n.path = r, n.propertyItem = this.createPropertyItem(i, n.property), s.push(n), i && typeof i == "object" && !Array.isArray(i)) {
|
|
240
|
+
for (const c in i)
|
|
241
|
+
if (i.hasOwnProperty(c)) {
|
|
242
|
+
const d = r ? `${r}/${c}` : c;
|
|
243
|
+
o(i[c], d, a);
|
|
244
|
+
}
|
|
245
|
+
} else
|
|
246
|
+
Array.isArray(i) && i.forEach((c, d) => {
|
|
247
|
+
const u = `${r}/[]`;
|
|
248
|
+
o(c, u, a);
|
|
249
|
+
});
|
|
250
|
+
};
|
|
251
|
+
return o(e, "root", t), s.sort((i, r) => i.path.localeCompare(r.path));
|
|
252
|
+
}
|
|
253
|
+
createPropertyItem(e, t) {
|
|
254
|
+
return new ve(t, [
|
|
255
|
+
this.createPropertyType(e, t)
|
|
256
|
+
]);
|
|
257
|
+
}
|
|
258
|
+
createPropertyType(e, t) {
|
|
259
|
+
return e === null ? new De() : e === void 0 ? new de() : typeof e == "string" ? new Fe() : typeof e == "number" && !isNaN(e) ? new Pe() : typeof e == "boolean" ? new Le() : Array.isArray(e) ? new G() : typeof e == "object" ? new O(t) : new de();
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
class Rt {
|
|
263
|
+
/**
|
|
264
|
+
*
|
|
265
|
+
* @param json
|
|
266
|
+
* @param rootName
|
|
267
|
+
*/
|
|
268
|
+
constructor(e, t = "") {
|
|
269
|
+
this.rootName = t, this.entitySuffix = "Entity", this.rootPropertyType = null, this.renderTypeScriptInterfacesFifo = [], this.renderTypeScriptInterfacesDone = [], this.rootName || (this.rootName = "Row");
|
|
270
|
+
let s;
|
|
271
|
+
typeof e == "string" ? s = this.jon2Object(e) : s = e, this.rootPropertyType = this.object2PropertyType(s);
|
|
272
|
+
}
|
|
273
|
+
jon2Object(e) {
|
|
274
|
+
return JSON.parse(e);
|
|
275
|
+
}
|
|
276
|
+
object2PropertyType(e) {
|
|
277
|
+
return new Oe().object2PropertyType(e, this.rootName);
|
|
278
|
+
}
|
|
279
|
+
renderTypeScriptInterfaces() {
|
|
280
|
+
const e = [];
|
|
281
|
+
return this.rootPropertyType && (this.renderTypeScriptInterfacesFifo = [], this.renderTypeScriptInterfacesRecursive(this.rootPropertyType, e), this.renderTypeScriptInterfacesFifoNext(e)), e;
|
|
282
|
+
}
|
|
283
|
+
renderTypeScriptInterfacesFifoNext(e) {
|
|
284
|
+
var t;
|
|
285
|
+
for (; (t = this.renderTypeScriptInterfacesFifo) != null && t.length; ) {
|
|
286
|
+
const s = this.renderTypeScriptInterfacesFifo.shift();
|
|
287
|
+
s && this.renderTypeScriptInterfacesRecursive(s, e, s.name);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
renderTypeScriptInterfacesRecursive(e = this.rootPropertyType, t = [], s = this.rootName) {
|
|
291
|
+
if (!e)
|
|
292
|
+
return t;
|
|
293
|
+
if (e instanceof G) {
|
|
294
|
+
for (const o of e.items)
|
|
295
|
+
if (this.renderTypeScriptInterfacesRecursive(o, t, s), o instanceof O) {
|
|
296
|
+
const i = o;
|
|
297
|
+
i !== this.rootPropertyType && this.renderTypeScriptInterfacesFifo.push(i);
|
|
298
|
+
}
|
|
299
|
+
} else if (e instanceof O) {
|
|
300
|
+
const o = e, i = this.getEntityName(s);
|
|
301
|
+
if (!this.renderTypeScriptInterfacesDone.includes(i)) {
|
|
302
|
+
this.renderTypeScriptInterfacesDone.push(i), t.push(`export interface ${i} {`);
|
|
303
|
+
for (const r of o.properties) {
|
|
304
|
+
const l = this.propertyItem2InterfaceDateType(r), n = this.containsUndefinedPropertyType(r) ? "?" : "";
|
|
305
|
+
t.push(" " + r.name + n + ": " + l + ";");
|
|
306
|
+
for (const a of r.types)
|
|
307
|
+
if (a instanceof O)
|
|
308
|
+
a !== this.rootPropertyType && this.renderTypeScriptInterfacesFifo.push(a);
|
|
309
|
+
else if (a instanceof G)
|
|
310
|
+
for (const c of a.items)
|
|
311
|
+
c instanceof O && this.renderTypeScriptInterfacesFifo.push(c);
|
|
312
|
+
}
|
|
313
|
+
t.push("}"), t.push("");
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
return t;
|
|
317
|
+
}
|
|
318
|
+
getEntityName(e) {
|
|
319
|
+
let t = this.trimArraySuffixes(this.firstLetterUppercase(e));
|
|
320
|
+
return t.includes(this.entitySuffix) || (t = t + this.entitySuffix), t;
|
|
321
|
+
}
|
|
322
|
+
propertyItem2InterfaceDateType(e) {
|
|
323
|
+
var s, o;
|
|
324
|
+
if (((s = e.types) == null ? void 0 : s.length) === 0)
|
|
325
|
+
return "any";
|
|
326
|
+
if (((o = e.types) == null ? void 0 : o.length) === 1)
|
|
327
|
+
return this.renderType(e.types[0], e);
|
|
328
|
+
const t = e.types.map((i) => this.renderType(i, e)).filter((i) => i !== "undefined").join(" | ");
|
|
329
|
+
return t.includes(" | ") ? "(" + t + ")" : t;
|
|
330
|
+
}
|
|
331
|
+
renderType(e, t) {
|
|
332
|
+
return e instanceof G ? `Array<(${e.items.map((o) => this.renderType(o, t)).join(" | ")})>` : e instanceof O ? this.getEntityName(t.name) : e.type;
|
|
333
|
+
}
|
|
334
|
+
containsUndefinedPropertyType(e) {
|
|
335
|
+
for (const t of e.types)
|
|
336
|
+
if (t.type === "undefined")
|
|
337
|
+
return !0;
|
|
338
|
+
return !1;
|
|
339
|
+
}
|
|
340
|
+
firstLetterUppercase(e) {
|
|
341
|
+
return !e || e.length === 0 ? "" : e[0].toUpperCase() + e.slice(1);
|
|
342
|
+
}
|
|
343
|
+
trimArraySuffixes(e) {
|
|
344
|
+
if (!e || e.length === 0)
|
|
345
|
+
return e;
|
|
346
|
+
const t = ["Array", "Arr", "List", "s"];
|
|
347
|
+
for (const s of t)
|
|
348
|
+
if (e.endsWith(s))
|
|
349
|
+
return e.slice(0, -s.length);
|
|
350
|
+
return e;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
class H {
|
|
29
354
|
// The constructor is private to prevent direct construction calls
|
|
30
355
|
// with the `new` operator
|
|
31
356
|
constructor() {
|
|
32
357
|
this.alreadySet = !1;
|
|
33
358
|
}
|
|
34
359
|
static getInstance() {
|
|
35
|
-
return
|
|
360
|
+
return H.instance || (H.instance = new H()), H.instance;
|
|
36
361
|
}
|
|
37
362
|
/**
|
|
38
363
|
* Method to set the license key for the application.
|
|
@@ -53,18 +378,18 @@ class B {
|
|
|
53
378
|
function W(h) {
|
|
54
379
|
return h && h.type === "TreeRow";
|
|
55
380
|
}
|
|
56
|
-
function
|
|
381
|
+
function ee(h) {
|
|
57
382
|
return h && h.type === "AreaModelTree";
|
|
58
383
|
}
|
|
59
|
-
function
|
|
384
|
+
function _e(h) {
|
|
60
385
|
return h && h.type === "CheckboxColumnDef";
|
|
61
386
|
}
|
|
62
|
-
class
|
|
63
|
-
constructor(e = -1, t = -1, s = -1, o = -1, i, r,
|
|
64
|
-
this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = o, this.areaIdent = i, this.sideIdent = r, this.originalEvent =
|
|
387
|
+
class oe {
|
|
388
|
+
constructor(e = -1, t = -1, s = -1, o = -1, i, r, l, n = 0, a = 0, c = 0, d = "") {
|
|
389
|
+
this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = o, this.areaIdent = i, this.sideIdent = r, this.originalEvent = l, this.clickCount = n, this.draggingX = a, this.draggingY = c, this.action = d;
|
|
65
390
|
}
|
|
66
391
|
clone() {
|
|
67
|
-
return new
|
|
392
|
+
return new oe(
|
|
68
393
|
this.rowIndex,
|
|
69
394
|
this.rowTop,
|
|
70
395
|
this.columnIndex,
|
|
@@ -79,25 +404,25 @@ class te {
|
|
|
79
404
|
);
|
|
80
405
|
}
|
|
81
406
|
}
|
|
82
|
-
class
|
|
407
|
+
class L {
|
|
83
408
|
constructor(e = ">", t = "", s = []) {
|
|
84
409
|
this.content = e, this.style = t, this.classes = s;
|
|
85
410
|
}
|
|
86
411
|
}
|
|
87
|
-
class
|
|
88
|
-
constructor(e = new
|
|
412
|
+
class Ae {
|
|
413
|
+
constructor(e = new L(
|
|
89
414
|
">",
|
|
90
415
|
"transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
|
|
91
416
|
["gt-table-tree-arrow-expanded"]
|
|
92
|
-
), t = new
|
|
417
|
+
), t = new L(
|
|
93
418
|
">",
|
|
94
419
|
"",
|
|
95
420
|
["ge-table-tree-arrow-collapsed"]
|
|
96
|
-
), s = new
|
|
421
|
+
), s = new L(
|
|
97
422
|
">",
|
|
98
423
|
"color:transparent;",
|
|
99
424
|
["gt-table-tree-arrow-hidden"]
|
|
100
|
-
), o = new
|
|
425
|
+
), o = new L(
|
|
101
426
|
"↕",
|
|
102
427
|
"",
|
|
103
428
|
["gt-table-tree-arrow-expanded-all"]
|
|
@@ -105,12 +430,12 @@ class we {
|
|
|
105
430
|
this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = s, this.arrowExpandCollapseAll = o;
|
|
106
431
|
}
|
|
107
432
|
}
|
|
108
|
-
class
|
|
109
|
-
constructor(e = new
|
|
433
|
+
class Re {
|
|
434
|
+
constructor(e = new L("↑", "", ["ge-header-sorted-asc"]), t = new L("↓", "", ["ge-header-sorted-desc"]), s = new L("↑", "color:transparent;", [])) {
|
|
110
435
|
this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = s;
|
|
111
436
|
}
|
|
112
437
|
}
|
|
113
|
-
class
|
|
438
|
+
class Be {
|
|
114
439
|
constructor(e) {
|
|
115
440
|
this.domService = e;
|
|
116
441
|
}
|
|
@@ -184,26 +509,26 @@ class Me {
|
|
|
184
509
|
return this.addClass(e, s), this.domService.appendChild(t, s), s;
|
|
185
510
|
}
|
|
186
511
|
addRowDiv(e, t, s = -1, o, i, r = "") {
|
|
187
|
-
const
|
|
188
|
-
if (this.domService.addClass(
|
|
189
|
-
const
|
|
190
|
-
this.domService.addClass(
|
|
512
|
+
const l = t.index ?? -1, n = this.getDivOrCreateDiv(l, e);
|
|
513
|
+
if (this.domService.addClass(n, "ge-table-row-div"), this.domService.addClass(n, `ge-table-row-div-${t.index}`), o === "body" && i === "center") {
|
|
514
|
+
const a = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
515
|
+
this.domService.addClass(n, `ge-table-row-${a}`);
|
|
191
516
|
}
|
|
192
|
-
if (this.domService.setStyle(
|
|
193
|
-
const
|
|
194
|
-
this.domService.appendChild(
|
|
517
|
+
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", `${o}`), r) {
|
|
518
|
+
const a = this.domService.createText(r);
|
|
519
|
+
this.domService.appendChild(n, a);
|
|
195
520
|
}
|
|
196
|
-
return this.domService.appendChild(e.child,
|
|
521
|
+
return this.domService.appendChild(e.child, n), n;
|
|
197
522
|
}
|
|
198
523
|
addColumnDiv(e) {
|
|
199
|
-
const { parent: t, geo: s, rowIndex: o = -1, columnIndex: i = -1, areaIdent: r, sideIdent:
|
|
200
|
-
this.domService.addClass(m, "ge-table-col-div"),
|
|
201
|
-
const
|
|
202
|
-
if (r === "body" &&
|
|
203
|
-
const b =
|
|
204
|
-
this.addLabelDiv(m,
|
|
524
|
+
const { parent: t, geo: s, rowIndex: o = -1, columnIndex: i = -1, areaIdent: r, sideIdent: l, text: n = "", treeArrow: a, tableOptions: c, checkedType: d = void 0, sortState: u } = e, f = c == null ? void 0 : c.treeOptions, g = c == null ? void 0 : c.showCheckboxWihoutExtraColumn, m = this.domService.createElement("div");
|
|
525
|
+
this.domService.addClass(m, "ge-table-col-div"), g && this.domService.addClass(m, "ge-with-checkbox"), this.domService.addClass(m, `ge-table-col-div-${s.index}`), this.domService.setAttribute(m, "data-col-index", `${s.index}`), this.domService.setAttribute(m, "data-row-index", `${o}`), this.domService.setAttribute(m, "data-area", `${r}`);
|
|
526
|
+
const p = ((s == null ? void 0 : s.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
527
|
+
if (r === "body" && l === "center" && this.domService.addClass(m, `ge-table-column-${p}`), this.domService.setStyle(m, "display", "clip"), this.domService.setStyle(m, "position", "absolute"), this.domService.setStyle(m, "left", `${s.left}px`), this.domService.setStyle(m, "top", `${s.top}px`), this.domService.setStyle(m, "width", `${s.width}px`), this.domService.setStyle(m, "height", `${s.height}px`), a && a !== "none" && (this.domService.addClass(m, "ge-table-col-tree"), this.addArrowDiv(m, a, f, o, i, r)), g && i === 0 && d && this.addCheckboxToDiv(m, d, r, o), n) {
|
|
528
|
+
const b = a !== "none" && i === 0;
|
|
529
|
+
this.addLabelDiv(m, n, b, o, i, r);
|
|
205
530
|
}
|
|
206
|
-
return u && this.addSortedIcon(m, u,
|
|
531
|
+
return u && this.addSortedIcon(m, u, c == null ? void 0 : c.sortedOptions, i), this.domService.appendChild(t, m), m;
|
|
207
532
|
}
|
|
208
533
|
addCheckboxToDiv(e, t, s, o) {
|
|
209
534
|
const i = this.domService.createElement("div"), r = t === "full" ? "checked" : "";
|
|
@@ -217,40 +542,40 @@ class Me {
|
|
|
217
542
|
class="ge-table-row-checkbox"> `, this.domService.setStyle(i, "display", "inline"), this.domService.setStyle(i, "width", "inherit"), this.domService.setAttribute(i, "data-row-index", `${o}`), this.domService.appendChild(e, i), i;
|
|
218
543
|
}
|
|
219
544
|
addLabelDiv(e, t = "", s = !1, o = -1, i = -1, r = "body") {
|
|
220
|
-
const
|
|
221
|
-
if (this.domService.addClass(
|
|
545
|
+
const l = this.domService.createElement("div");
|
|
546
|
+
if (this.domService.addClass(l, "ge-table-label-div"), this.domService.setStyle(l, "position", "relative"), this.domService.setStyle(l, "background", "transparent"), this.domService.setStyle(l, "width", "100%"), this.domService.setStyle(l, "height", "100%"), this.domService.setAttribute(l, "data-row-index", `${o}`), this.domService.setAttribute(l, "data-col-index", `${i}`), this.domService.setAttribute(l, "data-area", `${r}`), t)
|
|
222
547
|
if (s) {
|
|
223
|
-
const
|
|
224
|
-
this.domService.appendChild(
|
|
548
|
+
const n = this.domService.createText(t);
|
|
549
|
+
this.domService.appendChild(l, n);
|
|
225
550
|
} else {
|
|
226
|
-
const
|
|
227
|
-
this.domService.appendChild(
|
|
228
|
-
const
|
|
229
|
-
this.domService.addClass(
|
|
551
|
+
const n = this.domService.createElement("div");
|
|
552
|
+
this.domService.appendChild(l, n);
|
|
553
|
+
const a = this.domService.createText(t);
|
|
554
|
+
this.domService.addClass(n, "ge-table-label"), this.domService.appendChild(n, a), this.domService.setAttribute(n, "data-row-index", `${o}`), this.domService.setAttribute(n, "data-col-index", `${i}`), this.domService.setAttribute(n, "data-area", `${r}`);
|
|
230
555
|
}
|
|
231
|
-
return this.domService.appendChild(e,
|
|
556
|
+
return this.domService.appendChild(e, l), l;
|
|
232
557
|
}
|
|
233
|
-
addSortedIcon(e, t = "", s = new
|
|
558
|
+
addSortedIcon(e, t = "", s = new Re(), o = -1) {
|
|
234
559
|
const i = this.domService.createElement("div");
|
|
235
560
|
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");
|
|
236
561
|
let r;
|
|
237
562
|
t === "asc" ? r = s.iconAsc : t === "desc" ? r = s.iconDesc : r = s.iconPlaceholder;
|
|
238
|
-
const
|
|
239
|
-
this.domService.appendChild(i,
|
|
240
|
-
for (const
|
|
241
|
-
this.domService.addClass(i,
|
|
563
|
+
const l = r.content, n = this.domService.createText(l);
|
|
564
|
+
this.domService.appendChild(i, n), r.style && this.applyStyleString(i, r.style);
|
|
565
|
+
for (const a of r.classes)
|
|
566
|
+
this.domService.addClass(i, a);
|
|
242
567
|
return this.domService.appendChild(e, i), i;
|
|
243
568
|
}
|
|
244
|
-
addArrowDiv(e, t = "none", s = new
|
|
245
|
-
const
|
|
246
|
-
this.domService.addClass(
|
|
247
|
-
let
|
|
248
|
-
t === "expanded" ?
|
|
249
|
-
const
|
|
250
|
-
this.domService.appendChild(
|
|
251
|
-
for (const d of
|
|
252
|
-
this.domService.addClass(
|
|
253
|
-
return this.domService.appendChild(e,
|
|
569
|
+
addArrowDiv(e, t = "none", s = new Ae(), o = -1, i = -1, r = "body") {
|
|
570
|
+
const l = this.domService.createElement("div");
|
|
571
|
+
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}`);
|
|
572
|
+
let n;
|
|
573
|
+
t === "expanded" ? n = s.arrowExpanded : t === "collapsed" ? n = s.arrowCollapsed : n = s.arrowPlaceholder;
|
|
574
|
+
const a = n.content, c = this.domService.createText(a);
|
|
575
|
+
this.domService.appendChild(l, c), n.style && this.applyStyleString(l, n.style);
|
|
576
|
+
for (const d of n.classes)
|
|
577
|
+
this.domService.addClass(l, d);
|
|
578
|
+
return this.domService.appendChild(e, l), l;
|
|
254
579
|
}
|
|
255
580
|
addColumnBorderDivs(e, t, s, o, i) {
|
|
256
581
|
if (e.verticalBorderVisible) {
|
|
@@ -292,20 +617,20 @@ class Me {
|
|
|
292
617
|
return s ? (s.innerText = "", s) : (s = this.domService.createElement("div"), t.cache[e] = s, s);
|
|
293
618
|
}
|
|
294
619
|
}
|
|
295
|
-
const
|
|
296
|
-
class
|
|
620
|
+
const J = (h) => h === "header" ? "header" : h === "footer" ? "footer" : "body";
|
|
621
|
+
class He {
|
|
297
622
|
constructor(e, t) {
|
|
298
623
|
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)) {
|
|
299
624
|
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"));
|
|
300
625
|
const s = e.getAttribute("data-area");
|
|
301
|
-
if (s && (this.areaIdent =
|
|
626
|
+
if (s && (this.areaIdent = J(s), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
|
|
302
627
|
const o = e;
|
|
303
628
|
this.value = o.value;
|
|
304
629
|
}
|
|
305
630
|
}
|
|
306
631
|
}
|
|
307
632
|
}
|
|
308
|
-
class
|
|
633
|
+
class Ve {
|
|
309
634
|
constructor(e) {
|
|
310
635
|
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(
|
|
311
636
|
(t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
|
|
@@ -335,7 +660,7 @@ class ke {
|
|
|
335
660
|
if (t - this.lastClicked < this.doubleClickDelay)
|
|
336
661
|
return;
|
|
337
662
|
this.lastClicked = t;
|
|
338
|
-
const s = new
|
|
663
|
+
const s = new He(e.target, this.tableScope);
|
|
339
664
|
if (s.action === "toggleExpandCollapseAll")
|
|
340
665
|
this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
|
|
341
666
|
else if (s.action === "toggleHeaderGroup")
|
|
@@ -364,15 +689,15 @@ class ke {
|
|
|
364
689
|
*/
|
|
365
690
|
onHostElementDblClicked(e) {
|
|
366
691
|
if (this.lastClicked = Date.now(), e.target instanceof HTMLElement) {
|
|
367
|
-
const t = e.target, s = t.getAttribute("data-area"), o =
|
|
692
|
+
const t = e.target, s = t.getAttribute("data-area"), o = J(s), i = Number(t.getAttribute("data-row-index")), r = Number(t.getAttribute("data-col-index")), l = this.tableScope.tableModel.getAreaModel(o);
|
|
368
693
|
if (s && o === "header")
|
|
369
694
|
this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, i, r));
|
|
370
695
|
else if (t.getAttribute("data-row-index")) {
|
|
371
|
-
const
|
|
372
|
-
if (s && o === "body" &&
|
|
696
|
+
const n = l.getRowByIndex(i);
|
|
697
|
+
if (s && o === "body" && l.isEditable(i, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(i, r)), W(n) && r === this.getArrowColumnIndex()) {
|
|
373
698
|
e.preventDefault(), e.stopPropagation();
|
|
374
|
-
const
|
|
375
|
-
|
|
699
|
+
const a = n;
|
|
700
|
+
a.expanded = !a.expanded, "recalcVisibleTreeRows" in l && l.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(a);
|
|
376
701
|
}
|
|
377
702
|
}
|
|
378
703
|
}
|
|
@@ -397,11 +722,11 @@ class ke {
|
|
|
397
722
|
* @returns {void}
|
|
398
723
|
*/
|
|
399
724
|
updateCollapsedExpandedState(e) {
|
|
400
|
-
var s, o, i, r,
|
|
725
|
+
var s, o, i, r, l;
|
|
401
726
|
const t = (o = (s = this.tableScope.tableOptions) == null ? void 0 : s.autoRestoreOptions) == null ? void 0 : o.getRowId;
|
|
402
727
|
if (t) {
|
|
403
|
-
const
|
|
404
|
-
|
|
728
|
+
const n = (i = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : i.collapsedExpandedStateGet().mode, a = n === "collapsed" && !e.expanded || n === "expanded" && e.expanded, c = n === "collapsed" && e.expanded || n === "expanded" && !e.expanded, d = t(e.data);
|
|
729
|
+
a ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(d) : c && ((l = this.tableScope.storeStateCollapsedExpandService) == null || l.collapsedStateIdsRemove(d));
|
|
405
730
|
}
|
|
406
731
|
}
|
|
407
732
|
getArrowColumnIndex() {
|
|
@@ -437,7 +762,7 @@ class ke {
|
|
|
437
762
|
}
|
|
438
763
|
}
|
|
439
764
|
}
|
|
440
|
-
class
|
|
765
|
+
class We {
|
|
441
766
|
constructor(e) {
|
|
442
767
|
this.tableScope = e;
|
|
443
768
|
}
|
|
@@ -624,12 +949,12 @@ class Ie {
|
|
|
624
949
|
downloadExcel(e = "table.xlsx", t = "") {
|
|
625
950
|
const s = [], o = this.tableScope.tableModel.getColumnCount(), i = ["header", "body", "footer"];
|
|
626
951
|
for (const r of i) {
|
|
627
|
-
const
|
|
628
|
-
for (let
|
|
629
|
-
const
|
|
630
|
-
s.push(
|
|
952
|
+
const l = this.tableScope.tableModel.getAreaModel(r), n = (l == null ? void 0 : l.getRowCount()) ?? 0;
|
|
953
|
+
for (let a = 0; a < n; a++) {
|
|
954
|
+
const c = [];
|
|
955
|
+
s.push(c);
|
|
631
956
|
for (let d = 0; d < o; d++)
|
|
632
|
-
|
|
957
|
+
c.push(l.getValueAt(a, d));
|
|
633
958
|
}
|
|
634
959
|
}
|
|
635
960
|
return this.tableScope.excelService.downloadExcel(s, e, t);
|
|
@@ -664,7 +989,7 @@ class Ie {
|
|
|
664
989
|
return this.tableScope.tableModel;
|
|
665
990
|
}
|
|
666
991
|
}
|
|
667
|
-
class
|
|
992
|
+
class ie {
|
|
668
993
|
constructor(e) {
|
|
669
994
|
this.getStorageKeyFn = e;
|
|
670
995
|
}
|
|
@@ -739,7 +1064,7 @@ class se {
|
|
|
739
1064
|
// }
|
|
740
1065
|
// }
|
|
741
1066
|
}
|
|
742
|
-
class
|
|
1067
|
+
class Ne extends ie {
|
|
743
1068
|
constructor(e) {
|
|
744
1069
|
super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
|
|
745
1070
|
}
|
|
@@ -761,14 +1086,14 @@ class De extends se {
|
|
|
761
1086
|
}
|
|
762
1087
|
}
|
|
763
1088
|
}
|
|
764
|
-
class
|
|
1089
|
+
class Ge {
|
|
765
1090
|
constructor(e = "collapsed", t = [], s = !1, o = !1) {
|
|
766
1091
|
this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = o;
|
|
767
1092
|
}
|
|
768
1093
|
}
|
|
769
|
-
class
|
|
1094
|
+
class ze extends ie {
|
|
770
1095
|
constructor(e) {
|
|
771
|
-
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new
|
|
1096
|
+
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new Ge(), this.load();
|
|
772
1097
|
}
|
|
773
1098
|
collapsedExpandedStateGet() {
|
|
774
1099
|
return this.collapsedExpandedState;
|
|
@@ -800,7 +1125,7 @@ class Le extends se {
|
|
|
800
1125
|
this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
|
|
801
1126
|
}
|
|
802
1127
|
}
|
|
803
|
-
class
|
|
1128
|
+
class je extends ie {
|
|
804
1129
|
constructor(e) {
|
|
805
1130
|
super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
|
|
806
1131
|
}
|
|
@@ -821,14 +1146,14 @@ class $e extends se {
|
|
|
821
1146
|
}
|
|
822
1147
|
}
|
|
823
1148
|
}
|
|
824
|
-
class
|
|
1149
|
+
class P {
|
|
825
1150
|
constructor(e = 0, t = 0, s = 0, o = 0, i) {
|
|
826
1151
|
this.left = e, this.width = t, this.height = s, this.top = o, this.index = i;
|
|
827
1152
|
}
|
|
828
1153
|
}
|
|
829
|
-
class
|
|
1154
|
+
class Ue {
|
|
830
1155
|
constructor(e, t, s, o) {
|
|
831
|
-
this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = o, this.scrollTop = 0, this.areaBodyWestGeo = new
|
|
1156
|
+
this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = o, this.scrollTop = 0, this.areaBodyWestGeo = new P(), this.areaBodyCenterGeo = new P(), this.areaBodyEastGeo = new P();
|
|
832
1157
|
const i = this.hostElement;
|
|
833
1158
|
i.innerText = "", this.dom.setAttribute(i, "tabindex", "0"), this.dom.setStyle(
|
|
834
1159
|
this.dom.addClass("ge-table", i),
|
|
@@ -1032,7 +1357,7 @@ class R {
|
|
|
1032
1357
|
return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
|
|
1033
1358
|
}
|
|
1034
1359
|
}
|
|
1035
|
-
class
|
|
1360
|
+
class Xe {
|
|
1036
1361
|
constructor(e, t) {
|
|
1037
1362
|
this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
|
|
1038
1363
|
}
|
|
@@ -1046,9 +1371,9 @@ class Oe {
|
|
|
1046
1371
|
let i = this.areaModel.getColspanAt(s, o), r = this.areaModel.getRowspanAt(s, o);
|
|
1047
1372
|
if (i > 1 || r > 1) {
|
|
1048
1373
|
i === 0 && (i = 1), r === 0 && (r = 1);
|
|
1049
|
-
const
|
|
1374
|
+
const l = "gammaCells" in this.areaModel;
|
|
1050
1375
|
this.colAndRowspanRanges.push(
|
|
1051
|
-
new R(s, o, s + r - 1, o + i - 1,
|
|
1376
|
+
new R(s, o, s + r - 1, o + i - 1, l)
|
|
1052
1377
|
);
|
|
1053
1378
|
}
|
|
1054
1379
|
}
|
|
@@ -1065,22 +1390,22 @@ class Oe {
|
|
|
1065
1390
|
return !1;
|
|
1066
1391
|
}
|
|
1067
1392
|
}
|
|
1068
|
-
class
|
|
1393
|
+
class I {
|
|
1069
1394
|
constructor(e, t, s) {
|
|
1070
1395
|
this.header = e, this.body = t, this.footer = s;
|
|
1071
1396
|
}
|
|
1072
1397
|
}
|
|
1073
|
-
class
|
|
1398
|
+
class Ke extends Ue {
|
|
1074
1399
|
constructor(e, t, s, o) {
|
|
1075
|
-
var r,
|
|
1400
|
+
var r, l;
|
|
1076
1401
|
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 = {
|
|
1077
1402
|
header: [],
|
|
1078
1403
|
body: [],
|
|
1079
1404
|
footer: []
|
|
1080
|
-
}, this.tree = !1, this.colAndRowspanModels = new
|
|
1081
|
-
(
|
|
1082
|
-
var
|
|
1083
|
-
this.colAndRowspanModels[
|
|
1405
|
+
}, this.tree = !1, this.colAndRowspanModels = new I(), 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), ee(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
|
|
1406
|
+
(n) => {
|
|
1407
|
+
var a;
|
|
1408
|
+
this.colAndRowspanModels[n] = new Xe(t, t.getAreaModel(n)), (a = this.colAndRowspanModels[n]) == null || a.init();
|
|
1084
1409
|
}
|
|
1085
1410
|
);
|
|
1086
1411
|
}
|
|
@@ -1166,19 +1491,19 @@ class _e extends Pe {
|
|
|
1166
1491
|
for (const t of this.removables)
|
|
1167
1492
|
t.remove();
|
|
1168
1493
|
this.hideHoverRow(), this.hideHoverColumn(), this.scrollTop = this.scrollViewport.scrollTop, this.scrollLeft = this.scrollViewport.scrollLeft, this.debounce(this.checkForScrollPosSaving.bind(this)), this.scrollFactorY = this.scrollTop / (this.scrollViewport.scrollHeight - this.scrollViewport.clientHeight), this.scrollFactorX = this.scrollLeft / (this.scrollViewport.scrollWidth - this.scrollViewport.clientWidth), isNaN(this.scrollFactorY) && (this.scrollFactorY = 0), isNaN(this.scrollFactorX) && (this.scrollFactorX = 0), this.adjustBody(), this.adjustArea("footer"), this.adjustArea("header"), this.tableOptions.tableTopBorderVisible && this.removables.push(this.dom.addHorizontalBorder(
|
|
1169
|
-
new
|
|
1494
|
+
new P(0, this.hostElement.clientWidth, 1, 0),
|
|
1170
1495
|
this.hostElement,
|
|
1171
1496
|
"ge-table-border"
|
|
1172
1497
|
)), this.tableOptions.tableBottomBorderVisible && this.removables.push(this.dom.addHorizontalBorder(
|
|
1173
|
-
new
|
|
1498
|
+
new P(0, this.hostElement.clientWidth, 1, this.hostElement.clientHeight - 1),
|
|
1174
1499
|
this.hostElement,
|
|
1175
1500
|
"ge-table-border"
|
|
1176
1501
|
)), this.tableModel.getFixedLeftColumnCount() > 0 && this.removables.push(this.dom.addVerticalBorder(
|
|
1177
|
-
new
|
|
1502
|
+
new P(this.areaBodyWest.child.clientWidth, 1, this.hostElement.clientHeight, 0),
|
|
1178
1503
|
this.hostElement,
|
|
1179
1504
|
"ge-table-body-west-vertical-border"
|
|
1180
1505
|
)), ((e = this.tableModel.getAreaModel("header")) == null ? void 0 : e.getRowCount()) > 0 && this.removables.push(this.dom.addHorizontalBorder(
|
|
1181
|
-
new
|
|
1506
|
+
new P(0, this.hostElement.clientWidth, 1, this.areaHeaderCenter.child.clientHeight),
|
|
1182
1507
|
this.hostElement,
|
|
1183
1508
|
"ge-table-body-west-vertical-border"
|
|
1184
1509
|
));
|
|
@@ -1217,23 +1542,23 @@ class _e extends Pe {
|
|
|
1217
1542
|
* @param {string[]} cssClasses - An array of CSS classes to be applied to the cell.
|
|
1218
1543
|
*/
|
|
1219
1544
|
rerenderCellContent({ area: e, rowIndex: t, columnIndex: s, value: o, cssClasses: i }) {
|
|
1220
|
-
const r = this.tableModel.getAreaModel(e),
|
|
1221
|
-
if (
|
|
1222
|
-
let
|
|
1223
|
-
const
|
|
1545
|
+
const r = this.tableModel.getAreaModel(e), l = 'div[data-col-index="' + s + '"][data-row-index="' + t + '"][data-area="' + e + '"]', n = document.querySelector(l);
|
|
1546
|
+
if (n) {
|
|
1547
|
+
let a;
|
|
1548
|
+
const c = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === s;
|
|
1224
1549
|
let d;
|
|
1225
|
-
if (
|
|
1226
|
-
|
|
1550
|
+
if (c ? d = this.editorRenderer : d = r.getCellRenderer(t, s), n.innerText = "", this.applyCssClasses(n, i), d)
|
|
1551
|
+
a = d.render(n, t, s, e, r, o, this.dom.domService), a && this.cleanupFunctions[e].push(a);
|
|
1227
1552
|
else {
|
|
1228
|
-
const
|
|
1229
|
-
this.dom.addLabelDiv(
|
|
1553
|
+
const g = `${o}`;
|
|
1554
|
+
this.dom.addLabelDiv(n, g, !1, t, s, e);
|
|
1230
1555
|
}
|
|
1231
1556
|
const u = r.getCustomClassesAt(t, s);
|
|
1232
|
-
u.length && this.dom.addClasses(u,
|
|
1557
|
+
u.length && this.dom.addClasses(u, n);
|
|
1233
1558
|
const f = r.getCustomStyleAt(t, s);
|
|
1234
1559
|
if (f)
|
|
1235
|
-
for (const
|
|
1236
|
-
this.dom.setStyle(
|
|
1560
|
+
for (const g in f)
|
|
1561
|
+
this.dom.setStyle(n, g, f[g]);
|
|
1237
1562
|
}
|
|
1238
1563
|
}
|
|
1239
1564
|
/**
|
|
@@ -1342,67 +1667,67 @@ class _e extends Pe {
|
|
|
1342
1667
|
* @protected
|
|
1343
1668
|
*/
|
|
1344
1669
|
adjustArea(e, t = 0) {
|
|
1345
|
-
var
|
|
1670
|
+
var p;
|
|
1346
1671
|
const s = this.getArea(e, "west"), o = this.getArea(e, "center"), i = this.getArea(e, "east"), r = o.child.clientHeight;
|
|
1347
1672
|
s.child.innerText = "", o.child.innerText = "", i.child.innerText = "";
|
|
1348
|
-
const
|
|
1673
|
+
const l = 0, n = this.areaBodyCenterGeo.width, a = this.tableModel.getPadding(), c = this.tableModel.getAreaModel(e), d = c.getRowCount();
|
|
1349
1674
|
for (; this.cleanupFunctions[e].length; ) {
|
|
1350
1675
|
const b = this.cleanupFunctions[e].shift();
|
|
1351
1676
|
b && b();
|
|
1352
1677
|
}
|
|
1353
1678
|
let u = t;
|
|
1354
|
-
const f = this.tableModel.getColumnCount(),
|
|
1679
|
+
const f = this.tableModel.getColumnCount(), g = this.tableModel.getFixedRightColumnCount(), m = this.tableModel.getFixedLeftColumnCount();
|
|
1355
1680
|
for (let b = 0; b < d; b++) {
|
|
1356
|
-
const
|
|
1357
|
-
if (
|
|
1681
|
+
const x = u, S = b === d - 1, A = this.tableModel.getRowHeight(e, b);
|
|
1682
|
+
if (x + A > 0) {
|
|
1358
1683
|
this.firstVisibleRowIndex = b;
|
|
1359
|
-
let
|
|
1360
|
-
const
|
|
1684
|
+
let C = { left: l, width: n, height: A, top: x, index: b }, w = this.dom.addRowDiv(o, C, b, e, "center");
|
|
1685
|
+
const k = m;
|
|
1361
1686
|
if (this.adjustColumnsToRowParent({
|
|
1362
1687
|
areaIdent: e,
|
|
1363
1688
|
sideIdent: "center",
|
|
1364
|
-
areaModel:
|
|
1365
|
-
geo:
|
|
1689
|
+
areaModel: c,
|
|
1690
|
+
geo: C,
|
|
1366
1691
|
parent: w,
|
|
1367
1692
|
rowIndex: b,
|
|
1368
|
-
columnIndexStart:
|
|
1369
|
-
columnIndexEnd: f -
|
|
1693
|
+
columnIndexStart: k,
|
|
1694
|
+
columnIndexEnd: f - g - 1,
|
|
1370
1695
|
verticalFixed: !1,
|
|
1371
|
-
lastRowOfModel:
|
|
1372
|
-
}),
|
|
1696
|
+
lastRowOfModel: S
|
|
1697
|
+
}), a.left > 0 && (C = { left: l, width: this.areaBodyWestGeo.width, height: A, top: x, index: b }, w = this.dom.addRowDiv(s, C, b, e, "west"), this.adjustColumnsToRowParent({
|
|
1373
1698
|
areaIdent: e,
|
|
1374
1699
|
sideIdent: "west",
|
|
1375
|
-
areaModel:
|
|
1376
|
-
geo:
|
|
1700
|
+
areaModel: c,
|
|
1701
|
+
geo: C,
|
|
1377
1702
|
parent: w,
|
|
1378
1703
|
rowIndex: b,
|
|
1379
1704
|
columnIndexStart: 0,
|
|
1380
|
-
columnIndexEnd:
|
|
1705
|
+
columnIndexEnd: k - 1,
|
|
1381
1706
|
verticalFixed: !0,
|
|
1382
|
-
lastRowOfModel:
|
|
1383
|
-
})),
|
|
1707
|
+
lastRowOfModel: S
|
|
1708
|
+
})), a.right > 0 && (C = { left: l, width: this.areaBodyEastGeo.width, height: A, top: x, index: b }, w = this.dom.addRowDiv(i, C, b, e, "east"), this.adjustColumnsToRowParent({
|
|
1384
1709
|
areaIdent: e,
|
|
1385
1710
|
sideIdent: "east",
|
|
1386
|
-
areaModel:
|
|
1387
|
-
geo:
|
|
1711
|
+
areaModel: c,
|
|
1712
|
+
geo: C,
|
|
1388
1713
|
parent: w,
|
|
1389
1714
|
rowIndex: b,
|
|
1390
|
-
columnIndexStart: f -
|
|
1715
|
+
columnIndexStart: f - g,
|
|
1391
1716
|
columnIndexEnd: f - 1,
|
|
1392
1717
|
verticalFixed: !0,
|
|
1393
|
-
lastRowOfModel:
|
|
1718
|
+
lastRowOfModel: S
|
|
1394
1719
|
})), e === "header" && this.tree && b === d - 1) {
|
|
1395
1720
|
const E = this.dom.applyStyle(
|
|
1396
1721
|
this.dom.setAttribute(
|
|
1397
|
-
this.dom.addDiv(w, new
|
|
1722
|
+
this.dom.addDiv(w, new P(16, 20, 20, 8)),
|
|
1398
1723
|
"data-ge-action",
|
|
1399
1724
|
"toggleExpandCollapseAll"
|
|
1400
1725
|
),
|
|
1401
1726
|
{ cursor: "pointer" }
|
|
1402
1727
|
), M = this.tableOptions.treeOptions.arrowExpandCollapseAll;
|
|
1403
1728
|
if (M) {
|
|
1404
|
-
const
|
|
1405
|
-
this.dom.domService.appendChild(E,
|
|
1729
|
+
const z = this.dom.domService.createText(M.content);
|
|
1730
|
+
this.dom.domService.appendChild(E, z), M.style && this.dom.applyStyleString(E, M.style);
|
|
1406
1731
|
}
|
|
1407
1732
|
}
|
|
1408
1733
|
}
|
|
@@ -1410,19 +1735,19 @@ class _e extends Pe {
|
|
|
1410
1735
|
break;
|
|
1411
1736
|
}
|
|
1412
1737
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
|
|
1413
|
-
const b = ((
|
|
1738
|
+
const b = ((p = this.colAndRowspanModels[e]) == null ? void 0 : p.getRanges()) ?? [];
|
|
1414
1739
|
if (b.length)
|
|
1415
|
-
for (const
|
|
1416
|
-
let
|
|
1417
|
-
if (
|
|
1418
|
-
A = s.child,
|
|
1419
|
-
else if (
|
|
1420
|
-
A = i.child,
|
|
1740
|
+
for (const x of b) {
|
|
1741
|
+
let S = 0, A = o.child, C = "center";
|
|
1742
|
+
if (x.c1 < m)
|
|
1743
|
+
A = s.child, C = "west";
|
|
1744
|
+
else if (g > 0 && x.c1 >= f - g)
|
|
1745
|
+
A = i.child, C = "east";
|
|
1421
1746
|
else {
|
|
1422
1747
|
const w = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1423
|
-
|
|
1748
|
+
S = this.scrollFactorX * w - this.areaBodyWestGeo.width, C = "center";
|
|
1424
1749
|
}
|
|
1425
|
-
this.drawBigCell(
|
|
1750
|
+
this.drawBigCell(x, S, t, c, A, C);
|
|
1426
1751
|
}
|
|
1427
1752
|
}
|
|
1428
1753
|
}
|
|
@@ -1437,24 +1762,24 @@ class _e extends Pe {
|
|
|
1437
1762
|
* @protected
|
|
1438
1763
|
*/
|
|
1439
1764
|
drawBigCell(e, t, s, o, i, r) {
|
|
1440
|
-
const
|
|
1441
|
-
let
|
|
1442
|
-
|
|
1443
|
-
const d = t + this.getColumnWidths(
|
|
1444
|
-
let
|
|
1765
|
+
const l = s + this.getRowHeights(0, e.r1 - 1, o).reduce((p, b) => p + b, 0), n = this.tableModel.getColumnCount(), a = this.tableModel.getFixedRightColumnCount();
|
|
1766
|
+
let c = 0;
|
|
1767
|
+
a > 0 && e.c1 >= n - a && (c = n - a);
|
|
1768
|
+
const d = t + this.getColumnWidths(c, e.c1 - 1).reduce((p, b) => p + b, 0), u = this.getRowHeights(e.r1, e.r2, o).reduce((p, b) => p + b, 0), f = this.getColumnWidths(e.c1, e.c2).reduce((p, b) => p + b, 0);
|
|
1769
|
+
let g = !1;
|
|
1445
1770
|
const m = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
1446
|
-
m && (
|
|
1771
|
+
m && (g = m.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? this.renderCell({
|
|
1447
1772
|
areaModel: o,
|
|
1448
1773
|
areaIdent: o.areaIdent,
|
|
1449
1774
|
sideIdent: r,
|
|
1450
1775
|
rowIndex: e.r1,
|
|
1451
1776
|
columnIndex: e.c1,
|
|
1452
1777
|
left: d,
|
|
1453
|
-
top:
|
|
1778
|
+
top: l,
|
|
1454
1779
|
width: f,
|
|
1455
1780
|
height: u,
|
|
1456
1781
|
parent: i,
|
|
1457
|
-
cellSelected:
|
|
1782
|
+
cellSelected: g,
|
|
1458
1783
|
lastRowOfModel: !0,
|
|
1459
1784
|
gammaRange: e.gammaRange
|
|
1460
1785
|
}) : this.renderCell({
|
|
@@ -1464,18 +1789,18 @@ class _e extends Pe {
|
|
|
1464
1789
|
rowIndex: e.r1,
|
|
1465
1790
|
columnIndex: e.c1,
|
|
1466
1791
|
left: d,
|
|
1467
|
-
top:
|
|
1792
|
+
top: l,
|
|
1468
1793
|
width: f,
|
|
1469
1794
|
height: u,
|
|
1470
1795
|
parent: i,
|
|
1471
|
-
cellSelected:
|
|
1796
|
+
cellSelected: g,
|
|
1472
1797
|
lastRowOfModel: !0,
|
|
1473
1798
|
gammaRange: e.gammaRange
|
|
1474
1799
|
}), o.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1475
1800
|
rowIndex: e.r1,
|
|
1476
1801
|
columnIndex: e.c1,
|
|
1477
1802
|
cellLeft: d,
|
|
1478
|
-
cellTop:
|
|
1803
|
+
cellTop: l,
|
|
1479
1804
|
cellWidth: f,
|
|
1480
1805
|
cellHeight: u,
|
|
1481
1806
|
parent: i
|
|
@@ -1515,64 +1840,64 @@ class _e extends Pe {
|
|
|
1515
1840
|
geo: o,
|
|
1516
1841
|
parent: i,
|
|
1517
1842
|
rowIndex: r,
|
|
1518
|
-
columnIndexStart:
|
|
1519
|
-
columnIndexEnd:
|
|
1520
|
-
verticalFixed:
|
|
1521
|
-
lastRowOfModel:
|
|
1843
|
+
columnIndexStart: l,
|
|
1844
|
+
columnIndexEnd: n,
|
|
1845
|
+
verticalFixed: a = !1,
|
|
1846
|
+
lastRowOfModel: c = !1
|
|
1522
1847
|
}) {
|
|
1523
1848
|
var m;
|
|
1524
1849
|
this.scrollViewportLeft = this.scrollViewport.scrollLeft;
|
|
1525
1850
|
let d = 0;
|
|
1526
|
-
if (!
|
|
1527
|
-
const
|
|
1528
|
-
d = this.scrollFactorX *
|
|
1851
|
+
if (!a) {
|
|
1852
|
+
const p = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1853
|
+
d = this.scrollFactorX * p;
|
|
1529
1854
|
}
|
|
1530
1855
|
const u = 0, f = !!(e === "body" && t);
|
|
1531
|
-
let
|
|
1532
|
-
for (let
|
|
1533
|
-
const b =
|
|
1534
|
-
if (
|
|
1535
|
-
let
|
|
1536
|
-
const A = s.getRowspanAt(r,
|
|
1537
|
-
A > 1 && (
|
|
1538
|
-
let w =
|
|
1539
|
-
|
|
1540
|
-
let
|
|
1541
|
-
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (m = this.colAndRowspanModels[e]) != null && m.isInRange(r,
|
|
1542
|
-
this.renderDragTargetDiv(i, b, u, w,
|
|
1543
|
-
const E = { left: b, top: u, width: w, height:
|
|
1856
|
+
let g = d;
|
|
1857
|
+
for (let p = l; p <= n; p++) {
|
|
1858
|
+
const b = g, x = this.tableModel.getColumnWidth(p);
|
|
1859
|
+
if (x > 0 && b + x > 0) {
|
|
1860
|
+
let S = o.height;
|
|
1861
|
+
const A = s.getRowspanAt(r, p), C = s.getColspanAt(r, p);
|
|
1862
|
+
A > 1 && (S = this.getRowHeights(r, r + A - 1, s).reduce((E, M) => E + M, 0));
|
|
1863
|
+
let w = x;
|
|
1864
|
+
C > 1 && (w = this.getColumnWidths(p, p + C - 1).reduce((E, M) => E + M, 0));
|
|
1865
|
+
let k = !1;
|
|
1866
|
+
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (m = this.colAndRowspanModels[e]) != null && m.isInRange(r, p) && (k = !0), this.draggingTargetColumnIndex === p && e !== "header") {
|
|
1867
|
+
this.renderDragTargetDiv(i, b, u, w, S);
|
|
1868
|
+
const E = { left: b, top: u, width: w, height: S };
|
|
1544
1869
|
this.dom.addColumnBorderDivs(this.tableOptions, i, E, e, t);
|
|
1545
1870
|
} else {
|
|
1546
|
-
const E = this.renderSelectedBackgroundDiv(
|
|
1547
|
-
"gammaCells" in s && s.getValueAt(r,
|
|
1871
|
+
const E = this.renderSelectedBackgroundDiv(k, f, t, s, r, p, i, b, u, w, S);
|
|
1872
|
+
"gammaCells" in s && s.getValueAt(r, p) && (k = !1), k || this.renderCell({
|
|
1548
1873
|
areaModel: s,
|
|
1549
1874
|
areaIdent: e,
|
|
1550
1875
|
sideIdent: t,
|
|
1551
1876
|
rowIndex: r,
|
|
1552
|
-
columnIndex:
|
|
1877
|
+
columnIndex: p,
|
|
1553
1878
|
left: b,
|
|
1554
1879
|
top: u,
|
|
1555
1880
|
width: w,
|
|
1556
|
-
height:
|
|
1881
|
+
height: S,
|
|
1557
1882
|
parent: i,
|
|
1558
1883
|
cellSelected: E,
|
|
1559
|
-
lastRowOfModel:
|
|
1884
|
+
lastRowOfModel: c,
|
|
1560
1885
|
gammaRange: !0
|
|
1561
1886
|
}), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1562
1887
|
rowIndex: r,
|
|
1563
|
-
columnIndex:
|
|
1888
|
+
columnIndex: p,
|
|
1564
1889
|
cellLeft: b,
|
|
1565
1890
|
cellTop: u,
|
|
1566
1891
|
cellWidth: w,
|
|
1567
|
-
cellHeight:
|
|
1892
|
+
cellHeight: S,
|
|
1568
1893
|
parent: i
|
|
1569
1894
|
});
|
|
1570
1895
|
}
|
|
1571
1896
|
}
|
|
1572
|
-
if (
|
|
1897
|
+
if (g = g + x, g > this.areaBodyCenterGeo.width)
|
|
1573
1898
|
break;
|
|
1574
1899
|
}
|
|
1575
|
-
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new
|
|
1900
|
+
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new P(g - 1, 1, o.height, 0), i);
|
|
1576
1901
|
}
|
|
1577
1902
|
/**
|
|
1578
1903
|
* Retrieves the column index of the tree arrow column in the table.
|
|
@@ -1593,54 +1918,54 @@ class _e extends Pe {
|
|
|
1593
1918
|
rowIndex: o,
|
|
1594
1919
|
index: i,
|
|
1595
1920
|
left: r,
|
|
1596
|
-
width:
|
|
1597
|
-
height:
|
|
1598
|
-
top:
|
|
1599
|
-
parent:
|
|
1921
|
+
width: l,
|
|
1922
|
+
height: n,
|
|
1923
|
+
top: a,
|
|
1924
|
+
parent: c,
|
|
1600
1925
|
lastRowOfModel: d
|
|
1601
1926
|
}) {
|
|
1602
|
-
var
|
|
1603
|
-
const f = this.editorRenderer && this.editorRendererRow === o && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(o, i),
|
|
1604
|
-
let
|
|
1927
|
+
var ce;
|
|
1928
|
+
const f = this.editorRenderer && this.editorRendererRow === o && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(o, i), g = { left: r, width: l, height: n, top: a, index: i }, m = e.getRowByIndex(o);
|
|
1929
|
+
let p = "none";
|
|
1605
1930
|
if (i === this.getTreeArrowColumnIndex() && W(m)) {
|
|
1606
1931
|
const v = m;
|
|
1607
|
-
(
|
|
1932
|
+
(ce = v.children) != null && ce.length ? v.expanded ? p = "expanded" : p = "collapsed" : p = "hidden";
|
|
1608
1933
|
}
|
|
1609
|
-
let
|
|
1934
|
+
let x;
|
|
1610
1935
|
if (t === "header") {
|
|
1611
1936
|
const v = this.tableModel.getColumnDef(i);
|
|
1612
|
-
(!(v != null && v.sortIconVisible) || v != null && v.sortIconVisible()) && (
|
|
1937
|
+
(!(v != null && v.sortIconVisible) || v != null && v.sortIconVisible()) && (x = v == null ? void 0 : v.sortState);
|
|
1613
1938
|
}
|
|
1614
|
-
const
|
|
1939
|
+
const S = e.getValueAt(o, i), A = f ? "" : `${S}`, C = e.isRowChecked(o), w = this.dom.addColumnDiv(
|
|
1615
1940
|
{
|
|
1616
|
-
parent:
|
|
1617
|
-
geo:
|
|
1941
|
+
parent: c,
|
|
1942
|
+
geo: g,
|
|
1618
1943
|
rowIndex: o,
|
|
1619
1944
|
columnIndex: i,
|
|
1620
1945
|
areaIdent: t,
|
|
1621
1946
|
sideIdent: s,
|
|
1622
1947
|
text: A,
|
|
1623
|
-
treeArrow:
|
|
1948
|
+
treeArrow: p,
|
|
1624
1949
|
tableOptions: this.tableOptions,
|
|
1625
|
-
checkedType:
|
|
1626
|
-
sortState:
|
|
1950
|
+
checkedType: C,
|
|
1951
|
+
sortState: x
|
|
1627
1952
|
}
|
|
1628
|
-
),
|
|
1629
|
-
|
|
1953
|
+
), k = e.getTooltipAt(o, i);
|
|
1954
|
+
k && this.dom.setAttribute(w, "title", k);
|
|
1630
1955
|
const E = this.tableModel.getColumnDef(i);
|
|
1631
1956
|
E && E.classes[t] && this.dom.addClasses(E.classes[t], w);
|
|
1632
1957
|
let M;
|
|
1633
|
-
f && (M = f.render(w, o, i, t, e,
|
|
1634
|
-
const
|
|
1635
|
-
if (
|
|
1958
|
+
f && (M = f.render(w, o, i, t, e, S, this.dom.domService));
|
|
1959
|
+
const z = e.getCustomClassesAt(o, i);
|
|
1960
|
+
if (z.length && this.dom.addClasses(z, w), this.dom.addColumnBorderDivs(this.tableOptions, c, g, t, s), d && this.dom.addHorizontalBorder({ left: r, width: l, height: n, top: a + n }, c), this.getFocusModel && t === "body") {
|
|
1636
1961
|
const v = this.getFocusModel();
|
|
1637
|
-
v != null && v.hasFocus(o, i) && this.dom.addFocusBorderDivs(
|
|
1962
|
+
v != null && v.hasFocus(o, i) && this.dom.addFocusBorderDivs(c, g, {});
|
|
1638
1963
|
}
|
|
1639
1964
|
t === "header" && this.dom.setAttribute(w, "data-ge-action", "drag-column");
|
|
1640
|
-
const
|
|
1641
|
-
if (
|
|
1642
|
-
for (const v in
|
|
1643
|
-
this.dom.setStyle(w, v,
|
|
1965
|
+
const q = e.getCustomStyleAt(o, i);
|
|
1966
|
+
if (q)
|
|
1967
|
+
for (const v in q)
|
|
1968
|
+
this.dom.setStyle(w, v, q[v]);
|
|
1644
1969
|
return [w, M];
|
|
1645
1970
|
}
|
|
1646
1971
|
/**
|
|
@@ -1771,14 +2096,14 @@ class _e extends Pe {
|
|
|
1771
2096
|
adjustDraggingColumn(e, t, s) {
|
|
1772
2097
|
var o, i;
|
|
1773
2098
|
if (this.dragging) {
|
|
1774
|
-
const r = this.hostElement.clientHeight,
|
|
2099
|
+
const r = this.hostElement.clientHeight, l = this.storedColumnWidths[t];
|
|
1775
2100
|
if ((o = e.originalEvent) != null && o.clientX) {
|
|
1776
|
-
const
|
|
2101
|
+
const c = { left: ((i = e.originalEvent) == null ? void 0 : i.clientX) - l / 2, width: l, height: r, top: 0, index: t };
|
|
1777
2102
|
this.dom.applyStyle(this.draggingColumn, {
|
|
1778
2103
|
background: "rgba(128,128,128,0.2)",
|
|
1779
2104
|
display: "block",
|
|
1780
2105
|
overfllow: "clip"
|
|
1781
|
-
}), this.dom.applyStyleInPx(this.draggingColumn,
|
|
2106
|
+
}), this.dom.applyStyleInPx(this.draggingColumn, c), s && this.renderContentOfDraggingColumn(c);
|
|
1782
2107
|
}
|
|
1783
2108
|
} else
|
|
1784
2109
|
this.hideDraggingColumn();
|
|
@@ -1805,27 +2130,27 @@ class _e extends Pe {
|
|
|
1805
2130
|
renderContentOfDraggingColumnForArea(e, t, s = 0) {
|
|
1806
2131
|
const o = "center", i = this.tableModel.getAreaModel(t), r = i == null ? void 0 : i.getRowCount();
|
|
1807
2132
|
if (r) {
|
|
1808
|
-
const
|
|
1809
|
-
for (let
|
|
1810
|
-
const
|
|
1811
|
-
parent:
|
|
2133
|
+
const l = e.index ?? 0, n = this.draggingColumn;
|
|
2134
|
+
for (let a = 0; a < r; a++) {
|
|
2135
|
+
const c = s, d = i.getRowHeight(a), u = { left: 0, width: e.width, height: d, top: c, index: a }, f = i.getValueAt(a, l), g = i.getCellRenderer(a, l), m = g ? "" : `${f}`, p = {
|
|
2136
|
+
parent: n,
|
|
1812
2137
|
geo: u,
|
|
1813
|
-
rowIndex:
|
|
1814
|
-
columnIndex:
|
|
2138
|
+
rowIndex: a,
|
|
2139
|
+
columnIndex: l,
|
|
1815
2140
|
areaIdent: t,
|
|
1816
2141
|
sideIdent: o,
|
|
1817
2142
|
text: m
|
|
1818
|
-
}, b = this.dom.addColumnDiv(
|
|
1819
|
-
let
|
|
1820
|
-
|
|
1821
|
-
const
|
|
1822
|
-
|
|
1823
|
-
const A = this.tableModel.getColumnDef(
|
|
1824
|
-
A && A.classes[t] && this.dom.addClasses(A.classes[t], b), this.dom.addColumnBorderDivs(this.tableOptions,
|
|
1825
|
-
const
|
|
1826
|
-
if (
|
|
1827
|
-
for (const w in
|
|
1828
|
-
this.dom.setStyle(b, w,
|
|
2143
|
+
}, b = this.dom.addColumnDiv(p);
|
|
2144
|
+
let x;
|
|
2145
|
+
g && (x = g.render(b, a, l, t, i, f, this.dom.domService), x && this.cleanupFunctions[t].push(x));
|
|
2146
|
+
const S = i.getCustomClassesAt(a, l);
|
|
2147
|
+
S.length && this.dom.addClasses(S, b);
|
|
2148
|
+
const A = this.tableModel.getColumnDef(l);
|
|
2149
|
+
A && A.classes[t] && this.dom.addClasses(A.classes[t], b), this.dom.addColumnBorderDivs(this.tableOptions, n, u, t, o);
|
|
2150
|
+
const C = i.getCustomStyleAt(a, l);
|
|
2151
|
+
if (C)
|
|
2152
|
+
for (const w in C)
|
|
2153
|
+
this.dom.setStyle(b, w, C[w]);
|
|
1829
2154
|
s = s + d;
|
|
1830
2155
|
}
|
|
1831
2156
|
}
|
|
@@ -1875,19 +2200,19 @@ class _e extends Pe {
|
|
|
1875
2200
|
* @param {number} height - The height of the div.
|
|
1876
2201
|
* @returns {boolean} - Whether the cell is selected.
|
|
1877
2202
|
*/
|
|
1878
|
-
renderSelectedBackgroundDiv(e, t, s, o, i, r, n,
|
|
2203
|
+
renderSelectedBackgroundDiv(e, t, s, o, i, r, l, n, a, c, d) {
|
|
1879
2204
|
let u = !1;
|
|
1880
2205
|
if (!e && t && o.isSelectable(i, r) && this.getSelectionModel) {
|
|
1881
2206
|
const f = this.getSelectionModel();
|
|
1882
2207
|
if (f) {
|
|
1883
|
-
const
|
|
1884
|
-
u =
|
|
1885
|
-
for (let m = 0; m <
|
|
1886
|
-
const
|
|
2208
|
+
const g = f.getSelectionCount(i, r);
|
|
2209
|
+
u = g > 0;
|
|
2210
|
+
for (let m = 0; m < g; m++) {
|
|
2211
|
+
const p = this.dom.applyStylePosistionAbsolute(
|
|
1887
2212
|
// ge-table-body-west-selected-range
|
|
1888
|
-
this.dom.createDivWithClass(`ge-table-${o.areaIdent}-${s}-selected-range`,
|
|
2213
|
+
this.dom.createDivWithClass(`ge-table-${o.areaIdent}-${s}-selected-range`, l)
|
|
1889
2214
|
);
|
|
1890
|
-
this.dom.setStyle(
|
|
2215
|
+
this.dom.setStyle(p, "left", `${n}px`), this.dom.setStyle(p, "top", `${a}px`), this.dom.setStyle(p, "width", `${c}px`), this.dom.setStyle(p, "height", `${d}px`);
|
|
1891
2216
|
}
|
|
1892
2217
|
}
|
|
1893
2218
|
}
|
|
@@ -1919,27 +2244,27 @@ class _e extends Pe {
|
|
|
1919
2244
|
rowIndex: o,
|
|
1920
2245
|
columnIndex: i,
|
|
1921
2246
|
left: r,
|
|
1922
|
-
top:
|
|
1923
|
-
width:
|
|
1924
|
-
height:
|
|
1925
|
-
parent:
|
|
2247
|
+
top: l,
|
|
2248
|
+
width: n,
|
|
2249
|
+
height: a,
|
|
2250
|
+
parent: c,
|
|
1926
2251
|
cellSelected: d,
|
|
1927
2252
|
lastRowOfModel: u
|
|
1928
2253
|
}) {
|
|
1929
|
-
const [f,
|
|
2254
|
+
const [f, g] = this.addAndRenderCellDiv({
|
|
1930
2255
|
areaModel: e,
|
|
1931
2256
|
areaIdent: t,
|
|
1932
2257
|
sideIdent: s,
|
|
1933
2258
|
rowIndex: o,
|
|
1934
2259
|
index: i,
|
|
1935
2260
|
left: r,
|
|
1936
|
-
width:
|
|
1937
|
-
height:
|
|
1938
|
-
top:
|
|
1939
|
-
parent:
|
|
2261
|
+
width: n,
|
|
2262
|
+
height: a,
|
|
2263
|
+
top: l,
|
|
2264
|
+
parent: c,
|
|
1940
2265
|
lastRowOfModel: u
|
|
1941
2266
|
});
|
|
1942
|
-
d && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, f),
|
|
2267
|
+
d && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, f), g && this.cleanupFunctions[t].push(g);
|
|
1943
2268
|
}
|
|
1944
2269
|
/**
|
|
1945
2270
|
* Render the header cell resize handle.
|
|
@@ -1955,17 +2280,17 @@ class _e extends Pe {
|
|
|
1955
2280
|
*
|
|
1956
2281
|
* @return {void}
|
|
1957
2282
|
*/
|
|
1958
|
-
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: o, cellWidth: i, cellHeight: r, parent:
|
|
1959
|
-
const
|
|
1960
|
-
|
|
2283
|
+
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: s, cellTop: o, cellWidth: i, cellHeight: r, parent: l }) {
|
|
2284
|
+
const n = this.dom.domService, a = this.tableOptions.columnResizeHandleWidthInPx ?? 2, c = n.createElement("div");
|
|
2285
|
+
n.setAttribute(c, "data-col-index", `${t}`), n.setAttribute(c, "data-row-index", `${e}`), n.setAttribute(c, "data-area", "header"), n.setAttribute(c, "data-ge-action", "resize-column"), n.addClass(c, "ge-table-column-resize-handle"), n.setStyle(c, "display", "clip"), n.setStyle(c, "position", "absolute"), n.setStyle(c, "cursor", "col-resize"), n.setStyle(c, "left", `${s + i - a}px`), n.setStyle(c, "top", `${o}px`), n.setStyle(c, "width", `${a}px`), n.setStyle(c, "height", `${r}px`), n.appendChild(l, c);
|
|
1961
2286
|
}
|
|
1962
2287
|
}
|
|
1963
|
-
class
|
|
2288
|
+
class Ye {
|
|
1964
2289
|
constructor(e, t) {
|
|
1965
2290
|
this.columnIndex = e, this.sortState = t;
|
|
1966
2291
|
}
|
|
1967
2292
|
}
|
|
1968
|
-
class
|
|
2293
|
+
class Je {
|
|
1969
2294
|
constructor(e) {
|
|
1970
2295
|
this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
|
|
1971
2296
|
}
|
|
@@ -1981,36 +2306,36 @@ class He {
|
|
|
1981
2306
|
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
|
|
1982
2307
|
const t = e.target, s = t.getAttribute("data-area"), o = t.getAttribute("data-row-index"), i = t.getAttribute("data-col-index");
|
|
1983
2308
|
if (s && o && i) {
|
|
1984
|
-
const r =
|
|
1985
|
-
this.tableScope.updateModelValueAfterEdit(r,
|
|
2309
|
+
const r = J(s), l = Number(o), n = Number(i);
|
|
2310
|
+
this.tableScope.updateModelValueAfterEdit(r, l, n, t.value);
|
|
1986
2311
|
}
|
|
1987
2312
|
}
|
|
1988
2313
|
}
|
|
1989
2314
|
}
|
|
1990
|
-
class
|
|
2315
|
+
class qe {
|
|
1991
2316
|
constructor(e = -1, t = -1) {
|
|
1992
2317
|
this.rowIndex = e, this.columnIndex = t;
|
|
1993
2318
|
}
|
|
1994
2319
|
}
|
|
1995
|
-
class
|
|
2320
|
+
class re {
|
|
1996
2321
|
constructor(e) {
|
|
1997
2322
|
this.cells = e;
|
|
1998
2323
|
}
|
|
1999
2324
|
static createSingle(e, t) {
|
|
2000
|
-
return new
|
|
2325
|
+
return new re([new qe(e, t)]);
|
|
2001
2326
|
}
|
|
2002
2327
|
}
|
|
2003
|
-
class
|
|
2328
|
+
class Ze {
|
|
2004
2329
|
constructor(e) {
|
|
2005
2330
|
var t, s;
|
|
2006
2331
|
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);
|
|
2007
2332
|
}
|
|
2008
2333
|
onMouseClicked(e, t) {
|
|
2009
|
-
var i, r, n,
|
|
2334
|
+
var i, r, l, n, a, c, d;
|
|
2010
2335
|
let s = !1, o = !1;
|
|
2011
2336
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
2012
2337
|
const u = this.getSelectionModel(), f = this.getFocusModel();
|
|
2013
|
-
u && f && (f.hasFocus(e.rowIndex, e.columnIndex) || (f.setFocus(e.rowIndex, e.columnIndex), this.tableScope.onFocusChanged(f), s = !0), (i = e.originalEvent) != null && i.shiftKey || u.hasSelection() && (u.clear(), s = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (u.addSelection(this.createRangeByEvents(e, this.previousEvt)), o = !0, s = !0) : (
|
|
2338
|
+
u && f && (f.hasFocus(e.rowIndex, e.columnIndex) || (f.setFocus(e.rowIndex, e.columnIndex), this.tableScope.onFocusChanged(f), s = !0), (i = e.originalEvent) != null && i.shiftKey || u.hasSelection() && (u.clear(), s = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (u.addSelection(this.createRangeByEvents(e, this.previousEvt)), o = !0, s = !0) : (l = e.originalEvent) != null && l.altKey && ((n = e.originalEvent) != null && n.ctrlKey || (a = e.originalEvent) != null && a.metaKey) ? (u.removeSelection(R.singleCell(e.rowIndex, e.columnIndex)), o = !0, s = !0) : (c = e.originalEvent) != null && c.ctrlKey || (d = e.originalEvent) != null && d.metaKey ? (u.addSelection(R.singleCell(e.rowIndex, e.columnIndex)), o = !0, s = !0) : (u.firstClick(e.rowIndex, e.columnIndex), s = !0), this.tableScope.onSelectionChanged(u));
|
|
2014
2339
|
}
|
|
2015
2340
|
return o ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), s;
|
|
2016
2341
|
}
|
|
@@ -2041,7 +2366,7 @@ class Ve {
|
|
|
2041
2366
|
});
|
|
2042
2367
|
}
|
|
2043
2368
|
}
|
|
2044
|
-
class
|
|
2369
|
+
class Qe {
|
|
2045
2370
|
get() {
|
|
2046
2371
|
return {
|
|
2047
2372
|
f2: "START_EDITING",
|
|
@@ -2061,7 +2386,7 @@ class Ne {
|
|
|
2061
2386
|
};
|
|
2062
2387
|
}
|
|
2063
2388
|
}
|
|
2064
|
-
class
|
|
2389
|
+
class et {
|
|
2065
2390
|
get() {
|
|
2066
2391
|
return {
|
|
2067
2392
|
f2: "START_EDITING",
|
|
@@ -2083,7 +2408,7 @@ class Ge {
|
|
|
2083
2408
|
};
|
|
2084
2409
|
}
|
|
2085
2410
|
}
|
|
2086
|
-
class
|
|
2411
|
+
class tt {
|
|
2087
2412
|
constructor(e) {
|
|
2088
2413
|
this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
|
|
2089
2414
|
}
|
|
@@ -2104,7 +2429,7 @@ class ze {
|
|
|
2104
2429
|
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));
|
|
2105
2430
|
}
|
|
2106
2431
|
assignPredefinedSystemShortcutMappings() {
|
|
2107
|
-
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new
|
|
2432
|
+
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new et().get()) : Object.assign(this.shortcutActionIdMapping, new Qe().get());
|
|
2108
2433
|
}
|
|
2109
2434
|
isMacintosh() {
|
|
2110
2435
|
return navigator.platform.indexOf("Mac") > -1;
|
|
@@ -2156,7 +2481,7 @@ class ze {
|
|
|
2156
2481
|
return this.shortcutActionIdMapping;
|
|
2157
2482
|
}
|
|
2158
2483
|
}
|
|
2159
|
-
class
|
|
2484
|
+
class he {
|
|
2160
2485
|
onCheckboxChanged(e) {
|
|
2161
2486
|
}
|
|
2162
2487
|
onContextmenu(e) {
|
|
@@ -2176,7 +2501,7 @@ class ae {
|
|
|
2176
2501
|
onFocusChanged(e) {
|
|
2177
2502
|
}
|
|
2178
2503
|
}
|
|
2179
|
-
class
|
|
2504
|
+
class st {
|
|
2180
2505
|
setStyle(e, t, s) {
|
|
2181
2506
|
return e.style[t] = s, e;
|
|
2182
2507
|
}
|
|
@@ -2203,15 +2528,15 @@ class Ue {
|
|
|
2203
2528
|
e.setAttribute(t, s);
|
|
2204
2529
|
}
|
|
2205
2530
|
}
|
|
2206
|
-
class
|
|
2207
|
-
render(e, t, s, o, i, r,
|
|
2531
|
+
class ot {
|
|
2532
|
+
render(e, t, s, o, i, r, l) {
|
|
2208
2533
|
if (i.isEditable(t, s)) {
|
|
2209
|
-
|
|
2210
|
-
const
|
|
2534
|
+
l.addClass(e, "ge-table-row-input-div");
|
|
2535
|
+
const n = i.getValueAt(t, s);
|
|
2211
2536
|
e.innerHTML = `
|
|
2212
2537
|
<input
|
|
2213
2538
|
type="text"
|
|
2214
|
-
value="${
|
|
2539
|
+
value="${n}"
|
|
2215
2540
|
autofocus
|
|
2216
2541
|
onfocus="this.setSelectionRange(0, this.value.length)"
|
|
2217
2542
|
data-listen="change"
|
|
@@ -2224,7 +2549,7 @@ class je {
|
|
|
2224
2549
|
}
|
|
2225
2550
|
}
|
|
2226
2551
|
}
|
|
2227
|
-
class
|
|
2552
|
+
class ne {
|
|
2228
2553
|
constructor(e = "none", t = "single") {
|
|
2229
2554
|
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1, this.silent = !1, this.listenerArr = [];
|
|
2230
2555
|
}
|
|
@@ -2306,7 +2631,7 @@ class ie {
|
|
|
2306
2631
|
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());
|
|
2307
2632
|
}
|
|
2308
2633
|
}
|
|
2309
|
-
class
|
|
2634
|
+
class it {
|
|
2310
2635
|
constructor(e = "none") {
|
|
2311
2636
|
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1, this.listenerArr = [];
|
|
2312
2637
|
}
|
|
@@ -2343,12 +2668,12 @@ class Xe {
|
|
|
2343
2668
|
return [this.rowIndex, this.columnIndex];
|
|
2344
2669
|
}
|
|
2345
2670
|
}
|
|
2346
|
-
class
|
|
2347
|
-
constructor(e = new
|
|
2671
|
+
class le {
|
|
2672
|
+
constructor(e = new L(
|
|
2348
2673
|
"❯",
|
|
2349
2674
|
"",
|
|
2350
2675
|
["gt-table-icon-expanded"]
|
|
2351
|
-
), t = new
|
|
2676
|
+
), t = new L(
|
|
2352
2677
|
"❯",
|
|
2353
2678
|
"transform: rotate(180deg) translate(-100%, -100%); transform-origin: 0 0;",
|
|
2354
2679
|
["ge-table-icon-collapsed"]
|
|
@@ -2357,17 +2682,17 @@ class re {
|
|
|
2357
2682
|
}
|
|
2358
2683
|
// `⊖ `, `⊕ `;
|
|
2359
2684
|
}
|
|
2360
|
-
const
|
|
2361
|
-
class
|
|
2685
|
+
const rt = new ne(), nt = new it("cell");
|
|
2686
|
+
class U {
|
|
2362
2687
|
constructor() {
|
|
2363
2688
|
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 = {
|
|
2364
2689
|
header: 34,
|
|
2365
2690
|
body: 34,
|
|
2366
2691
|
footer: 34
|
|
2367
|
-
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new
|
|
2692
|
+
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new Ae(), this.headerGroupOptions = new le(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new Re(), this.sortOrder = ["asc", "desc"], this.resizeEventDebounceDelay = 500, this.getEditRenderer = (e, t) => new ot(), this.getSelectionModel = () => rt, this.getFocusModel = () => nt;
|
|
2368
2693
|
}
|
|
2369
2694
|
}
|
|
2370
|
-
const
|
|
2695
|
+
const V = class V {
|
|
2371
2696
|
/**
|
|
2372
2697
|
* Returns the content to be copied based on the provided table model, selection model, and focus model.
|
|
2373
2698
|
*
|
|
@@ -2383,21 +2708,21 @@ const H = class H {
|
|
|
2383
2708
|
const r = this.mergeRanges(t.getRanges());
|
|
2384
2709
|
if (r) {
|
|
2385
2710
|
r.c2 = Math.min(r.c2, e.getColumnCount() - 1), r.r2 = Math.min(r.r2, e.getBodyModel().getRowCount() - 1);
|
|
2386
|
-
const
|
|
2387
|
-
for (let
|
|
2388
|
-
const
|
|
2389
|
-
for (let
|
|
2390
|
-
const d = t.isSelected(
|
|
2391
|
-
|
|
2711
|
+
const l = [];
|
|
2712
|
+
for (let n = r.r1; n <= r.r2; n++) {
|
|
2713
|
+
const a = [];
|
|
2714
|
+
for (let c = r.c1; c <= r.c2; c++) {
|
|
2715
|
+
const d = t.isSelected(n, c) ? e.getBodyModel().getTextValueAt(n, c) : "";
|
|
2716
|
+
a.push(d);
|
|
2392
2717
|
}
|
|
2393
|
-
|
|
2718
|
+
l.push(a.join(V.columnSeparatorChar));
|
|
2394
2719
|
}
|
|
2395
|
-
return o(
|
|
2720
|
+
return o(l.join(V.rowSeparatorChar));
|
|
2396
2721
|
}
|
|
2397
2722
|
}
|
|
2398
2723
|
if (s) {
|
|
2399
|
-
const [r,
|
|
2400
|
-
return o(
|
|
2724
|
+
const [r, l] = s.getFocus(), n = e.getBodyModel().getTextValueAt(r, l);
|
|
2725
|
+
return o(n);
|
|
2401
2726
|
}
|
|
2402
2727
|
i("Cannot copy, neither selection nor focus defined.");
|
|
2403
2728
|
});
|
|
@@ -2426,9 +2751,9 @@ const H = class H {
|
|
|
2426
2751
|
t,
|
|
2427
2752
|
s
|
|
2428
2753
|
).then((r) => {
|
|
2429
|
-
r && this.copyContent(r).then((
|
|
2754
|
+
r && this.copyContent(r).then((l) => {
|
|
2430
2755
|
o(r);
|
|
2431
|
-
}).catch((
|
|
2756
|
+
}).catch((l) => {
|
|
2432
2757
|
i();
|
|
2433
2758
|
});
|
|
2434
2759
|
}).catch((r) => {
|
|
@@ -2449,19 +2774,19 @@ const H = class H {
|
|
|
2449
2774
|
return t;
|
|
2450
2775
|
}
|
|
2451
2776
|
};
|
|
2452
|
-
|
|
2777
|
+
V.columnSeparatorChar = " ", V.rowSeparatorChar = `
|
|
2453
2778
|
`;
|
|
2454
|
-
let
|
|
2455
|
-
class
|
|
2779
|
+
let X = V;
|
|
2780
|
+
class lt {
|
|
2456
2781
|
constructor(e, t = 500) {
|
|
2457
|
-
this.tableScope = e, this.debounceDelay = t, new ResizeObserver(
|
|
2782
|
+
this.tableScope = e, this.debounceDelay = t, new ResizeObserver(ke(this.handleResize.bind(this), t)).observe(this.tableScope.hostElement);
|
|
2458
2783
|
}
|
|
2459
2784
|
handleResize(e) {
|
|
2460
2785
|
const t = e[0], { width: s } = t.contentRect;
|
|
2461
2786
|
this.tableScope.recalcColumnWidths(s);
|
|
2462
2787
|
}
|
|
2463
2788
|
}
|
|
2464
|
-
class
|
|
2789
|
+
class at {
|
|
2465
2790
|
/**
|
|
2466
2791
|
* Downloads a matrix data as an Excel file.
|
|
2467
2792
|
*
|
|
@@ -2490,13 +2815,13 @@ class qe {
|
|
|
2490
2815
|
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>`, o = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2491
2816
|
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"><Application>Microsoft Macintosh Excel</Application><DocSecurity>0</DocSecurity><ScaleCrop>false</ScaleCrop><HeadingPairs><vt:vector size="2" baseType="variant"><vt:variant><vt:lpstr>Worksheets</vt:lpstr></vt:variant><vt:variant><vt:i4>1</vt:i4></vt:variant></vt:vector></HeadingPairs><TitlesOfParts><vt:vector size="1" baseType="lpstr"><vt:lpstr>Sheet1</vt:lpstr></vt:vector></TitlesOfParts><Company></Company><LinksUpToDate>false</LinksUpToDate><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>16.0300</AppVersion></Properties>`, i = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2492
2817
|
<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:creator>${t}</dc:creator><cp:lastModifiedBy>${t}</cp:lastModifiedBy><dcterms:created xsi:type="dcterms:W3CDTF">2024-12-13T19:45:08Z</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">2024-12-13T19:45:35Z</dcterms:modified></cp:coreProperties>`, r = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2493
|
-
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml"/></Relationships>`,
|
|
2494
|
-
<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="0E2841"/></a:dk2><a:lt2><a:srgbClr val="E8E8E8"/></a:lt2><a:accent1><a:srgbClr val="156082"/></a:accent1><a:accent2><a:srgbClr val="E97132"/></a:accent2><a:accent3><a:srgbClr val="196B24"/></a:accent3><a:accent4><a:srgbClr val="0F9ED5"/></a:accent4><a:accent5><a:srgbClr val="A02B93"/></a:accent5><a:accent6><a:srgbClr val="4EA72E"/></a:accent6><a:hlink><a:srgbClr val="467886"/></a:hlink><a:folHlink><a:srgbClr val="96607D"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Aptos Display" panose="02110004020202020204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック Light"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线 Light"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:majorFont><a:minorFont><a:latin typeface="Aptos Narrow" panose="02110004020202020204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:lumMod val="110000"/><a:satMod val="105000"/><a:tint val="67000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="103000"/><a:tint val="73000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="109000"/><a:tint val="81000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:satMod val="103000"/><a:lumMod val="102000"/><a:tint val="94000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:satMod val="110000"/><a:lumMod val="100000"/><a:shade val="100000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="99000"/><a:satMod val="120000"/><a:shade val="78000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="12700" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="19050" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="57150" dist="19050" dir="5400000" algn="ctr" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="63000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:tint val="95000"/><a:satMod val="170000"/></a:schemeClr></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="93000"/><a:satMod val="150000"/><a:shade val="98000"/><a:lumMod val="102000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:tint val="98000"/><a:satMod val="130000"/><a:shade val="90000"/><a:lumMod val="103000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="63000"/><a:satMod val="120000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults><a:lnDef><a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style></a:lnDef></a:objectDefaults><a:extraClrSchemeLst/><a:extLst><a:ext uri="{05A4C25C-085E-4340-85A3-A5531E510DB2}"><thm15:themeFamily xmlns:thm15="http://schemas.microsoft.com/office/thememl/2012/main" name="Office Theme" id="{2E142A2C-CD16-42D6-873A-C26D2A0506FA}" vid="{1BDDFF52-6CD6-40A5-AB3C-68EB2F1E4D0A}"/></a:ext></a:extLst></a:theme>`,
|
|
2495
|
-
<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="3" uniqueCount="3"><si><t>a</t></si><si><t>b</t></si><si><t>c</t></si></sst>`,
|
|
2496
|
-
<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac x16r2 xr" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:x16r2="http://schemas.microsoft.com/office/spreadsheetml/2015/02/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision"><fonts count="1" x14ac:knownFonts="1"><font><sz val="12"/><color theme="1"/><name val="Aptos Narrow"/><family val="2"/><scheme val="minor"/></font></fonts><fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs><cellXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/></cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles><dxfs count="0"/><tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleLight16"/><extLst><ext uri="{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"><x14:slicerStyles defaultSlicerStyle="SlicerStyleLight1"/></ext><ext uri="{9260A510-F301-46a8-8635-F512D64BE5F5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:timelineStyles defaultTimelineStyle="TimeSlicerStyleLight1"/></ext></extLst></styleSheet>`,
|
|
2818
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml"/></Relationships>`, l = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2819
|
+
<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="0E2841"/></a:dk2><a:lt2><a:srgbClr val="E8E8E8"/></a:lt2><a:accent1><a:srgbClr val="156082"/></a:accent1><a:accent2><a:srgbClr val="E97132"/></a:accent2><a:accent3><a:srgbClr val="196B24"/></a:accent3><a:accent4><a:srgbClr val="0F9ED5"/></a:accent4><a:accent5><a:srgbClr val="A02B93"/></a:accent5><a:accent6><a:srgbClr val="4EA72E"/></a:accent6><a:hlink><a:srgbClr val="467886"/></a:hlink><a:folHlink><a:srgbClr val="96607D"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Aptos Display" panose="02110004020202020204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック Light"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线 Light"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:majorFont><a:minorFont><a:latin typeface="Aptos Narrow" panose="02110004020202020204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:lumMod val="110000"/><a:satMod val="105000"/><a:tint val="67000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="103000"/><a:tint val="73000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="109000"/><a:tint val="81000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:satMod val="103000"/><a:lumMod val="102000"/><a:tint val="94000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:satMod val="110000"/><a:lumMod val="100000"/><a:shade val="100000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="99000"/><a:satMod val="120000"/><a:shade val="78000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="12700" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="19050" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="57150" dist="19050" dir="5400000" algn="ctr" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="63000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:tint val="95000"/><a:satMod val="170000"/></a:schemeClr></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="93000"/><a:satMod val="150000"/><a:shade val="98000"/><a:lumMod val="102000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:tint val="98000"/><a:satMod val="130000"/><a:shade val="90000"/><a:lumMod val="103000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="63000"/><a:satMod val="120000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults><a:lnDef><a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style></a:lnDef></a:objectDefaults><a:extraClrSchemeLst/><a:extLst><a:ext uri="{05A4C25C-085E-4340-85A3-A5531E510DB2}"><thm15:themeFamily xmlns:thm15="http://schemas.microsoft.com/office/thememl/2012/main" name="Office Theme" id="{2E142A2C-CD16-42D6-873A-C26D2A0506FA}" vid="{1BDDFF52-6CD6-40A5-AB3C-68EB2F1E4D0A}"/></a:ext></a:extLst></a:theme>`, n = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2820
|
+
<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="3" uniqueCount="3"><si><t>a</t></si><si><t>b</t></si><si><t>c</t></si></sst>`, a = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2821
|
+
<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac x16r2 xr" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:x16r2="http://schemas.microsoft.com/office/spreadsheetml/2015/02/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision"><fonts count="1" x14ac:knownFonts="1"><font><sz val="12"/><color theme="1"/><name val="Aptos Narrow"/><family val="2"/><scheme val="minor"/></font></fonts><fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs><cellXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/></cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles><dxfs count="0"/><tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleLight16"/><extLst><ext uri="{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"><x14:slicerStyles defaultSlicerStyle="SlicerStyleLight1"/></ext><ext uri="{9260A510-F301-46a8-8635-F512D64BE5F5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:timelineStyles defaultTimelineStyle="TimeSlicerStyleLight1"/></ext></extLst></styleSheet>`, c = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2497
2822
|
<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x15 xr xr6 xr10 xr2" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr6="http://schemas.microsoft.com/office/spreadsheetml/2016/revision6" xmlns:xr10="http://schemas.microsoft.com/office/spreadsheetml/2016/revision10" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2"><fileVersion appName="xl" lastEdited="7" lowestEdited="7" rupBuild="11207"/><workbookPr defaultThemeVersion="202300"/><mc:AlternateContent xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"><mc:Choice Requires="x15"><x15ac:absPath url="/" xmlns:x15ac="http://schemas.microsoft.com/office/spreadsheetml/2010/11/ac"/></mc:Choice></mc:AlternateContent><xr:revisionPtr revIDLastSave="0" documentId="8_{292BF245-1F37-B045-B1A5-26C42FB62779}" xr6:coauthVersionLast="47" xr6:coauthVersionMax="47" xr10:uidLastSave="{00000000-0000-0000-0000-000000000000}"/><bookViews><workbookView xWindow="11340" yWindow="5060" windowWidth="28040" windowHeight="17440" xr2:uid="{858B8D3F-6246-774D-8903-6D38687B7BC6}"/></bookViews><sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets><calcPr calcId="181029"/><extLst><ext uri="{140A7094-0E35-4892-8432-C4D2E57EDEB5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:workbookPr chartTrackingRefBase="1"/></ext><ext uri="{B58B0392-4F1F-4190-BB64-5DF3571DCE5F}" xmlns:xcalcf="http://schemas.microsoft.com/office/spreadsheetml/2018/calcfeatures"><xcalcf:calcFeatures><xcalcf:feature name="microsoft.com:RD"/><xcalcf:feature name="microsoft.com:Single"/><xcalcf:feature name="microsoft.com:FV"/><xcalcf:feature name="microsoft.com:CNMTM"/><xcalcf:feature name="microsoft.com:LET_WF"/><xcalcf:feature name="microsoft.com:LAMBDA_WF"/><xcalcf:feature name="microsoft.com:ARRAYTEXT_WF"/></xcalcf:calcFeatures></ext></extLst></workbook>`, d = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2498
2823
|
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/><Override PartName="/xl/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/><Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/></Types>`, u = /* @__PURE__ */ new Map();
|
|
2499
|
-
return u.set("_rels/.rels", s), u.set("docProps/app.xml", o), u.set("docProps/core.xml", i), u.set("xl/_rels/workbook.xml.rels", r), u.set("xl/theme/theme1.xml",
|
|
2824
|
+
return u.set("_rels/.rels", s), u.set("docProps/app.xml", o), u.set("docProps/core.xml", i), u.set("xl/_rels/workbook.xml.rels", r), u.set("xl/theme/theme1.xml", l), u.set("xl/worksheets/sheet1.xml", this.getX1WorksheetsSheet1Xml(e)), u.set("xl/sharedStrings.xml", n), u.set("xl/styles.xml", a), u.set("xl/workbook.xml", c), u.set("[Content_Types].xml", d), u;
|
|
2500
2825
|
}
|
|
2501
2826
|
getX1WorksheetsSheet1Xml(e) {
|
|
2502
2827
|
const t = [];
|
|
@@ -2511,15 +2836,15 @@ class qe {
|
|
|
2511
2836
|
const o = e[s];
|
|
2512
2837
|
t.push('<row r="${r + 1}" spans="1:2" x14ac:dyDescent="0.2">');
|
|
2513
2838
|
for (let i = 0; i < o.length; i++) {
|
|
2514
|
-
const r = o[i],
|
|
2839
|
+
const r = o[i], l = this.getCellAddress(s, i);
|
|
2515
2840
|
if (typeof r == "number")
|
|
2516
|
-
t.push(`<c r="${
|
|
2841
|
+
t.push(`<c r="${l}"><v>${r}</v></c>`);
|
|
2517
2842
|
else if (r instanceof Date) {
|
|
2518
|
-
const
|
|
2519
|
-
t.push(`<c r="${
|
|
2843
|
+
const n = r;
|
|
2844
|
+
t.push(`<c r="${l}" t="inlineStr"><is><t>${n.toISOString()}</t></is></c>`);
|
|
2520
2845
|
} else {
|
|
2521
|
-
const
|
|
2522
|
-
t.push(`<c r="${
|
|
2846
|
+
const n = r != null ? this.escapeXml(String(r)) : "";
|
|
2847
|
+
t.push(`<c r="${l}" t="inlineStr"><is><t>${n}</t></is></c>`);
|
|
2523
2848
|
}
|
|
2524
2849
|
}
|
|
2525
2850
|
t.push("</row>");
|
|
@@ -2542,43 +2867,43 @@ class qe {
|
|
|
2542
2867
|
let s = 0;
|
|
2543
2868
|
const o = [];
|
|
2544
2869
|
e.forEach((d, u) => {
|
|
2545
|
-
const f = new TextEncoder().encode(u),
|
|
2546
|
-
m.set([80, 75, 3, 4], 0),
|
|
2870
|
+
const f = new TextEncoder().encode(u), g = new TextEncoder().encode(d), m = new Uint8Array(30 + f.length), p = new DataView(m.buffer);
|
|
2871
|
+
m.set([80, 75, 3, 4], 0), p.setUint16(4, 20, !0), p.setUint16(6, 0, !0), p.setUint16(8, 0, !0), p.setUint16(10, 0, !0), p.setUint16(12, 0, !0), p.setUint32(14, 0, !0), p.setUint32(18, g.length, !0), p.setUint32(22, g.length, !0), p.setUint16(26, f.length, !0), p.setUint16(28, 0, !0), m.set(f, 30), t.push(m, g), o.push({
|
|
2547
2872
|
path: u,
|
|
2548
2873
|
offset: s,
|
|
2549
|
-
contentSize:
|
|
2550
|
-
}), s += m.length +
|
|
2874
|
+
contentSize: g.length
|
|
2875
|
+
}), s += m.length + g.length;
|
|
2551
2876
|
});
|
|
2552
2877
|
const i = s;
|
|
2553
2878
|
o.forEach((d) => {
|
|
2554
|
-
const u = new TextEncoder().encode(d.path), f = new Uint8Array(46 + u.length),
|
|
2555
|
-
f.set([80, 75, 1, 2], 0),
|
|
2879
|
+
const u = new TextEncoder().encode(d.path), f = new Uint8Array(46 + u.length), g = new DataView(f.buffer);
|
|
2880
|
+
f.set([80, 75, 1, 2], 0), g.setUint16(4, 20, !0), g.setUint16(6, 20, !0), g.setUint16(8, 0, !0), g.setUint16(10, 0, !0), g.setUint16(12, 0, !0), g.setUint16(14, 0, !0), g.setUint32(16, 0, !0), g.setUint32(20, d.contentSize, !0), g.setUint32(24, d.contentSize, !0), g.setUint16(28, u.length, !0), g.setUint16(30, 0, !0), g.setUint16(32, 0, !0), g.setUint16(34, 0, !0), g.setUint16(36, 0, !0), g.setUint32(38, 0, !0), g.setUint32(42, d.offset, !0), f.set(u, 46), t.push(f), s += f.length;
|
|
2556
2881
|
});
|
|
2557
|
-
const r = new Uint8Array(22),
|
|
2558
|
-
r.set([80, 75, 5, 6], 0),
|
|
2559
|
-
const
|
|
2560
|
-
let
|
|
2882
|
+
const r = new Uint8Array(22), l = new DataView(r.buffer);
|
|
2883
|
+
r.set([80, 75, 5, 6], 0), l.setUint16(4, 0, !0), l.setUint16(6, 0, !0), l.setUint16(8, o.length, !0), l.setUint16(10, o.length, !0), l.setUint32(12, s - i, !0), l.setUint32(16, i, !0), l.setUint16(20, 0, !0), t.push(r);
|
|
2884
|
+
const n = t.reduce((d, u) => d + u.length, 0), a = new Uint8Array(n);
|
|
2885
|
+
let c = 0;
|
|
2561
2886
|
for (const d of t)
|
|
2562
|
-
|
|
2563
|
-
return
|
|
2887
|
+
a.set(d, c), c += d.length;
|
|
2888
|
+
return a;
|
|
2564
2889
|
}
|
|
2565
2890
|
generateBuffer(e, t = "") {
|
|
2566
2891
|
const s = this.generateMap(e, t);
|
|
2567
2892
|
return this.createZip(s);
|
|
2568
2893
|
}
|
|
2569
2894
|
}
|
|
2570
|
-
class
|
|
2571
|
-
constructor(e, t, s, o, i, r = new
|
|
2572
|
-
var
|
|
2573
|
-
if (super(e, t, new
|
|
2895
|
+
class Ee extends Ke {
|
|
2896
|
+
constructor(e, t, s, o, i, r = new X(), l = new at()) {
|
|
2897
|
+
var c;
|
|
2898
|
+
if (super(e, t, new Be(s), o), this.eventListener = i, this.copyService = r, this.excelService = l, this.licenseManager = H.getInstance(), this.selectionService = new Ze(this), this.api = new We(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, t.setTableScope(this), i || (this.eventListener = new he()), (c = this.tableOptions) != null && c.autoRestoreOptions) {
|
|
2574
2899
|
const d = this.tableOptions.autoRestoreOptions, u = d.getStorageKeyFn;
|
|
2575
|
-
u && (d.autoRestoreScrollPosition && (this.storeScrollPosStateService = new
|
|
2900
|
+
u && (d.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Ne(u)), d.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new ze(u)), d.autoRestoreSortingState && (this.storeSortingService = new je(u)));
|
|
2576
2901
|
}
|
|
2577
|
-
this.mouseHandler = new
|
|
2578
|
-
const
|
|
2579
|
-
|
|
2580
|
-
const
|
|
2581
|
-
|
|
2902
|
+
this.mouseHandler = new Ve(this), this.inputHandler = new Je(this), this.resizeHandler = new lt(this, o.resizeEventDebounceDelay), this.shortcutService = new tt(this), this.shortcutService.addListener(this.selectionService);
|
|
2903
|
+
const n = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
2904
|
+
n && n.addEventSelectionChangedListener(this);
|
|
2905
|
+
const a = this.getFocusModel ? this.getFocusModel() : void 0;
|
|
2906
|
+
a && a.addEventFocusChangedListener(this);
|
|
2582
2907
|
}
|
|
2583
2908
|
/**
|
|
2584
2909
|
* Creates a TableScope instance.
|
|
@@ -2592,8 +2917,8 @@ class Se extends _e {
|
|
|
2592
2917
|
*
|
|
2593
2918
|
* @return {TableScope} - The newly created TableScope instance.
|
|
2594
2919
|
*/
|
|
2595
|
-
static create(e, t, s = new
|
|
2596
|
-
return new
|
|
2920
|
+
static create(e, t, s = new U(), o = new he(), i = new st(), r = new X()) {
|
|
2921
|
+
return new Ee(e, t, i, s, o, r);
|
|
2597
2922
|
}
|
|
2598
2923
|
/**
|
|
2599
2924
|
* Triggers an action based on the provided actionId.
|
|
@@ -2621,7 +2946,7 @@ class Se extends _e {
|
|
|
2621
2946
|
return !1;
|
|
2622
2947
|
}
|
|
2623
2948
|
updateModelValueAfterEdit(e, t, s, o) {
|
|
2624
|
-
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, o) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(
|
|
2949
|
+
e === "body" && this.tableModel.getAreaModel(e).setValue(t, s, o) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(re.createSingle(t, s)), this.hostElement.focus());
|
|
2625
2950
|
}
|
|
2626
2951
|
/**
|
|
2627
2952
|
* Retrieves the TableApi object.
|
|
@@ -2650,7 +2975,7 @@ class Se extends _e {
|
|
|
2650
2975
|
* @return {GeMouseEvent} - The created GeMouseEvent object.
|
|
2651
2976
|
*/
|
|
2652
2977
|
createGeMouseEvent(e) {
|
|
2653
|
-
const t = new
|
|
2978
|
+
const t = new oe();
|
|
2654
2979
|
if (t.originalEvent = e, e) {
|
|
2655
2980
|
const s = e.target;
|
|
2656
2981
|
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) {
|
|
@@ -2720,7 +3045,7 @@ class Se extends _e {
|
|
|
2720
3045
|
toggleExpandCollapseAll(e = !0) {
|
|
2721
3046
|
var s;
|
|
2722
3047
|
const t = this.tableModel.getBodyModel();
|
|
2723
|
-
|
|
3048
|
+
ee(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (s = this.storeStateCollapsedExpandService) == null || s.collapsedStateAll(e));
|
|
2724
3049
|
}
|
|
2725
3050
|
/**
|
|
2726
3051
|
* Toggles the checkbox state of a specific row in a table.
|
|
@@ -2732,11 +3057,11 @@ class Se extends _e {
|
|
|
2732
3057
|
* @return {void} - This method does not return anything.
|
|
2733
3058
|
*/
|
|
2734
3059
|
toggleRowCheckbox(e, t, s) {
|
|
2735
|
-
var
|
|
3060
|
+
var n;
|
|
2736
3061
|
const o = this.tableModel.getAreaModel(s), i = o.isRowChecked(e), r = i === void 0 || i === "semi" || i === "none";
|
|
2737
3062
|
o.setRowChecked(e, r), this.repaint();
|
|
2738
|
-
const
|
|
2739
|
-
this.eventListener.onCheckboxChanged(
|
|
3063
|
+
const l = (n = o.rowSelectionModel) == null ? void 0 : n.getCheckedRows();
|
|
3064
|
+
this.eventListener.onCheckboxChanged(l || []);
|
|
2740
3065
|
}
|
|
2741
3066
|
/**
|
|
2742
3067
|
* Handle mouse click events.
|
|
@@ -2790,8 +3115,8 @@ class Se extends _e {
|
|
|
2790
3115
|
const o = this.tableModel.getColumnDef(s);
|
|
2791
3116
|
if (o != null && o.sortable && o.sortable()) {
|
|
2792
3117
|
e.preventDefault(), e.stopPropagation();
|
|
2793
|
-
const
|
|
2794
|
-
this.tableModel.doSort([
|
|
3118
|
+
const l = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, n = o.sortState ?? "", a = l[(l.indexOf(n) + 1) % l.length], c = new Ye(s, a);
|
|
3119
|
+
this.tableModel.doSort([c]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((u) => u.sortState = ""), o.sortState = a), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([c]);
|
|
2795
3120
|
}
|
|
2796
3121
|
}
|
|
2797
3122
|
/**
|
|
@@ -2936,21 +3261,21 @@ class Se extends _e {
|
|
|
2936
3261
|
const s = this.tableOptions.autoRestoreOptions, o = s.getRowId;
|
|
2937
3262
|
if (s.autoRestoreCollapsedExpandedState && o) {
|
|
2938
3263
|
const i = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), r = this.tableModel.getAreaModel("body");
|
|
2939
|
-
if (
|
|
2940
|
-
const
|
|
2941
|
-
for (let
|
|
2942
|
-
const
|
|
2943
|
-
if (
|
|
3264
|
+
if (ee(r)) {
|
|
3265
|
+
const l = r, n = r.getRowCount();
|
|
3266
|
+
for (let a = 0; a < n; a++) {
|
|
3267
|
+
const c = r.getRowByIndex(a);
|
|
3268
|
+
if (c)
|
|
2944
3269
|
if (i.allExpanded)
|
|
2945
|
-
|
|
3270
|
+
c.expanded = !0;
|
|
2946
3271
|
else if (i.allCollapsed)
|
|
2947
|
-
|
|
3272
|
+
c.expanded = !1;
|
|
2948
3273
|
else {
|
|
2949
|
-
const d = o(
|
|
2950
|
-
i.mode === "expanded" ?
|
|
3274
|
+
const d = o(c.data);
|
|
3275
|
+
i.mode === "expanded" ? c.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(d) : i.mode === "collapsed" && (c.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(d));
|
|
2951
3276
|
}
|
|
2952
3277
|
}
|
|
2953
|
-
|
|
3278
|
+
l.recalcVisibleTreeRows();
|
|
2954
3279
|
}
|
|
2955
3280
|
}
|
|
2956
3281
|
}
|
|
@@ -2962,8 +3287,8 @@ class Se extends _e {
|
|
|
2962
3287
|
const o = new Array(t).fill(0);
|
|
2963
3288
|
for (let i = 0; i < s; i++)
|
|
2964
3289
|
for (let r = 0; r < t; r++) {
|
|
2965
|
-
const
|
|
2966
|
-
|
|
3290
|
+
const l = e.getValueAt(i, r), n = (l == null ? void 0 : l.toString().length) || 0;
|
|
3291
|
+
n > o[r] && (o[r] = n);
|
|
2967
3292
|
}
|
|
2968
3293
|
return o.map((i) => Math.max(i * 10, 50));
|
|
2969
3294
|
}
|
|
@@ -2982,9 +3307,9 @@ class Se extends _e {
|
|
|
2982
3307
|
this.tableModel.recalcPadding(), this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows();
|
|
2983
3308
|
}
|
|
2984
3309
|
}
|
|
2985
|
-
const
|
|
3310
|
+
const K = class K {
|
|
2986
3311
|
};
|
|
2987
|
-
|
|
3312
|
+
K.themes = ["light", "combat", "paper", "blackboard"], K.vars = {
|
|
2988
3313
|
light: `html[data-theme="light"] {
|
|
2989
3314
|
--ge-table-bg: rgba(255,255,255, 0.5);
|
|
2990
3315
|
--ge-table-header-west-bg: rgba(233, 233, 233, 0.5);
|
|
@@ -3218,31 +3543,31 @@ j.themes = ["light", "combat", "paper", "blackboard"], j.vars = {
|
|
|
3218
3543
|
--ge-table-drop-zone-bg: #758129;
|
|
3219
3544
|
}`
|
|
3220
3545
|
};
|
|
3221
|
-
let
|
|
3222
|
-
class
|
|
3223
|
-
constructor(e, t = !0, s, o, i = 0, r = !1,
|
|
3224
|
-
this.data = e, this.expanded = t, this.children = s, this.parent = o, this.deep = i, this.checked = r, this.keep =
|
|
3546
|
+
let ue = K;
|
|
3547
|
+
class pe {
|
|
3548
|
+
constructor(e, t = !0, s, o, i = 0, r = !1, l = !1) {
|
|
3549
|
+
this.data = e, this.expanded = t, this.children = s, this.parent = o, this.deep = i, this.checked = r, this.keep = l, this.type = "TreeRow";
|
|
3225
3550
|
}
|
|
3226
3551
|
}
|
|
3227
|
-
class
|
|
3552
|
+
class te {
|
|
3228
3553
|
static buildTreeRows(e, t = "children", s = 12) {
|
|
3229
3554
|
const o = [];
|
|
3230
3555
|
for (const i of e)
|
|
3231
|
-
o.push(
|
|
3556
|
+
o.push(te.buildTreeRow(i, t, void 0, 0, s));
|
|
3232
3557
|
return o;
|
|
3233
3558
|
}
|
|
3234
|
-
static buildTreeRow(e, t = "children", s = new
|
|
3235
|
-
var
|
|
3559
|
+
static buildTreeRow(e, t = "children", s = new pe(e, !0, [], void 0, 0), o = 0, i = 12) {
|
|
3560
|
+
var l;
|
|
3236
3561
|
if (o > i)
|
|
3237
3562
|
return console.warn("Max deep limit reached: ", o), s;
|
|
3238
3563
|
const r = e[t];
|
|
3239
3564
|
if (r)
|
|
3240
|
-
for (const
|
|
3241
|
-
const
|
|
3242
|
-
if ((
|
|
3243
|
-
|
|
3565
|
+
for (const n of r) {
|
|
3566
|
+
const a = new pe(n, !0, [], s, o + 1);
|
|
3567
|
+
if ((l = s.children) == null || l.push(a), te.buildTreeRow(
|
|
3568
|
+
n,
|
|
3244
3569
|
t,
|
|
3245
|
-
|
|
3570
|
+
a,
|
|
3246
3571
|
o + 1
|
|
3247
3572
|
), o > i)
|
|
3248
3573
|
return console.warn("Max deep limit reached: ", o), s;
|
|
@@ -3250,46 +3575,46 @@ class Q {
|
|
|
3250
3575
|
return s;
|
|
3251
3576
|
}
|
|
3252
3577
|
}
|
|
3253
|
-
class
|
|
3578
|
+
class N {
|
|
3254
3579
|
constructor(e = 34, t = 34, s = 34) {
|
|
3255
3580
|
this.header = e, this.body = t, this.footer = s;
|
|
3256
3581
|
}
|
|
3257
3582
|
}
|
|
3258
|
-
class
|
|
3583
|
+
class y {
|
|
3259
3584
|
constructor(e = 100, t = "px") {
|
|
3260
3585
|
this.value = e, this.unit = t;
|
|
3261
3586
|
}
|
|
3262
3587
|
}
|
|
3263
|
-
const
|
|
3264
|
-
class
|
|
3265
|
-
constructor(e, t, s = new
|
|
3266
|
-
this.property = e, this.headerLabel = t, this.width = s, this.classes = o, this.rendererMap = i, this.minWidth = r, this.maxWidth =
|
|
3588
|
+
const ct = () => !0, ge = () => !1;
|
|
3589
|
+
class B {
|
|
3590
|
+
constructor(e, t, s = new y(100, "px"), o = new I(), i = new I(), r = new y(100, "px"), l = new y(100, "px"), n, a, c, d, u, f, g, m, p = () => this.visible) {
|
|
3591
|
+
this.property = e, this.headerLabel = t, this.width = s, this.classes = o, this.rendererMap = i, this.minWidth = r, this.maxWidth = l, this.sortable = n, this.sortComparator = a, this.sortState = c, this.sortStatesOrder = d, this.sortIconVisible = u, this.editable = f, this.getEditRenderer = g, this.editInputPipe = m, this.isVisible = p, this.visible = !0, s.unit !== "px" && (this.minWidth = new y(0, "px"), this.maxWidth = new y(1e5, "px"));
|
|
3267
3592
|
}
|
|
3268
3593
|
static bodyRenderer(e) {
|
|
3269
|
-
return new
|
|
3594
|
+
return new I(
|
|
3270
3595
|
void 0,
|
|
3271
3596
|
e,
|
|
3272
3597
|
void 0
|
|
3273
3598
|
);
|
|
3274
3599
|
}
|
|
3275
3600
|
static create(e) {
|
|
3276
|
-
const t = new
|
|
3601
|
+
const t = new I(
|
|
3277
3602
|
e.headerRenderer,
|
|
3278
3603
|
e.bodyRenderer,
|
|
3279
3604
|
e.footerRenderer
|
|
3280
|
-
), s = new
|
|
3605
|
+
), s = new I(
|
|
3281
3606
|
e.headerClasses,
|
|
3282
3607
|
e.bodyClasses,
|
|
3283
3608
|
e.footerClasses
|
|
3284
|
-
), o = e.sortIconVisible ?? e.sortable ??
|
|
3285
|
-
return new
|
|
3609
|
+
), o = e.sortIconVisible ?? e.sortable ?? ge, i = e.editable ?? e.editable ?? ge, r = e.isVisible ?? e.isVisible ?? ct;
|
|
3610
|
+
return new B(
|
|
3286
3611
|
e.property ?? "",
|
|
3287
3612
|
e.headerLabel ?? "",
|
|
3288
|
-
e.width ?? new
|
|
3613
|
+
e.width ?? new y(100, "px"),
|
|
3289
3614
|
s,
|
|
3290
3615
|
t,
|
|
3291
|
-
e.minWidth ?? new
|
|
3292
|
-
e.maxWidth ?? new
|
|
3616
|
+
e.minWidth ?? new y(100, "px"),
|
|
3617
|
+
e.maxWidth ?? new y(100, "px"),
|
|
3293
3618
|
e.sortable,
|
|
3294
3619
|
e.sortComparator,
|
|
3295
3620
|
e.sortState,
|
|
@@ -3302,8 +3627,8 @@ class _ {
|
|
|
3302
3627
|
);
|
|
3303
3628
|
}
|
|
3304
3629
|
}
|
|
3305
|
-
const
|
|
3306
|
-
class
|
|
3630
|
+
const Et = new y(500, "px"), Mt = new y(400, "px"), dt = new y(300, "px"), Tt = new y(290, "px"), It = new y(280, "px"), kt = new y(270, "px"), Dt = new y(260, "px"), Ft = new y(250, "px"), Pt = new y(240, "px"), Lt = new y(230, "px"), $t = new y(220, "px"), Ot = new y(210, "px"), fe = new y(200, "px"), _t = new y(190, "px"), Bt = new y(180, "px"), Ht = new y(170, "px"), Vt = new y(160, "px"), Wt = new y(150, "px"), Nt = new y(140, "px"), Gt = new y(130, "px"), zt = new y(120, "px"), jt = new y(110, "px"), Ut = new y(100, "px"), Xt = new y(90, "px"), Kt = new y(80, "px"), Yt = new y(70, "px"), Jt = new y(60, "px"), qt = new y(50, "px"), Zt = new y(40, "px"), Qt = new y(30, "px"), es = new y(20, "px"), ts = new y(10, "px"), ss = new y(0, "px");
|
|
3631
|
+
class ae {
|
|
3307
3632
|
constructor(e, t = [], s = -1) {
|
|
3308
3633
|
this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = s, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((o) => o.rendererMap[e]);
|
|
3309
3634
|
}
|
|
@@ -3368,8 +3693,8 @@ class ne {
|
|
|
3368
3693
|
return ((i = s == null ? void 0 : s.editable) == null ? void 0 : i.call(s)) ?? !1;
|
|
3369
3694
|
}
|
|
3370
3695
|
setValue(e, t, s) {
|
|
3371
|
-
var
|
|
3372
|
-
const o = (
|
|
3696
|
+
var l;
|
|
3697
|
+
const o = (l = this.columnDefs[t]) == null ? void 0 : l.editInputPipe;
|
|
3373
3698
|
o && (s = o(s, e, t));
|
|
3374
3699
|
const i = this.getRowByIndex(e), r = this.columnDefs[t].property;
|
|
3375
3700
|
return r.includes(".") ? this.setPropertyValue(i, r.split("."), s) : (i[r] = s, !0);
|
|
@@ -3399,7 +3724,7 @@ class ne {
|
|
|
3399
3724
|
this.yPositions[t + 1] = this.getRowHeight(t) + this.yPositions[t];
|
|
3400
3725
|
}
|
|
3401
3726
|
}
|
|
3402
|
-
class D extends
|
|
3727
|
+
class D extends ae {
|
|
3403
3728
|
constructor(e, t, s, o = []) {
|
|
3404
3729
|
super(e, o, s), this.areaIdent = e, this.arr = t, this.defaultRowHeight = s, this.columnDefs = o, this.filteredArr = [...t];
|
|
3405
3730
|
}
|
|
@@ -3499,7 +3824,7 @@ class F {
|
|
|
3499
3824
|
changeColumnOrder(e, t) {
|
|
3500
3825
|
}
|
|
3501
3826
|
}
|
|
3502
|
-
class
|
|
3827
|
+
class ht {
|
|
3503
3828
|
flattenTree(e, t = []) {
|
|
3504
3829
|
var s;
|
|
3505
3830
|
for (const o of e)
|
|
@@ -3510,7 +3835,7 @@ class et {
|
|
|
3510
3835
|
return e.parent ? e.parent.expanded ? this.isVisible(e.parent) : !1 : !0;
|
|
3511
3836
|
}
|
|
3512
3837
|
}
|
|
3513
|
-
class
|
|
3838
|
+
class Me {
|
|
3514
3839
|
genericSortComparator(e, t, s) {
|
|
3515
3840
|
if (typeof e == "number" && typeof t == "number")
|
|
3516
3841
|
return s * (e - t);
|
|
@@ -3528,9 +3853,9 @@ class Ce {
|
|
|
3528
3853
|
return s * ("" + e).localeCompare("" + t);
|
|
3529
3854
|
}
|
|
3530
3855
|
}
|
|
3531
|
-
class
|
|
3856
|
+
class me extends ae {
|
|
3532
3857
|
constructor(e, t, s, o = []) {
|
|
3533
|
-
super(e, o, s), this.areaIdent = e, this.rows = t, this.defaultRowHeight = s, this.columnDefs = o, this.type = "AreaModelTree", this.sorterService = new
|
|
3858
|
+
super(e, o, s), this.areaIdent = e, this.rows = t, this.defaultRowHeight = s, this.columnDefs = o, this.type = "AreaModelTree", this.sorterService = new Me(), this.service = new ht(), this.properties = o.map((i) => i.property), this.flattenRows = this.service.flattenTree(t), this.filteredFlattenRows = [...this.flattenRows];
|
|
3534
3859
|
}
|
|
3535
3860
|
changeColumnOrder(e, t) {
|
|
3536
3861
|
this.arrayMove(this.properties, e, t), super.changeColumnOrder(e, t);
|
|
@@ -3587,8 +3912,8 @@ class ge extends ne {
|
|
|
3587
3912
|
o && (s = o(s, e, t));
|
|
3588
3913
|
const i = this.getRowByIndex(e);
|
|
3589
3914
|
if (i) {
|
|
3590
|
-
const
|
|
3591
|
-
return
|
|
3915
|
+
const l = i.data, n = this.columnDefs[t].property;
|
|
3916
|
+
return n.includes(".") ? this.setPropertyValue(l, n.split("."), s) : (l[n] = s, !0);
|
|
3592
3917
|
}
|
|
3593
3918
|
return !1;
|
|
3594
3919
|
}
|
|
@@ -3632,7 +3957,7 @@ class ge extends ne {
|
|
|
3632
3957
|
o.children && this.treeSort(o.children, t, s);
|
|
3633
3958
|
}
|
|
3634
3959
|
}
|
|
3635
|
-
class
|
|
3960
|
+
class be {
|
|
3636
3961
|
constructor(e = []) {
|
|
3637
3962
|
this.allRootNodes = e;
|
|
3638
3963
|
}
|
|
@@ -3692,12 +4017,12 @@ class pe {
|
|
|
3692
4017
|
s.checked && t.push(s), s.children && this.addSelectedRecursive(s.children, t);
|
|
3693
4018
|
}
|
|
3694
4019
|
}
|
|
3695
|
-
class
|
|
4020
|
+
class ye {
|
|
3696
4021
|
constructor(e = 0, t = 0, s = 0, o = 0) {
|
|
3697
4022
|
this.top = e, this.right = t, this.bottom = s, this.left = o;
|
|
3698
4023
|
}
|
|
3699
4024
|
}
|
|
3700
|
-
class
|
|
4025
|
+
class ut {
|
|
3701
4026
|
constructor() {
|
|
3702
4027
|
this.checkedRows = [];
|
|
3703
4028
|
}
|
|
@@ -3728,11 +4053,11 @@ class tt {
|
|
|
3728
4053
|
}
|
|
3729
4054
|
}
|
|
3730
4055
|
}
|
|
3731
|
-
class
|
|
3732
|
-
constructor(e, t, s, o = 0, i = 0, r = !1,
|
|
4056
|
+
class Z {
|
|
4057
|
+
constructor(e, t, s, o = 0, i = 0, r = !1, l = new N(), n = [], a = [], c = -1, d = 0, u = 400, f = () => {
|
|
3733
4058
|
}) {
|
|
3734
|
-
var
|
|
3735
|
-
this.headerAreaModel = e, this.bodyAreaModel = t, this.footerAreaModel = s, this.fixedLeftColumnCount = o, this.fixedRightColumnCount = i, this.rowCheckboxVisible = r, this.defaultRowHeights =
|
|
4059
|
+
var g, m, p, b;
|
|
4060
|
+
this.headerAreaModel = e, this.bodyAreaModel = t, this.footerAreaModel = s, this.fixedLeftColumnCount = o, this.fixedRightColumnCount = i, this.rowCheckboxVisible = r, this.defaultRowHeights = l, this.columnDefs = n, this.columnSizes = a, this.overridingColumnWidth = c, this.columnCount = d, this.parentSize = u, this.getSelectionModel = f, this.rowCount = 0, this.contentHeightInPx = 0, this.contentWidthInPx = 0, this.padding = new ye(0, 0, 0, 0), this.xPositions = [], e.areaIdent = "header", t.areaIdent = "body", s.areaIdent = "footer", this.columnCount || ((g = this.columnDefs) != null && g.length ? this.columnCount = this.columnDefs.length : (m = this.columnSizes) != null && m.length && (this.columnCount = (p = this.columnSizes) == null ? void 0 : p.length)), (b = this.columnDefs) != null && b.length && _e(this.columnDefs[0]) && !t.rowSelectionModel && (t.rowSelectionModel = new ut());
|
|
3736
4061
|
}
|
|
3737
4062
|
init() {
|
|
3738
4063
|
this.recalcSize(this.parentSize), this.overridingColumnWidth === -1 && this.calcXPositions(), this.headerAreaModel && this.headerAreaModel.init(), this.bodyAreaModel && this.bodyAreaModel.init(), this.footerAreaModel && this.footerAreaModel.init();
|
|
@@ -3816,7 +4141,7 @@ class J {
|
|
|
3816
4141
|
*/
|
|
3817
4142
|
recalcPadding() {
|
|
3818
4143
|
const e = this.getSideAreaWidth("west"), t = this.getSideAreaWidth("east"), s = this.getAreaHeight("header"), o = this.getAreaHeight("footer");
|
|
3819
|
-
this.padding = new
|
|
4144
|
+
this.padding = new ye(
|
|
3820
4145
|
s,
|
|
3821
4146
|
t,
|
|
3822
4147
|
o,
|
|
@@ -4057,32 +4382,32 @@ class J {
|
|
|
4057
4382
|
recalcColumnWidths(e) {
|
|
4058
4383
|
var t, s, o;
|
|
4059
4384
|
if (!((t = this.columnDefs) != null && t.length) && !((s = this.columnSizes) != null && s.length) && (this.columnSizes = new Array(this.getColumnCount()).fill(this.overridingColumnWidth)), (o = this.columnDefs) != null && o.length) {
|
|
4060
|
-
const i = this.columnDefs.filter((
|
|
4061
|
-
var
|
|
4062
|
-
return ((
|
|
4385
|
+
const i = this.columnDefs.filter((n) => {
|
|
4386
|
+
var a;
|
|
4387
|
+
return ((a = n.width) == null ? void 0 : a.unit) === "weight";
|
|
4063
4388
|
});
|
|
4064
|
-
this.columnSizes = this.columnDefs.map((
|
|
4065
|
-
if (
|
|
4066
|
-
let
|
|
4067
|
-
if (
|
|
4068
|
-
const
|
|
4069
|
-
|
|
4389
|
+
this.columnSizes = this.columnDefs.map((n) => {
|
|
4390
|
+
if (n.width.unit === "%" && e) {
|
|
4391
|
+
let a = Math.floor(n.width.value * e / 100);
|
|
4392
|
+
if (n.minWidth) {
|
|
4393
|
+
const c = this.sizeToPixel(n.minWidth, e);
|
|
4394
|
+
a = Math.max(c, a);
|
|
4070
4395
|
}
|
|
4071
|
-
if (
|
|
4072
|
-
const
|
|
4073
|
-
|
|
4396
|
+
if (n.maxWidth) {
|
|
4397
|
+
const c = this.sizeToPixel(n.maxWidth, e);
|
|
4398
|
+
a = Math.min(c, a);
|
|
4074
4399
|
}
|
|
4075
|
-
return
|
|
4076
|
-
} else if (
|
|
4077
|
-
return
|
|
4400
|
+
return a;
|
|
4401
|
+
} else if (n.width.unit === "px" && e)
|
|
4402
|
+
return n.width.value;
|
|
4078
4403
|
return 0;
|
|
4079
4404
|
});
|
|
4080
|
-
const r = this.columnSizes.reduce((
|
|
4081
|
-
if (
|
|
4082
|
-
const
|
|
4083
|
-
for (let
|
|
4084
|
-
const
|
|
4085
|
-
|
|
4405
|
+
const r = this.columnSizes.reduce((n, a) => n + a), l = e - r;
|
|
4406
|
+
if (l > 0 && i.length) {
|
|
4407
|
+
const n = i.map((a) => a.width.value).reduce((a, c) => a + c);
|
|
4408
|
+
for (let a = 0; a < this.columnDefs.length; a++) {
|
|
4409
|
+
const c = this.columnDefs[a];
|
|
4410
|
+
c.width.unit === "weight" && (this.columnSizes[a] = c.width.value * l / n);
|
|
4086
4411
|
}
|
|
4087
4412
|
}
|
|
4088
4413
|
}
|
|
@@ -4118,9 +4443,9 @@ class J {
|
|
|
4118
4443
|
return this.tableScope;
|
|
4119
4444
|
}
|
|
4120
4445
|
}
|
|
4121
|
-
class
|
|
4446
|
+
class pt extends ae {
|
|
4122
4447
|
constructor(e, t, s, o = []) {
|
|
4123
|
-
super(e, o, s), this.areaIdent = e, this.rows = t, this.defaultRowHeight = s, this.columnDefs = o, this.sorterService = new
|
|
4448
|
+
super(e, o, s), this.areaIdent = e, this.rows = t, this.defaultRowHeight = s, this.columnDefs = o, this.sorterService = new Me(), this.filteredRows = [...t], this.properties = o.map((i) => i.property);
|
|
4124
4449
|
}
|
|
4125
4450
|
setRows(e) {
|
|
4126
4451
|
this.rows = e, this.filteredRows = [...e];
|
|
@@ -4176,7 +4501,7 @@ class st extends ne {
|
|
|
4176
4501
|
return o && t.length ? this.getPropertyValue(o, t) : o;
|
|
4177
4502
|
}
|
|
4178
4503
|
}
|
|
4179
|
-
class
|
|
4504
|
+
class xe extends pt {
|
|
4180
4505
|
constructor(e, t, s, o) {
|
|
4181
4506
|
super(
|
|
4182
4507
|
e,
|
|
@@ -4186,7 +4511,7 @@ class me extends st {
|
|
|
4186
4511
|
), this.areaIdent = e, this.rows = t, this.columnDefs = s, this.defaultRowHeight = o;
|
|
4187
4512
|
}
|
|
4188
4513
|
}
|
|
4189
|
-
class
|
|
4514
|
+
class _ {
|
|
4190
4515
|
/**
|
|
4191
4516
|
* TableFactory
|
|
4192
4517
|
*
|
|
@@ -4224,32 +4549,32 @@ class O {
|
|
|
4224
4549
|
* Please consult each method's documentation for detailed explanation of their functionality.
|
|
4225
4550
|
*/
|
|
4226
4551
|
static createTableModel(e) {
|
|
4227
|
-
var t, s, o, i, r, n,
|
|
4552
|
+
var t, s, o, i, r, l, n, a, c, d, u, f, g, m;
|
|
4228
4553
|
if (e.defaultRowHeights === void 0)
|
|
4229
4554
|
if ((t = e.tableOptions) != null && t.defaultRowHeights)
|
|
4230
4555
|
e.defaultRowHeights = e.tableOptions.defaultRowHeights;
|
|
4231
4556
|
else {
|
|
4232
|
-
if (e.defaultRowHeights = new
|
|
4233
|
-
const
|
|
4234
|
-
|
|
4557
|
+
if (e.defaultRowHeights = new N(), e.headerAreaModel && "defaultRowHeight" in e.headerAreaModel) {
|
|
4558
|
+
const p = e.headerAreaModel.defaultRowHeight;
|
|
4559
|
+
p > -1 && (e.defaultRowHeights.header = p);
|
|
4235
4560
|
}
|
|
4236
4561
|
if (e.bodyAreaModel && "defaultRowHeight" in e.bodyAreaModel) {
|
|
4237
|
-
const
|
|
4238
|
-
|
|
4562
|
+
const p = e.bodyAreaModel.defaultRowHeight;
|
|
4563
|
+
p > -1 && (e.defaultRowHeights.body = p);
|
|
4239
4564
|
}
|
|
4240
4565
|
if (e.footerAreaModel && "defaultRowHeight" in e.footerAreaModel) {
|
|
4241
|
-
const
|
|
4242
|
-
|
|
4566
|
+
const p = e.footerAreaModel.defaultRowHeight;
|
|
4567
|
+
p > -1 && (e.defaultRowHeights.footer = p);
|
|
4243
4568
|
}
|
|
4244
4569
|
}
|
|
4245
|
-
if (e.columnDefs === void 0 && ((s = e.properties) != null && s.length ? e.columnDefs = e.properties.map((
|
|
4570
|
+
if (e.columnDefs === void 0 && ((s = e.properties) != null && s.length ? e.columnDefs = e.properties.map((p) => new B(p, p.toUpperCase(), fe)) : (o = e.rows) != null && o.length ? e.columnDefs = Object.keys(e.rows[0]).map((p) => new B(p, p.toUpperCase(), fe)) : e.columnDefs = []), e.columnCount === void 0 && ((i = e.columnDefs) != null && i.length ? e.columnCount = e.columnDefs.length : (r = e.headerData) != null && r.length ? e.columnCount = e.headerData[0].length : (l = e.columnSizes) != null && l.length ? e.columnCount = (n = e.columnSizes) == null ? void 0 : n.length : console.warn('Property "columnCount" is missing and cannot be derived from other properties.')), e.headerAreaModel || ((a = e.headerData) != null && a.length ? e.headerAreaModel = new D(
|
|
4246
4571
|
"header",
|
|
4247
4572
|
e.headerData,
|
|
4248
4573
|
e.defaultRowHeights.header,
|
|
4249
4574
|
e.columnDefs
|
|
4250
|
-
) : (
|
|
4575
|
+
) : (c = e.columnDefs) != null && c.length ? e.headerAreaModel = new D(
|
|
4251
4576
|
"header",
|
|
4252
|
-
[e.columnDefs.map((
|
|
4577
|
+
[e.columnDefs.map((p) => p.headerLabel)],
|
|
4253
4578
|
e.defaultRowHeights.header,
|
|
4254
4579
|
e.columnDefs
|
|
4255
4580
|
) : e.headerAreaModel = new F("header")), e.footerAreaModel || ((d = e.footerData) != null && d.length ? e.footerAreaModel = new D(
|
|
@@ -4260,15 +4585,15 @@ class O {
|
|
|
4260
4585
|
) : e.footerAreaModel = new F("footer")), !e.bodyAreaModel)
|
|
4261
4586
|
if (e.rows)
|
|
4262
4587
|
if ((u = e.rows) != null && u.length && W(e.rows[0])) {
|
|
4263
|
-
const
|
|
4264
|
-
e.bodyAreaModel = new
|
|
4588
|
+
const p = e.rows;
|
|
4589
|
+
e.bodyAreaModel = new me(
|
|
4265
4590
|
"body",
|
|
4266
|
-
|
|
4591
|
+
p,
|
|
4267
4592
|
e.defaultRowHeights.body,
|
|
4268
4593
|
e.columnDefs
|
|
4269
|
-
), (e.columnDefs[0].property === "CheckboxColumn" || (f = e.tableOptions) != null && f.showCheckboxWihoutExtraColumn) && (e.bodyAreaModel.rowSelectionModel = new
|
|
4594
|
+
), (e.columnDefs[0].property === "CheckboxColumn" || (f = e.tableOptions) != null && f.showCheckboxWihoutExtraColumn) && (e.bodyAreaModel.rowSelectionModel = new be(p));
|
|
4270
4595
|
} else
|
|
4271
|
-
e.bodyAreaModel = new
|
|
4596
|
+
e.bodyAreaModel = new xe(
|
|
4272
4597
|
"body",
|
|
4273
4598
|
e.rows,
|
|
4274
4599
|
e.columnDefs,
|
|
@@ -4280,7 +4605,7 @@ class O {
|
|
|
4280
4605
|
e.bodyData,
|
|
4281
4606
|
e.defaultRowHeights.body
|
|
4282
4607
|
) : e.bodyAreaModel = new F("body");
|
|
4283
|
-
return e.fixedLeftColumnCount === void 0 && (e.fixedLeftColumnCount = 0), e.fixedRightColumnCount === void 0 && (e.fixedRightColumnCount = 0), e.rowCheckboxVisible === void 0 && (e.rowCheckboxVisible = !1), e.overridingColumnWidth === void 0 && (e.overridingColumnWidth = -1), !e.getSelectionModel && ((
|
|
4608
|
+
return e.fixedLeftColumnCount === void 0 && (e.fixedLeftColumnCount = 0), e.fixedRightColumnCount === void 0 && (e.fixedRightColumnCount = 0), e.rowCheckboxVisible === void 0 && (e.rowCheckboxVisible = !1), e.overridingColumnWidth === void 0 && (e.overridingColumnWidth = -1), !e.getSelectionModel && ((g = e.tableOptions) != null && g.getSelectionModel) && (e.getSelectionModel = (m = e.tableOptions) == null ? void 0 : m.getSelectionModel), new Z(
|
|
4284
4609
|
e.headerAreaModel,
|
|
4285
4610
|
e.bodyAreaModel,
|
|
4286
4611
|
e.footerAreaModel,
|
|
@@ -4314,10 +4639,10 @@ class O {
|
|
|
4314
4639
|
* @method
|
|
4315
4640
|
*/
|
|
4316
4641
|
static buildByTypedRowsParam(e) {
|
|
4317
|
-
return
|
|
4642
|
+
return _.buildByTypedRows(
|
|
4318
4643
|
e.rows ?? [],
|
|
4319
4644
|
e.columnDefs,
|
|
4320
|
-
e.tableOptions ?? new
|
|
4645
|
+
e.tableOptions ?? new U(),
|
|
4321
4646
|
e.fixedLeftColumnCount ?? 0,
|
|
4322
4647
|
e.fixedRightColumnCount ?? 0
|
|
4323
4648
|
);
|
|
@@ -4358,18 +4683,18 @@ class O {
|
|
|
4358
4683
|
* columnDef is "CheckboxColumn". If the first column is not a checkbox column, ensure that the first columnDef does not have "CheckboxColumn"
|
|
4359
4684
|
* as its property.
|
|
4360
4685
|
*/
|
|
4361
|
-
static buildByTypedRows(e, t, s = new
|
|
4362
|
-
const r = s.defaultRowHeights,
|
|
4686
|
+
static buildByTypedRows(e, t, s = new U(), o = 0, i = 0) {
|
|
4687
|
+
const r = s.defaultRowHeights, l = t[0].property === "CheckboxColumn";
|
|
4363
4688
|
if (e != null && e.length && W(e[0])) {
|
|
4364
|
-
const
|
|
4689
|
+
const a = e, c = new me(
|
|
4365
4690
|
"body",
|
|
4366
|
-
|
|
4691
|
+
a,
|
|
4367
4692
|
r.body,
|
|
4368
4693
|
t
|
|
4369
4694
|
);
|
|
4370
|
-
return (
|
|
4695
|
+
return (l || s.showCheckboxWihoutExtraColumn) && (c.rowSelectionModel = new be(a)), _.createByAreaModelsParam({
|
|
4371
4696
|
headerAreaModel: new D("header", [t.map((d) => d.headerLabel)], r.header),
|
|
4372
|
-
bodyAreaModel:
|
|
4697
|
+
bodyAreaModel: c,
|
|
4373
4698
|
footerAreaModel: new D("footer", [], r.footer),
|
|
4374
4699
|
columnDefs: t,
|
|
4375
4700
|
fixedLeftColumnCount: o,
|
|
@@ -4381,7 +4706,7 @@ class O {
|
|
|
4381
4706
|
overridingColumnWidth: -1
|
|
4382
4707
|
});
|
|
4383
4708
|
}
|
|
4384
|
-
return
|
|
4709
|
+
return _.createByObjectArrayParam({
|
|
4385
4710
|
rows: e,
|
|
4386
4711
|
columnDefs: t,
|
|
4387
4712
|
fixedLeftColumnCount: o,
|
|
@@ -4435,14 +4760,14 @@ class O {
|
|
|
4435
4760
|
*/
|
|
4436
4761
|
static createByObjectArrayParam(e) {
|
|
4437
4762
|
const t = e.rowCheckboxVisible !== void 0 ? e.rowCheckboxVisible : !1;
|
|
4438
|
-
return
|
|
4763
|
+
return _.createByObjectArray(
|
|
4439
4764
|
e.rows,
|
|
4440
4765
|
e.header ?? [],
|
|
4441
4766
|
e.footer ?? [],
|
|
4442
4767
|
e.fixedLeftColumnCount ?? 0,
|
|
4443
4768
|
e.fixedRightColumnCount ?? 0,
|
|
4444
4769
|
t,
|
|
4445
|
-
e.defaultRowHeights ?? new
|
|
4770
|
+
e.defaultRowHeights ?? new N(),
|
|
4446
4771
|
e.columnDefs ?? [],
|
|
4447
4772
|
e.columnSizes ?? []
|
|
4448
4773
|
);
|
|
@@ -4488,18 +4813,18 @@ class O {
|
|
|
4488
4813
|
* @return A new instance of `TableModel` is created using the provided parameters.
|
|
4489
4814
|
* If a parameter isn't provided, the default value is used.
|
|
4490
4815
|
*/
|
|
4491
|
-
static createByAreaModels(e = new F(), t, s = new F(), o = 0, i = 0, r = !1,
|
|
4492
|
-
return new
|
|
4816
|
+
static createByAreaModels(e = new F(), t, s = new F(), o = 0, i = 0, r = !1, l = new N(), n, a = [], c = -1, d) {
|
|
4817
|
+
return new Z(
|
|
4493
4818
|
e,
|
|
4494
4819
|
t,
|
|
4495
4820
|
s,
|
|
4496
4821
|
o,
|
|
4497
4822
|
i,
|
|
4498
4823
|
r,
|
|
4499
|
-
n,
|
|
4500
4824
|
l,
|
|
4501
|
-
|
|
4825
|
+
n,
|
|
4502
4826
|
a,
|
|
4827
|
+
c,
|
|
4503
4828
|
d
|
|
4504
4829
|
);
|
|
4505
4830
|
}
|
|
@@ -4540,7 +4865,7 @@ class O {
|
|
|
4540
4865
|
* });
|
|
4541
4866
|
*/
|
|
4542
4867
|
static createByAreaModelsParam(e) {
|
|
4543
|
-
return
|
|
4868
|
+
return _.createByAreaModels(
|
|
4544
4869
|
e.headerAreaModel ?? new F(),
|
|
4545
4870
|
e.bodyAreaModel,
|
|
4546
4871
|
e.footerAreaModel ?? new F(),
|
|
@@ -4602,24 +4927,24 @@ class O {
|
|
|
4602
4927
|
*
|
|
4603
4928
|
* Reference: For more details regarding the `DefaultRowHeightsIf`, `ColumnDefIf`, `AreaModelIf`, and `AreaModelArrayOfArrays` classes/interfaces, please refer to the respective API documents.
|
|
4604
4929
|
*/
|
|
4605
|
-
static createByObjectArray(e, t = [], s = [], o = 0, i = 0, r = !1,
|
|
4606
|
-
let
|
|
4607
|
-
t != null && t.length ?
|
|
4608
|
-
const d = s ? new D("footer", s,
|
|
4609
|
-
return new
|
|
4610
|
-
|
|
4930
|
+
static createByObjectArray(e, t = [], s = [], o = 0, i = 0, r = !1, l = new N(), n, a = []) {
|
|
4931
|
+
let c;
|
|
4932
|
+
t != null && t.length ? c = new D("header", t, l.header, n) : n != null && n.length ? c = new D("header", [n.map((f) => f.headerLabel)], l.header, n) : c = new F();
|
|
4933
|
+
const d = s ? new D("footer", s, l.footer, n) : new F(), u = new xe("body", e, n, l.body);
|
|
4934
|
+
return new Z(
|
|
4935
|
+
c,
|
|
4611
4936
|
u,
|
|
4612
4937
|
d,
|
|
4613
4938
|
o,
|
|
4614
4939
|
i,
|
|
4615
4940
|
r,
|
|
4616
|
-
n,
|
|
4617
4941
|
l,
|
|
4618
|
-
|
|
4942
|
+
n,
|
|
4943
|
+
a
|
|
4619
4944
|
);
|
|
4620
4945
|
}
|
|
4621
4946
|
}
|
|
4622
|
-
const
|
|
4947
|
+
const os = [
|
|
4623
4948
|
"COPY_2_CLIPBOARD",
|
|
4624
4949
|
"START_EDITING",
|
|
4625
4950
|
"TOGGLE_SELECTION",
|
|
@@ -4637,18 +4962,18 @@ const Ut = [
|
|
|
4637
4962
|
// "PAGEUP_PRESSED",
|
|
4638
4963
|
// "PAGEDOWN_PRESSED"
|
|
4639
4964
|
];
|
|
4640
|
-
class
|
|
4965
|
+
class gt {
|
|
4641
4966
|
constructor(e, t) {
|
|
4642
4967
|
this.tableModel = e, this.tableOptions = t;
|
|
4643
4968
|
}
|
|
4644
4969
|
}
|
|
4645
|
-
class
|
|
4646
|
-
constructor(e, t, s, o, i, r,
|
|
4647
|
-
this.emmitDataKey = e, this.emmitCancelKey = t, this.queryId = s, this.filter = o, this.sorting = i, this.startIndex = r, this.endIndex =
|
|
4970
|
+
class ft {
|
|
4971
|
+
constructor(e, t, s, o, i, r, l) {
|
|
4972
|
+
this.emmitDataKey = e, this.emmitCancelKey = t, this.queryId = s, this.filter = o, this.sorting = i, this.startIndex = r, this.endIndex = l;
|
|
4648
4973
|
}
|
|
4649
4974
|
}
|
|
4650
|
-
class
|
|
4651
|
-
constructor(e, t, s, o, i, r,
|
|
4975
|
+
class is extends ft {
|
|
4976
|
+
constructor(e, t, s, o, i, r, l, n) {
|
|
4652
4977
|
super(
|
|
4653
4978
|
e,
|
|
4654
4979
|
t,
|
|
@@ -4656,38 +4981,38 @@ class jt extends it {
|
|
|
4656
4981
|
o,
|
|
4657
4982
|
i,
|
|
4658
4983
|
r,
|
|
4659
|
-
|
|
4660
|
-
), this.rows =
|
|
4984
|
+
l
|
|
4985
|
+
), this.rows = n;
|
|
4661
4986
|
}
|
|
4662
4987
|
}
|
|
4663
|
-
class
|
|
4988
|
+
class mt {
|
|
4664
4989
|
constructor(e, t) {
|
|
4665
4990
|
this.value = e, this.label = t;
|
|
4666
4991
|
}
|
|
4667
4992
|
}
|
|
4668
|
-
class
|
|
4993
|
+
class rs {
|
|
4669
4994
|
constructor(e, t) {
|
|
4670
4995
|
this.index = e, this.px = t;
|
|
4671
4996
|
}
|
|
4672
4997
|
}
|
|
4673
|
-
const
|
|
4998
|
+
const ns = { body: ["ge-table-text-align-left"] }, ls = { body: ["ge-table-text-align-center"] }, as = { body: ["ge-table-text-align-right"] }, cs = {
|
|
4674
4999
|
header: ["ge-table-text-align-left"],
|
|
4675
5000
|
body: ["ge-table-text-align-left"],
|
|
4676
5001
|
footer: ["ge-table-text-align-left"]
|
|
4677
|
-
},
|
|
5002
|
+
}, ds = {
|
|
4678
5003
|
header: ["ge-table-text-align-center"],
|
|
4679
5004
|
body: ["ge-table-text-align-center"],
|
|
4680
5005
|
footer: ["ge-table-text-align-center"]
|
|
4681
|
-
},
|
|
5006
|
+
}, hs = {
|
|
4682
5007
|
header: ["ge-table-text-align-right"],
|
|
4683
5008
|
body: ["ge-table-text-align-right"],
|
|
4684
5009
|
footer: ["ge-table-text-align-right"]
|
|
4685
5010
|
};
|
|
4686
|
-
class
|
|
4687
|
-
render(e, t, s, o, i, r,
|
|
5011
|
+
class we {
|
|
5012
|
+
render(e, t, s, o, i, r, l) {
|
|
4688
5013
|
if (i.isRowCheckable(t)) {
|
|
4689
|
-
|
|
4690
|
-
const
|
|
5014
|
+
l.addClass(e, "ge-table-row-checkbox-div");
|
|
5015
|
+
const n = i.isRowChecked(t), a = n === "full" ? "checked" : "", c = n === "semi" ? '<span style="opacity: 0.4;">✓<span>' : "";
|
|
4691
5016
|
e.innerHTML = `
|
|
4692
5017
|
<input
|
|
4693
5018
|
type="checkbox"
|
|
@@ -4695,22 +5020,22 @@ class be {
|
|
|
4695
5020
|
data-row-index="${t}"
|
|
4696
5021
|
data-col-index="${s}"
|
|
4697
5022
|
data-input-type="checkbox"
|
|
4698
|
-
${
|
|
5023
|
+
${a}
|
|
4699
5024
|
class="ge-table-row-checkbox">
|
|
4700
|
-
${
|
|
5025
|
+
${c} `;
|
|
4701
5026
|
}
|
|
4702
5027
|
}
|
|
4703
5028
|
}
|
|
4704
|
-
class
|
|
5029
|
+
class us {
|
|
4705
5030
|
constructor() {
|
|
4706
|
-
this.type = "CheckboxColumnDef", this.property = "CheckboxColumn", this.headerLabel = "", this.width = new
|
|
5031
|
+
this.type = "CheckboxColumnDef", this.property = "CheckboxColumn", this.headerLabel = "", this.width = new y(50, "px"), this.minWidth = new y(50, "px"), this.maxWidth = new y(100, "px"), this.rendererMap = new I(new we(), new we(), void 0), this.classes = new I(
|
|
4707
5032
|
[],
|
|
4708
5033
|
["ge-table-text-align-left"],
|
|
4709
5034
|
[]
|
|
4710
5035
|
);
|
|
4711
5036
|
}
|
|
4712
5037
|
}
|
|
4713
|
-
class
|
|
5038
|
+
class ps {
|
|
4714
5039
|
/**
|
|
4715
5040
|
* A factory that creates a new AreaObjectMap with the given body renderer.
|
|
4716
5041
|
*
|
|
@@ -4718,24 +5043,24 @@ class ts {
|
|
|
4718
5043
|
* @returns {AreaObjectMap<CellRendererIf>} The newly created AreaObjectMap.
|
|
4719
5044
|
*/
|
|
4720
5045
|
static body(e) {
|
|
4721
|
-
return new
|
|
5046
|
+
return new I(
|
|
4722
5047
|
void 0,
|
|
4723
5048
|
e,
|
|
4724
5049
|
void 0
|
|
4725
5050
|
);
|
|
4726
5051
|
}
|
|
4727
5052
|
}
|
|
4728
|
-
class
|
|
5053
|
+
class gs {
|
|
4729
5054
|
constructor(e = "down", t) {
|
|
4730
5055
|
this.status = e, this.originalEvent = t;
|
|
4731
5056
|
}
|
|
4732
5057
|
}
|
|
4733
|
-
class
|
|
5058
|
+
class fs {
|
|
4734
5059
|
constructor(e, t, s, o, i = {}) {
|
|
4735
5060
|
this.area = e, this.rowIndex = t, this.columnIndex = s, this.value = o, this.cssClasses = i;
|
|
4736
5061
|
}
|
|
4737
5062
|
}
|
|
4738
|
-
class
|
|
5063
|
+
class ms {
|
|
4739
5064
|
constructor() {
|
|
4740
5065
|
this.autoRestoreSortingState = !1, this.autoRestoreCollapsedExpandedState = !1, this.autoRestoreScrollPosition = !1, this.autoRestoreCheckedState = !1, this.autoRestoreSelectedState = !1, this.getStorageKeyFn = void 0, this.isSame = (e, t, s) => {
|
|
4741
5066
|
if (e && t && s.getRowId) {
|
|
@@ -4760,12 +5085,12 @@ class is {
|
|
|
4760
5085
|
};
|
|
4761
5086
|
}
|
|
4762
5087
|
}
|
|
4763
|
-
class
|
|
5088
|
+
class bt {
|
|
4764
5089
|
constructor(e, t, s, o = !1, i = "normal", r = void 0) {
|
|
4765
5090
|
this.data = e, this.property = t, this.toggle = s, this.closed = o, this.visibility = i, this.children = r, this.impl = "CellGroup";
|
|
4766
5091
|
}
|
|
4767
5092
|
}
|
|
4768
|
-
class
|
|
5093
|
+
class yt extends bt {
|
|
4769
5094
|
constructor(e, t = 0, s = 0, o) {
|
|
4770
5095
|
super(
|
|
4771
5096
|
e.data,
|
|
@@ -4838,7 +5163,7 @@ class lt extends nt {
|
|
|
4838
5163
|
return e.parent && (t = t + 1 + this.getParentCount(e.parent, t)), t;
|
|
4839
5164
|
}
|
|
4840
5165
|
log(e = 10) {
|
|
4841
|
-
const t = " ".substring(0, 2 * this.rowIndex), s = `${this.getColumnIndex()}`, o = `${this.getColumnCount(this)}`, i = `${this.getRowSpan(this, e)}`, r = `${this.getParentCount(this)}`,
|
|
5166
|
+
const t = " ".substring(0, 2 * this.rowIndex), s = `${this.getColumnIndex()}`, o = `${this.getColumnCount(this)}`, i = `${this.getRowSpan(this, e)}`, r = `${this.getParentCount(this)}`, l = `${t + this.data}
|
|
4842
5167
|
childIndex:${this.childIndex}
|
|
4843
5168
|
row:${this.rowIndex}
|
|
4844
5169
|
col:${s}
|
|
@@ -4852,16 +5177,16 @@ class lt extends nt {
|
|
|
4852
5177
|
rowSpan:${i}
|
|
4853
5178
|
pc:${r}`.replace(/[ \n]+/g, " ");
|
|
4854
5179
|
if (this.children)
|
|
4855
|
-
for (const
|
|
4856
|
-
|
|
4857
|
-
return
|
|
5180
|
+
for (const n of this.children)
|
|
5181
|
+
n.log(e);
|
|
5182
|
+
return l;
|
|
4858
5183
|
}
|
|
4859
5184
|
}
|
|
4860
5185
|
class T {
|
|
4861
5186
|
static buildColumnDefs(e, t = []) {
|
|
4862
5187
|
for (const s of e)
|
|
4863
5188
|
s.property && t.push(
|
|
4864
|
-
|
|
5189
|
+
B.create({
|
|
4865
5190
|
property: s.property,
|
|
4866
5191
|
headerLabel: s.data ? s.data : s.property,
|
|
4867
5192
|
isVisible: () => typeof s.isVisible == "function" ? s.isVisible() : !0
|
|
@@ -4890,8 +5215,8 @@ class T {
|
|
|
4890
5215
|
static buildGroupExts(e, t = [], s = 0, o) {
|
|
4891
5216
|
let i;
|
|
4892
5217
|
for (let r = 0; r < e.length; r++) {
|
|
4893
|
-
const
|
|
4894
|
-
i && (
|
|
5218
|
+
const l = e[r], n = new yt(l, s, r, o);
|
|
5219
|
+
i && (n.leftNeighbour = i, i.rightNeighbour = n), t.push(n), l.children && (n.children = T.buildGroupExts(l.children, [], s + 1, n)), i = n;
|
|
4895
5220
|
}
|
|
4896
5221
|
return t;
|
|
4897
5222
|
}
|
|
@@ -4913,15 +5238,15 @@ class T {
|
|
|
4913
5238
|
for (const r of e) {
|
|
4914
5239
|
if (r.rowIndex <= o) {
|
|
4915
5240
|
s++;
|
|
4916
|
-
for (let
|
|
4917
|
-
t[
|
|
5241
|
+
for (let l = 0; l < t.length; l++)
|
|
5242
|
+
t[l][s] = null;
|
|
4918
5243
|
}
|
|
4919
5244
|
if (t[r.rowIndex][s] = r, o = r.rowIndex, r.ownColumn() && ((i = r.children) != null && i.length)) {
|
|
4920
|
-
for (let
|
|
4921
|
-
t[
|
|
5245
|
+
for (let l = r.rowIndex + 1; l < t.length; l++)
|
|
5246
|
+
t[l][s] = void 0;
|
|
4922
5247
|
s++;
|
|
4923
|
-
for (let
|
|
4924
|
-
t[
|
|
5248
|
+
for (let l = 0; l < t.length; l++)
|
|
5249
|
+
t[l][s] = null;
|
|
4925
5250
|
}
|
|
4926
5251
|
}
|
|
4927
5252
|
return t;
|
|
@@ -4932,7 +5257,7 @@ class T {
|
|
|
4932
5257
|
e.push(o.data + " rowIndex:" + o.rowIndex), (s = o.children) != null && s.length && T.iterateThrowColumns(e, o.children);
|
|
4933
5258
|
}
|
|
4934
5259
|
}
|
|
4935
|
-
class
|
|
5260
|
+
class bs {
|
|
4936
5261
|
constructor() {
|
|
4937
5262
|
this.areaIdent = "body", this.rowSelectionModel = void 0;
|
|
4938
5263
|
}
|
|
@@ -5002,17 +5327,17 @@ class rs {
|
|
|
5002
5327
|
return !1;
|
|
5003
5328
|
}
|
|
5004
5329
|
}
|
|
5005
|
-
const
|
|
5006
|
-
constructor(e = new
|
|
5330
|
+
const Y = class Y {
|
|
5331
|
+
constructor(e = new le()) {
|
|
5007
5332
|
this.headerGroupOptions = e;
|
|
5008
5333
|
}
|
|
5009
|
-
render(e, t, s, o, i, r,
|
|
5010
|
-
const
|
|
5334
|
+
render(e, t, s, o, i, r, l) {
|
|
5335
|
+
const n = r != null && r.data ? r.data : "";
|
|
5011
5336
|
if (r) {
|
|
5012
|
-
const { toggle:
|
|
5013
|
-
this.addText(e, o, t, s,
|
|
5337
|
+
const { toggle: a, visibility: c, closed: d } = r, u = a ? Y.toggleHeaderGroup : "";
|
|
5338
|
+
this.addText(e, o, t, s, n, u), a && c !== "always" && this.addArrowDiv(l, e, !d, t, s, o, u);
|
|
5014
5339
|
} else
|
|
5015
|
-
this.addText(e, o, t, s,
|
|
5340
|
+
this.addText(e, o, t, s, n, "");
|
|
5016
5341
|
}
|
|
5017
5342
|
addText(e, t, s, o, i, r) {
|
|
5018
5343
|
e.innerHTML = `<span
|
|
@@ -5022,30 +5347,30 @@ const X = class X {
|
|
|
5022
5347
|
data-col-index="${o}"
|
|
5023
5348
|
>${i}</span>`;
|
|
5024
5349
|
}
|
|
5025
|
-
addArrowDiv(e, t, s = !0, o = -1, i = -1, r = "header",
|
|
5026
|
-
const
|
|
5027
|
-
e.addClass(
|
|
5028
|
-
let
|
|
5029
|
-
s ?
|
|
5030
|
-
const
|
|
5031
|
-
e.appendChild(
|
|
5032
|
-
for (const u of
|
|
5033
|
-
e.addClass(
|
|
5034
|
-
return e.appendChild(t,
|
|
5350
|
+
addArrowDiv(e, t, s = !0, o = -1, i = -1, r = "header", l) {
|
|
5351
|
+
const n = e.createElement("div");
|
|
5352
|
+
e.addClass(n, "ge-table-toggle-icon-div"), e.setStyle(n, "display", "inline-block"), e.setStyle(n, "position", ""), e.setStyle(n, "width", "20px"), e.setStyle(n, "background", "transparent"), e.setStyle(n, "cursor", "pointer"), e.setAttribute(n, "data-row-index", `${o}`), e.setAttribute(n, "data-col-index", `${i}`), e.setAttribute(n, "data-area", `${r}`), e.setAttribute(n, "data-ge-action", `${l}`);
|
|
5353
|
+
let a;
|
|
5354
|
+
s ? a = this.headerGroupOptions.iconExpanded : a = this.headerGroupOptions.iconCollapsed;
|
|
5355
|
+
const c = a.content, d = e.createText(c);
|
|
5356
|
+
e.appendChild(n, d), a.style && this.applyStyleString(e, n, a.style);
|
|
5357
|
+
for (const u of a.classes)
|
|
5358
|
+
e.addClass(n, u);
|
|
5359
|
+
return e.appendChild(t, n), n;
|
|
5035
5360
|
}
|
|
5036
5361
|
applyStyleString(e, t, s) {
|
|
5037
5362
|
const o = s.split(";").map((i) => i.trim()).filter((i) => i);
|
|
5038
5363
|
for (const i of o) {
|
|
5039
|
-
const [r,
|
|
5040
|
-
e.setStyle(t, r.trim(),
|
|
5364
|
+
const [r, l] = i.split(":");
|
|
5365
|
+
e.setStyle(t, r.trim(), l.trim());
|
|
5041
5366
|
}
|
|
5042
5367
|
}
|
|
5043
5368
|
};
|
|
5044
|
-
|
|
5045
|
-
let
|
|
5046
|
-
class
|
|
5047
|
-
constructor(e = "header", t, s = [], o, i = new
|
|
5048
|
-
this.areaIdent = e, this.groups = t, this.columnDefs = s, this.defaultRowHeight = o, this.headerGroupOptions = i, this.gammaCells = !0, this.arr = [], this.groupExts = [], this.cellGroupExtCellRenderer = new
|
|
5369
|
+
Y.toggleHeaderGroup = "toggleHeaderGroup";
|
|
5370
|
+
let se = Y;
|
|
5371
|
+
class ys {
|
|
5372
|
+
constructor(e = "header", t, s = [], o, i = new le()) {
|
|
5373
|
+
this.areaIdent = e, this.groups = t, this.columnDefs = s, this.defaultRowHeight = o, this.headerGroupOptions = i, this.gammaCells = !0, this.arr = [], this.groupExts = [], this.cellGroupExtCellRenderer = new se(this.headerGroupOptions), this.groupExts = T.buildGroupExts(t), this.init();
|
|
5049
5374
|
}
|
|
5050
5375
|
init() {
|
|
5051
5376
|
var e;
|
|
@@ -5143,24 +5468,24 @@ class ns {
|
|
|
5143
5468
|
return t != null && t.toggle && t.visibility !== "always" && (t.closed = !t.closed, this.init()), T.buildColumnDefs(this.groupExts);
|
|
5144
5469
|
}
|
|
5145
5470
|
}
|
|
5146
|
-
class
|
|
5471
|
+
class xs {
|
|
5147
5472
|
filterPredict(e, t, s = this.objectToString.bind(this)) {
|
|
5148
5473
|
if (!e)
|
|
5149
5474
|
return !1;
|
|
5150
5475
|
if (!t)
|
|
5151
5476
|
return !0;
|
|
5152
5477
|
t = t.toLowerCase();
|
|
5153
|
-
const o = "+", i = "-", r = t.toLowerCase().split(" ").filter((d) => d !== o && d !== i && d !== ""),
|
|
5154
|
-
let
|
|
5155
|
-
for (let d = 0; d < n.length; d++)
|
|
5156
|
-
(a || s(e).includes(n[d])) && (a = !0);
|
|
5157
|
-
if (!a)
|
|
5158
|
-
return !1;
|
|
5478
|
+
const o = "+", i = "-", r = t.toLowerCase().split(" ").filter((d) => d !== o && d !== i && d !== ""), l = r.filter((d) => !d.startsWith(o) && !d.startsWith(i)), n = r.filter((d) => d.startsWith(o)).map((d) => d.replace(/\+/g, "")), a = r.filter((d) => d.startsWith(i)).map((d) => d.replace(/-/g, ""));
|
|
5479
|
+
let c = !l.length;
|
|
5159
5480
|
for (let d = 0; d < l.length; d++)
|
|
5160
|
-
|
|
5481
|
+
(c || s(e).includes(l[d])) && (c = !0);
|
|
5482
|
+
if (!c)
|
|
5483
|
+
return !1;
|
|
5484
|
+
for (let d = 0; d < n.length; d++)
|
|
5485
|
+
if (!s(e).includes(n[d]))
|
|
5161
5486
|
return !1;
|
|
5162
|
-
for (let d = 0; d <
|
|
5163
|
-
if (s(e).includes(
|
|
5487
|
+
for (let d = 0; d < a.length; d++)
|
|
5488
|
+
if (s(e).includes(a[d]))
|
|
5164
5489
|
return !1;
|
|
5165
5490
|
return !0;
|
|
5166
5491
|
}
|
|
@@ -5170,18 +5495,18 @@ class ls {
|
|
|
5170
5495
|
if (!t)
|
|
5171
5496
|
return [...e];
|
|
5172
5497
|
t = t.toLowerCase();
|
|
5173
|
-
const o = "+", i = "-", r = t.toLowerCase().split(" ").filter((
|
|
5174
|
-
return e == null ? void 0 : e.filter((
|
|
5175
|
-
let d = !
|
|
5176
|
-
for (let u = 0; u <
|
|
5177
|
-
(d || s(
|
|
5498
|
+
const o = "+", i = "-", r = t.toLowerCase().split(" ").filter((c) => c !== o && c !== i && c !== ""), l = r.filter((c) => !c.startsWith(o) && !c.startsWith(i)), n = r.filter((c) => c.startsWith(o)).map((c) => c.replace(/\+/g, "")), a = r.filter((c) => c.startsWith(i)).map((c) => c.replace(/-/g, ""));
|
|
5499
|
+
return e == null ? void 0 : e.filter((c) => {
|
|
5500
|
+
let d = !l.length;
|
|
5501
|
+
for (let u = 0; u < l.length; u++)
|
|
5502
|
+
(d || s(c).includes(l[u])) && (d = !0);
|
|
5178
5503
|
if (!d)
|
|
5179
5504
|
return !1;
|
|
5180
|
-
for (let u = 0; u <
|
|
5181
|
-
if (!s(
|
|
5505
|
+
for (let u = 0; u < n.length; u++)
|
|
5506
|
+
if (!s(c).includes(n[u]))
|
|
5182
5507
|
return !1;
|
|
5183
|
-
for (let u = 0; u <
|
|
5184
|
-
if (s(
|
|
5508
|
+
for (let u = 0; u < a.length; u++)
|
|
5509
|
+
if (s(c).includes(a[u]))
|
|
5185
5510
|
return !1;
|
|
5186
5511
|
return !0;
|
|
5187
5512
|
});
|
|
@@ -5197,20 +5522,20 @@ class ls {
|
|
|
5197
5522
|
return t.join(" ").toLowerCase();
|
|
5198
5523
|
}
|
|
5199
5524
|
}
|
|
5200
|
-
class
|
|
5525
|
+
class ws {
|
|
5201
5526
|
static bodyRenderer(e) {
|
|
5202
|
-
return new
|
|
5527
|
+
return new I(void 0, e, void 0);
|
|
5203
5528
|
}
|
|
5204
5529
|
}
|
|
5205
|
-
class
|
|
5530
|
+
class Ss {
|
|
5206
5531
|
constructor(e, t = !0, s = !1) {
|
|
5207
5532
|
this.property = e, this.skipCheckableCheck = t, this.readonly = s;
|
|
5208
5533
|
}
|
|
5209
|
-
render(e, t, s, o, i, r,
|
|
5534
|
+
render(e, t, s, o, i, r, l) {
|
|
5210
5535
|
if (this.readonly || this.skipCheckableCheck || i.isRowCheckable(t)) {
|
|
5211
|
-
|
|
5212
|
-
const
|
|
5213
|
-
if (
|
|
5536
|
+
l.addClass(e, "ge-table-row-checkbox-div");
|
|
5537
|
+
const n = i.getRowByIndex(t), c = i.getValueByT(n, this.property) === !0 ? "checked" : "", d = this.readonly ? " readonly " : "";
|
|
5538
|
+
if (l.addClass(e, "ge-padding-property-checkbox"), e.innerHTML = `
|
|
5214
5539
|
<input
|
|
5215
5540
|
type="checkbox"
|
|
5216
5541
|
data-area="${o}"
|
|
@@ -5218,21 +5543,21 @@ class cs {
|
|
|
5218
5543
|
data-col-index="${s}"
|
|
5219
5544
|
data-property-index="${this.property}"
|
|
5220
5545
|
data-input-type="checkbox"
|
|
5221
|
-
${
|
|
5546
|
+
${c}
|
|
5222
5547
|
${d}
|
|
5223
5548
|
class="ge-input-checkbox">`, !this.readonly) {
|
|
5224
5549
|
const u = e.querySelector(".ge-input-checkbox");
|
|
5225
|
-
u && u.addEventListener("click", (f,
|
|
5550
|
+
u && u.addEventListener("click", (f, g) => (n[this.property] = !n[this.property], !0));
|
|
5226
5551
|
}
|
|
5227
5552
|
}
|
|
5228
5553
|
}
|
|
5229
5554
|
}
|
|
5230
|
-
class
|
|
5231
|
-
render(e, t, s, o, i, r,
|
|
5555
|
+
class Cs {
|
|
5556
|
+
render(e, t, s, o, i, r, l) {
|
|
5232
5557
|
r && (e.innerText = new Date(r).toISOString());
|
|
5233
5558
|
}
|
|
5234
5559
|
}
|
|
5235
|
-
class
|
|
5560
|
+
class vs {
|
|
5236
5561
|
constructor() {
|
|
5237
5562
|
this.formatter = new Intl.DateTimeFormat("de-DE", {
|
|
5238
5563
|
year: "numeric",
|
|
@@ -5240,44 +5565,44 @@ class hs {
|
|
|
5240
5565
|
day: "2-digit"
|
|
5241
5566
|
});
|
|
5242
5567
|
}
|
|
5243
|
-
render(e, t, s, o, i, r,
|
|
5568
|
+
render(e, t, s, o, i, r, l) {
|
|
5244
5569
|
if (r) {
|
|
5245
|
-
let
|
|
5570
|
+
let n = "";
|
|
5246
5571
|
try {
|
|
5247
|
-
|
|
5572
|
+
n = this.formatter.format(new Date(r));
|
|
5248
5573
|
} catch {
|
|
5249
|
-
|
|
5574
|
+
n = r;
|
|
5250
5575
|
}
|
|
5251
5576
|
e.innerHTML = `
|
|
5252
5577
|
<div class="ge-table-label-div" data-row-index="${t}" data-col-index="${s}" data-area="${o}" style="position: relative; background: transparent; width: 100%; height: 100%;">
|
|
5253
|
-
<div class="ge-table-label" data-row-index="${t}" data-col-index="${s}" data-area="${o}">${
|
|
5578
|
+
<div class="ge-table-label" data-row-index="${t}" data-col-index="${s}" data-area="${o}">${n}</div>
|
|
5254
5579
|
</div>`;
|
|
5255
5580
|
}
|
|
5256
5581
|
}
|
|
5257
5582
|
}
|
|
5258
|
-
class
|
|
5259
|
-
render(e, t, s, o, i, r,
|
|
5583
|
+
class As {
|
|
5584
|
+
render(e, t, s, o, i, r, l) {
|
|
5260
5585
|
r && (e.innerText = new Date(r).toLocaleDateString());
|
|
5261
5586
|
}
|
|
5262
5587
|
}
|
|
5263
|
-
class
|
|
5264
|
-
render(e, t, s, o, i, r,
|
|
5588
|
+
class Rs {
|
|
5589
|
+
render(e, t, s, o, i, r, l) {
|
|
5265
5590
|
r === "male" || r === "m" ? e.innerText = "♂" : (r === "female" || r === "f") && (e.innerText = "♀");
|
|
5266
5591
|
}
|
|
5267
5592
|
}
|
|
5268
|
-
class
|
|
5593
|
+
class Es {
|
|
5269
5594
|
constructor(e = 100, t = !1) {
|
|
5270
5595
|
this.maxValue = e, this.labelVisible = t;
|
|
5271
5596
|
}
|
|
5272
|
-
render(e, t, s, o, i, r,
|
|
5273
|
-
if (
|
|
5274
|
-
const
|
|
5597
|
+
render(e, t, s, o, i, r, l) {
|
|
5598
|
+
if (l.addClass(e, "ge-progressbar-div"), !isNaN(r)) {
|
|
5599
|
+
const a = Number(r) * 100 / this.maxValue, c = this.labelVisible ? Math.round(a) + "%" : "";
|
|
5275
5600
|
e.innerHTML = `
|
|
5276
5601
|
<div class="ge-table-label-div"
|
|
5277
5602
|
data-row-index="${t}"
|
|
5278
5603
|
data-col-index="${s}"
|
|
5279
5604
|
data-area="${o}"
|
|
5280
|
-
title="${
|
|
5605
|
+
title="${c}"
|
|
5281
5606
|
style="position: relative; background: transparent; width: 100%; height: 100%;">
|
|
5282
5607
|
<div class="ge-table-progress-container"
|
|
5283
5608
|
style="width:100%;height:50%;padding:0;margin-top:6px;"
|
|
@@ -5285,7 +5610,7 @@ class ps {
|
|
|
5285
5610
|
data-col-index="${s}"
|
|
5286
5611
|
data-area="${o}">
|
|
5287
5612
|
<div class="ge-table-progress-bar"
|
|
5288
|
-
style="width:${
|
|
5613
|
+
style="width:${a}%;height:100%;padding:0;margin:0;"
|
|
5289
5614
|
data-row-index="${t}"
|
|
5290
5615
|
data-col-index="${s}"
|
|
5291
5616
|
data-area="${o}">
|
|
@@ -5295,36 +5620,36 @@ class ps {
|
|
|
5295
5620
|
}
|
|
5296
5621
|
}
|
|
5297
5622
|
}
|
|
5298
|
-
class
|
|
5299
|
-
render(e, t, s, o, i, r,
|
|
5623
|
+
class Ms {
|
|
5624
|
+
render(e, t, s, o, i, r, l) {
|
|
5300
5625
|
r === "true" || r === !0 ? e.innerHTML = '<span class="ge-true-text-color">✅</span>' : r === "false" || r === !1 ? e.innerHTML = '<span class="ge-false-text-color">❌</span>' : e.innerText = "";
|
|
5301
5626
|
}
|
|
5302
5627
|
}
|
|
5303
|
-
class
|
|
5304
|
-
render(e, t, s, o, i, r,
|
|
5628
|
+
class Ts {
|
|
5629
|
+
render(e, t, s, o, i, r, l) {
|
|
5305
5630
|
r && (e.innerText = new Date(r).toISOString().replace(/T/g, " ").replace(/\..*/g, ""));
|
|
5306
5631
|
}
|
|
5307
5632
|
}
|
|
5308
|
-
class
|
|
5633
|
+
class Is {
|
|
5309
5634
|
constructor(e = Number.MIN_SAFE_INTEGER, t = Number.MAX_SAFE_INTEGER) {
|
|
5310
5635
|
this.min = e, this.max = t;
|
|
5311
5636
|
}
|
|
5312
|
-
render(e, t, s, o, i, r,
|
|
5313
|
-
r && (e.innerText = r, (typeof r == "string" || isNaN(r) || r < this.min || r > this.max) &&
|
|
5637
|
+
render(e, t, s, o, i, r, l) {
|
|
5638
|
+
r && (e.innerText = r, (typeof r == "string" || isNaN(r) || r < this.min || r > this.max) && l.addClass(e, "ge-cell-error"));
|
|
5314
5639
|
}
|
|
5315
5640
|
}
|
|
5316
|
-
class
|
|
5641
|
+
class ks {
|
|
5317
5642
|
constructor(e) {
|
|
5318
5643
|
this.property = e;
|
|
5319
5644
|
}
|
|
5320
|
-
render(e, t, s, o, i, r,
|
|
5321
|
-
|
|
5322
|
-
const
|
|
5323
|
-
if (!isNaN(
|
|
5324
|
-
const
|
|
5325
|
-
for (let u = 0; u <
|
|
5326
|
-
|
|
5327
|
-
const d =
|
|
5645
|
+
render(e, t, s, o, i, r, l) {
|
|
5646
|
+
l.addClass(e, "ge-star-rating-div");
|
|
5647
|
+
const n = i.getRowByIndex(t), a = +("" + i.getValueByT(n, this.property));
|
|
5648
|
+
if (!isNaN(a)) {
|
|
5649
|
+
const c = [];
|
|
5650
|
+
for (let u = 0; u < a; u++)
|
|
5651
|
+
c.push("★");
|
|
5652
|
+
const d = c.join(" ");
|
|
5328
5653
|
e.innerHTML = `
|
|
5329
5654
|
<div class="ge-table-label-div" data-row-index="${t}" data-col-index="${s}" data-area="${o}" style="position: relative; background: transparent; width: 100%; height: 100%;">
|
|
5330
5655
|
<div class="ge-table-label" data-row-index="${t}" data-col-index="${s}" data-area="${o}">${d}</div>
|
|
@@ -5332,15 +5657,15 @@ class xs {
|
|
|
5332
5657
|
}
|
|
5333
5658
|
}
|
|
5334
5659
|
}
|
|
5335
|
-
class
|
|
5660
|
+
class Ds {
|
|
5336
5661
|
constructor(e, t = 100, s = !1) {
|
|
5337
5662
|
this.property = e, this.maxValue = t, this.labelVisible = s;
|
|
5338
5663
|
}
|
|
5339
|
-
render(e, t, s, o, i, r,
|
|
5340
|
-
|
|
5341
|
-
const
|
|
5342
|
-
if (!isNaN(
|
|
5343
|
-
const
|
|
5664
|
+
render(e, t, s, o, i, r, l) {
|
|
5665
|
+
l.addClass(e, "ge-star-rating-div");
|
|
5666
|
+
const n = i.getRowByIndex(t), a = +("" + i.getValueByT(n, this.property));
|
|
5667
|
+
if (!isNaN(a)) {
|
|
5668
|
+
const c = a * 100 / this.maxValue, d = this.labelVisible ? Math.round(c) + "%" : "";
|
|
5344
5669
|
e.innerHTML = `
|
|
5345
5670
|
<div class="ge-table-label-div"
|
|
5346
5671
|
data-row-index="${t}"
|
|
@@ -5354,7 +5679,7 @@ class ws {
|
|
|
5354
5679
|
data-col-index="${s}"
|
|
5355
5680
|
data-area="${o}">
|
|
5356
5681
|
<div class="ge-table-progress-bar"
|
|
5357
|
-
style="width:${
|
|
5682
|
+
style="width:${c}%;height:100%;padding:0;margin:0;"
|
|
5358
5683
|
data-row-index="${t}"
|
|
5359
5684
|
data-col-index="${s}"
|
|
5360
5685
|
data-area="${o}">
|
|
@@ -5364,8 +5689,8 @@ class ws {
|
|
|
5364
5689
|
}
|
|
5365
5690
|
}
|
|
5366
5691
|
}
|
|
5367
|
-
class
|
|
5368
|
-
render(e, t, s, o, i, r,
|
|
5692
|
+
class Fs {
|
|
5693
|
+
render(e, t, s, o, i, r, l) {
|
|
5369
5694
|
if (r) {
|
|
5370
5695
|
e.innerHTML = `
|
|
5371
5696
|
<div
|
|
@@ -5379,31 +5704,31 @@ class ys {
|
|
|
5379
5704
|
data-row-index="${t}"
|
|
5380
5705
|
data-col-index="${s}"
|
|
5381
5706
|
data-area="${o}">${r}</div></div>`;
|
|
5382
|
-
const
|
|
5383
|
-
|
|
5707
|
+
const n = Number(r);
|
|
5708
|
+
n > 0 ? l.addClass(e, "ge-positive-text-color") : n < 0 && l.addClass(e, "ge-negative-text-color");
|
|
5384
5709
|
}
|
|
5385
5710
|
}
|
|
5386
5711
|
}
|
|
5387
|
-
class
|
|
5712
|
+
class Te {
|
|
5388
5713
|
constructor(e, t, s, o, i, r) {
|
|
5389
5714
|
this.action = e, this.area = t, this.areaModel = s, this.rowIndex = o, this.columnIndex = i, this.id = r;
|
|
5390
5715
|
}
|
|
5391
5716
|
}
|
|
5392
|
-
class
|
|
5717
|
+
class $ {
|
|
5393
5718
|
constructor(e, t, s = "", o = "", i = "button", r = !0) {
|
|
5394
5719
|
this.action = e, this.label = t, this.icon = s, this.elementClass = o, this.elementType = i, this.enabled = r;
|
|
5395
5720
|
}
|
|
5396
5721
|
}
|
|
5397
|
-
class
|
|
5722
|
+
class xt {
|
|
5398
5723
|
constructor(e, t) {
|
|
5399
5724
|
this.actionEventListener = e, this.crudActions = t;
|
|
5400
5725
|
}
|
|
5401
|
-
render(e, t, s, o, i, r,
|
|
5402
|
-
|
|
5403
|
-
const
|
|
5404
|
-
(d) => d.elementType === "button" ? this.buildButtonHtml(d, o, t, s,
|
|
5726
|
+
render(e, t, s, o, i, r, l) {
|
|
5727
|
+
l.addClass(e, "ge-table-row-action-div");
|
|
5728
|
+
const n = r, c = this.getCrudActions(r).map(
|
|
5729
|
+
(d) => d.elementType === "button" ? this.buildButtonHtml(d, o, t, s, n) : this.buildLinkHtml(d, o, t, s, n)
|
|
5405
5730
|
);
|
|
5406
|
-
e.innerHTML =
|
|
5731
|
+
e.innerHTML = c.join(""), this.addClickEventListeners(e, o, i);
|
|
5407
5732
|
}
|
|
5408
5733
|
buildButtonHtml(e, t, s, o, i) {
|
|
5409
5734
|
const r = e.enabled ? 'data-listen="click"' : "disabled";
|
|
@@ -5439,52 +5764,52 @@ class at {
|
|
|
5439
5764
|
addClickEventListeners(e, t, s) {
|
|
5440
5765
|
e.querySelectorAll(".ge-table-cell-action").forEach((i) => {
|
|
5441
5766
|
i.addEventListener("click", (r) => {
|
|
5442
|
-
const
|
|
5443
|
-
if (
|
|
5444
|
-
const
|
|
5445
|
-
|
|
5767
|
+
const l = r.target;
|
|
5768
|
+
if (l) {
|
|
5769
|
+
const n = this.createActionEvent(l, s);
|
|
5770
|
+
n && this.actionEventListener.onActionEvent(n);
|
|
5446
5771
|
}
|
|
5447
5772
|
});
|
|
5448
5773
|
});
|
|
5449
5774
|
}
|
|
5450
5775
|
createActionEvent(e, t) {
|
|
5451
|
-
const s = e.getAttribute("data-area"), o = e.getAttribute("data-row-index"), i = e.getAttribute("data-col-index"), r = e.getAttribute("data-action") ?? "unknown",
|
|
5776
|
+
const s = e.getAttribute("data-area"), o = e.getAttribute("data-row-index"), i = e.getAttribute("data-col-index"), r = e.getAttribute("data-action") ?? "unknown", l = e.getAttribute("data-id") ?? "unknown";
|
|
5452
5777
|
if (s && o && i) {
|
|
5453
|
-
const
|
|
5454
|
-
return new
|
|
5778
|
+
const n = J(s), a = Number(o), c = Number(i);
|
|
5779
|
+
return new Te(r, n, t, a, c, l);
|
|
5455
5780
|
}
|
|
5456
5781
|
return null;
|
|
5457
5782
|
}
|
|
5458
5783
|
getCrudActions(e) {
|
|
5459
|
-
return Array.isArray(e) && e.every((t) => t instanceof
|
|
5784
|
+
return Array.isArray(e) && e.every((t) => t instanceof $) ? e : this.crudActions;
|
|
5460
5785
|
}
|
|
5461
5786
|
}
|
|
5462
|
-
const
|
|
5787
|
+
const Ps = function(h, e, t) {
|
|
5463
5788
|
return h ? Number(h) : "";
|
|
5464
5789
|
};
|
|
5465
|
-
class
|
|
5790
|
+
class Ie {
|
|
5466
5791
|
constructor(e) {
|
|
5467
5792
|
this.options = e;
|
|
5468
5793
|
}
|
|
5469
5794
|
static create(e) {
|
|
5470
|
-
return new
|
|
5471
|
-
e.map((t) => new
|
|
5795
|
+
return new Ie(
|
|
5796
|
+
e.map((t) => new mt(t, t))
|
|
5472
5797
|
);
|
|
5473
5798
|
}
|
|
5474
|
-
render(e, t, s, o, i, r,
|
|
5799
|
+
render(e, t, s, o, i, r, l) {
|
|
5475
5800
|
if (i.isEditable(t, s)) {
|
|
5476
|
-
|
|
5477
|
-
const
|
|
5478
|
-
let
|
|
5801
|
+
l.addClass(e, "ge-table-row-select-div");
|
|
5802
|
+
const n = i.getValueAt(t, s);
|
|
5803
|
+
let a = [];
|
|
5479
5804
|
for (let d of this.options) {
|
|
5480
|
-
const u = d.value ===
|
|
5481
|
-
|
|
5805
|
+
const u = d.value === n ? " selected " : "";
|
|
5806
|
+
a.push(`<option value="${d.value}" ${u}>${d.label}</option>`);
|
|
5482
5807
|
}
|
|
5483
|
-
const
|
|
5808
|
+
const c = a.join("");
|
|
5484
5809
|
e.innerHTML = `
|
|
5485
5810
|
<select
|
|
5486
5811
|
type="text"
|
|
5487
|
-
value="${
|
|
5812
|
+
value="${n}"
|
|
5488
5813
|
autofocus
|
|
5489
5814
|
data-listen="change"
|
|
5490
5815
|
data-area="${o}"
|
|
@@ -5492,11 +5817,11 @@ class Ae {
|
|
|
5492
5817
|
data-col-index="${s}"
|
|
5493
5818
|
data-input-type="text"
|
|
5494
5819
|
style="width:100%;height:100%;border:0;padding:0 0 0 8px;"
|
|
5495
|
-
class="ge-table-cell-editor-select">${
|
|
5820
|
+
class="ge-table-cell-editor-select">${c}</select>`;
|
|
5496
5821
|
}
|
|
5497
5822
|
}
|
|
5498
5823
|
}
|
|
5499
|
-
class
|
|
5824
|
+
class Ls extends ne {
|
|
5500
5825
|
constructor(e) {
|
|
5501
5826
|
super("row", "multi"), this.model = e;
|
|
5502
5827
|
}
|
|
@@ -5579,39 +5904,39 @@ class Cs extends ie {
|
|
|
5579
5904
|
this.isSelected(e, 0) ? this.unselectRow(e) : this.selectRow(e);
|
|
5580
5905
|
}
|
|
5581
5906
|
}
|
|
5582
|
-
class
|
|
5907
|
+
class $s {
|
|
5583
5908
|
constructor(e, t, s) {
|
|
5584
5909
|
this.r = e, this.g = t, this.b = s;
|
|
5585
5910
|
}
|
|
5586
5911
|
}
|
|
5587
|
-
class
|
|
5912
|
+
class Se {
|
|
5588
5913
|
constructor(e, t, s, o) {
|
|
5589
5914
|
this.minValue = e, this.minColor = t, this.maxValue = s, this.maxColor = o;
|
|
5590
5915
|
}
|
|
5591
5916
|
}
|
|
5592
|
-
class
|
|
5917
|
+
class j {
|
|
5593
5918
|
static normalize(e, t, s, o = 0, i = 1) {
|
|
5594
5919
|
return (e - t) / (s - t) * (i - o) + o;
|
|
5595
5920
|
}
|
|
5596
5921
|
static getTwoColorGradientRGB(e, t) {
|
|
5597
|
-
const s =
|
|
5598
|
-
return `rgb(${Math.round(
|
|
5922
|
+
const s = j.normalize(e, t.minValue, t.maxValue, 0, 1), o = t.maxColor.r - t.minColor.r, i = t.maxColor.g - t.minColor.g, r = t.maxColor.b - t.minColor.b, l = o * s + t.minColor.r, n = i * s + t.minColor.g, a = r * s + t.minColor.b;
|
|
5923
|
+
return `rgb(${Math.round(l)}, ${Math.round(n)}, ${Math.round(a)})`;
|
|
5599
5924
|
}
|
|
5600
5925
|
static getThreeColorGradientRGB(e, t) {
|
|
5601
|
-
return e < t.middleValue ?
|
|
5926
|
+
return e < t.middleValue ? j.getTwoColorGradientRGB(e, new Se(t.minValue, t.minColor, t.middleValue, t.middleColor)) : e > t.middleValue ? j.getTwoColorGradientRGB(e, new Se(t.middleValue, t.middleColor, t.maxValue, t.maxColor)) : `rgb(${t.middleColor.r}, ${t.middleColor.g}, ${t.middleColor.b})`;
|
|
5602
5927
|
}
|
|
5603
5928
|
}
|
|
5604
|
-
class
|
|
5929
|
+
class Os {
|
|
5605
5930
|
constructor(e, t, s, o, i, r) {
|
|
5606
5931
|
this.minValue = e, this.minColor = t, this.middleValue = s, this.middleColor = o, this.maxValue = i, this.maxColor = r;
|
|
5607
5932
|
}
|
|
5608
5933
|
}
|
|
5609
|
-
class
|
|
5610
|
-
constructor(e = !0, t = !0, s = (r,
|
|
5934
|
+
class wt {
|
|
5935
|
+
constructor(e = !0, t = !0, s = (r, l) => r * 10 + 10, o = 50, i = 450) {
|
|
5611
5936
|
this.autoCalc = e, this.takeHeaderLabelsIntoAccount = t, this.charCountToWidth = s, this.minWidth = o, this.maxWidth = i;
|
|
5612
5937
|
}
|
|
5613
5938
|
}
|
|
5614
|
-
class
|
|
5939
|
+
class St {
|
|
5615
5940
|
constructor(e) {
|
|
5616
5941
|
this.object = e;
|
|
5617
5942
|
}
|
|
@@ -5649,21 +5974,21 @@ class dt {
|
|
|
5649
5974
|
</table>`;
|
|
5650
5975
|
}
|
|
5651
5976
|
generateTableRows(e, t = "") {
|
|
5652
|
-
const s = [], o = (i, r = null,
|
|
5977
|
+
const s = [], o = (i, r = null, l = !1) => `
|
|
5653
5978
|
<tr>
|
|
5654
|
-
<td${
|
|
5979
|
+
<td${l ? ' class="ge-table-crud-object-view-object-child"' : ""}>${i}</td>
|
|
5655
5980
|
<td>${r ?? ""}</td>
|
|
5656
5981
|
</tr>`;
|
|
5657
5982
|
for (const i in e) {
|
|
5658
5983
|
if (!e.hasOwnProperty(i))
|
|
5659
5984
|
continue;
|
|
5660
|
-
const r = e[i],
|
|
5661
|
-
typeof r == "object" && r !== null ? (s.push(o(
|
|
5985
|
+
const r = e[i], l = this.getCombinedKey(t, i), n = this.getLabel(l);
|
|
5986
|
+
typeof r == "object" && r !== null ? (s.push(o(n, null, !0)), s.push(this.generateTableRows(r, l))) : s.push(o(n, String(r)));
|
|
5662
5987
|
}
|
|
5663
5988
|
return s.join("");
|
|
5664
5989
|
}
|
|
5665
5990
|
}
|
|
5666
|
-
class
|
|
5991
|
+
class Q {
|
|
5667
5992
|
constructor(e, t, s = "Edit Item") {
|
|
5668
5993
|
this.idKey = e, this.dialogTitle = s, this.object = { ...t };
|
|
5669
5994
|
}
|
|
@@ -5682,8 +6007,8 @@ class q {
|
|
|
5682
6007
|
const s = t.querySelector(".ge-table-dialog-footer-save-button"), o = t.querySelector(".ge-table-dialog-footer-cancel-button");
|
|
5683
6008
|
s.addEventListener("click", () => {
|
|
5684
6009
|
const i = t.querySelector("form"), r = new FormData(i);
|
|
5685
|
-
for (const [
|
|
5686
|
-
this.setNestedValue(this.object,
|
|
6010
|
+
for (const [l, n] of r)
|
|
6011
|
+
this.setNestedValue(this.object, l, n);
|
|
5687
6012
|
e(this.object), t.close(), t.remove();
|
|
5688
6013
|
}), o.addEventListener("click", () => {
|
|
5689
6014
|
t.close(), t.remove();
|
|
@@ -5694,15 +6019,15 @@ class q {
|
|
|
5694
6019
|
for (const o in e) {
|
|
5695
6020
|
if (!e.hasOwnProperty(o) || this.idKey === o)
|
|
5696
6021
|
continue;
|
|
5697
|
-
const i = this.getCombinedKey(t, o), r = this.getLabel(i),
|
|
5698
|
-
if (typeof
|
|
5699
|
-
s.push(this.generateForm(
|
|
6022
|
+
const i = this.getCombinedKey(t, o), r = this.getLabel(i), l = e[o];
|
|
6023
|
+
if (typeof l == "object" && l !== null)
|
|
6024
|
+
s.push(this.generateForm(l, i));
|
|
5700
6025
|
else {
|
|
5701
|
-
let
|
|
5702
|
-
typeof
|
|
6026
|
+
let n;
|
|
6027
|
+
typeof l == "string" ? n = `<input type="text" id="${i}" name="${i}" value="${l}" />` : typeof l == "number" ? n = `<input type="number" id="${i}" name="${i}" value="${l}" />` : typeof l == "boolean" ? n = `<input type="checkbox" id="${i}" name="${i}" ${l ? "checked" : ""} />` : n = `<input type="text" id="${i}" name="${i}" value="${l}" />`, s.push(`
|
|
5703
6028
|
<div class="form-field">
|
|
5704
6029
|
<label for="${i}">${r}</label>
|
|
5705
|
-
${
|
|
6030
|
+
${n}
|
|
5706
6031
|
</div>
|
|
5707
6032
|
`);
|
|
5708
6033
|
}
|
|
@@ -5745,7 +6070,7 @@ class q {
|
|
|
5745
6070
|
return e.replace(/\./g, " ");
|
|
5746
6071
|
}
|
|
5747
6072
|
}
|
|
5748
|
-
class
|
|
6073
|
+
class Ct {
|
|
5749
6074
|
constructor() {
|
|
5750
6075
|
this.urls = {
|
|
5751
6076
|
list: {
|
|
@@ -5753,15 +6078,15 @@ class ht {
|
|
|
5753
6078
|
method: "GET"
|
|
5754
6079
|
}
|
|
5755
6080
|
}, this.singleRowActions = [
|
|
5756
|
-
new
|
|
5757
|
-
new
|
|
5758
|
-
new
|
|
5759
|
-
new
|
|
6081
|
+
new $("VIEW", "View", "", "", "link"),
|
|
6082
|
+
new $("EDIT", "Edit", "", "", "link"),
|
|
6083
|
+
new $("CLONE", "Clone", "", "", "link"),
|
|
6084
|
+
new $("DELETE", "Delete", "", "", "link")
|
|
5760
6085
|
// new CrudAction('CREATE', 'Create', '', '', 'link'),
|
|
5761
6086
|
], this.tableActions = [
|
|
5762
|
-
new
|
|
5763
|
-
new
|
|
5764
|
-
], this.autoAddActionColumn = !0, this.columnWidths = new
|
|
6087
|
+
new $("CREATE", "Create", "", "", "button"),
|
|
6088
|
+
new $("DELETE_SELECTED", "Delete Selected", "", "", "button")
|
|
6089
|
+
], this.autoAddActionColumn = !0, this.columnWidths = new wt(), this.calcFixedRightColumnCount = (e) => e > 6 ? 1 : 0, this.getHeadersInit = () => ({}), this.getIdKey = () => "id", this.getIdByObject = (e) => (this.getIdKey() ?? "id") in e ? e.id : e, this.fetchList = (e) => {
|
|
5765
6090
|
const t = e.getHeadersInit ? e.getHeadersInit() : {};
|
|
5766
6091
|
let s = e.urls.list.url, o = e.urls.list.method ?? "GET";
|
|
5767
6092
|
return fetch(s, {
|
|
@@ -5769,97 +6094,102 @@ class ht {
|
|
|
5769
6094
|
method: o
|
|
5770
6095
|
}).then((i) => i.json());
|
|
5771
6096
|
}, this.fetchItem = (e, t) => {
|
|
5772
|
-
var r,
|
|
6097
|
+
var r, l;
|
|
5773
6098
|
const s = e.getHeadersInit ? e.getHeadersInit() : {};
|
|
5774
6099
|
let o = ((r = e.urls.read) == null ? void 0 : r.url) ?? "";
|
|
5775
6100
|
o = o.replace("{id}", t);
|
|
5776
|
-
let i = ((
|
|
6101
|
+
let i = ((l = e.urls.read) == null ? void 0 : l.method) ?? "GET";
|
|
5777
6102
|
return fetch(o, {
|
|
5778
6103
|
headers: s,
|
|
5779
6104
|
method: i
|
|
5780
|
-
}).then((
|
|
6105
|
+
}).then((n) => n.json());
|
|
5781
6106
|
}, this.updateItem = (e, t, s) => {
|
|
5782
|
-
var
|
|
6107
|
+
var l, n;
|
|
5783
6108
|
const o = e.getHeadersInit ? e.getHeadersInit() : {};
|
|
5784
|
-
let i = ((
|
|
6109
|
+
let i = ((l = e.urls.update) == null ? void 0 : l.url) ?? "";
|
|
5785
6110
|
i = i.replace("{id}", t);
|
|
5786
|
-
let r = ((
|
|
6111
|
+
let r = ((n = e.urls.update) == null ? void 0 : n.method) ?? "PATCH";
|
|
5787
6112
|
return fetch(i, {
|
|
5788
6113
|
headers: o,
|
|
5789
6114
|
method: r,
|
|
5790
6115
|
body: JSON.stringify(s)
|
|
5791
|
-
}).then((
|
|
6116
|
+
}).then((a) => a.json());
|
|
5792
6117
|
}, this.createItem = (e, t) => {
|
|
5793
|
-
var r,
|
|
6118
|
+
var r, l;
|
|
5794
6119
|
const s = e.getHeadersInit ? e.getHeadersInit() : {};
|
|
5795
|
-
let o = ((r = e.urls.create) == null ? void 0 : r.url) ?? "", i = ((
|
|
6120
|
+
let o = ((r = e.urls.create) == null ? void 0 : r.url) ?? "", i = ((l = e.urls.create) == null ? void 0 : l.method) ?? "POST";
|
|
5796
6121
|
return fetch(o, {
|
|
5797
6122
|
headers: s,
|
|
5798
6123
|
method: i,
|
|
5799
6124
|
body: JSON.stringify(t)
|
|
5800
|
-
}).then((
|
|
6125
|
+
}).then((n) => n.json());
|
|
5801
6126
|
}, this.deleteItem = (e, t) => {
|
|
5802
|
-
var r,
|
|
6127
|
+
var r, l;
|
|
5803
6128
|
const s = e.getHeadersInit ? e.getHeadersInit() : {};
|
|
5804
6129
|
let o = ((r = e.urls.delete) == null ? void 0 : r.url) ?? "";
|
|
5805
6130
|
o = o.replace("{id}", t);
|
|
5806
|
-
let i = ((
|
|
6131
|
+
let i = ((l = e.urls.delete) == null ? void 0 : l.method) ?? "GET";
|
|
5807
6132
|
return fetch(o, {
|
|
5808
6133
|
headers: s,
|
|
5809
6134
|
method: i
|
|
5810
|
-
}).then((
|
|
6135
|
+
}).then((n) => n.json());
|
|
5811
6136
|
}, this.getEmptyItem = () => {
|
|
5812
6137
|
};
|
|
5813
6138
|
}
|
|
5814
6139
|
}
|
|
5815
|
-
class
|
|
6140
|
+
class _s {
|
|
5816
6141
|
constructor() {
|
|
5817
|
-
this.crudOptions = new
|
|
6142
|
+
this.crudOptions = new Ct(), this.listenActionEvent = (e) => {
|
|
5818
6143
|
};
|
|
5819
6144
|
}
|
|
5820
6145
|
createTableModel(e, t, s = (i) => {
|
|
5821
6146
|
}, o = (i) => {
|
|
5822
6147
|
}) {
|
|
5823
6148
|
this.crudOptions = e, this.listenActionEvent = o, e.fetchList(e).then((i) => {
|
|
5824
|
-
var r, n;
|
|
6149
|
+
var r, l, n, a;
|
|
5825
6150
|
if (t.rows = i, i != null && i.length) {
|
|
5826
|
-
const
|
|
6151
|
+
const c = (r = t.columnDefs) != null && r.length ? t.columnDefs.map((x) => x.property) : this.extractProperties(i[0]), d = new ne("row", "multi"), u = () => d;
|
|
5827
6152
|
this.tableOptions = {
|
|
5828
|
-
...new
|
|
6153
|
+
...new U(),
|
|
5829
6154
|
...t.tableOptions,
|
|
5830
6155
|
hoverColumnVisible: !1,
|
|
5831
|
-
getSelectionModel:
|
|
6156
|
+
getSelectionModel: u
|
|
5832
6157
|
};
|
|
5833
|
-
const
|
|
6158
|
+
const f = this.calcAutoColumnWidths(i, c), g = (l = t.columnDefs) != null && l.length ? t.columnDefs : c.map((x, S) => new B(x, x.toUpperCase(), new y(f[S], "px")));
|
|
6159
|
+
if ((n = e == null ? void 0 : e.columnWidths) != null && n.autoCalc)
|
|
6160
|
+
for (let x = 0; x < g.length; x++) {
|
|
6161
|
+
const S = g[x];
|
|
6162
|
+
S.width = new y(f[x], "px");
|
|
6163
|
+
}
|
|
5834
6164
|
if (e.autoAddActionColumn) {
|
|
5835
|
-
let
|
|
6165
|
+
let x = new B(
|
|
5836
6166
|
"id",
|
|
5837
6167
|
"Actions",
|
|
5838
|
-
|
|
5839
|
-
new
|
|
6168
|
+
dt,
|
|
6169
|
+
new I(["ge-table-text-align-left"], ["ge-table-text-align-left ge-table-actions-cell"], void 0)
|
|
5840
6170
|
);
|
|
5841
|
-
|
|
6171
|
+
x.rendererMap = new I(
|
|
5842
6172
|
void 0,
|
|
5843
|
-
new
|
|
6173
|
+
new xt(this, e.singleRowActions),
|
|
5844
6174
|
void 0
|
|
5845
|
-
),
|
|
6175
|
+
), g.push(x);
|
|
5846
6176
|
}
|
|
5847
|
-
const
|
|
5848
|
-
this.tableModel =
|
|
6177
|
+
const m = 0, p = e.calcFixedRightColumnCount(g.length);
|
|
6178
|
+
this.tableModel = _.buildByTypedRowsParam({
|
|
5849
6179
|
rows: i,
|
|
5850
|
-
columnDefs:
|
|
6180
|
+
columnDefs: g,
|
|
5851
6181
|
tableOptions: this.tableOptions,
|
|
5852
|
-
fixedLeftColumnCount:
|
|
6182
|
+
fixedLeftColumnCount: m,
|
|
5853
6183
|
fixedRightColumnCount: p
|
|
5854
|
-
}), this.tableModel.getSelectionModel =
|
|
5855
|
-
const
|
|
5856
|
-
s(
|
|
6184
|
+
}), this.tableModel.getSelectionModel = u, this.bodyModel = (a = this.tableModel) == null ? void 0 : a.getBodyModel();
|
|
6185
|
+
const b = new gt(this.tableModel, this.tableOptions);
|
|
6186
|
+
s(b);
|
|
5857
6187
|
}
|
|
5858
6188
|
});
|
|
5859
6189
|
}
|
|
5860
6190
|
openDialogForCreate() {
|
|
5861
6191
|
if (this.bodyModel) {
|
|
5862
|
-
const e = new
|
|
6192
|
+
const e = new Te("CREATE", "body", this.bodyModel, -1, -1, null);
|
|
5863
6193
|
this.onActionEvent(e);
|
|
5864
6194
|
}
|
|
5865
6195
|
}
|
|
@@ -5867,68 +6197,68 @@ class Rs {
|
|
|
5867
6197
|
var t, s, o, i;
|
|
5868
6198
|
if (this.listenActionEvent && this.listenActionEvent(e), e.action === "VIEW") {
|
|
5869
6199
|
let r = e.id;
|
|
5870
|
-
(t = this.crudOptions) == null || t.fetchItem(this.crudOptions, r).then((
|
|
6200
|
+
(t = this.crudOptions) == null || t.fetchItem(this.crudOptions, r).then((l) => (console.info(l), new St(l).openDialog(), l));
|
|
5871
6201
|
} else if (e.action === "EDIT") {
|
|
5872
6202
|
let r = e.id;
|
|
5873
|
-
const
|
|
5874
|
-
(s = this.crudOptions) == null || s.fetchItem(this.crudOptions, r).then((
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
).openDialog((
|
|
5878
|
-
console.info(
|
|
5879
|
-
}),
|
|
6203
|
+
const l = this.crudOptions.getIdKey() ?? "id";
|
|
6204
|
+
(s = this.crudOptions) == null || s.fetchItem(this.crudOptions, r).then((n) => (console.info(n), new Q(
|
|
6205
|
+
l,
|
|
6206
|
+
n
|
|
6207
|
+
).openDialog((a) => {
|
|
6208
|
+
console.info(a), this.crudOptions.updateItem(this.crudOptions, r, a);
|
|
6209
|
+
}), n));
|
|
5880
6210
|
} else if (e.action === "CLONE") {
|
|
5881
6211
|
let r = e.id;
|
|
5882
|
-
const
|
|
5883
|
-
(o = this.crudOptions) == null || o.fetchItem(this.crudOptions, r).then((
|
|
5884
|
-
const
|
|
5885
|
-
return new
|
|
5886
|
-
|
|
5887
|
-
|
|
6212
|
+
const l = this.crudOptions.getIdKey() ?? "id";
|
|
6213
|
+
(o = this.crudOptions) == null || o.fetchItem(this.crudOptions, r).then((n) => {
|
|
6214
|
+
const a = JSON.parse(JSON.stringify(n));
|
|
6215
|
+
return new Q(
|
|
6216
|
+
l,
|
|
6217
|
+
a,
|
|
5888
6218
|
"Clone Item"
|
|
5889
|
-
).openDialog((
|
|
5890
|
-
console.info(
|
|
5891
|
-
}),
|
|
6219
|
+
).openDialog((c) => {
|
|
6220
|
+
console.info(c), this.crudOptions.createItem(this.crudOptions, c);
|
|
6221
|
+
}), a;
|
|
5892
6222
|
});
|
|
5893
6223
|
} else if (e.action === "CREATE") {
|
|
5894
|
-
const r = this.crudOptions.getIdKey() ?? "id",
|
|
5895
|
-
return new
|
|
6224
|
+
const r = this.crudOptions.getIdKey() ?? "id", l = JSON.parse(JSON.stringify(this.crudOptions.getEmptyItem()));
|
|
6225
|
+
return new Q(
|
|
5896
6226
|
r,
|
|
5897
|
-
|
|
6227
|
+
l,
|
|
5898
6228
|
"Create Item"
|
|
5899
|
-
).openDialog((
|
|
5900
|
-
console.info(
|
|
5901
|
-
}),
|
|
6229
|
+
).openDialog((n) => {
|
|
6230
|
+
console.info(n), this.crudOptions.createItem(this.crudOptions, l);
|
|
6231
|
+
}), l;
|
|
5902
6232
|
} else if (e.action === "DELETE") {
|
|
5903
6233
|
let r = e.id;
|
|
5904
|
-
(i = this.crudOptions) == null || i.deleteItem(this.crudOptions, r).then((
|
|
5905
|
-
var
|
|
5906
|
-
return (
|
|
6234
|
+
(i = this.crudOptions) == null || i.deleteItem(this.crudOptions, r).then((l) => {
|
|
6235
|
+
var n, a, c, d, u;
|
|
6236
|
+
return (n = this.bodyModel) == null || n.filterRowsByPredict((f) => f.id != r), (c = (a = this.tableModel) == null ? void 0 : a.getTableScope()) == null || c.clearSelection(!0), (u = (d = this.tableModel) == null ? void 0 : d.getTableScope()) == null || u.repaintHard(), l;
|
|
5907
6237
|
});
|
|
5908
6238
|
}
|
|
5909
6239
|
}
|
|
5910
6240
|
calcAutoColumnWidths(e, t, s = t) {
|
|
5911
|
-
var
|
|
6241
|
+
var a;
|
|
5912
6242
|
const o = t.length;
|
|
5913
|
-
if (!((
|
|
6243
|
+
if (!((a = this.crudOptions.columnWidths) != null && a.autoCalc))
|
|
5914
6244
|
return new Array(o).fill(200);
|
|
5915
6245
|
const i = e.length ?? 0, r = new Array(o).fill(0);
|
|
5916
|
-
for (let
|
|
6246
|
+
for (let c = 0; c < i; c++)
|
|
5917
6247
|
for (let d = 0; d < o; d++) {
|
|
5918
|
-
const u = t[d], f = this.getValueByT(e[
|
|
5919
|
-
|
|
6248
|
+
const u = t[d], f = this.getValueByT(e[c], u), g = (f == null ? void 0 : f.toString().length) || 0;
|
|
6249
|
+
g > r[d] && (r[d] = g);
|
|
5920
6250
|
}
|
|
5921
6251
|
if (this.crudOptions.columnWidths.takeHeaderLabelsIntoAccount)
|
|
5922
|
-
for (let
|
|
5923
|
-
const d = s[
|
|
5924
|
-
d > r[
|
|
6252
|
+
for (let c = 0; c < o; c++) {
|
|
6253
|
+
const d = s[c].length || 0;
|
|
6254
|
+
d > r[c] && (r[c] = d);
|
|
5925
6255
|
}
|
|
5926
|
-
const
|
|
5927
|
-
return r.map((
|
|
5928
|
-
|
|
6256
|
+
const l = this.crudOptions.columnWidths.minWidth, n = this.crudOptions.columnWidths.maxWidth;
|
|
6257
|
+
return r.map((c, d) => Math.min(
|
|
6258
|
+
n,
|
|
5929
6259
|
Math.max(
|
|
5930
|
-
this.crudOptions.columnWidths.charCountToWidth(
|
|
5931
|
-
|
|
6260
|
+
this.crudOptions.columnWidths.charCountToWidth(c, d),
|
|
6261
|
+
l
|
|
5932
6262
|
)
|
|
5933
6263
|
));
|
|
5934
6264
|
}
|
|
@@ -5948,161 +6278,173 @@ class Rs {
|
|
|
5948
6278
|
return s;
|
|
5949
6279
|
}
|
|
5950
6280
|
}
|
|
5951
|
-
class
|
|
6281
|
+
class Bs {
|
|
5952
6282
|
constructor(e, t) {
|
|
5953
6283
|
this.method = e, this.url = t;
|
|
5954
6284
|
}
|
|
5955
6285
|
}
|
|
5956
6286
|
export {
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
6287
|
+
ae as AbstractAreaModel,
|
|
6288
|
+
Te as ActionEvent,
|
|
6289
|
+
xt as ActionsCellRenderer,
|
|
6290
|
+
Ce as AnyPropertyType,
|
|
6291
|
+
ps as AreaMapFactory,
|
|
6292
|
+
bs as AreaModel,
|
|
5962
6293
|
D as AreaModelArrayOfArrays,
|
|
5963
|
-
|
|
6294
|
+
ys as AreaModelCellGroups,
|
|
5964
6295
|
F as AreaModelHidden,
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
6296
|
+
pt as AreaModelObjectArray,
|
|
6297
|
+
xe as AreaModelObjectArrayWithColumndefs,
|
|
6298
|
+
me as AreaModelTree,
|
|
6299
|
+
I as AreaObjectMap,
|
|
6300
|
+
G as ArrayPropertyType,
|
|
6301
|
+
ms as AutoRestoreOptions,
|
|
6302
|
+
At as AvoidDoubleExecution,
|
|
6303
|
+
Le as BooleanPropertyType,
|
|
6304
|
+
bt as CellGroup,
|
|
6305
|
+
yt as CellGroupExt,
|
|
6306
|
+
se as CellGroupExtCellRenderer,
|
|
5974
6307
|
R as CellRange,
|
|
5975
6308
|
T as CellgroupFactory,
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6309
|
+
Ss as CheckboxBooleanPropertyCellRenderer,
|
|
6310
|
+
we as CheckboxCellRenderer,
|
|
6311
|
+
us as CheckboxColumnDef,
|
|
6312
|
+
ut as CheckboxModel,
|
|
6313
|
+
is as ChunkData,
|
|
6314
|
+
Xe as ColAndRowspanModel,
|
|
6315
|
+
Ge as CollapsedExpandedData,
|
|
6316
|
+
$s as ColorRgb,
|
|
6317
|
+
B as ColumnDef,
|
|
6318
|
+
wt as ColumnWidths,
|
|
6319
|
+
Be as ConvenienceDomService,
|
|
6320
|
+
X as CopyService,
|
|
6321
|
+
$ as CrudAction,
|
|
6322
|
+
Q as CrudObjectEdit,
|
|
6323
|
+
St as CrudObjectView,
|
|
6324
|
+
Ct as CrudOptions,
|
|
6325
|
+
_s as CrudTableModelFactory,
|
|
6326
|
+
ue as CssVars,
|
|
6327
|
+
vs as DateToIntlDDMMYYYYCellRenderer,
|
|
6328
|
+
Cs as DateToIsoCellRenderer,
|
|
6329
|
+
As as DateToLocaleDateCellRenderer,
|
|
6330
|
+
Ts as DateToTecCellRenderer,
|
|
6331
|
+
N as DefaultRowHeights,
|
|
6332
|
+
Ue as EleScope,
|
|
6333
|
+
he as EventAdapter,
|
|
6334
|
+
at as ExcelService,
|
|
6335
|
+
ge as FalseFn,
|
|
6336
|
+
it as FocusModel,
|
|
6337
|
+
qe as GeCellIndices,
|
|
6338
|
+
j as GeCssColorUtil,
|
|
6339
|
+
xs as GeFilterService,
|
|
6340
|
+
gs as GeKeyEvent,
|
|
6341
|
+
re as GeModelChangeEvent,
|
|
6342
|
+
oe as GeMouseEvent,
|
|
6343
|
+
P as GeoData,
|
|
6344
|
+
L as Icon,
|
|
6345
|
+
rs as IndexAndPx,
|
|
6346
|
+
ot as InputCellRenderer,
|
|
6347
|
+
Je as InputHandler,
|
|
6348
|
+
H as LicenseManager,
|
|
6349
|
+
Rs as MaleFemaleToIconCellRenderer,
|
|
6350
|
+
Ve as MouseHandler,
|
|
6351
|
+
He as MouseTargetData,
|
|
6352
|
+
Ls as MultiRowsSelectionModel,
|
|
6353
|
+
De as NullPropertyType,
|
|
6354
|
+
Es as NumberCellProgressBarCellRenderer,
|
|
6355
|
+
Is as NumberCellRenderer,
|
|
6356
|
+
Pe as NumberPropertyType,
|
|
6357
|
+
O as ObjectPropertyType,
|
|
6358
|
+
et as OsxShortcutActionIdMapping,
|
|
6359
|
+
ye as Padding,
|
|
6360
|
+
Fs as PositiveAndNegativeNumberRenderer,
|
|
6361
|
+
Ds as ProgressBarCellRenderer,
|
|
6362
|
+
ve as PropertyItem,
|
|
6363
|
+
Oe as PropertyItemTreeService,
|
|
6364
|
+
Ke as RenderScope,
|
|
6365
|
+
ws as Renderer,
|
|
6366
|
+
ft as RequestChunk,
|
|
6367
|
+
lt as ResizeHandler,
|
|
6368
|
+
Rt as SchemeGenerator,
|
|
6369
|
+
Ie as SelectCellRenderer,
|
|
6370
|
+
ne as SelectionModel,
|
|
6371
|
+
Ze as SelectionService,
|
|
6372
|
+
tt as ShortcutService,
|
|
6373
|
+
st as SimpleDomService,
|
|
6374
|
+
y as Size,
|
|
6375
|
+
Ye as SortItem,
|
|
6376
|
+
Re as SortedOptions,
|
|
6377
|
+
ks as StarRatingCellRenderer,
|
|
6378
|
+
ze as StoreStateCollapsedExpandService,
|
|
6379
|
+
Ne as StoreStateScrollPosService,
|
|
6380
|
+
je as StoreStateSortingService,
|
|
6381
|
+
Fe as StringPropertyType,
|
|
6382
|
+
We as TableApi,
|
|
6383
|
+
fs as TableCellUpdateEvent,
|
|
6384
|
+
_ as TableFactory,
|
|
6385
|
+
Z as TableModel,
|
|
6386
|
+
gt as TableModelAndOptions,
|
|
6387
|
+
U as TableOptions,
|
|
6388
|
+
Ee as TableScope,
|
|
6389
|
+
Os as ThreeColorGradientArg,
|
|
6390
|
+
be as TreeCheckboxModel,
|
|
6391
|
+
te as TreeFactory,
|
|
6392
|
+
Ae as TreeOptions,
|
|
6393
|
+
pe as TreeRow,
|
|
6394
|
+
ht as TreeRowService,
|
|
6395
|
+
Ms as TrueFalseCellRenderer,
|
|
6396
|
+
ct as TrueFn,
|
|
6397
|
+
Se as TwoColorGradientArg,
|
|
6398
|
+
de as UndefinedPropertyType,
|
|
6399
|
+
Bs as UrlInfo,
|
|
6400
|
+
$e as ValueInfo,
|
|
6401
|
+
mt as ValueLabel,
|
|
6402
|
+
Qe as WindowsShortcutActionIdMapping,
|
|
6403
|
+
os as actionIds,
|
|
6404
|
+
ds as allCenter,
|
|
6405
|
+
cs as allLeft,
|
|
6406
|
+
hs as allRight,
|
|
6407
|
+
ls as bodyCenter,
|
|
6408
|
+
ns as bodyLeft,
|
|
6409
|
+
as as bodyRight,
|
|
6410
|
+
ke as debounce,
|
|
6411
|
+
Ps as editInputPipeForNumber,
|
|
6412
|
+
J as getAreaIdentByString,
|
|
6413
|
+
ee as isAreaModelTree,
|
|
6414
|
+
_e as isCheckboxColumnDef,
|
|
6073
6415
|
W as isTreeRow,
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6416
|
+
ss as px0,
|
|
6417
|
+
ts as px10,
|
|
6418
|
+
Ut as px100,
|
|
6419
|
+
jt as px110,
|
|
6420
|
+
zt as px120,
|
|
6421
|
+
Gt as px130,
|
|
6422
|
+
Nt as px140,
|
|
6423
|
+
Wt as px150,
|
|
6424
|
+
Vt as px160,
|
|
6425
|
+
Ht as px170,
|
|
6426
|
+
Bt as px180,
|
|
6427
|
+
_t as px190,
|
|
6428
|
+
es as px20,
|
|
6429
|
+
fe as px200,
|
|
6430
|
+
Ot as px210,
|
|
6431
|
+
$t as px220,
|
|
6432
|
+
Lt as px230,
|
|
6433
|
+
Pt as px240,
|
|
6434
|
+
Ft as px250,
|
|
6435
|
+
Dt as px260,
|
|
6436
|
+
kt as px270,
|
|
6437
|
+
It as px280,
|
|
6438
|
+
Tt as px290,
|
|
6439
|
+
Qt as px30,
|
|
6440
|
+
dt as px300,
|
|
6441
|
+
Zt as px40,
|
|
6442
|
+
Mt as px400,
|
|
6443
|
+
qt as px50,
|
|
6444
|
+
Et as px500,
|
|
6445
|
+
Jt as px60,
|
|
6446
|
+
Yt as px70,
|
|
6447
|
+
Kt as px80,
|
|
6448
|
+
Xt as px90,
|
|
6449
|
+
vt as throttle
|
|
6108
6450
|
};
|