e-virt-table 1.2.7 → 1.2.9
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/dist/index.cjs.js +5 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +425 -414
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/Cell.js +10 -5
- package/dist/lib/Cell.js.map +1 -1
- package/dist/lib/Config.d.ts +2 -0
- package/dist/lib/Config.js +16 -3
- package/dist/lib/Config.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(":root{--evt-header-font: 12px normal Arial;--evt-body-font: 12px normal Arial;--evt-color-white: #fff;--evt-color-black: #000000;--evt-color-primary: rgb(82, 146, 247);--evt-text-color-primary: #333;--evt-text-color-regular: #666;--evt-text-color-secondary: #999;--evt-box-shadow: 0 2px 12px 0 #0000001a;--evt-editor-bg-color: #fff;--evt-editor-text-color: #333;--evt-border-color: #e1e6eb;--evt-stripe-color: #fafafa;--evt-placeholder-color: #cdd0dc;--evt-header-bg-color: #f8faff;--evt-body-bg-color: #fff;--evt-header-text-color: #1d2129;--evt-body-text-color: #4e5969;--evt-footer-text-color: #4e5969;--evt-loading-icon-color: #4e5969;--evt-expand-icon-color: #4e5969;--evt-shrink-icon-color: #4e5969;--evt-error-tip-icon-color: red;--evt-cell-hover-icon-bg-color: #fff;--evt-cell-hover-icon-border-color: #dde0ea;--evt-scroller-color: #dee0e3;--evt-scroller-track-color: #fff;--evt-scroller-focus-color: #bbbec4;--evt-select-border-color: var(--evt-color-primary);--evt-select-area-color: rgba(82, 146, 247, .1);--evt-select-row-col-bg-color: transparent;--evt-autofill-point-border-color: #fff;--evt-edit-bg-color: #fcf6ed;--evt-checkbox-color: var(--evt-color-primary);--evt-readonly-color: #fff;--evt-readonly-text-color: var(--evt-body-text-color);--evt-error-tip-color: #ed3f14;--evt-footer-bg-color: #fafafa;--evt-highlight-hover-row-color: rgba(186, 203, 231, .1);--evt-highlight-selected-row-color: rgba(82, 146, 247, .1);--evt-tooltip-bg-color: #303133;--evt-tooltip-text-color: #fff;--evt-resize-row-line-color: #e1e6eb;--evt-resize-column-line-color: #e1e6eb}.dark{--evt-border-color: #363637;--evt-header-bg-color: #141414;--evt-body-bg-color: #141414;--evt-header-text-color: #a3a6ad;--evt-scroller-color: #414243;--evt-scroller-track-color: #141414;--evt-scroller-focus-color: #a3a6ad;--evt-edit-bg-color: #141414;--evt-readonly-text-color: #cfd3dc;--evt-footer-bg-color: #262727;--evt-autofill-point-border-color: #fff;--evt-editor-bg-color: #434343;--evt-editor-text-color: #cfd3dc}.e-virt-table-container{position:relative;outline:none}.e-virt-table-stage{position:relative;overflow:hidden;outline:none;box-sizing:border-box;z-index:10;border-radius:8px;border:1px solid var(--evt-border-color)}.e-virt-table-canvas{position:absolute;left:0;top:0;box-sizing:border-box;border:none;outline:none;z-index:10}.e-virt-table-editor{position:absolute;top:-10000px;left:-10000px;text-align:left;height:auto;line-height:0;z-index:100;overflow:hidden;background-color:var(--evt-editor-bg-color);border:2px solid var(--evt-color-primary);box-sizing:border-box;box-shadow:var(--evt-box-shadow);display:flex;align-items:center}.e-virt-table-overlayer{position:absolute;left:0;top:0;overflow:hidden;z-index:100;pointer-events:none}.e-virt-table-editor-textarea{width:100%;box-sizing:border-box;outline:none;font-weight:400;padding:8px;font-size:12px;color:inherit;white-space:pre-wrap;word-wrap:break-word;word-break:break-all;line-height:1.5;margin:0;border:none;vertical-align:middle;background:var(--evt-editor-bg-color);color:var(--evt-editor-text-color);overflow-y:auto;resize:none}.e-virt-table-context-menu{position:absolute;font-size:14px;color:var(--evt-text-color-regular);background-color:var(--evt-color-white);border-radius:4px;border:1px solid #e4e7ed;box-shadow:var(--evt-box-shadow);width:fit-content;padding:6px 0;z-index:9999;left:-99999px;top:-99999px}.e-virt-table-context-menu-item{cursor:pointer;padding:8px 24px;color:var(--evt-text-color-regular)}.e-virt-table-context-menu-item:hover{color:var(--evt-color-primary);background-color:#f5f7fa}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
2
|
var be = Object.defineProperty;
|
|
3
3
|
var ve = (a, t, e) => t in a ? be(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
|
|
4
4
|
var l = (a, t, e) => ve(a, typeof t != "symbol" ? t + "" : t, e);
|
|
@@ -25,7 +25,7 @@ function st(a, t) {
|
|
|
25
25
|
return i.__proto__ = s, i;
|
|
26
26
|
}, st(a, t);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function _e() {
|
|
29
29
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
30
30
|
if (typeof Proxy == "function") return !0;
|
|
31
31
|
try {
|
|
@@ -36,20 +36,20 @@ function Ie() {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
function dt(a, t, e) {
|
|
39
|
-
return
|
|
39
|
+
return _e() ? dt = Reflect.construct.bind() : dt = function(s, r, o) {
|
|
40
40
|
var n = [null];
|
|
41
41
|
n.push.apply(n, r);
|
|
42
42
|
var h = Function.bind.apply(s, n), c = new h();
|
|
43
43
|
return o && st(c, o.prototype), c;
|
|
44
44
|
}, dt.apply(null, arguments);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function Ie(a) {
|
|
47
47
|
return Function.toString.call(a).indexOf("[native code]") !== -1;
|
|
48
48
|
}
|
|
49
49
|
function Ct(a) {
|
|
50
50
|
var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
51
51
|
return Ct = function(i) {
|
|
52
|
-
if (i === null || !
|
|
52
|
+
if (i === null || !Ie(i)) return i;
|
|
53
53
|
if (typeof i != "function")
|
|
54
54
|
throw new TypeError("Super expression must either be null or a function");
|
|
55
55
|
if (typeof t < "u") {
|
|
@@ -131,7 +131,7 @@ function Se(a, t, e) {
|
|
|
131
131
|
t(n, o);
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function Nt(a, t, e) {
|
|
135
135
|
var i = 0, s = a.length;
|
|
136
136
|
function r(o) {
|
|
137
137
|
if (o && o.length) {
|
|
@@ -143,13 +143,13 @@ function Ft(a, t, e) {
|
|
|
143
143
|
}
|
|
144
144
|
r([]);
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function Te(a) {
|
|
147
147
|
var t = [];
|
|
148
148
|
return Object.keys(a).forEach(function(e) {
|
|
149
149
|
t.push.apply(t, a[e] || []);
|
|
150
150
|
}), t;
|
|
151
151
|
}
|
|
152
|
-
var
|
|
152
|
+
var Ft = /* @__PURE__ */ function(a) {
|
|
153
153
|
Re(t, a);
|
|
154
154
|
function t(e, i) {
|
|
155
155
|
var s;
|
|
@@ -157,26 +157,26 @@ var Xt = /* @__PURE__ */ function(a) {
|
|
|
157
157
|
}
|
|
158
158
|
return t;
|
|
159
159
|
}(/* @__PURE__ */ Ct(Error));
|
|
160
|
-
function
|
|
160
|
+
function Ae(a, t, e, i, s) {
|
|
161
161
|
if (t.first) {
|
|
162
162
|
var r = new Promise(function(x, g) {
|
|
163
|
-
var
|
|
164
|
-
return i(
|
|
165
|
-
}, u =
|
|
166
|
-
|
|
163
|
+
var m = function(p) {
|
|
164
|
+
return i(p), p.length ? g(new Ft(p, bt(p))) : x(s);
|
|
165
|
+
}, u = Te(a);
|
|
166
|
+
Nt(u, e, m);
|
|
167
167
|
});
|
|
168
168
|
return r.catch(function(x) {
|
|
169
169
|
return x;
|
|
170
170
|
}), r;
|
|
171
171
|
}
|
|
172
172
|
var o = t.firstFields === !0 ? Object.keys(a) : t.firstFields || [], n = Object.keys(a), h = n.length, c = 0, d = [], f = new Promise(function(x, g) {
|
|
173
|
-
var
|
|
173
|
+
var m = function(w) {
|
|
174
174
|
if (d.push.apply(d, w), c++, c === h)
|
|
175
|
-
return i(d), d.length ? g(new
|
|
175
|
+
return i(d), d.length ? g(new Ft(d, bt(d))) : x(s);
|
|
176
176
|
};
|
|
177
177
|
n.length || (i(d), x(s)), n.forEach(function(u) {
|
|
178
178
|
var w = a[u];
|
|
179
|
-
o.indexOf(u) !== -1 ?
|
|
179
|
+
o.indexOf(u) !== -1 ? Nt(w, e, m) : Se(w, e, m);
|
|
180
180
|
});
|
|
181
181
|
});
|
|
182
182
|
return f.catch(function(x) {
|
|
@@ -218,7 +218,7 @@ var Zt = function(t, e, i, s, r, o) {
|
|
|
218
218
|
t.required && (!i.hasOwnProperty(t.field) || H(e, o || t.type)) && s.push(D(r.messages.required, t.fullField));
|
|
219
219
|
}, De = function(t, e, i, s, r) {
|
|
220
220
|
(/^\s+$/.test(e) || e === "") && s.push(D(r.messages.whitespace, t.fullField));
|
|
221
|
-
}, ct,
|
|
221
|
+
}, ct, Xe = function() {
|
|
222
222
|
if (ct)
|
|
223
223
|
return ct;
|
|
224
224
|
var a = "[a-fA-F\\d:]", t = function(b) {
|
|
@@ -242,7 +242,7 @@ var Zt = function(t, e, i, s, r, o) {
|
|
|
242
242
|
}, h.v6 = function(y) {
|
|
243
243
|
return y && y.exact ? n : new RegExp("" + t(y) + s + t(y), "g");
|
|
244
244
|
};
|
|
245
|
-
var c = "(?:(?:[a-z]+:)?//)", d = "(?:\\S+(?::\\S*)?@)?", f = h.v4().source, x = h.v6().source, g = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",
|
|
245
|
+
var c = "(?:(?:[a-z]+:)?//)", d = "(?:\\S+(?::\\S*)?@)?", f = h.v4().source, x = h.v6().source, g = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", m = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", u = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", w = "(?::\\d{2,5})?", p = '(?:[/?#][^\\s"]*)?', C = "(?:" + c + "|www\\.)" + d + "(?:localhost|" + f + "|" + x + "|" + g + m + u + ")" + w + p;
|
|
246
246
|
return ct = new RegExp("(?:^" + C + "$)", "i"), ct;
|
|
247
247
|
}, Kt = {
|
|
248
248
|
// http://emailregex.com/
|
|
@@ -287,23 +287,23 @@ var Zt = function(t, e, i, s, r, o) {
|
|
|
287
287
|
return typeof t == "string" && t.length <= 320 && !!t.match(Kt.email);
|
|
288
288
|
},
|
|
289
289
|
url: function(t) {
|
|
290
|
-
return typeof t == "string" && t.length <= 2048 && !!t.match(
|
|
290
|
+
return typeof t == "string" && t.length <= 2048 && !!t.match(Xe());
|
|
291
291
|
},
|
|
292
292
|
hex: function(t) {
|
|
293
293
|
return typeof t == "string" && !!t.match(Kt.hex);
|
|
294
294
|
}
|
|
295
|
-
},
|
|
295
|
+
}, Ne = function(t, e, i, s, r) {
|
|
296
296
|
if (t.required && e === void 0) {
|
|
297
297
|
Zt(t, e, i, s, r);
|
|
298
298
|
return;
|
|
299
299
|
}
|
|
300
300
|
var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], n = t.type;
|
|
301
301
|
o.indexOf(n) > -1 ? et[n](e) || s.push(D(r.messages.types[n], t.fullField, t.type)) : n && typeof e !== t.type && s.push(D(r.messages.types[n], t.fullField, t.type));
|
|
302
|
-
},
|
|
303
|
-
var o = typeof t.len == "number", n = typeof t.min == "number", h = typeof t.max == "number", c = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, d = e, f = null, x = typeof e == "number", g = typeof e == "string",
|
|
304
|
-
if (x ? f = "number" : g ? f = "string" :
|
|
302
|
+
}, Fe = function(t, e, i, s, r) {
|
|
303
|
+
var o = typeof t.len == "number", n = typeof t.min == "number", h = typeof t.max == "number", c = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, d = e, f = null, x = typeof e == "number", g = typeof e == "string", m = Array.isArray(e);
|
|
304
|
+
if (x ? f = "number" : g ? f = "string" : m && (f = "array"), !f)
|
|
305
305
|
return !1;
|
|
306
|
-
|
|
306
|
+
m && (d = e.length), g && (d = e.replace(c, "_").length), o ? d !== t.len && s.push(D(r.messages[f].len, t.fullField, t.len)) : n && !h && d < t.min ? s.push(D(r.messages[f].min, t.fullField, t.min)) : h && !n && d > t.max ? s.push(D(r.messages[f].max, t.fullField, t.max)) : n && h && (d < t.min || d > t.max) && s.push(D(r.messages[f].range, t.fullField, t.min, t.max));
|
|
307
307
|
}, j = "enum", Be = function(t, e, i, s, r) {
|
|
308
308
|
t[j] = Array.isArray(t[j]) ? t[j] : [], t[j].indexOf(e) === -1 && s.push(D(r.messages[j], t.fullField, t[j].join(", ")));
|
|
309
309
|
}, ke = function(t, e, i, s, r) {
|
|
@@ -315,11 +315,11 @@ var Zt = function(t, e, i, s, r, o) {
|
|
|
315
315
|
o.test(e) || s.push(D(r.messages.pattern.mismatch, t.fullField, e, t.pattern));
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
|
-
},
|
|
318
|
+
}, L = {
|
|
319
319
|
required: Zt,
|
|
320
320
|
whitespace: De,
|
|
321
|
-
type:
|
|
322
|
-
range:
|
|
321
|
+
type: Ne,
|
|
322
|
+
range: Fe,
|
|
323
323
|
enum: Be,
|
|
324
324
|
pattern: ke
|
|
325
325
|
}, Ke = function(t, e, i, s, r) {
|
|
@@ -327,7 +327,7 @@ var Zt = function(t, e, i, s, r, o) {
|
|
|
327
327
|
if (n) {
|
|
328
328
|
if (H(e, "string") && !t.required)
|
|
329
329
|
return i();
|
|
330
|
-
|
|
330
|
+
L.required(t, e, s, o, r, "string"), H(e, "string") || (L.type(t, e, s, o, r), L.range(t, e, s, o, r), L.pattern(t, e, s, o, r), t.whitespace === !0 && L.whitespace(t, e, s, o, r));
|
|
331
331
|
}
|
|
332
332
|
i(o);
|
|
333
333
|
}, Ye = function(t, e, i, s, r) {
|
|
@@ -335,7 +335,7 @@ var Zt = function(t, e, i, s, r, o) {
|
|
|
335
335
|
if (n) {
|
|
336
336
|
if (H(e) && !t.required)
|
|
337
337
|
return i();
|
|
338
|
-
|
|
338
|
+
L.required(t, e, s, o, r), e !== void 0 && L.type(t, e, s, o, r);
|
|
339
339
|
}
|
|
340
340
|
i(o);
|
|
341
341
|
}, Ve = function(t, e, i, s, r) {
|
|
@@ -343,7 +343,7 @@ var Zt = function(t, e, i, s, r, o) {
|
|
|
343
343
|
if (n) {
|
|
344
344
|
if (e === "" && (e = void 0), H(e) && !t.required)
|
|
345
345
|
return i();
|
|
346
|
-
|
|
346
|
+
L.required(t, e, s, o, r), e !== void 0 && (L.type(t, e, s, o, r), L.range(t, e, s, o, r));
|
|
347
347
|
}
|
|
348
348
|
i(o);
|
|
349
349
|
}, We = function(t, e, i, s, r) {
|
|
@@ -351,7 +351,7 @@ var Zt = function(t, e, i, s, r, o) {
|
|
|
351
351
|
if (n) {
|
|
352
352
|
if (H(e) && !t.required)
|
|
353
353
|
return i();
|
|
354
|
-
|
|
354
|
+
L.required(t, e, s, o, r), e !== void 0 && L.type(t, e, s, o, r);
|
|
355
355
|
}
|
|
356
356
|
i(o);
|
|
357
357
|
}, Pe = function(t, e, i, s, r) {
|
|
@@ -359,7 +359,7 @@ var Zt = function(t, e, i, s, r, o) {
|
|
|
359
359
|
if (n) {
|
|
360
360
|
if (H(e) && !t.required)
|
|
361
361
|
return i();
|
|
362
|
-
|
|
362
|
+
L.required(t, e, s, o, r), H(e) || L.type(t, e, s, o, r);
|
|
363
363
|
}
|
|
364
364
|
i(o);
|
|
365
365
|
}, ze = function(t, e, i, s, r) {
|
|
@@ -367,7 +367,7 @@ var Zt = function(t, e, i, s, r, o) {
|
|
|
367
367
|
if (n) {
|
|
368
368
|
if (H(e) && !t.required)
|
|
369
369
|
return i();
|
|
370
|
-
|
|
370
|
+
L.required(t, e, s, o, r), e !== void 0 && (L.type(t, e, s, o, r), L.range(t, e, s, o, r));
|
|
371
371
|
}
|
|
372
372
|
i(o);
|
|
373
373
|
}, $e = function(t, e, i, s, r) {
|
|
@@ -375,7 +375,7 @@ var Zt = function(t, e, i, s, r, o) {
|
|
|
375
375
|
if (n) {
|
|
376
376
|
if (H(e) && !t.required)
|
|
377
377
|
return i();
|
|
378
|
-
|
|
378
|
+
L.required(t, e, s, o, r), e !== void 0 && (L.type(t, e, s, o, r), L.range(t, e, s, o, r));
|
|
379
379
|
}
|
|
380
380
|
i(o);
|
|
381
381
|
}, qe = function(t, e, i, s, r) {
|
|
@@ -383,7 +383,7 @@ var Zt = function(t, e, i, s, r, o) {
|
|
|
383
383
|
if (n) {
|
|
384
384
|
if (e == null && !t.required)
|
|
385
385
|
return i();
|
|
386
|
-
|
|
386
|
+
L.required(t, e, s, o, r, "array"), e != null && (L.type(t, e, s, o, r), L.range(t, e, s, o, r));
|
|
387
387
|
}
|
|
388
388
|
i(o);
|
|
389
389
|
}, Ge = function(t, e, i, s, r) {
|
|
@@ -391,7 +391,7 @@ var Zt = function(t, e, i, s, r, o) {
|
|
|
391
391
|
if (n) {
|
|
392
392
|
if (H(e) && !t.required)
|
|
393
393
|
return i();
|
|
394
|
-
|
|
394
|
+
L.required(t, e, s, o, r), e !== void 0 && L.type(t, e, s, o, r);
|
|
395
395
|
}
|
|
396
396
|
i(o);
|
|
397
397
|
}, je = "enum", Ue = function(t, e, i, s, r) {
|
|
@@ -399,7 +399,7 @@ var Zt = function(t, e, i, s, r, o) {
|
|
|
399
399
|
if (n) {
|
|
400
400
|
if (H(e) && !t.required)
|
|
401
401
|
return i();
|
|
402
|
-
|
|
402
|
+
L.required(t, e, s, o, r), e !== void 0 && L[je](t, e, s, o, r);
|
|
403
403
|
}
|
|
404
404
|
i(o);
|
|
405
405
|
}, Ze = function(t, e, i, s, r) {
|
|
@@ -407,7 +407,7 @@ var Zt = function(t, e, i, s, r, o) {
|
|
|
407
407
|
if (n) {
|
|
408
408
|
if (H(e, "string") && !t.required)
|
|
409
409
|
return i();
|
|
410
|
-
|
|
410
|
+
L.required(t, e, s, o, r), H(e, "string") || L.pattern(t, e, s, o, r);
|
|
411
411
|
}
|
|
412
412
|
i(o);
|
|
413
413
|
}, Je = function(t, e, i, s, r) {
|
|
@@ -415,21 +415,21 @@ var Zt = function(t, e, i, s, r, o) {
|
|
|
415
415
|
if (n) {
|
|
416
416
|
if (H(e, "date") && !t.required)
|
|
417
417
|
return i();
|
|
418
|
-
if (
|
|
418
|
+
if (L.required(t, e, s, o, r), !H(e, "date")) {
|
|
419
419
|
var h;
|
|
420
|
-
e instanceof Date ? h = e : h = new Date(e),
|
|
420
|
+
e instanceof Date ? h = e : h = new Date(e), L.type(t, h, s, o, r), h && L.range(t, h.getTime(), s, o, r);
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
i(o);
|
|
424
424
|
}, Qe = function(t, e, i, s, r) {
|
|
425
425
|
var o = [], n = Array.isArray(e) ? "array" : typeof e;
|
|
426
|
-
|
|
426
|
+
L.required(t, e, s, o, r, n), i(o);
|
|
427
427
|
}, mt = function(t, e, i, s, r) {
|
|
428
428
|
var o = t.type, n = [], h = t.required || !t.required && s.hasOwnProperty(t.field);
|
|
429
429
|
if (h) {
|
|
430
430
|
if (H(e, o) && !t.required)
|
|
431
431
|
return i();
|
|
432
|
-
|
|
432
|
+
L.required(t, e, s, n, r, o), H(e, o) || L.type(t, e, s, n, r);
|
|
433
433
|
}
|
|
434
434
|
i(n);
|
|
435
435
|
}, ti = function(t, e, i, s, r) {
|
|
@@ -437,7 +437,7 @@ var Zt = function(t, e, i, s, r, o) {
|
|
|
437
437
|
if (n) {
|
|
438
438
|
if (H(e) && !t.required)
|
|
439
439
|
return i();
|
|
440
|
-
|
|
440
|
+
L.required(t, e, s, o, r);
|
|
441
441
|
}
|
|
442
442
|
i(o);
|
|
443
443
|
}, it = {
|
|
@@ -537,7 +537,7 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
|
|
|
537
537
|
if (typeof h == "function" && (c = h, h = {}), !this.rules || Object.keys(this.rules).length === 0)
|
|
538
538
|
return c && c(null, n), Promise.resolve(n);
|
|
539
539
|
function d(u) {
|
|
540
|
-
var w = [],
|
|
540
|
+
var w = [], p = {};
|
|
541
541
|
function C(b) {
|
|
542
542
|
if (Array.isArray(b)) {
|
|
543
543
|
var E;
|
|
@@ -547,7 +547,7 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
|
|
|
547
547
|
}
|
|
548
548
|
for (var y = 0; y < u.length; y++)
|
|
549
549
|
C(u[y]);
|
|
550
|
-
w.length ? (
|
|
550
|
+
w.length ? (p = bt(w), c(w, p)) : c(null, n);
|
|
551
551
|
}
|
|
552
552
|
if (h.messages) {
|
|
553
553
|
var f = this.messages();
|
|
@@ -556,74 +556,74 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
|
|
|
556
556
|
h.messages = this.messages();
|
|
557
557
|
var x = {}, g = h.keys || Object.keys(this.rules);
|
|
558
558
|
g.forEach(function(u) {
|
|
559
|
-
var w = o.rules[u],
|
|
559
|
+
var w = o.rules[u], p = n[u];
|
|
560
560
|
w.forEach(function(C) {
|
|
561
561
|
var y = C;
|
|
562
|
-
typeof y.transform == "function" && (n === i && (n = q({}, n)),
|
|
562
|
+
typeof y.transform == "function" && (n === i && (n = q({}, n)), p = n[u] = y.transform(p)), typeof y == "function" ? y = {
|
|
563
563
|
validator: y
|
|
564
564
|
} : y = q({}, y), y.validator = o.getValidationMethod(y), y.validator && (y.field = u, y.fullField = y.fullField || u, y.type = o.getType(y), x[u] = x[u] || [], x[u].push({
|
|
565
565
|
rule: y,
|
|
566
|
-
value:
|
|
566
|
+
value: p,
|
|
567
567
|
source: n,
|
|
568
568
|
field: u
|
|
569
569
|
}));
|
|
570
570
|
});
|
|
571
571
|
});
|
|
572
|
-
var
|
|
573
|
-
return
|
|
574
|
-
var
|
|
575
|
-
C = C && (
|
|
576
|
-
function y(
|
|
577
|
-
return q({},
|
|
578
|
-
fullField:
|
|
579
|
-
fullFields:
|
|
572
|
+
var m = {};
|
|
573
|
+
return Ae(x, h, function(u, w) {
|
|
574
|
+
var p = u.rule, C = (p.type === "object" || p.type === "array") && (typeof p.fields == "object" || typeof p.defaultField == "object");
|
|
575
|
+
C = C && (p.required || !p.required && u.value), p.field = u.field;
|
|
576
|
+
function y(R, O) {
|
|
577
|
+
return q({}, O, {
|
|
578
|
+
fullField: p.fullField + "." + R,
|
|
579
|
+
fullFields: p.fullFields ? [].concat(p.fullFields, [R]) : [R]
|
|
580
580
|
});
|
|
581
581
|
}
|
|
582
|
-
function b(
|
|
583
|
-
|
|
584
|
-
var
|
|
585
|
-
!h.suppressWarning &&
|
|
586
|
-
var
|
|
587
|
-
if (h.first &&
|
|
588
|
-
return p
|
|
582
|
+
function b(R) {
|
|
583
|
+
R === void 0 && (R = []);
|
|
584
|
+
var O = Array.isArray(R) ? R : [R];
|
|
585
|
+
!h.suppressWarning && O.length && a.warning("async-validator:", O), O.length && p.message !== void 0 && (O = [].concat(p.message));
|
|
586
|
+
var I = O.map(Bt(p, n));
|
|
587
|
+
if (h.first && I.length)
|
|
588
|
+
return m[p.field] = 1, w(I);
|
|
589
589
|
if (!C)
|
|
590
|
-
w(
|
|
590
|
+
w(I);
|
|
591
591
|
else {
|
|
592
|
-
if (
|
|
593
|
-
return
|
|
594
|
-
var
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
}),
|
|
598
|
-
var
|
|
599
|
-
Object.keys(
|
|
600
|
-
var M =
|
|
601
|
-
|
|
592
|
+
if (p.required && !u.value)
|
|
593
|
+
return p.message !== void 0 ? I = [].concat(p.message).map(Bt(p, n)) : h.error && (I = [h.error(p, D(h.messages.required, p.field))]), w(I);
|
|
594
|
+
var _ = {};
|
|
595
|
+
p.defaultField && Object.keys(u.value).map(function(T) {
|
|
596
|
+
_[T] = p.defaultField;
|
|
597
|
+
}), _ = q({}, _, u.rule.fields);
|
|
598
|
+
var v = {};
|
|
599
|
+
Object.keys(_).forEach(function(T) {
|
|
600
|
+
var M = _[T], A = Array.isArray(M) ? M : [M];
|
|
601
|
+
v[T] = A.map(y.bind(null, T));
|
|
602
602
|
});
|
|
603
|
-
var
|
|
604
|
-
|
|
603
|
+
var S = new a(v);
|
|
604
|
+
S.messages(h.messages), u.rule.options && (u.rule.options.messages = h.messages, u.rule.options.error = h.error), S.validate(u.value, u.rule.options || h, function(T) {
|
|
605
605
|
var M = [];
|
|
606
|
-
|
|
606
|
+
I && I.length && M.push.apply(M, I), T && T.length && M.push.apply(M, T), w(M.length ? M : null);
|
|
607
607
|
});
|
|
608
608
|
}
|
|
609
609
|
}
|
|
610
610
|
var E;
|
|
611
|
-
if (
|
|
612
|
-
E =
|
|
613
|
-
else if (
|
|
611
|
+
if (p.asyncValidator)
|
|
612
|
+
E = p.asyncValidator(p, u.value, b, u.source, h);
|
|
613
|
+
else if (p.validator) {
|
|
614
614
|
try {
|
|
615
|
-
E =
|
|
616
|
-
} catch (
|
|
617
|
-
console.error == null || console.error(
|
|
618
|
-
throw
|
|
619
|
-
}, 0), b(
|
|
615
|
+
E = p.validator(p, u.value, b, u.source, h);
|
|
616
|
+
} catch (R) {
|
|
617
|
+
console.error == null || console.error(R), h.suppressValidatorError || setTimeout(function() {
|
|
618
|
+
throw R;
|
|
619
|
+
}, 0), b(R.message);
|
|
620
620
|
}
|
|
621
|
-
E === !0 ? b() : E === !1 ? b(typeof
|
|
621
|
+
E === !0 ? b() : E === !1 ? b(typeof p.message == "function" ? p.message(p.fullField || p.field) : p.message || (p.fullField || p.field) + " fails") : E instanceof Array ? b(E) : E instanceof Error && b(E.message);
|
|
622
622
|
}
|
|
623
623
|
E && E.then && E.then(function() {
|
|
624
624
|
return b();
|
|
625
|
-
}, function(
|
|
626
|
-
return b(
|
|
625
|
+
}, function(R) {
|
|
626
|
+
return b(R);
|
|
627
627
|
});
|
|
628
628
|
}, function(u) {
|
|
629
629
|
d(u);
|
|
@@ -702,10 +702,10 @@ function ee(a = [], t = 1, e = 0) {
|
|
|
702
702
|
};
|
|
703
703
|
});
|
|
704
704
|
}
|
|
705
|
-
function
|
|
705
|
+
function _t(a = []) {
|
|
706
706
|
let t = [];
|
|
707
707
|
return a.forEach((e) => {
|
|
708
|
-
e.children ? t = t.concat(
|
|
708
|
+
e.children ? t = t.concat(_t(e.children)) : t.push(e);
|
|
709
709
|
}), t;
|
|
710
710
|
}
|
|
711
711
|
const Yt = /^(\r\n|\n\r|\r|\n)/, ii = /^[^\t\r\n]+/, Vt = /^\t/;
|
|
@@ -847,7 +847,7 @@ class re {
|
|
|
847
847
|
getRightFixedX() {
|
|
848
848
|
}
|
|
849
849
|
}
|
|
850
|
-
class
|
|
850
|
+
class At extends re {
|
|
851
851
|
constructor(e, i, s, r, o, n, h, c, d, f = "body") {
|
|
852
852
|
super(e, r, o, n, h, f, c.fixed);
|
|
853
853
|
l(this, "formatter");
|
|
@@ -1028,10 +1028,10 @@ class Tt extends re {
|
|
|
1028
1028
|
r = c ? w : u, n = c ? "shrink" : "expand", o = x * 8;
|
|
1029
1029
|
} else
|
|
1030
1030
|
o = x * 8;
|
|
1031
|
-
let g = 20,
|
|
1031
|
+
let g = 20, m = 20;
|
|
1032
1032
|
if (r) {
|
|
1033
|
-
let u = this.drawX + o + e, w = this.drawY + (this.visibleHeight -
|
|
1034
|
-
this.ctx.paint.drawImage(r, u, w, g,
|
|
1033
|
+
let u = this.drawX + o + e, w = this.drawY + (this.visibleHeight - m) / 2;
|
|
1034
|
+
this.ctx.paint.drawImage(r, u, w, g, m), this.drawImageX = u, this.drawImageY = w, this.drawImageWidth = g, this.drawImageHeight = m, this.drawImageName = n, this.drawImageSource = r;
|
|
1035
1035
|
}
|
|
1036
1036
|
this.align = "left", this.drawTextX = o + this.drawX + g - 0.5;
|
|
1037
1037
|
}
|
|
@@ -1043,40 +1043,42 @@ class Tt extends re {
|
|
|
1043
1043
|
BODY_CELL_STYLE_METHOD: s,
|
|
1044
1044
|
FOOTER_CELL_STYLE_METHOD: r,
|
|
1045
1045
|
READONLY_TEXT_COLOR: o,
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1046
|
+
BODY_TEXT_COLOR: n,
|
|
1047
|
+
FOOTER_TEXT_COLOR: h,
|
|
1048
|
+
FOOTER_BG_COLOR: c,
|
|
1049
|
+
HIGHLIGHT_SELECTED_ROW: d,
|
|
1050
|
+
HIGHLIGHT_SELECTED_ROW_COLOR: f,
|
|
1051
|
+
HIGHLIGHT_HOVER_ROW: x,
|
|
1052
|
+
HIGHLIGHT_HOVER_ROW_COLOR: g,
|
|
1053
|
+
STRIPE: m,
|
|
1054
|
+
STRIPE_COLOR: u
|
|
1053
1055
|
} = this.ctx.config;
|
|
1054
1056
|
if (this.cellType === "footer") {
|
|
1055
|
-
let
|
|
1057
|
+
let O = c, I = h;
|
|
1056
1058
|
if (typeof r == "function") {
|
|
1057
|
-
const _ = r, { backgroundColor:
|
|
1059
|
+
const _ = r, { backgroundColor: v, color: S } = _({
|
|
1058
1060
|
row: this.row,
|
|
1059
1061
|
rowIndex: this.rowIndex,
|
|
1060
1062
|
colIndex: this.colIndex,
|
|
1061
1063
|
column: this.column,
|
|
1062
1064
|
value: this.getValue()
|
|
1063
1065
|
}) || {};
|
|
1064
|
-
|
|
1066
|
+
v && (O = v), S && (I = S);
|
|
1065
1067
|
}
|
|
1066
|
-
this.drawCellSkyBgColor = "transparent", this.drawCellBgColor =
|
|
1068
|
+
this.drawCellSkyBgColor = "transparent", this.drawCellBgColor = O, this.drawTextColor = I;
|
|
1067
1069
|
return;
|
|
1068
1070
|
}
|
|
1069
|
-
let
|
|
1070
|
-
const
|
|
1071
|
-
let
|
|
1072
|
-
if (this.rowspan !== 1 && (
|
|
1073
|
-
const
|
|
1074
|
-
|
|
1071
|
+
let w = "transparent";
|
|
1072
|
+
const p = this.ctx.focusCell, C = this.ctx.hoverCell;
|
|
1073
|
+
let y = this.rowIndex, b = this.rowIndex;
|
|
1074
|
+
if (this.rowspan !== 1 && (x || d)) {
|
|
1075
|
+
const O = this.getSpanInfo(), { yArr: I } = O;
|
|
1076
|
+
y = I[0], b = I[1];
|
|
1075
1077
|
}
|
|
1076
|
-
|
|
1077
|
-
let
|
|
1078
|
-
if (this.ctx.database.getReadonly(this.rowKey, this.key) || (
|
|
1079
|
-
const
|
|
1078
|
+
x && C && (C.rowKey === this.rowKey && (w = g), C.rowIndex >= y && C.rowIndex <= b && (w = g)), d && p && (p.rowKey === this.rowKey && (w = f), p.rowIndex >= y && p.rowIndex <= b && (w = f)), this.drawCellSkyBgColor = w;
|
|
1079
|
+
let E = e, R = n;
|
|
1080
|
+
if (this.ctx.database.getReadonly(this.rowKey, this.key) || (E = i, R = o), m && (this.rowIndex % 2 ? E = u : E = e), typeof s == "function") {
|
|
1081
|
+
const O = s, { backgroundColor: I, color: _ } = O({
|
|
1080
1082
|
row: this.row,
|
|
1081
1083
|
rowIndex: this.rowIndex,
|
|
1082
1084
|
colIndex: this.colIndex,
|
|
@@ -1084,16 +1086,16 @@ class Tt extends re {
|
|
|
1084
1086
|
isHasChanged: this.isHasChanged,
|
|
1085
1087
|
value: this.getValue()
|
|
1086
1088
|
}) || {};
|
|
1087
|
-
|
|
1089
|
+
I && (E = I), _ && (R = _);
|
|
1088
1090
|
}
|
|
1089
|
-
this.drawCellBgColor =
|
|
1091
|
+
this.drawCellBgColor = E, this.drawTextColor = R;
|
|
1090
1092
|
}
|
|
1091
1093
|
updateSelection() {
|
|
1092
1094
|
const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: r, cellType: o, type: n, rowIndex: h, rowKey: c } = this;
|
|
1093
1095
|
if (!(s === 0 || r === 0) && o !== "footer" && ["index-selection", "selection"].includes(n)) {
|
|
1094
|
-
const d = this.ctx.database.getRowSelection(c), f = this.ctx.database.getRowSelectable(c), { CHECKBOX_SIZE: x = 0 } = this.ctx.config, g = this.drawX + (e - x) / 2,
|
|
1096
|
+
const d = this.ctx.database.getRowSelection(c), f = this.ctx.database.getRowSelectable(c), { CHECKBOX_SIZE: x = 0 } = this.ctx.config, g = this.drawX + (e - x) / 2, m = this.drawY + (i - x) / 2;
|
|
1095
1097
|
let u = this.ctx.icons.get("checkbox-uncheck"), w = "checkbox-uncheck";
|
|
1096
|
-
d && f ? (u = this.ctx.icons.get("checkbox-check"), w = "checkbox-check") : d && f ? (u = this.ctx.icons.get("checkbox-check-disabled"), w = "checkbox-check-disabled") : !d && f ? (u = this.ctx.icons.get("checkbox-uncheck"), w = "checkbox-uncheck") : (u = this.ctx.icons.get("checkbox-disabled"), w = "checkbox-disabled"), u && n == "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === h || ["checkbox-disabled", "checkbox-check"].includes(w)) && (this.drawImageX = g, this.drawImageY =
|
|
1098
|
+
d && f ? (u = this.ctx.icons.get("checkbox-check"), w = "checkbox-check") : d && f ? (u = this.ctx.icons.get("checkbox-check-disabled"), w = "checkbox-check-disabled") : !d && f ? (u = this.ctx.icons.get("checkbox-uncheck"), w = "checkbox-uncheck") : (u = this.ctx.icons.get("checkbox-disabled"), w = "checkbox-disabled"), u && n == "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === h || ["checkbox-disabled", "checkbox-check"].includes(w)) && (this.drawImageX = g, this.drawImageY = m, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = w, this.drawImageSource = u) : u && n === "selection" && (this.drawImageX = g, this.drawImageY = m, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = w, this.drawImageSource = u);
|
|
1097
1099
|
}
|
|
1098
1100
|
}
|
|
1099
1101
|
updateHoverIcon() {
|
|
@@ -1114,10 +1116,10 @@ class Tt extends re {
|
|
|
1114
1116
|
if (this.hoverIconName && !this.ctx.editing && n) {
|
|
1115
1117
|
let h = 0, c = 0;
|
|
1116
1118
|
if (n.rowKey === this.rowKey && (h = this.drawX + this.width - s - r, c = this.drawY + (this.height - s) / 2), this.rowspan !== 1 && o) {
|
|
1117
|
-
const f = this.getSpanInfo(), { yArr: x } = f, g = x[0],
|
|
1118
|
-
if (n.rowIndex >= g && n.rowIndex <=
|
|
1119
|
-
const { width: u, height: w, offsetTop:
|
|
1120
|
-
h = this.drawX - C + u - s - r, c = this.drawY -
|
|
1119
|
+
const f = this.getSpanInfo(), { yArr: x } = f, g = x[0], m = x[1];
|
|
1120
|
+
if (n.rowIndex >= g && n.rowIndex <= m) {
|
|
1121
|
+
const { width: u, height: w, offsetTop: p, offsetLeft: C } = f;
|
|
1122
|
+
h = this.drawX - C + u - s - r, c = this.drawY - p + (w - s) / 2;
|
|
1121
1123
|
}
|
|
1122
1124
|
}
|
|
1123
1125
|
const d = this.ctx.icons.get(this.hoverIconName);
|
|
@@ -1243,16 +1245,22 @@ class Tt extends re {
|
|
|
1243
1245
|
return s;
|
|
1244
1246
|
}
|
|
1245
1247
|
drawText() {
|
|
1246
|
-
const { CELL_PADDING: e, BODY_FONT: i, PLACEHOLDER_COLOR: s } = this.ctx.config
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1248
|
+
const { CELL_PADDING: e, BODY_FONT: i, PLACEHOLDER_COLOR: s } = this.ctx.config;
|
|
1249
|
+
let r = this.visibleWidth;
|
|
1250
|
+
if (this.type === "tree") {
|
|
1251
|
+
const f = this.drawTextX - this.drawX;
|
|
1252
|
+
r = this.visibleWidth - f;
|
|
1253
|
+
}
|
|
1254
|
+
const { ellipsis: o } = this.ctx.paint.handleEllipsis(this.displayText, r, e, i);
|
|
1255
|
+
this.ellipsis = o;
|
|
1256
|
+
const { placeholder: n } = this.column;
|
|
1257
|
+
let h = this.displayText, c = this.drawTextColor;
|
|
1258
|
+
return !this.ctx.database.getReadonly(this.rowKey, this.key) && n && ["", null, void 0].includes(this.text) && this.cellType === "body" && !(this.rowspan === 0 || this.colspan === 0) && (h = n, c = s), this.ctx.paint.drawText(h, this.drawTextX, this.drawTextY, r, this.visibleHeight, {
|
|
1251
1259
|
font: i,
|
|
1252
1260
|
padding: e,
|
|
1253
1261
|
align: this.align,
|
|
1254
1262
|
verticalAlign: this.verticalAlign,
|
|
1255
|
-
color:
|
|
1263
|
+
color: c
|
|
1256
1264
|
});
|
|
1257
1265
|
}
|
|
1258
1266
|
drawImage() {
|
|
@@ -1340,46 +1348,46 @@ class Tt extends re {
|
|
|
1340
1348
|
drawBorder(e) {
|
|
1341
1349
|
const { drawX: i, drawY: s, rowIndex: r, colIndex: o, height: n, width: h } = this;
|
|
1342
1350
|
let c = i, d = s;
|
|
1343
|
-
const { xArr: f, yArr: x, lineDash: g = [], borderWidth:
|
|
1344
|
-
if (o >=
|
|
1345
|
-
const E = o === C ? 1 : 0,
|
|
1346
|
-
this.ctx.paint.drawLine([c +
|
|
1351
|
+
const { xArr: f, yArr: x, lineDash: g = [], borderWidth: m = 1, borderColor: u, fillColor: w } = e, p = f[0], C = f[1], y = x[0], b = x[1];
|
|
1352
|
+
if (o >= p && o <= C && r === y) {
|
|
1353
|
+
const E = o === C ? 1 : 0, R = o === p ? 1 : 0;
|
|
1354
|
+
this.ctx.paint.drawLine([c + R, d + 1, c + h - E, d + 1], {
|
|
1347
1355
|
borderColor: u,
|
|
1348
1356
|
fillColor: w,
|
|
1349
|
-
borderWidth:
|
|
1357
|
+
borderWidth: m,
|
|
1350
1358
|
lineCap: "round",
|
|
1351
1359
|
lineJoin: "round",
|
|
1352
1360
|
lineDash: g
|
|
1353
1361
|
});
|
|
1354
1362
|
}
|
|
1355
1363
|
if (o === C && r >= y && r <= b) {
|
|
1356
|
-
const E = r === y ? 1 : 0,
|
|
1357
|
-
this.ctx.paint.drawLine([c + h - 1, d + E, c + h - 1, d + n -
|
|
1364
|
+
const E = r === y ? 1 : 0, R = r === b ? 1 : 0;
|
|
1365
|
+
this.ctx.paint.drawLine([c + h - 1, d + E, c + h - 1, d + n - R], {
|
|
1358
1366
|
borderColor: u,
|
|
1359
1367
|
fillColor: w,
|
|
1360
|
-
borderWidth:
|
|
1368
|
+
borderWidth: m,
|
|
1361
1369
|
lineCap: "round",
|
|
1362
1370
|
lineJoin: "round",
|
|
1363
1371
|
lineDash: g
|
|
1364
1372
|
});
|
|
1365
1373
|
}
|
|
1366
|
-
if (o >=
|
|
1367
|
-
const E = o === C ? 1 : 0,
|
|
1368
|
-
this.ctx.paint.drawLine([c +
|
|
1374
|
+
if (o >= p && o <= C && r === b) {
|
|
1375
|
+
const E = o === C ? 1 : 0, R = o === p ? 1 : 0;
|
|
1376
|
+
this.ctx.paint.drawLine([c + R, d + n - 1, c + h - E, d + n - 1], {
|
|
1369
1377
|
borderColor: u,
|
|
1370
1378
|
fillColor: w,
|
|
1371
|
-
borderWidth:
|
|
1379
|
+
borderWidth: m,
|
|
1372
1380
|
lineCap: "round",
|
|
1373
1381
|
lineJoin: "round",
|
|
1374
1382
|
lineDash: g
|
|
1375
1383
|
});
|
|
1376
1384
|
}
|
|
1377
|
-
if (o ===
|
|
1378
|
-
const E = r === b ? 1 : 0,
|
|
1379
|
-
this.ctx.paint.drawLine([c + 1, d +
|
|
1385
|
+
if (o === p && r >= y && r <= b) {
|
|
1386
|
+
const E = r === b ? 1 : 0, R = r === y ? 1 : 0;
|
|
1387
|
+
this.ctx.paint.drawLine([c + 1, d + R, c + 1, d + n - E], {
|
|
1380
1388
|
borderColor: u,
|
|
1381
1389
|
fillColor: w,
|
|
1382
|
-
borderWidth:
|
|
1390
|
+
borderWidth: m,
|
|
1383
1391
|
lineCap: "round",
|
|
1384
1392
|
lineJoin: "round",
|
|
1385
1393
|
lineDash: g
|
|
@@ -1443,22 +1451,22 @@ class li {
|
|
|
1443
1451
|
Array.isArray(i.children) && i.children.length && (r = !0, this.initData(i.children, e + 1));
|
|
1444
1452
|
const { ROW_KEY: o = "", DEFAULT_EXPAND_ALL: n, CELL_HEIGHT: h, SELECTABLE_METHOD: c, CHECKBOX_KEY: d } = this.ctx.config, f = i[o], x = f != null ? `${f}` : Jt();
|
|
1445
1453
|
this.itemRowKeyMap.set(i, x);
|
|
1446
|
-
const g = i._height || h,
|
|
1454
|
+
const g = i._height || h, m = i._readonly;
|
|
1447
1455
|
let u = !0;
|
|
1448
1456
|
if (typeof c == "function" && (u = c), d) {
|
|
1449
|
-
const
|
|
1450
|
-
if (this.checkboxKeyMap.has(
|
|
1451
|
-
const C = this.checkboxKeyMap.get(
|
|
1452
|
-
C.push(x), this.checkboxKeyMap.set(
|
|
1457
|
+
const p = i[d];
|
|
1458
|
+
if (this.checkboxKeyMap.has(p)) {
|
|
1459
|
+
const C = this.checkboxKeyMap.get(p) || [];
|
|
1460
|
+
C.push(x), this.checkboxKeyMap.set(p, C);
|
|
1453
1461
|
} else
|
|
1454
|
-
this.checkboxKeyMap.set(
|
|
1462
|
+
this.checkboxKeyMap.set(p, [x]);
|
|
1455
1463
|
}
|
|
1456
1464
|
this.selectionMap.set(x, {
|
|
1457
1465
|
key: d ? i[d] : x,
|
|
1458
1466
|
row: i,
|
|
1459
1467
|
check: ((w = this.selectionMap.get(x)) == null ? void 0 : w.check) || !1
|
|
1460
1468
|
}), this.rowKeyMap.set(x, {
|
|
1461
|
-
readonly:
|
|
1469
|
+
readonly: m,
|
|
1462
1470
|
index: s,
|
|
1463
1471
|
rowIndex: s,
|
|
1464
1472
|
level: e,
|
|
@@ -1677,16 +1685,16 @@ class li {
|
|
|
1677
1685
|
const s = /* @__PURE__ */ new Set();
|
|
1678
1686
|
let r = [], o = t.map((d) => {
|
|
1679
1687
|
const { rowKey: f, key: x } = d;
|
|
1680
|
-
let g = d.value,
|
|
1681
|
-
const u = this.getRowDataItemForRowKey(f), w = this.getItemValue(f, x),
|
|
1682
|
-
return (
|
|
1688
|
+
let g = d.value, m = g;
|
|
1689
|
+
const u = this.getRowDataItemForRowKey(f), w = this.getItemValue(f, x), p = this.getVirtualBodyCellByKey(f, x);
|
|
1690
|
+
return (p == null ? void 0 : p.type) === "number" && (["", void 0, null].includes(g) ? m = null : /^-?\d+(\.\d+)?$/.test(`${g}`) ? m = Number(g) : (m = w, r.push({
|
|
1683
1691
|
...d,
|
|
1684
|
-
value:
|
|
1692
|
+
value: m,
|
|
1685
1693
|
oldValue: w,
|
|
1686
1694
|
row: u
|
|
1687
1695
|
}))), {
|
|
1688
1696
|
...d,
|
|
1689
|
-
value:
|
|
1697
|
+
value: m,
|
|
1690
1698
|
oldValue: w,
|
|
1691
1699
|
row: u
|
|
1692
1700
|
};
|
|
@@ -1703,11 +1711,11 @@ class li {
|
|
|
1703
1711
|
return;
|
|
1704
1712
|
const { BEFORE_VALUE_CHANGE_METHOD: n } = this.ctx.config;
|
|
1705
1713
|
typeof n == "function" && (o = await n(o)), o.forEach((d) => {
|
|
1706
|
-
const { value: f, rowKey: x, key: g, oldValue:
|
|
1714
|
+
const { value: f, rowKey: x, key: g, oldValue: m } = d;
|
|
1707
1715
|
s.add(x), this.setItemValue(x, g, f), i.push({
|
|
1708
1716
|
rowKey: x,
|
|
1709
1717
|
key: g,
|
|
1710
|
-
oldValue:
|
|
1718
|
+
oldValue: m,
|
|
1711
1719
|
newValue: f
|
|
1712
1720
|
});
|
|
1713
1721
|
});
|
|
@@ -1778,9 +1786,9 @@ class li {
|
|
|
1778
1786
|
oldValue: h,
|
|
1779
1787
|
newValue: h
|
|
1780
1788
|
};
|
|
1781
|
-
const { BEFORE_VALUE_CHANGE_METHOD:
|
|
1782
|
-
if (typeof
|
|
1783
|
-
const
|
|
1789
|
+
const { BEFORE_VALUE_CHANGE_METHOD: m } = this.ctx.config;
|
|
1790
|
+
if (typeof m == "function") {
|
|
1791
|
+
const p = await m([
|
|
1784
1792
|
{
|
|
1785
1793
|
rowKey: t,
|
|
1786
1794
|
key: e,
|
|
@@ -1789,7 +1797,7 @@ class li {
|
|
|
1789
1797
|
row: x
|
|
1790
1798
|
}
|
|
1791
1799
|
]);
|
|
1792
|
-
|
|
1800
|
+
p && p.length && (c = p[0].value);
|
|
1793
1801
|
}
|
|
1794
1802
|
this.changedDataMap.set(d, c), n[e] = c;
|
|
1795
1803
|
const u = {
|
|
@@ -1950,11 +1958,11 @@ class li {
|
|
|
1950
1958
|
this.rowKeyMap.forEach((x, g) => {
|
|
1951
1959
|
var u;
|
|
1952
1960
|
(u = this.selectionMap.get(g)) != null && u.check && (s += 1);
|
|
1953
|
-
let
|
|
1954
|
-
typeof
|
|
1961
|
+
let m = x.selectable;
|
|
1962
|
+
typeof m == "function" && (m = m({
|
|
1955
1963
|
row: x.item,
|
|
1956
1964
|
rowIndex: x.rowIndex
|
|
1957
|
-
})),
|
|
1965
|
+
})), m && (r += 1);
|
|
1958
1966
|
});
|
|
1959
1967
|
const h = o > i && s === 0 && n, c = r && r > s && s > 0 || h, d = r !== 0, f = !!r && r === s;
|
|
1960
1968
|
return this.bufferCheckState = {
|
|
@@ -2114,8 +2122,8 @@ class li {
|
|
|
2114
2122
|
new nt(c).validate(d).then(() => {
|
|
2115
2123
|
this.clearValidationError(t, e), i([]);
|
|
2116
2124
|
}).catch(({ errors: x }) => {
|
|
2117
|
-
const g = x.map((
|
|
2118
|
-
...
|
|
2125
|
+
const g = x.map((m) => ({
|
|
2126
|
+
...m,
|
|
2119
2127
|
column: n,
|
|
2120
2128
|
key: e,
|
|
2121
2129
|
row: s.item,
|
|
@@ -2149,7 +2157,7 @@ class li {
|
|
|
2149
2157
|
height: f,
|
|
2150
2158
|
width: x,
|
|
2151
2159
|
colspan: g,
|
|
2152
|
-
mergeRow:
|
|
2160
|
+
mergeRow: m,
|
|
2153
2161
|
mergeCol: u
|
|
2154
2162
|
} = t;
|
|
2155
2163
|
if (d === 1 && g === 1)
|
|
@@ -2171,98 +2179,98 @@ class li {
|
|
|
2171
2179
|
}
|
|
2172
2180
|
]
|
|
2173
2181
|
};
|
|
2174
|
-
let w = e,
|
|
2175
|
-
if (d !== 1 &&
|
|
2176
|
-
|
|
2177
|
-
const
|
|
2178
|
-
const
|
|
2179
|
-
return `${
|
|
2182
|
+
let w = e, p = e, C = n, y = n, b = [], E = 0, R = 0, O = 0, I = 0;
|
|
2183
|
+
if (d !== 1 && m) {
|
|
2184
|
+
I = x;
|
|
2185
|
+
const _ = h.reduce((v, S) => {
|
|
2186
|
+
const T = this.getItemValue(s, S) ?? "";
|
|
2187
|
+
return `${v}${T}`;
|
|
2180
2188
|
}, "");
|
|
2181
|
-
for (let
|
|
2182
|
-
const
|
|
2183
|
-
const B = this.getItemValue(
|
|
2189
|
+
for (let v = e - 1; v >= 0; v--) {
|
|
2190
|
+
const S = this.rowIndexRowKeyMap.get(v) || "", T = h.reduce((M, A) => {
|
|
2191
|
+
const B = this.getItemValue(S, A) ?? "";
|
|
2184
2192
|
return `${M}${B}`;
|
|
2185
2193
|
}, "");
|
|
2186
|
-
if (
|
|
2187
|
-
w =
|
|
2194
|
+
if (_ === T)
|
|
2195
|
+
w = v;
|
|
2188
2196
|
else
|
|
2189
2197
|
break;
|
|
2190
2198
|
}
|
|
2191
|
-
for (let
|
|
2192
|
-
const
|
|
2193
|
-
const B = this.getItemValue(
|
|
2199
|
+
for (let v = e; v <= this.ctx.maxRowIndex; v++) {
|
|
2200
|
+
const S = this.rowIndexRowKeyMap.get(v) || "", T = h.reduce((M, A) => {
|
|
2201
|
+
const B = this.getItemValue(S, A) ?? "";
|
|
2194
2202
|
return `${M}${B}`;
|
|
2195
2203
|
}, "");
|
|
2196
|
-
if (
|
|
2197
|
-
|
|
2204
|
+
if (_ === T)
|
|
2205
|
+
p = v;
|
|
2198
2206
|
else
|
|
2199
2207
|
break;
|
|
2200
2208
|
}
|
|
2201
|
-
for (let
|
|
2202
|
-
const { height:
|
|
2203
|
-
E +=
|
|
2209
|
+
for (let v = w; v < e; v++) {
|
|
2210
|
+
const { height: S } = this.positions[v];
|
|
2211
|
+
E += S;
|
|
2204
2212
|
}
|
|
2205
|
-
for (let
|
|
2206
|
-
const { height:
|
|
2207
|
-
|
|
2208
|
-
const
|
|
2213
|
+
for (let v = w; v <= p; v++) {
|
|
2214
|
+
const { height: S } = this.positions[v];
|
|
2215
|
+
O += S;
|
|
2216
|
+
const T = this.rowIndexRowKeyMap.get(v) || "", { item: M } = this.rowKeyMap.get(T), A = this.getItemValue(T, i);
|
|
2209
2217
|
b.push({
|
|
2210
|
-
rowKey:
|
|
2218
|
+
rowKey: T,
|
|
2211
2219
|
key: i,
|
|
2212
|
-
value:
|
|
2220
|
+
value: A,
|
|
2213
2221
|
row: M
|
|
2214
2222
|
});
|
|
2215
2223
|
}
|
|
2216
2224
|
}
|
|
2217
2225
|
if (g !== 1 && u) {
|
|
2218
|
-
|
|
2219
|
-
for (let
|
|
2220
|
-
const
|
|
2221
|
-
if (!
|
|
2226
|
+
O = f;
|
|
2227
|
+
for (let _ = n - 1; _ >= 0; _--) {
|
|
2228
|
+
const v = this.getColumnByColIndex(_);
|
|
2229
|
+
if (!v)
|
|
2222
2230
|
break;
|
|
2223
|
-
const
|
|
2224
|
-
if (
|
|
2225
|
-
C =
|
|
2231
|
+
const S = this.getItemValue(s, i), T = this.getItemValue(s, v.key);
|
|
2232
|
+
if (S === T && c.includes(v.key))
|
|
2233
|
+
C = _;
|
|
2226
2234
|
else
|
|
2227
2235
|
break;
|
|
2228
2236
|
}
|
|
2229
|
-
for (let
|
|
2230
|
-
const
|
|
2231
|
-
if (!
|
|
2237
|
+
for (let _ = n; _ <= this.ctx.maxColIndex; _++) {
|
|
2238
|
+
const v = this.getColumnByColIndex(_);
|
|
2239
|
+
if (!v)
|
|
2232
2240
|
break;
|
|
2233
|
-
const
|
|
2234
|
-
if (
|
|
2235
|
-
y =
|
|
2241
|
+
const S = this.getItemValue(s, i), T = this.getItemValue(s, v.key);
|
|
2242
|
+
if (S === T && c.includes(v.key))
|
|
2243
|
+
y = _;
|
|
2236
2244
|
else
|
|
2237
2245
|
break;
|
|
2238
2246
|
}
|
|
2239
|
-
for (let
|
|
2240
|
-
const
|
|
2241
|
-
if (!
|
|
2247
|
+
for (let _ = C; _ < n; _++) {
|
|
2248
|
+
const v = this.getColumnByColIndex(_);
|
|
2249
|
+
if (!v)
|
|
2242
2250
|
break;
|
|
2243
|
-
|
|
2251
|
+
R += v.width || 100;
|
|
2244
2252
|
}
|
|
2245
|
-
for (let
|
|
2246
|
-
const
|
|
2247
|
-
if (!
|
|
2253
|
+
for (let _ = C; _ <= y; _++) {
|
|
2254
|
+
const v = this.getColumnByColIndex(_);
|
|
2255
|
+
if (!v)
|
|
2248
2256
|
break;
|
|
2249
|
-
|
|
2257
|
+
I += v.width || 100, b.push({
|
|
2250
2258
|
rowKey: s,
|
|
2251
|
-
key:
|
|
2252
|
-
value: this.getItemValue(s,
|
|
2259
|
+
key: v.key,
|
|
2260
|
+
value: this.getItemValue(s, v.key),
|
|
2253
2261
|
row: r
|
|
2254
2262
|
});
|
|
2255
2263
|
}
|
|
2256
2264
|
}
|
|
2257
2265
|
return {
|
|
2258
2266
|
xArr: [C, y],
|
|
2259
|
-
yArr: [w,
|
|
2267
|
+
yArr: [w, p],
|
|
2260
2268
|
rowspan: d,
|
|
2261
2269
|
colspan: g,
|
|
2262
|
-
height:
|
|
2263
|
-
width:
|
|
2270
|
+
height: O,
|
|
2271
|
+
width: I,
|
|
2264
2272
|
offsetTop: E,
|
|
2265
|
-
offsetLeft:
|
|
2273
|
+
offsetLeft: R,
|
|
2266
2274
|
dataList: b
|
|
2267
2275
|
};
|
|
2268
2276
|
}
|
|
@@ -2295,7 +2303,7 @@ class li {
|
|
|
2295
2303
|
// 获取虚拟单元格
|
|
2296
2304
|
getVirtualBodyCell(t, e) {
|
|
2297
2305
|
const i = this.getColumnByColIndex(e), s = this.getRowForRowIndex(t);
|
|
2298
|
-
return !i || !s ? void 0 : new
|
|
2306
|
+
return !i || !s ? void 0 : new At(this.ctx, t, e, 0, 0, 0, 0, i, s.item, "body");
|
|
2299
2307
|
}
|
|
2300
2308
|
getVirtualBodyCellByKey(t, e) {
|
|
2301
2309
|
const i = this.getRowIndexForRowKey(t), s = this.getColIndexForKey(e);
|
|
@@ -2579,8 +2587,8 @@ class fi {
|
|
|
2579
2587
|
f === "top" ? x = i + d : f === "bottom" ? x = i + r - d : x = i + (r + 1) / 2;
|
|
2580
2588
|
let g = 0;
|
|
2581
2589
|
h === "left" ? g = e + d : h === "right" ? g = e + s - d : g = e + s / 2;
|
|
2582
|
-
const { _text:
|
|
2583
|
-
return this.ctx.fillText(
|
|
2590
|
+
const { _text: m, ellipsis: u } = this.handleEllipsis(t, s, d, n);
|
|
2591
|
+
return this.ctx.fillText(m, g, x), this.ctx.restore(), u;
|
|
2584
2592
|
}
|
|
2585
2593
|
handleEllipsis(t, e, i = 0, s = "12px Arial") {
|
|
2586
2594
|
let r = !1, o = t;
|
|
@@ -2640,6 +2648,8 @@ class Wt {
|
|
|
2640
2648
|
l(this, "HEADER_BG_COLOR", "#F8FAFF");
|
|
2641
2649
|
l(this, "BODY_BG_COLOR", "#FFF");
|
|
2642
2650
|
l(this, "HEADER_TEXT_COLOR", "#1D2129");
|
|
2651
|
+
l(this, "BODY_TEXT_COLOR", "#4E5969");
|
|
2652
|
+
l(this, "FOOTER_TEXT_COLOR", "#4E5969");
|
|
2643
2653
|
l(this, "LOADING_ICON_SVG", "");
|
|
2644
2654
|
l(this, "LOADING_ICON_COLOR", "#4E5969");
|
|
2645
2655
|
l(this, "EXPAND_ICON_SVG", "");
|
|
@@ -2759,12 +2769,13 @@ class Wt {
|
|
|
2759
2769
|
}
|
|
2760
2770
|
// 同步css 样式变量
|
|
2761
2771
|
updateCssVar() {
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2772
|
+
let t = {};
|
|
2773
|
+
Object.keys(this).forEach((e) => {
|
|
2774
|
+
if (e.endsWith("_COLOR") || e.endsWith("_FONT")) {
|
|
2775
|
+
const i = `--evt-${e.toLocaleLowerCase().replace(/_/g, "-")}`, s = ai(i);
|
|
2776
|
+
t[e] = s;
|
|
2766
2777
|
}
|
|
2767
|
-
}), Object.assign(this, this._config);
|
|
2778
|
+
}), Object.assign(this, t, this._config);
|
|
2768
2779
|
}
|
|
2769
2780
|
}
|
|
2770
2781
|
const Pt = '<svg t="1724122044148" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4551" width="32" height="32"><path d="M707.648 401.28L489.28 560.704l22.656 30.976 22.656-30.976L316.16 401.216q-3.072-2.24-6.464-3.84-3.456-1.536-7.104-2.432-3.712-0.896-7.488-1.088-3.776-0.128-7.488 0.448-3.776 0.64-7.296 1.92-3.584 1.28-6.784 3.2-3.2 1.984-6.016 4.544-2.816 2.56-5.056 5.632-2.176 3.072-3.84 6.464-1.536 3.456-2.432 7.104-0.896 3.712-1.088 7.488-0.128 3.776 0.448 7.488 0.64 3.776 1.92 7.296 1.28 3.584 3.2 6.784 1.984 3.2 4.544 6.016 2.56 2.752 5.632 4.992l218.368 159.552q4.928 3.584 10.752 5.504 5.76 1.92 11.904 1.92 6.08 0 11.904-1.92 5.76-1.92 10.752-5.504l218.368-159.552q3.008-2.24 5.568-4.992 2.56-2.816 4.544-6.016 1.92-3.2 3.264-6.784 1.28-3.52 1.92-7.296 0.576-3.712 0.384-7.488-0.128-3.84-1.024-7.488-0.896-3.648-2.496-7.04-1.6-3.456-3.84-6.528-2.24-3.072-4.992-5.632-2.816-2.56-6.016-4.48-3.2-1.984-6.784-3.328-3.584-1.28-7.296-1.856-3.712-0.64-7.488-0.448-3.84 0.192-7.488 1.088-3.648 0.896-7.04 2.496-3.456 1.536-6.528 3.84z m61.056 30.976q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.472-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.72-3.584-3.456-1.408-7.168-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.656 3.584-3.136 2.112-5.76 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.584 6.656-1.408 3.52-2.176 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.176 7.168 1.472 3.52 3.584 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.168-2.176 3.52-1.408 6.656-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.048-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z m-436.736 0q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.408-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.656-3.584-3.52-1.408-7.232-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.592 3.584-3.2 2.112-5.824 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.52 6.656-1.472 3.52-2.24 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.24 7.168 1.408 3.52 3.52 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.408 6.592-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.112-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z" p-id="4552"></path></svg>';
|
|
@@ -3159,7 +3170,7 @@ class ui {
|
|
|
3159
3170
|
}
|
|
3160
3171
|
selectionEnterAndLeave(t, e) {
|
|
3161
3172
|
const { offsetY: i, offsetX: s } = this.ctx.getOffset(e), r = i, o = s;
|
|
3162
|
-
o > t.drawImageX && o < t.drawImageX + t.drawImageWidth && r > t.drawImageY && r < t.drawImageY + t.drawImageHeight && t instanceof
|
|
3173
|
+
o > t.drawImageX && o < t.drawImageX + t.drawImageWidth && r > t.drawImageY && r < t.drawImageY + t.drawImageHeight && t instanceof At && ["selection", "index-selection"].includes(t.type) && (this.ctx.stageElement.style.cursor = "pointer", this.ctx.isPointer = !0, this.ctx.database.getRowSelectable(t.rowKey) || (this.ctx.stageElement.style.cursor = "not-allowed"));
|
|
3163
3174
|
}
|
|
3164
3175
|
isBusy(t) {
|
|
3165
3176
|
const { offsetY: e, offsetX: i } = this.ctx.getOffset(t), s = e, r = i;
|
|
@@ -3525,8 +3536,8 @@ class zt {
|
|
|
3525
3536
|
} = this.ctx, h = s, c = i, d = e.height, f = e.width, x = t.height, g = this.ctx.footer.height;
|
|
3526
3537
|
if (this.type === "vertical") {
|
|
3527
3538
|
this.visibleDistance = c - r - d, this.distance = x - this.visibleDistance + g, this.trackX = h - r, this.trackY = 0, this.splitPoints = [this.trackX, d, this.trackX + r, d], this.trackWidth = r, this.trackHeight = c, this.barX = this.trackX - 1 + (r - o) / 2, this.barWidth = o;
|
|
3528
|
-
const
|
|
3529
|
-
let u = Math.floor(
|
|
3539
|
+
const m = this.distance ? this.visibleDistance / (x + g) : 0;
|
|
3540
|
+
let u = Math.floor(m * this.visibleDistance);
|
|
3530
3541
|
u < 30 ? u = 30 : u > this.visibleDistance && (u = 0), this.barHeight = u, this.barY = d + this.scroll / this.distance * (this.visibleDistance - this.barHeight), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
|
|
3531
3542
|
} else {
|
|
3532
3543
|
this.visibleDistance = h - r, this.distance = f - this.visibleDistance, this.splitPoints = [
|
|
@@ -3535,8 +3546,8 @@ class zt {
|
|
|
3535
3546
|
h - r,
|
|
3536
3547
|
c
|
|
3537
3548
|
];
|
|
3538
|
-
const
|
|
3539
|
-
this.trackX = 0, this.trackY = c - r +
|
|
3549
|
+
const m = n ? 0 : 0.5;
|
|
3550
|
+
this.trackX = 0, this.trackY = c - r + m, this.trackWidth = h, this.trackHeight = r;
|
|
3540
3551
|
const u = this.distance ? this.visibleDistance / f : 0;
|
|
3541
3552
|
let w = Math.floor(u * this.visibleDistance);
|
|
3542
3553
|
this.barY = this.trackY - 1 + (r - o) / 2, w < 30 ? w = 30 : w >= this.visibleDistance && (w = 0), this.barWidth = w, this.barHeight = o, this.barX = this.scroll / this.distance * (this.visibleDistance - this.barWidth), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
|
|
@@ -3676,7 +3687,7 @@ class pi {
|
|
|
3676
3687
|
config: { HEADER_HEIGHT: t, SCROLLER_TRACK_SIZE: e }
|
|
3677
3688
|
} = this.ctx, i = this.ctx.database.getColumns();
|
|
3678
3689
|
this.columns = i, this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [];
|
|
3679
|
-
const s = te(i), r =
|
|
3690
|
+
const s = te(i), r = _t(i);
|
|
3680
3691
|
this.height = t * s, this.width = r.reduce((f, x) => f + ((x == null ? void 0 : x.width) || 100), 0), this.visibleHeight = this.height;
|
|
3681
3692
|
const o = ei(ee(i, s));
|
|
3682
3693
|
this.columnIndex = 0, this.resizeNum = 0, this.render(o, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
|
|
@@ -3779,7 +3790,7 @@ class pi {
|
|
|
3779
3790
|
for (let o = 0; o < i; o++) {
|
|
3780
3791
|
const n = t[o], h = r * (n.rowspan || 0), c = r * (n.level || 0);
|
|
3781
3792
|
let d = n.width || 100;
|
|
3782
|
-
n.children && (d =
|
|
3793
|
+
n.children && (d = _t(n.children).reduce((g, m) => g + ((m == null ? void 0 : m.width) || 100), 0));
|
|
3783
3794
|
const f = new oe(this.ctx, this.columnIndex, s, c, d, h, n);
|
|
3784
3795
|
this.ctx.database.setHeader(n.key, f), this.allCellHeaders.push(f), n.children || (this.leafCellHeaders.push(f), f.column.widthFillDisable || this.resizeNum++), n.fixed === "left" ? this.fixedLeftCellHeaders.push(f) : n.fixed === "right" ? this.fixedRightCellHeaders.push(f) : this.centerCellHeaders.push(f), !n.children && this.columnIndex++, n.children && this.render(n.children, s), s += d;
|
|
3785
3796
|
}
|
|
@@ -3873,7 +3884,7 @@ class ne {
|
|
|
3873
3884
|
update() {
|
|
3874
3885
|
const { header: t } = this.ctx, e = [], i = [], s = [];
|
|
3875
3886
|
t.renderLeafCellHeaders.forEach((r) => {
|
|
3876
|
-
const o = new
|
|
3887
|
+
const o = new At(
|
|
3877
3888
|
this.ctx,
|
|
3878
3889
|
this.rowIndex,
|
|
3879
3890
|
r.colIndex,
|
|
@@ -3956,27 +3967,27 @@ class mi {
|
|
|
3956
3967
|
if (!e.width)
|
|
3957
3968
|
return;
|
|
3958
3969
|
this.x = 0, x === "top" && r ? this.y = e.height + i.height : this.y = e.height;
|
|
3959
|
-
const { data: g, sumHeight:
|
|
3960
|
-
this.height =
|
|
3970
|
+
const { data: g, sumHeight: m } = s.getData();
|
|
3971
|
+
this.height = m, this.data = g, this.width = e.width, this.visibleWidth = this.ctx.stageWidth - o;
|
|
3961
3972
|
const u = this.ctx.footer.height;
|
|
3962
3973
|
!this.data.length && !n ? this.height = h : !this.data.length && n && (this.height = n - e.height - u - o);
|
|
3963
3974
|
let w = this.height + e.height + o;
|
|
3964
3975
|
w += u;
|
|
3965
|
-
let
|
|
3976
|
+
let p = w;
|
|
3966
3977
|
const C = window.innerHeight, { top: y } = this.containerRect || this.ctx.containerElement.getBoundingClientRect();
|
|
3967
3978
|
if (C > y && d && !n) {
|
|
3968
|
-
const
|
|
3969
|
-
|
|
3970
|
-
} else this.data.length && n ?
|
|
3971
|
-
|
|
3979
|
+
const v = C - y - f;
|
|
3980
|
+
v > e.height + o ? p = v : w > c && (p = c);
|
|
3981
|
+
} else this.data.length && n ? p = n : this.data.length && c && w > c && (p = c);
|
|
3982
|
+
p > 0 && (this.ctx.stageHeight = Math.floor(p), this.ctx.stageElement.style.height = `${this.ctx.stageHeight - 0.5}px`);
|
|
3972
3983
|
let b = this.ctx.stageHeight - e.height - o;
|
|
3973
3984
|
r ? this.visibleHeight = b - u : this.visibleHeight = b, this.data.length || (this.height = this.visibleHeight), this.ctx.body.x = this.x, this.ctx.body.y = this.y, this.ctx.body.width = this.width, this.ctx.body.height = this.height, this.ctx.body.visibleWidth = this.visibleWidth, this.ctx.body.visibleHeight = this.visibleHeight, this.ctx.body.data = g;
|
|
3974
|
-
const E = window.devicePixelRatio || 1,
|
|
3975
|
-
t.width = Math.floor(
|
|
3976
|
-
const
|
|
3985
|
+
const E = window.devicePixelRatio || 1, R = this.ctx.stageWidth * E, O = this.ctx.stageHeight * E;
|
|
3986
|
+
t.width = Math.floor(R), t.height = Math.floor(O);
|
|
3987
|
+
const I = this.data.length ? "not-empty" : "empty";
|
|
3977
3988
|
this.ctx.emit("emptyChange", {
|
|
3978
|
-
isEmpty:
|
|
3979
|
-
type:
|
|
3989
|
+
isEmpty: I,
|
|
3990
|
+
type: I,
|
|
3980
3991
|
headerHeight: e.height,
|
|
3981
3992
|
bodyHeight: this.height,
|
|
3982
3993
|
footerHeight: u,
|
|
@@ -4026,8 +4037,8 @@ class mi {
|
|
|
4026
4037
|
for (let f = 0; f < this.renderRows.length; f++) {
|
|
4027
4038
|
const x = this.renderRows[f];
|
|
4028
4039
|
if (r > x.y - c + x.height - 1.5 && r < x.y - c + x.height + 1.5 && r < h - 4)
|
|
4029
|
-
for (let
|
|
4030
|
-
const u = x.cells[
|
|
4040
|
+
for (let m = 0; m < x.cells.length; m++) {
|
|
4041
|
+
const u = x.cells[m];
|
|
4031
4042
|
o > u.drawX + 10 && o < u.drawX + u.width - 10 && u.rowspan === 1 && (this.ctx.stageElement.style.cursor = "row-resize", this.resizeTarget = x);
|
|
4032
4043
|
}
|
|
4033
4044
|
}
|
|
@@ -4111,7 +4122,7 @@ class mi {
|
|
|
4111
4122
|
this.headIndex = Math.max(0, h), this.tailIndex = Math.min(this.ctx.maxRowIndex, c + 1), this.visibleRows = o.slice(this.headIndex, this.tailIndex + 1), this.ctx.body.headIndex = this.headIndex, this.ctx.body.tailIndex = this.tailIndex, this.ctx.body.visibleRows = this.visibleRows;
|
|
4112
4123
|
const d = [];
|
|
4113
4124
|
for (let f = 0; f < this.visibleRows.length; f++) {
|
|
4114
|
-
const x = this.headIndex + f, g = this.visibleRows[f], { height:
|
|
4125
|
+
const x = this.headIndex + f, g = this.visibleRows[f], { height: m, top: u } = this.ctx.database.getPositionForRowIndex(x), w = new ne(this.ctx, x, 0, u + this.y, t.width, m, g);
|
|
4115
4126
|
d.push(w);
|
|
4116
4127
|
}
|
|
4117
4128
|
this.renderRows = d, this.ctx.body.renderRows = d;
|
|
@@ -4329,41 +4340,41 @@ class Ei {
|
|
|
4329
4340
|
SELECTOR_AREA_MAX_Y: d,
|
|
4330
4341
|
SELECTOR_AREA_MAX_X_OFFSET: f,
|
|
4331
4342
|
SELECTOR_AREA_MAX_Y_OFFSET: x
|
|
4332
|
-
} = this.ctx.config, g = n,
|
|
4333
|
-
let [
|
|
4334
|
-
if (
|
|
4343
|
+
} = this.ctx.config, g = n, m = h || this.ctx.maxColIndex - f, u = c, w = d || this.ctx.maxRowIndex - x;
|
|
4344
|
+
let [p, C] = r, [y, b] = o;
|
|
4345
|
+
if (p < g || C > m || y < u || b > w)
|
|
4335
4346
|
return;
|
|
4336
4347
|
if (this.ctx.stageElement.focus({ preventScroll: !0 }), this.ctx.config.ENABLE_MERGE_CELL_LINK) {
|
|
4337
|
-
const
|
|
4338
|
-
y =
|
|
4348
|
+
const R = this.adjustMergeCells(r, o);
|
|
4349
|
+
y = R.yArr[0], b = R.yArr[1], p = R.xArr[0], C = R.xArr[1], this.ctx.onlyMergeCell = R.onlyMergeCell;
|
|
4339
4350
|
}
|
|
4340
|
-
|
|
4351
|
+
p === C && y === b ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, r = [Math.max(g, p), Math.min(m, C)], o = [Math.max(u, y), Math.min(w, b)];
|
|
4341
4352
|
const { BEFORE_SET_SELECTOR_METHOD: E } = this.ctx.config;
|
|
4342
4353
|
if (typeof E == "function") {
|
|
4343
|
-
const
|
|
4354
|
+
const O = E({
|
|
4344
4355
|
focusCell: this.ctx.focusCell,
|
|
4345
4356
|
xArr: r,
|
|
4346
4357
|
yArr: o
|
|
4347
4358
|
});
|
|
4348
|
-
if (!
|
|
4359
|
+
if (!O)
|
|
4349
4360
|
return;
|
|
4350
|
-
r =
|
|
4361
|
+
r = O.xArr, o = O.yArr;
|
|
4351
4362
|
}
|
|
4352
4363
|
this.ctx.selector.xArr = r, this.ctx.selector.yArr = o, this.ctx.emit("setSelector", this.ctx.selector), this.ctx.emit("drawView");
|
|
4353
4364
|
}
|
|
4354
4365
|
}
|
|
4355
4366
|
adjustMergeCells(t, e) {
|
|
4356
|
-
var
|
|
4367
|
+
var m;
|
|
4357
4368
|
const [i, s] = e, [r, o] = t;
|
|
4358
4369
|
let n = [], h = [];
|
|
4359
4370
|
for (let u = 0; u <= e[1] - e[0]; u++)
|
|
4360
4371
|
for (let w = 0; w <= t[1] - t[0]; w++) {
|
|
4361
|
-
const
|
|
4362
|
-
y && ((
|
|
4372
|
+
const p = u + e[0], C = w + t[0], y = this.ctx.database.getVirtualBodyCell(p, C);
|
|
4373
|
+
y && ((p === i || p === s) && n.push(y), (C === r || C === o) && h.push(y));
|
|
4363
4374
|
}
|
|
4364
4375
|
const c = n.reduce(
|
|
4365
4376
|
(u, w) => {
|
|
4366
|
-
const { yArr:
|
|
4377
|
+
const { yArr: p } = w.getSpanInfo(), [C, y] = p;
|
|
4367
4378
|
return u.minY = Math.min(u.minY, C), u.maxY = Math.max(u.maxY, y), u;
|
|
4368
4379
|
},
|
|
4369
4380
|
{
|
|
@@ -4372,7 +4383,7 @@ class Ei {
|
|
|
4372
4383
|
}
|
|
4373
4384
|
), d = h.reduce(
|
|
4374
4385
|
(u, w) => {
|
|
4375
|
-
const { xArr:
|
|
4386
|
+
const { xArr: p } = w.getSpanInfo(), [C, y] = p;
|
|
4376
4387
|
return u.minX = Math.min(u.minX, C), u.maxX = Math.max(u.maxX, y), u;
|
|
4377
4388
|
},
|
|
4378
4389
|
{
|
|
@@ -4382,7 +4393,7 @@ class Ei {
|
|
|
4382
4393
|
), f = [d.minX, d.maxX], x = [c.minY, c.maxY];
|
|
4383
4394
|
let g = !1;
|
|
4384
4395
|
if (d.minX !== d.maxX || c.minY !== c.maxY) {
|
|
4385
|
-
const u = JSON.stringify(f) + JSON.stringify(x), w = (
|
|
4396
|
+
const u = JSON.stringify(f) + JSON.stringify(x), w = (m = this.ctx.focusCell) == null ? void 0 : m.getSpanInfo();
|
|
4386
4397
|
g = (w && JSON.stringify(w.xArr) + JSON.stringify(w.yArr)) === u;
|
|
4387
4398
|
}
|
|
4388
4399
|
return {
|
|
@@ -4425,8 +4436,8 @@ class Ei {
|
|
|
4425
4436
|
SELECTOR_AREA_MAX_Y: o,
|
|
4426
4437
|
SELECTOR_AREA_MAX_X_OFFSET: n,
|
|
4427
4438
|
SELECTOR_AREA_MAX_Y_OFFSET: h
|
|
4428
|
-
} = this.ctx.config, c = i, d = s || this.ctx.maxColIndex - n, f = r, x = o || this.ctx.maxRowIndex - h, g = [c, d],
|
|
4429
|
-
this.setSelector(g,
|
|
4439
|
+
} = this.ctx.config, c = i, d = s || this.ctx.maxColIndex - n, f = r, x = o || this.ctx.maxRowIndex - h, g = [c, d], m = [f, x];
|
|
4440
|
+
this.setSelector(g, m);
|
|
4430
4441
|
}
|
|
4431
4442
|
}
|
|
4432
4443
|
selectRows(t, e = !0) {
|
|
@@ -4563,14 +4574,14 @@ class Ei {
|
|
|
4563
4574
|
const e = this.ctx.selector.yArr[0], i = this.ctx.selector.xArr[0], s = /* @__PURE__ */ new Set();
|
|
4564
4575
|
navigator.clipboard.readText().then(async (r) => {
|
|
4565
4576
|
let o = si(r);
|
|
4566
|
-
const n = [i, i + o[0].length - 1], h = [e, e + o.length - 1], [c, d] = h, [f, x] = n, g = d - this.ctx.maxRowIndex,
|
|
4567
|
-
(g > 0 ||
|
|
4577
|
+
const n = [i, i + o[0].length - 1], h = [e, e + o.length - 1], [c, d] = h, [f, x] = n, g = d - this.ctx.maxRowIndex, m = x - this.ctx.maxColIndex;
|
|
4578
|
+
(g > 0 || m > 0) && this.ctx.emit("onPastedDataOverflow", {
|
|
4568
4579
|
maxY: d,
|
|
4569
4580
|
maxX: x,
|
|
4570
4581
|
minY: c,
|
|
4571
4582
|
minX: f,
|
|
4572
4583
|
overflowRowCount: g,
|
|
4573
|
-
overflowColCount:
|
|
4584
|
+
overflowColCount: m,
|
|
4574
4585
|
textArr: o
|
|
4575
4586
|
});
|
|
4576
4587
|
const u = o.length === 1 && o[0].length === 1;
|
|
@@ -4586,16 +4597,16 @@ class Ei {
|
|
|
4586
4597
|
for (let y = 0; y <= o.length - 1; y++) {
|
|
4587
4598
|
const b = o[y].length;
|
|
4588
4599
|
for (let E = 0; E <= b - 1; E++) {
|
|
4589
|
-
const
|
|
4590
|
-
|
|
4591
|
-
|
|
4600
|
+
const R = y + e, O = E + i, I = o[y][E], _ = this.ctx.database.getItemValueForRowIndexAndColIndex(
|
|
4601
|
+
R,
|
|
4602
|
+
O
|
|
4592
4603
|
);
|
|
4593
|
-
if (
|
|
4594
|
-
const { rowKey:
|
|
4595
|
-
this.ctx.database.getReadonly(
|
|
4596
|
-
rowKey:
|
|
4597
|
-
key:
|
|
4598
|
-
value:
|
|
4604
|
+
if (_) {
|
|
4605
|
+
const { rowKey: v, key: S } = _;
|
|
4606
|
+
this.ctx.database.getReadonly(v, S) || (s.add(v), w.push({
|
|
4607
|
+
rowKey: v,
|
|
4608
|
+
key: S,
|
|
4609
|
+
value: I,
|
|
4599
4610
|
row: {}
|
|
4600
4611
|
//内部有设置
|
|
4601
4612
|
}));
|
|
@@ -4615,9 +4626,9 @@ class Ei {
|
|
|
4615
4626
|
}
|
|
4616
4627
|
if (!w.length)
|
|
4617
4628
|
return;
|
|
4618
|
-
const { BEFORE_PASTE_DATA_METHOD:
|
|
4619
|
-
if (typeof
|
|
4620
|
-
const y =
|
|
4629
|
+
const { BEFORE_PASTE_DATA_METHOD: p } = this.ctx.config;
|
|
4630
|
+
if (typeof p == "function") {
|
|
4631
|
+
const y = p, b = w.map((E) => ({
|
|
4621
4632
|
rowKey: E.rowKey,
|
|
4622
4633
|
key: E.key,
|
|
4623
4634
|
value: E.value,
|
|
@@ -4720,19 +4731,19 @@ class Ei {
|
|
|
4720
4731
|
body: h,
|
|
4721
4732
|
scrollX: c,
|
|
4722
4733
|
scrollY: d,
|
|
4723
|
-
config: { SCROLLER_TRACK_SIZE: f, FOOTER_FIXED: x, FOOTER_POSITION: g, ENABLE_MERGE_CELL_LINK:
|
|
4734
|
+
config: { SCROLLER_TRACK_SIZE: f, FOOTER_FIXED: x, FOOTER_POSITION: g, ENABLE_MERGE_CELL_LINK: m }
|
|
4724
4735
|
} = this.ctx;
|
|
4725
4736
|
if (!i)
|
|
4726
4737
|
return;
|
|
4727
|
-
|
|
4728
|
-
const { drawX: u, drawY: w, width:
|
|
4729
|
-
let
|
|
4730
|
-
|
|
4731
|
-
let
|
|
4732
|
-
x && (g === "top" ?
|
|
4733
|
-
const
|
|
4734
|
-
let
|
|
4735
|
-
E > 0 && !y ?
|
|
4738
|
+
m && this.ctx.onlyMergeCell && i.updateSpanInfo();
|
|
4739
|
+
const { drawX: u, drawY: w, width: p, height: C, fixed: y } = i, b = r - u + 1, E = i.drawX + p - (e - s) + 1;
|
|
4740
|
+
let R = o.height - w, O = C;
|
|
4741
|
+
O > h.visibleHeight && (O = h.visibleHeight);
|
|
4742
|
+
let I = 0;
|
|
4743
|
+
x && (g === "top" ? R = o.height + n.height - w : I = n.visibleHeight);
|
|
4744
|
+
const _ = w + O - (t - I - f);
|
|
4745
|
+
let v = c, S = d;
|
|
4746
|
+
E > 0 && !y ? v = Math.floor(c + E) : b > 0 && !y && (v = Math.floor(c - b)), R > 0 ? S = Math.floor(d - R) : _ > 0 && (S = Math.floor(d + _)), (Math.abs(c - v) > 2 || Math.abs(d - S) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(v, S), this.ctx.emit("adjustBoundaryPosition", i));
|
|
4736
4747
|
}
|
|
4737
4748
|
destroy() {
|
|
4738
4749
|
this.timerX && (clearTimeout(this.timerX), this.timerX = 0), this.timerY && (clearTimeout(this.timerY), this.timerY = 0);
|
|
@@ -4796,21 +4807,21 @@ class Ci {
|
|
|
4796
4807
|
SELECTOR_AREA_MAX_Y: f,
|
|
4797
4808
|
SELECTOR_AREA_MAX_X_OFFSET: x,
|
|
4798
4809
|
SELECTOR_AREA_MAX_Y_OFFSET: g
|
|
4799
|
-
} = this.ctx.config,
|
|
4810
|
+
} = this.ctx.config, m = h, u = c || this.ctx.maxColIndex - x, w = d, p = f || this.ctx.maxRowIndex - g;
|
|
4800
4811
|
let [C, y] = o, [b, E] = n;
|
|
4801
|
-
if (C <
|
|
4812
|
+
if (C < m || b < w)
|
|
4802
4813
|
return;
|
|
4803
|
-
o = [Math.max(
|
|
4804
|
-
const { BEFORE_SET_AUTOFILL_METHOD:
|
|
4805
|
-
if (typeof
|
|
4806
|
-
const
|
|
4814
|
+
o = [Math.max(m, C), Math.min(u, y)], n = [Math.max(w, b), Math.min(p, E)];
|
|
4815
|
+
const { BEFORE_SET_AUTOFILL_METHOD: R } = this.ctx.config;
|
|
4816
|
+
if (typeof R == "function") {
|
|
4817
|
+
const I = R({
|
|
4807
4818
|
focusCell: this.ctx.focusCell,
|
|
4808
4819
|
xArr: o,
|
|
4809
4820
|
yArr: n
|
|
4810
4821
|
});
|
|
4811
|
-
if (!
|
|
4822
|
+
if (!I)
|
|
4812
4823
|
return;
|
|
4813
|
-
o =
|
|
4824
|
+
o = I.xArr, n = I.yArr;
|
|
4814
4825
|
}
|
|
4815
4826
|
this.ctx.autofill.xArr = o, this.ctx.autofill.yArr = n, this.ctx.emit("setAutofill", this.ctx.autofill), this.ctx.emit("draw");
|
|
4816
4827
|
}
|
|
@@ -4821,8 +4832,8 @@ class Ci {
|
|
|
4821
4832
|
async autofillData() {
|
|
4822
4833
|
const t = /* @__PURE__ */ new Set(), e = this.ctx.getSelectedData(), i = /* @__PURE__ */ new Map();
|
|
4823
4834
|
for (let g = 0; g <= e.yArr[1] - e.yArr[0]; g++)
|
|
4824
|
-
for (let
|
|
4825
|
-
const u = g + e.yArr[0], w =
|
|
4835
|
+
for (let m = 0; m <= e.xArr[1] - e.xArr[0]; m++) {
|
|
4836
|
+
const u = g + e.yArr[0], w = m + e.xArr[0];
|
|
4826
4837
|
i.set(`${u}-${w}`, !0);
|
|
4827
4838
|
}
|
|
4828
4839
|
const { value: s } = e, r = s[0].length, o = s.length, n = this.ctx.autofill.xArr, h = this.ctx.autofill.yArr, c = r === 1 && o === 1;
|
|
@@ -4836,14 +4847,14 @@ class Ci {
|
|
|
4836
4847
|
}
|
|
4837
4848
|
let d = [];
|
|
4838
4849
|
for (let g = 0; g <= h[1] - h[0]; g++)
|
|
4839
|
-
for (let
|
|
4840
|
-
const u =
|
|
4850
|
+
for (let m = 0; m <= n[1] - n[0]; m++) {
|
|
4851
|
+
const u = m + n[0], w = g + h[0], p = s[g % o][m % r], C = this.ctx.database.getItemValueForRowIndexAndColIndex(w, u), y = `${w}-${u}`;
|
|
4841
4852
|
if (C && !i.has(y)) {
|
|
4842
4853
|
const { rowKey: b, key: E } = C;
|
|
4843
4854
|
this.ctx.database.getReadonly(b, E) || (t.add(b), d.push({
|
|
4844
4855
|
rowKey: b,
|
|
4845
4856
|
key: E,
|
|
4846
|
-
value:
|
|
4857
|
+
value: p,
|
|
4847
4858
|
row: {}
|
|
4848
4859
|
}));
|
|
4849
4860
|
}
|
|
@@ -4853,14 +4864,14 @@ class Ci {
|
|
|
4853
4864
|
this.ctx.selector.xArr = this.ctx.autofill.xArr, this.ctx.selector.yArr = this.ctx.autofill.yArr;
|
|
4854
4865
|
const { BEFORE_AUTOFILL_DATA_METHOD: f } = this.ctx.config;
|
|
4855
4866
|
if (typeof f == "function") {
|
|
4856
|
-
const g = f,
|
|
4867
|
+
const g = f, m = d.map((u) => ({
|
|
4857
4868
|
rowKey: u.rowKey,
|
|
4858
4869
|
key: u.key,
|
|
4859
4870
|
value: u.value,
|
|
4860
4871
|
oldValue: this.ctx.database.getItemValue(u.rowKey, u.key),
|
|
4861
4872
|
row: this.ctx.database.getRowDataItemForRowKey(u.rowKey)
|
|
4862
4873
|
}));
|
|
4863
|
-
if (d = await g(
|
|
4874
|
+
if (d = await g(m, n, h), d && !d.length)
|
|
4864
4875
|
return;
|
|
4865
4876
|
}
|
|
4866
4877
|
this.ctx.batchSetItemValueByEditor(d, !0);
|
|
@@ -4893,7 +4904,7 @@ const rt = Math.min, U = Math.max, ft = Math.round, z = (a) => ({
|
|
|
4893
4904
|
start: "end",
|
|
4894
4905
|
end: "start"
|
|
4895
4906
|
};
|
|
4896
|
-
function
|
|
4907
|
+
function It(a, t, e) {
|
|
4897
4908
|
return U(a, rt(t, e));
|
|
4898
4909
|
}
|
|
4899
4910
|
function at(a, t) {
|
|
@@ -4923,14 +4934,14 @@ function Ri(a, t, e) {
|
|
|
4923
4934
|
let o = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
|
|
4924
4935
|
return t.reference[r] > t.floating[r] && (o = xt(o)), [o, xt(o)];
|
|
4925
4936
|
}
|
|
4926
|
-
function
|
|
4937
|
+
function _i(a) {
|
|
4927
4938
|
const t = xt(a);
|
|
4928
4939
|
return [Ot(a), t, Ot(t)];
|
|
4929
4940
|
}
|
|
4930
4941
|
function Ot(a) {
|
|
4931
4942
|
return a.replace(/start|end/g, (t) => vi[t]);
|
|
4932
4943
|
}
|
|
4933
|
-
function
|
|
4944
|
+
function Ii(a, t, e) {
|
|
4934
4945
|
const i = ["left", "right"], s = ["right", "left"], r = ["top", "bottom"], o = ["bottom", "top"];
|
|
4935
4946
|
switch (a) {
|
|
4936
4947
|
case "top":
|
|
@@ -4945,7 +4956,7 @@ function _i(a, t, e) {
|
|
|
4945
4956
|
}
|
|
4946
4957
|
function Oi(a, t, e, i) {
|
|
4947
4958
|
const s = lt(a);
|
|
4948
|
-
let r =
|
|
4959
|
+
let r = Ii(G(a), e === "start", i);
|
|
4949
4960
|
return s && (r = r.map((o) => o + "-" + s), t && (r = r.concat(r.map(Ot)))), r;
|
|
4950
4961
|
}
|
|
4951
4962
|
function xt(a) {
|
|
@@ -5048,17 +5059,17 @@ const Si = async (a, t, e) => {
|
|
|
5048
5059
|
}), {
|
|
5049
5060
|
x: d,
|
|
5050
5061
|
y: f
|
|
5051
|
-
} = $t(c, i, h), x = i, g = {},
|
|
5062
|
+
} = $t(c, i, h), x = i, g = {}, m = 0;
|
|
5052
5063
|
for (let u = 0; u < n.length; u++) {
|
|
5053
5064
|
const {
|
|
5054
5065
|
name: w,
|
|
5055
|
-
fn:
|
|
5066
|
+
fn: p
|
|
5056
5067
|
} = n[u], {
|
|
5057
5068
|
x: C,
|
|
5058
5069
|
y,
|
|
5059
5070
|
data: b,
|
|
5060
5071
|
reset: E
|
|
5061
|
-
} = await
|
|
5072
|
+
} = await p({
|
|
5062
5073
|
x: d,
|
|
5063
5074
|
y: f,
|
|
5064
5075
|
initialPlacement: i,
|
|
@@ -5078,7 +5089,7 @@ const Si = async (a, t, e) => {
|
|
|
5078
5089
|
...g[w],
|
|
5079
5090
|
...b
|
|
5080
5091
|
}
|
|
5081
|
-
}, E &&
|
|
5092
|
+
}, E && m <= 50 && (m++, typeof E == "object" && (E.placement && (x = E.placement), E.rects && (c = E.rects === !0 ? await o.getElementRects({
|
|
5082
5093
|
reference: a,
|
|
5083
5094
|
floating: t,
|
|
5084
5095
|
strategy: s
|
|
@@ -5111,7 +5122,7 @@ async function he(a, t) {
|
|
|
5111
5122
|
elementContext: f = "floating",
|
|
5112
5123
|
altBoundary: x = !1,
|
|
5113
5124
|
padding: g = 0
|
|
5114
|
-
} = at(t, a),
|
|
5125
|
+
} = at(t, a), m = le(g), w = n[x ? f === "floating" ? "reference" : "floating" : f], p = ut(await r.getClippingRect({
|
|
5115
5126
|
element: (e = await (r.isElement == null ? void 0 : r.isElement(w))) == null || e ? w : w.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(n.floating)),
|
|
5116
5127
|
boundary: c,
|
|
5117
5128
|
rootBoundary: d,
|
|
@@ -5134,13 +5145,13 @@ async function he(a, t) {
|
|
|
5134
5145
|
strategy: h
|
|
5135
5146
|
}) : C);
|
|
5136
5147
|
return {
|
|
5137
|
-
top: (
|
|
5138
|
-
bottom: (E.bottom -
|
|
5139
|
-
left: (
|
|
5140
|
-
right: (E.right -
|
|
5148
|
+
top: (p.top - E.top + m.top) / b.y,
|
|
5149
|
+
bottom: (E.bottom - p.bottom + m.bottom) / b.y,
|
|
5150
|
+
left: (p.left - E.left + m.left) / b.x,
|
|
5151
|
+
right: (E.right - p.right + m.right) / b.x
|
|
5141
5152
|
};
|
|
5142
5153
|
}
|
|
5143
|
-
const
|
|
5154
|
+
const Ti = (a) => ({
|
|
5144
5155
|
name: "arrow",
|
|
5145
5156
|
options: a,
|
|
5146
5157
|
async fn(t) {
|
|
@@ -5161,15 +5172,15 @@ const Ai = (a) => ({
|
|
|
5161
5172
|
const f = le(d), x = {
|
|
5162
5173
|
x: e,
|
|
5163
5174
|
y: i
|
|
5164
|
-
}, g = Ht(s),
|
|
5165
|
-
let
|
|
5166
|
-
(!
|
|
5167
|
-
const
|
|
5175
|
+
}, g = Ht(s), m = Mt(g), u = await o.getDimensions(c), w = g === "y", p = w ? "top" : "left", C = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", b = r.reference[m] + r.reference[g] - x[g] - r.floating[m], E = x[g] - r.reference[g], R = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c));
|
|
5176
|
+
let O = R ? R[y] : 0;
|
|
5177
|
+
(!O || !await (o.isElement == null ? void 0 : o.isElement(R))) && (O = n.floating[y] || r.floating[m]);
|
|
5178
|
+
const I = b / 2 - E / 2, _ = O / 2 - u[m] / 2 - 1, v = rt(f[p], _), S = rt(f[C], _), T = v, M = O - u[m] - S, A = O / 2 - u[m] / 2 + I, B = It(T, A, M), Y = !h.arrow && lt(s) != null && A !== B && r.reference[m] / 2 - (A < T ? v : S) - u[m] / 2 < 0, k = Y ? A < T ? A - T : A - M : 0;
|
|
5168
5179
|
return {
|
|
5169
5180
|
[g]: x[g] + k,
|
|
5170
5181
|
data: {
|
|
5171
5182
|
[g]: B,
|
|
5172
|
-
centerOffset:
|
|
5183
|
+
centerOffset: A - B - k,
|
|
5173
5184
|
...Y && {
|
|
5174
5185
|
alignmentOffset: k
|
|
5175
5186
|
}
|
|
@@ -5177,7 +5188,7 @@ const Ai = (a) => ({
|
|
|
5177
5188
|
reset: Y
|
|
5178
5189
|
};
|
|
5179
5190
|
}
|
|
5180
|
-
}),
|
|
5191
|
+
}), Ai = function(a) {
|
|
5181
5192
|
return a === void 0 && (a = {}), {
|
|
5182
5193
|
name: "flip",
|
|
5183
5194
|
options: a,
|
|
@@ -5195,43 +5206,43 @@ const Ai = (a) => ({
|
|
|
5195
5206
|
crossAxis: f = !0,
|
|
5196
5207
|
fallbackPlacements: x,
|
|
5197
5208
|
fallbackStrategy: g = "bestFit",
|
|
5198
|
-
fallbackAxisSideDirection:
|
|
5209
|
+
fallbackAxisSideDirection: m = "none",
|
|
5199
5210
|
flipAlignment: u = !0,
|
|
5200
5211
|
...w
|
|
5201
5212
|
} = at(a, t);
|
|
5202
5213
|
if ((e = r.arrow) != null && e.alignmentOffset)
|
|
5203
5214
|
return {};
|
|
5204
|
-
const
|
|
5205
|
-
!x &&
|
|
5206
|
-
const
|
|
5207
|
-
let
|
|
5208
|
-
if (d &&
|
|
5209
|
-
const
|
|
5210
|
-
|
|
5215
|
+
const p = G(s), C = J(n), y = G(n) === n, b = await (h.isRTL == null ? void 0 : h.isRTL(c.floating)), E = x || (y || !u ? [xt(n)] : _i(n)), R = m !== "none";
|
|
5216
|
+
!x && R && E.push(...Oi(n, u, m, b));
|
|
5217
|
+
const O = [n, ...E], I = await he(t, w), _ = [];
|
|
5218
|
+
let v = ((i = r.flip) == null ? void 0 : i.overflows) || [];
|
|
5219
|
+
if (d && _.push(I[p]), f) {
|
|
5220
|
+
const A = Ri(s, o, b);
|
|
5221
|
+
_.push(I[A[0]], I[A[1]]);
|
|
5211
5222
|
}
|
|
5212
|
-
if (
|
|
5223
|
+
if (v = [...v, {
|
|
5213
5224
|
placement: s,
|
|
5214
|
-
overflows:
|
|
5215
|
-
}], !
|
|
5216
|
-
var
|
|
5217
|
-
const
|
|
5225
|
+
overflows: _
|
|
5226
|
+
}], !_.every((A) => A <= 0)) {
|
|
5227
|
+
var S, T;
|
|
5228
|
+
const A = (((S = r.flip) == null ? void 0 : S.index) || 0) + 1, B = O[A];
|
|
5218
5229
|
if (B)
|
|
5219
5230
|
return {
|
|
5220
5231
|
data: {
|
|
5221
|
-
index:
|
|
5222
|
-
overflows:
|
|
5232
|
+
index: A,
|
|
5233
|
+
overflows: v
|
|
5223
5234
|
},
|
|
5224
5235
|
reset: {
|
|
5225
5236
|
placement: B
|
|
5226
5237
|
}
|
|
5227
5238
|
};
|
|
5228
|
-
let Y = (
|
|
5239
|
+
let Y = (T = v.filter((k) => k.overflows[0] <= 0).sort((k, W) => k.overflows[1] - W.overflows[1])[0]) == null ? void 0 : T.placement;
|
|
5229
5240
|
if (!Y)
|
|
5230
5241
|
switch (g) {
|
|
5231
5242
|
case "bestFit": {
|
|
5232
5243
|
var M;
|
|
5233
|
-
const k = (M =
|
|
5234
|
-
if (
|
|
5244
|
+
const k = (M = v.filter((W) => {
|
|
5245
|
+
if (R) {
|
|
5235
5246
|
const P = J(W.placement);
|
|
5236
5247
|
return P === C || // Create a bias to the `y` side axis due to horizontal
|
|
5237
5248
|
// reading directions favoring greater width.
|
|
@@ -5266,7 +5277,7 @@ async function Mi(a, t) {
|
|
|
5266
5277
|
let {
|
|
5267
5278
|
mainAxis: x,
|
|
5268
5279
|
crossAxis: g,
|
|
5269
|
-
alignmentAxis:
|
|
5280
|
+
alignmentAxis: m
|
|
5270
5281
|
} = typeof f == "number" ? {
|
|
5271
5282
|
mainAxis: f,
|
|
5272
5283
|
crossAxis: 0,
|
|
@@ -5276,7 +5287,7 @@ async function Mi(a, t) {
|
|
|
5276
5287
|
crossAxis: f.crossAxis || 0,
|
|
5277
5288
|
alignmentAxis: f.alignmentAxis
|
|
5278
5289
|
};
|
|
5279
|
-
return n && typeof
|
|
5290
|
+
return n && typeof m == "number" && (g = n === "end" ? m * -1 : m), h ? {
|
|
5280
5291
|
x: g * d,
|
|
5281
5292
|
y: x * c
|
|
5282
5293
|
} : {
|
|
@@ -5321,11 +5332,11 @@ const Hi = function(a) {
|
|
|
5321
5332
|
limiter: n = {
|
|
5322
5333
|
fn: (w) => {
|
|
5323
5334
|
let {
|
|
5324
|
-
x:
|
|
5335
|
+
x: p,
|
|
5325
5336
|
y: C
|
|
5326
5337
|
} = w;
|
|
5327
5338
|
return {
|
|
5328
|
-
x:
|
|
5339
|
+
x: p,
|
|
5329
5340
|
y: C
|
|
5330
5341
|
};
|
|
5331
5342
|
}
|
|
@@ -5335,19 +5346,19 @@ const Hi = function(a) {
|
|
|
5335
5346
|
x: e,
|
|
5336
5347
|
y: i
|
|
5337
5348
|
}, d = await he(t, h), f = J(G(s)), x = ae(f);
|
|
5338
|
-
let g = c[x],
|
|
5349
|
+
let g = c[x], m = c[f];
|
|
5339
5350
|
if (r) {
|
|
5340
|
-
const w = x === "y" ? "top" : "left",
|
|
5341
|
-
g =
|
|
5351
|
+
const w = x === "y" ? "top" : "left", p = x === "y" ? "bottom" : "right", C = g + d[w], y = g - d[p];
|
|
5352
|
+
g = It(C, g, y);
|
|
5342
5353
|
}
|
|
5343
5354
|
if (o) {
|
|
5344
|
-
const w = f === "y" ? "top" : "left",
|
|
5345
|
-
|
|
5355
|
+
const w = f === "y" ? "top" : "left", p = f === "y" ? "bottom" : "right", C = m + d[w], y = m - d[p];
|
|
5356
|
+
m = It(C, m, y);
|
|
5346
5357
|
}
|
|
5347
5358
|
const u = n.fn({
|
|
5348
5359
|
...t,
|
|
5349
5360
|
[x]: g,
|
|
5350
|
-
[f]:
|
|
5361
|
+
[f]: m
|
|
5351
5362
|
});
|
|
5352
5363
|
return {
|
|
5353
5364
|
...u,
|
|
@@ -5369,7 +5380,7 @@ function gt() {
|
|
|
5369
5380
|
function tt(a) {
|
|
5370
5381
|
return ce(a) ? (a.nodeName || "").toLowerCase() : "#document";
|
|
5371
5382
|
}
|
|
5372
|
-
function
|
|
5383
|
+
function X(a) {
|
|
5373
5384
|
var t;
|
|
5374
5385
|
return (a == null || (t = a.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
5375
5386
|
}
|
|
@@ -5378,16 +5389,16 @@ function V(a) {
|
|
|
5378
5389
|
return (t = (ce(a) ? a.ownerDocument : a.document) || window.document) == null ? void 0 : t.documentElement;
|
|
5379
5390
|
}
|
|
5380
5391
|
function ce(a) {
|
|
5381
|
-
return gt() ? a instanceof Node || a instanceof
|
|
5392
|
+
return gt() ? a instanceof Node || a instanceof X(a).Node : !1;
|
|
5382
5393
|
}
|
|
5383
|
-
function
|
|
5384
|
-
return gt() ? a instanceof Element || a instanceof
|
|
5394
|
+
function N(a) {
|
|
5395
|
+
return gt() ? a instanceof Element || a instanceof X(a).Element : !1;
|
|
5385
5396
|
}
|
|
5386
5397
|
function K(a) {
|
|
5387
|
-
return gt() ? a instanceof HTMLElement || a instanceof
|
|
5398
|
+
return gt() ? a instanceof HTMLElement || a instanceof X(a).HTMLElement : !1;
|
|
5388
5399
|
}
|
|
5389
5400
|
function qt(a) {
|
|
5390
|
-
return !gt() || typeof ShadowRoot > "u" ? !1 : a instanceof ShadowRoot || a instanceof
|
|
5401
|
+
return !gt() || typeof ShadowRoot > "u" ? !1 : a instanceof ShadowRoot || a instanceof X(a).ShadowRoot;
|
|
5391
5402
|
}
|
|
5392
5403
|
function ht(a) {
|
|
5393
5404
|
const {
|
|
@@ -5395,10 +5406,10 @@ function ht(a) {
|
|
|
5395
5406
|
overflowX: e,
|
|
5396
5407
|
overflowY: i,
|
|
5397
5408
|
display: s
|
|
5398
|
-
} =
|
|
5409
|
+
} = F(a);
|
|
5399
5410
|
return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !["inline", "contents"].includes(s);
|
|
5400
5411
|
}
|
|
5401
|
-
function
|
|
5412
|
+
function Xi(a) {
|
|
5402
5413
|
return ["table", "td", "th"].includes(tt(a));
|
|
5403
5414
|
}
|
|
5404
5415
|
function wt(a) {
|
|
@@ -5411,10 +5422,10 @@ function wt(a) {
|
|
|
5411
5422
|
});
|
|
5412
5423
|
}
|
|
5413
5424
|
function Dt(a) {
|
|
5414
|
-
const t =
|
|
5425
|
+
const t = Xt(), e = N(a) ? F(a) : a;
|
|
5415
5426
|
return e.transform !== "none" || e.perspective !== "none" || (e.containerType ? e.containerType !== "normal" : !1) || !t && (e.backdropFilter ? e.backdropFilter !== "none" : !1) || !t && (e.filter ? e.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((i) => (e.willChange || "").includes(i)) || ["paint", "layout", "strict", "content"].some((i) => (e.contain || "").includes(i));
|
|
5416
5427
|
}
|
|
5417
|
-
function
|
|
5428
|
+
function Ni(a) {
|
|
5418
5429
|
let t = $(a);
|
|
5419
5430
|
for (; K(t) && !Q(t); ) {
|
|
5420
5431
|
if (Dt(t))
|
|
@@ -5425,17 +5436,17 @@ function Fi(a) {
|
|
|
5425
5436
|
}
|
|
5426
5437
|
return null;
|
|
5427
5438
|
}
|
|
5428
|
-
function
|
|
5439
|
+
function Xt() {
|
|
5429
5440
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
5430
5441
|
}
|
|
5431
5442
|
function Q(a) {
|
|
5432
5443
|
return ["html", "body", "#document"].includes(tt(a));
|
|
5433
5444
|
}
|
|
5434
|
-
function
|
|
5435
|
-
return
|
|
5445
|
+
function F(a) {
|
|
5446
|
+
return X(a).getComputedStyle(a);
|
|
5436
5447
|
}
|
|
5437
5448
|
function pt(a) {
|
|
5438
|
-
return
|
|
5449
|
+
return N(a) ? {
|
|
5439
5450
|
scrollLeft: a.scrollLeft,
|
|
5440
5451
|
scrollTop: a.scrollTop
|
|
5441
5452
|
} : {
|
|
@@ -5462,7 +5473,7 @@ function de(a) {
|
|
|
5462
5473
|
function Lt(a, t, e) {
|
|
5463
5474
|
var i;
|
|
5464
5475
|
t === void 0 && (t = []), e === void 0 && (e = !0);
|
|
5465
|
-
const s = de(a), r = s === ((i = a.ownerDocument) == null ? void 0 : i.body), o =
|
|
5476
|
+
const s = de(a), r = s === ((i = a.ownerDocument) == null ? void 0 : i.body), o = X(s);
|
|
5466
5477
|
if (r) {
|
|
5467
5478
|
const n = St(o);
|
|
5468
5479
|
return t.concat(o, o.visualViewport || [], ht(s) ? s : [], n && e ? Lt(n) : []);
|
|
@@ -5473,7 +5484,7 @@ function St(a) {
|
|
|
5473
5484
|
return a.parent && Object.getPrototypeOf(a.parent) ? a.frameElement : null;
|
|
5474
5485
|
}
|
|
5475
5486
|
function fe(a) {
|
|
5476
|
-
const t =
|
|
5487
|
+
const t = F(a);
|
|
5477
5488
|
let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
|
|
5478
5489
|
const s = K(a), r = s ? a.offsetWidth : e, o = s ? a.offsetHeight : i, n = ft(e) !== r || ft(i) !== o;
|
|
5479
5490
|
return n && (e = r, i = o), {
|
|
@@ -5483,7 +5494,7 @@ function fe(a) {
|
|
|
5483
5494
|
};
|
|
5484
5495
|
}
|
|
5485
5496
|
function xe(a) {
|
|
5486
|
-
return
|
|
5497
|
+
return N(a) ? a : a.contextElement;
|
|
5487
5498
|
}
|
|
5488
5499
|
function Z(a) {
|
|
5489
5500
|
const t = xe(a);
|
|
@@ -5500,30 +5511,30 @@ function Z(a) {
|
|
|
5500
5511
|
y: n
|
|
5501
5512
|
};
|
|
5502
5513
|
}
|
|
5503
|
-
const
|
|
5514
|
+
const Fi = /* @__PURE__ */ z(0);
|
|
5504
5515
|
function ue(a) {
|
|
5505
|
-
const t =
|
|
5506
|
-
return !
|
|
5516
|
+
const t = X(a);
|
|
5517
|
+
return !Xt() || !t.visualViewport ? Fi : {
|
|
5507
5518
|
x: t.visualViewport.offsetLeft,
|
|
5508
5519
|
y: t.visualViewport.offsetTop
|
|
5509
5520
|
};
|
|
5510
5521
|
}
|
|
5511
5522
|
function Bi(a, t, e) {
|
|
5512
|
-
return t === void 0 && (t = !1), !e || t && e !==
|
|
5523
|
+
return t === void 0 && (t = !1), !e || t && e !== X(a) ? !1 : t;
|
|
5513
5524
|
}
|
|
5514
5525
|
function ot(a, t, e, i) {
|
|
5515
5526
|
t === void 0 && (t = !1), e === void 0 && (e = !1);
|
|
5516
5527
|
const s = a.getBoundingClientRect(), r = xe(a);
|
|
5517
5528
|
let o = z(1);
|
|
5518
|
-
t && (i ?
|
|
5529
|
+
t && (i ? N(i) && (o = Z(i)) : o = Z(a));
|
|
5519
5530
|
const n = Bi(r, e, i) ? ue(r) : z(0);
|
|
5520
5531
|
let h = (s.left + n.x) / o.x, c = (s.top + n.y) / o.y, d = s.width / o.x, f = s.height / o.y;
|
|
5521
5532
|
if (r) {
|
|
5522
|
-
const x =
|
|
5523
|
-
let
|
|
5524
|
-
for (; u && i && g !==
|
|
5525
|
-
const w = Z(u),
|
|
5526
|
-
h *= w.x, c *= w.y, d *= w.x, f *= w.y, h += y, c += b,
|
|
5533
|
+
const x = X(r), g = i && N(i) ? X(i) : i;
|
|
5534
|
+
let m = x, u = St(m);
|
|
5535
|
+
for (; u && i && g !== m; ) {
|
|
5536
|
+
const w = Z(u), p = u.getBoundingClientRect(), C = F(u), y = p.left + (u.clientLeft + parseFloat(C.paddingLeft)) * w.x, b = p.top + (u.clientTop + parseFloat(C.paddingTop)) * w.y;
|
|
5537
|
+
h *= w.x, c *= w.y, d *= w.x, f *= w.y, h += y, c += b, m = X(u), u = St(m);
|
|
5527
5538
|
}
|
|
5528
5539
|
}
|
|
5529
5540
|
return ut({
|
|
@@ -5562,15 +5573,15 @@ function ki(a) {
|
|
|
5562
5573
|
function Ki(a) {
|
|
5563
5574
|
return Array.from(a.getClientRects());
|
|
5564
5575
|
}
|
|
5565
|
-
function
|
|
5576
|
+
function Tt(a, t) {
|
|
5566
5577
|
const e = pt(a).scrollLeft;
|
|
5567
5578
|
return t ? t.left + e : ot(V(a)).left + e;
|
|
5568
5579
|
}
|
|
5569
5580
|
function Yi(a) {
|
|
5570
5581
|
const t = V(a), e = pt(a), i = a.ownerDocument.body, s = U(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), r = U(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
|
|
5571
|
-
let o = -e.scrollLeft +
|
|
5582
|
+
let o = -e.scrollLeft + Tt(a);
|
|
5572
5583
|
const n = -e.scrollTop;
|
|
5573
|
-
return
|
|
5584
|
+
return F(i).direction === "rtl" && (o += U(t.clientWidth, i.clientWidth) - s), {
|
|
5574
5585
|
width: s,
|
|
5575
5586
|
height: r,
|
|
5576
5587
|
x: o,
|
|
@@ -5578,11 +5589,11 @@ function Yi(a) {
|
|
|
5578
5589
|
};
|
|
5579
5590
|
}
|
|
5580
5591
|
function Vi(a, t) {
|
|
5581
|
-
const e =
|
|
5592
|
+
const e = X(a), i = V(a), s = e.visualViewport;
|
|
5582
5593
|
let r = i.clientWidth, o = i.clientHeight, n = 0, h = 0;
|
|
5583
5594
|
if (s) {
|
|
5584
5595
|
r = s.width, o = s.height;
|
|
5585
|
-
const c =
|
|
5596
|
+
const c = Xt();
|
|
5586
5597
|
(!c || c && t === "fixed") && (n = s.offsetLeft, h = s.offsetTop);
|
|
5587
5598
|
}
|
|
5588
5599
|
return {
|
|
@@ -5607,7 +5618,7 @@ function Gt(a, t, e) {
|
|
|
5607
5618
|
i = Vi(a, e);
|
|
5608
5619
|
else if (t === "document")
|
|
5609
5620
|
i = Yi(V(a));
|
|
5610
|
-
else if (
|
|
5621
|
+
else if (N(t))
|
|
5611
5622
|
i = Wi(t, e);
|
|
5612
5623
|
else {
|
|
5613
5624
|
const s = ue(a);
|
|
@@ -5621,17 +5632,17 @@ function Gt(a, t, e) {
|
|
|
5621
5632
|
}
|
|
5622
5633
|
function ge(a, t) {
|
|
5623
5634
|
const e = $(a);
|
|
5624
|
-
return e === t || !
|
|
5635
|
+
return e === t || !N(e) || Q(e) ? !1 : F(e).position === "fixed" || ge(e, t);
|
|
5625
5636
|
}
|
|
5626
5637
|
function Pi(a, t) {
|
|
5627
5638
|
const e = t.get(a);
|
|
5628
5639
|
if (e)
|
|
5629
5640
|
return e;
|
|
5630
|
-
let i = Lt(a, [], !1).filter((n) =>
|
|
5631
|
-
const r =
|
|
5641
|
+
let i = Lt(a, [], !1).filter((n) => N(n) && tt(n) !== "body"), s = null;
|
|
5642
|
+
const r = F(a).position === "fixed";
|
|
5632
5643
|
let o = r ? $(a) : a;
|
|
5633
|
-
for (;
|
|
5634
|
-
const n =
|
|
5644
|
+
for (; N(o) && !Q(o); ) {
|
|
5645
|
+
const n = F(o), h = Dt(o);
|
|
5635
5646
|
!h && n.position === "fixed" && (s = null), (r ? !h && !s : !h && n.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ht(o) && !h && ge(a, o)) ? i = i.filter((d) => d !== o) : s = n, o = $(o);
|
|
5636
5647
|
}
|
|
5637
5648
|
return t.set(a, i), i;
|
|
@@ -5675,12 +5686,12 @@ function qi(a, t, e) {
|
|
|
5675
5686
|
if ((tt(t) !== "body" || ht(s)) && (n = pt(t)), i) {
|
|
5676
5687
|
const g = ot(t, !0, r, t);
|
|
5677
5688
|
h.x = g.x + t.clientLeft, h.y = g.y + t.clientTop;
|
|
5678
|
-
} else s && (h.x =
|
|
5689
|
+
} else s && (h.x = Tt(s));
|
|
5679
5690
|
let c = 0, d = 0;
|
|
5680
5691
|
if (s && !i && !r) {
|
|
5681
5692
|
const g = s.getBoundingClientRect();
|
|
5682
5693
|
d = g.top + n.scrollTop, c = g.left + n.scrollLeft - // RTL <body> scrollbar.
|
|
5683
|
-
|
|
5694
|
+
Tt(s, g);
|
|
5684
5695
|
}
|
|
5685
5696
|
const f = o.left + n.scrollLeft - h.x - c, x = o.top + n.scrollTop - h.y - d;
|
|
5686
5697
|
return {
|
|
@@ -5691,10 +5702,10 @@ function qi(a, t, e) {
|
|
|
5691
5702
|
};
|
|
5692
5703
|
}
|
|
5693
5704
|
function yt(a) {
|
|
5694
|
-
return
|
|
5705
|
+
return F(a).position === "static";
|
|
5695
5706
|
}
|
|
5696
5707
|
function jt(a, t) {
|
|
5697
|
-
if (!K(a) ||
|
|
5708
|
+
if (!K(a) || F(a).position === "fixed")
|
|
5698
5709
|
return null;
|
|
5699
5710
|
if (t)
|
|
5700
5711
|
return t(a);
|
|
@@ -5702,22 +5713,22 @@ function jt(a, t) {
|
|
|
5702
5713
|
return V(a) === e && (e = e.ownerDocument.body), e;
|
|
5703
5714
|
}
|
|
5704
5715
|
function we(a, t) {
|
|
5705
|
-
const e =
|
|
5716
|
+
const e = X(a);
|
|
5706
5717
|
if (wt(a))
|
|
5707
5718
|
return e;
|
|
5708
5719
|
if (!K(a)) {
|
|
5709
5720
|
let s = $(a);
|
|
5710
5721
|
for (; s && !Q(s); ) {
|
|
5711
|
-
if (
|
|
5722
|
+
if (N(s) && !yt(s))
|
|
5712
5723
|
return s;
|
|
5713
5724
|
s = $(s);
|
|
5714
5725
|
}
|
|
5715
5726
|
return e;
|
|
5716
5727
|
}
|
|
5717
5728
|
let i = jt(a, t);
|
|
5718
|
-
for (; i &&
|
|
5729
|
+
for (; i && Xi(i) && yt(i); )
|
|
5719
5730
|
i = jt(i, t);
|
|
5720
|
-
return i && Q(i) && yt(i) && !Dt(i) ? e : i ||
|
|
5731
|
+
return i && Q(i) && yt(i) && !Dt(i) ? e : i || Ni(a) || e;
|
|
5721
5732
|
}
|
|
5722
5733
|
const Gi = async function(a) {
|
|
5723
5734
|
const t = this.getOffsetParent || we, e = this.getDimensions, i = await e(a.floating);
|
|
@@ -5732,7 +5743,7 @@ const Gi = async function(a) {
|
|
|
5732
5743
|
};
|
|
5733
5744
|
};
|
|
5734
5745
|
function ji(a) {
|
|
5735
|
-
return
|
|
5746
|
+
return F(a).direction === "rtl";
|
|
5736
5747
|
}
|
|
5737
5748
|
const Ui = {
|
|
5738
5749
|
convertOffsetParentRelativeRectToViewportRelativeRect: ki,
|
|
@@ -5743,9 +5754,9 @@ const Ui = {
|
|
|
5743
5754
|
getClientRects: Ki,
|
|
5744
5755
|
getDimensions: $i,
|
|
5745
5756
|
getScale: Z,
|
|
5746
|
-
isElement:
|
|
5757
|
+
isElement: N,
|
|
5747
5758
|
isRTL: ji
|
|
5748
|
-
}, pe = Hi, me = Di, ye =
|
|
5759
|
+
}, pe = Hi, me = Di, ye = Ai, Zi = Ti, Ee = (a, t, e) => {
|
|
5749
5760
|
const i = /* @__PURE__ */ new Map(), s = {
|
|
5750
5761
|
platform: Ui,
|
|
5751
5762
|
...e
|
|
@@ -6150,7 +6161,7 @@ class es {
|
|
|
6150
6161
|
height: `${o}px`
|
|
6151
6162
|
},
|
|
6152
6163
|
cells: h
|
|
6153
|
-
},
|
|
6164
|
+
}, m = {
|
|
6154
6165
|
key: "right",
|
|
6155
6166
|
style: {
|
|
6156
6167
|
position: "absolute",
|
|
@@ -6171,15 +6182,15 @@ class es {
|
|
|
6171
6182
|
width: `${r}px`,
|
|
6172
6183
|
height: `${o}px`
|
|
6173
6184
|
},
|
|
6174
|
-
views: [x, g,
|
|
6185
|
+
views: [x, g, m]
|
|
6175
6186
|
};
|
|
6176
6187
|
}
|
|
6177
6188
|
getBody() {
|
|
6178
6189
|
const t = [], e = [], i = [];
|
|
6179
6190
|
let s = this.ctx.body.renderRows;
|
|
6180
6191
|
this.ctx.config.FOOTER_FIXED || (s = s.concat(this.ctx.footer.renderRows)), s.forEach((w) => {
|
|
6181
|
-
w.cells.forEach((
|
|
6182
|
-
|
|
6192
|
+
w.cells.forEach((p) => {
|
|
6193
|
+
p.cellType === "footer" && (p.render = p.renderFooter), p.render && (p.fixed === "left" ? e.push(p) : p.fixed === "right" ? i.push(p) : t.push(p));
|
|
6183
6194
|
});
|
|
6184
6195
|
});
|
|
6185
6196
|
const {
|
|
@@ -6208,7 +6219,7 @@ class es {
|
|
|
6208
6219
|
height: `${d}px`
|
|
6209
6220
|
},
|
|
6210
6221
|
cells: t
|
|
6211
|
-
},
|
|
6222
|
+
}, m = {
|
|
6212
6223
|
key: "right",
|
|
6213
6224
|
style: {
|
|
6214
6225
|
position: "absolute",
|
|
@@ -6229,7 +6240,7 @@ class es {
|
|
|
6229
6240
|
width: `${c}px`,
|
|
6230
6241
|
height: `${d}px`
|
|
6231
6242
|
},
|
|
6232
|
-
views: [x, g,
|
|
6243
|
+
views: [x, g, m]
|
|
6233
6244
|
};
|
|
6234
6245
|
}
|
|
6235
6246
|
getFooter() {
|
|
@@ -6319,8 +6330,8 @@ class is {
|
|
|
6319
6330
|
Ee(x, this.contextMenuEl, {
|
|
6320
6331
|
placement: "right-start",
|
|
6321
6332
|
middleware: [pe(), me(), ye()]
|
|
6322
|
-
}).then(({ x: g, y:
|
|
6323
|
-
this.show(g,
|
|
6333
|
+
}).then(({ x: g, y: m }) => {
|
|
6334
|
+
this.show(g, m);
|
|
6324
6335
|
});
|
|
6325
6336
|
}), this.ctx.on("click", this.hide.bind(this)), this.ctx.on("onScroll", this.hide.bind(this)), this.ctx.on("resize", this.hide.bind(this));
|
|
6326
6337
|
}
|