e-virt-table 0.0.15 → 0.0.17
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 +317 -289
- 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 +22 -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
|
}
|
|
@@ -3688,14 +3706,17 @@ class ui {
|
|
|
3688
3706
|
}
|
|
3689
3707
|
click(t = !1) {
|
|
3690
3708
|
const { focusCell: e, clickCell: i } = this.ctx;
|
|
3691
|
-
if (e)
|
|
3709
|
+
if (!e)
|
|
3710
|
+
return;
|
|
3711
|
+
const { SELECTOR_AREA_MAX_Y: s, SELECTOR_AREA_MAX_Y_OFFSET: o } = this.ctx.config, r = s || this.ctx.maxRowIndex - o;
|
|
3712
|
+
if (!(e.rowIndex > r))
|
|
3692
3713
|
if (this.ctx.selector.enable = !0, i && t) {
|
|
3693
|
-
const { colIndex:
|
|
3694
|
-
this.setSelector(
|
|
3714
|
+
const { colIndex: n, rowIndex: l } = i, { colIndex: h, rowIndex: f } = e, d = Math.min(h, n), x = Math.max(h, n), u = Math.min(f, l), p = Math.max(f, l), g = [d, x], w = [u, p];
|
|
3715
|
+
this.setSelector(g, w);
|
|
3695
3716
|
} else {
|
|
3696
3717
|
this.ctx.emit("cellSelectedClick", e);
|
|
3697
|
-
const
|
|
3698
|
-
this.setSelector(
|
|
3718
|
+
const n = [e.colIndex, e.colIndex], l = [e.rowIndex, e.rowIndex];
|
|
3719
|
+
this.setSelector(n, l), this.adjustBoundaryPosition();
|
|
3699
3720
|
}
|
|
3700
3721
|
}
|
|
3701
3722
|
clearCopyLine() {
|
|
@@ -3763,16 +3784,16 @@ class ui {
|
|
|
3763
3784
|
for (let h = 0; h <= r.length - 1; h++) {
|
|
3764
3785
|
const f = r[h].length;
|
|
3765
3786
|
for (let d = 0; d <= f - 1; d++) {
|
|
3766
|
-
const x = h + e, u = d + i,
|
|
3787
|
+
const x = h + e, u = d + i, p = r[h][d], g = this.ctx.database.getItemValueForRowIndexAndColIndex(
|
|
3767
3788
|
x,
|
|
3768
3789
|
u
|
|
3769
3790
|
);
|
|
3770
3791
|
if (g) {
|
|
3771
|
-
const { rowKey: w, key:
|
|
3772
|
-
this.ctx.database.getReadonly(w,
|
|
3792
|
+
const { rowKey: w, key: y } = g;
|
|
3793
|
+
this.ctx.database.getReadonly(w, y) || (s.add(w), n.push({
|
|
3773
3794
|
rowKey: w,
|
|
3774
|
-
key:
|
|
3775
|
-
value:
|
|
3795
|
+
key: y,
|
|
3796
|
+
value: p,
|
|
3776
3797
|
row: {}
|
|
3777
3798
|
//内部有设置
|
|
3778
3799
|
}));
|
|
@@ -3873,8 +3894,8 @@ class ui {
|
|
|
3873
3894
|
const { SCROLLER_TRACK_SIZE: h = 0, FOOTER_FIXED: f } = this.ctx.config;
|
|
3874
3895
|
let d = 0;
|
|
3875
3896
|
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),
|
|
3897
|
+
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);
|
|
3898
|
+
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
3899
|
}
|
|
3879
3900
|
destroy() {
|
|
3880
3901
|
this.timerX && (clearTimeout(this.timerX), this.timerX = 0), this.timerY && (clearTimeout(this.timerY), this.timerY = 0);
|
|
@@ -3890,8 +3911,8 @@ class gi {
|
|
|
3890
3911
|
this.ctx.target.style.cursor === "crosshair" && (this.ctx.target.style.cursor = "default");
|
|
3891
3912
|
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
3913
|
if (this.ctx.config.ENABLE_AUTOFILL && n === o && l === r) {
|
|
3893
|
-
const
|
|
3894
|
-
e.offsetX >
|
|
3914
|
+
const p = h + d - 6, g = f + x - 6;
|
|
3915
|
+
e.offsetX > p && e.offsetY > g && (this.ctx.target.style.cursor = "crosshair");
|
|
3895
3916
|
}
|
|
3896
3917
|
this.mouseenter(t);
|
|
3897
3918
|
}), this.ctx.on("cellMousedown", () => {
|
|
@@ -3930,11 +3951,18 @@ class gi {
|
|
|
3930
3951
|
r = [l, l];
|
|
3931
3952
|
}
|
|
3932
3953
|
if (JSON.stringify(this.ctx.autofill.xArr) !== JSON.stringify(r) || JSON.stringify(this.ctx.autofill.yArr) !== JSON.stringify(n)) {
|
|
3933
|
-
const {
|
|
3934
|
-
|
|
3935
|
-
|
|
3954
|
+
const {
|
|
3955
|
+
SELECTOR_AREA_MIN_X: l,
|
|
3956
|
+
SELECTOR_AREA_MAX_X: h,
|
|
3957
|
+
SELECTOR_AREA_MIN_Y: f,
|
|
3958
|
+
SELECTOR_AREA_MAX_Y: d,
|
|
3959
|
+
SELECTOR_AREA_MAX_X_OFFSET: x,
|
|
3960
|
+
SELECTOR_AREA_MAX_Y_OFFSET: u
|
|
3961
|
+
} = this.ctx.config, p = l, g = h || this.ctx.maxColIndex - x, w = f, y = d || this.ctx.maxRowIndex - u;
|
|
3962
|
+
let [C, m] = r, [E, b] = n;
|
|
3963
|
+
if (C < p || E < w)
|
|
3936
3964
|
return;
|
|
3937
|
-
this.ctx.autofill.xArr = [Math.max(
|
|
3965
|
+
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
3966
|
}
|
|
3939
3967
|
}
|
|
3940
3968
|
/**
|
|
@@ -3944,18 +3972,18 @@ class gi {
|
|
|
3944
3972
|
const t = /* @__PURE__ */ new Set(), e = this.ctx.getSelectedData(), i = /* @__PURE__ */ new Map();
|
|
3945
3973
|
for (let d = 0; d <= e.yArr[1] - e.yArr[0]; d++)
|
|
3946
3974
|
for (let x = 0; x <= e.xArr[1] - e.xArr[0]; x++) {
|
|
3947
|
-
const u = d + e.yArr[0],
|
|
3948
|
-
i.set(`${u}-${
|
|
3975
|
+
const u = d + e.yArr[0], p = x + e.xArr[0];
|
|
3976
|
+
i.set(`${u}-${p}`, !0);
|
|
3949
3977
|
}
|
|
3950
3978
|
const { value: s } = e, o = s[0].length, r = s.length, n = this.ctx.autofill.xArr, l = this.ctx.autofill.yArr;
|
|
3951
3979
|
let h = [];
|
|
3952
3980
|
for (let d = 0; d <= l[1] - l[0]; d++)
|
|
3953
3981
|
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:
|
|
3982
|
+
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}`;
|
|
3983
|
+
if (w && !i.has(y)) {
|
|
3984
|
+
const { rowKey: C, key: m } = w;
|
|
3985
|
+
this.ctx.database.getReadonly(C, m) || (t.add(C), h.push({
|
|
3986
|
+
rowKey: C,
|
|
3959
3987
|
key: m,
|
|
3960
3988
|
value: g,
|
|
3961
3989
|
row: {}
|
|
@@ -3994,7 +4022,7 @@ const rt = Math.min, U = Math.max, ft = Math.round, z = (a) => ({
|
|
|
3994
4022
|
start: "end",
|
|
3995
4023
|
end: "start"
|
|
3996
4024
|
};
|
|
3997
|
-
function
|
|
4025
|
+
function It(a, t, e) {
|
|
3998
4026
|
return U(a, rt(t, e));
|
|
3999
4027
|
}
|
|
4000
4028
|
function at(a, t) {
|
|
@@ -4044,7 +4072,7 @@ function Ei(a, t, e) {
|
|
|
4044
4072
|
return [];
|
|
4045
4073
|
}
|
|
4046
4074
|
}
|
|
4047
|
-
function
|
|
4075
|
+
function Ci(a, t, e, i) {
|
|
4048
4076
|
const s = ct(a);
|
|
4049
4077
|
let o = Ei(q(a), e === "start", i);
|
|
4050
4078
|
return s && (o = o.map((r) => r + "-" + s), t && (o = o.concat(o.map(Ot)))), o;
|
|
@@ -4052,7 +4080,7 @@ function bi(a, t, e, i) {
|
|
|
4052
4080
|
function xt(a) {
|
|
4053
4081
|
return a.replace(/left|right|bottom|top/g, (t) => wi[t]);
|
|
4054
4082
|
}
|
|
4055
|
-
function
|
|
4083
|
+
function bi(a) {
|
|
4056
4084
|
return {
|
|
4057
4085
|
top: 0,
|
|
4058
4086
|
right: 0,
|
|
@@ -4062,7 +4090,7 @@ function Ci(a) {
|
|
|
4062
4090
|
};
|
|
4063
4091
|
}
|
|
4064
4092
|
function oe(a) {
|
|
4065
|
-
return typeof a != "number" ?
|
|
4093
|
+
return typeof a != "number" ? bi(a) : {
|
|
4066
4094
|
top: a,
|
|
4067
4095
|
right: a,
|
|
4068
4096
|
bottom: a,
|
|
@@ -4149,17 +4177,17 @@ const vi = async (a, t, e) => {
|
|
|
4149
4177
|
}), {
|
|
4150
4178
|
x: f,
|
|
4151
4179
|
y: d
|
|
4152
|
-
} = Vt(h, i, l), x = i, u = {},
|
|
4180
|
+
} = Vt(h, i, l), x = i, u = {}, p = 0;
|
|
4153
4181
|
for (let g = 0; g < n.length; g++) {
|
|
4154
4182
|
const {
|
|
4155
4183
|
name: w,
|
|
4156
|
-
fn:
|
|
4184
|
+
fn: y
|
|
4157
4185
|
} = n[g], {
|
|
4158
|
-
x:
|
|
4186
|
+
x: C,
|
|
4159
4187
|
y: m,
|
|
4160
|
-
data:
|
|
4161
|
-
reset:
|
|
4162
|
-
} = await
|
|
4188
|
+
data: E,
|
|
4189
|
+
reset: b
|
|
4190
|
+
} = await y({
|
|
4163
4191
|
x: f,
|
|
4164
4192
|
y: d,
|
|
4165
4193
|
initialPlacement: i,
|
|
@@ -4173,17 +4201,17 @@ const vi = async (a, t, e) => {
|
|
|
4173
4201
|
floating: t
|
|
4174
4202
|
}
|
|
4175
4203
|
});
|
|
4176
|
-
f =
|
|
4204
|
+
f = C ?? f, d = m ?? d, u = {
|
|
4177
4205
|
...u,
|
|
4178
4206
|
[w]: {
|
|
4179
4207
|
...u[w],
|
|
4180
|
-
...
|
|
4208
|
+
...E
|
|
4181
4209
|
}
|
|
4182
|
-
},
|
|
4210
|
+
}, b && p <= 50 && (p++, typeof b == "object" && (b.placement && (x = b.placement), b.rects && (h = b.rects === !0 ? await r.getElementRects({
|
|
4183
4211
|
reference: a,
|
|
4184
4212
|
floating: t,
|
|
4185
4213
|
strategy: s
|
|
4186
|
-
}) :
|
|
4214
|
+
}) : b.rects), {
|
|
4187
4215
|
x: f,
|
|
4188
4216
|
y: d
|
|
4189
4217
|
} = Vt(h, x, l)), g = -1);
|
|
@@ -4212,33 +4240,33 @@ async function ne(a, t) {
|
|
|
4212
4240
|
elementContext: d = "floating",
|
|
4213
4241
|
altBoundary: x = !1,
|
|
4214
4242
|
padding: u = 0
|
|
4215
|
-
} = at(t, a),
|
|
4243
|
+
} = at(t, a), p = oe(u), w = n[x ? d === "floating" ? "reference" : "floating" : d], y = ut(await o.getClippingRect({
|
|
4216
4244
|
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
4245
|
boundary: h,
|
|
4218
4246
|
rootBoundary: f,
|
|
4219
4247
|
strategy: l
|
|
4220
|
-
})),
|
|
4248
|
+
})), C = d === "floating" ? {
|
|
4221
4249
|
x: i,
|
|
4222
4250
|
y: s,
|
|
4223
4251
|
width: r.floating.width,
|
|
4224
4252
|
height: r.floating.height
|
|
4225
|
-
} : r.reference, m = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(n.floating)),
|
|
4253
|
+
} : 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
4254
|
x: 1,
|
|
4227
4255
|
y: 1
|
|
4228
4256
|
} : {
|
|
4229
4257
|
x: 1,
|
|
4230
4258
|
y: 1
|
|
4231
|
-
},
|
|
4259
|
+
}, b = ut(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
4232
4260
|
elements: n,
|
|
4233
|
-
rect:
|
|
4261
|
+
rect: C,
|
|
4234
4262
|
offsetParent: m,
|
|
4235
4263
|
strategy: l
|
|
4236
|
-
}) :
|
|
4264
|
+
}) : C);
|
|
4237
4265
|
return {
|
|
4238
|
-
top: (
|
|
4239
|
-
bottom: (
|
|
4240
|
-
left: (
|
|
4241
|
-
right: (
|
|
4266
|
+
top: (y.top - b.top + p.top) / E.y,
|
|
4267
|
+
bottom: (b.bottom - y.bottom + p.bottom) / E.y,
|
|
4268
|
+
left: (y.left - b.left + p.left) / E.x,
|
|
4269
|
+
right: (b.right - y.right + p.right) / E.x
|
|
4242
4270
|
};
|
|
4243
4271
|
}
|
|
4244
4272
|
const Ri = (a) => ({
|
|
@@ -4262,23 +4290,23 @@ const Ri = (a) => ({
|
|
|
4262
4290
|
const d = oe(f), x = {
|
|
4263
4291
|
x: e,
|
|
4264
4292
|
y: i
|
|
4265
|
-
}, u = Ht(s),
|
|
4293
|
+
}, 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
4294
|
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 =
|
|
4295
|
+
(!T || !await (r.isElement == null ? void 0 : r.isElement(R))) && (T = n.floating[m] || o.floating[p]);
|
|
4296
|
+
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
4297
|
return {
|
|
4270
|
-
[u]: x[u] +
|
|
4298
|
+
[u]: x[u] + k,
|
|
4271
4299
|
data: {
|
|
4272
4300
|
[u]: G,
|
|
4273
|
-
centerOffset: O - G -
|
|
4301
|
+
centerOffset: O - G - k,
|
|
4274
4302
|
...Y && {
|
|
4275
|
-
alignmentOffset:
|
|
4303
|
+
alignmentOffset: k
|
|
4276
4304
|
}
|
|
4277
4305
|
},
|
|
4278
4306
|
reset: Y
|
|
4279
4307
|
};
|
|
4280
4308
|
}
|
|
4281
|
-
}),
|
|
4309
|
+
}), _i = function(a) {
|
|
4282
4310
|
return a === void 0 && (a = {}), {
|
|
4283
4311
|
name: "flip",
|
|
4284
4312
|
options: a,
|
|
@@ -4296,25 +4324,25 @@ const Ri = (a) => ({
|
|
|
4296
4324
|
crossAxis: d = !0,
|
|
4297
4325
|
fallbackPlacements: x,
|
|
4298
4326
|
fallbackStrategy: u = "bestFit",
|
|
4299
|
-
fallbackAxisSideDirection:
|
|
4327
|
+
fallbackAxisSideDirection: p = "none",
|
|
4300
4328
|
flipAlignment: g = !0,
|
|
4301
4329
|
...w
|
|
4302
4330
|
} = at(a, t);
|
|
4303
4331
|
if ((e = o.arrow) != null && e.alignmentOffset)
|
|
4304
4332
|
return {};
|
|
4305
|
-
const
|
|
4306
|
-
!x && R &&
|
|
4307
|
-
const T = [n, ...
|
|
4333
|
+
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";
|
|
4334
|
+
!x && R && b.push(...Ci(n, g, p, E));
|
|
4335
|
+
const T = [n, ...b], L = await ne(t, w), A = [];
|
|
4308
4336
|
let D = ((i = o.flip) == null ? void 0 : i.overflows) || [];
|
|
4309
|
-
if (f && A.push(L[
|
|
4310
|
-
const O = yi(s, r,
|
|
4337
|
+
if (f && A.push(L[y]), d) {
|
|
4338
|
+
const O = yi(s, r, E);
|
|
4311
4339
|
A.push(L[O[0]], L[O[1]]);
|
|
4312
4340
|
}
|
|
4313
4341
|
if (D = [...D, {
|
|
4314
4342
|
placement: s,
|
|
4315
4343
|
overflows: A
|
|
4316
4344
|
}], !A.every((O) => O <= 0)) {
|
|
4317
|
-
var B,
|
|
4345
|
+
var B, I;
|
|
4318
4346
|
const O = (((B = o.flip) == null ? void 0 : B.index) || 0) + 1, G = T[O];
|
|
4319
4347
|
if (G)
|
|
4320
4348
|
return {
|
|
@@ -4326,21 +4354,21 @@ const Ri = (a) => ({
|
|
|
4326
4354
|
placement: G
|
|
4327
4355
|
}
|
|
4328
4356
|
};
|
|
4329
|
-
let Y = (
|
|
4357
|
+
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
4358
|
if (!Y)
|
|
4331
4359
|
switch (u) {
|
|
4332
4360
|
case "bestFit": {
|
|
4333
4361
|
var S;
|
|
4334
|
-
const
|
|
4362
|
+
const k = (S = D.filter((W) => {
|
|
4335
4363
|
if (R) {
|
|
4336
4364
|
const P = J(W.placement);
|
|
4337
|
-
return P ===
|
|
4365
|
+
return P === C || // Create a bias to the `y` side axis due to horizontal
|
|
4338
4366
|
// reading directions favoring greater width.
|
|
4339
4367
|
P === "y";
|
|
4340
4368
|
}
|
|
4341
4369
|
return !0;
|
|
4342
4370
|
}).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
|
-
|
|
4371
|
+
k && (Y = k);
|
|
4344
4372
|
break;
|
|
4345
4373
|
}
|
|
4346
4374
|
case "initialPlacement":
|
|
@@ -4358,7 +4386,7 @@ const Ri = (a) => ({
|
|
|
4358
4386
|
}
|
|
4359
4387
|
};
|
|
4360
4388
|
};
|
|
4361
|
-
async function
|
|
4389
|
+
async function Ii(a, t) {
|
|
4362
4390
|
const {
|
|
4363
4391
|
placement: e,
|
|
4364
4392
|
platform: i,
|
|
@@ -4367,7 +4395,7 @@ async function _i(a, t) {
|
|
|
4367
4395
|
let {
|
|
4368
4396
|
mainAxis: x,
|
|
4369
4397
|
crossAxis: u,
|
|
4370
|
-
alignmentAxis:
|
|
4398
|
+
alignmentAxis: p
|
|
4371
4399
|
} = typeof d == "number" ? {
|
|
4372
4400
|
mainAxis: d,
|
|
4373
4401
|
crossAxis: 0,
|
|
@@ -4377,7 +4405,7 @@ async function _i(a, t) {
|
|
|
4377
4405
|
crossAxis: d.crossAxis || 0,
|
|
4378
4406
|
alignmentAxis: d.alignmentAxis
|
|
4379
4407
|
};
|
|
4380
|
-
return n && typeof
|
|
4408
|
+
return n && typeof p == "number" && (u = n === "end" ? p * -1 : p), l ? {
|
|
4381
4409
|
x: u * f,
|
|
4382
4410
|
y: x * h
|
|
4383
4411
|
} : {
|
|
@@ -4396,7 +4424,7 @@ const Oi = function(a) {
|
|
|
4396
4424
|
y: o,
|
|
4397
4425
|
placement: r,
|
|
4398
4426
|
middlewareData: n
|
|
4399
|
-
} = t, l = await
|
|
4427
|
+
} = t, l = await Ii(t, a);
|
|
4400
4428
|
return r === ((e = n.offset) == null ? void 0 : e.placement) && (i = n.arrow) != null && i.alignmentOffset ? {} : {
|
|
4401
4429
|
x: s + l.x,
|
|
4402
4430
|
y: o + l.y,
|
|
@@ -4422,12 +4450,12 @@ const Oi = function(a) {
|
|
|
4422
4450
|
limiter: n = {
|
|
4423
4451
|
fn: (w) => {
|
|
4424
4452
|
let {
|
|
4425
|
-
x:
|
|
4426
|
-
y:
|
|
4453
|
+
x: y,
|
|
4454
|
+
y: C
|
|
4427
4455
|
} = w;
|
|
4428
4456
|
return {
|
|
4429
|
-
x:
|
|
4430
|
-
y:
|
|
4457
|
+
x: y,
|
|
4458
|
+
y: C
|
|
4431
4459
|
};
|
|
4432
4460
|
}
|
|
4433
4461
|
},
|
|
@@ -4436,19 +4464,19 @@ const Oi = function(a) {
|
|
|
4436
4464
|
x: e,
|
|
4437
4465
|
y: i
|
|
4438
4466
|
}, f = await ne(t, l), d = J(q(s)), x = re(d);
|
|
4439
|
-
let u = h[x],
|
|
4467
|
+
let u = h[x], p = h[d];
|
|
4440
4468
|
if (o) {
|
|
4441
|
-
const w = x === "y" ? "top" : "left",
|
|
4442
|
-
u =
|
|
4469
|
+
const w = x === "y" ? "top" : "left", y = x === "y" ? "bottom" : "right", C = u + f[w], m = u - f[y];
|
|
4470
|
+
u = It(C, u, m);
|
|
4443
4471
|
}
|
|
4444
4472
|
if (r) {
|
|
4445
|
-
const w = d === "y" ? "top" : "left",
|
|
4446
|
-
|
|
4473
|
+
const w = d === "y" ? "top" : "left", y = d === "y" ? "bottom" : "right", C = p + f[w], m = p - f[y];
|
|
4474
|
+
p = It(C, p, m);
|
|
4447
4475
|
}
|
|
4448
4476
|
const g = n.fn({
|
|
4449
4477
|
...t,
|
|
4450
4478
|
[x]: u,
|
|
4451
|
-
[d]:
|
|
4479
|
+
[d]: p
|
|
4452
4480
|
});
|
|
4453
4481
|
return {
|
|
4454
4482
|
...g,
|
|
@@ -4484,7 +4512,7 @@ function ae(a) {
|
|
|
4484
4512
|
function X(a) {
|
|
4485
4513
|
return gt() ? a instanceof Element || a instanceof H(a).Element : !1;
|
|
4486
4514
|
}
|
|
4487
|
-
function
|
|
4515
|
+
function N(a) {
|
|
4488
4516
|
return gt() ? a instanceof HTMLElement || a instanceof H(a).HTMLElement : !1;
|
|
4489
4517
|
}
|
|
4490
4518
|
function $t(a) {
|
|
@@ -4496,7 +4524,7 @@ function lt(a) {
|
|
|
4496
4524
|
overflowX: e,
|
|
4497
4525
|
overflowY: i,
|
|
4498
4526
|
display: s
|
|
4499
|
-
} =
|
|
4527
|
+
} = F(a);
|
|
4500
4528
|
return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !["inline", "contents"].includes(s);
|
|
4501
4529
|
}
|
|
4502
4530
|
function Ti(a) {
|
|
@@ -4512,12 +4540,12 @@ function wt(a) {
|
|
|
4512
4540
|
});
|
|
4513
4541
|
}
|
|
4514
4542
|
function Dt(a) {
|
|
4515
|
-
const t = Xt(), e = X(a) ?
|
|
4543
|
+
const t = Xt(), e = X(a) ? F(a) : a;
|
|
4516
4544
|
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
4545
|
}
|
|
4518
4546
|
function Li(a) {
|
|
4519
4547
|
let t = V(a);
|
|
4520
|
-
for (;
|
|
4548
|
+
for (; N(t) && !Q(t); ) {
|
|
4521
4549
|
if (Dt(t))
|
|
4522
4550
|
return t;
|
|
4523
4551
|
if (wt(t))
|
|
@@ -4532,7 +4560,7 @@ function Xt() {
|
|
|
4532
4560
|
function Q(a) {
|
|
4533
4561
|
return ["html", "body", "#document"].includes(tt(a));
|
|
4534
4562
|
}
|
|
4535
|
-
function
|
|
4563
|
+
function F(a) {
|
|
4536
4564
|
return H(a).getComputedStyle(a);
|
|
4537
4565
|
}
|
|
4538
4566
|
function pt(a) {
|
|
@@ -4558,7 +4586,7 @@ function V(a) {
|
|
|
4558
4586
|
}
|
|
4559
4587
|
function ce(a) {
|
|
4560
4588
|
const t = V(a);
|
|
4561
|
-
return Q(t) ? a.ownerDocument ? a.ownerDocument.body : a.body :
|
|
4589
|
+
return Q(t) ? a.ownerDocument ? a.ownerDocument.body : a.body : N(t) && lt(t) ? t : ce(t);
|
|
4562
4590
|
}
|
|
4563
4591
|
function St(a, t, e) {
|
|
4564
4592
|
var i;
|
|
@@ -4574,9 +4602,9 @@ function Tt(a) {
|
|
|
4574
4602
|
return a.parent && Object.getPrototypeOf(a.parent) ? a.frameElement : null;
|
|
4575
4603
|
}
|
|
4576
4604
|
function le(a) {
|
|
4577
|
-
const t =
|
|
4605
|
+
const t = F(a);
|
|
4578
4606
|
let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
|
|
4579
|
-
const s =
|
|
4607
|
+
const s = N(a), o = s ? a.offsetWidth : e, r = s ? a.offsetHeight : i, n = ft(e) !== o || ft(i) !== r;
|
|
4580
4608
|
return n && (e = o, i = r), {
|
|
4581
4609
|
width: e,
|
|
4582
4610
|
height: i,
|
|
@@ -4588,7 +4616,7 @@ function he(a) {
|
|
|
4588
4616
|
}
|
|
4589
4617
|
function Z(a) {
|
|
4590
4618
|
const t = he(a);
|
|
4591
|
-
if (!
|
|
4619
|
+
if (!N(t))
|
|
4592
4620
|
return z(1);
|
|
4593
4621
|
const e = t.getBoundingClientRect(), {
|
|
4594
4622
|
width: i,
|
|
@@ -4621,10 +4649,10 @@ function ot(a, t, e, i) {
|
|
|
4621
4649
|
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
4650
|
if (o) {
|
|
4623
4651
|
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 +=
|
|
4652
|
+
let p = x, g = Tt(p);
|
|
4653
|
+
for (; g && i && u !== p; ) {
|
|
4654
|
+
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;
|
|
4655
|
+
l *= w.x, h *= w.y, f *= w.x, d *= w.y, l += m, h += E, p = H(g), g = Tt(p);
|
|
4628
4656
|
}
|
|
4629
4657
|
}
|
|
4630
4658
|
return ut({
|
|
@@ -4648,8 +4676,8 @@ function Hi(a) {
|
|
|
4648
4676
|
scrollLeft: 0,
|
|
4649
4677
|
scrollTop: 0
|
|
4650
4678
|
}, h = z(1);
|
|
4651
|
-
const f = z(0), d =
|
|
4652
|
-
if ((d || !d && !o) && ((tt(i) !== "body" || lt(r)) && (l = pt(i)),
|
|
4679
|
+
const f = z(0), d = N(i);
|
|
4680
|
+
if ((d || !d && !o) && ((tt(i) !== "body" || lt(r)) && (l = pt(i)), N(i))) {
|
|
4653
4681
|
const x = ot(i);
|
|
4654
4682
|
h = Z(i), f.x = x.x + i.clientLeft, f.y = x.y + i.clientTop;
|
|
4655
4683
|
}
|
|
@@ -4671,14 +4699,14 @@ function Xi(a) {
|
|
|
4671
4699
|
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
4700
|
let r = -e.scrollLeft + Lt(a);
|
|
4673
4701
|
const n = -e.scrollTop;
|
|
4674
|
-
return
|
|
4702
|
+
return F(i).direction === "rtl" && (r += U(t.clientWidth, i.clientWidth) - s), {
|
|
4675
4703
|
width: s,
|
|
4676
4704
|
height: o,
|
|
4677
4705
|
x: r,
|
|
4678
4706
|
y: n
|
|
4679
4707
|
};
|
|
4680
4708
|
}
|
|
4681
|
-
function
|
|
4709
|
+
function Fi(a, t) {
|
|
4682
4710
|
const e = H(a), i = K(a), s = e.visualViewport;
|
|
4683
4711
|
let o = i.clientWidth, r = i.clientHeight, n = 0, l = 0;
|
|
4684
4712
|
if (s) {
|
|
@@ -4693,8 +4721,8 @@ function ki(a, t) {
|
|
|
4693
4721
|
y: l
|
|
4694
4722
|
};
|
|
4695
4723
|
}
|
|
4696
|
-
function
|
|
4697
|
-
const e = ot(a, !0, t === "fixed"), i = e.top + a.clientTop, s = e.left + a.clientLeft, o =
|
|
4724
|
+
function ki(a, t) {
|
|
4725
|
+
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
4726
|
return {
|
|
4699
4727
|
width: r,
|
|
4700
4728
|
height: n,
|
|
@@ -4705,11 +4733,11 @@ function Ni(a, t) {
|
|
|
4705
4733
|
function qt(a, t, e) {
|
|
4706
4734
|
let i;
|
|
4707
4735
|
if (t === "viewport")
|
|
4708
|
-
i =
|
|
4736
|
+
i = Fi(a, e);
|
|
4709
4737
|
else if (t === "document")
|
|
4710
4738
|
i = Xi(K(a));
|
|
4711
4739
|
else if (X(t))
|
|
4712
|
-
i =
|
|
4740
|
+
i = ki(t, e);
|
|
4713
4741
|
else {
|
|
4714
4742
|
const s = de(a);
|
|
4715
4743
|
i = {
|
|
@@ -4722,17 +4750,17 @@ function qt(a, t, e) {
|
|
|
4722
4750
|
}
|
|
4723
4751
|
function fe(a, t) {
|
|
4724
4752
|
const e = V(a);
|
|
4725
|
-
return e === t || !X(e) || Q(e) ? !1 :
|
|
4753
|
+
return e === t || !X(e) || Q(e) ? !1 : F(e).position === "fixed" || fe(e, t);
|
|
4726
4754
|
}
|
|
4727
|
-
function
|
|
4755
|
+
function Ni(a, t) {
|
|
4728
4756
|
const e = t.get(a);
|
|
4729
4757
|
if (e)
|
|
4730
4758
|
return e;
|
|
4731
4759
|
let i = St(a, [], !1).filter((n) => X(n) && tt(n) !== "body"), s = null;
|
|
4732
|
-
const o =
|
|
4760
|
+
const o = F(a).position === "fixed";
|
|
4733
4761
|
let r = o ? V(a) : a;
|
|
4734
4762
|
for (; X(r) && !Q(r); ) {
|
|
4735
|
-
const n =
|
|
4763
|
+
const n = F(r), l = Dt(r);
|
|
4736
4764
|
!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
4765
|
}
|
|
4738
4766
|
return t.set(a, i), i;
|
|
@@ -4744,7 +4772,7 @@ function Yi(a) {
|
|
|
4744
4772
|
rootBoundary: i,
|
|
4745
4773
|
strategy: s
|
|
4746
4774
|
} = a;
|
|
4747
|
-
const r = [...e === "clippingAncestors" ? wt(t) ? [] :
|
|
4775
|
+
const r = [...e === "clippingAncestors" ? wt(t) ? [] : Ni(t, this._c) : [].concat(e), i], n = r[0], l = r.reduce((h, f) => {
|
|
4748
4776
|
const d = qt(t, f, s);
|
|
4749
4777
|
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
4778
|
}, qt(t, n, s));
|
|
@@ -4766,7 +4794,7 @@ function Ki(a) {
|
|
|
4766
4794
|
};
|
|
4767
4795
|
}
|
|
4768
4796
|
function Bi(a, t, e) {
|
|
4769
|
-
const i =
|
|
4797
|
+
const i = N(t), s = K(t), o = e === "fixed", r = ot(a, !0, o, t);
|
|
4770
4798
|
let n = {
|
|
4771
4799
|
scrollLeft: 0,
|
|
4772
4800
|
scrollTop: 0
|
|
@@ -4792,10 +4820,10 @@ function Bi(a, t, e) {
|
|
|
4792
4820
|
};
|
|
4793
4821
|
}
|
|
4794
4822
|
function mt(a) {
|
|
4795
|
-
return
|
|
4823
|
+
return F(a).position === "static";
|
|
4796
4824
|
}
|
|
4797
4825
|
function Gt(a, t) {
|
|
4798
|
-
if (!
|
|
4826
|
+
if (!N(a) || F(a).position === "fixed")
|
|
4799
4827
|
return null;
|
|
4800
4828
|
if (t)
|
|
4801
4829
|
return t(a);
|
|
@@ -4806,7 +4834,7 @@ function xe(a, t) {
|
|
|
4806
4834
|
const e = H(a);
|
|
4807
4835
|
if (wt(a))
|
|
4808
4836
|
return e;
|
|
4809
|
-
if (!
|
|
4837
|
+
if (!N(a)) {
|
|
4810
4838
|
let s = V(a);
|
|
4811
4839
|
for (; s && !Q(s); ) {
|
|
4812
4840
|
if (X(s) && !mt(s))
|
|
@@ -4833,7 +4861,7 @@ const Wi = async function(a) {
|
|
|
4833
4861
|
};
|
|
4834
4862
|
};
|
|
4835
4863
|
function Pi(a) {
|
|
4836
|
-
return
|
|
4864
|
+
return F(a).direction === "rtl";
|
|
4837
4865
|
}
|
|
4838
4866
|
const zi = {
|
|
4839
4867
|
convertOffsetParentRelativeRectToViewportRelativeRect: Hi,
|
|
@@ -4846,7 +4874,7 @@ const zi = {
|
|
|
4846
4874
|
getScale: Z,
|
|
4847
4875
|
isElement: X,
|
|
4848
4876
|
isRTL: Pi
|
|
4849
|
-
}, ue = Oi, ge = Si, we =
|
|
4877
|
+
}, ue = Oi, ge = Si, we = _i, Vi = Ri, pe = (a, t, e) => {
|
|
4850
4878
|
const i = /* @__PURE__ */ new Map(), s = {
|
|
4851
4879
|
platform: zi,
|
|
4852
4880
|
...e
|
|
@@ -5240,7 +5268,7 @@ class ji {
|
|
|
5240
5268
|
height: `${r}px`
|
|
5241
5269
|
},
|
|
5242
5270
|
cells: l
|
|
5243
|
-
},
|
|
5271
|
+
}, p = {
|
|
5244
5272
|
key: "right",
|
|
5245
5273
|
style: {
|
|
5246
5274
|
position: "absolute",
|
|
@@ -5261,15 +5289,15 @@ class ji {
|
|
|
5261
5289
|
width: `${o}px`,
|
|
5262
5290
|
height: `${r}px`
|
|
5263
5291
|
},
|
|
5264
|
-
views: [x, u,
|
|
5292
|
+
views: [x, u, p]
|
|
5265
5293
|
};
|
|
5266
5294
|
}
|
|
5267
5295
|
getBody() {
|
|
5268
5296
|
const t = [], e = [], i = [];
|
|
5269
5297
|
let s = this.ctx.body.renderRows;
|
|
5270
5298
|
this.ctx.config.FOOTER_FIXED || (s = s.concat(this.ctx.footer.renderRows)), s.forEach((w) => {
|
|
5271
|
-
w.cells.forEach((
|
|
5272
|
-
|
|
5299
|
+
w.cells.forEach((y) => {
|
|
5300
|
+
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
5301
|
});
|
|
5274
5302
|
});
|
|
5275
5303
|
const {
|
|
@@ -5298,7 +5326,7 @@ class ji {
|
|
|
5298
5326
|
height: `${f}px`
|
|
5299
5327
|
},
|
|
5300
5328
|
cells: t
|
|
5301
|
-
},
|
|
5329
|
+
}, p = {
|
|
5302
5330
|
key: "right",
|
|
5303
5331
|
style: {
|
|
5304
5332
|
position: "absolute",
|
|
@@ -5319,7 +5347,7 @@ class ji {
|
|
|
5319
5347
|
width: `${h}px`,
|
|
5320
5348
|
height: `${f}px`
|
|
5321
5349
|
},
|
|
5322
|
-
views: [x, u,
|
|
5350
|
+
views: [x, u, p]
|
|
5323
5351
|
};
|
|
5324
5352
|
}
|
|
5325
5353
|
getFooter() {
|
|
@@ -5408,8 +5436,8 @@ class Ui {
|
|
|
5408
5436
|
pe(x, this.contextMenuEl, {
|
|
5409
5437
|
placement: "right-start",
|
|
5410
5438
|
middleware: [ue(), ge(), we()]
|
|
5411
|
-
}).then(({ x: u, y }) => {
|
|
5412
|
-
this.show(u,
|
|
5439
|
+
}).then(({ x: u, y: p }) => {
|
|
5440
|
+
this.show(u, p);
|
|
5413
5441
|
});
|
|
5414
5442
|
}), 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
5443
|
}
|