e-virt-table 1.1.5 → 1.1.6

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.es.js CHANGED
@@ -43,13 +43,13 @@ function dt(a, t, e) {
43
43
  return o && st(c, o.prototype), c;
44
44
  }, dt.apply(null, arguments);
45
45
  }
46
- function _e(a) {
46
+ function Ie(a) {
47
47
  return Function.toString.call(a).indexOf("[native code]") !== -1;
48
48
  }
49
49
  function Ct(a) {
50
50
  var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
51
51
  return Ct = function(i) {
52
- if (i === null || !_e(i)) return i;
52
+ if (i === null || !Ie(i)) return i;
53
53
  if (typeof i != "function")
54
54
  throw new TypeError("Super expression must either be null or a function");
55
55
  if (typeof t < "u") {
@@ -69,7 +69,7 @@ function Ct(a) {
69
69
  }), st(s, i);
70
70
  }, Ct(a);
71
71
  }
72
- var Ie = /%[sdj%]/g, jt = function() {
72
+ var _e = /%[sdj%]/g, jt = function() {
73
73
  };
74
74
  typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (jt = function(t, e) {
75
75
  typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && e.every(function(i) {
@@ -91,7 +91,7 @@ function D(a) {
91
91
  if (typeof a == "function")
92
92
  return a.apply(null, e);
93
93
  if (typeof a == "string") {
94
- var o = a.replace(Ie, function(n) {
94
+ var o = a.replace(_e, function(n) {
95
95
  if (n === "%%")
96
96
  return "%";
97
97
  if (s >= r)
@@ -221,8 +221,8 @@ var Ut = function(t, e, i, s, r, o) {
221
221
  }, ct, De = function() {
222
222
  if (ct)
223
223
  return ct;
224
- var a = "[a-fA-F\\d:]", t = function(E) {
225
- return E && E.includeBoundaries ? "(?:(?<=\\s|^)(?=" + a + ")|(?<=" + a + ")(?=\\s|$))" : "";
224
+ var a = "[a-fA-F\\d:]", t = function(C) {
225
+ return C && C.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, r, o) {
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(), r = new RegExp("(?:^" + e + "$)|(?:^" + s + "$)"), o = new RegExp("^" + e + "$"), n = new RegExp("^" + s + "$"), h = function(E) {
238
- return E && E.exact ? r : new RegExp("(?:" + t(E) + e + t(E) + ")|(?:" + t(E) + s + t(E) + ")", "g");
237
+ `).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), r = new RegExp("(?:^" + e + "$)|(?:^" + s + "$)"), o = new RegExp("^" + e + "$"), n = new RegExp("^" + s + "$"), h = function(C) {
238
+ return C && C.exact ? r : new RegExp("(?:" + t(C) + e + t(C) + ")|(?:" + t(C) + s + t(C) + ")", "g");
239
239
  };
240
240
  h.v4 = function(m) {
241
241
  return m && m.exact ? o : new RegExp("" + t(m) + e + t(m), "g");
242
242
  }, h.v6 = function(m) {
243
243
  return m && m.exact ? n : new RegExp("" + t(m) + s + t(m), "g");
244
244
  };
245
- var c = "(?:(?:[a-z]+:)?//)", d = "(?:\\S+(?::\\S*)?@)?", f = h.v4().source, x = h.v6().source, g = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", p = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", u = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", w = "(?::\\d{2,5})?", y = '(?:[/?#][^\\s"]*)?', C = "(?:" + c + "|www\\.)" + d + "(?:localhost|" + f + "|" + x + "|" + g + p + u + ")" + w + y;
246
- return ct = new RegExp("(?:^" + C + "$)", "i"), ct;
245
+ var c = "(?:(?:[a-z]+:)?//)", d = "(?:\\S+(?::\\S*)?@)?", f = h.v4().source, x = h.v6().source, g = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", p = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", u = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", w = "(?::\\d{2,5})?", y = '(?:[/?#][^\\s"]*)?', E = "(?:" + c + "|www\\.)" + d + "(?:localhost|" + f + "|" + x + "|" + g + p + u + ")" + w + y;
246
+ return ct = new RegExp("(?:^" + E + "$)", "i"), ct;
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,}))$/,
@@ -315,7 +315,7 @@ var Ut = function(t, e, i, s, r, o) {
315
315
  o.test(e) || s.push(D(r.messages.pattern.mismatch, t.fullField, e, t.pattern));
316
316
  }
317
317
  }
318
- }, I = {
318
+ }, _ = {
319
319
  required: Ut,
320
320
  whitespace: He,
321
321
  type: Fe,
@@ -327,7 +327,7 @@ var Ut = function(t, e, i, s, r, o) {
327
327
  if (n) {
328
328
  if (H(e, "string") && !t.required)
329
329
  return i();
330
- I.required(t, e, s, o, r, "string"), H(e, "string") || (I.type(t, e, s, o, r), I.range(t, e, s, o, r), I.pattern(t, e, s, o, r), t.whitespace === !0 && I.whitespace(t, e, s, o, r));
330
+ _.required(t, e, s, o, r, "string"), H(e, "string") || (_.type(t, e, s, o, r), _.range(t, e, s, o, r), _.pattern(t, e, s, o, r), t.whitespace === !0 && _.whitespace(t, e, s, o, r));
331
331
  }
332
332
  i(o);
333
333
  }, Ke = function(t, e, i, s, r) {
@@ -335,7 +335,7 @@ var Ut = function(t, e, i, s, r, o) {
335
335
  if (n) {
336
336
  if (H(e) && !t.required)
337
337
  return i();
338
- I.required(t, e, s, o, r), e !== void 0 && I.type(t, e, s, o, r);
338
+ _.required(t, e, s, o, r), e !== void 0 && _.type(t, e, s, o, r);
339
339
  }
340
340
  i(o);
341
341
  }, Ye = function(t, e, i, s, r) {
@@ -343,7 +343,7 @@ var Ut = function(t, e, i, s, r, o) {
343
343
  if (n) {
344
344
  if (e === "" && (e = void 0), H(e) && !t.required)
345
345
  return i();
346
- I.required(t, e, s, o, r), e !== void 0 && (I.type(t, e, s, o, r), I.range(t, e, s, o, r));
346
+ _.required(t, e, s, o, r), e !== void 0 && (_.type(t, e, s, o, r), _.range(t, e, s, o, r));
347
347
  }
348
348
  i(o);
349
349
  }, Ve = function(t, e, i, s, r) {
@@ -351,7 +351,7 @@ var Ut = function(t, e, i, s, r, o) {
351
351
  if (n) {
352
352
  if (H(e) && !t.required)
353
353
  return i();
354
- I.required(t, e, s, o, r), e !== void 0 && I.type(t, e, s, o, r);
354
+ _.required(t, e, s, o, r), e !== void 0 && _.type(t, e, s, o, r);
355
355
  }
356
356
  i(o);
357
357
  }, We = function(t, e, i, s, r) {
@@ -359,7 +359,7 @@ var Ut = function(t, e, i, s, r, o) {
359
359
  if (n) {
360
360
  if (H(e) && !t.required)
361
361
  return i();
362
- I.required(t, e, s, o, r), H(e) || I.type(t, e, s, o, r);
362
+ _.required(t, e, s, o, r), H(e) || _.type(t, e, s, o, r);
363
363
  }
364
364
  i(o);
365
365
  }, Pe = function(t, e, i, s, r) {
@@ -367,7 +367,7 @@ var Ut = function(t, e, i, s, r, o) {
367
367
  if (n) {
368
368
  if (H(e) && !t.required)
369
369
  return i();
370
- I.required(t, e, s, o, r), e !== void 0 && (I.type(t, e, s, o, r), I.range(t, e, s, o, r));
370
+ _.required(t, e, s, o, r), e !== void 0 && (_.type(t, e, s, o, r), _.range(t, e, s, o, r));
371
371
  }
372
372
  i(o);
373
373
  }, ze = function(t, e, i, s, r) {
@@ -375,7 +375,7 @@ var Ut = function(t, e, i, s, r, o) {
375
375
  if (n) {
376
376
  if (H(e) && !t.required)
377
377
  return i();
378
- I.required(t, e, s, o, r), e !== void 0 && (I.type(t, e, s, o, r), I.range(t, e, s, o, r));
378
+ _.required(t, e, s, o, r), e !== void 0 && (_.type(t, e, s, o, r), _.range(t, e, s, o, r));
379
379
  }
380
380
  i(o);
381
381
  }, $e = function(t, e, i, s, r) {
@@ -383,7 +383,7 @@ var Ut = function(t, e, i, s, r, o) {
383
383
  if (n) {
384
384
  if (e == null && !t.required)
385
385
  return i();
386
- I.required(t, e, s, o, r, "array"), e != null && (I.type(t, e, s, o, r), I.range(t, e, s, o, r));
386
+ _.required(t, e, s, o, r, "array"), e != null && (_.type(t, e, s, o, r), _.range(t, e, s, o, r));
387
387
  }
388
388
  i(o);
389
389
  }, Ge = function(t, e, i, s, r) {
@@ -391,7 +391,7 @@ var Ut = function(t, e, i, s, r, o) {
391
391
  if (n) {
392
392
  if (H(e) && !t.required)
393
393
  return i();
394
- I.required(t, e, s, o, r), e !== void 0 && I.type(t, e, s, o, r);
394
+ _.required(t, e, s, o, r), e !== void 0 && _.type(t, e, s, o, r);
395
395
  }
396
396
  i(o);
397
397
  }, qe = "enum", je = function(t, e, i, s, r) {
@@ -399,7 +399,7 @@ var Ut = function(t, e, i, s, r, o) {
399
399
  if (n) {
400
400
  if (H(e) && !t.required)
401
401
  return i();
402
- I.required(t, e, s, o, r), e !== void 0 && I[qe](t, e, s, o, r);
402
+ _.required(t, e, s, o, r), e !== void 0 && _[qe](t, e, s, o, r);
403
403
  }
404
404
  i(o);
405
405
  }, Ue = function(t, e, i, s, r) {
@@ -407,7 +407,7 @@ var Ut = function(t, e, i, s, r, o) {
407
407
  if (n) {
408
408
  if (H(e, "string") && !t.required)
409
409
  return i();
410
- I.required(t, e, s, o, r), H(e, "string") || I.pattern(t, e, s, o, r);
410
+ _.required(t, e, s, o, r), H(e, "string") || _.pattern(t, e, s, o, r);
411
411
  }
412
412
  i(o);
413
413
  }, Ze = function(t, e, i, s, r) {
@@ -415,21 +415,21 @@ var Ut = function(t, e, i, s, r, o) {
415
415
  if (n) {
416
416
  if (H(e, "date") && !t.required)
417
417
  return i();
418
- if (I.required(t, e, s, o, r), !H(e, "date")) {
418
+ if (_.required(t, e, s, o, r), !H(e, "date")) {
419
419
  var h;
420
- e instanceof Date ? h = e : h = new Date(e), I.type(t, h, s, o, r), h && I.range(t, h.getTime(), s, o, r);
420
+ e instanceof Date ? h = e : h = new Date(e), _.type(t, h, s, o, r), h && _.range(t, h.getTime(), s, o, r);
421
421
  }
422
422
  }
423
423
  i(o);
424
424
  }, Je = function(t, e, i, s, r) {
425
425
  var o = [], n = Array.isArray(e) ? "array" : typeof e;
426
- I.required(t, e, s, o, r, n), i(o);
426
+ _.required(t, e, s, o, r, n), i(o);
427
427
  }, yt = function(t, e, i, s, r) {
428
428
  var o = t.type, n = [], h = t.required || !t.required && s.hasOwnProperty(t.field);
429
429
  if (h) {
430
430
  if (H(e, o) && !t.required)
431
431
  return i();
432
- I.required(t, e, s, n, r, o), H(e, o) || I.type(t, e, s, n, r);
432
+ _.required(t, e, s, n, r, o), H(e, o) || _.type(t, e, s, n, r);
433
433
  }
434
434
  i(n);
435
435
  }, Qe = function(t, e, i, s, r) {
@@ -437,7 +437,7 @@ var Ut = function(t, e, i, s, r, o) {
437
437
  if (n) {
438
438
  if (H(e) && !t.required)
439
439
  return i();
440
- I.required(t, e, s, o, r);
440
+ _.required(t, e, s, o, r);
441
441
  }
442
442
  i(o);
443
443
  }, it = {
@@ -538,15 +538,15 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
538
538
  return c && c(null, n), Promise.resolve(n);
539
539
  function d(u) {
540
540
  var w = [], y = {};
541
- function C(E) {
542
- if (Array.isArray(E)) {
541
+ function E(C) {
542
+ if (Array.isArray(C)) {
543
543
  var b;
544
- w = (b = w).concat.apply(b, E);
544
+ w = (b = w).concat.apply(b, C);
545
545
  } else
546
- w.push(E);
546
+ w.push(C);
547
547
  }
548
548
  for (var m = 0; m < u.length; m++)
549
- C(u[m]);
549
+ E(u[m]);
550
550
  w.length ? (y = bt(w), c(w, y)) : c(null, n);
551
551
  }
552
552
  if (h.messages) {
@@ -557,8 +557,8 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
557
557
  var x = {}, g = h.keys || Object.keys(this.rules);
558
558
  g.forEach(function(u) {
559
559
  var w = o.rules[u], y = n[u];
560
- w.forEach(function(C) {
561
- var m = C;
560
+ w.forEach(function(E) {
561
+ var m = E;
562
562
  typeof m.transform == "function" && (n === i && (n = G({}, n)), y = n[u] = m.transform(y)), typeof m == "function" ? m = {
563
563
  validator: m
564
564
  } : m = G({}, m), m.validator = o.getValidationMethod(m), m.validator && (m.field = u, m.fullField = m.fullField || u, m.type = o.getType(m), x[u] = x[u] || [], x[u].push({
@@ -571,36 +571,36 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
571
571
  });
572
572
  var p = {};
573
573
  return Ae(x, h, function(u, w) {
574
- var y = u.rule, C = (y.type === "object" || y.type === "array") && (typeof y.fields == "object" || typeof y.defaultField == "object");
575
- C = C && (y.required || !y.required && u.value), y.field = u.field;
576
- function m(R, O) {
574
+ var y = u.rule, E = (y.type === "object" || y.type === "array") && (typeof y.fields == "object" || typeof y.defaultField == "object");
575
+ E = E && (y.required || !y.required && u.value), y.field = u.field;
576
+ function m(v, O) {
577
577
  return G({}, O, {
578
- fullField: y.fullField + "." + R,
579
- fullFields: y.fullFields ? [].concat(y.fullFields, [R]) : [R]
578
+ fullField: y.fullField + "." + v,
579
+ fullFields: y.fullFields ? [].concat(y.fullFields, [v]) : [v]
580
580
  });
581
581
  }
582
- function E(R) {
583
- R === void 0 && (R = []);
584
- var O = Array.isArray(R) ? R : [R];
582
+ function C(v) {
583
+ v === void 0 && (v = []);
584
+ var O = Array.isArray(v) ? v : [v];
585
585
  !h.suppressWarning && O.length && a.warning("async-validator:", O), O.length && y.message !== void 0 && (O = [].concat(y.message));
586
586
  var L = O.map(Nt(y, n));
587
587
  if (h.first && L.length)
588
588
  return p[y.field] = 1, w(L);
589
- if (!C)
589
+ if (!E)
590
590
  w(L);
591
591
  else {
592
592
  if (y.required && !u.value)
593
593
  return y.message !== void 0 ? L = [].concat(y.message).map(Nt(y, n)) : h.error && (L = [h.error(y, D(h.messages.required, y.field))]), w(L);
594
- var _ = {};
594
+ var I = {};
595
595
  y.defaultField && Object.keys(u.value).map(function(S) {
596
- _[S] = y.defaultField;
597
- }), _ = G({}, _, u.rule.fields);
598
- var v = {};
599
- Object.keys(_).forEach(function(S) {
600
- var M = _[S], T = Array.isArray(M) ? M : [M];
601
- v[S] = T.map(m.bind(null, S));
596
+ I[S] = y.defaultField;
597
+ }), I = G({}, I, u.rule.fields);
598
+ var R = {};
599
+ Object.keys(I).forEach(function(S) {
600
+ var M = I[S], T = Array.isArray(M) ? M : [M];
601
+ R[S] = T.map(m.bind(null, S));
602
602
  });
603
- var A = new a(v);
603
+ var A = new a(R);
604
604
  A.messages(h.messages), u.rule.options && (u.rule.options.messages = h.messages, u.rule.options.error = h.error), A.validate(u.value, u.rule.options || h, function(S) {
605
605
  var M = [];
606
606
  L && L.length && M.push.apply(M, L), S && S.length && M.push.apply(M, S), w(M.length ? M : null);
@@ -609,21 +609,21 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
609
609
  }
610
610
  var b;
611
611
  if (y.asyncValidator)
612
- b = y.asyncValidator(y, u.value, E, u.source, h);
612
+ b = y.asyncValidator(y, u.value, C, u.source, h);
613
613
  else if (y.validator) {
614
614
  try {
615
- b = y.validator(y, u.value, E, u.source, h);
616
- } catch (R) {
617
- console.error == null || console.error(R), h.suppressValidatorError || setTimeout(function() {
618
- throw R;
619
- }, 0), E(R.message);
615
+ b = y.validator(y, u.value, C, u.source, h);
616
+ } catch (v) {
617
+ console.error == null || console.error(v), h.suppressValidatorError || setTimeout(function() {
618
+ throw v;
619
+ }, 0), C(v.message);
620
620
  }
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);
621
+ b === !0 ? C() : b === !1 ? C(typeof y.message == "function" ? y.message(y.fullField || y.field) : y.message || (y.fullField || y.field) + " fails") : b instanceof Array ? C(b) : b instanceof Error && C(b.message);
622
622
  }
623
623
  b && b.then && b.then(function() {
624
- return E();
625
- }, function(R) {
626
- return E(R);
624
+ return C();
625
+ }, function(v) {
626
+ return C(v);
627
627
  });
628
628
  }, function(u) {
629
629
  d(u);
@@ -702,10 +702,10 @@ function te(a = [], t = 1, e = 0) {
702
702
  };
703
703
  });
704
704
  }
705
- function _t(a = []) {
705
+ function It(a = []) {
706
706
  let t = [];
707
707
  return a.forEach((e) => {
708
- e.children ? t = t.concat(_t(e.children)) : t.push(e);
708
+ e.children ? t = t.concat(It(e.children)) : t.push(e);
709
709
  }), t;
710
710
  }
711
711
  const Yt = /^(\r\n|\n\r|\r|\n)/, ei = /^[^\t\r\n]+/, Vt = /^\t/;
@@ -1048,30 +1048,35 @@ class Tt extends se {
1048
1048
  STRIPE_COLOR: g
1049
1049
  } = this.ctx.config;
1050
1050
  if (this.cellType === "footer") {
1051
- let m = n, E = o;
1051
+ let b = n, v = o;
1052
1052
  if (typeof r == "function") {
1053
- const b = r, { backgroundColor: R, color: O } = b({
1053
+ const O = r, { backgroundColor: L, color: I } = O({
1054
1054
  row: this.row,
1055
1055
  rowIndex: this.rowIndex,
1056
1056
  colIndex: this.colIndex,
1057
1057
  column: this.column,
1058
1058
  value: this.getValue()
1059
1059
  }) || {};
1060
- R && (m = R), O && (E = O);
1060
+ L && (b = L), I && (v = I);
1061
1061
  }
1062
- this.drawCellSkyBgColor = "transparent", this.drawCellBgColor = m, this.drawTextColor = E;
1062
+ this.drawCellSkyBgColor = "transparent", this.drawCellBgColor = b, this.drawTextColor = v;
1063
1063
  return;
1064
1064
  }
1065
1065
  let p = "transparent";
1066
1066
  const u = this.ctx.focusCell, w = this.ctx.hoverCell;
1067
- d && (w == null ? void 0 : w.rowKey) === this.rowKey && (p = f), h && (u == null ? void 0 : u.rowKey) === this.rowKey && (p = c), this.drawCellSkyBgColor = p;
1068
- let y = e, C = o;
1067
+ let y = this.rowIndex, E = this.rowIndex;
1068
+ if (this.rowspan !== 1 && (d || h)) {
1069
+ const b = this.getSpanInfo(), { yArr: v } = b;
1070
+ y = v[0], E = v[1];
1071
+ }
1072
+ d && w && (w.rowKey === this.rowKey && (p = f), w.rowIndex >= y && w.rowIndex <= E && (p = f)), h && u && (u.rowKey === this.rowKey && (p = c), u.rowIndex >= y && u.rowIndex <= E && (p = c)), this.drawCellSkyBgColor = p;
1073
+ let m = e, C = o;
1069
1074
  if (["index", "index-selection", "selection"].includes(this.type)) {
1070
1075
  this.drawCellBgColor = e, this.drawTextColor = o;
1071
1076
  return;
1072
1077
  }
1073
- if (this.ctx.database.getReadonly(this.rowKey, this.key) || (y = i, C = o), x && (this.rowIndex % 2 ? y = g : y = e), typeof s == "function") {
1074
- const m = s, { backgroundColor: E, color: b } = m({
1078
+ if (this.ctx.database.getReadonly(this.rowKey, this.key) || (m = i, C = o), x && (this.rowIndex % 2 ? m = g : m = e), typeof s == "function") {
1079
+ const b = s, { backgroundColor: v, color: O } = b({
1075
1080
  row: this.row,
1076
1081
  rowIndex: this.rowIndex,
1077
1082
  colIndex: this.colIndex,
@@ -1079,9 +1084,9 @@ class Tt extends se {
1079
1084
  isHasChanged: this.isHasChanged,
1080
1085
  value: this.getValue()
1081
1086
  }) || {};
1082
- E && (y = E), b && (C = b);
1087
+ v && (m = v), O && (C = O);
1083
1088
  }
1084
- this.drawCellBgColor = y, this.drawTextColor = C;
1089
+ this.drawCellBgColor = m, this.drawTextColor = C;
1085
1090
  }
1086
1091
  updateSelection() {
1087
1092
  const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: r, cellType: o, type: n, rowIndex: h, rowKey: c } = this;
@@ -1092,21 +1097,31 @@ class Tt extends se {
1092
1097
  }
1093
1098
  }
1094
1099
  updateHoverIcon() {
1095
- const { BODY_CELL_HOVER_ICON_METHOD: e, CELL_HOVER_ICON_SIZE: i, CELL_PADDING: s } = this.ctx.config;
1096
- if (typeof e == "function") {
1097
- const h = e({
1100
+ if (this.ctx.database.getReadonly(this.rowKey, this.key))
1101
+ return;
1102
+ const { BODY_CELL_HOVER_ICON_METHOD: i, CELL_HOVER_ICON_SIZE: s, CELL_PADDING: r, ENABLE_MERGE_CELL_LINK: o } = this.ctx.config;
1103
+ if (typeof i == "function") {
1104
+ const c = i({
1098
1105
  row: this.row,
1099
1106
  rowIndex: this.rowIndex,
1100
1107
  colIndex: this.colIndex,
1101
1108
  column: this.column,
1102
1109
  value: this.getValue()
1103
1110
  });
1104
- h !== void 0 && (this.hoverIconName = h);
1111
+ c !== void 0 && (this.hoverIconName = c);
1105
1112
  }
1106
- const r = this.drawX + this.width - i - s, o = this.drawY + (this.height - i) / 2;
1107
- if (this.hoverIconName && this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === this.rowIndex) {
1108
- const n = this.ctx.icons.get(this.hoverIconName);
1109
- this.drawImageX = r, this.drawImageY = o, this.drawImageWidth = i, this.drawImageHeight = i, this.drawImageName = this.hoverIconName, this.drawImageSource = n;
1113
+ const { hoverCell: n } = this.ctx;
1114
+ if (this.hoverIconName && !this.ctx.editing && n) {
1115
+ let h = 0, c = 0;
1116
+ if (n.rowKey === this.rowKey && (h = this.drawX + this.width - s - r, c = this.drawY + (this.height - s) / 2), this.rowspan !== 1 && o) {
1117
+ const f = this.getSpanInfo(), { yArr: x } = f, g = x[0], p = x[1];
1118
+ if (n.rowIndex >= g && n.rowIndex <= p) {
1119
+ const { width: u, height: w, offsetTop: y, offsetLeft: E } = f;
1120
+ h = this.drawX - E + u - s - r, c = this.drawY - y + (w - s) / 2;
1121
+ }
1122
+ }
1123
+ const d = this.ctx.icons.get(this.hoverIconName);
1124
+ this.drawImageX = h, this.drawImageY = c, this.drawImageWidth = s, this.drawImageHeight = s, this.drawImageName = this.hoverIconName, this.drawImageSource = d;
1110
1125
  }
1111
1126
  }
1112
1127
  // 过去跨度配置
@@ -1228,21 +1243,17 @@ class Tt extends se {
1228
1243
  return s;
1229
1244
  }
1230
1245
  drawText() {
1231
- const { CELL_PADDING: e, BODY_FONT: i } = this.ctx.config, { ellipsis: s } = this.ctx.paint.handleEllipsis(this.text, this.width, e, i);
1232
- return this.ellipsis = s, this.ctx.paint.drawText(
1233
- this.displayText,
1234
- this.drawTextX,
1235
- this.drawTextY,
1236
- this.visibleWidth,
1237
- this.visibleHeight,
1238
- {
1239
- font: i,
1240
- padding: e,
1241
- align: this.align,
1242
- verticalAlign: this.verticalAlign,
1243
- color: this.drawTextColor
1244
- }
1245
- );
1246
+ const { CELL_PADDING: e, BODY_FONT: i, PLACEHOLDER_COLOR: s } = this.ctx.config, { ellipsis: r } = this.ctx.paint.handleEllipsis(this.text, this.width, e, i);
1247
+ this.ellipsis = r;
1248
+ const { placeholder: o } = this.column;
1249
+ let n = this.displayText, h = this.drawTextColor;
1250
+ return o && ["", null, void 0].includes(this.text) && this.cellType === "body" && (n = o, h = s), this.ctx.paint.drawText(n, this.drawTextX, this.drawTextY, this.visibleWidth, this.visibleHeight, {
1251
+ font: i,
1252
+ padding: e,
1253
+ align: this.align,
1254
+ verticalAlign: this.verticalAlign,
1255
+ color: h
1256
+ });
1246
1257
  }
1247
1258
  drawImage() {
1248
1259
  this.drawImageSource && this.ctx.paint.drawImage(
@@ -1312,10 +1323,10 @@ class Tt extends se {
1312
1323
  drawBorder(e) {
1313
1324
  const { drawX: i, drawY: s, rowIndex: r, colIndex: o, height: n, width: h } = this;
1314
1325
  let c = i, d = s;
1315
- const { xArr: f, yArr: x, lineDash: g = [], borderWidth: p = 1, borderColor: u, fillColor: w } = e, y = f[0], C = f[1], m = x[0], E = x[1];
1316
- if (o >= y && o <= C && r === m) {
1317
- const b = o === C ? 1 : 0, R = o === y ? 1 : 0;
1318
- this.ctx.paint.drawLine([c + R, d + 1, c + h - b, d + 1], {
1326
+ const { xArr: f, yArr: x, lineDash: g = [], borderWidth: p = 1, borderColor: u, fillColor: w } = e, y = f[0], E = f[1], m = x[0], C = x[1];
1327
+ if (o >= y && o <= E && r === m) {
1328
+ const b = o === E ? 1 : 0, v = o === y ? 1 : 0;
1329
+ this.ctx.paint.drawLine([c + v, d + 1, c + h - b, d + 1], {
1319
1330
  borderColor: u,
1320
1331
  fillColor: w,
1321
1332
  borderWidth: p,
@@ -1324,9 +1335,9 @@ class Tt extends se {
1324
1335
  lineDash: g
1325
1336
  });
1326
1337
  }
1327
- if (o === C && r >= m && r <= E) {
1328
- const b = r === m ? 1 : 0, R = r === E ? 1 : 0;
1329
- this.ctx.paint.drawLine([c + h - 1, d + b, c + h - 1, d + n - R], {
1338
+ if (o === E && r >= m && r <= C) {
1339
+ const b = r === m ? 1 : 0, v = r === C ? 1 : 0;
1340
+ this.ctx.paint.drawLine([c + h - 1, d + b, c + h - 1, d + n - v], {
1330
1341
  borderColor: u,
1331
1342
  fillColor: w,
1332
1343
  borderWidth: p,
@@ -1335,9 +1346,9 @@ class Tt extends se {
1335
1346
  lineDash: g
1336
1347
  });
1337
1348
  }
1338
- if (o >= y && o <= C && r === E) {
1339
- const b = o === C ? 1 : 0, R = o === y ? 1 : 0;
1340
- this.ctx.paint.drawLine([c + R, d + n - 1, c + h - b, d + n - 1], {
1349
+ if (o >= y && o <= E && r === C) {
1350
+ const b = o === E ? 1 : 0, v = o === y ? 1 : 0;
1351
+ this.ctx.paint.drawLine([c + v, d + n - 1, c + h - b, d + n - 1], {
1341
1352
  borderColor: u,
1342
1353
  fillColor: w,
1343
1354
  borderWidth: p,
@@ -1346,9 +1357,9 @@ class Tt extends se {
1346
1357
  lineDash: g
1347
1358
  });
1348
1359
  }
1349
- if (o === y && r >= m && r <= E) {
1350
- const b = r === E ? 1 : 0, R = r === m ? 1 : 0;
1351
- this.ctx.paint.drawLine([c + 1, d + R, c + 1, d + n - b], {
1360
+ if (o === y && r >= m && r <= C) {
1361
+ const b = r === C ? 1 : 0, v = r === m ? 1 : 0;
1362
+ this.ctx.paint.drawLine([c + 1, d + v, c + 1, d + n - b], {
1352
1363
  borderColor: u,
1353
1364
  fillColor: w,
1354
1365
  borderWidth: p,
@@ -1394,7 +1405,7 @@ class ni {
1394
1405
  init() {
1395
1406
  this.clearBufferData(), this.rowKeyMap.clear(), this.checkboxKeyMap.clear(), this.colIndexKeyMap.clear(), this.rowIndexRowKeyMap.clear(), this.originalDataMap.clear(), this.changedDataMap.clear(), this.validationErrorMap.clear(), this.itemRowKeyMap = /* @__PURE__ */ new WeakMap();
1396
1407
  const { ROW_KEY: t, ENABLE_RESERVE_SELECTION: e } = this.ctx.config;
1397
- e && t || this.selectionMap.clear(), this.initData(this.data), this.getData();
1408
+ e && t || this.selectionMap.clear(), this.initData(this.data), this.getData(), this.bufferCheckState.buffer = !1;
1398
1409
  }
1399
1410
  /**
1400
1411
  * 清除缓存数据
@@ -1419,8 +1430,8 @@ class ni {
1419
1430
  if (typeof c == "function" && (u = c), d) {
1420
1431
  const y = i[d];
1421
1432
  if (this.checkboxKeyMap.has(y)) {
1422
- const C = this.checkboxKeyMap.get(y) || [];
1423
- C.push(x), this.checkboxKeyMap.set(y, C);
1433
+ const E = this.checkboxKeyMap.get(y) || [];
1434
+ E.push(x), this.checkboxKeyMap.set(y, E);
1424
1435
  } else
1425
1436
  this.checkboxKeyMap.set(y, [x]);
1426
1437
  }
@@ -1852,11 +1863,7 @@ class ni {
1852
1863
  */
1853
1864
  setRowSelection(t, e, i = !0) {
1854
1865
  const s = this.selectionMap.get(t);
1855
- if (!s)
1856
- return;
1857
- s.check = e, this.setRowSelectionByCheckboxKey(t, s.check);
1858
- const r = this.getSelectionRows();
1859
- this.ctx.emit("setRowSelection", r), i && (this.bufferCheckState.buffer = !1, this.ctx.emit("draw"));
1866
+ s && (s.check = e, this.setRowSelectionByCheckboxKey(t, s.check), this.ctx.emit("setRowSelection", e, s.row), i && (this.bufferCheckState.buffer = !1, this.ctx.emit("draw")));
1860
1867
  }
1861
1868
  getSelectionRows() {
1862
1869
  let t = [];
@@ -2027,7 +2034,10 @@ class ni {
2027
2034
  const { DISABLED: i } = this.ctx.config;
2028
2035
  if (i)
2029
2036
  return !0;
2030
- const s = this.rowKeyMap.get(t), r = this.headerMap.get(e), o = s == null ? void 0 : s.readonly, n = r == null ? void 0 : r.readonly, { BODY_CELL_READONLY_METHOD: h } = this.ctx.config;
2037
+ const s = this.rowKeyMap.get(t), r = this.headerMap.get(e);
2038
+ if (!s || !r)
2039
+ return !0;
2040
+ const o = s.readonly, n = r.readonly, { BODY_CELL_READONLY_METHOD: h } = this.ctx.config;
2031
2041
  if (typeof h == "function" && r) {
2032
2042
  const d = h({
2033
2043
  row: s.item,
@@ -2143,42 +2153,42 @@ class ni {
2143
2153
  }
2144
2154
  ]
2145
2155
  };
2146
- let w = e, y = e, C = n, m = n, E = [], b = 0, R = 0, O = 0, L = 0;
2156
+ let w = e, y = e, E = n, m = n, C = [], b = 0, v = 0, O = 0, L = 0;
2147
2157
  if (d !== 1 && p) {
2148
2158
  L = x;
2149
- const _ = h.reduce((v, A) => {
2159
+ const I = h.reduce((R, A) => {
2150
2160
  const S = this.getItemValue(s, A) ?? "";
2151
- return `${v}${S}`;
2161
+ return `${R}${S}`;
2152
2162
  }, "");
2153
- for (let v = e - 1; v >= 0; v--) {
2154
- const A = this.rowIndexRowKeyMap.get(v) || "", S = h.reduce((M, T) => {
2163
+ for (let R = e - 1; R >= 0; R--) {
2164
+ const A = this.rowIndexRowKeyMap.get(R) || "", S = h.reduce((M, T) => {
2155
2165
  const N = this.getItemValue(A, T) ?? "";
2156
2166
  return `${M}${N}`;
2157
2167
  }, "");
2158
- if (_ === S)
2159
- w = v;
2168
+ if (I === S)
2169
+ w = R;
2160
2170
  else
2161
2171
  break;
2162
2172
  }
2163
- for (let v = e; v <= this.ctx.maxRowIndex; v++) {
2164
- const A = this.rowIndexRowKeyMap.get(v) || "", S = h.reduce((M, T) => {
2173
+ for (let R = e; R <= this.ctx.maxRowIndex; R++) {
2174
+ const A = this.rowIndexRowKeyMap.get(R) || "", S = h.reduce((M, T) => {
2165
2175
  const N = this.getItemValue(A, T) ?? "";
2166
2176
  return `${M}${N}`;
2167
2177
  }, "");
2168
- if (_ === S)
2169
- y = v;
2178
+ if (I === S)
2179
+ y = R;
2170
2180
  else
2171
2181
  break;
2172
2182
  }
2173
- for (let v = w; v < e; v++) {
2174
- const { height: A } = this.positions[v];
2183
+ for (let R = w; R < e; R++) {
2184
+ const { height: A } = this.positions[R];
2175
2185
  b += A;
2176
2186
  }
2177
- for (let v = w; v <= y; v++) {
2178
- const { height: A } = this.positions[v];
2187
+ for (let R = w; R <= y; R++) {
2188
+ const { height: A } = this.positions[R];
2179
2189
  O += A;
2180
- const S = this.rowIndexRowKeyMap.get(v) || "", { item: M } = this.rowKeyMap.get(S), T = this.getItemValue(S, i);
2181
- E.push({
2190
+ const S = this.rowIndexRowKeyMap.get(R) || "", { item: M } = this.rowKeyMap.get(S), T = this.getItemValue(S, i);
2191
+ C.push({
2182
2192
  rowKey: S,
2183
2193
  key: i,
2184
2194
  value: T,
@@ -2188,54 +2198,54 @@ class ni {
2188
2198
  }
2189
2199
  if (g !== 1 && u) {
2190
2200
  O = f;
2191
- for (let _ = n - 1; _ >= 0; _--) {
2192
- const v = this.getColumnByColIndex(_);
2193
- if (!v)
2201
+ for (let I = n - 1; I >= 0; I--) {
2202
+ const R = this.getColumnByColIndex(I);
2203
+ if (!R)
2194
2204
  break;
2195
- const A = this.getItemValue(s, i), S = this.getItemValue(s, v.key);
2196
- if (A === S && c.includes(v.key))
2197
- C = _;
2205
+ const A = this.getItemValue(s, i), S = this.getItemValue(s, R.key);
2206
+ if (A === S && c.includes(R.key))
2207
+ E = I;
2198
2208
  else
2199
2209
  break;
2200
2210
  }
2201
- for (let _ = n; _ <= this.ctx.maxColIndex; _++) {
2202
- const v = this.getColumnByColIndex(_);
2203
- if (!v)
2211
+ for (let I = n; I <= this.ctx.maxColIndex; I++) {
2212
+ const R = this.getColumnByColIndex(I);
2213
+ if (!R)
2204
2214
  break;
2205
- const A = this.getItemValue(s, i), S = this.getItemValue(s, v.key);
2206
- if (A === S && c.includes(v.key))
2207
- m = _;
2215
+ const A = this.getItemValue(s, i), S = this.getItemValue(s, R.key);
2216
+ if (A === S && c.includes(R.key))
2217
+ m = I;
2208
2218
  else
2209
2219
  break;
2210
2220
  }
2211
- for (let _ = C; _ < n; _++) {
2212
- const v = this.getColumnByColIndex(_);
2213
- if (!v)
2221
+ for (let I = E; I < n; I++) {
2222
+ const R = this.getColumnByColIndex(I);
2223
+ if (!R)
2214
2224
  break;
2215
- R += v.width || 100;
2225
+ v += R.width || 100;
2216
2226
  }
2217
- for (let _ = C; _ <= m; _++) {
2218
- const v = this.getColumnByColIndex(_);
2219
- if (!v)
2227
+ for (let I = E; I <= m; I++) {
2228
+ const R = this.getColumnByColIndex(I);
2229
+ if (!R)
2220
2230
  break;
2221
- L += v.width || 100, E.push({
2231
+ L += R.width || 100, C.push({
2222
2232
  rowKey: s,
2223
- key: v.key,
2224
- value: this.getItemValue(s, v.key),
2233
+ key: R.key,
2234
+ value: this.getItemValue(s, R.key),
2225
2235
  row: r
2226
2236
  });
2227
2237
  }
2228
2238
  }
2229
2239
  return {
2230
- xArr: [C, m],
2240
+ xArr: [E, m],
2231
2241
  yArr: [w, y],
2232
2242
  rowspan: d,
2233
2243
  colspan: g,
2234
2244
  height: O,
2235
2245
  width: L,
2236
2246
  offsetTop: b,
2237
- offsetLeft: R,
2238
- dataList: E
2247
+ offsetLeft: v,
2248
+ dataList: C
2239
2249
  };
2240
2250
  }
2241
2251
  setLoading(t) {
@@ -2595,6 +2605,7 @@ class Wt {
2595
2605
  l(this, "WIDTH", 0);
2596
2606
  l(this, "RESIZE_MIN_WIDTH", 40);
2597
2607
  l(this, "HEIGHT", 0);
2608
+ l(this, "PLACEHOLDER_COLOR", "#CDD0DC");
2598
2609
  l(this, "EMPTY_BODY_HEIGHT", 120);
2599
2610
  l(this, "EMPTY_CUSTOM_STYLE", {});
2600
2611
  l(this, "EMPTY_TEXT", "暂无数据");
@@ -2993,7 +3004,7 @@ class fi {
2993
3004
  this.handleHeaderEvent(i, e, this.ctx.header.renderCellHeaders, (s) => {
2994
3005
  this.ctx.clickCellHeader = s, this.ctx.emit("cellHeaderClick", s, t), this.selectionClick(s);
2995
3006
  }), this.handleBodyEvent(i, e, this.ctx.body.renderRows, (s) => {
2996
- this.ctx.clickCell = s, this.ctx.emit("cellClick", s, t), this.selectionClick(s), this.treeClick(s);
3007
+ this.ctx.clickCell = s, this.ctx.emit("cellClick", s, t), this.selectionClick(s), this.treeClick(s), this.hoverIconClick(s);
2997
3008
  });
2998
3009
  }), this.ctx.on("dblclick", (t) => {
2999
3010
  if (t.button !== 0 || this.isBusy(t))
@@ -3013,9 +3024,12 @@ class fi {
3013
3024
  }), this.handleBodyEvent(r, s, this.ctx.body.renderRows, (o) => {
3014
3025
  this.ctx.emit("cellContextMenuClick", o, t);
3015
3026
  });
3027
+ }), this.ctx.on("mouseout", (t) => {
3028
+ !this.ctx.containerElement.contains(t.relatedTarget) && this.ctx.hoverCell !== void 0 && (this.ctx.hoverRow = void 0, this.ctx.hoverCell = void 0, this.ctx.emit("draw"));
3016
3029
  }), this.ctx.on("mousemove", (t) => {
3017
3030
  if (this.isBusy(t))
3018
3031
  return;
3032
+ this.ctx.isPointer = !1, this.ctx.stageElement.style.cursor === "pointer" && (this.ctx.stageElement.style.cursor = "default");
3019
3033
  const e = this.ctx.getOffset(t).offsetY, i = this.ctx.getOffset(t).offsetX;
3020
3034
  this.handleHeaderEvent(i, e, this.ctx.header.renderCellHeaders, (s) => {
3021
3035
  this.ctx.emit("cellHeaderMouseenter", s, t), this.ctx.hoverCellHeader && this.ctx.hoverCellHeader !== s && this.ctx.emit("cellHeaderMouseleave", this.ctx.hoverCellHeader, t), this.imageEnterAndLeave(s, t), this.ctx.hoverCellHeader !== s && (this.ctx.hoverCellHeader = s, this.ctx.emit("cellHeaderHoverChange", s));
@@ -3024,15 +3038,18 @@ class fi {
3024
3038
  e,
3025
3039
  this.ctx.body.renderRows,
3026
3040
  (s) => {
3027
- this.imageEnterAndLeave(s, t), this.visibleHoverCell !== s && (this.ctx.emit("visibleCellMouseleave", s, t), this.visibleHoverCell = s, this.ctx.emit("visibleCellHoverChange", s, t));
3041
+ this.selectionEnterAndLeave(s, t), this.visibleHoverCell !== s && (this.ctx.emit("visibleCellMouseleave", s, t), this.visibleHoverCell = s, this.ctx.emit("visibleCellHoverChange", s, t));
3028
3042
  },
3029
3043
  !0
3030
3044
  ), this.handleBodyEvent(i, e, this.ctx.body.renderRows, (s) => {
3031
3045
  var r;
3032
- this.ctx.emit("cellMouseenter", s, t), this.ctx.hoverCell && this.ctx.hoverCell !== s && this.ctx.emit("cellMouseleave", this.ctx.hoverCell, t), this.ctx.hoverCell !== s && (((r = this.ctx.hoverCell) == null ? void 0 : r.rowKey) !== s.rowKey && (this.ctx.hoverCell = s, this.ctx.hoverRow = this.ctx.body.renderRows.find((o) => o.rowKey === s.rowKey), this.ctx.emit("rowHoverChange", this.ctx.hoverRow, s, t), this.ctx.emit("drawView")), this.ctx.hoverCell = s, this.ctx.emit("cellHoverChange", s, t));
3046
+ this.imageEnterAndLeave(s, t), this.ctx.emit("cellMouseenter", s, t), this.ctx.hoverCell && this.ctx.hoverCell !== s && this.ctx.emit("cellMouseleave", s, t), this.ctx.hoverCell !== s && (((r = this.ctx.hoverCell) == null ? void 0 : r.rowKey) !== s.rowKey && (this.ctx.hoverCell = s, this.ctx.hoverRow = this.ctx.body.renderRows.find((o) => o.rowKey === s.rowKey), this.ctx.emit("rowHoverChange", this.ctx.hoverRow, s, t), this.ctx.emit("drawView")), this.ctx.hoverCell = s, this.ctx.emit("cellHoverChange", s, t));
3033
3047
  });
3034
3048
  });
3035
3049
  }
3050
+ hoverIconClick(t) {
3051
+ t.hoverIconName && this.ctx.isPointer && this.ctx.emit("hoverIconClick", t);
3052
+ }
3036
3053
  /**
3037
3054
  *选中点击
3038
3055
  * @param cell
@@ -3079,7 +3096,11 @@ class fi {
3079
3096
  */
3080
3097
  imageEnterAndLeave(t, e) {
3081
3098
  const { offsetY: i, offsetX: s } = this.ctx.getOffset(e), r = i, o = s;
3082
- o > t.drawImageX && o < t.drawImageX + t.drawImageWidth && r > t.drawImageY && r < t.drawImageY + t.drawImageHeight ? (this.ctx.stageElement.style.cursor = "pointer", this.ctx.isPointer = !0, t instanceof Tt && ["selection", "index-selection"].includes(t.type) && (this.ctx.database.getRowSelectable(t.rowKey) || (this.ctx.stageElement.style.cursor = "not-allowed"))) : (this.ctx.isPointer = !1, this.ctx.stageElement.style.cursor === "pointer" && (this.ctx.stageElement.style.cursor = "default"));
3099
+ o > t.drawImageX && o < t.drawImageX + t.drawImageWidth && r > t.drawImageY && r < t.drawImageY + t.drawImageHeight && (this.ctx.stageElement.style.cursor = "pointer", this.ctx.isPointer = !0);
3100
+ }
3101
+ selectionEnterAndLeave(t, e) {
3102
+ const { offsetY: i, offsetX: s } = this.ctx.getOffset(e), r = i, o = s;
3103
+ o > t.drawImageX && o < t.drawImageX + t.drawImageWidth && r > t.drawImageY && r < t.drawImageY + t.drawImageHeight && t instanceof Tt && ["selection", "index-selection"].includes(t.type) && (this.ctx.stageElement.style.cursor = "pointer", this.ctx.isPointer = !0, this.ctx.database.getRowSelectable(t.rowKey) || (this.ctx.stageElement.style.cursor = "not-allowed"));
3083
3104
  }
3084
3105
  isBusy(t) {
3085
3106
  const { offsetY: e, offsetX: i } = this.ctx.getOffset(t), s = e, r = i;
@@ -3593,7 +3614,7 @@ class gi {
3593
3614
  config: { HEADER_HEIGHT: t, SCROLLER_TRACK_SIZE: e }
3594
3615
  } = this.ctx, i = this.ctx.database.getColumns();
3595
3616
  this.columns = i, this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [];
3596
- const s = Qt(i), r = _t(i);
3617
+ const s = Qt(i), r = It(i);
3597
3618
  this.height = t * s, this.width = r.reduce((f, x) => f + ((x == null ? void 0 : x.width) || 100), 0), this.visibleHeight = this.height;
3598
3619
  const o = ti(te(i, s));
3599
3620
  this.columnIndex = 0, this.resizeNum = 0, this.render(o, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
@@ -3696,7 +3717,7 @@ class gi {
3696
3717
  for (let o = 0; o < i; o++) {
3697
3718
  const n = t[o], h = r * (n.rowspan || 0), c = r * (n.level || 0);
3698
3719
  let d = n.width || 100;
3699
- n.children && (d = _t(n.children).reduce((g, p) => g + ((p == null ? void 0 : p.width) || 100), 0));
3720
+ n.children && (d = It(n.children).reduce((g, p) => g + ((p == null ? void 0 : p.width) || 100), 0));
3700
3721
  const f = new re(this.ctx, this.columnIndex, s, c, d, h, n);
3701
3722
  this.ctx.database.setHeader(n.key, f), this.allCellHeaders.push(f), n.children || (this.leafCellHeaders.push(f), f.column.widthFillDisable || this.resizeNum++), n.fixed === "left" ? this.fixedLeftCellHeaders.push(f) : n.fixed === "right" ? this.fixedRightCellHeaders.push(f) : this.centerCellHeaders.push(f), !n.children && this.columnIndex++, n.children && this.render(n.children, s), s += d;
3702
3723
  }
@@ -3888,16 +3909,16 @@ class wi {
3888
3909
  width: this.width,
3889
3910
  height: this.data.length ? 0 : h + w
3890
3911
  });
3891
- let C = this.height + e.height + o;
3892
- C += w;
3912
+ let E = this.height + e.height + o;
3913
+ E += w;
3893
3914
  let m = 0;
3894
3915
  this.data.length && d ? (m = window.innerHeight - u - f, m < 0 && (m = 32, console.error(
3895
3916
  "There is an error in the height calculation ENABLE_OFFSET_HEIGHT and OFFSET_HEIGHT are invalid"
3896
- ))) : this.data.length && n ? m = n : this.data.length && c && C > c ? m = c : m = C, m > 0 && (this.ctx.stageHeight = Math.floor(m), this.ctx.stageElement.style.height = `${this.ctx.stageHeight - 0.5}px`);
3897
- let E = this.ctx.stageHeight - e.height - o;
3898
- r ? 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 = g;
3899
- const b = window.devicePixelRatio || 1, R = this.ctx.stageWidth * b, O = this.ctx.stageHeight * b;
3900
- t.width = Math.floor(R), t.height = Math.floor(O), this.ctx.canvasElement.setAttribute(
3917
+ ))) : this.data.length && n ? m = n : this.data.length && c && E > c ? m = c : m = E, m > 0 && (this.ctx.stageHeight = Math.floor(m), this.ctx.stageElement.style.height = `${this.ctx.stageHeight - 0.5}px`);
3918
+ let C = this.ctx.stageHeight - e.height - o;
3919
+ r ? this.visibleHeight = C - w : this.visibleHeight = C, this.ctx.body.x = this.x, this.ctx.body.y = this.y, this.ctx.body.width = this.width, this.ctx.body.height = this.height, this.ctx.body.visibleWidth = this.visibleWidth, this.ctx.body.visibleHeight = this.visibleHeight, this.ctx.body.data = g;
3920
+ const b = window.devicePixelRatio || 1, v = this.ctx.stageWidth * b, O = this.ctx.stageHeight * b;
3921
+ t.width = Math.floor(v), t.height = Math.floor(O), this.ctx.canvasElement.setAttribute(
3901
3922
  "style",
3902
3923
  ` height:${this.ctx.stageHeight}px;width:${this.ctx.stageWidth}px;`
3903
3924
  ), this.ctx.paint.scale(b);
@@ -4241,14 +4262,14 @@ class yi {
4241
4262
  SELECTOR_AREA_MAX_X_OFFSET: f,
4242
4263
  SELECTOR_AREA_MAX_Y_OFFSET: x
4243
4264
  } = this.ctx.config, g = n, p = h || this.ctx.maxColIndex - f, u = c, w = d || this.ctx.maxRowIndex - x;
4244
- let [y, C] = r, [m, E] = o;
4245
- if (y < g || C > p || m < u || E > w)
4265
+ let [y, E] = r, [m, C] = o;
4266
+ if (y < g || E > p || m < u || C > w)
4246
4267
  return;
4247
4268
  if (this.ctx.stageElement.focus(), this.ctx.config.ENABLE_MERGE_CELL_LINK) {
4248
- const R = this.adjustMergeCells(r, o);
4249
- m = R.yArr[0], E = R.yArr[1], y = R.xArr[0], C = R.xArr[1], this.ctx.onlyMergeCell = R.onlyMergeCell;
4269
+ const v = this.adjustMergeCells(r, o);
4270
+ m = v.yArr[0], C = v.yArr[1], y = v.xArr[0], E = v.xArr[1], this.ctx.onlyMergeCell = v.onlyMergeCell;
4250
4271
  }
4251
- y === C && m === E ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, r = [Math.max(g, y), Math.min(p, C)], o = [Math.max(u, m), Math.min(w, E)];
4272
+ y === E && m === C ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, r = [Math.max(g, y), Math.min(p, E)], o = [Math.max(u, m), Math.min(w, C)];
4252
4273
  const { BEFORE_SET_SELECTOR_METHOD: b } = this.ctx.config;
4253
4274
  if (typeof b == "function") {
4254
4275
  const O = b({
@@ -4269,13 +4290,13 @@ class yi {
4269
4290
  let n = [], h = [];
4270
4291
  for (let u = 0; u <= e[1] - e[0]; u++)
4271
4292
  for (let w = 0; w <= t[1] - t[0]; w++) {
4272
- const y = u + e[0], C = w + t[0], m = this.ctx.database.getVirtualBodyCell(y, C);
4273
- m && ((y === i || y === s) && n.push(m), (C === r || C === o) && h.push(m));
4293
+ const y = u + e[0], E = w + t[0], m = this.ctx.database.getVirtualBodyCell(y, E);
4294
+ m && ((y === i || y === s) && n.push(m), (E === r || E === o) && h.push(m));
4274
4295
  }
4275
4296
  const c = n.reduce(
4276
4297
  (u, w) => {
4277
- const { yArr: y } = w.getSpanInfo(), [C, m] = y;
4278
- return u.minY = Math.min(u.minY, C), u.maxY = Math.max(u.maxY, m), u;
4298
+ const { yArr: y } = w.getSpanInfo(), [E, m] = y;
4299
+ return u.minY = Math.min(u.minY, E), u.maxY = Math.max(u.maxY, m), u;
4279
4300
  },
4280
4301
  {
4281
4302
  minY: i,
@@ -4283,8 +4304,8 @@ class yi {
4283
4304
  }
4284
4305
  ), d = h.reduce(
4285
4306
  (u, w) => {
4286
- const { xArr: y } = w.getSpanInfo(), [C, m] = y;
4287
- return u.minX = Math.min(u.minX, C), u.maxX = Math.max(u.maxX, m), u;
4307
+ const { xArr: y } = w.getSpanInfo(), [E, m] = y;
4308
+ return u.minX = Math.min(u.minX, E), u.maxX = Math.max(u.maxX, m), u;
4288
4309
  },
4289
4310
  {
4290
4311
  minX: r,
@@ -4487,16 +4508,16 @@ class yi {
4487
4508
  for (let g = 0; g <= o.length - 1; g++) {
4488
4509
  const p = o[g].length;
4489
4510
  for (let u = 0; u <= p - 1; u++) {
4490
- const w = g + e, y = u + i, C = o[g][u], m = this.ctx.database.getItemValueForRowIndexAndColIndex(
4511
+ const w = g + e, y = u + i, E = o[g][u], m = this.ctx.database.getItemValueForRowIndexAndColIndex(
4491
4512
  w,
4492
4513
  y
4493
4514
  );
4494
4515
  if (m) {
4495
- const { rowKey: E, key: b } = m;
4496
- this.ctx.database.getReadonly(E, b) || (s.add(E), d.push({
4497
- rowKey: E,
4516
+ const { rowKey: C, key: b } = m;
4517
+ this.ctx.database.getReadonly(C, b) || (s.add(C), d.push({
4518
+ rowKey: C,
4498
4519
  key: b,
4499
- value: C,
4520
+ value: E,
4500
4521
  row: {}
4501
4522
  //内部有设置
4502
4523
  }));
@@ -4626,14 +4647,14 @@ class yi {
4626
4647
  if (!i)
4627
4648
  return;
4628
4649
  p && this.ctx.onlyMergeCell && i.updateSpanInfo();
4629
- const { drawX: u, drawY: w, width: y, height: C, fixed: m } = i, E = r - u + 1, b = i.drawX + y - (e - s) + 1;
4630
- let R = o.height - w, O = C;
4650
+ const { drawX: u, drawY: w, width: y, height: E, fixed: m } = i, C = r - u + 1, b = i.drawX + y - (e - s) + 1;
4651
+ let v = o.height - w, O = E;
4631
4652
  O > h.visibleHeight && (O = h.visibleHeight);
4632
4653
  let L = 0;
4633
- x && (g === "top" ? R = o.height + n.height - w : L = n.visibleHeight);
4634
- const _ = w + O - (t - L - f);
4635
- let v = c, A = d;
4636
- b > 0 && !m ? v = Math.floor(c + b) : E > 0 && !m && (v = Math.floor(c - E)), R > 0 ? A = Math.floor(d - R) : _ > 0 && (A = Math.floor(d + _)), (Math.abs(c - v) > 2 || Math.abs(d - A) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(v, A), this.ctx.emit("adjustBoundaryPosition", i));
4654
+ x && (g === "top" ? v = o.height + n.height - w : L = n.visibleHeight);
4655
+ const I = w + O - (t - L - f);
4656
+ let R = c, A = d;
4657
+ b > 0 && !m ? R = Math.floor(c + b) : C > 0 && !m && (R = Math.floor(c - C)), v > 0 ? A = Math.floor(d - v) : I > 0 && (A = Math.floor(d + I)), (Math.abs(c - R) > 2 || Math.abs(d - A) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(R, A), this.ctx.emit("adjustBoundaryPosition", i));
4637
4658
  }
4638
4659
  destroy() {
4639
4660
  this.timerX && (clearTimeout(this.timerX), this.timerX = 0), this.timerY && (clearTimeout(this.timerY), this.timerY = 0);
@@ -4698,13 +4719,13 @@ class mi {
4698
4719
  SELECTOR_AREA_MAX_X_OFFSET: x,
4699
4720
  SELECTOR_AREA_MAX_Y_OFFSET: g
4700
4721
  } = this.ctx.config, p = h, u = c || this.ctx.maxColIndex - x, w = d, y = f || this.ctx.maxRowIndex - g;
4701
- let [C, m] = o, [E, b] = n;
4702
- if (C < p || E < w)
4722
+ let [E, m] = o, [C, b] = n;
4723
+ if (E < p || C < w)
4703
4724
  return;
4704
- o = [Math.max(p, C), Math.min(u, m)], n = [Math.max(w, E), Math.min(y, b)];
4705
- const { BEFORE_SET_AUTOFILL_METHOD: R } = this.ctx.config;
4706
- if (typeof R == "function") {
4707
- const L = R({
4725
+ o = [Math.max(p, E), Math.min(u, m)], n = [Math.max(w, C), Math.min(y, b)];
4726
+ const { BEFORE_SET_AUTOFILL_METHOD: v } = this.ctx.config;
4727
+ if (typeof v == "function") {
4728
+ const L = v({
4708
4729
  focusCell: this.ctx.focusCell,
4709
4730
  xArr: o,
4710
4731
  yArr: n
@@ -4738,11 +4759,11 @@ class mi {
4738
4759
  let d = [];
4739
4760
  for (let g = 0; g <= h[1] - h[0]; g++)
4740
4761
  for (let p = 0; p <= n[1] - n[0]; p++) {
4741
- const u = p + n[0], w = g + h[0], y = s[g % o][p % r], C = this.ctx.database.getItemValueForRowIndexAndColIndex(w, u), m = `${w}-${u}`;
4742
- if (C && !i.has(m)) {
4743
- const { rowKey: E, key: b } = C;
4744
- this.ctx.database.getReadonly(E, b) || (t.add(E), d.push({
4745
- rowKey: E,
4762
+ const u = p + n[0], w = g + h[0], y = s[g % o][p % r], E = this.ctx.database.getItemValueForRowIndexAndColIndex(w, u), m = `${w}-${u}`;
4763
+ if (E && !i.has(m)) {
4764
+ const { rowKey: C, key: b } = E;
4765
+ this.ctx.database.getReadonly(C, b) || (t.add(C), d.push({
4766
+ rowKey: C,
4746
4767
  key: b,
4747
4768
  value: y,
4748
4769
  row: {}
@@ -4794,7 +4815,7 @@ const rt = Math.min, U = Math.max, ft = Math.round, z = (a) => ({
4794
4815
  start: "end",
4795
4816
  end: "start"
4796
4817
  };
4797
- function It(a, t, e) {
4818
+ function _t(a, t, e) {
4798
4819
  return U(a, rt(t, e));
4799
4820
  }
4800
4821
  function at(a, t) {
@@ -4844,7 +4865,7 @@ function Ri(a, t, e) {
4844
4865
  return [];
4845
4866
  }
4846
4867
  }
4847
- function _i(a, t, e, i) {
4868
+ function Ii(a, t, e, i) {
4848
4869
  const s = lt(a);
4849
4870
  let r = Ri(q(a), e === "start", i);
4850
4871
  return s && (r = r.map((o) => o + "-" + s), t && (r = r.concat(r.map(Ot)))), r;
@@ -4852,7 +4873,7 @@ function _i(a, t, e, i) {
4852
4873
  function xt(a) {
4853
4874
  return a.replace(/left|right|bottom|top/g, (t) => Ei[t]);
4854
4875
  }
4855
- function Ii(a) {
4876
+ function _i(a) {
4856
4877
  return {
4857
4878
  top: 0,
4858
4879
  right: 0,
@@ -4862,7 +4883,7 @@ function Ii(a) {
4862
4883
  };
4863
4884
  }
4864
4885
  function ae(a) {
4865
- return typeof a != "number" ? Ii(a) : {
4886
+ return typeof a != "number" ? _i(a) : {
4866
4887
  top: a,
4867
4888
  right: a,
4868
4889
  bottom: a,
@@ -4955,9 +4976,9 @@ const Oi = async (a, t, e) => {
4955
4976
  name: w,
4956
4977
  fn: y
4957
4978
  } = n[u], {
4958
- x: C,
4979
+ x: E,
4959
4980
  y: m,
4960
- data: E,
4981
+ data: C,
4961
4982
  reset: b
4962
4983
  } = await y({
4963
4984
  x: d,
@@ -4973,11 +4994,11 @@ const Oi = async (a, t, e) => {
4973
4994
  floating: t
4974
4995
  }
4975
4996
  });
4976
- d = C ?? d, f = m ?? f, g = {
4997
+ d = E ?? d, f = m ?? f, g = {
4977
4998
  ...g,
4978
4999
  [w]: {
4979
5000
  ...g[w],
4980
- ...E
5001
+ ...C
4981
5002
  }
4982
5003
  }, b && p <= 50 && (p++, typeof b == "object" && (b.placement && (x = b.placement), b.rects && (c = b.rects === !0 ? await o.getElementRects({
4983
5004
  reference: a,
@@ -5017,12 +5038,12 @@ async function le(a, t) {
5017
5038
  boundary: c,
5018
5039
  rootBoundary: d,
5019
5040
  strategy: h
5020
- })), C = f === "floating" ? {
5041
+ })), E = f === "floating" ? {
5021
5042
  x: i,
5022
5043
  y: s,
5023
5044
  width: o.floating.width,
5024
5045
  height: o.floating.height
5025
- } : o.reference, m = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(n.floating)), E = await (r.isElement == null ? void 0 : r.isElement(m)) ? await (r.getScale == null ? void 0 : r.getScale(m)) || {
5046
+ } : o.reference, m = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(n.floating)), C = await (r.isElement == null ? void 0 : r.isElement(m)) ? await (r.getScale == null ? void 0 : r.getScale(m)) || {
5026
5047
  x: 1,
5027
5048
  y: 1
5028
5049
  } : {
@@ -5030,15 +5051,15 @@ async function le(a, t) {
5030
5051
  y: 1
5031
5052
  }, b = ut(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
5032
5053
  elements: n,
5033
- rect: C,
5054
+ rect: E,
5034
5055
  offsetParent: m,
5035
5056
  strategy: h
5036
- }) : C);
5057
+ }) : E);
5037
5058
  return {
5038
- top: (y.top - b.top + p.top) / E.y,
5039
- bottom: (b.bottom - y.bottom + p.bottom) / E.y,
5040
- left: (y.left - b.left + p.left) / E.x,
5041
- right: (b.right - y.right + p.right) / E.x
5059
+ top: (y.top - b.top + p.top) / C.y,
5060
+ bottom: (b.bottom - y.bottom + p.bottom) / C.y,
5061
+ left: (y.left - b.left + p.left) / C.x,
5062
+ right: (b.right - y.right + p.right) / C.x
5042
5063
  };
5043
5064
  }
5044
5065
  const Si = (a) => ({
@@ -5062,10 +5083,10 @@ const Si = (a) => ({
5062
5083
  const f = ae(d), x = {
5063
5084
  x: e,
5064
5085
  y: i
5065
- }, g = Ht(s), p = Mt(g), u = await o.getDimensions(c), w = g === "y", y = w ? "top" : "left", C = w ? "bottom" : "right", m = w ? "clientHeight" : "clientWidth", E = r.reference[p] + r.reference[g] - x[g] - r.floating[p], b = x[g] - r.reference[g], R = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c));
5066
- let O = R ? R[m] : 0;
5067
- (!O || !await (o.isElement == null ? void 0 : o.isElement(R))) && (O = n.floating[m] || r.floating[p]);
5068
- const L = E / 2 - b / 2, _ = O / 2 - u[p] / 2 - 1, v = rt(f[y], _), A = rt(f[C], _), S = v, M = O - u[p] - A, T = O / 2 - u[p] / 2 + L, N = It(S, T, M), Y = !h.arrow && lt(s) != null && T !== N && r.reference[p] / 2 - (T < S ? v : A) - u[p] / 2 < 0, B = Y ? T < S ? T - S : T - M : 0;
5086
+ }, g = Ht(s), p = Mt(g), u = await o.getDimensions(c), w = g === "y", y = w ? "top" : "left", E = w ? "bottom" : "right", m = w ? "clientHeight" : "clientWidth", C = r.reference[p] + r.reference[g] - x[g] - r.floating[p], b = x[g] - r.reference[g], v = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c));
5087
+ let O = v ? v[m] : 0;
5088
+ (!O || !await (o.isElement == null ? void 0 : o.isElement(v))) && (O = n.floating[m] || r.floating[p]);
5089
+ const L = C / 2 - b / 2, I = O / 2 - u[p] / 2 - 1, R = rt(f[y], I), A = rt(f[E], I), S = R, M = O - u[p] - A, T = O / 2 - u[p] / 2 + L, N = _t(S, T, M), Y = !h.arrow && lt(s) != null && T !== N && r.reference[p] / 2 - (T < S ? R : A) - u[p] / 2 < 0, B = Y ? T < S ? T - S : T - M : 0;
5069
5090
  return {
5070
5091
  [g]: x[g] + B,
5071
5092
  data: {
@@ -5102,39 +5123,39 @@ const Si = (a) => ({
5102
5123
  } = at(a, t);
5103
5124
  if ((e = r.arrow) != null && e.alignmentOffset)
5104
5125
  return {};
5105
- const y = q(s), C = J(n), m = q(n) === n, E = await (h.isRTL == null ? void 0 : h.isRTL(c.floating)), b = x || (m || !u ? [xt(n)] : vi(n)), R = p !== "none";
5106
- !x && R && b.push(..._i(n, u, p, E));
5107
- const O = [n, ...b], L = await le(t, w), _ = [];
5108
- let v = ((i = r.flip) == null ? void 0 : i.overflows) || [];
5109
- if (d && _.push(L[y]), f) {
5110
- const T = bi(s, o, E);
5111
- _.push(L[T[0]], L[T[1]]);
5126
+ const y = q(s), E = J(n), m = q(n) === n, C = await (h.isRTL == null ? void 0 : h.isRTL(c.floating)), b = x || (m || !u ? [xt(n)] : vi(n)), v = p !== "none";
5127
+ !x && v && b.push(...Ii(n, u, p, C));
5128
+ const O = [n, ...b], L = await le(t, w), I = [];
5129
+ let R = ((i = r.flip) == null ? void 0 : i.overflows) || [];
5130
+ if (d && I.push(L[y]), f) {
5131
+ const T = bi(s, o, C);
5132
+ I.push(L[T[0]], L[T[1]]);
5112
5133
  }
5113
- if (v = [...v, {
5134
+ if (R = [...R, {
5114
5135
  placement: s,
5115
- overflows: _
5116
- }], !_.every((T) => T <= 0)) {
5136
+ overflows: I
5137
+ }], !I.every((T) => T <= 0)) {
5117
5138
  var A, S;
5118
5139
  const T = (((A = r.flip) == null ? void 0 : A.index) || 0) + 1, N = O[T];
5119
5140
  if (N)
5120
5141
  return {
5121
5142
  data: {
5122
5143
  index: T,
5123
- overflows: v
5144
+ overflows: R
5124
5145
  },
5125
5146
  reset: {
5126
5147
  placement: N
5127
5148
  }
5128
5149
  };
5129
- let Y = (S = v.filter((B) => B.overflows[0] <= 0).sort((B, W) => B.overflows[1] - W.overflows[1])[0]) == null ? void 0 : S.placement;
5150
+ let Y = (S = R.filter((B) => B.overflows[0] <= 0).sort((B, W) => B.overflows[1] - W.overflows[1])[0]) == null ? void 0 : S.placement;
5130
5151
  if (!Y)
5131
5152
  switch (g) {
5132
5153
  case "bestFit": {
5133
5154
  var M;
5134
- const B = (M = v.filter((W) => {
5135
- if (R) {
5155
+ const B = (M = R.filter((W) => {
5156
+ if (v) {
5136
5157
  const P = J(W.placement);
5137
- return P === C || // Create a bias to the `y` side axis due to horizontal
5158
+ return P === E || // Create a bias to the `y` side axis due to horizontal
5138
5159
  // reading directions favoring greater width.
5139
5160
  P === "y";
5140
5161
  }
@@ -5223,11 +5244,11 @@ const Ti = function(a) {
5223
5244
  fn: (w) => {
5224
5245
  let {
5225
5246
  x: y,
5226
- y: C
5247
+ y: E
5227
5248
  } = w;
5228
5249
  return {
5229
5250
  x: y,
5230
- y: C
5251
+ y: E
5231
5252
  };
5232
5253
  }
5233
5254
  },
@@ -5238,12 +5259,12 @@ const Ti = function(a) {
5238
5259
  }, d = await le(t, h), f = J(q(s)), x = ne(f);
5239
5260
  let g = c[x], p = c[f];
5240
5261
  if (r) {
5241
- const w = x === "y" ? "top" : "left", y = x === "y" ? "bottom" : "right", C = g + d[w], m = g - d[y];
5242
- g = It(C, g, m);
5262
+ const w = x === "y" ? "top" : "left", y = x === "y" ? "bottom" : "right", E = g + d[w], m = g - d[y];
5263
+ g = _t(E, g, m);
5243
5264
  }
5244
5265
  if (o) {
5245
- const w = f === "y" ? "top" : "left", y = f === "y" ? "bottom" : "right", C = p + d[w], m = p - d[y];
5246
- p = It(C, p, m);
5266
+ const w = f === "y" ? "top" : "left", y = f === "y" ? "bottom" : "right", E = p + d[w], m = p - d[y];
5267
+ p = _t(E, p, m);
5247
5268
  }
5248
5269
  const u = n.fn({
5249
5270
  ...t,
@@ -5423,8 +5444,8 @@ function ot(a, t, e, i) {
5423
5444
  const x = F(r), g = i && X(i) ? F(i) : i;
5424
5445
  let p = x, u = Lt(p);
5425
5446
  for (; u && i && g !== p; ) {
5426
- const w = Z(u), y = u.getBoundingClientRect(), C = k(u), m = y.left + (u.clientLeft + parseFloat(C.paddingLeft)) * w.x, E = y.top + (u.clientTop + parseFloat(C.paddingTop)) * w.y;
5427
- h *= w.x, c *= w.y, d *= w.x, f *= w.y, h += m, c += E, p = F(u), u = Lt(p);
5447
+ const w = Z(u), y = u.getBoundingClientRect(), E = k(u), m = y.left + (u.clientLeft + parseFloat(E.paddingLeft)) * w.x, C = y.top + (u.clientTop + parseFloat(E.paddingTop)) * w.y;
5448
+ h *= w.x, c *= w.y, d *= w.x, f *= w.y, h += m, c += C, p = F(u), u = Lt(p);
5428
5449
  }
5429
5450
  }
5430
5451
  return ut({
@@ -5794,6 +5815,8 @@ class Zi {
5794
5815
  this.enable && this.doneEdit();
5795
5816
  }), this.ctx.on("cellHeaderMousedown", () => {
5796
5817
  this.enable && this.doneEdit(), this.cellTarget = null;
5818
+ }), this.ctx.on("hoverIconClick", (t) => {
5819
+ t.editorType !== "none" && this.editCell(t.rowIndex, t.colIndex);
5797
5820
  }), this.ctx.on("keydown", (t) => {
5798
5821
  if (!this.ctx.isTarget(t))
5799
5822
  return;
@@ -5924,7 +5947,7 @@ class Zi {
5924
5947
  }
5925
5948
  }
5926
5949
  startEdit(t = !1) {
5927
- this.cancel = !1;
5950
+ this.ctx.emit("draw"), this.cancel = !1;
5928
5951
  const { ENABLE_EDIT_CLICK_SELECTOR: e } = this.ctx.config;
5929
5952
  if (!e)
5930
5953
  return;