e-virt-table 0.0.15 → 0.0.16
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 +4 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +309 -284
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +4 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/Autofill.js +3 -3
- package/dist/lib/Autofill.js.map +1 -1
- package/dist/lib/Config.d.ts +2 -0
- package/dist/lib/Config.js +12 -0
- package/dist/lib/Config.js.map +1 -1
- package/dist/lib/Selector.js +16 -10
- package/dist/lib/Selector.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -12,7 +12,7 @@ function $() {
|
|
|
12
12
|
return a;
|
|
13
13
|
}, $.apply(this, arguments);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function Ce(a, t) {
|
|
16
16
|
a.prototype = Object.create(t.prototype), a.prototype.constructor = a, st(a, t);
|
|
17
17
|
}
|
|
18
18
|
function Et(a) {
|
|
@@ -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 be() {
|
|
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,7 +36,7 @@ function Ce() {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
function dt(a, t, e) {
|
|
39
|
-
return
|
|
39
|
+
return be() ? dt = Reflect.construct.bind() : dt = function(s, o, r) {
|
|
40
40
|
var n = [null];
|
|
41
41
|
n.push.apply(n, o);
|
|
42
42
|
var l = Function.bind.apply(s, n), h = new l();
|
|
@@ -46,9 +46,9 @@ function dt(a, t, e) {
|
|
|
46
46
|
function ve(a) {
|
|
47
47
|
return Function.toString.call(a).indexOf("[native code]") !== -1;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Ct(a) {
|
|
50
50
|
var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
51
|
-
return
|
|
51
|
+
return Ct = function(i) {
|
|
52
52
|
if (i === null || !ve(i)) return i;
|
|
53
53
|
if (typeof i != "function")
|
|
54
54
|
throw new TypeError("Super expression must either be null or a function");
|
|
@@ -67,7 +67,7 @@ function bt(a) {
|
|
|
67
67
|
configurable: !0
|
|
68
68
|
}
|
|
69
69
|
}), st(s, i);
|
|
70
|
-
},
|
|
70
|
+
}, Ct(a);
|
|
71
71
|
}
|
|
72
72
|
var Re = /%[sdj%]/g, jt = function() {
|
|
73
73
|
};
|
|
@@ -76,7 +76,7 @@ typeof process < "u" && process.env && process.env.NODE_ENV !== "production" &&
|
|
|
76
76
|
return typeof i == "string";
|
|
77
77
|
}) && console.warn(t, e);
|
|
78
78
|
});
|
|
79
|
-
function
|
|
79
|
+
function bt(a) {
|
|
80
80
|
if (!a || !a.length) return null;
|
|
81
81
|
var t = {};
|
|
82
82
|
return a.forEach(function(e) {
|
|
@@ -116,13 +116,13 @@ function M(a) {
|
|
|
116
116
|
}
|
|
117
117
|
return a;
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function _e(a) {
|
|
120
120
|
return a === "string" || a === "url" || a === "hex" || a === "email" || a === "date" || a === "pattern";
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
return !!(a == null || t === "array" && Array.isArray(a) && !a.length ||
|
|
122
|
+
function _(a, t) {
|
|
123
|
+
return !!(a == null || t === "array" && Array.isArray(a) && !a.length || _e(t) && typeof a == "string" && !a);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function Ie(a, t, e) {
|
|
126
126
|
var i = [], s = 0, o = a.length;
|
|
127
127
|
function r(n) {
|
|
128
128
|
i.push.apply(i, n || []), s++, s === o && e(i);
|
|
@@ -131,7 +131,7 @@ function _e(a, t, e) {
|
|
|
131
131
|
t(n, r);
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function Ft(a, t, e) {
|
|
135
135
|
var i = 0, s = a.length;
|
|
136
136
|
function o(r) {
|
|
137
137
|
if (r && r.length) {
|
|
@@ -149,34 +149,34 @@ function Oe(a) {
|
|
|
149
149
|
t.push.apply(t, a[e] || []);
|
|
150
150
|
}), t;
|
|
151
151
|
}
|
|
152
|
-
var
|
|
153
|
-
|
|
152
|
+
var kt = /* @__PURE__ */ function(a) {
|
|
153
|
+
Ce(t, a);
|
|
154
154
|
function t(e, i) {
|
|
155
155
|
var s;
|
|
156
156
|
return s = a.call(this, "Async Validation Error") || this, s.errors = e, s.fields = i, s;
|
|
157
157
|
}
|
|
158
158
|
return t;
|
|
159
|
-
}(/* @__PURE__ */
|
|
159
|
+
}(/* @__PURE__ */ Ct(Error));
|
|
160
160
|
function Se(a, t, e, i, s) {
|
|
161
161
|
if (t.first) {
|
|
162
162
|
var o = new Promise(function(x, u) {
|
|
163
|
-
var
|
|
164
|
-
return i(
|
|
163
|
+
var p = function(y) {
|
|
164
|
+
return i(y), y.length ? u(new kt(y, bt(y))) : x(s);
|
|
165
165
|
}, g = Oe(a);
|
|
166
|
-
|
|
166
|
+
Ft(g, e, p);
|
|
167
167
|
});
|
|
168
168
|
return o.catch(function(x) {
|
|
169
169
|
return x;
|
|
170
170
|
}), o;
|
|
171
171
|
}
|
|
172
172
|
var r = t.firstFields === !0 ? Object.keys(a) : t.firstFields || [], n = Object.keys(a), l = n.length, h = 0, f = [], d = new Promise(function(x, u) {
|
|
173
|
-
var
|
|
173
|
+
var p = function(w) {
|
|
174
174
|
if (f.push.apply(f, w), h++, h === l)
|
|
175
|
-
return i(f), f.length ? u(new
|
|
175
|
+
return i(f), f.length ? u(new kt(f, bt(f))) : x(s);
|
|
176
176
|
};
|
|
177
177
|
n.length || (i(f), x(s)), n.forEach(function(g) {
|
|
178
178
|
var w = a[g];
|
|
179
|
-
r.indexOf(g) !== -1 ?
|
|
179
|
+
r.indexOf(g) !== -1 ? Ft(w, e, p) : Ie(w, e, p);
|
|
180
180
|
});
|
|
181
181
|
});
|
|
182
182
|
return d.catch(function(x) {
|
|
@@ -194,7 +194,7 @@ function Le(a, t) {
|
|
|
194
194
|
}
|
|
195
195
|
return e;
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function Nt(a, t) {
|
|
198
198
|
return function(e) {
|
|
199
199
|
var i;
|
|
200
200
|
return a.fullFields ? i = Le(t, a.fullFields) : i = t[e.field || a.fullField], Te(e) ? (e.field = e.field || a.fullField, e.fieldValue = i, e) : {
|
|
@@ -215,14 +215,14 @@ function Yt(a, t) {
|
|
|
215
215
|
return a;
|
|
216
216
|
}
|
|
217
217
|
var Ut = function(t, e, i, s, o, r) {
|
|
218
|
-
t.required && (!i.hasOwnProperty(t.field) ||
|
|
218
|
+
t.required && (!i.hasOwnProperty(t.field) || _(e, r || t.type)) && s.push(M(o.messages.required, t.fullField));
|
|
219
219
|
}, Ae = function(t, e, i, s, o) {
|
|
220
220
|
(/^\s+$/.test(e) || e === "") && s.push(M(o.messages.whitespace, t.fullField));
|
|
221
221
|
}, ht, Me = function() {
|
|
222
222
|
if (ht)
|
|
223
223
|
return ht;
|
|
224
|
-
var a = "[a-fA-F\\d:]", t = function(
|
|
225
|
-
return
|
|
224
|
+
var a = "[a-fA-F\\d:]", t = function(E) {
|
|
225
|
+
return E && E.includeBoundaries ? "(?:(?<=\\s|^)(?=" + a + ")|(?<=" + a + ")(?=\\s|$))" : "";
|
|
226
226
|
}, e = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", i = "[a-fA-F\\d]{1,4}", s = (`
|
|
227
227
|
(?:
|
|
228
228
|
(?:` + i + ":){7}(?:" + i + `|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
@@ -234,16 +234,16 @@ var Ut = function(t, e, i, s, o, r) {
|
|
|
234
234
|
(?:` + i + ":){1}(?:(?::" + i + "){0,4}:" + e + "|(?::" + i + `){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
|
235
235
|
(?::(?:(?::` + i + "){0,5}:" + e + "|(?::" + i + `){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
|
236
236
|
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
|
237
|
-
`).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), o = new RegExp("(?:^" + e + "$)|(?:^" + s + "$)"), r = new RegExp("^" + e + "$"), n = new RegExp("^" + s + "$"), l = function(
|
|
238
|
-
return
|
|
237
|
+
`).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), o = new RegExp("(?:^" + e + "$)|(?:^" + s + "$)"), r = new RegExp("^" + e + "$"), n = new RegExp("^" + s + "$"), l = function(E) {
|
|
238
|
+
return E && E.exact ? o : new RegExp("(?:" + t(E) + e + t(E) + ")|(?:" + t(E) + s + t(E) + ")", "g");
|
|
239
239
|
};
|
|
240
240
|
l.v4 = function(m) {
|
|
241
241
|
return m && m.exact ? r : new RegExp("" + t(m) + e + t(m), "g");
|
|
242
242
|
}, l.v6 = function(m) {
|
|
243
243
|
return m && m.exact ? n : new RegExp("" + t(m) + s + t(m), "g");
|
|
244
244
|
};
|
|
245
|
-
var h = "(?:(?:[a-z]+:)?//)", f = "(?:\\S+(?::\\S*)?@)?", d = l.v4().source, x = l.v6().source, u = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",
|
|
246
|
-
return ht = new RegExp("(?:^" +
|
|
245
|
+
var h = "(?:(?:[a-z]+:)?//)", f = "(?:\\S+(?::\\S*)?@)?", d = l.v4().source, x = l.v6().source, u = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", p = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", g = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", w = "(?::\\d{2,5})?", y = '(?:[/?#][^\\s"]*)?', C = "(?:" + h + "|www\\.)" + f + "(?:localhost|" + d + "|" + x + "|" + u + p + g + ")" + w + y;
|
|
246
|
+
return ht = new RegExp("(?:^" + C + "$)", "i"), ht;
|
|
247
247
|
}, Kt = {
|
|
248
248
|
// http://emailregex.com/
|
|
249
249
|
email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
|
|
@@ -300,13 +300,13 @@ var Ut = function(t, e, i, s, o, r) {
|
|
|
300
300
|
var r = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], n = t.type;
|
|
301
301
|
r.indexOf(n) > -1 ? et[n](e) || s.push(M(o.messages.types[n], t.fullField, t.type)) : n && typeof e !== t.type && s.push(M(o.messages.types[n], t.fullField, t.type));
|
|
302
302
|
}, De = function(t, e, i, s, o) {
|
|
303
|
-
var r = typeof t.len == "number", n = typeof t.min == "number", l = typeof t.max == "number", h = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, f = e, d = null, x = typeof e == "number", u = typeof e == "string",
|
|
304
|
-
if (x ? d = "number" : u ? d = "string" :
|
|
303
|
+
var r = typeof t.len == "number", n = typeof t.min == "number", l = typeof t.max == "number", h = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, f = e, d = null, x = typeof e == "number", u = typeof e == "string", p = Array.isArray(e);
|
|
304
|
+
if (x ? d = "number" : u ? d = "string" : p && (d = "array"), !d)
|
|
305
305
|
return !1;
|
|
306
|
-
|
|
306
|
+
p && (f = e.length), u && (f = e.replace(h, "_").length), r ? f !== t.len && s.push(M(o.messages[d].len, t.fullField, t.len)) : n && !l && f < t.min ? s.push(M(o.messages[d].min, t.fullField, t.min)) : l && !n && f > t.max ? s.push(M(o.messages[d].max, t.fullField, t.max)) : n && l && (f < t.min || f > t.max) && s.push(M(o.messages[d].range, t.fullField, t.min, t.max));
|
|
307
307
|
}, j = "enum", Xe = function(t, e, i, s, o) {
|
|
308
308
|
t[j] = Array.isArray(t[j]) ? t[j] : [], t[j].indexOf(e) === -1 && s.push(M(o.messages[j], t.fullField, t[j].join(", ")));
|
|
309
|
-
},
|
|
309
|
+
}, Fe = function(t, e, i, s, o) {
|
|
310
310
|
if (t.pattern) {
|
|
311
311
|
if (t.pattern instanceof RegExp)
|
|
312
312
|
t.pattern.lastIndex = 0, t.pattern.test(e) || s.push(M(o.messages.pattern.mismatch, t.fullField, e, t.pattern));
|
|
@@ -321,19 +321,19 @@ var Ut = function(t, e, i, s, o, r) {
|
|
|
321
321
|
type: He,
|
|
322
322
|
range: De,
|
|
323
323
|
enum: Xe,
|
|
324
|
-
pattern:
|
|
325
|
-
},
|
|
324
|
+
pattern: Fe
|
|
325
|
+
}, ke = function(t, e, i, s, o) {
|
|
326
326
|
var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
|
|
327
327
|
if (n) {
|
|
328
|
-
if (
|
|
328
|
+
if (_(e, "string") && !t.required)
|
|
329
329
|
return i();
|
|
330
|
-
v.required(t, e, s, r, o, "string"),
|
|
330
|
+
v.required(t, e, s, r, o, "string"), _(e, "string") || (v.type(t, e, s, r, o), v.range(t, e, s, r, o), v.pattern(t, e, s, r, o), t.whitespace === !0 && v.whitespace(t, e, s, r, o));
|
|
331
331
|
}
|
|
332
332
|
i(r);
|
|
333
|
-
},
|
|
333
|
+
}, Ne = function(t, e, i, s, o) {
|
|
334
334
|
var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
|
|
335
335
|
if (n) {
|
|
336
|
-
if (
|
|
336
|
+
if (_(e) && !t.required)
|
|
337
337
|
return i();
|
|
338
338
|
v.required(t, e, s, r, o), e !== void 0 && v.type(t, e, s, r, o);
|
|
339
339
|
}
|
|
@@ -341,7 +341,7 @@ var Ut = function(t, e, i, s, o, r) {
|
|
|
341
341
|
}, Ye = function(t, e, i, s, o) {
|
|
342
342
|
var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
|
|
343
343
|
if (n) {
|
|
344
|
-
if (e === "" && (e = void 0),
|
|
344
|
+
if (e === "" && (e = void 0), _(e) && !t.required)
|
|
345
345
|
return i();
|
|
346
346
|
v.required(t, e, s, r, o), e !== void 0 && (v.type(t, e, s, r, o), v.range(t, e, s, r, o));
|
|
347
347
|
}
|
|
@@ -349,7 +349,7 @@ var Ut = function(t, e, i, s, o, r) {
|
|
|
349
349
|
}, Ke = function(t, e, i, s, o) {
|
|
350
350
|
var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
|
|
351
351
|
if (n) {
|
|
352
|
-
if (
|
|
352
|
+
if (_(e) && !t.required)
|
|
353
353
|
return i();
|
|
354
354
|
v.required(t, e, s, r, o), e !== void 0 && v.type(t, e, s, r, o);
|
|
355
355
|
}
|
|
@@ -357,15 +357,15 @@ var Ut = function(t, e, i, s, o, r) {
|
|
|
357
357
|
}, Be = function(t, e, i, s, o) {
|
|
358
358
|
var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
|
|
359
359
|
if (n) {
|
|
360
|
-
if (
|
|
360
|
+
if (_(e) && !t.required)
|
|
361
361
|
return i();
|
|
362
|
-
v.required(t, e, s, r, o),
|
|
362
|
+
v.required(t, e, s, r, o), _(e) || v.type(t, e, s, r, o);
|
|
363
363
|
}
|
|
364
364
|
i(r);
|
|
365
365
|
}, We = function(t, e, i, s, o) {
|
|
366
366
|
var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
|
|
367
367
|
if (n) {
|
|
368
|
-
if (
|
|
368
|
+
if (_(e) && !t.required)
|
|
369
369
|
return i();
|
|
370
370
|
v.required(t, e, s, r, o), e !== void 0 && (v.type(t, e, s, r, o), v.range(t, e, s, r, o));
|
|
371
371
|
}
|
|
@@ -373,7 +373,7 @@ var Ut = function(t, e, i, s, o, r) {
|
|
|
373
373
|
}, Pe = function(t, e, i, s, o) {
|
|
374
374
|
var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
|
|
375
375
|
if (n) {
|
|
376
|
-
if (
|
|
376
|
+
if (_(e) && !t.required)
|
|
377
377
|
return i();
|
|
378
378
|
v.required(t, e, s, r, o), e !== void 0 && (v.type(t, e, s, r, o), v.range(t, e, s, r, o));
|
|
379
379
|
}
|
|
@@ -389,7 +389,7 @@ var Ut = function(t, e, i, s, o, r) {
|
|
|
389
389
|
}, Ve = function(t, e, i, s, o) {
|
|
390
390
|
var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
|
|
391
391
|
if (n) {
|
|
392
|
-
if (
|
|
392
|
+
if (_(e) && !t.required)
|
|
393
393
|
return i();
|
|
394
394
|
v.required(t, e, s, r, o), e !== void 0 && v.type(t, e, s, r, o);
|
|
395
395
|
}
|
|
@@ -397,7 +397,7 @@ var Ut = function(t, e, i, s, o, r) {
|
|
|
397
397
|
}, $e = "enum", qe = function(t, e, i, s, o) {
|
|
398
398
|
var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
|
|
399
399
|
if (n) {
|
|
400
|
-
if (
|
|
400
|
+
if (_(e) && !t.required)
|
|
401
401
|
return i();
|
|
402
402
|
v.required(t, e, s, r, o), e !== void 0 && v[$e](t, e, s, r, o);
|
|
403
403
|
}
|
|
@@ -405,17 +405,17 @@ var Ut = function(t, e, i, s, o, r) {
|
|
|
405
405
|
}, Ge = function(t, e, i, s, o) {
|
|
406
406
|
var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
|
|
407
407
|
if (n) {
|
|
408
|
-
if (
|
|
408
|
+
if (_(e, "string") && !t.required)
|
|
409
409
|
return i();
|
|
410
|
-
v.required(t, e, s, r, o),
|
|
410
|
+
v.required(t, e, s, r, o), _(e, "string") || v.pattern(t, e, s, r, o);
|
|
411
411
|
}
|
|
412
412
|
i(r);
|
|
413
413
|
}, je = function(t, e, i, s, o) {
|
|
414
414
|
var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
|
|
415
415
|
if (n) {
|
|
416
|
-
if (
|
|
416
|
+
if (_(e, "date") && !t.required)
|
|
417
417
|
return i();
|
|
418
|
-
if (v.required(t, e, s, r, o), !
|
|
418
|
+
if (v.required(t, e, s, r, o), !_(e, "date")) {
|
|
419
419
|
var l;
|
|
420
420
|
e instanceof Date ? l = e : l = new Date(e), v.type(t, l, s, r, o), l && v.range(t, l.getTime(), s, r, o);
|
|
421
421
|
}
|
|
@@ -427,22 +427,22 @@ var Ut = function(t, e, i, s, o, r) {
|
|
|
427
427
|
}, yt = function(t, e, i, s, o) {
|
|
428
428
|
var r = t.type, n = [], l = t.required || !t.required && s.hasOwnProperty(t.field);
|
|
429
429
|
if (l) {
|
|
430
|
-
if (
|
|
430
|
+
if (_(e, r) && !t.required)
|
|
431
431
|
return i();
|
|
432
|
-
v.required(t, e, s, n, o, r),
|
|
432
|
+
v.required(t, e, s, n, o, r), _(e, r) || v.type(t, e, s, n, o);
|
|
433
433
|
}
|
|
434
434
|
i(n);
|
|
435
435
|
}, Ze = function(t, e, i, s, o) {
|
|
436
436
|
var r = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
|
|
437
437
|
if (n) {
|
|
438
|
-
if (
|
|
438
|
+
if (_(e) && !t.required)
|
|
439
439
|
return i();
|
|
440
440
|
v.required(t, e, s, r, o);
|
|
441
441
|
}
|
|
442
442
|
i(r);
|
|
443
443
|
}, it = {
|
|
444
|
-
string:
|
|
445
|
-
method:
|
|
444
|
+
string: ke,
|
|
445
|
+
method: Ne,
|
|
446
446
|
number: Ye,
|
|
447
447
|
boolean: Ke,
|
|
448
448
|
regexp: Be,
|
|
@@ -537,17 +537,17 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
|
|
|
537
537
|
if (typeof l == "function" && (h = l, l = {}), !this.rules || Object.keys(this.rules).length === 0)
|
|
538
538
|
return h && h(null, n), Promise.resolve(n);
|
|
539
539
|
function f(g) {
|
|
540
|
-
var w = [],
|
|
541
|
-
function E
|
|
542
|
-
if (Array.isArray(
|
|
543
|
-
var
|
|
544
|
-
w = (
|
|
540
|
+
var w = [], y = {};
|
|
541
|
+
function C(E) {
|
|
542
|
+
if (Array.isArray(E)) {
|
|
543
|
+
var b;
|
|
544
|
+
w = (b = w).concat.apply(b, E);
|
|
545
545
|
} else
|
|
546
|
-
w.push(
|
|
546
|
+
w.push(E);
|
|
547
547
|
}
|
|
548
548
|
for (var m = 0; m < g.length; m++)
|
|
549
|
-
|
|
550
|
-
w.length ? (
|
|
549
|
+
C(g[m]);
|
|
550
|
+
w.length ? (y = bt(w), h(w, y)) : h(null, n);
|
|
551
551
|
}
|
|
552
552
|
if (l.messages) {
|
|
553
553
|
var d = this.messages();
|
|
@@ -556,74 +556,74 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
|
|
|
556
556
|
l.messages = this.messages();
|
|
557
557
|
var x = {}, u = l.keys || Object.keys(this.rules);
|
|
558
558
|
u.forEach(function(g) {
|
|
559
|
-
var w = r.rules[g],
|
|
560
|
-
w.forEach(function(
|
|
561
|
-
var m =
|
|
562
|
-
typeof m.transform == "function" && (n === i && (n = $({}, n)),
|
|
559
|
+
var w = r.rules[g], y = n[g];
|
|
560
|
+
w.forEach(function(C) {
|
|
561
|
+
var m = C;
|
|
562
|
+
typeof m.transform == "function" && (n === i && (n = $({}, n)), y = n[g] = m.transform(y)), typeof m == "function" ? m = {
|
|
563
563
|
validator: m
|
|
564
564
|
} : m = $({}, m), m.validator = r.getValidationMethod(m), m.validator && (m.field = g, m.fullField = m.fullField || g, m.type = r.getType(m), x[g] = x[g] || [], x[g].push({
|
|
565
565
|
rule: m,
|
|
566
|
-
value:
|
|
566
|
+
value: y,
|
|
567
567
|
source: n,
|
|
568
568
|
field: g
|
|
569
569
|
}));
|
|
570
570
|
});
|
|
571
571
|
});
|
|
572
|
-
var
|
|
572
|
+
var p = {};
|
|
573
573
|
return Se(x, l, function(g, w) {
|
|
574
|
-
var
|
|
575
|
-
|
|
574
|
+
var y = g.rule, C = (y.type === "object" || y.type === "array") && (typeof y.fields == "object" || typeof y.defaultField == "object");
|
|
575
|
+
C = C && (y.required || !y.required && g.value), y.field = g.field;
|
|
576
576
|
function m(R, T) {
|
|
577
577
|
return $({}, T, {
|
|
578
|
-
fullField:
|
|
579
|
-
fullFields:
|
|
578
|
+
fullField: y.fullField + "." + R,
|
|
579
|
+
fullFields: y.fullFields ? [].concat(y.fullFields, [R]) : [R]
|
|
580
580
|
});
|
|
581
581
|
}
|
|
582
|
-
function
|
|
582
|
+
function E(R) {
|
|
583
583
|
R === void 0 && (R = []);
|
|
584
584
|
var T = Array.isArray(R) ? R : [R];
|
|
585
|
-
!l.suppressWarning && T.length && a.warning("async-validator:", T), T.length &&
|
|
586
|
-
var L = T.map(
|
|
585
|
+
!l.suppressWarning && T.length && a.warning("async-validator:", T), T.length && y.message !== void 0 && (T = [].concat(y.message));
|
|
586
|
+
var L = T.map(Nt(y, n));
|
|
587
587
|
if (l.first && L.length)
|
|
588
|
-
return y
|
|
589
|
-
if (!
|
|
588
|
+
return p[y.field] = 1, w(L);
|
|
589
|
+
if (!C)
|
|
590
590
|
w(L);
|
|
591
591
|
else {
|
|
592
|
-
if (
|
|
593
|
-
return
|
|
592
|
+
if (y.required && !g.value)
|
|
593
|
+
return y.message !== void 0 ? L = [].concat(y.message).map(Nt(y, n)) : l.error && (L = [l.error(y, M(l.messages.required, y.field))]), w(L);
|
|
594
594
|
var A = {};
|
|
595
|
-
|
|
596
|
-
A[
|
|
595
|
+
y.defaultField && Object.keys(g.value).map(function(I) {
|
|
596
|
+
A[I] = y.defaultField;
|
|
597
597
|
}), A = $({}, A, g.rule.fields);
|
|
598
598
|
var D = {};
|
|
599
|
-
Object.keys(A).forEach(function(
|
|
600
|
-
var S = A[
|
|
601
|
-
D[
|
|
599
|
+
Object.keys(A).forEach(function(I) {
|
|
600
|
+
var S = A[I], O = Array.isArray(S) ? S : [S];
|
|
601
|
+
D[I] = O.map(m.bind(null, I));
|
|
602
602
|
});
|
|
603
603
|
var B = new a(D);
|
|
604
|
-
B.messages(l.messages), g.rule.options && (g.rule.options.messages = l.messages, g.rule.options.error = l.error), B.validate(g.value, g.rule.options || l, function(
|
|
604
|
+
B.messages(l.messages), g.rule.options && (g.rule.options.messages = l.messages, g.rule.options.error = l.error), B.validate(g.value, g.rule.options || l, function(I) {
|
|
605
605
|
var S = [];
|
|
606
|
-
L && L.length && S.push.apply(S, L),
|
|
606
|
+
L && L.length && S.push.apply(S, L), I && I.length && S.push.apply(S, I), w(S.length ? S : null);
|
|
607
607
|
});
|
|
608
608
|
}
|
|
609
609
|
}
|
|
610
|
-
var
|
|
611
|
-
if (
|
|
612
|
-
|
|
613
|
-
else if (
|
|
610
|
+
var b;
|
|
611
|
+
if (y.asyncValidator)
|
|
612
|
+
b = y.asyncValidator(y, g.value, E, g.source, l);
|
|
613
|
+
else if (y.validator) {
|
|
614
614
|
try {
|
|
615
|
-
|
|
615
|
+
b = y.validator(y, g.value, E, g.source, l);
|
|
616
616
|
} catch (R) {
|
|
617
617
|
console.error == null || console.error(R), l.suppressValidatorError || setTimeout(function() {
|
|
618
618
|
throw R;
|
|
619
|
-
}, 0),
|
|
619
|
+
}, 0), E(R.message);
|
|
620
620
|
}
|
|
621
|
-
|
|
621
|
+
b === !0 ? E() : b === !1 ? E(typeof y.message == "function" ? y.message(y.fullField || y.field) : y.message || (y.fullField || y.field) + " fails") : b instanceof Array ? E(b) : b instanceof Error && E(b.message);
|
|
622
622
|
}
|
|
623
|
-
|
|
624
|
-
return
|
|
623
|
+
b && b.then && b.then(function() {
|
|
624
|
+
return E();
|
|
625
625
|
}, function(R) {
|
|
626
|
-
return
|
|
626
|
+
return E(R);
|
|
627
627
|
});
|
|
628
628
|
}, function(g) {
|
|
629
629
|
f(g);
|
|
@@ -702,10 +702,10 @@ function Qt(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 Bt = /^(\r\n|\n\r|\r|\n)/, Qe = /^[^\t\r\n]+/, Wt = /^\t/;
|
|
@@ -792,18 +792,18 @@ class ii {
|
|
|
792
792
|
Array.isArray(i.children) && (o = !0, this.initData(i.children, e + 1));
|
|
793
793
|
const { ROW_KEY: r = "", DEFAULT_EXPAND_ALL: n, CELL_HEIGHT: l, SELECTABLE_METHOD: h, CHECKBOX_KEY: f } = this.ctx.config, d = i[r], x = d ?? At();
|
|
794
794
|
this.itemRowKeyMap.set(i, x);
|
|
795
|
-
const u = i._height || l,
|
|
795
|
+
const u = i._height || l, p = i._readonly;
|
|
796
796
|
let g = !0;
|
|
797
797
|
if (typeof h == "function" && (g = h), f) {
|
|
798
798
|
const w = i[f];
|
|
799
799
|
if (this.checkboxKeyMap.has(w)) {
|
|
800
|
-
const
|
|
801
|
-
|
|
800
|
+
const y = this.checkboxKeyMap.get(w);
|
|
801
|
+
y.push(x), this.checkboxKeyMap.set(w, y);
|
|
802
802
|
} else
|
|
803
803
|
this.checkboxKeyMap.set(w, [x]);
|
|
804
804
|
}
|
|
805
805
|
this.rowKeyMap.set(x, {
|
|
806
|
-
readonly:
|
|
806
|
+
readonly: p,
|
|
807
807
|
index: s,
|
|
808
808
|
rowIndex: s,
|
|
809
809
|
level: e,
|
|
@@ -1328,8 +1328,8 @@ class ii {
|
|
|
1328
1328
|
new nt(h).validate(f).then(() => {
|
|
1329
1329
|
this.setValidationError(t, e, []), i([]);
|
|
1330
1330
|
}).catch(({ errors: x }) => {
|
|
1331
|
-
const u = x.map((
|
|
1332
|
-
...
|
|
1331
|
+
const u = x.map((p) => ({
|
|
1332
|
+
...p,
|
|
1333
1333
|
column: n,
|
|
1334
1334
|
key: e,
|
|
1335
1335
|
row: s.item,
|
|
@@ -1632,8 +1632,8 @@ class ni {
|
|
|
1632
1632
|
d === "top" ? x = i + f : d === "bottom" ? x = i + o - f : x = i + (o + f) / 2;
|
|
1633
1633
|
let u = 0;
|
|
1634
1634
|
l === "left" ? u = e + f : l === "right" ? u = e + s - f : u = e + s / 2;
|
|
1635
|
-
const { _text:
|
|
1636
|
-
return this.ctx.fillText(
|
|
1635
|
+
const { _text: p, ellipsis: g } = this.handleEllipsis(t, s, f);
|
|
1636
|
+
return this.ctx.fillText(p, u, x), this.ctx.restore(), g;
|
|
1637
1637
|
}
|
|
1638
1638
|
handleEllipsis(t, e, i = 0) {
|
|
1639
1639
|
let s = !1, o = t;
|
|
@@ -1727,12 +1727,16 @@ class Pt {
|
|
|
1727
1727
|
// 启用点击选择器编辑
|
|
1728
1728
|
c(this, "SELECTOR_AREA_MIN_X", 0);
|
|
1729
1729
|
// 选择器X最小范围
|
|
1730
|
+
c(this, "SELECTOR_AREA_MAX_X_OFFSET", 0);
|
|
1731
|
+
// 选择器X最大范围colMax - offset
|
|
1730
1732
|
c(this, "SELECTOR_AREA_MAX_X", 0);
|
|
1731
1733
|
// 选择器X最大范围,0默认最大colMax
|
|
1732
1734
|
c(this, "SELECTOR_AREA_MIN_Y", 0);
|
|
1733
1735
|
// 选择器Y最小范围
|
|
1734
1736
|
c(this, "SELECTOR_AREA_MAX_Y", 0);
|
|
1735
1737
|
// 选择器Y最大范围,0默认rowMax
|
|
1738
|
+
c(this, "SELECTOR_AREA_MAX_Y_OFFSET", 0);
|
|
1739
|
+
// 选择器Y最大范围,0默认rowMax
|
|
1736
1740
|
c(this, "ENABLE_SELECTOR_SINGLE", !1);
|
|
1737
1741
|
c(this, "ENABLE_SELECTOR_SPAN_COL", !0);
|
|
1738
1742
|
c(this, "ENABLE_SELECTOR_SPAN_ROW", !0);
|
|
@@ -2079,13 +2083,13 @@ class ee extends te {
|
|
|
2079
2083
|
const u = this.ctx.icons.get("loading");
|
|
2080
2084
|
n = "loading", o = u, r = x * 8;
|
|
2081
2085
|
} else if (f) {
|
|
2082
|
-
const u = this.ctx.icons.get("expand"),
|
|
2083
|
-
o = h ?
|
|
2086
|
+
const u = this.ctx.icons.get("expand"), p = this.ctx.icons.get("shrink");
|
|
2087
|
+
o = h ? p : u, n = h ? "shrink" : "expand", r = x * 8;
|
|
2084
2088
|
} else
|
|
2085
2089
|
r = x * 8;
|
|
2086
2090
|
if (o) {
|
|
2087
|
-
let u = 20,
|
|
2088
|
-
this.ctx.paint.drawImage(o, g, w, u,
|
|
2091
|
+
let u = 20, p = 20, g = this.drawX + r + e, w = this.drawY + (this.visibleHeight - p) / 2 + 2;
|
|
2092
|
+
this.ctx.paint.drawImage(o, g, w, u, p), this.drawImageX = g, this.drawImageY = w, this.drawImageWidth = u, this.drawImageHeight = p, this.drawImageName = n, this.drawImageSource = o, this.align = "left", this.drawTextX = r + this.drawX + u + 0.5;
|
|
2089
2093
|
}
|
|
2090
2094
|
}
|
|
2091
2095
|
}
|
|
@@ -2103,46 +2107,46 @@ class ee extends te {
|
|
|
2103
2107
|
HIGHLIGHT_HOVER_ROW_COLOR: d
|
|
2104
2108
|
} = this.ctx.config;
|
|
2105
2109
|
if (this.cellType === "footer") {
|
|
2106
|
-
let
|
|
2110
|
+
let y = n, C = r;
|
|
2107
2111
|
if (typeof o == "function") {
|
|
2108
|
-
const m = o, { backgroundColor:
|
|
2112
|
+
const m = o, { backgroundColor: E, color: b } = m({
|
|
2109
2113
|
row: this.row,
|
|
2110
2114
|
rowIndex: this.rowIndex,
|
|
2111
2115
|
colIndex: this.colIndex,
|
|
2112
2116
|
column: this.column,
|
|
2113
2117
|
value: this.getValue()
|
|
2114
2118
|
}) || {};
|
|
2115
|
-
|
|
2119
|
+
E && (y = E), b && (C = b);
|
|
2116
2120
|
}
|
|
2117
|
-
this.drawCellSkyBgColor = "transparent", this.drawCellBgColor =
|
|
2121
|
+
this.drawCellSkyBgColor = "transparent", this.drawCellBgColor = y, this.drawTextColor = C;
|
|
2118
2122
|
return;
|
|
2119
2123
|
}
|
|
2120
2124
|
let x = "transparent";
|
|
2121
|
-
const u = this.ctx.focusCell,
|
|
2122
|
-
f && (
|
|
2125
|
+
const u = this.ctx.focusCell, p = this.ctx.hoverCell;
|
|
2126
|
+
f && (p == null ? void 0 : p.rowKey) === this.rowKey && (x = d), l && (u == null ? void 0 : u.rowKey) === this.rowKey && (x = h), this.drawCellSkyBgColor = x;
|
|
2123
2127
|
let g = e, w = r;
|
|
2124
2128
|
if (["index", "index-selection", "selection"].includes(this.type)) {
|
|
2125
2129
|
this.drawCellBgColor = e, this.drawTextColor = r;
|
|
2126
2130
|
return;
|
|
2127
2131
|
}
|
|
2128
2132
|
if (this.ctx.database.getReadonly(this.rowKey, this.key) || (g = i, w = r), typeof s == "function") {
|
|
2129
|
-
const
|
|
2133
|
+
const y = s, { backgroundColor: C, color: m } = y({
|
|
2130
2134
|
row: this.row,
|
|
2131
2135
|
rowIndex: this.rowIndex,
|
|
2132
2136
|
colIndex: this.colIndex,
|
|
2133
2137
|
column: this.column,
|
|
2134
2138
|
value: this.getValue()
|
|
2135
2139
|
}) || {};
|
|
2136
|
-
|
|
2140
|
+
C && (g = C), m && (w = m);
|
|
2137
2141
|
}
|
|
2138
2142
|
this.drawCellBgColor = g, this.drawTextColor = w;
|
|
2139
2143
|
}
|
|
2140
2144
|
updateSelection() {
|
|
2141
2145
|
const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: o, cellType: r, type: n, rowIndex: l, rowKey: h } = this;
|
|
2142
2146
|
if (!(s === 0 || o === 0) && r !== "footer" && ["index-selection", "selection"].includes(n)) {
|
|
2143
|
-
const f = this.ctx.database.getRowSelection(h), d = this.ctx.database.getRowSelectable(h), { CHECKBOX_SIZE: x = 0 } = this.ctx.config, u = this.drawX + (e - x) / 2,
|
|
2147
|
+
const f = this.ctx.database.getRowSelection(h), d = this.ctx.database.getRowSelectable(h), { CHECKBOX_SIZE: x = 0 } = this.ctx.config, u = this.drawX + (e - x) / 2, p = this.drawY + (i - x) / 2;
|
|
2144
2148
|
let g = this.ctx.icons.get("checkbox-uncheck"), w = "checkbox-uncheck";
|
|
2145
|
-
f && d ? (g = this.ctx.icons.get("checkbox-check"), w = "checkbox-check") : f && d ? (g = this.ctx.icons.get("checkbox-check-disabled"), w = "checkbox-check-disabled") : !f && d ? (g = this.ctx.icons.get("checkbox-uncheck"), w = "checkbox-uncheck") : (g = this.ctx.icons.get("checkbox-disabled"), w = "checkbox-disabled"), g && n == "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === l || ["checkbox-disabled", "checkbox-check"].includes(w)) && (this.drawImageX = u, this.drawImageY =
|
|
2149
|
+
f && d ? (g = this.ctx.icons.get("checkbox-check"), w = "checkbox-check") : f && d ? (g = this.ctx.icons.get("checkbox-check-disabled"), w = "checkbox-check-disabled") : !f && d ? (g = this.ctx.icons.get("checkbox-uncheck"), w = "checkbox-uncheck") : (g = this.ctx.icons.get("checkbox-disabled"), w = "checkbox-disabled"), g && n == "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === l || ["checkbox-disabled", "checkbox-check"].includes(w)) && (this.drawImageX = u, this.drawImageY = p, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = w, this.drawImageSource = g) : g && n === "selection" && (this.drawImageX = u, this.drawImageY = p, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = w, this.drawImageSource = g);
|
|
2146
2150
|
}
|
|
2147
2151
|
}
|
|
2148
2152
|
updateHoverIcon() {
|
|
@@ -2330,32 +2334,32 @@ class ee extends te {
|
|
|
2330
2334
|
const { drawX: i, drawY: s, width: o, rowIndex: r, colIndex: n } = this, l = i + 0.5;
|
|
2331
2335
|
let h = s + 0.5, f = this.height;
|
|
2332
2336
|
r === 0 && (h = this.y + 1, f = f - 1);
|
|
2333
|
-
const { xArr: d, yArr: x, lineDash: u = [], borderWidth:
|
|
2334
|
-
n >=
|
|
2337
|
+
const { xArr: d, yArr: x, lineDash: u = [], borderWidth: p = 1, borderColor: g, fillColor: w } = e, y = d[0], C = d[1], m = x[0], E = x[1];
|
|
2338
|
+
n >= y && n <= C && r === m && this.ctx.paint.drawLine([l, h, l + o - 2, h], {
|
|
2335
2339
|
borderColor: g,
|
|
2336
2340
|
fillColor: w,
|
|
2337
|
-
borderWidth:
|
|
2341
|
+
borderWidth: p,
|
|
2338
2342
|
lineCap: "round",
|
|
2339
2343
|
lineJoin: "round",
|
|
2340
2344
|
lineDash: u
|
|
2341
|
-
}), n >=
|
|
2345
|
+
}), n >= y && n <= C && r === E && this.ctx.paint.drawLine([l, h + f - 1.5, l + o, h + f - 1.5], {
|
|
2342
2346
|
borderColor: g,
|
|
2343
2347
|
fillColor: w,
|
|
2344
|
-
borderWidth:
|
|
2348
|
+
borderWidth: p,
|
|
2345
2349
|
lineCap: "round",
|
|
2346
2350
|
lineJoin: "round",
|
|
2347
2351
|
lineDash: u
|
|
2348
|
-
}), n ===
|
|
2352
|
+
}), n === y && r >= m && r <= E && this.ctx.paint.drawLine([l, h, l, h + f - 1], {
|
|
2349
2353
|
borderColor: g,
|
|
2350
2354
|
fillColor: w,
|
|
2351
|
-
borderWidth:
|
|
2355
|
+
borderWidth: p,
|
|
2352
2356
|
lineCap: "round",
|
|
2353
2357
|
lineJoin: "round",
|
|
2354
2358
|
lineDash: u
|
|
2355
|
-
}), n ===
|
|
2359
|
+
}), n === C && r >= m && r <= E && this.ctx.paint.drawLine([l + o - 1, h, l + o - 1, h + f - 1], {
|
|
2356
2360
|
borderColor: g,
|
|
2357
2361
|
fillColor: w,
|
|
2358
|
-
borderWidth:
|
|
2362
|
+
borderWidth: p,
|
|
2359
2363
|
lineCap: "round",
|
|
2360
2364
|
lineJoin: "round",
|
|
2361
2365
|
lineDash: u
|
|
@@ -3035,7 +3039,7 @@ class di {
|
|
|
3035
3039
|
config: { HEADER_HEIGHT: t, SCROLLER_TRACK_SIZE: e }
|
|
3036
3040
|
} = this.ctx, i = this.ctx.database.getColumns();
|
|
3037
3041
|
this.columns = i, this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [];
|
|
3038
|
-
const s = Jt(i), o =
|
|
3042
|
+
const s = Jt(i), o = _t(i);
|
|
3039
3043
|
this.height = t * s, this.width = o.reduce((d, x) => d + ((x == null ? void 0 : x.width) || 100), 0), this.visibleHeight = this.height;
|
|
3040
3044
|
const r = Je(Qt(i, s));
|
|
3041
3045
|
this.columnIndex = 0, this.resizeNum = 0, this.render(r, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
|
|
@@ -3134,7 +3138,7 @@ class di {
|
|
|
3134
3138
|
for (let r = 0; r < i; r++) {
|
|
3135
3139
|
const n = t[r], l = o * (n.rowspan || 1), h = o * n.level;
|
|
3136
3140
|
let f = n.width || 100;
|
|
3137
|
-
n.children && (f =
|
|
3141
|
+
n.children && (f = _t(n.children).reduce((u, p) => u + ((p == null ? void 0 : p.width) || 100), 0));
|
|
3138
3142
|
const d = new ie(this.ctx, this.columnIndex, s, h, f, l, n);
|
|
3139
3143
|
this.ctx.database.setHeader(n.key, d), this.allCellHeaders.push(d), n.children || (this.leafCellHeaders.push(d), d.column.widthFillDisable || this.resizeNum++), n.fixed === "left" ? this.fixedLeftCellHeaders.push(d) : n.fixed === "right" ? this.fixedRightCellHeaders.push(d) : this.centerCellHeaders.push(d), !n.children && this.columnIndex++, n.children && this.render(n.children, s), s += f;
|
|
3140
3144
|
}
|
|
@@ -3293,30 +3297,30 @@ class fi {
|
|
|
3293
3297
|
if (!e.width)
|
|
3294
3298
|
return;
|
|
3295
3299
|
this.x = 0, this.y = e.height;
|
|
3296
|
-
const { data: u, sumHeight:
|
|
3297
|
-
this.height =
|
|
3300
|
+
const { data: u, sumHeight: p } = i.getData();
|
|
3301
|
+
this.height = p, this.data = u;
|
|
3298
3302
|
const { top: g } = t.getBoundingClientRect();
|
|
3299
3303
|
this.width = e.width, this.visibleWidth = t.width - o;
|
|
3300
3304
|
const w = this.ctx.footer.height;
|
|
3301
3305
|
this.data.length || (this.height = h);
|
|
3302
|
-
const
|
|
3306
|
+
const y = this.data.length ? "not-empty" : "empty";
|
|
3303
3307
|
this.ctx.emit("emptyChange", {
|
|
3304
|
-
isEmpty:
|
|
3305
|
-
type:
|
|
3308
|
+
isEmpty: y,
|
|
3309
|
+
type: y,
|
|
3306
3310
|
headerHeight: e.height,
|
|
3307
3311
|
bodyHeight: this.height,
|
|
3308
3312
|
footerHeight: w,
|
|
3309
3313
|
width: this.width,
|
|
3310
3314
|
height: this.data.length ? 0 : h + w
|
|
3311
3315
|
});
|
|
3312
|
-
let
|
|
3313
|
-
|
|
3316
|
+
let C = this.height + e.height + o;
|
|
3317
|
+
C += w;
|
|
3314
3318
|
let m = 0;
|
|
3315
3319
|
this.data.length && d ? (m = window.innerHeight - g - x, m < 0 && (m = 32, console.error(
|
|
3316
3320
|
"There is an error in the height calculation ENABLE_OFFSET_HEIGHT and OFFSET_HEIGHT are invalid"
|
|
3317
|
-
))) : this.data.length && l ? m = l : this.data.length && f &&
|
|
3318
|
-
let
|
|
3319
|
-
s ? this.visibleHeight =
|
|
3321
|
+
))) : this.data.length && l ? m = l : this.data.length && f && C > f ? m = f : m = C, m > 0 && (this.ctx.target.height = m);
|
|
3322
|
+
let E = t.height - e.height - o;
|
|
3323
|
+
s ? this.visibleHeight = E - w : this.visibleHeight = E, 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 = u, this.ctx.target.setAttribute(
|
|
3320
3324
|
"style",
|
|
3321
3325
|
`outline: none; position: relative; border-radius: ${n}px; border: 1px solid ${r}; height:${this.ctx.target.height}px;width:${this.ctx.target.width - 1}px;`
|
|
3322
3326
|
);
|
|
@@ -3427,7 +3431,7 @@ class fi {
|
|
|
3427
3431
|
l === -1 && (l = o.length), this.headIndex = Math.max(0, n), this.tailIndex = Math.min(this.ctx.maxRowIndex, l + 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;
|
|
3428
3432
|
const h = [];
|
|
3429
3433
|
for (let f = 0; f < this.visibleRows.length; f++) {
|
|
3430
|
-
const d = this.headIndex + f, x = this.visibleRows[f], { height: u, top:
|
|
3434
|
+
const d = this.headIndex + f, x = this.visibleRows[f], { height: u, top: p } = this.ctx.database.getPositionForRowIndex(d), g = new se(this.ctx, d, 0, p + this.y, t.width, u, x);
|
|
3431
3435
|
h.push(g);
|
|
3432
3436
|
}
|
|
3433
3437
|
this.renderRows = h, this.ctx.body.renderRows = h;
|
|
@@ -3619,11 +3623,18 @@ class ui {
|
|
|
3619
3623
|
}
|
|
3620
3624
|
if (JSON.stringify(this.ctx.selector.xArr) !== JSON.stringify(o) || JSON.stringify(this.ctx.selector.yArr) !== JSON.stringify(r)) {
|
|
3621
3625
|
this.ctx.mousedown && (this.ctx.selectorMove = !0), this.ctx.selector.enable = !0;
|
|
3622
|
-
const {
|
|
3623
|
-
|
|
3624
|
-
|
|
3626
|
+
const {
|
|
3627
|
+
SELECTOR_AREA_MIN_X: n,
|
|
3628
|
+
SELECTOR_AREA_MAX_X: l,
|
|
3629
|
+
SELECTOR_AREA_MIN_Y: h,
|
|
3630
|
+
SELECTOR_AREA_MAX_Y: f,
|
|
3631
|
+
SELECTOR_AREA_MAX_X_OFFSET: d,
|
|
3632
|
+
SELECTOR_AREA_MAX_Y_OFFSET: x
|
|
3633
|
+
} = this.ctx.config, u = n, p = l || this.ctx.maxColIndex - d, g = h, w = f || this.ctx.maxRowIndex - x;
|
|
3634
|
+
let [y, C] = o, [m, E] = r;
|
|
3635
|
+
if (y < u || C > p || m < g || E > w)
|
|
3625
3636
|
return;
|
|
3626
|
-
this.ctx.selector.xArr = [Math.max(
|
|
3637
|
+
this.ctx.selector.xArr = [Math.max(u, y), Math.min(p, C)], this.ctx.selector.yArr = [Math.max(g, m), Math.min(w, E)], this.ctx.emit("setSelector", this.ctx.selector), this.ctx.emit("draw");
|
|
3627
3638
|
}
|
|
3628
3639
|
}
|
|
3629
3640
|
selectCols(t) {
|
|
@@ -3633,19 +3644,19 @@ class ui {
|
|
|
3633
3644
|
this.selectAll();
|
|
3634
3645
|
return;
|
|
3635
3646
|
}
|
|
3636
|
-
const { SELECTOR_AREA_MIN_Y: e, SELECTOR_AREA_MAX_Y: i } = this.ctx.config,
|
|
3647
|
+
const { SELECTOR_AREA_MIN_Y: e, SELECTOR_AREA_MAX_Y: i, SELECTOR_AREA_MAX_Y_OFFSET: s } = this.ctx.config, o = e, r = i || this.ctx.maxRowIndex - s;
|
|
3637
3648
|
if (this.ctx.mousedown && this.ctx.focusCellHeader) {
|
|
3638
|
-
const { colIndex:
|
|
3639
|
-
if (this.ctx.clearSelector(), t.colIndex >=
|
|
3640
|
-
const
|
|
3641
|
-
this.setSelector(
|
|
3649
|
+
const { colIndex: n } = this.ctx.focusCellHeader;
|
|
3650
|
+
if (this.ctx.clearSelector(), t.colIndex >= n) {
|
|
3651
|
+
const l = [n, t.colIndex + t.colspan - 1], h = [o, r];
|
|
3652
|
+
this.setSelector(l, h);
|
|
3642
3653
|
} else {
|
|
3643
|
-
const
|
|
3644
|
-
this.setSelector(
|
|
3654
|
+
const l = [t.colIndex, n], h = [o, r];
|
|
3655
|
+
this.setSelector(l, h);
|
|
3645
3656
|
}
|
|
3646
3657
|
} else {
|
|
3647
|
-
const
|
|
3648
|
-
this.setSelector(
|
|
3658
|
+
const n = [t.colIndex, t.colIndex + t.colspan - 1], l = [o, r];
|
|
3659
|
+
this.setSelector(n, l);
|
|
3649
3660
|
}
|
|
3650
3661
|
}
|
|
3651
3662
|
selectAll() {
|
|
@@ -3653,27 +3664,34 @@ class ui {
|
|
|
3653
3664
|
return;
|
|
3654
3665
|
const { ENABLE_SELECTOR_ALL_ROWS: t, ENABLE_SELECTOR_ALL_COLS: e } = this.ctx.config;
|
|
3655
3666
|
if (t && e) {
|
|
3656
|
-
const {
|
|
3657
|
-
|
|
3667
|
+
const {
|
|
3668
|
+
SELECTOR_AREA_MIN_X: i,
|
|
3669
|
+
SELECTOR_AREA_MAX_X: s,
|
|
3670
|
+
SELECTOR_AREA_MIN_Y: o,
|
|
3671
|
+
SELECTOR_AREA_MAX_Y: r,
|
|
3672
|
+
SELECTOR_AREA_MAX_X_OFFSET: n,
|
|
3673
|
+
SELECTOR_AREA_MAX_Y_OFFSET: l
|
|
3674
|
+
} = this.ctx.config, h = i, f = s || this.ctx.maxColIndex - n, d = o, x = r || this.ctx.maxRowIndex - l, u = [h, f], p = [d, x];
|
|
3675
|
+
this.setSelector(u, p);
|
|
3658
3676
|
}
|
|
3659
3677
|
}
|
|
3660
3678
|
selectRows(t, e = !0) {
|
|
3661
3679
|
if (this.ctx.config.ENABLE_SELECTOR_SINGLE || !this.ctx.config.ENABLE_SELECTOR_ALL_COLS || this.ctx.autofillMove || this.ctx.editing)
|
|
3662
3680
|
return;
|
|
3663
|
-
const { SELECTOR_AREA_MIN_X: i, SELECTOR_AREA_MAX_X: s } = this.ctx.config,
|
|
3681
|
+
const { SELECTOR_AREA_MIN_X: i, SELECTOR_AREA_MAX_X: s, SELECTOR_AREA_MAX_X_OFFSET: o } = this.ctx.config, r = s || this.ctx.maxColIndex - o, n = i;
|
|
3664
3682
|
if (e) {
|
|
3665
3683
|
this.ctx.setFocusCell(t);
|
|
3666
|
-
const
|
|
3667
|
-
this.setSelector(
|
|
3684
|
+
const l = [n, r], h = [t.rowIndex, t.rowIndex];
|
|
3685
|
+
this.setSelector(l, h);
|
|
3668
3686
|
}
|
|
3669
3687
|
if (this.ctx.focusCell && this.ctx.mousedown) {
|
|
3670
|
-
const { rowIndex:
|
|
3671
|
-
if (t.rowIndex >=
|
|
3672
|
-
const
|
|
3673
|
-
this.setSelector(
|
|
3688
|
+
const { rowIndex: l } = this.ctx.focusCell;
|
|
3689
|
+
if (t.rowIndex >= l) {
|
|
3690
|
+
const h = [n, r], f = [l, t.rowIndex];
|
|
3691
|
+
this.setSelector(h, f);
|
|
3674
3692
|
} else {
|
|
3675
|
-
const
|
|
3676
|
-
this.setSelector(
|
|
3693
|
+
const h = [n, r], f = [t.rowIndex, l];
|
|
3694
|
+
this.setSelector(h, f);
|
|
3677
3695
|
}
|
|
3678
3696
|
}
|
|
3679
3697
|
}
|
|
@@ -3763,16 +3781,16 @@ class ui {
|
|
|
3763
3781
|
for (let h = 0; h <= r.length - 1; h++) {
|
|
3764
3782
|
const f = r[h].length;
|
|
3765
3783
|
for (let d = 0; d <= f - 1; d++) {
|
|
3766
|
-
const x = h + e, u = d + i,
|
|
3784
|
+
const x = h + e, u = d + i, p = r[h][d], g = this.ctx.database.getItemValueForRowIndexAndColIndex(
|
|
3767
3785
|
x,
|
|
3768
3786
|
u
|
|
3769
3787
|
);
|
|
3770
3788
|
if (g) {
|
|
3771
|
-
const { rowKey: w, key:
|
|
3772
|
-
this.ctx.database.getReadonly(w,
|
|
3789
|
+
const { rowKey: w, key: y } = g;
|
|
3790
|
+
this.ctx.database.getReadonly(w, y) || (s.add(w), n.push({
|
|
3773
3791
|
rowKey: w,
|
|
3774
|
-
key:
|
|
3775
|
-
value:
|
|
3792
|
+
key: y,
|
|
3793
|
+
value: p,
|
|
3776
3794
|
row: {}
|
|
3777
3795
|
//内部有设置
|
|
3778
3796
|
}));
|
|
@@ -3873,8 +3891,8 @@ class ui {
|
|
|
3873
3891
|
const { SCROLLER_TRACK_SIZE: h = 0, FOOTER_FIXED: f } = this.ctx.config;
|
|
3874
3892
|
let d = 0;
|
|
3875
3893
|
f && (d = r.visibleHeight);
|
|
3876
|
-
const x = s - e.drawX + 1, u = e.drawX + e.width - (t.width - i) + 1,
|
|
3877
|
-
u > 0 && !e.fixed ? this.ctx.setScrollX(n + u) : x > 0 && !e.fixed && this.ctx.setScrollX(n - x),
|
|
3894
|
+
const x = s - e.drawX + 1, u = e.drawX + e.width - (t.width - i) + 1, p = o.height - e.drawY, g = e.drawY + e.height - (t.height - d - h);
|
|
3895
|
+
u > 0 && !e.fixed ? this.ctx.setScrollX(n + u) : x > 0 && !e.fixed && this.ctx.setScrollX(n - x), p > 0 ? this.ctx.setScrollY(l - p) : g > 0 && this.ctx.setScrollY(l + g);
|
|
3878
3896
|
}
|
|
3879
3897
|
destroy() {
|
|
3880
3898
|
this.timerX && (clearTimeout(this.timerX), this.timerX = 0), this.timerY && (clearTimeout(this.timerY), this.timerY = 0);
|
|
@@ -3890,8 +3908,8 @@ class gi {
|
|
|
3890
3908
|
this.ctx.target.style.cursor === "crosshair" && (this.ctx.target.style.cursor = "default");
|
|
3891
3909
|
const { xArr: i, yArr: s } = this.ctx.selector, o = i[1], r = s[1], { colIndex: n, rowIndex: l, drawX: h, drawY: f, width: d, height: x } = t;
|
|
3892
3910
|
if (this.ctx.config.ENABLE_AUTOFILL && n === o && l === r) {
|
|
3893
|
-
const
|
|
3894
|
-
e.offsetX >
|
|
3911
|
+
const p = h + d - 6, g = f + x - 6;
|
|
3912
|
+
e.offsetX > p && e.offsetY > g && (this.ctx.target.style.cursor = "crosshair");
|
|
3895
3913
|
}
|
|
3896
3914
|
this.mouseenter(t);
|
|
3897
3915
|
}), this.ctx.on("cellMousedown", () => {
|
|
@@ -3930,11 +3948,18 @@ class gi {
|
|
|
3930
3948
|
r = [l, l];
|
|
3931
3949
|
}
|
|
3932
3950
|
if (JSON.stringify(this.ctx.autofill.xArr) !== JSON.stringify(r) || JSON.stringify(this.ctx.autofill.yArr) !== JSON.stringify(n)) {
|
|
3933
|
-
const {
|
|
3934
|
-
|
|
3935
|
-
|
|
3951
|
+
const {
|
|
3952
|
+
SELECTOR_AREA_MIN_X: l,
|
|
3953
|
+
SELECTOR_AREA_MAX_X: h,
|
|
3954
|
+
SELECTOR_AREA_MIN_Y: f,
|
|
3955
|
+
SELECTOR_AREA_MAX_Y: d,
|
|
3956
|
+
SELECTOR_AREA_MAX_X_OFFSET: x,
|
|
3957
|
+
SELECTOR_AREA_MAX_Y_OFFSET: u
|
|
3958
|
+
} = this.ctx.config, p = l, g = h || this.ctx.maxColIndex - x, w = f, y = d || this.ctx.maxRowIndex - u;
|
|
3959
|
+
let [C, m] = r, [E, b] = n;
|
|
3960
|
+
if (C < p || E < w)
|
|
3936
3961
|
return;
|
|
3937
|
-
this.ctx.autofill.xArr = [Math.max(
|
|
3962
|
+
this.ctx.autofill.xArr = [Math.max(p, C), Math.min(g, m)], this.ctx.autofill.yArr = [Math.max(w, E), Math.min(y, b)], this.ctx.emit("setAutofill", this.ctx.autofill), this.ctx.emit("draw");
|
|
3938
3963
|
}
|
|
3939
3964
|
}
|
|
3940
3965
|
/**
|
|
@@ -3944,18 +3969,18 @@ class gi {
|
|
|
3944
3969
|
const t = /* @__PURE__ */ new Set(), e = this.ctx.getSelectedData(), i = /* @__PURE__ */ new Map();
|
|
3945
3970
|
for (let d = 0; d <= e.yArr[1] - e.yArr[0]; d++)
|
|
3946
3971
|
for (let x = 0; x <= e.xArr[1] - e.xArr[0]; x++) {
|
|
3947
|
-
const u = d + e.yArr[0],
|
|
3948
|
-
i.set(`${u}-${
|
|
3972
|
+
const u = d + e.yArr[0], p = x + e.xArr[0];
|
|
3973
|
+
i.set(`${u}-${p}`, !0);
|
|
3949
3974
|
}
|
|
3950
3975
|
const { value: s } = e, o = s[0].length, r = s.length, n = this.ctx.autofill.xArr, l = this.ctx.autofill.yArr;
|
|
3951
3976
|
let h = [];
|
|
3952
3977
|
for (let d = 0; d <= l[1] - l[0]; d++)
|
|
3953
3978
|
for (let x = 0; x <= n[1] - n[0]; x++) {
|
|
3954
|
-
const u = x + n[0],
|
|
3955
|
-
if (w && !i.has(
|
|
3956
|
-
const { rowKey:
|
|
3957
|
-
this.ctx.database.getReadonly(
|
|
3958
|
-
rowKey:
|
|
3979
|
+
const u = x + n[0], p = d + l[0], g = s[d % r][x % o], w = this.ctx.database.getItemValueForRowIndexAndColIndex(p, u), y = `${p}-${u}`;
|
|
3980
|
+
if (w && !i.has(y)) {
|
|
3981
|
+
const { rowKey: C, key: m } = w;
|
|
3982
|
+
this.ctx.database.getReadonly(C, m) || (t.add(C), h.push({
|
|
3983
|
+
rowKey: C,
|
|
3959
3984
|
key: m,
|
|
3960
3985
|
value: g,
|
|
3961
3986
|
row: {}
|
|
@@ -3994,7 +4019,7 @@ const rt = Math.min, U = Math.max, ft = Math.round, z = (a) => ({
|
|
|
3994
4019
|
start: "end",
|
|
3995
4020
|
end: "start"
|
|
3996
4021
|
};
|
|
3997
|
-
function
|
|
4022
|
+
function It(a, t, e) {
|
|
3998
4023
|
return U(a, rt(t, e));
|
|
3999
4024
|
}
|
|
4000
4025
|
function at(a, t) {
|
|
@@ -4044,7 +4069,7 @@ function Ei(a, t, e) {
|
|
|
4044
4069
|
return [];
|
|
4045
4070
|
}
|
|
4046
4071
|
}
|
|
4047
|
-
function
|
|
4072
|
+
function Ci(a, t, e, i) {
|
|
4048
4073
|
const s = ct(a);
|
|
4049
4074
|
let o = Ei(q(a), e === "start", i);
|
|
4050
4075
|
return s && (o = o.map((r) => r + "-" + s), t && (o = o.concat(o.map(Ot)))), o;
|
|
@@ -4052,7 +4077,7 @@ function bi(a, t, e, i) {
|
|
|
4052
4077
|
function xt(a) {
|
|
4053
4078
|
return a.replace(/left|right|bottom|top/g, (t) => wi[t]);
|
|
4054
4079
|
}
|
|
4055
|
-
function
|
|
4080
|
+
function bi(a) {
|
|
4056
4081
|
return {
|
|
4057
4082
|
top: 0,
|
|
4058
4083
|
right: 0,
|
|
@@ -4062,7 +4087,7 @@ function Ci(a) {
|
|
|
4062
4087
|
};
|
|
4063
4088
|
}
|
|
4064
4089
|
function oe(a) {
|
|
4065
|
-
return typeof a != "number" ?
|
|
4090
|
+
return typeof a != "number" ? bi(a) : {
|
|
4066
4091
|
top: a,
|
|
4067
4092
|
right: a,
|
|
4068
4093
|
bottom: a,
|
|
@@ -4149,17 +4174,17 @@ const vi = async (a, t, e) => {
|
|
|
4149
4174
|
}), {
|
|
4150
4175
|
x: f,
|
|
4151
4176
|
y: d
|
|
4152
|
-
} = Vt(h, i, l), x = i, u = {},
|
|
4177
|
+
} = Vt(h, i, l), x = i, u = {}, p = 0;
|
|
4153
4178
|
for (let g = 0; g < n.length; g++) {
|
|
4154
4179
|
const {
|
|
4155
4180
|
name: w,
|
|
4156
|
-
fn:
|
|
4181
|
+
fn: y
|
|
4157
4182
|
} = n[g], {
|
|
4158
|
-
x:
|
|
4183
|
+
x: C,
|
|
4159
4184
|
y: m,
|
|
4160
|
-
data:
|
|
4161
|
-
reset:
|
|
4162
|
-
} = await
|
|
4185
|
+
data: E,
|
|
4186
|
+
reset: b
|
|
4187
|
+
} = await y({
|
|
4163
4188
|
x: f,
|
|
4164
4189
|
y: d,
|
|
4165
4190
|
initialPlacement: i,
|
|
@@ -4173,17 +4198,17 @@ const vi = async (a, t, e) => {
|
|
|
4173
4198
|
floating: t
|
|
4174
4199
|
}
|
|
4175
4200
|
});
|
|
4176
|
-
f =
|
|
4201
|
+
f = C ?? f, d = m ?? d, u = {
|
|
4177
4202
|
...u,
|
|
4178
4203
|
[w]: {
|
|
4179
4204
|
...u[w],
|
|
4180
|
-
...
|
|
4205
|
+
...E
|
|
4181
4206
|
}
|
|
4182
|
-
},
|
|
4207
|
+
}, b && p <= 50 && (p++, typeof b == "object" && (b.placement && (x = b.placement), b.rects && (h = b.rects === !0 ? await r.getElementRects({
|
|
4183
4208
|
reference: a,
|
|
4184
4209
|
floating: t,
|
|
4185
4210
|
strategy: s
|
|
4186
|
-
}) :
|
|
4211
|
+
}) : b.rects), {
|
|
4187
4212
|
x: f,
|
|
4188
4213
|
y: d
|
|
4189
4214
|
} = Vt(h, x, l)), g = -1);
|
|
@@ -4212,33 +4237,33 @@ async function ne(a, t) {
|
|
|
4212
4237
|
elementContext: d = "floating",
|
|
4213
4238
|
altBoundary: x = !1,
|
|
4214
4239
|
padding: u = 0
|
|
4215
|
-
} = at(t, a),
|
|
4240
|
+
} = at(t, a), p = oe(u), w = n[x ? d === "floating" ? "reference" : "floating" : d], y = ut(await o.getClippingRect({
|
|
4216
4241
|
element: (e = await (o.isElement == null ? void 0 : o.isElement(w))) == null || e ? w : w.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(n.floating)),
|
|
4217
4242
|
boundary: h,
|
|
4218
4243
|
rootBoundary: f,
|
|
4219
4244
|
strategy: l
|
|
4220
|
-
})),
|
|
4245
|
+
})), C = d === "floating" ? {
|
|
4221
4246
|
x: i,
|
|
4222
4247
|
y: s,
|
|
4223
4248
|
width: r.floating.width,
|
|
4224
4249
|
height: r.floating.height
|
|
4225
|
-
} : r.reference, m = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(n.floating)),
|
|
4250
|
+
} : r.reference, m = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(n.floating)), E = await (o.isElement == null ? void 0 : o.isElement(m)) ? await (o.getScale == null ? void 0 : o.getScale(m)) || {
|
|
4226
4251
|
x: 1,
|
|
4227
4252
|
y: 1
|
|
4228
4253
|
} : {
|
|
4229
4254
|
x: 1,
|
|
4230
4255
|
y: 1
|
|
4231
|
-
},
|
|
4256
|
+
}, b = ut(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
4232
4257
|
elements: n,
|
|
4233
|
-
rect:
|
|
4258
|
+
rect: C,
|
|
4234
4259
|
offsetParent: m,
|
|
4235
4260
|
strategy: l
|
|
4236
|
-
}) :
|
|
4261
|
+
}) : C);
|
|
4237
4262
|
return {
|
|
4238
|
-
top: (
|
|
4239
|
-
bottom: (
|
|
4240
|
-
left: (
|
|
4241
|
-
right: (
|
|
4263
|
+
top: (y.top - b.top + p.top) / E.y,
|
|
4264
|
+
bottom: (b.bottom - y.bottom + p.bottom) / E.y,
|
|
4265
|
+
left: (y.left - b.left + p.left) / E.x,
|
|
4266
|
+
right: (b.right - y.right + p.right) / E.x
|
|
4242
4267
|
};
|
|
4243
4268
|
}
|
|
4244
4269
|
const Ri = (a) => ({
|
|
@@ -4262,23 +4287,23 @@ const Ri = (a) => ({
|
|
|
4262
4287
|
const d = oe(f), x = {
|
|
4263
4288
|
x: e,
|
|
4264
4289
|
y: i
|
|
4265
|
-
}, u = Ht(s),
|
|
4290
|
+
}, u = Ht(s), p = Mt(u), g = await r.getDimensions(h), w = u === "y", y = w ? "top" : "left", C = w ? "bottom" : "right", m = w ? "clientHeight" : "clientWidth", E = o.reference[p] + o.reference[u] - x[u] - o.floating[p], b = x[u] - o.reference[u], R = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(h));
|
|
4266
4291
|
let T = R ? R[m] : 0;
|
|
4267
|
-
(!T || !await (r.isElement == null ? void 0 : r.isElement(R))) && (T = n.floating[m] || o.floating[
|
|
4268
|
-
const L =
|
|
4292
|
+
(!T || !await (r.isElement == null ? void 0 : r.isElement(R))) && (T = n.floating[m] || o.floating[p]);
|
|
4293
|
+
const L = E / 2 - b / 2, A = T / 2 - g[p] / 2 - 1, D = rt(d[y], A), B = rt(d[C], A), I = D, S = T - g[p] - B, O = T / 2 - g[p] / 2 + L, G = It(I, O, S), Y = !l.arrow && ct(s) != null && O !== G && o.reference[p] / 2 - (O < I ? D : B) - g[p] / 2 < 0, k = Y ? O < I ? O - I : O - S : 0;
|
|
4269
4294
|
return {
|
|
4270
|
-
[u]: x[u] +
|
|
4295
|
+
[u]: x[u] + k,
|
|
4271
4296
|
data: {
|
|
4272
4297
|
[u]: G,
|
|
4273
|
-
centerOffset: O - G -
|
|
4298
|
+
centerOffset: O - G - k,
|
|
4274
4299
|
...Y && {
|
|
4275
|
-
alignmentOffset:
|
|
4300
|
+
alignmentOffset: k
|
|
4276
4301
|
}
|
|
4277
4302
|
},
|
|
4278
4303
|
reset: Y
|
|
4279
4304
|
};
|
|
4280
4305
|
}
|
|
4281
|
-
}),
|
|
4306
|
+
}), _i = function(a) {
|
|
4282
4307
|
return a === void 0 && (a = {}), {
|
|
4283
4308
|
name: "flip",
|
|
4284
4309
|
options: a,
|
|
@@ -4296,25 +4321,25 @@ const Ri = (a) => ({
|
|
|
4296
4321
|
crossAxis: d = !0,
|
|
4297
4322
|
fallbackPlacements: x,
|
|
4298
4323
|
fallbackStrategy: u = "bestFit",
|
|
4299
|
-
fallbackAxisSideDirection:
|
|
4324
|
+
fallbackAxisSideDirection: p = "none",
|
|
4300
4325
|
flipAlignment: g = !0,
|
|
4301
4326
|
...w
|
|
4302
4327
|
} = at(a, t);
|
|
4303
4328
|
if ((e = o.arrow) != null && e.alignmentOffset)
|
|
4304
4329
|
return {};
|
|
4305
|
-
const
|
|
4306
|
-
!x && R &&
|
|
4307
|
-
const T = [n, ...
|
|
4330
|
+
const y = q(s), C = J(n), m = q(n) === n, E = await (l.isRTL == null ? void 0 : l.isRTL(h.floating)), b = x || (m || !g ? [xt(n)] : mi(n)), R = p !== "none";
|
|
4331
|
+
!x && R && b.push(...Ci(n, g, p, E));
|
|
4332
|
+
const T = [n, ...b], L = await ne(t, w), A = [];
|
|
4308
4333
|
let D = ((i = o.flip) == null ? void 0 : i.overflows) || [];
|
|
4309
|
-
if (f && A.push(L[
|
|
4310
|
-
const O = yi(s, r,
|
|
4334
|
+
if (f && A.push(L[y]), d) {
|
|
4335
|
+
const O = yi(s, r, E);
|
|
4311
4336
|
A.push(L[O[0]], L[O[1]]);
|
|
4312
4337
|
}
|
|
4313
4338
|
if (D = [...D, {
|
|
4314
4339
|
placement: s,
|
|
4315
4340
|
overflows: A
|
|
4316
4341
|
}], !A.every((O) => O <= 0)) {
|
|
4317
|
-
var B,
|
|
4342
|
+
var B, I;
|
|
4318
4343
|
const O = (((B = o.flip) == null ? void 0 : B.index) || 0) + 1, G = T[O];
|
|
4319
4344
|
if (G)
|
|
4320
4345
|
return {
|
|
@@ -4326,21 +4351,21 @@ const Ri = (a) => ({
|
|
|
4326
4351
|
placement: G
|
|
4327
4352
|
}
|
|
4328
4353
|
};
|
|
4329
|
-
let Y = (
|
|
4354
|
+
let Y = (I = D.filter((k) => k.overflows[0] <= 0).sort((k, W) => k.overflows[1] - W.overflows[1])[0]) == null ? void 0 : I.placement;
|
|
4330
4355
|
if (!Y)
|
|
4331
4356
|
switch (u) {
|
|
4332
4357
|
case "bestFit": {
|
|
4333
4358
|
var S;
|
|
4334
|
-
const
|
|
4359
|
+
const k = (S = D.filter((W) => {
|
|
4335
4360
|
if (R) {
|
|
4336
4361
|
const P = J(W.placement);
|
|
4337
|
-
return P ===
|
|
4362
|
+
return P === C || // Create a bias to the `y` side axis due to horizontal
|
|
4338
4363
|
// reading directions favoring greater width.
|
|
4339
4364
|
P === "y";
|
|
4340
4365
|
}
|
|
4341
4366
|
return !0;
|
|
4342
4367
|
}).map((W) => [W.placement, W.overflows.filter((P) => P > 0).reduce((P, ye) => P + ye, 0)]).sort((W, P) => W[1] - P[1])[0]) == null ? void 0 : S[0];
|
|
4343
|
-
|
|
4368
|
+
k && (Y = k);
|
|
4344
4369
|
break;
|
|
4345
4370
|
}
|
|
4346
4371
|
case "initialPlacement":
|
|
@@ -4358,7 +4383,7 @@ const Ri = (a) => ({
|
|
|
4358
4383
|
}
|
|
4359
4384
|
};
|
|
4360
4385
|
};
|
|
4361
|
-
async function
|
|
4386
|
+
async function Ii(a, t) {
|
|
4362
4387
|
const {
|
|
4363
4388
|
placement: e,
|
|
4364
4389
|
platform: i,
|
|
@@ -4367,7 +4392,7 @@ async function _i(a, t) {
|
|
|
4367
4392
|
let {
|
|
4368
4393
|
mainAxis: x,
|
|
4369
4394
|
crossAxis: u,
|
|
4370
|
-
alignmentAxis:
|
|
4395
|
+
alignmentAxis: p
|
|
4371
4396
|
} = typeof d == "number" ? {
|
|
4372
4397
|
mainAxis: d,
|
|
4373
4398
|
crossAxis: 0,
|
|
@@ -4377,7 +4402,7 @@ async function _i(a, t) {
|
|
|
4377
4402
|
crossAxis: d.crossAxis || 0,
|
|
4378
4403
|
alignmentAxis: d.alignmentAxis
|
|
4379
4404
|
};
|
|
4380
|
-
return n && typeof
|
|
4405
|
+
return n && typeof p == "number" && (u = n === "end" ? p * -1 : p), l ? {
|
|
4381
4406
|
x: u * f,
|
|
4382
4407
|
y: x * h
|
|
4383
4408
|
} : {
|
|
@@ -4396,7 +4421,7 @@ const Oi = function(a) {
|
|
|
4396
4421
|
y: o,
|
|
4397
4422
|
placement: r,
|
|
4398
4423
|
middlewareData: n
|
|
4399
|
-
} = t, l = await
|
|
4424
|
+
} = t, l = await Ii(t, a);
|
|
4400
4425
|
return r === ((e = n.offset) == null ? void 0 : e.placement) && (i = n.arrow) != null && i.alignmentOffset ? {} : {
|
|
4401
4426
|
x: s + l.x,
|
|
4402
4427
|
y: o + l.y,
|
|
@@ -4422,12 +4447,12 @@ const Oi = function(a) {
|
|
|
4422
4447
|
limiter: n = {
|
|
4423
4448
|
fn: (w) => {
|
|
4424
4449
|
let {
|
|
4425
|
-
x:
|
|
4426
|
-
y:
|
|
4450
|
+
x: y,
|
|
4451
|
+
y: C
|
|
4427
4452
|
} = w;
|
|
4428
4453
|
return {
|
|
4429
|
-
x:
|
|
4430
|
-
y:
|
|
4454
|
+
x: y,
|
|
4455
|
+
y: C
|
|
4431
4456
|
};
|
|
4432
4457
|
}
|
|
4433
4458
|
},
|
|
@@ -4436,19 +4461,19 @@ const Oi = function(a) {
|
|
|
4436
4461
|
x: e,
|
|
4437
4462
|
y: i
|
|
4438
4463
|
}, f = await ne(t, l), d = J(q(s)), x = re(d);
|
|
4439
|
-
let u = h[x],
|
|
4464
|
+
let u = h[x], p = h[d];
|
|
4440
4465
|
if (o) {
|
|
4441
|
-
const w = x === "y" ? "top" : "left",
|
|
4442
|
-
u =
|
|
4466
|
+
const w = x === "y" ? "top" : "left", y = x === "y" ? "bottom" : "right", C = u + f[w], m = u - f[y];
|
|
4467
|
+
u = It(C, u, m);
|
|
4443
4468
|
}
|
|
4444
4469
|
if (r) {
|
|
4445
|
-
const w = d === "y" ? "top" : "left",
|
|
4446
|
-
|
|
4470
|
+
const w = d === "y" ? "top" : "left", y = d === "y" ? "bottom" : "right", C = p + f[w], m = p - f[y];
|
|
4471
|
+
p = It(C, p, m);
|
|
4447
4472
|
}
|
|
4448
4473
|
const g = n.fn({
|
|
4449
4474
|
...t,
|
|
4450
4475
|
[x]: u,
|
|
4451
|
-
[d]:
|
|
4476
|
+
[d]: p
|
|
4452
4477
|
});
|
|
4453
4478
|
return {
|
|
4454
4479
|
...g,
|
|
@@ -4484,7 +4509,7 @@ function ae(a) {
|
|
|
4484
4509
|
function X(a) {
|
|
4485
4510
|
return gt() ? a instanceof Element || a instanceof H(a).Element : !1;
|
|
4486
4511
|
}
|
|
4487
|
-
function
|
|
4512
|
+
function N(a) {
|
|
4488
4513
|
return gt() ? a instanceof HTMLElement || a instanceof H(a).HTMLElement : !1;
|
|
4489
4514
|
}
|
|
4490
4515
|
function $t(a) {
|
|
@@ -4496,7 +4521,7 @@ function lt(a) {
|
|
|
4496
4521
|
overflowX: e,
|
|
4497
4522
|
overflowY: i,
|
|
4498
4523
|
display: s
|
|
4499
|
-
} =
|
|
4524
|
+
} = F(a);
|
|
4500
4525
|
return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !["inline", "contents"].includes(s);
|
|
4501
4526
|
}
|
|
4502
4527
|
function Ti(a) {
|
|
@@ -4512,12 +4537,12 @@ function wt(a) {
|
|
|
4512
4537
|
});
|
|
4513
4538
|
}
|
|
4514
4539
|
function Dt(a) {
|
|
4515
|
-
const t = Xt(), e = X(a) ?
|
|
4540
|
+
const t = Xt(), e = X(a) ? F(a) : a;
|
|
4516
4541
|
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));
|
|
4517
4542
|
}
|
|
4518
4543
|
function Li(a) {
|
|
4519
4544
|
let t = V(a);
|
|
4520
|
-
for (;
|
|
4545
|
+
for (; N(t) && !Q(t); ) {
|
|
4521
4546
|
if (Dt(t))
|
|
4522
4547
|
return t;
|
|
4523
4548
|
if (wt(t))
|
|
@@ -4532,7 +4557,7 @@ function Xt() {
|
|
|
4532
4557
|
function Q(a) {
|
|
4533
4558
|
return ["html", "body", "#document"].includes(tt(a));
|
|
4534
4559
|
}
|
|
4535
|
-
function
|
|
4560
|
+
function F(a) {
|
|
4536
4561
|
return H(a).getComputedStyle(a);
|
|
4537
4562
|
}
|
|
4538
4563
|
function pt(a) {
|
|
@@ -4558,7 +4583,7 @@ function V(a) {
|
|
|
4558
4583
|
}
|
|
4559
4584
|
function ce(a) {
|
|
4560
4585
|
const t = V(a);
|
|
4561
|
-
return Q(t) ? a.ownerDocument ? a.ownerDocument.body : a.body :
|
|
4586
|
+
return Q(t) ? a.ownerDocument ? a.ownerDocument.body : a.body : N(t) && lt(t) ? t : ce(t);
|
|
4562
4587
|
}
|
|
4563
4588
|
function St(a, t, e) {
|
|
4564
4589
|
var i;
|
|
@@ -4574,9 +4599,9 @@ function Tt(a) {
|
|
|
4574
4599
|
return a.parent && Object.getPrototypeOf(a.parent) ? a.frameElement : null;
|
|
4575
4600
|
}
|
|
4576
4601
|
function le(a) {
|
|
4577
|
-
const t =
|
|
4602
|
+
const t = F(a);
|
|
4578
4603
|
let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
|
|
4579
|
-
const s =
|
|
4604
|
+
const s = N(a), o = s ? a.offsetWidth : e, r = s ? a.offsetHeight : i, n = ft(e) !== o || ft(i) !== r;
|
|
4580
4605
|
return n && (e = o, i = r), {
|
|
4581
4606
|
width: e,
|
|
4582
4607
|
height: i,
|
|
@@ -4588,7 +4613,7 @@ function he(a) {
|
|
|
4588
4613
|
}
|
|
4589
4614
|
function Z(a) {
|
|
4590
4615
|
const t = he(a);
|
|
4591
|
-
if (!
|
|
4616
|
+
if (!N(t))
|
|
4592
4617
|
return z(1);
|
|
4593
4618
|
const e = t.getBoundingClientRect(), {
|
|
4594
4619
|
width: i,
|
|
@@ -4621,10 +4646,10 @@ function ot(a, t, e, i) {
|
|
|
4621
4646
|
let l = (s.left + n.x) / r.x, h = (s.top + n.y) / r.y, f = s.width / r.x, d = s.height / r.y;
|
|
4622
4647
|
if (o) {
|
|
4623
4648
|
const x = H(o), u = i && X(i) ? H(i) : i;
|
|
4624
|
-
let
|
|
4625
|
-
for (; g && i && u !==
|
|
4626
|
-
const w = Z(g),
|
|
4627
|
-
l *= w.x, h *= w.y, f *= w.x, d *= w.y, l += m, h +=
|
|
4649
|
+
let p = x, g = Tt(p);
|
|
4650
|
+
for (; g && i && u !== p; ) {
|
|
4651
|
+
const w = Z(g), y = g.getBoundingClientRect(), C = F(g), m = y.left + (g.clientLeft + parseFloat(C.paddingLeft)) * w.x, E = y.top + (g.clientTop + parseFloat(C.paddingTop)) * w.y;
|
|
4652
|
+
l *= w.x, h *= w.y, f *= w.x, d *= w.y, l += m, h += E, p = H(g), g = Tt(p);
|
|
4628
4653
|
}
|
|
4629
4654
|
}
|
|
4630
4655
|
return ut({
|
|
@@ -4648,8 +4673,8 @@ function Hi(a) {
|
|
|
4648
4673
|
scrollLeft: 0,
|
|
4649
4674
|
scrollTop: 0
|
|
4650
4675
|
}, h = z(1);
|
|
4651
|
-
const f = z(0), d =
|
|
4652
|
-
if ((d || !d && !o) && ((tt(i) !== "body" || lt(r)) && (l = pt(i)),
|
|
4676
|
+
const f = z(0), d = N(i);
|
|
4677
|
+
if ((d || !d && !o) && ((tt(i) !== "body" || lt(r)) && (l = pt(i)), N(i))) {
|
|
4653
4678
|
const x = ot(i);
|
|
4654
4679
|
h = Z(i), f.x = x.x + i.clientLeft, f.y = x.y + i.clientTop;
|
|
4655
4680
|
}
|
|
@@ -4671,14 +4696,14 @@ function Xi(a) {
|
|
|
4671
4696
|
const t = K(a), e = pt(a), i = a.ownerDocument.body, s = U(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), o = U(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
|
|
4672
4697
|
let r = -e.scrollLeft + Lt(a);
|
|
4673
4698
|
const n = -e.scrollTop;
|
|
4674
|
-
return
|
|
4699
|
+
return F(i).direction === "rtl" && (r += U(t.clientWidth, i.clientWidth) - s), {
|
|
4675
4700
|
width: s,
|
|
4676
4701
|
height: o,
|
|
4677
4702
|
x: r,
|
|
4678
4703
|
y: n
|
|
4679
4704
|
};
|
|
4680
4705
|
}
|
|
4681
|
-
function
|
|
4706
|
+
function Fi(a, t) {
|
|
4682
4707
|
const e = H(a), i = K(a), s = e.visualViewport;
|
|
4683
4708
|
let o = i.clientWidth, r = i.clientHeight, n = 0, l = 0;
|
|
4684
4709
|
if (s) {
|
|
@@ -4693,8 +4718,8 @@ function ki(a, t) {
|
|
|
4693
4718
|
y: l
|
|
4694
4719
|
};
|
|
4695
4720
|
}
|
|
4696
|
-
function
|
|
4697
|
-
const e = ot(a, !0, t === "fixed"), i = e.top + a.clientTop, s = e.left + a.clientLeft, o =
|
|
4721
|
+
function ki(a, t) {
|
|
4722
|
+
const e = ot(a, !0, t === "fixed"), i = e.top + a.clientTop, s = e.left + a.clientLeft, o = N(a) ? Z(a) : z(1), r = a.clientWidth * o.x, n = a.clientHeight * o.y, l = s * o.x, h = i * o.y;
|
|
4698
4723
|
return {
|
|
4699
4724
|
width: r,
|
|
4700
4725
|
height: n,
|
|
@@ -4705,11 +4730,11 @@ function Ni(a, t) {
|
|
|
4705
4730
|
function qt(a, t, e) {
|
|
4706
4731
|
let i;
|
|
4707
4732
|
if (t === "viewport")
|
|
4708
|
-
i =
|
|
4733
|
+
i = Fi(a, e);
|
|
4709
4734
|
else if (t === "document")
|
|
4710
4735
|
i = Xi(K(a));
|
|
4711
4736
|
else if (X(t))
|
|
4712
|
-
i =
|
|
4737
|
+
i = ki(t, e);
|
|
4713
4738
|
else {
|
|
4714
4739
|
const s = de(a);
|
|
4715
4740
|
i = {
|
|
@@ -4722,17 +4747,17 @@ function qt(a, t, e) {
|
|
|
4722
4747
|
}
|
|
4723
4748
|
function fe(a, t) {
|
|
4724
4749
|
const e = V(a);
|
|
4725
|
-
return e === t || !X(e) || Q(e) ? !1 :
|
|
4750
|
+
return e === t || !X(e) || Q(e) ? !1 : F(e).position === "fixed" || fe(e, t);
|
|
4726
4751
|
}
|
|
4727
|
-
function
|
|
4752
|
+
function Ni(a, t) {
|
|
4728
4753
|
const e = t.get(a);
|
|
4729
4754
|
if (e)
|
|
4730
4755
|
return e;
|
|
4731
4756
|
let i = St(a, [], !1).filter((n) => X(n) && tt(n) !== "body"), s = null;
|
|
4732
|
-
const o =
|
|
4757
|
+
const o = F(a).position === "fixed";
|
|
4733
4758
|
let r = o ? V(a) : a;
|
|
4734
4759
|
for (; X(r) && !Q(r); ) {
|
|
4735
|
-
const n =
|
|
4760
|
+
const n = F(r), l = Dt(r);
|
|
4736
4761
|
!l && n.position === "fixed" && (s = null), (o ? !l && !s : !l && n.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || lt(r) && !l && fe(a, r)) ? i = i.filter((f) => f !== r) : s = n, r = V(r);
|
|
4737
4762
|
}
|
|
4738
4763
|
return t.set(a, i), i;
|
|
@@ -4744,7 +4769,7 @@ function Yi(a) {
|
|
|
4744
4769
|
rootBoundary: i,
|
|
4745
4770
|
strategy: s
|
|
4746
4771
|
} = a;
|
|
4747
|
-
const r = [...e === "clippingAncestors" ? wt(t) ? [] :
|
|
4772
|
+
const r = [...e === "clippingAncestors" ? wt(t) ? [] : Ni(t, this._c) : [].concat(e), i], n = r[0], l = r.reduce((h, f) => {
|
|
4748
4773
|
const d = qt(t, f, s);
|
|
4749
4774
|
return h.top = U(d.top, h.top), h.right = rt(d.right, h.right), h.bottom = rt(d.bottom, h.bottom), h.left = U(d.left, h.left), h;
|
|
4750
4775
|
}, qt(t, n, s));
|
|
@@ -4766,7 +4791,7 @@ function Ki(a) {
|
|
|
4766
4791
|
};
|
|
4767
4792
|
}
|
|
4768
4793
|
function Bi(a, t, e) {
|
|
4769
|
-
const i =
|
|
4794
|
+
const i = N(t), s = K(t), o = e === "fixed", r = ot(a, !0, o, t);
|
|
4770
4795
|
let n = {
|
|
4771
4796
|
scrollLeft: 0,
|
|
4772
4797
|
scrollTop: 0
|
|
@@ -4792,10 +4817,10 @@ function Bi(a, t, e) {
|
|
|
4792
4817
|
};
|
|
4793
4818
|
}
|
|
4794
4819
|
function mt(a) {
|
|
4795
|
-
return
|
|
4820
|
+
return F(a).position === "static";
|
|
4796
4821
|
}
|
|
4797
4822
|
function Gt(a, t) {
|
|
4798
|
-
if (!
|
|
4823
|
+
if (!N(a) || F(a).position === "fixed")
|
|
4799
4824
|
return null;
|
|
4800
4825
|
if (t)
|
|
4801
4826
|
return t(a);
|
|
@@ -4806,7 +4831,7 @@ function xe(a, t) {
|
|
|
4806
4831
|
const e = H(a);
|
|
4807
4832
|
if (wt(a))
|
|
4808
4833
|
return e;
|
|
4809
|
-
if (!
|
|
4834
|
+
if (!N(a)) {
|
|
4810
4835
|
let s = V(a);
|
|
4811
4836
|
for (; s && !Q(s); ) {
|
|
4812
4837
|
if (X(s) && !mt(s))
|
|
@@ -4833,7 +4858,7 @@ const Wi = async function(a) {
|
|
|
4833
4858
|
};
|
|
4834
4859
|
};
|
|
4835
4860
|
function Pi(a) {
|
|
4836
|
-
return
|
|
4861
|
+
return F(a).direction === "rtl";
|
|
4837
4862
|
}
|
|
4838
4863
|
const zi = {
|
|
4839
4864
|
convertOffsetParentRelativeRectToViewportRelativeRect: Hi,
|
|
@@ -4846,7 +4871,7 @@ const zi = {
|
|
|
4846
4871
|
getScale: Z,
|
|
4847
4872
|
isElement: X,
|
|
4848
4873
|
isRTL: Pi
|
|
4849
|
-
}, ue = Oi, ge = Si, we =
|
|
4874
|
+
}, ue = Oi, ge = Si, we = _i, Vi = Ri, pe = (a, t, e) => {
|
|
4850
4875
|
const i = /* @__PURE__ */ new Map(), s = {
|
|
4851
4876
|
platform: zi,
|
|
4852
4877
|
...e
|
|
@@ -5240,7 +5265,7 @@ class ji {
|
|
|
5240
5265
|
height: `${r}px`
|
|
5241
5266
|
},
|
|
5242
5267
|
cells: l
|
|
5243
|
-
},
|
|
5268
|
+
}, p = {
|
|
5244
5269
|
key: "right",
|
|
5245
5270
|
style: {
|
|
5246
5271
|
position: "absolute",
|
|
@@ -5261,15 +5286,15 @@ class ji {
|
|
|
5261
5286
|
width: `${o}px`,
|
|
5262
5287
|
height: `${r}px`
|
|
5263
5288
|
},
|
|
5264
|
-
views: [x, u,
|
|
5289
|
+
views: [x, u, p]
|
|
5265
5290
|
};
|
|
5266
5291
|
}
|
|
5267
5292
|
getBody() {
|
|
5268
5293
|
const t = [], e = [], i = [];
|
|
5269
5294
|
let s = this.ctx.body.renderRows;
|
|
5270
5295
|
this.ctx.config.FOOTER_FIXED || (s = s.concat(this.ctx.footer.renderRows)), s.forEach((w) => {
|
|
5271
|
-
w.cells.forEach((
|
|
5272
|
-
|
|
5296
|
+
w.cells.forEach((y) => {
|
|
5297
|
+
y.cellType === "footer" && (y.render = y.renderFooter), y.render && (y.fixed === "left" ? e.push(y) : y.fixed === "right" ? i.push(y) : t.push(y));
|
|
5273
5298
|
});
|
|
5274
5299
|
});
|
|
5275
5300
|
const {
|
|
@@ -5298,7 +5323,7 @@ class ji {
|
|
|
5298
5323
|
height: `${f}px`
|
|
5299
5324
|
},
|
|
5300
5325
|
cells: t
|
|
5301
|
-
},
|
|
5326
|
+
}, p = {
|
|
5302
5327
|
key: "right",
|
|
5303
5328
|
style: {
|
|
5304
5329
|
position: "absolute",
|
|
@@ -5319,7 +5344,7 @@ class ji {
|
|
|
5319
5344
|
width: `${h}px`,
|
|
5320
5345
|
height: `${f}px`
|
|
5321
5346
|
},
|
|
5322
|
-
views: [x, u,
|
|
5347
|
+
views: [x, u, p]
|
|
5323
5348
|
};
|
|
5324
5349
|
}
|
|
5325
5350
|
getFooter() {
|
|
@@ -5408,8 +5433,8 @@ class Ui {
|
|
|
5408
5433
|
pe(x, this.contextMenuEl, {
|
|
5409
5434
|
placement: "right-start",
|
|
5410
5435
|
middleware: [ue(), ge(), we()]
|
|
5411
|
-
}).then(({ x: u, y }) => {
|
|
5412
|
-
this.show(u,
|
|
5436
|
+
}).then(({ x: u, y: p }) => {
|
|
5437
|
+
this.show(u, p);
|
|
5413
5438
|
});
|
|
5414
5439
|
}), this.ctx.on("click", this.hide.bind(this)), this.ctx.on("onScroll", this.hide.bind(this)), this.ctx.on("resize", this.hide.bind(this));
|
|
5415
5440
|
}
|