e-virt-table 1.3.5 → 1.3.7

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
@@ -1,4 +1,4 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(":root{--evt-header-font: 12px normal Arial;--evt-body-font: 12px normal Arial;--evt-color-white: #fff;--evt-color-black: #000000;--evt-color-primary: rgb(82, 146, 247);--evt-text-color-primary: #333;--evt-text-color-regular: #666;--evt-text-color-secondary: #999;--evt-box-shadow: 0 2px 12px 0 #0000001a;--evt-editor-bg-color: #fff;--evt-editor-text-color: #333;--evt-border-color: #e1e6eb;--evt-stripe-color: #fafafa;--evt-placeholder-color: #cdd0dc;--evt-header-bg-color: #f8faff;--evt-body-bg-color: #fff;--evt-header-text-color: #1d2129;--evt-body-text-color: #4e5969;--evt-footer-text-color: #4e5969;--evt-loading-icon-color: #4e5969;--evt-expand-icon-color: #4e5969;--evt-shrink-icon-color: #4e5969;--evt-error-tip-icon-color: red;--evt-required-color: #f56c6c;--evt-cell-hover-icon-bg-color: #fff;--evt-cell-hover-icon-border-color: #dde0ea;--evt-scroller-color: #dee0e3;--evt-scroller-track-color: #fff;--evt-scroller-focus-color: #bbbec4;--evt-select-border-color: var(--evt-color-primary);--evt-select-area-color: rgba(82, 146, 247, .1);--evt-select-row-col-bg-color: rgba(82, 146, 247, .1);--evt-autofill-point-border-color: #fff;--evt-edit-bg-color: #fcf6ed;--evt-checkbox-color: var(--evt-color-primary);--evt-checkbox-uncheck-color: #dde0ea;--evt-checkbox-disabled-color: #f1f2f4;--evt-checkbox-check-disabled-color: #dde0ea;--evt-icon-edit-color: #4e5969;--evt-icon-select-color: #4e5969;--evt-readonly-color: #fff;--evt-readonly-text-color: var(--evt-body-text-color);--evt-error-tip-color: #ed3f14;--evt-footer-bg-color: #fafafa;--evt-highlight-hover-row-color: rgba(186, 203, 231, .1);--evt-highlight-selected-row-color: rgba(82, 146, 247, .1);--evt-tooltip-bg-color: #303133;--evt-tooltip-text-color: #fff;--evt-resize-row-line-color: #e1e6eb;--evt-resize-column-text-color: #fff;--evt-resize-column-text-bg-color: var(--evt-color-primary);--evt-resize-column-line-color: #e1e6eb;--evt-tree-line-color: #e1e6eb;--evt-sort-icon-color: var(--evt-color-primary);--evt-drag-tip-bg-color: rgba(82, 146, 247, .1);--evt-drag-tip-line-color: var(--evt-color-primary);--evt-context-menu-min-width: 150px;--evt-context-menu-max-width: 220px;--evt-context-menu-item-padding: 8px 12px;--evt-context-menu-bg-color: #fff;--evt-context-menu-text-color: #333;--evt-context-menu-item-hover-text-color: var(--evt-color-primary);--evt-context-menu-item-hover-bg-color: #f5f5f5;--evt-context-menu-text-size: 13px}.dark{--evt-border-color: #363637;--evt-header-bg-color: #141414;--evt-body-bg-color: #141414;--evt-header-text-color: #a3a6ad;--evt-body-text-color: #cfd3dc;--evt-readonly-text-color: #cfd3dc;--evt-footer-text-color: #cfd3dc;--evt-scroller-color: #414243;--evt-scroller-track-color: #141414;--evt-scroller-focus-color: #a3a6ad;--evt-edit-bg-color: #141414;--evt-footer-bg-color: #262727;--evt-autofill-point-border-color: #fff;--evt-editor-bg-color: #434343;--evt-editor-text-color: #cfd3dc;--evt-context-menu-bg-color: #141414;--evt-context-menu-text-color: #cfd3dc;--evt-context-menu-item-hover-text-color: var(--evt-color-primary);--evt-context-menu-item-hover-bg-color: #414243}.e-virt-table-container{position:relative;outline:none}.e-virt-table-stage{position:relative;overflow:hidden;outline:none;box-sizing:border-box;z-index:10;border-radius:8px;border:1px solid var(--evt-border-color)}.e-virt-table-canvas{position:absolute;left:0;top:0;box-sizing:border-box;border:none;outline:none;z-index:10}.e-virt-table-editor{position:absolute;top:-10000px;left:-10000px;text-align:left;height:auto;line-height:0;z-index:100;overflow:hidden;background-color:var(--evt-editor-bg-color);border:2px solid var(--evt-color-primary);box-sizing:border-box;box-shadow:var(--evt-box-shadow);display:flex;align-items:center}.e-virt-table-overlayer{position:absolute;left:0;top:0;overflow:hidden;z-index:100;pointer-events:none}.e-virt-table-editor-textarea{width:100%;box-sizing:border-box;outline:none;font-weight:400;padding:8px;font-size:12px;color:inherit;white-space:pre-wrap;word-wrap:break-word;word-break:break-all;line-height:1.5;margin:0;border:none;vertical-align:middle;background:var(--evt-editor-bg-color);color:var(--evt-editor-text-color);overflow-y:auto;resize:none}.e-virt-table-context-menu{position:absolute;font-size:14px;color:var(--evt-text-color-regular);background-color:var(--evt-color-white);border-radius:4px;border:1px solid #e4e7ed;box-shadow:var(--evt-box-shadow);width:fit-content;padding:6px 0;z-index:9999;left:-99999px;top:-99999px}.e-virt-table-context-menu-item{cursor:pointer;padding:6px 24px;color:var(--evt-text-color-regular)}.e-virt-table-context-menu-item:hover{color:var(--evt-color-primary);background-color:#f5f7fa}.e-virt-table-loading{display:none;position:absolute;left:0;top:0;right:0;bottom:0;width:100%;height:100%;z-index:2000;background-color:#fff6;display:flex;align-items:center;justify-content:center}.e-virt-table-loading-spinner{opacity:1;display:flex;flex-direction:column;align-items:center;justify-content:center}.e-virt-table-loading-spinner svg{color:var(--evt-text-color-regular);animation:rotate 1s linear infinite}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.e-virt-table-loading-text{margin:0;font-size:12px;color:var(--evt-text-color-regular)}.e-virt-table-main-menu,.e-virt-table-submenu{position:absolute;background:var(--evt-context-menu-bg-color);border-radius:4px;box-shadow:0 2px 8px #0000001a;min-width:var(--evt-context-menu-min-width);max-width:var(--evt-context-menu-max-width);color:var(--evt-text-color-primary)}.e-virt-table-main-menu{border:1px solid var(--evt-border-color);z-index:3000;left:-99999px;top:-99999px;display:none;position:fixed;background-color:var(--evt-body-bg-color)}.e-virt-table-submenu{border:1px solid var(--evt-border-color);z-index:1000;max-height:350px;overflow-y:auto;opacity:0;visibility:hidden;transform:translate(-10px);transition:opacity .2s,visibility .2s,transform .2s;-ms-overflow-style:none;scrollbar-width:none}.e-virt-table-submenu::-webkit-scrollbar{display:none}.e-virt-table-submenu.show{opacity:1;visibility:visible;transform:translate(0)}.e-virt-table-submenu:not(.show){transition:none}.e-virt-table-menu-item,.e-virt-table-submenu-item{position:relative;-webkit-user-select:none;user-select:none;padding:var(--evt-context-menu-item-padding);cursor:pointer;display:flex;justify-content:space-between;align-items:center;transition:background .2s,color .2s;color:var(--evt-context-menu-text-color);font-size:var(--evt-context-menu-text-size)}.e-virt-table-menu-item:last-child,.e-virt-table-submenu-item:last-child{border-bottom:none}.e-virt-table-menu-item:has(.menu-item-icon){padding-left:8px}.menu-item-content{display:flex;align-items:center;flex:1;min-width:0}.menu-item-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;margin-right:8px;flex-shrink:0}.menu-item-icon svg{width:100%;height:100%;fill:currentColor}.menu-item-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.e-virt-table-menu-arrow{display:inline-flex;align-items:center;justify-content:center;color:var(--evt-text-color-regular);transition:color .2s}.e-virt-table-menu-arrow svg{width:20px;height:20px;fill:currentColor}.e-virt-table-submenu-item:hover,.e-virt-table-menu-item:hover,.e-virt-table-menu-item.active{background:var(--evt-context-menu-item-hover-bg-color);color:var(--evt-context-menu-item-hover-text-color)}.e-virt-table-menu-item.disabled,.e-virt-table-submenu-item.disabled{cursor:not-allowed}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(":root{--evt-header-font: 12px normal Arial;--evt-body-font: 12px normal Arial;--evt-color-white: #fff;--evt-color-black: #000000;--evt-color-primary: rgb(82, 146, 247);--evt-text-color-primary: #333;--evt-text-color-regular: #666;--evt-text-color-secondary: #999;--evt-box-shadow: 0 2px 12px 0 #0000001a;--evt-editor-bg-color: #fff;--evt-editor-text-color: #333;--evt-border-color: #e1e6eb;--evt-stripe-color: #fafafa;--evt-placeholder-color: #cdd0dc;--evt-header-bg-color: #f8faff;--evt-body-bg-color: #fff;--evt-header-text-color: #1d2129;--evt-body-text-color: #4e5969;--evt-footer-text-color: #4e5969;--evt-loading-icon-color: #4e5969;--evt-expand-icon-color: #4e5969;--evt-shrink-icon-color: #4e5969;--evt-error-tip-icon-color: red;--evt-required-color: #f56c6c;--evt-cell-hover-icon-bg-color: #fff;--evt-cell-hover-icon-border-color: #dde0ea;--evt-scroller-color: #dee0e3;--evt-scroller-track-color: #fff;--evt-scroller-focus-color: #bbbec4;--evt-select-border-color: var(--evt-color-primary);--evt-select-area-color: rgba(82, 146, 247, .1);--evt-select-row-col-bg-color: rgba(82, 146, 247, .1);--evt-autofill-point-border-color: #fff;--evt-edit-bg-color: #fcf6ed;--evt-checkbox-color: var(--evt-color-primary);--evt-checkbox-uncheck-color: #dde0ea;--evt-checkbox-disabled-color: #f1f2f4;--evt-checkbox-check-disabled-color: #dde0ea;--evt-icon-edit-color: #4e5969;--evt-icon-select-color: #4e5969;--evt-readonly-color: #fff;--evt-readonly-text-color: var(--evt-body-text-color);--evt-error-tip-color: #ed3f14;--evt-footer-bg-color: #fafafa;--evt-highlight-hover-row-color: rgba(186, 203, 231, .1);--evt-highlight-selected-row-color: rgba(82, 146, 247, .1);--evt-tooltip-bg-color: #303133;--evt-tooltip-text-color: #fff;--evt-resize-row-line-color: #e1e6eb;--evt-resize-column-text-color: #fff;--evt-resize-column-text-bg-color: var(--evt-color-primary);--evt-resize-column-line-color: #e1e6eb;--evt-tree-line-color: #e1e6eb;--evt-sort-icon-color: var(--evt-color-primary);--evt-drag-tip-bg-color: rgba(82, 146, 247, .1);--evt-drag-tip-line-color: var(--evt-color-primary);--evt-context-menu-min-width: 150px;--evt-context-menu-max-width: 220px;--evt-context-menu-item-padding: 8px 12px;--evt-context-menu-bg-color: #fff;--evt-context-menu-text-color: #333;--evt-context-menu-item-hover-text-color: var(--evt-color-primary);--evt-context-menu-item-hover-bg-color: #f5f5f5;--evt-context-menu-text-size: 13px}.dark{--evt-border-color: #363637;--evt-header-bg-color: #141414;--evt-body-bg-color: #141414;--evt-header-text-color: #a3a6ad;--evt-body-text-color: #cfd3dc;--evt-readonly-text-color: #cfd3dc;--evt-footer-text-color: #cfd3dc;--evt-scroller-color: #414243;--evt-scroller-track-color: #141414;--evt-scroller-focus-color: #a3a6ad;--evt-edit-bg-color: #141414;--evt-footer-bg-color: #262727;--evt-autofill-point-border-color: #fff;--evt-editor-bg-color: #434343;--evt-editor-text-color: #cfd3dc;--evt-context-menu-bg-color: #141414;--evt-context-menu-text-color: #cfd3dc;--evt-context-menu-item-hover-text-color: var(--evt-color-primary);--evt-context-menu-item-hover-bg-color: #414243}.e-virt-table-container{position:relative;outline:none}.e-virt-table-stage{position:relative;overflow:hidden;outline:none;box-sizing:border-box;z-index:10;border-radius:8px;border:1px solid var(--evt-border-color)}.e-virt-table-canvas{position:absolute;left:0;top:0;box-sizing:border-box;border:none;outline:none;z-index:10}.e-virt-table-editor{position:absolute;top:-10000px;left:-10000px;text-align:left;height:auto;line-height:0;z-index:100;overflow:hidden;background-color:var(--evt-editor-bg-color);border:2px solid var(--evt-color-primary);box-sizing:border-box;box-shadow:var(--evt-box-shadow);display:flex;align-items:center}.e-virt-table-overlayer{position:absolute;left:0;top:0;overflow:hidden;z-index:100;pointer-events:none}.e-virt-table-editor-textarea{width:100%;box-sizing:border-box;outline:none;font-weight:400;padding:8px;font-size:12px;color:inherit;white-space:pre-wrap;word-wrap:break-word;word-break:break-all;line-height:1.5;margin:0;border:none;vertical-align:middle;background:var(--evt-editor-bg-color);color:var(--evt-editor-text-color);overflow-y:auto;resize:none}.e-virt-table-context-menu{position:absolute;font-size:14px;color:var(--evt-text-color-regular);background-color:var(--evt-color-white);border-radius:4px;border:1px solid #e4e7ed;box-shadow:var(--evt-box-shadow);width:fit-content;padding:6px 0;z-index:9999;left:-99999px;top:-99999px}.e-virt-table-context-menu-item{cursor:pointer;padding:6px 24px;color:var(--evt-text-color-regular)}.e-virt-table-context-menu-item:hover{color:var(--evt-color-primary);background-color:#f5f7fa}.e-virt-table-loading{display:none;position:absolute;left:0;top:0;right:0;bottom:0;width:100%;height:100%;z-index:2000;background-color:#fff6;display:flex;align-items:center;justify-content:center}.e-virt-table-loading-spinner{opacity:1;display:flex;flex-direction:column;align-items:center;justify-content:center}.e-virt-table-loading-spinner svg{color:var(--evt-text-color-regular);animation:rotate 1s linear infinite}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.e-virt-table-loading-text{margin:0;font-size:12px;color:var(--evt-text-color-regular)}.e-virt-table-main-menu,.e-virt-table-submenu{position:absolute;background:var(--evt-context-menu-bg-color);border-radius:4px;box-shadow:0 2px 8px #0000001a;min-width:var(--evt-context-menu-min-width);max-width:var(--evt-context-menu-max-width);color:var(--evt-text-color-primary)}.e-virt-table-main-menu{border:1px solid var(--evt-border-color);z-index:3000;left:-99999px;top:-99999px;display:none;position:fixed;background-color:var(--evt-body-bg-color)}.e-virt-table-submenu{border:1px solid var(--evt-border-color);z-index:1000;max-height:350px;overflow-y:auto;opacity:0;visibility:hidden;transform:translate(-10px);transition:opacity .2s,visibility .2s,transform .2s;-ms-overflow-style:none;scrollbar-width:none}.e-virt-table-submenu::-webkit-scrollbar{display:none}.e-virt-table-submenu.show{opacity:1;visibility:visible;transform:translate(0)}.e-virt-table-submenu:not(.show){transition:none}.e-virt-table-menu-item,.e-virt-table-submenu-item{position:relative;-webkit-user-select:none;user-select:none;padding:var(--evt-context-menu-item-padding);cursor:pointer;display:flex;justify-content:space-between;align-items:center;transition:background .2s,color .2s;color:var(--evt-context-menu-text-color);font-size:var(--evt-context-menu-text-size)}.e-virt-table-menu-item:last-child,.e-virt-table-submenu-item:last-child{border-bottom:none}.e-virt-table-menu-item:has(.e-virt-table-menu-item-icon){padding-left:8px}.e-virt-table-menu-item-content{display:flex;align-items:center;flex:1;min-width:0}.e-virt-table-menu-item-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;margin-right:8px;flex-shrink:0}.e-virt-table-menu-item-icon svg{width:100%;height:100%;fill:currentColor}.e-virt-table-menu-item-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.e-virt-table-menu-arrow{display:inline-flex;align-items:center;justify-content:center;color:var(--evt-text-color-regular);transition:color .2s}.e-virt-table-menu-arrow svg{width:20px;height:20px;fill:currentColor}.e-virt-table-submenu-item:hover,.e-virt-table-menu-item:hover,.e-virt-table-menu-item.active{background:var(--evt-context-menu-item-hover-bg-color);color:var(--evt-context-menu-item-hover-text-color)}.e-virt-table-menu-item.disabled,.e-virt-table-submenu-item.disabled{cursor:not-allowed}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
2
  var he = Object.defineProperty;
3
3
  var de = (h, t, e) => t in h ? he(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
4
4
  var n = (h, t, e) => de(h, typeof t != "symbol" ? t + "" : t, e);
@@ -24,10 +24,10 @@ class fe {
24
24
  rowKey: r,
25
25
  ...x
26
26
  };
27
- x.validator(u, c, (w) => {
28
- w && e.push({
27
+ x.validator(u, c, (g) => {
28
+ g && e.push({
29
29
  ...u,
30
- message: w
30
+ message: g
31
31
  });
32
32
  });
33
33
  }
@@ -531,7 +531,7 @@ class bt extends jt {
531
531
  return;
532
532
  const l = this.ctx.database.getRowForRowKey(i), { expand: c = !1, hasChildren: d = !1, expandLoading: f = !1, level: x = 0 } = l || {};
533
533
  this.rowExpand = c, this.rowHasChildren = d;
534
- const { TREE_INDENT: u = 16, CHECKBOX_SIZE: w, TREE_ICON_SIZE: m } = this.ctx.config;
534
+ const { TREE_INDENT: u = 16, CHECKBOX_SIZE: g, TREE_ICON_SIZE: m } = this.ctx.config;
535
535
  if (r = x * u, f) {
536
536
  const v = this.ctx.icons.get("loading");
537
537
  a = "loading", o = v;
@@ -539,10 +539,10 @@ class bt extends jt {
539
539
  const v = this.ctx.icons.get("expand"), _ = this.ctx.icons.get("shrink");
540
540
  o = c ? _ : v, a = c ? "shrink" : "expand";
541
541
  }
542
- let g = m, E = m, p = this.drawX;
543
- (this.align === "center" || this.align === "right") && (p = this.drawX + (this.visibleWidth - g - 2 * e) / 2, this.align = "left");
544
- let C = p + r + e, b = this.drawY + (this.visibleHeight - E) / 2, y = r + this.drawX + g - 0.5;
545
- this.type === "selection-tree" ? (C = r + this.drawSelectionImageX + this.drawSelectionImageWidth, y = C + g - e / 2) : this.type === "tree-selection" ? y = C + w + g - e / 2 : y = C + g - e / 2, this.drawTextX = y, this.drawTextWidth = this.drawX + this.visibleWidth - y, !(C + g + e > this.drawX + this.visibleWidth) && (b + E + e > this.drawY + this.visibleHeight || (this.drawTreeImageX = C, this.drawTreeImageY = b, this.drawTreeImageWidth = g, this.drawTreeImageHeight = E, o ? (this.drawTreeImageName = a, this.drawTreeImageSource = o) : (this.drawTreeImageName = "", this.drawTreeImageSource = void 0)));
542
+ let w = m, E = m, p = this.drawX;
543
+ (this.align === "center" || this.align === "right") && (p = this.drawX + (this.visibleWidth - w - 2 * e) / 2, this.align = "left");
544
+ let C = p + r + e, b = this.drawY + (this.visibleHeight - E) / 2, y = r + this.drawX + w - 0.5;
545
+ this.type === "selection-tree" ? (C = r + this.drawSelectionImageX + this.drawSelectionImageWidth, y = C + w - e / 2) : this.type === "tree-selection" ? y = C + g + w - e / 2 : y = C + w - e / 2, this.drawTextX = y, this.drawTextWidth = this.drawX + this.visibleWidth - y, !(C + w + e > this.drawX + this.visibleWidth) && (b + E + e > this.drawY + this.visibleHeight || (this.drawTreeImageX = C, this.drawTreeImageY = b, this.drawTreeImageWidth = w, this.drawTreeImageHeight = E, o ? (this.drawTreeImageName = a, this.drawTreeImageSource = o) : (this.drawTreeImageName = "", this.drawTreeImageSource = void 0)));
546
546
  }
547
547
  drawTreeLine() {
548
548
  const { TREE_LINE: e, TREE_INDENT: i = 16, TREE_ICON_SIZE: s = 16, TREE_LINE_COLOR: o = "#e1e6eb" } = this.ctx.config;
@@ -551,10 +551,10 @@ class bt extends jt {
551
551
  let d = this.drawTreeImageX - a * i;
552
552
  const f = Array.isArray(r.parentRowKeys) ? r.parentRowKeys : [];
553
553
  if (a > 0) {
554
- for (let g = 0; g < a - 1; g += 1) {
555
- const E = f[g + 1];
554
+ for (let w = 0; w < a - 1; w += 1) {
555
+ const E = f[w + 1];
556
556
  if (!!(E ? this.ctx.database.getRowForRowKey(E) || {} : {}).isLastChild) continue;
557
- const b = Math.round(this.drawTreeImageX - (a - g) * i + s / 2);
557
+ const b = Math.round(this.drawTreeImageX - (a - w) * i + s / 2);
558
558
  this.ctx.paint.drawLine([b, this.drawY, b, this.drawY + this.visibleHeight], {
559
559
  borderColor: o,
560
560
  borderWidth: 1,
@@ -562,8 +562,8 @@ class bt extends jt {
562
562
  lineDashOffset: 0
563
563
  });
564
564
  }
565
- const x = Math.round(this.drawTreeImageX - i + s / 2), w = !!r.isLastChild ? c : this.drawY + this.visibleHeight;
566
- this.ctx.paint.drawLine([x, this.drawY, x, w], {
565
+ const x = Math.round(this.drawTreeImageX - i + s / 2), g = !!r.isLastChild ? c : this.drawY + this.visibleHeight;
566
+ this.ctx.paint.drawLine([x, this.drawY, x, g], {
567
567
  borderColor: o,
568
568
  borderWidth: 1,
569
569
  lineDash: [4, 4],
@@ -601,7 +601,7 @@ class bt extends jt {
601
601
  HIGHLIGHT_SELECTED_ROW_COLOR: f,
602
602
  HIGHLIGHT_HOVER_ROW: x,
603
603
  HIGHLIGHT_HOVER_ROW_COLOR: u,
604
- STRIPE: w,
604
+ STRIPE: g,
605
605
  STRIPE_COLOR: m
606
606
  } = this.ctx.config;
607
607
  if (this.cellType === "footer") {
@@ -619,16 +619,16 @@ class bt extends jt {
619
619
  this.drawCellSkyBgColor = "transparent", this.drawCellBgColor = _, this.drawTextColor = S;
620
620
  return;
621
621
  }
622
- let g = "transparent";
622
+ let w = "transparent";
623
623
  const E = this.ctx.hoverCell, p = this.ctx.currentCell;
624
624
  let C = this.rowIndex, b = this.rowIndex;
625
625
  if (this.rowspan !== 1 && (x || d)) {
626
626
  const _ = this.getSpanInfo(), { yArr: S } = _;
627
627
  C = S[0], b = S[1];
628
628
  }
629
- x && E && (E.rowKey === this.rowKey && (g = u), E.rowIndex >= C && E.rowIndex <= b && (g = u)), d && p && (p.rowKey === this.rowKey && (g = f), p.rowIndex >= C && p.rowIndex <= b && (g = f)), this.drawCellSkyBgColor = g;
629
+ x && E && (E.rowKey === this.rowKey && (w = u), E.rowIndex >= C && E.rowIndex <= b && (w = u)), d && p && (p.rowKey === this.rowKey && (w = f), p.rowIndex >= C && p.rowIndex <= b && (w = f)), this.drawCellSkyBgColor = w;
630
630
  let y = e, v = a;
631
- if (this.ctx.database.getReadonly(this.rowKey, this.key) || (y = i, v = r), w && (this.rowIndex % 2 ? y = m : y = e), typeof s == "function") {
631
+ if (this.ctx.database.getReadonly(this.rowKey, this.key) || (y = i, v = r), g && (this.rowIndex % 2 ? y = m : y = e), typeof s == "function") {
632
632
  const _ = s, { backgroundColor: S, color: I, font: R } = _({
633
633
  row: this.row,
634
634
  rowIndex: this.rowIndex,
@@ -648,22 +648,22 @@ class bt extends jt {
648
648
  const d = this.ctx.database.getRowSelectable(c), { CHECKBOX_SIZE: f = 0, CELL_PADDING: x } = this.ctx.config;
649
649
  let u = this.drawX + x;
650
650
  (this.align === "center" || this.align === "right") && (u = this.drawX + (e - f) / 2);
651
- let w = u, m = this.drawY + (i - f) / 2;
651
+ let g = u, m = this.drawY + (i - f) / 2;
652
652
  if (a !== "selection-tree") {
653
653
  if (a === "tree-selection") {
654
654
  const { TREE_INDENT: p = 16, TREE_ICON_SIZE: C } = this.ctx.config, b = this.ctx.database.getRowForRowKey(c), { level: y = 0 } = b || {}, v = y * p;
655
- w = u + C + v;
655
+ g = u + C + v;
656
656
  }
657
657
  }
658
- let g = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck";
658
+ let w = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck";
659
659
  if (a === "selection-tree" || a === "tree-selection") {
660
660
  const p = this.ctx.database.getTreeSelectionState(c);
661
- p.indeterminate && d ? (g = this.ctx.icons.get("checkbox-indeterminate"), E = "checkbox-indeterminate") : p.checked && d ? (g = this.ctx.icons.get("checkbox-check"), E = "checkbox-check") : !p.checked && d ? (g = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck") : (g = this.ctx.icons.get("checkbox-disabled"), E = "checkbox-disabled");
661
+ p.indeterminate && d ? (w = this.ctx.icons.get("checkbox-indeterminate"), E = "checkbox-indeterminate") : p.checked && d ? (w = this.ctx.icons.get("checkbox-check"), E = "checkbox-check") : !p.checked && d ? (w = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck") : (w = this.ctx.icons.get("checkbox-disabled"), E = "checkbox-disabled");
662
662
  } else {
663
663
  const p = this.ctx.database.getRowSelection(c);
664
- p && d ? (g = this.ctx.icons.get("checkbox-check"), E = "checkbox-check") : p && !d ? (g = this.ctx.icons.get("checkbox-check-disabled"), E = "checkbox-check-disabled") : !p && d ? (g = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck") : (g = this.ctx.icons.get("checkbox-disabled"), E = "checkbox-disabled");
664
+ p && d ? (w = this.ctx.icons.get("checkbox-check"), E = "checkbox-check") : p && !d ? (w = this.ctx.icons.get("checkbox-check-disabled"), E = "checkbox-check-disabled") : !p && d ? (w = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck") : (w = this.ctx.icons.get("checkbox-disabled"), E = "checkbox-disabled");
665
665
  }
666
- w + f + x > this.drawX + this.visibleWidth || m + f + x > this.drawY + this.visibleHeight || (a === "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === l || ["checkbox-disabled", "checkbox-check"].includes(E)) && (this.drawSelectionImageX = w, this.drawSelectionImageY = m, this.drawSelectionImageWidth = f, this.drawSelectionImageHeight = f, this.drawSelectionImageName = E, this.drawSelectionImageSource = g) : (this.drawSelectionImageX = w, this.drawSelectionImageY = m, this.drawSelectionImageWidth = f, this.drawSelectionImageHeight = f, this.drawSelectionImageName = E, this.drawSelectionImageSource = g));
666
+ g + f + x > this.drawX + this.visibleWidth || m + f + x > this.drawY + this.visibleHeight || (a === "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === l || ["checkbox-disabled", "checkbox-check"].includes(E)) && (this.drawSelectionImageX = g, this.drawSelectionImageY = m, this.drawSelectionImageWidth = f, this.drawSelectionImageHeight = f, this.drawSelectionImageName = E, this.drawSelectionImageSource = w) : (this.drawSelectionImageX = g, this.drawSelectionImageY = m, this.drawSelectionImageWidth = f, this.drawSelectionImageHeight = f, this.drawSelectionImageName = E, this.drawSelectionImageSource = w));
667
667
  }
668
668
  updateHoverIcon() {
669
669
  if (this.ctx.database.getReadonly(this.rowKey, this.key))
@@ -683,10 +683,10 @@ class bt extends jt {
683
683
  if (this.hoverIconName && !this.ctx.editing && a) {
684
684
  let l = 0, c = 0;
685
685
  if (a.rowKey === this.rowKey && (l = this.drawX + this.width - s - o, c = this.drawY + (this.height - s) / 2), this.rowspan !== 1 && r) {
686
- const f = this.getSpanInfo(), { yArr: x } = f, u = x[0], w = x[1];
687
- if (a.rowIndex >= u && a.rowIndex <= w) {
688
- const { width: m, height: g, offsetTop: E, offsetLeft: p } = f;
689
- l = this.drawX - p + m - s - o, c = this.drawY - E + (g - s) / 2;
686
+ const f = this.getSpanInfo(), { yArr: x } = f, u = x[0], g = x[1];
687
+ if (a.rowIndex >= u && a.rowIndex <= g) {
688
+ const { width: m, height: w, offsetTop: E, offsetLeft: p } = f;
689
+ l = this.drawX - p + m - s - o, c = this.drawY - E + (w - s) / 2;
690
690
  }
691
691
  }
692
692
  const d = this.ctx.icons.get(this.hoverIconName);
@@ -959,13 +959,13 @@ class bt extends jt {
959
959
  drawBorder(e) {
960
960
  const { drawX: i, drawY: s, rowIndex: o, colIndex: r, height: a, width: l } = this;
961
961
  let c = i, d = s;
962
- const { xArr: f, yArr: x, lineDash: u = [], borderWidth: w = 1, borderColor: m, fillColor: g } = e, E = f[0], p = f[1], C = x[0], b = x[1];
962
+ const { xArr: f, yArr: x, lineDash: u = [], borderWidth: g = 1, borderColor: m, fillColor: w } = e, E = f[0], p = f[1], C = x[0], b = x[1];
963
963
  if (r >= E && r <= p && o === C) {
964
964
  const y = r === p ? 1 : 0, v = r === E ? 1 : 0;
965
965
  this.ctx.paint.drawLine([c + v, d + 1, c + l - y, d + 1], {
966
966
  borderColor: m,
967
- fillColor: g,
968
- borderWidth: w,
967
+ fillColor: w,
968
+ borderWidth: g,
969
969
  lineCap: "round",
970
970
  lineJoin: "round",
971
971
  lineDash: u
@@ -975,8 +975,8 @@ class bt extends jt {
975
975
  const y = o === C ? 1 : 0, v = o === b ? 1 : 0;
976
976
  this.ctx.paint.drawLine([c + l - 1, d + y, c + l - 1, d + a - v], {
977
977
  borderColor: m,
978
- fillColor: g,
979
- borderWidth: w,
978
+ fillColor: w,
979
+ borderWidth: g,
980
980
  lineCap: "round",
981
981
  lineJoin: "round",
982
982
  lineDash: u
@@ -986,8 +986,8 @@ class bt extends jt {
986
986
  const y = r === p ? 1 : 0, v = r === E ? 1 : 0;
987
987
  this.ctx.paint.drawLine([c + v, d + a - 1, c + l - y, d + a - 1], {
988
988
  borderColor: m,
989
- fillColor: g,
990
- borderWidth: w,
989
+ fillColor: w,
990
+ borderWidth: g,
991
991
  lineCap: "round",
992
992
  lineJoin: "round",
993
993
  lineDash: u
@@ -997,8 +997,8 @@ class bt extends jt {
997
997
  const y = o === b ? 1 : 0, v = o === C ? 1 : 0;
998
998
  this.ctx.paint.drawLine([c + 1, d + v, c + 1, d + a - y], {
999
999
  borderColor: m,
1000
- fillColor: g,
1001
- borderWidth: w,
1000
+ fillColor: w,
1001
+ borderWidth: g,
1002
1002
  lineCap: "round",
1003
1003
  lineJoin: "round",
1004
1004
  lineDash: u
@@ -1032,6 +1032,8 @@ class ye {
1032
1032
  resizableData: {}
1033
1033
  });
1034
1034
  n(this, "overlayerAutoHeightMap", /* @__PURE__ */ new Map());
1035
+ n(this, "maxRowHeightMap", /* @__PURE__ */ new Map());
1036
+ // 记录每行的最大渲染高度(按 rowKey 存储)
1035
1037
  n(this, "bufferCheckState", {
1036
1038
  buffer: !1,
1037
1039
  check: !1,
@@ -1049,7 +1051,7 @@ class ye {
1049
1051
  }
1050
1052
  // 初始化默认不忽略清空改变值和校验map
1051
1053
  init(t = !0) {
1052
- this.ctx.paint.clearTextCache(), this.clearBufferData(), this.rowKeyMap.clear(), this.checkboxKeyMap.clear(), this.colIndexKeyMap.clear(), this.rowIndexRowKeyMap.clear(), this.rowKeyRowIndexMap.clear();
1054
+ this.ctx.paint.clearTextCache(), this.clearBufferData(), this.rowKeyMap.clear(), this.checkboxKeyMap.clear(), this.colIndexKeyMap.clear(), this.rowIndexRowKeyMap.clear(), this.rowKeyRowIndexMap.clear(), this.maxRowHeightMap.clear();
1053
1055
  const e = this.getColumns(), i = Q(e);
1054
1056
  if (this.ctx.hasSelection = i.some((s) => s.type === "selection"), this.ctx.hasTree = i.some((s) => s.type === "tree"), t) {
1055
1057
  this.originalDataMap.clear(), this.changedDataMap.clear(), this.validationErrorMap.clear();
@@ -1075,9 +1077,9 @@ class ye {
1075
1077
  var p;
1076
1078
  const { ROW_KEY: a = "", DEFAULT_EXPAND_ALL: l, CELL_HEIGHT: c, SELECTABLE_METHOD: d, CHECKBOX_KEY: f } = this.ctx.config, x = o[a], u = x != null ? `${x}` : zt();
1077
1079
  this.itemRowKeyMap.set(o, u);
1078
- const w = o._height || c, m = o._readonly;
1079
- let g = !0;
1080
- if (typeof d == "function" && (g = d), f) {
1080
+ const g = o._height || c, m = o._readonly;
1081
+ let w = !0;
1082
+ if (typeof d == "function" && (w = d), f) {
1081
1083
  const C = o[f];
1082
1084
  if (this.checkboxKeyMap.has(C)) {
1083
1085
  const b = this.checkboxKeyMap.get(C) || [];
@@ -1096,10 +1098,10 @@ class ye {
1096
1098
  index: r,
1097
1099
  rowIndex: r,
1098
1100
  level: e,
1099
- height: w,
1101
+ height: g,
1100
1102
  calculatedHeight: -1,
1101
1103
  check: !1,
1102
- selectable: g,
1104
+ selectable: w,
1103
1105
  expand: E,
1104
1106
  expandLazy: !1,
1105
1107
  hasChildren: o._hasChildren || (Array.isArray(o.children) ? o.children.length > 0 : !1),
@@ -1139,10 +1141,19 @@ class ye {
1139
1141
  const o = this.rowIndexRowKeyMap.get(i);
1140
1142
  if (o) {
1141
1143
  const r = this.rowKeyMap.get(o);
1142
- r.calculatedHeight = s;
1144
+ if (r.calculatedHeight = s, this.ctx.config.REMEMBER_MAX_ROW_HEIGHT) {
1145
+ const a = this.maxRowHeightMap.get(o) || r.height;
1146
+ s > a && this.maxRowHeightMap.set(o, s);
1147
+ }
1143
1148
  }
1144
1149
  }), this.clearBufferData(), this.getData(), this.ctx.emit("draw"));
1145
1150
  }
1151
+ /**
1152
+ * 清除最大行高记录
1153
+ */
1154
+ clearMaxRowHeight() {
1155
+ this.maxRowHeightMap.clear(), this.clearBufferData(), this.getData(), this.ctx.emit("draw");
1156
+ }
1146
1157
  /**
1147
1158
  * 获取所有行数据(平铺)
1148
1159
  * @returns 获取转化平铺数据
@@ -1158,15 +1169,15 @@ class ye {
1158
1169
  }
1159
1170
  generateColumns(t) {
1160
1171
  const e = (i) => i.map((s) => {
1161
- var l, c, d, f, x, u, w, m;
1172
+ var l, c, d, f, x, u, g, m;
1162
1173
  const o = s.children && Array.isArray(s.children) ? e(s.children) : void 0, r = {
1163
1174
  hide: (c = (l = this.customHeader) == null ? void 0 : l.hideData) == null ? void 0 : c[s.key],
1164
1175
  fixed: (f = (d = this.customHeader) == null ? void 0 : d.fixedData) == null ? void 0 : f[s.key],
1165
1176
  sort: (u = (x = this.customHeader) == null ? void 0 : x.sortData) == null ? void 0 : u[s.key],
1166
- width: (m = (w = this.customHeader) == null ? void 0 : w.resizableData) == null ? void 0 : m[s.key]
1177
+ width: (m = (g = this.customHeader) == null ? void 0 : g.resizableData) == null ? void 0 : m[s.key]
1167
1178
  }, a = {};
1168
- for (const [g, E] of Object.entries(r))
1169
- E !== void 0 && (a[g] = E);
1179
+ for (const [w, E] of Object.entries(r))
1180
+ E !== void 0 && (a[w] = E);
1170
1181
  return {
1171
1182
  ...s,
1172
1183
  children: o,
@@ -1201,7 +1212,12 @@ class ye {
1201
1212
  const i = (o) => {
1202
1213
  o.forEach((r) => {
1203
1214
  t.push(r);
1204
- const a = this.itemRowKeyMap.get(r), { expand: l, hasChildren: c, height: d, calculatedHeight: f } = this.rowKeyMap.get(a), x = this.sumHeight, u = Math.max(f, d);
1215
+ const a = this.itemRowKeyMap.get(r), { expand: l, hasChildren: c, height: d, calculatedHeight: f } = this.rowKeyMap.get(a), x = this.sumHeight;
1216
+ let u = Math.max(f, d);
1217
+ if (this.ctx.config.REMEMBER_MAX_ROW_HEIGHT) {
1218
+ const g = this.maxRowHeightMap.get(a) || d;
1219
+ u > g ? (this.maxRowHeightMap.set(a, u), u = u) : u = g;
1220
+ }
1205
1221
  this.sumHeight += u, this.rowIndexRowKeyMap.set(e, a), this.rowKeyRowIndexMap.set(a, e), this.positions.push({
1206
1222
  top: x,
1207
1223
  height: u,
@@ -1407,54 +1423,54 @@ class ye {
1407
1423
  async batchSetItemValue(t, e = !1, i = !0, s = "none") {
1408
1424
  let o = [], r = i;
1409
1425
  const a = /* @__PURE__ */ new Set();
1410
- let l = [], c = t.map((w) => {
1411
- const { rowKey: m, key: g } = w;
1412
- let E = w.value, p = E;
1413
- const C = this.getRowDataItemForRowKey(m), b = this.getItemValue(m, g), y = this.getVirtualBodyCellByKey(m, g);
1426
+ let l = [], c = t.map((g) => {
1427
+ const { rowKey: m, key: w } = g;
1428
+ let E = g.value, p = E;
1429
+ const C = this.getRowDataItemForRowKey(m), b = this.getItemValue(m, w), y = this.getVirtualBodyCellByKey(m, w);
1414
1430
  return (y == null ? void 0 : y.type) === "number" && (["", void 0, null].includes(E) ? p = null : /^-?\d+(\.\d+)?$/.test(`${E}`) ? p = Number(E) : (p = b, l.push({
1415
- ...w,
1431
+ ...g,
1416
1432
  value: p,
1417
1433
  oldValue: b,
1418
1434
  row: C
1419
1435
  }))), {
1420
- ...w,
1436
+ ...g,
1421
1437
  value: p,
1422
1438
  oldValue: b,
1423
1439
  row: C
1424
1440
  };
1425
1441
  });
1426
- if (c = c.filter((w) => !l.some((m) => w.rowKey === m.rowKey && w.key === m.key)), l.length) {
1427
- const w = {
1442
+ if (c = c.filter((g) => !l.some((m) => g.rowKey === m.rowKey && g.key === m.key)), l.length) {
1443
+ const g = {
1428
1444
  code: "ERR_BATCH_SET_NUMBER_VALUE",
1429
1445
  message: "Assignment failed, not a numeric type",
1430
1446
  data: l
1431
1447
  };
1432
- this.ctx.emit("error", w);
1448
+ this.ctx.emit("error", g);
1433
1449
  }
1434
- if (c = c.filter((w) => w.oldValue !== w.value), !c.length)
1450
+ if (c = c.filter((g) => g.oldValue !== g.value), !c.length)
1435
1451
  return;
1436
1452
  const { BEFORE_VALUE_CHANGE_METHOD: d } = this.ctx.config;
1437
- s === "none" && typeof d == "function" && (c = await d(c), r = !1), c.forEach((w) => {
1438
- const { value: m, rowKey: g, key: E } = w, p = this.getItemValue(g, E);
1439
- a.add(g), this.setItemValue(g, E, m, !1, !1, !1, r), o.push({
1440
- rowKey: g,
1453
+ s === "none" && typeof d == "function" && (c = await d(c), r = !1), c.forEach((g) => {
1454
+ const { value: m, rowKey: w, key: E } = g, p = this.getItemValue(w, E);
1455
+ a.add(w), this.setItemValue(w, E, m, !1, !1, !1, r), o.push({
1456
+ rowKey: w,
1441
1457
  key: E,
1442
1458
  oldValue: p,
1443
1459
  newValue: m
1444
1460
  });
1445
1461
  });
1446
1462
  let f = [];
1447
- a.forEach((w) => {
1448
- f.push(this.ctx.database.getRowDataItemForRowKey(w));
1463
+ a.forEach((g) => {
1464
+ f.push(this.ctx.database.getRowDataItemForRowKey(g));
1449
1465
  });
1450
- const x = c.map(({ rowKey: w, key: m }) => this.getValidator(w, m));
1466
+ const x = c.map(({ rowKey: g, key: m }) => this.getValidator(g, m));
1451
1467
  Promise.all(x).then(() => {
1452
1468
  this.validationErrorMap.size === 0 && this.changedDataMap.size > 0 && this.ctx.emit("validateChangedData", this.getChangedData());
1453
1469
  });
1454
- const u = c.map((w) => {
1455
- const m = !!this.getValidationError(w.rowKey, w.key).length;
1470
+ const u = c.map((g) => {
1471
+ const m = !!this.getValidationError(g.rowKey, g.key).length;
1456
1472
  return {
1457
- ...w,
1473
+ ...g,
1458
1474
  errorTip: m
1459
1475
  };
1460
1476
  });
@@ -1491,15 +1507,15 @@ class ye {
1491
1507
  this.originalDataMap.has(f) || this.originalDataMap.set(f, c);
1492
1508
  const x = this.originalDataMap.get(f), u = this.getRowDataItemForRowKey(t);
1493
1509
  if (r) {
1494
- const w = this.getVirtualBodyCellByKey(t, e);
1495
- if ((w == null ? void 0 : w.type) === "number")
1510
+ const g = this.getVirtualBodyCellByKey(t, e);
1511
+ if ((g == null ? void 0 : g.type) === "number")
1496
1512
  if (["", void 0, null].includes(i))
1497
1513
  d = null;
1498
1514
  else if (/^-?\d+(\.\d+)?$/.test(`${i}`))
1499
1515
  d = Number(i);
1500
1516
  else {
1501
1517
  d = c;
1502
- const g = {
1518
+ const w = {
1503
1519
  code: "ERR_SET_NUMBER_VALUE",
1504
1520
  message: "Assignment failed, not a numeric type",
1505
1521
  data: [
@@ -1512,7 +1528,7 @@ class ye {
1512
1528
  }
1513
1529
  ]
1514
1530
  };
1515
- this.ctx.emit("error", g);
1531
+ this.ctx.emit("error", w);
1516
1532
  }
1517
1533
  if (d === c)
1518
1534
  return {
@@ -1661,23 +1677,23 @@ class ye {
1661
1677
  return { checked: s, indeterminate: !1 };
1662
1678
  let r = !1, a = s;
1663
1679
  if (this.ctx.config.TREE_SELECT_MODE === "auto") {
1664
- const c = (g) => {
1665
- const E = this.getTreeChildren(g);
1680
+ const c = (w) => {
1681
+ const E = this.getTreeChildren(w);
1666
1682
  let p = [];
1667
1683
  for (const C of E)
1668
1684
  p.push(C), p.push(...c(C));
1669
1685
  return p;
1670
- }, f = c(t).map((g) => this.selectionMap.get(g)), x = f.filter((g) => g == null ? void 0 : g.check).length, u = f.length, w = x > 0;
1671
- r = w && !(x === u), a = s || w, s && u > 0 && x === 0 && (a = !1, r = !1);
1686
+ }, f = c(t).map((w) => this.selectionMap.get(w)), x = f.filter((w) => w == null ? void 0 : w.check).length, u = f.length, g = x > 0;
1687
+ r = g && !(x === u), a = s || g, s && u > 0 && x === 0 && (a = !1, r = !1);
1672
1688
  } else if (this.ctx.config.TREE_SELECT_MODE === "cautious") {
1673
- const c = (g) => {
1674
- const E = this.getTreeChildren(g);
1689
+ const c = (w) => {
1690
+ const E = this.getTreeChildren(w);
1675
1691
  let p = [];
1676
1692
  for (const C of E)
1677
1693
  p.push(C), p.push(...c(C));
1678
1694
  return p;
1679
- }, f = c(t).map((g) => this.selectionMap.get(g)), x = f.filter((g) => g == null ? void 0 : g.check).length, u = f.length, w = x > 0, m = x === u;
1680
- r = w && !m, a = s || m, s && u > 0 && x === 0 && (a = !1, r = !1);
1695
+ }, f = c(t).map((w) => this.selectionMap.get(w)), x = f.filter((w) => w == null ? void 0 : w.check).length, u = f.length, g = x > 0, m = x === u;
1696
+ r = g && !m, a = s || m, s && u > 0 && x === 0 && (a = !1, r = !1);
1681
1697
  } else this.ctx.config.TREE_SELECT_MODE === "strictly" && (r = !1, a = s);
1682
1698
  return { checked: a, indeterminate: r };
1683
1699
  }
@@ -1782,11 +1798,11 @@ class ye {
1782
1798
  this.rowKeyMap.forEach((x, u) => {
1783
1799
  var m;
1784
1800
  (m = this.selectionMap.get(u)) != null && m.check && (s += 1);
1785
- let w = x.selectable;
1786
- typeof w == "function" && (w = w({
1801
+ let g = x.selectable;
1802
+ typeof g == "function" && (g = g({
1787
1803
  row: x.item,
1788
1804
  rowIndex: x.rowIndex
1789
- })), w && (o += 1);
1805
+ })), g && (o += 1);
1790
1806
  });
1791
1807
  const l = r > i && s === 0 && a, c = o && o > s && s > 0 || l, d = o !== 0, f = !!o && o === s;
1792
1808
  return this.bufferCheckState = {
@@ -1964,7 +1980,7 @@ class ye {
1964
1980
  height: f,
1965
1981
  width: x,
1966
1982
  colspan: u,
1967
- mergeRow: w,
1983
+ mergeRow: g,
1968
1984
  mergeCol: m
1969
1985
  } = t;
1970
1986
  if (d === 1 && u === 1)
@@ -1986,8 +2002,8 @@ class ye {
1986
2002
  }
1987
2003
  ]
1988
2004
  };
1989
- let g = e, E = e, p = a, C = a, b = [], y = 0, v = 0, _ = 0, S = 0;
1990
- if (d !== 1 && w) {
2005
+ let w = e, E = e, p = a, C = a, b = [], y = 0, v = 0, _ = 0, S = 0;
2006
+ if (d !== 1 && g) {
1991
2007
  S = x;
1992
2008
  const I = l.reduce((R, T) => {
1993
2009
  const O = this.getItemValue(s, T) ?? "";
@@ -1999,7 +2015,7 @@ class ye {
1999
2015
  return `${M}${A}`;
2000
2016
  }, "");
2001
2017
  if (I === O)
2002
- g = R;
2018
+ w = R;
2003
2019
  else
2004
2020
  break;
2005
2021
  }
@@ -2013,11 +2029,11 @@ class ye {
2013
2029
  else
2014
2030
  break;
2015
2031
  }
2016
- for (let R = g; R < e; R++) {
2032
+ for (let R = w; R < e; R++) {
2017
2033
  const { height: T } = this.positions[R];
2018
2034
  y += T;
2019
2035
  }
2020
- for (let R = g; R <= E; R++) {
2036
+ for (let R = w; R <= E; R++) {
2021
2037
  const { height: T } = this.positions[R];
2022
2038
  _ += T;
2023
2039
  const O = this.rowIndexRowKeyMap.get(R) || "", { item: M } = this.rowKeyMap.get(O), L = this.getItemValue(O, i);
@@ -2071,7 +2087,7 @@ class ye {
2071
2087
  }
2072
2088
  return {
2073
2089
  xArr: [p, C],
2074
- yArr: [g, E],
2090
+ yArr: [w, E],
2075
2091
  rowspan: d,
2076
2092
  colspan: u,
2077
2093
  height: _,
@@ -2081,25 +2097,25 @@ class ye {
2081
2097
  dataList: b
2082
2098
  };
2083
2099
  }
2084
- setValidationErrorByRowIndex(t, e, i) {
2085
- const s = this.rowIndexRowKeyMap.get(t), o = `${s}​_${e}`, r = this.getRowForRowIndex(t), a = this.getColumnByKey(e);
2086
- if (!s || !a || !r)
2100
+ setValidationErrorByRowKey(t, e, i) {
2101
+ const s = `${t}​_${e}`, o = this.getRowForRowKey(t), r = o == null ? void 0 : o.rowIndex, a = this.getColumnByKey(e);
2102
+ if (!t || !a || !o)
2087
2103
  return;
2088
- const l = this.getItemValue(s, e), c = [
2104
+ const l = this.getItemValue(t, e), c = [
2089
2105
  {
2090
2106
  key: e,
2091
- rowKey: s,
2092
- rowIndex: t,
2107
+ rowKey: t,
2108
+ rowIndex: r,
2093
2109
  colIndex: a.colIndex,
2094
2110
  column: a.column,
2095
- row: r,
2111
+ row: o,
2096
2112
  value: l,
2097
2113
  message: i,
2098
2114
  field: e,
2099
2115
  fieldValue: l
2100
2116
  }
2101
2117
  ];
2102
- this.validationErrorMap.set(o, c);
2118
+ this.validationErrorMap.set(s, c);
2103
2119
  }
2104
2120
  setValidationError(t, e, i) {
2105
2121
  const s = `${t}​_${e}`;
@@ -2296,7 +2312,7 @@ class Ie {
2296
2312
  this.ctx.emit("resetHeader", t), this.ctx.emit("resize", t);
2297
2313
  }
2298
2314
  handleMouseDown(t) {
2299
- this.clearDomSelection(), t.button === 0 && (this.ctx.mousedown = !0), this.ctx.containerElement.focus({ preventScroll: !0 }), this.ctx.emit("mousedown", t);
2315
+ this.clearDomSelection(), t.button === 0 && (this.ctx.mousedown = !0), this.ctx.emit("mousedown", t);
2300
2316
  }
2301
2317
  handleMousemove(t) {
2302
2318
  const e = t, i = this.ctx.containerElement.getBoundingClientRect(), s = e.clientX - i.left, o = e.clientY - i.top;
@@ -2495,12 +2511,12 @@ class ve {
2495
2511
  verticalAlign: f = "middle",
2496
2512
  maxLineClamp: x = 1,
2497
2513
  autoRowHeight: u = !1,
2498
- offsetLeft: w = 0,
2514
+ offsetLeft: g = 0,
2499
2515
  offsetRight: m = 0
2500
2516
  } = r;
2501
2517
  if (this.ctx.font = a, this.ctx.fillStyle = c, this.ctx.textAlign = l, ["", null, void 0].includes(t))
2502
2518
  return this.ctx.restore(), !1;
2503
- const E = parseInt(((R = a.match(/\d+/)) == null ? void 0 : R[0]) || "12") * (r.lineHeight || 1.2), p = s - d * 2 - w - m;
2519
+ const E = parseInt(((R = a.match(/\d+/)) == null ? void 0 : R[0]) || "12") * (r.lineHeight || 1.2), p = s - d * 2 - g - m;
2504
2520
  let C = !1;
2505
2521
  const b = Math.round((o - 2 * d) / E);
2506
2522
  let y = this.wrapText(t, p, r.cacheTextKey), v = Math.min(y.length, Math.max(b, 1));
@@ -2508,7 +2524,7 @@ class ve {
2508
2524
  let _ = i + d;
2509
2525
  const S = Math.round(v * E);
2510
2526
  f === "middle" ? _ = i + (o - S) / 2 : f === "bottom" && (_ = i + o - S - d);
2511
- let I = e + d + w;
2527
+ let I = e + d + g;
2512
2528
  l === "center" ? I = e + s / 2 : l === "right" && (I = e + s - d - m);
2513
2529
  for (let T = 0; T < y.length; T++) {
2514
2530
  const O = y[T], M = _ + T * E;
@@ -2584,8 +2600,8 @@ class ve {
2584
2600
  } = i;
2585
2601
  this.ctx.save(), this.ctx.font = s, this.ctx.fillStyle = a, this.ctx.textAlign = r;
2586
2602
  const d = parseInt(((m = s.match(/\d+/)) == null ? void 0 : m[0]) || "12"), f = d * (i.lineHeight || 1.2), x = e - o * 2, u = this.wrapText(t, x, c);
2587
- let w = 1;
2588
- return l === "auto" ? w = u.length : u.length > l ? w = l : w = u.length, this.ctx.restore(), Math.max(Math.floor(w * f + o * 2), Math.floor(d + o * 2));
2603
+ let g = 1;
2604
+ return l === "auto" ? g = u.length : u.length > l ? g = l : g = u.length, this.ctx.restore(), Math.max(Math.floor(g * f + o * 2), Math.floor(d + o * 2));
2589
2605
  }
2590
2606
  handleEllipsis(t, e, i = 0, s = "12px Arial") {
2591
2607
  this.ctx.save();
@@ -2835,6 +2851,10 @@ class Dt {
2835
2851
  n(this, "ENABLE_MERGE_CELL_LINK", !1);
2836
2852
  /** 启用填充器 */
2837
2853
  n(this, "ENABLE_AUTOFILL", !1);
2854
+ /** 启用选择器-批量跨列选择 */
2855
+ n(this, "ENABLE_AUTOFILL_SPAN_COL", !0);
2856
+ /** 启用选择器-批量跨行选择 */
2857
+ n(this, "ENABLE_AUTOFILL_SPAN_ROW", !0);
2838
2858
  /** 启用body右键菜单 */
2839
2859
  n(this, "ENABLE_CONTEXT_MENU", !1);
2840
2860
  /** 启用表头右键菜单 */
@@ -2913,6 +2933,8 @@ class Dt {
2913
2933
  n(this, "CELL_LINE_HEIGHT", 1.3);
2914
2934
  /** 全局自动行高 */
2915
2935
  n(this, "AUTO_ROW_HEIGHT", !1);
2936
+ /** 记录最大行高(开启后横向滚动不会导致行高变小) */
2937
+ n(this, "REMEMBER_MAX_ROW_HEIGHT", !1);
2916
2938
  /** 启用拖拽表头 */
2917
2939
  n(this, "ENABLE_DRAG_COLUMN", !1);
2918
2940
  /** header 格子样式 */
@@ -3340,8 +3362,8 @@ class Oe {
3340
3362
  this.ctx = t, this.init();
3341
3363
  }
3342
3364
  init() {
3343
- this.resizeObserver = new ResizeObserver(() => {
3344
- this.ctx.emit("resetHeader"), this.ctx.emit("resizeObserver");
3365
+ this.resizeObserver = new ResizeObserver((t) => {
3366
+ this.ctx.emit("resetHeader"), this.ctx.emit("resizeObserver", t), this.ctx.emit("containerResize", this.ctx.containerElement);
3345
3367
  }), this.resizeObserver.observe(this.ctx.containerElement), this.mutationObserver = new MutationObserver((t) => {
3346
3368
  for (const e of t)
3347
3369
  e.type === "attributes" && e.attributeName === "class" && (this.ctx.config.updateCssVar(), this.ctx.emit("draw"));
@@ -3485,10 +3507,10 @@ class Oe {
3485
3507
  colIndex: t.colIndex,
3486
3508
  column: t.column,
3487
3509
  value: t.getValue()
3488
- }).then((w) => {
3489
- this.ctx.database.setExpandChildren(t.rowKey, w), this.ctx.database.expandLoading(t.rowKey, !1), this.ctx.emit("expandChange", this.ctx.database.getExpandRowKeys());
3490
- }).catch((w) => {
3491
- this.ctx.database.expandLoading(t.rowKey, !1), console.error(w);
3510
+ }).then((g) => {
3511
+ this.ctx.database.setExpandChildren(t.rowKey, g), this.ctx.database.expandLoading(t.rowKey, !1), this.ctx.emit("expandChange", this.ctx.database.getExpandRowKeys());
3512
+ }).catch((g) => {
3513
+ this.ctx.database.expandLoading(t.rowKey, !1), console.error(g);
3492
3514
  }));
3493
3515
  else {
3494
3516
  const u = this.ctx.database.getIsExpand(t.rowKey);
@@ -3673,6 +3695,8 @@ class Le {
3673
3695
  // 自动填充移动中
3674
3696
  n(this, "selectorMove", !1);
3675
3697
  // 选择器移动中
3698
+ n(this, "disableHoverIconClick", !1);
3699
+ // 禁用hoverIconClick,防止填充选择器移动时,触发hoverIconClick
3676
3700
  n(this, "selectColsIng", !1);
3677
3701
  // 选择列中
3678
3702
  n(this, "selectRowsIng", !1);
@@ -4002,8 +4026,8 @@ class Xt {
4002
4026
  } = this.ctx, l = s, c = i, d = e.height, f = e.width, x = t.height, u = this.ctx.footer.height;
4003
4027
  if (this.type === "vertical") {
4004
4028
  this.visibleDistance = c - o - d, this.distance = x - this.visibleDistance + u, this.trackX = l - o, this.trackY = 0, this.splitPoints = [this.trackX, d, this.trackX + o, d], this.trackWidth = o, this.trackHeight = c, this.barX = this.trackX - 1 + (o - r) / 2, this.barWidth = r;
4005
- const w = this.distance ? this.visibleDistance / (x + u) : 0;
4006
- let m = Math.floor(w * this.visibleDistance);
4029
+ const g = this.distance ? this.visibleDistance / (x + u) : 0;
4030
+ let m = Math.floor(g * this.visibleDistance);
4007
4031
  m < 30 ? m = 30 : m > this.visibleDistance && (m = 0), this.barHeight = m, this.barY = d + this.scroll / this.distance * (this.visibleDistance - this.barHeight), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
4008
4032
  } else {
4009
4033
  this.visibleDistance = l - o, this.distance = f - this.visibleDistance, this.splitPoints = [
@@ -4012,11 +4036,11 @@ class Xt {
4012
4036
  l - o,
4013
4037
  c
4014
4038
  ];
4015
- const w = a ? 0 : 0.5;
4016
- this.trackX = 0, this.trackY = c - o + w, this.trackWidth = l, this.trackHeight = o;
4039
+ const g = a ? 0 : 0.5;
4040
+ this.trackX = 0, this.trackY = c - o + g, this.trackWidth = l, this.trackHeight = o;
4017
4041
  const m = this.distance ? this.visibleDistance / f : 0;
4018
- let g = Math.floor(m * this.visibleDistance);
4019
- this.barY = this.trackY - 1 + (o - r) / 2, g < 30 ? g = 30 : g >= this.visibleDistance && (g = 0), this.barWidth = g, this.barHeight = r, this.barX = this.scroll / this.distance * (this.visibleDistance - this.barWidth), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
4042
+ let w = Math.floor(m * this.visibleDistance);
4043
+ this.barY = this.trackY - 1 + (o - r) / 2, w < 30 ? w = 30 : w >= this.visibleDistance && (w = 0), this.barWidth = w, this.barHeight = r, this.barX = this.scroll / this.distance * (this.visibleDistance - this.barWidth), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
4020
4044
  }
4021
4045
  }
4022
4046
  draw() {
@@ -4245,8 +4269,8 @@ class He {
4245
4269
  this.columns = i, this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [], this.visibleHeight = this.height, this.visibleColumns = $t(i);
4246
4270
  const s = rt(this.visibleColumns), o = Q(this.visibleColumns);
4247
4271
  this.height = t * s, this.width = o.reduce((f, x) => {
4248
- const u = x.width || 100, { maxWidth: w, minWidth: m } = x;
4249
- return w && u > w ? f + w : m && u < m ? f + m : f + u;
4272
+ const u = x.width || 100, { maxWidth: g, minWidth: m } = x;
4273
+ return g && u > g ? f + g : m && u < m ? f + m : f + u;
4250
4274
  }, 0), this.columnIndex = 0, this.resizeNum = 0;
4251
4275
  const r = ue(nt(this.visibleColumns, s));
4252
4276
  this.render(r, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
@@ -4294,7 +4318,7 @@ class He {
4294
4318
  const { offsetX: r, offsetY: a } = this.ctx.getOffset(t), l = r, c = a, d = o.getDrawX(), f = o.getDrawY();
4295
4319
  if (l > d + o.width - 5 && l < d + o.width + 4 && l < e - 4 && // 视窗中最后一列不允许调整宽
4296
4320
  c > f) {
4297
- const x = o.colIndex + o.colspan - 1, u = this.leafCellHeaders.find((w) => w.colIndex === x);
4321
+ const x = o.colIndex + o.colspan - 1, u = this.leafCellHeaders.find((g) => g.colIndex === x);
4298
4322
  if (!u || !u.fixed && this.ctx.stageWidth - this.ctx.fixedRightWidth < d + o.width)
4299
4323
  return;
4300
4324
  this.ctx.isTarget(t) && a <= this.height && (this.ctx.stageElement.style.cursor = "col-resize", this.resizeTarget = u);
@@ -4418,7 +4442,7 @@ class He {
4418
4442
  for (let r = 0; r < i; r++) {
4419
4443
  const a = t[r], l = o * (a.rowspan || 0), c = o * (a.level || 0);
4420
4444
  let { minWidth: d, maxWidth: f } = a, x = a.width || 100;
4421
- d && x < d && (x = d), f && x > f && (x = f), a.children && (x = Q(a.children).reduce((m, g) => m + ((g == null ? void 0 : g.width) || 100), 0));
4445
+ d && x < d && (x = d), f && x > f && (x = f), a.children && (x = Q(a.children).reduce((m, w) => m + ((w == null ? void 0 : w.width) || 100), 0));
4422
4446
  const u = new mt(this.ctx, this.columnIndex, s, c, x, l, a);
4423
4447
  this.ctx.database.setHeader(a.key, u), this.allCellHeaders.push(u), a.children || (this.leafCellHeaders.push(u), u.column.widthFillDisable || this.resizeNum++), a.fixed === "left" ? this.fixedLeftCellHeaders.push(u) : a.fixed === "right" ? this.fixedRightCellHeaders.push(u) : this.centerCellHeaders.push(u), !a.children && this.columnIndex++, a.children && this.render(a.children, s), s += x;
4424
4448
  }
@@ -4646,18 +4670,18 @@ class De {
4646
4670
  if (!e.width)
4647
4671
  return;
4648
4672
  this.x = 0, x === "top" && o ? this.y = e.height + i.height : this.y = e.height;
4649
- const { data: u, sumHeight: w } = s.getData();
4650
- this.height = w, this.data = u, this.width = e.width, this.visibleWidth = this.ctx.stageWidth - r;
4673
+ const { data: u, sumHeight: g } = s.getData();
4674
+ this.height = g, this.data = u, this.width = e.width, this.visibleWidth = this.ctx.stageWidth - r;
4651
4675
  const m = this.ctx.footer.height;
4652
4676
  this.ctx.isEmpty = !this.data.length, !this.data.length && !a ? this.height = l : !this.data.length && a && (this.height = a - e.height - m - r);
4653
- let g = this.height + e.height + r;
4654
- g += m;
4655
- let E = g;
4677
+ let w = this.height + e.height + r;
4678
+ w += m;
4679
+ let E = w;
4656
4680
  const p = window.innerHeight, { top: C } = this.containerRect || this.ctx.containerElement.getBoundingClientRect();
4657
4681
  if (p > C && d && !a) {
4658
4682
  const O = p - C - f;
4659
- O > e.height + r ? E = O : g > c && (E = c);
4660
- } else this.data.length && a ? E = a : this.data.length && c && g > c && (E = c);
4683
+ O > e.height + r ? E = O : w > c && (E = c);
4684
+ } else this.data.length && a ? E = a : this.data.length && c && w > c && (E = c);
4661
4685
  E > 0 && (this.ctx.stageHeight = Math.floor(E), this.ctx.stageElement.style.height = `${this.ctx.stageHeight}px`);
4662
4686
  let b = this.ctx.stageHeight - e.height - r;
4663
4687
  o ? this.visibleHeight = b - m : this.visibleHeight = b, this.data.length || (this.height = this.visibleHeight), this.ctx.body.x = this.x, this.ctx.body.y = this.y, this.ctx.body.width = this.width, this.ctx.body.height = this.height, this.ctx.body.visibleWidth = this.visibleWidth, this.ctx.body.visibleHeight = this.visibleHeight, this.ctx.body.data = u;
@@ -4714,8 +4738,8 @@ class De {
4714
4738
  const f = this.renderRows[d];
4715
4739
  if (s > f.y - l + f.height - 1.5 && s < f.y - l + f.height + 1.5 && s < a - 4)
4716
4740
  for (let u = 0; u < f.cells.length; u++) {
4717
- const w = f.cells[u];
4718
- o > w.drawX + 10 && o < w.drawX + w.width - 10 && w.rowspan === 1 && (this.ctx.stageElement.style.cursor = "row-resize", this.resizeTarget = f);
4741
+ const g = f.cells[u];
4742
+ o > g.drawX + 10 && o < g.drawX + g.width - 10 && g.rowspan === 1 && (this.ctx.stageElement.style.cursor = "row-resize", this.resizeTarget = f);
4719
4743
  }
4720
4744
  }
4721
4745
  }
@@ -4798,8 +4822,8 @@ class De {
4798
4822
  this.headIndex = Math.max(0, l), this.tailIndex = Math.min(this.ctx.maxRowIndex, c + 1), this.visibleRows = r.slice(this.headIndex, this.tailIndex + 1), this.ctx.body.headIndex = this.headIndex, this.ctx.body.tailIndex = this.tailIndex, this.ctx.body.visibleRows = this.visibleRows;
4799
4823
  const d = [];
4800
4824
  for (let f = 0; f < this.visibleRows.length; f++) {
4801
- const x = this.headIndex + f, u = this.visibleRows[f], { height: w, top: m } = this.ctx.database.getPositionForRowIndex(x), g = new Zt(this.ctx, x, 0, m + this.y, t.width, w, u);
4802
- d.push(g);
4825
+ const x = this.headIndex + f, u = this.visibleRows[f], { height: g, top: m } = this.ctx.database.getPositionForRowIndex(x), w = new Zt(this.ctx, x, 0, m + this.y, t.width, g, u);
4826
+ d.push(w);
4803
4827
  }
4804
4828
  this.renderRows = d, this.ctx.body.renderRows = d;
4805
4829
  }
@@ -4944,7 +4968,7 @@ class ke {
4944
4968
  }), this.ctx.on("mouseup", () => {
4945
4969
  this.ctx.selectorMove = !1, this.ctx.stopAdjustPosition();
4946
4970
  const t = setTimeout(() => {
4947
- this.ctx.adjustPositioning = !1, clearTimeout(t);
4971
+ this.ctx.adjustPositioning = !1, this.ctx.disableHoverIconClick = !1, clearTimeout(t);
4948
4972
  }, 0);
4949
4973
  }), this.ctx.on("cellHeaderHoverChange", (t) => {
4950
4974
  this.ctx.mousedown && this.selectCols(t);
@@ -5020,7 +5044,7 @@ class ke {
5020
5044
  o = [a, a];
5021
5045
  }
5022
5046
  if (JSON.stringify(this.ctx.selector.xArr) !== JSON.stringify(o) || JSON.stringify(this.ctx.selector.yArr) !== JSON.stringify(r)) {
5023
- this.ctx.mousedown && (this.ctx.selectorMove = !0), this.ctx.selector.enable = !0;
5047
+ this.ctx.mousedown && (this.ctx.selectorMove = !0, this.ctx.disableHoverIconClick = !0), this.ctx.selector.enable = !0;
5024
5048
  const {
5025
5049
  SELECTOR_AREA_MIN_X: a,
5026
5050
  SELECTOR_AREA_MAX_X: l,
@@ -5028,15 +5052,15 @@ class ke {
5028
5052
  SELECTOR_AREA_MAX_Y: d,
5029
5053
  SELECTOR_AREA_MAX_X_OFFSET: f,
5030
5054
  SELECTOR_AREA_MAX_Y_OFFSET: x
5031
- } = this.ctx.config, u = a, w = l || this.ctx.maxColIndex - f, m = c, g = d || this.ctx.maxRowIndex - x;
5055
+ } = this.ctx.config, u = a, g = l || this.ctx.maxColIndex - f, m = c, w = d || this.ctx.maxRowIndex - x;
5032
5056
  let [E, p] = o, [C, b] = r;
5033
- if (E < u || p > w || C < m || b > g)
5057
+ if (E < u || p > g || C < m || b > w)
5034
5058
  return;
5035
- if (this.ctx.stageElement.focus({ preventScroll: !0 }), this.ctx.config.ENABLE_MERGE_CELL_LINK) {
5059
+ if (this.ctx.config.ENABLE_MERGE_CELL_LINK) {
5036
5060
  const v = this.adjustMergeCells(o, r);
5037
5061
  C = v.yArr[0], b = v.yArr[1], E = v.xArr[0], p = v.xArr[1], this.ctx.onlyMergeCell = v.onlyMergeCell;
5038
5062
  }
5039
- E === p && C === b ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, o = [Math.max(u, E), Math.min(w, p)], r = [Math.max(m, C), Math.min(g, b)];
5063
+ E === p && C === b ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, o = [Math.max(u, E), Math.min(g, p)], r = [Math.max(m, C), Math.min(w, b)];
5040
5064
  const { BEFORE_SET_SELECTOR_METHOD: y } = this.ctx.config;
5041
5065
  if (typeof y == "function") {
5042
5066
  const _ = y({
@@ -5052,7 +5076,7 @@ class ke {
5052
5076
  }
5053
5077
  }
5054
5078
  adjustMergeCells(t, e) {
5055
- var w;
5079
+ var g;
5056
5080
  const [i, s] = e, [o, r] = t;
5057
5081
  if (s === this.ctx.maxRowIndex && i === 0 || r === this.ctx.maxColIndex && o === 0)
5058
5082
  return {
@@ -5062,13 +5086,13 @@ class ke {
5062
5086
  };
5063
5087
  let a = [], l = [];
5064
5088
  for (let m = 0; m <= e[1] - e[0]; m++)
5065
- for (let g = 0; g <= t[1] - t[0]; g++) {
5066
- const E = m + e[0], p = g + t[0], C = this.ctx.database.getVirtualBodyCell(E, p);
5089
+ for (let w = 0; w <= t[1] - t[0]; w++) {
5090
+ const E = m + e[0], p = w + t[0], C = this.ctx.database.getVirtualBodyCell(E, p);
5067
5091
  C && ((E === i || E === s) && a.push(C), (p === o || p === r) && l.push(C));
5068
5092
  }
5069
5093
  const c = a.reduce(
5070
- (m, g) => {
5071
- const { yArr: E } = g.getSpanInfo(), [p, C] = E;
5094
+ (m, w) => {
5095
+ const { yArr: E } = w.getSpanInfo(), [p, C] = E;
5072
5096
  return m.minY = Math.min(m.minY, p), m.maxY = Math.max(m.maxY, C), m;
5073
5097
  },
5074
5098
  {
@@ -5076,8 +5100,8 @@ class ke {
5076
5100
  maxY: s
5077
5101
  }
5078
5102
  ), d = l.reduce(
5079
- (m, g) => {
5080
- const { xArr: E } = g.getSpanInfo(), [p, C] = E;
5103
+ (m, w) => {
5104
+ const { xArr: E } = w.getSpanInfo(), [p, C] = E;
5081
5105
  return m.minX = Math.min(m.minX, p), m.maxX = Math.max(m.maxX, C), m;
5082
5106
  },
5083
5107
  {
@@ -5087,8 +5111,8 @@ class ke {
5087
5111
  ), f = [d.minX, d.maxX], x = [c.minY, c.maxY];
5088
5112
  let u = !1;
5089
5113
  if (d.minX !== d.maxX || c.minY !== c.maxY) {
5090
- const m = JSON.stringify(f) + JSON.stringify(x), g = (w = this.ctx.focusCell) == null ? void 0 : w.getSpanInfo();
5091
- u = (g && JSON.stringify(g.xArr) + JSON.stringify(g.yArr)) === m;
5114
+ const m = JSON.stringify(f) + JSON.stringify(x), w = (g = this.ctx.focusCell) == null ? void 0 : g.getSpanInfo();
5115
+ u = (w && JSON.stringify(w.xArr) + JSON.stringify(w.yArr)) === m;
5092
5116
  }
5093
5117
  return {
5094
5118
  xArr: f,
@@ -5123,8 +5147,8 @@ class ke {
5123
5147
  SELECTOR_AREA_MAX_Y: r,
5124
5148
  SELECTOR_AREA_MAX_X_OFFSET: a,
5125
5149
  SELECTOR_AREA_MAX_Y_OFFSET: l
5126
- } = this.ctx.config, c = i, d = s || this.ctx.maxColIndex - a, f = o, x = r || this.ctx.maxRowIndex - l, u = [c, d], w = [f, x];
5127
- this.setSelector(u, w);
5150
+ } = this.ctx.config, c = i, d = s || this.ctx.maxColIndex - a, f = o, x = r || this.ctx.maxRowIndex - l, u = [c, d], g = [f, x];
5151
+ this.setSelector(u, g);
5128
5152
  }
5129
5153
  }
5130
5154
  selectRows(t, e = !0) {
@@ -5231,10 +5255,10 @@ class ke {
5231
5255
  for (let c = 0; c <= t[1] - t[0]; c++) {
5232
5256
  const d = l + e[0], f = c + t[0], x = this.ctx.database.getItemValueForRowIndexAndColIndex(d, f);
5233
5257
  if (x) {
5234
- const { rowKey: u, key: w } = x;
5235
- this.ctx.database.getReadonly(u, w) || (r.add(u), o.push({
5258
+ const { rowKey: u, key: g } = x;
5259
+ this.ctx.database.getReadonly(u, g) || (r.add(u), o.push({
5236
5260
  rowKey: u,
5237
- key: w,
5261
+ key: g,
5238
5262
  value: s,
5239
5263
  row: {}
5240
5264
  //内部有设置
@@ -5261,14 +5285,14 @@ class ke {
5261
5285
  const e = this.ctx.selector.yArr[0], i = this.ctx.selector.xArr[0], s = /* @__PURE__ */ new Set();
5262
5286
  navigator.clipboard.readText().then(async (o) => {
5263
5287
  let r = ge(o);
5264
- const a = [i, i + r[0].length - 1], l = [e, e + r.length - 1], [c, d] = l, [f, x] = a, u = d - this.ctx.maxRowIndex, w = x - this.ctx.maxColIndex;
5265
- (u > 0 || w > 0) && this.ctx.emit("onPastedDataOverflow", {
5288
+ const a = [i, i + r[0].length - 1], l = [e, e + r.length - 1], [c, d] = l, [f, x] = a, u = d - this.ctx.maxRowIndex, g = x - this.ctx.maxColIndex;
5289
+ (u > 0 || g > 0) && this.ctx.emit("onPastedDataOverflow", {
5266
5290
  maxY: d,
5267
5291
  maxX: x,
5268
5292
  minY: c,
5269
5293
  minX: f,
5270
5294
  overflowRowCount: u,
5271
- overflowColCount: w,
5295
+ overflowColCount: g,
5272
5296
  textArr: r
5273
5297
  });
5274
5298
  const m = r.length === 1 && r[0].length === 1;
@@ -5280,7 +5304,7 @@ class ke {
5280
5304
  this.ctx.hasEvent("error") ? this.ctx.emit("error", C) : alert(C.message);
5281
5305
  return;
5282
5306
  }
5283
- let g = [];
5307
+ let w = [];
5284
5308
  for (let C = 0; C <= r.length - 1; C++) {
5285
5309
  const b = r[C].length;
5286
5310
  for (let y = 0; y <= b - 1; y++) {
@@ -5290,7 +5314,7 @@ class ke {
5290
5314
  );
5291
5315
  if (I) {
5292
5316
  const { rowKey: R, key: T } = I;
5293
- this.ctx.database.getReadonly(R, T) || (s.add(R), g.push({
5317
+ this.ctx.database.getReadonly(R, T) || (s.add(R), w.push({
5294
5318
  rowKey: R,
5295
5319
  key: T,
5296
5320
  value: S,
@@ -5306,30 +5330,30 @@ class ke {
5306
5330
  this.ctx.selector.yArrCopy,
5307
5331
  !0
5308
5332
  // 忽略设置,只返回数据,用于cut,实现历史回退需要返回两次问题
5309
- ), b = g.map((y) => `${y.rowKey}-${y.key}`);
5333
+ ), b = w.map((y) => `${y.rowKey}-${y.key}`);
5310
5334
  C.forEach((y) => {
5311
- b.includes(`${y.rowKey}-${y.key}`) || g.unshift(y);
5335
+ b.includes(`${y.rowKey}-${y.key}`) || w.unshift(y);
5312
5336
  }), this.isCut = !1;
5313
5337
  }
5314
- if (!g.length)
5338
+ if (!w.length)
5315
5339
  return;
5316
5340
  const { BEFORE_PASTE_DATA_METHOD: E } = this.ctx.config;
5317
5341
  if (typeof E == "function") {
5318
- const C = E, b = g.map((y) => ({
5342
+ const C = E, b = w.map((y) => ({
5319
5343
  rowKey: y.rowKey,
5320
5344
  key: y.key,
5321
5345
  value: y.value,
5322
5346
  oldValue: this.ctx.database.getItemValue(y.rowKey, y.key),
5323
5347
  row: this.ctx.database.getRowDataItemForRowKey(y.rowKey)
5324
5348
  }));
5325
- if (g = await C(b, a, l, r), g && !g.length)
5349
+ if (w = await C(b, a, l, r), w && !w.length)
5326
5350
  return;
5327
5351
  }
5328
- this.clearCopyLine(), this.ctx.batchSetItemValueByEditor(g, !0);
5352
+ this.clearCopyLine(), this.ctx.batchSetItemValueByEditor(w, !0);
5329
5353
  let p = [];
5330
5354
  s.forEach((C) => {
5331
5355
  p.push(this.ctx.database.getRowDataItemForRowKey(C));
5332
- }), this.ctx.emit("pasteChange", g, p), this.ctx.emit("draw");
5356
+ }), this.ctx.emit("pasteChange", w, p), this.ctx.emit("draw");
5333
5357
  }).catch((o) => {
5334
5358
  console.error("Failed to get the clipboard content:", o);
5335
5359
  });
@@ -5390,17 +5414,17 @@ class ke {
5390
5414
  body: l,
5391
5415
  scrollX: c,
5392
5416
  scrollY: d,
5393
- config: { SCROLLER_TRACK_SIZE: f, FOOTER_FIXED: x, FOOTER_POSITION: u, ENABLE_MERGE_CELL_LINK: w }
5417
+ config: { SCROLLER_TRACK_SIZE: f, FOOTER_FIXED: x, FOOTER_POSITION: u, ENABLE_MERGE_CELL_LINK: g }
5394
5418
  } = this.ctx;
5395
5419
  if (!i)
5396
5420
  return;
5397
- w && this.ctx.onlyMergeCell && i.updateSpanInfo();
5398
- const { drawX: m, drawY: g, width: E, height: p, fixed: C } = i, b = o - m + 1, y = i.drawX + E - (e - s) + 1;
5399
- let v = r.height - g, _ = p;
5421
+ g && this.ctx.onlyMergeCell && i.updateSpanInfo();
5422
+ const { drawX: m, drawY: w, width: E, height: p, fixed: C } = i, b = o - m + 1, y = i.drawX + E - (e - s) + 1;
5423
+ let v = r.height - w, _ = p;
5400
5424
  _ > l.visibleHeight && (_ = l.visibleHeight);
5401
5425
  let S = 0;
5402
- x && (u === "top" ? v = r.height + a.height - g : S = a.visibleHeight);
5403
- const I = g + _ - (t - S - f);
5426
+ x && (u === "top" ? v = r.height + a.height - w : S = a.visibleHeight);
5427
+ const I = w + _ - (t - S - f);
5404
5428
  let R = c, T = d;
5405
5429
  y > 0 && !C ? R = Math.floor(c + y) : b > 0 && !C && (R = Math.floor(c - b)), v > 0 ? T = Math.floor(d - v) : I > 0 && (T = Math.floor(d + I)), (Math.abs(c - R) > 2 || Math.abs(d - T) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(R, T), this.ctx.emit("adjustBoundaryPosition", i));
5406
5430
  }
@@ -5437,49 +5461,44 @@ class Xe {
5437
5461
  return !(JSON.stringify(this.ctx.autofill.xArr) === JSON.stringify(t) && JSON.stringify(this.ctx.autofill.yArr) === JSON.stringify(e));
5438
5462
  }
5439
5463
  setMousedown() {
5440
- this.ctx.autofill.enable = !0, this.ctx.autofillMove = !0;
5464
+ this.ctx.autofill.enable = !0, this.ctx.autofillMove = !0, this.ctx.disableHoverIconClick = !0;
5441
5465
  }
5442
5466
  setMouseUp() {
5443
5467
  if (!this.ctx.autofill.enable)
5444
5468
  return;
5445
- this.isAutofillIng() && this.autofillData(), this.ctx.autofill.enable = !1, this.ctx.autofillMove = !1, this.ctx.autofill.xArr = [-1, -1], this.ctx.autofill.yArr = [-1, -1];
5469
+ this.isAutofillIng() && this.autofillData(), this.ctx.autofill.enable = !1, this.ctx.autofillMove = !1, this.ctx.autofill.xArr = [-1, -1], this.ctx.autofill.yArr = [-1, -1], setTimeout(() => {
5470
+ this.ctx.disableHoverIconClick = !1;
5471
+ }, 0);
5446
5472
  }
5447
5473
  setAutofill(t, e) {
5448
- const { ENABLE_AUTOFILL: i, ENABLE_SELECTOR_SPAN_COL: s, ENABLE_SELECTOR_SPAN_ROW: o } = this.ctx.config;
5474
+ const { ENABLE_AUTOFILL: i, ENABLE_AUTOFILL_SPAN_COL: s, ENABLE_AUTOFILL_SPAN_ROW: o } = this.ctx.config;
5449
5475
  if (!i)
5450
5476
  return;
5451
5477
  let r = t, a = e;
5452
- if (!o) {
5453
- const [l] = a;
5454
- a = [l, l];
5455
- }
5456
- if (!s) {
5457
- const [l] = r;
5458
- r = [l, l];
5459
- }
5460
- if (JSON.stringify(this.ctx.autofill.xArr) !== JSON.stringify(r) || JSON.stringify(this.ctx.autofill.yArr) !== JSON.stringify(a)) {
5478
+ const l = this.ctx.selector.xArr, c = this.ctx.selector.yArr;
5479
+ if (!(!o && JSON.stringify(c) !== JSON.stringify(a)) && !(!s && JSON.stringify(l) !== JSON.stringify(r)) && (JSON.stringify(this.ctx.autofill.xArr) !== JSON.stringify(r) || JSON.stringify(this.ctx.autofill.yArr) !== JSON.stringify(a))) {
5461
5480
  const {
5462
- SELECTOR_AREA_MIN_X: l,
5463
- SELECTOR_AREA_MAX_X: c,
5464
- SELECTOR_AREA_MIN_Y: d,
5465
- SELECTOR_AREA_MAX_Y: f,
5466
- SELECTOR_AREA_MAX_X_OFFSET: x,
5467
- SELECTOR_AREA_MAX_Y_OFFSET: u
5468
- } = this.ctx.config, w = l, m = c || this.ctx.maxColIndex - x, g = d, E = f || this.ctx.maxRowIndex - u;
5469
- let [p, C] = r, [b, y] = a;
5470
- if (p < w || b < g)
5481
+ SELECTOR_AREA_MIN_X: d,
5482
+ SELECTOR_AREA_MAX_X: f,
5483
+ SELECTOR_AREA_MIN_Y: x,
5484
+ SELECTOR_AREA_MAX_Y: u,
5485
+ SELECTOR_AREA_MAX_X_OFFSET: g,
5486
+ SELECTOR_AREA_MAX_Y_OFFSET: m
5487
+ } = this.ctx.config, w = d, E = f || this.ctx.maxColIndex - g, p = x, C = u || this.ctx.maxRowIndex - m;
5488
+ let [b, y] = r, [v, _] = a;
5489
+ if (b < w || v < p)
5471
5490
  return;
5472
- r = [Math.max(w, p), Math.min(m, C)], a = [Math.max(g, b), Math.min(E, y)];
5473
- const { BEFORE_SET_AUTOFILL_METHOD: v } = this.ctx.config;
5474
- if (typeof v == "function") {
5475
- const S = v({
5491
+ r = [Math.max(w, b), Math.min(E, y)], a = [Math.max(p, v), Math.min(C, _)];
5492
+ const { BEFORE_SET_AUTOFILL_METHOD: S } = this.ctx.config;
5493
+ if (typeof S == "function") {
5494
+ const R = S({
5476
5495
  focusCell: this.ctx.focusCell,
5477
5496
  xArr: r,
5478
5497
  yArr: a
5479
5498
  });
5480
- if (!S)
5499
+ if (!R)
5481
5500
  return;
5482
- r = S.xArr, a = S.yArr;
5501
+ r = R.xArr, a = R.yArr;
5483
5502
  }
5484
5503
  this.ctx.autofill.xArr = r, this.ctx.autofill.yArr = a, this.ctx.emit("setAutofill", this.ctx.autofill), this.ctx.emit("draw");
5485
5504
  }
@@ -5490,9 +5509,9 @@ class Xe {
5490
5509
  async autofillData() {
5491
5510
  const t = /* @__PURE__ */ new Set(), e = this.ctx.getSelectedData(), i = /* @__PURE__ */ new Map();
5492
5511
  for (let u = 0; u <= e.yArr[1] - e.yArr[0]; u++)
5493
- for (let w = 0; w <= e.xArr[1] - e.xArr[0]; w++) {
5494
- const m = u + e.yArr[0], g = w + e.xArr[0];
5495
- i.set(`${m}-${g}`, !0);
5512
+ for (let g = 0; g <= e.xArr[1] - e.xArr[0]; g++) {
5513
+ const m = u + e.yArr[0], w = g + e.xArr[0];
5514
+ i.set(`${m}-${w}`, !0);
5496
5515
  }
5497
5516
  const { value: s } = e, o = s[0].length, r = s.length, a = this.ctx.autofill.xArr, l = this.ctx.autofill.yArr, c = o === 1 && r === 1;
5498
5517
  if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(a, l) && !c) {
@@ -5505,8 +5524,8 @@ class Xe {
5505
5524
  }
5506
5525
  let d = [];
5507
5526
  for (let u = 0; u <= l[1] - l[0]; u++)
5508
- for (let w = 0; w <= a[1] - a[0]; w++) {
5509
- const m = w + a[0], g = u + l[0], E = s[u % r][w % o], p = this.ctx.database.getItemValueForRowIndexAndColIndex(g, m), C = `${g}-${m}`;
5527
+ for (let g = 0; g <= a[1] - a[0]; g++) {
5528
+ const m = g + a[0], w = u + l[0], E = s[u % r][g % o], p = this.ctx.database.getItemValueForRowIndexAndColIndex(w, m), C = `${w}-${m}`;
5510
5529
  if (p && !i.has(C)) {
5511
5530
  const { rowKey: b, key: y } = p;
5512
5531
  this.ctx.database.getReadonly(b, y) || (t.add(b), d.push({
@@ -5522,14 +5541,14 @@ class Xe {
5522
5541
  this.ctx.selector.xArr = this.ctx.autofill.xArr, this.ctx.selector.yArr = this.ctx.autofill.yArr;
5523
5542
  const { BEFORE_AUTOFILL_DATA_METHOD: f } = this.ctx.config;
5524
5543
  if (typeof f == "function") {
5525
- const u = f, w = d.map((m) => ({
5544
+ const u = f, g = d.map((m) => ({
5526
5545
  rowKey: m.rowKey,
5527
5546
  key: m.key,
5528
5547
  value: m.value,
5529
5548
  oldValue: this.ctx.database.getItemValue(m.rowKey, m.key),
5530
5549
  row: this.ctx.database.getRowDataItemForRowKey(m.rowKey)
5531
5550
  }));
5532
- if (d = await u(w, a, l), d && !d.length)
5551
+ if (d = await u(g, a, l), d && !d.length)
5533
5552
  return;
5534
5553
  }
5535
5554
  this.ctx.batchSetItemValueByEditor(d, !0);
@@ -5718,10 +5737,10 @@ const Ue = async (h, t, e) => {
5718
5737
  }), {
5719
5738
  x: d,
5720
5739
  y: f
5721
- } = Kt(c, i, l), x = i, u = {}, w = 0;
5740
+ } = Kt(c, i, l), x = i, u = {}, g = 0;
5722
5741
  for (let m = 0; m < a.length; m++) {
5723
5742
  const {
5724
- name: g,
5743
+ name: w,
5725
5744
  fn: E
5726
5745
  } = a[m], {
5727
5746
  x: p,
@@ -5744,11 +5763,11 @@ const Ue = async (h, t, e) => {
5744
5763
  });
5745
5764
  d = p ?? d, f = C ?? f, u = {
5746
5765
  ...u,
5747
- [g]: {
5748
- ...u[g],
5766
+ [w]: {
5767
+ ...u[w],
5749
5768
  ...b
5750
5769
  }
5751
- }, y && w <= 50 && (w++, typeof y == "object" && (y.placement && (x = y.placement), y.rects && (c = y.rects === !0 ? await r.getElementRects({
5770
+ }, y && g <= 50 && (g++, typeof y == "object" && (y.placement && (x = y.placement), y.rects && (c = y.rects === !0 ? await r.getElementRects({
5752
5771
  reference: h,
5753
5772
  floating: t,
5754
5773
  strategy: s
@@ -5781,8 +5800,8 @@ async function te(h, t) {
5781
5800
  elementContext: f = "floating",
5782
5801
  altBoundary: x = !1,
5783
5802
  padding: u = 0
5784
- } = et(t, h), w = Qt(u), g = a[x ? f === "floating" ? "reference" : "floating" : f], E = ct(await o.getClippingRect({
5785
- element: (e = await (o.isElement == null ? void 0 : o.isElement(g))) == null || e ? g : g.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(a.floating)),
5803
+ } = et(t, h), g = Qt(u), w = a[x ? f === "floating" ? "reference" : "floating" : f], E = ct(await o.getClippingRect({
5804
+ element: (e = await (o.isElement == null ? void 0 : o.isElement(w))) == null || e ? w : w.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(a.floating)),
5786
5805
  boundary: c,
5787
5806
  rootBoundary: d,
5788
5807
  strategy: l
@@ -5804,10 +5823,10 @@ async function te(h, t) {
5804
5823
  strategy: l
5805
5824
  }) : p);
5806
5825
  return {
5807
- top: (E.top - y.top + w.top) / b.y,
5808
- bottom: (y.bottom - E.bottom + w.bottom) / b.y,
5809
- left: (E.left - y.left + w.left) / b.x,
5810
- right: (y.right - E.right + w.right) / b.x
5826
+ top: (E.top - y.top + g.top) / b.y,
5827
+ bottom: (y.bottom - E.bottom + g.bottom) / b.y,
5828
+ left: (E.left - y.left + g.left) / b.x,
5829
+ right: (y.right - E.right + g.right) / b.x
5811
5830
  };
5812
5831
  }
5813
5832
  const je = (h) => ({
@@ -5831,10 +5850,10 @@ const je = (h) => ({
5831
5850
  const f = Qt(d), x = {
5832
5851
  x: e,
5833
5852
  y: i
5834
- }, u = vt(s), w = Rt(u), m = await r.getDimensions(c), g = u === "y", E = g ? "top" : "left", p = g ? "bottom" : "right", C = g ? "clientHeight" : "clientWidth", b = o.reference[w] + o.reference[u] - x[u] - o.floating[w], y = x[u] - o.reference[u], v = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c));
5853
+ }, u = vt(s), g = Rt(u), m = await r.getDimensions(c), w = u === "y", E = w ? "top" : "left", p = w ? "bottom" : "right", C = w ? "clientHeight" : "clientWidth", b = o.reference[g] + o.reference[u] - x[u] - o.floating[g], y = x[u] - o.reference[u], v = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c));
5835
5854
  let _ = v ? v[C] : 0;
5836
- (!_ || !await (r.isElement == null ? void 0 : r.isElement(v))) && (_ = a.floating[C] || o.floating[w]);
5837
- const S = b / 2 - y / 2, I = _ / 2 - m[w] / 2 - 1, R = j(f[E], I), T = j(f[p], I), O = R, M = _ - m[w] - T, L = _ / 2 - m[w] / 2 + S, A = Et(O, L, M), D = !l.arrow && it(s) != null && L !== A && o.reference[w] / 2 - (L < O ? R : T) - m[w] / 2 < 0, H = D ? L < O ? L - O : L - M : 0;
5855
+ (!_ || !await (r.isElement == null ? void 0 : r.isElement(v))) && (_ = a.floating[C] || o.floating[g]);
5856
+ const S = b / 2 - y / 2, I = _ / 2 - m[g] / 2 - 1, R = j(f[E], I), T = j(f[p], I), O = R, M = _ - m[g] - T, L = _ / 2 - m[g] / 2 + S, A = Et(O, L, M), D = !l.arrow && it(s) != null && L !== A && o.reference[g] / 2 - (L < O ? R : T) - m[g] / 2 < 0, H = D ? L < O ? L - O : L - M : 0;
5838
5857
  return {
5839
5858
  [u]: x[u] + H,
5840
5859
  data: {
@@ -5865,15 +5884,15 @@ const je = (h) => ({
5865
5884
  crossAxis: f = !0,
5866
5885
  fallbackPlacements: x,
5867
5886
  fallbackStrategy: u = "bestFit",
5868
- fallbackAxisSideDirection: w = "none",
5887
+ fallbackAxisSideDirection: g = "none",
5869
5888
  flipAlignment: m = !0,
5870
- ...g
5889
+ ...w
5871
5890
  } = et(h, t);
5872
5891
  if ((e = o.arrow) != null && e.alignmentOffset)
5873
5892
  return {};
5874
- const E = $(s), p = V(a), C = $(a) === a, b = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), y = x || (C || !m ? [lt(a)] : We(a)), v = w !== "none";
5875
- !x && v && y.push(...$e(a, m, w, b));
5876
- const _ = [a, ...y], S = await te(t, g), I = [];
5893
+ const E = $(s), p = V(a), C = $(a) === a, b = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), y = x || (C || !m ? [lt(a)] : We(a)), v = g !== "none";
5894
+ !x && v && y.push(...$e(a, m, g, b));
5895
+ const _ = [a, ...y], S = await te(t, w), I = [];
5877
5896
  let R = ((i = o.flip) == null ? void 0 : i.overflows) || [];
5878
5897
  if (d && I.push(S[E]), f) {
5879
5898
  const L = Fe(s, r, b);
@@ -5938,7 +5957,7 @@ async function Je(h, t) {
5938
5957
  let {
5939
5958
  mainAxis: x,
5940
5959
  crossAxis: u,
5941
- alignmentAxis: w
5960
+ alignmentAxis: g
5942
5961
  } = typeof f == "number" ? {
5943
5962
  mainAxis: f,
5944
5963
  crossAxis: 0,
@@ -5948,7 +5967,7 @@ async function Je(h, t) {
5948
5967
  crossAxis: f.crossAxis || 0,
5949
5968
  alignmentAxis: f.alignmentAxis
5950
5969
  };
5951
- return a && typeof w == "number" && (u = a === "end" ? w * -1 : w), l ? {
5970
+ return a && typeof g == "number" && (u = a === "end" ? g * -1 : g), l ? {
5952
5971
  x: u * d,
5953
5972
  y: x * c
5954
5973
  } : {
@@ -5991,11 +6010,11 @@ const Qe = function(h) {
5991
6010
  mainAxis: o = !0,
5992
6011
  crossAxis: r = !1,
5993
6012
  limiter: a = {
5994
- fn: (g) => {
6013
+ fn: (w) => {
5995
6014
  let {
5996
6015
  x: E,
5997
6016
  y: p
5998
- } = g;
6017
+ } = w;
5999
6018
  return {
6000
6019
  x: E,
6001
6020
  y: p
@@ -6007,19 +6026,19 @@ const Qe = function(h) {
6007
6026
  x: e,
6008
6027
  y: i
6009
6028
  }, d = await te(t, l), f = V($(s)), x = Jt(f);
6010
- let u = c[x], w = c[f];
6029
+ let u = c[x], g = c[f];
6011
6030
  if (o) {
6012
- const g = x === "y" ? "top" : "left", E = x === "y" ? "bottom" : "right", p = u + d[g], C = u - d[E];
6031
+ const w = x === "y" ? "top" : "left", E = x === "y" ? "bottom" : "right", p = u + d[w], C = u - d[E];
6013
6032
  u = Et(p, u, C);
6014
6033
  }
6015
6034
  if (r) {
6016
- const g = f === "y" ? "top" : "left", E = f === "y" ? "bottom" : "right", p = w + d[g], C = w - d[E];
6017
- w = Et(p, w, C);
6035
+ const w = f === "y" ? "top" : "left", E = f === "y" ? "bottom" : "right", p = g + d[w], C = g - d[E];
6036
+ g = Et(p, g, C);
6018
6037
  }
6019
6038
  const m = a.fn({
6020
6039
  ...t,
6021
6040
  [x]: u,
6022
- [f]: w
6041
+ [f]: g
6023
6042
  });
6024
6043
  return {
6025
6044
  ...m,
@@ -6197,10 +6216,10 @@ function G(h, t, e, i) {
6197
6216
  let l = (s.left + a.x) / r.x, c = (s.top + a.y) / r.y, d = s.width / r.x, f = s.height / r.y;
6198
6217
  if (o) {
6199
6218
  const x = N(o), u = i && X(i) ? N(i) : i;
6200
- let w = x, m = Ct(w);
6201
- for (; m && i && u !== w; ) {
6202
- const g = U(m), E = m.getBoundingClientRect(), p = B(m), C = E.left + (m.clientLeft + parseFloat(p.paddingLeft)) * g.x, b = E.top + (m.clientTop + parseFloat(p.paddingTop)) * g.y;
6203
- l *= g.x, c *= g.y, d *= g.x, f *= g.y, l += C, c += b, w = N(m), m = Ct(w);
6219
+ let g = x, m = Ct(g);
6220
+ for (; m && i && u !== g; ) {
6221
+ const w = U(m), E = m.getBoundingClientRect(), p = B(m), C = E.left + (m.clientLeft + parseFloat(p.paddingLeft)) * w.x, b = E.top + (m.clientTop + parseFloat(p.paddingTop)) * w.y;
6222
+ l *= w.x, c *= w.y, d *= w.x, f *= w.y, l += C, c += b, g = N(m), m = Ct(g);
6204
6223
  }
6205
6224
  }
6206
6225
  return ct({
@@ -6455,8 +6474,8 @@ function vi(h, t) {
6455
6474
  } = c;
6456
6475
  if (a || t(), !x || !u)
6457
6476
  return;
6458
- const w = ot(f), m = ot(s.clientWidth - (d + x)), g = ot(s.clientHeight - (f + u)), E = ot(d), C = {
6459
- rootMargin: -w + "px " + -m + "px " + -g + "px " + -E + "px",
6477
+ const g = ot(f), m = ot(s.clientWidth - (d + x)), w = ot(s.clientHeight - (f + u)), E = ot(d), C = {
6478
+ rootMargin: -g + "px " + -m + "px " + -w + "px " + -E + "px",
6460
6479
  threshold: z(0, j(1, l)) || 1
6461
6480
  };
6462
6481
  let b = !0;
@@ -6507,17 +6526,17 @@ function yt(h, t, e, i) {
6507
6526
  (C = u) == null || C.observe(t);
6508
6527
  })), e();
6509
6528
  }), c && !l && u.observe(c), u.observe(t));
6510
- let w, m = l ? G(h) : null;
6511
- l && g();
6512
- function g() {
6529
+ let g, m = l ? G(h) : null;
6530
+ l && w();
6531
+ function w() {
6513
6532
  const E = G(h);
6514
- m && !le(m, E) && e(), m = E, w = requestAnimationFrame(g);
6533
+ m && !le(m, E) && e(), m = E, g = requestAnimationFrame(w);
6515
6534
  }
6516
6535
  return e(), () => {
6517
6536
  var E;
6518
6537
  d.forEach((p) => {
6519
6538
  s && p.removeEventListener("scroll", e), o && p.removeEventListener("resize", e);
6520
- }), f == null || f(), (E = u) == null || E.disconnect(), u = null, l && cancelAnimationFrame(w);
6539
+ }), f == null || f(), (E = u) == null || E.disconnect(), u = null, l && cancelAnimationFrame(g);
6521
6540
  };
6522
6541
  }
6523
6542
  const ht = Qe, dt = ti, Lt = qe, _i = je, ft = (h, t, e) => {
@@ -6678,7 +6697,9 @@ class Ti {
6678
6697
  }), this.ctx.on("cellHeaderMousedown", () => {
6679
6698
  this.enable && this.doneEdit(), this.cellTarget = null;
6680
6699
  }), this.ctx.on("hoverIconClick", (t) => {
6681
- this.editCell(t.rowIndex, t.colIndex);
6700
+ this.ctx.disableHoverIconClick || this.editCell(t.rowIndex, t.colIndex);
6701
+ }), this.ctx.on("cellMousedown", () => {
6702
+ this.inputEl.focus({ preventScroll: !0 });
6682
6703
  }), this.ctx.on("keydown", (t) => {
6683
6704
  if (!this.ctx.isTarget(t) || !this.ctx.focusCell)
6684
6705
  return;
@@ -6772,7 +6793,7 @@ class Ti {
6772
6793
  return !(e < o || e > r || t < a || t > l);
6773
6794
  }
6774
6795
  initTextEditor() {
6775
- this.inputEl = document.createElement("textarea"), this.inputEl.setAttribute("rows", "1"), this.inputEl.addEventListener("input", this.autoSize.bind(this)), this.inputEl.addEventListener("blur", () => {
6796
+ this.inputEl = document.createElement("textarea"), this.inputEl.setAttribute("rows", "1"), this.inputEl.setAttribute("tabindex", "-1"), this.inputEl.addEventListener("input", this.autoSize.bind(this)), this.inputEl.addEventListener("blur", () => {
6776
6797
  this.doneEdit();
6777
6798
  }), this.editorEl = this.ctx.editorElement, this.inputEl.className = "e-virt-table-editor-textarea", this.editorEl.appendChild(this.inputEl), this.ctx.containerElement.appendChild(this.editorEl);
6778
6799
  }
@@ -6800,18 +6821,12 @@ class Ti {
6800
6821
  header: d
6801
6822
  } = this.ctx;
6802
6823
  let f = this.ctx.body.visibleHeight;
6803
- if (o > f && (o = f), this.editorEl.style.display = "inline-block", this.editorEl.style.left = `${this.drawX - 1}px`, this.editorEl.style.top = `${this.drawY - 1}px`, this.editorEl.style.bottom = "auto", this.editorEl.style.maxHeight = `${f}px`, s === "text") {
6804
- this.inputEl.style.display = "block", this.inputEl.style.minWidth = `${r - 1}px`, this.inputEl.style.minHeight = `${o - 1}px`, this.inputEl.style.maxHeight = `${f}px`, this.inputEl.style.width = `${r - 1}px`, this.inputEl.style.height = "auto", this.inputEl.style.padding = `${c}px`, i !== null && (this.inputEl.value = i), this.inputEl.focus({ preventScroll: !0 });
6805
- const x = this.inputEl.value.length;
6806
- this.inputEl.setSelectionRange(x, x);
6807
- } else
6808
- this.inputEl.style.display = "none";
6809
- (this.inputEl.scrollHeight > o || this.drawY < d.height) && this.autoSize();
6824
+ o > f && (o = f), this.editorEl.style.display = "inline-block", this.editorEl.style.zIndex = "100", this.editorEl.style.left = `${this.drawX - 1}px`, this.editorEl.style.top = `${this.drawY - 1}px`, this.editorEl.style.bottom = "auto", this.editorEl.style.maxHeight = `${f}px`, s === "text" ? (this.inputEl.style.display = "block", this.inputEl.style.minWidth = `${r - 1}px`, this.inputEl.style.minHeight = `${o - 1}px`, this.inputEl.style.maxHeight = `${f}px`, this.inputEl.style.width = `${r - 1}px`, this.inputEl.style.height = "auto", this.inputEl.style.padding = `${c}px`, this.inputEl.value = "", i !== null && (this.inputEl.value = i)) : this.editorEl.style.zIndex = "-1", (this.inputEl.scrollHeight > o || this.drawY < d.height) && this.autoSize();
6810
6825
  }
6811
6826
  doneEditByInput() {
6812
6827
  if (this.cellTarget && this.cellTarget.editorType === "text") {
6813
6828
  const { rowKey: t, key: e } = this.cellTarget, i = this.cellTarget.getValue(), s = this.inputEl.value;
6814
- s !== i && !(s === "" && i === null) && !this.cancel && this.ctx.setItemValueByEditor(t, e, s, !0), this.inputEl.value = "";
6829
+ s !== i && !(s === "" && i === null) && !this.cancel && this.ctx.setItemValueByEditor(t, e, s, !0);
6815
6830
  }
6816
6831
  }
6817
6832
  startEdit(t = !1) {
@@ -6840,7 +6855,7 @@ class Ti {
6840
6855
  o && !l && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = o, this.startEditByInput(this.cellTarget), this.ctx.emit("startEdit", this.cellTarget), this.ctx.emit("drawView"));
6841
6856
  }
6842
6857
  doneEdit() {
6843
- this.enable && (this.doneEditByInput(), this.ctx.emit("doneEdit", this.cellTarget), this.enable = !1, this.ctx.editing = !1, this.ctx.containerElement.focus({ preventScroll: !0 }), this.editorEl.style.display = "none", this.ctx.emit("draw"));
6858
+ this.enable && (this.doneEditByInput(), this.ctx.emit("doneEdit", this.cellTarget), this.enable = !1, this.ctx.editing = !1, this.inputEl.focus({ preventScroll: !0 }), this.editorEl.style.zIndex = "-1", this.ctx.emit("draw"));
6844
6859
  }
6845
6860
  clearEditor() {
6846
6861
  this.doneEdit(), this.cellTarget = null, this.selectorArrStr = "", this.ctx.clearSelector(), this.ctx.focusCell = void 0, this.ctx.emit("draw");
@@ -6928,8 +6943,8 @@ class Li {
6928
6943
  config: { SCROLLER_TRACK_SIZE: i, CSS_PREFIX: s }
6929
6944
  } = this.ctx, { visibleWidth: o, visibleHeight: r, renderCellHeaders: a } = this.ctx.header;
6930
6945
  let l = [], c = [], d = [];
6931
- a.forEach((g) => {
6932
- g.render && (g.fixed === "left" ? c.push(g) : g.fixed === "right" ? d.push(g) : l.push(g));
6946
+ a.forEach((w) => {
6947
+ w.render && (w.fixed === "left" ? c.push(w) : w.fixed === "right" ? d.push(w) : l.push(w));
6933
6948
  });
6934
6949
  const f = e - i, x = {
6935
6950
  key: "left",
@@ -6953,7 +6968,7 @@ class Li {
6953
6968
  height: `${r}px`
6954
6969
  },
6955
6970
  cells: l
6956
- }, w = {
6971
+ }, g = {
6957
6972
  key: "right",
6958
6973
  style: {
6959
6974
  position: "absolute",
@@ -6974,14 +6989,14 @@ class Li {
6974
6989
  width: `${o}px`,
6975
6990
  height: `${r}px`
6976
6991
  },
6977
- views: [x, u, w]
6992
+ views: [x, u, g]
6978
6993
  };
6979
6994
  }
6980
6995
  getBody() {
6981
6996
  const t = [], e = [], i = [];
6982
6997
  let s = this.ctx.body.renderRows;
6983
- this.ctx.config.FOOTER_FIXED || (s = s.concat(this.ctx.footer.renderRows)), s.forEach((g) => {
6984
- g.cells.forEach((E) => {
6998
+ this.ctx.config.FOOTER_FIXED || (s = s.concat(this.ctx.footer.renderRows)), s.forEach((w) => {
6999
+ w.cells.forEach((E) => {
6985
7000
  E.cellType === "footer" && (E.render = E.renderFooter), E.render && (E.fixed === "left" ? e.push(E) : E.fixed === "right" ? i.push(E) : t.push(E));
6986
7001
  });
6987
7002
  });
@@ -7011,7 +7026,7 @@ class Li {
7011
7026
  height: `${d}px`
7012
7027
  },
7013
7028
  cells: t
7014
- }, w = {
7029
+ }, g = {
7015
7030
  key: "right",
7016
7031
  style: {
7017
7032
  position: "absolute",
@@ -7032,14 +7047,14 @@ class Li {
7032
7047
  width: `${c}px`,
7033
7048
  height: `${d}px`
7034
7049
  },
7035
- views: [x, u, w]
7050
+ views: [x, u, g]
7036
7051
  };
7037
7052
  }
7038
7053
  getFooter() {
7039
7054
  const t = [], e = [], i = [];
7040
7055
  this.ctx.footer.renderRows.forEach((m) => {
7041
- m.cells.forEach((g) => {
7042
- g.cellType === "footer" && g.renderFooter && (g.render = g.renderFooter, g.fixed === "left" ? e.push(g) : g.fixed === "right" ? i.push(g) : t.push(g));
7056
+ m.cells.forEach((w) => {
7057
+ w.cellType === "footer" && w.renderFooter && (w.render = w.renderFooter, w.fixed === "left" ? e.push(w) : w.fixed === "right" ? i.push(w) : t.push(w));
7043
7058
  });
7044
7059
  });
7045
7060
  const {
@@ -7118,13 +7133,13 @@ class Pt {
7118
7133
  e ? "e-virt-table-submenu-item" : "e-virt-table-menu-item"
7119
7134
  );
7120
7135
  i.setAttribute(e ? "data-submenu" : "data-menu", t.value), t.disabled && i.classList.add("disabled");
7121
- const s = this.createElement("div", "menu-item-content");
7136
+ const s = this.createElement("div", "e-virt-table-menu-item-content");
7122
7137
  if (t.icon) {
7123
- const a = this.createElement("span", "menu-item-icon");
7138
+ const a = this.createElement("span", "e-virt-table-menu-item-icon");
7124
7139
  a.innerHTML = t.icon, s.appendChild(a);
7125
7140
  } else
7126
7141
  s.classList.add("menu-item-no-icon");
7127
- const o = this.createElement("span", "menu-item-text");
7142
+ const o = this.createElement("span", "e-virt-table-menu-item-text");
7128
7143
  if (o.textContent = t.label, s.appendChild(o), i.appendChild(s), (r = t.children) != null && r.length) {
7129
7144
  const a = this.createElement("span", "e-virt-table-menu-arrow");
7130
7145
  a.innerHTML = qt, i.appendChild(a);
@@ -7338,9 +7353,9 @@ class Mi {
7338
7353
  const { ENABLE_CONTEXT_MENU: i, CUSTOM_BODY_CONTEXT_MENU: s, CONTEXT_MENU: o } = this.ctx.config, r = [...o, ...s];
7339
7354
  if (!i || r.length === 0) return;
7340
7355
  e.preventDefault();
7341
- const { xArr: a, yArr: l } = this.ctx.selector, [c, d] = a, [f, x] = l, { rowIndex: u, colIndex: w } = t;
7342
- u >= f && u <= x && w >= c && w <= d || this.ctx.emit("setSelectorCell", t, e), this.currentDOMTreeMenu && this.currentDOMTreeMenu.destroy(), this.ctx.contextMenuIng = !0, this.currentDOMTreeMenu = new Pt(this.contextMenuEl, r, {
7343
- onClick: (g, E) => {
7356
+ const { xArr: a, yArr: l } = this.ctx.selector, [c, d] = a, [f, x] = l, { rowIndex: u, colIndex: g } = t;
7357
+ u >= f && u <= x && g >= c && g <= d || this.ctx.emit("setSelectorCell", t, e), this.currentDOMTreeMenu && this.currentDOMTreeMenu.destroy(), this.ctx.contextMenuIng = !0, this.currentDOMTreeMenu = new Pt(this.contextMenuEl, r, {
7358
+ onClick: (w, E) => {
7344
7359
  E === "copy" ? (this.ctx.emit("contextMenuCopy"), this.hide()) : E === "paste" ? (this.ctx.emit("contextMenuPaste"), this.hide()) : E === "cut" ? (this.ctx.emit("contextMenuCut"), this.hide()) : E === "clearSelected" && (this.ctx.emit("contextMenuClearSelected"), this.hide());
7345
7360
  }
7346
7361
  }), this.currentDOMTreeMenu.positionMenu(e);
@@ -7355,8 +7370,8 @@ class Mi {
7355
7370
  const { HEADER_CONTEXT_MENU: l, CUSTOM_HEADER_CONTEXT_MENU: c, ENABLE_HEADER_CONTEXT_MENU: d } = this.ctx.config, f = [...l, ...c];
7356
7371
  if (!d || f.length === 0) return;
7357
7372
  e.preventDefault();
7358
- const { xArr: x } = this.ctx.selector, [u, w] = x, { colIndex: m } = t;
7359
- m >= u && m <= w || (this.ctx.focusCellHeader = t, this.ctx.emit("selectCols", t)), this.currentDOMTreeMenu && this.currentDOMTreeMenu.destroy();
7373
+ const { xArr: x } = this.ctx.selector, [u, g] = x, { colIndex: m } = t;
7374
+ m >= u && m <= g || (this.ctx.focusCellHeader = t, this.ctx.emit("selectCols", t)), this.currentDOMTreeMenu && this.currentDOMTreeMenu.destroy();
7360
7375
  const E = this.ctx.database.getColumns(), p = f.map((C) => C.value === "visible" ? {
7361
7376
  ...C,
7362
7377
  children: this.filterColumns(E)
@@ -7657,11 +7672,17 @@ class ki {
7657
7672
  }
7658
7673
  setValidations(t) {
7659
7674
  if (t.forEach((e) => {
7660
- const { rowIndex: i, key: s, message: o } = e;
7661
- this.ctx.database.setValidationErrorByRowIndex(i, s, o);
7675
+ const { rowIndex: i, key: s, message: o, rowKey: r } = e;
7676
+ if (i !== void 0 && r === void 0) {
7677
+ const a = this.ctx.database.getRowKeyForRowIndex(i);
7678
+ this.ctx.database.setValidationErrorByRowKey(a, s, o);
7679
+ }
7680
+ r && this.ctx.database.setValidationErrorByRowKey(r, s, o);
7662
7681
  }), t && Array.isArray(t) && t.length) {
7663
7682
  const [e] = t;
7664
- if (e && e.rowIndex >= 0 && e.key) {
7683
+ if (e && e.rowKey)
7684
+ this.scrollToRowkey(e.rowKey), this.scrollToColkey(e.key);
7685
+ else if (e && e.rowIndex !== void 0 && e.rowIndex >= 0 && e.key) {
7665
7686
  const { rowIndex: i, key: s } = e;
7666
7687
  this.scrollToRowIndex(i), this.scrollToColkey(s);
7667
7688
  }
@@ -7751,6 +7772,9 @@ class ki {
7751
7772
  clearSort() {
7752
7773
  this.ctx.database.clearSort();
7753
7774
  }
7775
+ clearMaxRowHeight() {
7776
+ this.ctx.database.clearMaxRowHeight();
7777
+ }
7754
7778
  contextMenuHide() {
7755
7779
  this.contextMenu.hide();
7756
7780
  }