e-virt-table 1.3.11 → 1.3.13

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(.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}.e-virt-table-finder-bar{position:absolute;top:10px;left:50%;transform:translate(-50%);display:none;z-index:10000;background:#fff;border:1px solid #dadce0;border-radius:12px;box-shadow:0 2px 6px #0003;padding:0 8px;height:48px;min-width:250px;align-items:center;font-size:12px}.e-virt-table-finder-bar.show{display:flex}.e-virt-table-finder-bar-input-wrapper{display:flex;align-items:center;flex:1;padding:0 8px;position:relative}.e-virt-table-finder-bar-input{border:none;outline:none;flex:1;font-size:12px;background:transparent;color:#333;min-width:150px;padding-left:0;position:relative}.e-virt-table-finder-bar-nav{display:flex;flex-direction:row;gap:8px;margin:0 8px;align-items:center}.e-virt-table-finder-bar-nav-btn{border:none;background:transparent;cursor:pointer;padding:0;color:#666;border-radius:50%;display:flex;align-items:center;justify-content:center}.e-virt-table-finder-bar-nav-btn svg{width:24px;height:24px}.e-virt-table-finder-bar-nav-btn.prev-btn{transform:rotate(-90deg)}.e-virt-table-finder-bar-nav-btn.next-btn{transform:rotate(90deg)}.e-virt-table-finder-bar-nav-btn.close-btn{font-size:24px;color:#666;line-height:1;width:24px;height:24px}.e-virt-table-finder-bar-nav-btn:hover{color:#666;background-color:#f0f0f0}.e-virt-table-finder-bar-count{color:#666;font-size:12px;margin:0 8px;white-space:nowrap;flex-shrink:0}.e-virt-table-finder-bar-count.no-results{color:#999}.e-virt-table-finder-bar-loading{display:none;position:absolute;left:8px;top:0;width:16px;height:16px;flex-shrink:0;pointer-events:none;z-index:0}.e-virt-table-finder-bar-loading.show{display:block}.e-virt-table-finder-bar-loading svg{width:100%;height:100%;color:#666;animation:rotate 1s linear infinite}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
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}.e-virt-table-finder-bar{position:absolute;top:8px;right:16px;display:none;z-index:10000;background:#fff;border:1px solid #dadce0;border-radius:12px;box-shadow:0 2px 6px #0003;padding:0 8px;height:48px;min-width:250px;align-items:center;font-size:12px}.e-virt-table-finder-bar.show{display:flex}.e-virt-table-finder-bar-input-wrapper{display:flex;align-items:center;flex:1;padding:0 8px;position:relative}.e-virt-table-finder-bar-input{border:none;outline:none;flex:1;font-size:12px;background:transparent;color:#333;min-width:150px;padding-left:0;position:relative}.e-virt-table-finder-bar-nav{display:flex;flex-direction:row;gap:8px;margin:0 8px;align-items:center}.e-virt-table-finder-bar-nav-btn{border:none;background:transparent;cursor:pointer;padding:0;color:#666;border-radius:50%;display:flex;align-items:center;justify-content:center}.e-virt-table-finder-bar-nav-btn svg{width:24px;height:24px}.e-virt-table-finder-bar-nav-btn.prev-btn{transform:rotate(-90deg)}.e-virt-table-finder-bar-nav-btn.next-btn{transform:rotate(90deg)}.e-virt-table-finder-bar-nav-btn.close-btn{font-size:24px;color:#666;line-height:1;width:24px;height:24px}.e-virt-table-finder-bar-nav-btn:hover{color:#666;background-color:#f0f0f0}.e-virt-table-finder-bar-count{color:#666;font-size:12px;margin:0 8px;white-space:nowrap;flex-shrink:0}.e-virt-table-finder-bar-count.no-results{color:#999}.e-virt-table-finder-bar-loading{display:none;position:absolute;left:8px;top:0;width:16px;height:16px;flex-shrink:0;pointer-events:none;z-index:0}.e-virt-table-finder-bar-loading.show{display:block}.e-virt-table-finder-bar-loading svg{width:100%;height:100%;color:#666;animation:rotate 1s linear infinite}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
2
  var de = Object.defineProperty;
3
3
  var fe = (h, t, e) => t in h ? de(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
4
4
  var n = (h, t, e) => fe(h, typeof t != "symbol" ? t + "" : t, e);
@@ -539,10 +539,10 @@ class vt extends qt {
539
539
  const R = this.ctx.icons.get("expand"), S = this.ctx.icons.get("shrink");
540
540
  o = c ? S : R, a = c ? "shrink" : "expand";
541
541
  }
542
- let w = m, E = m, C = this.drawX;
543
- (this.align === "center" || this.align === "right") && (C = this.drawX + (this.visibleWidth - w - 2 * e) / 2, this.align = "left");
544
- let p = C + r + e, b = this.drawY + (this.visibleHeight - E) / 2, y = r + this.drawX + w - 0.5;
545
- this.type === "selection-tree" ? (p = r + this.drawSelectionImageX + this.drawSelectionImageWidth, y = p + w - e / 2) : this.type === "tree-selection" ? y = p + g + w - e / 2 : y = p + w - e / 2, this.drawTextX = y, this.drawTextWidth = this.drawX + this.visibleWidth - y, !(p + w + e > this.drawX + this.visibleWidth) && (b + E + e > this.drawY + this.visibleHeight || (this.drawTreeImageX = p, this.drawTreeImageY = b, this.drawTreeImageWidth = w, 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;
@@ -621,13 +621,13 @@ class vt extends qt {
621
621
  return;
622
622
  }
623
623
  let E = "transparent";
624
- const C = this.ctx.hoverCell, p = this.ctx.currentCell;
624
+ const p = this.ctx.hoverCell, C = this.ctx.currentCell;
625
625
  let b = this.rowIndex, y = this.rowIndex;
626
626
  if (this.rowspan !== 1 && (x || d)) {
627
627
  const _ = this.getSpanInfo(), { yArr: T } = _;
628
628
  b = T[0], y = T[1];
629
629
  }
630
- x && C && (C.rowKey === this.rowKey && (E = u), C.rowIndex >= b && C.rowIndex <= y && (E = u)), d && p && (p.rowKey === this.rowKey && (E = f), p.rowIndex >= b && p.rowIndex <= y && (E = f)), this.drawCellSkyBgColor = E;
630
+ x && p && (p.rowKey === this.rowKey && (E = u), p.rowIndex >= b && p.rowIndex <= y && (E = u)), d && C && (C.rowKey === this.rowKey && (E = f), C.rowIndex >= b && C.rowIndex <= y && (E = f)), this.drawCellSkyBgColor = E;
631
631
  let R = e, S = a;
632
632
  if (this.ctx.database.getReadonly(this.rowKey, this.key) || (R = i, S = r), g && (this.rowIndex % 2 ? R = m : R = e), typeof s == "function") {
633
633
  const _ = s, { backgroundColor: T, color: M, font: L } = _({
@@ -653,17 +653,17 @@ class vt extends qt {
653
653
  let g = u, m = this.drawY + (i - f) / 2;
654
654
  if (a !== "selection-tree") {
655
655
  if (a === "tree-selection") {
656
- const { TREE_INDENT: C = 16, TREE_ICON_SIZE: p } = this.ctx.config, b = this.ctx.database.getRowForRowKey(c), { level: y = 0 } = b || {}, R = y * C;
657
- g = u + p + R;
656
+ const { TREE_INDENT: p = 16, TREE_ICON_SIZE: C } = this.ctx.config, b = this.ctx.database.getRowForRowKey(c), { level: y = 0 } = b || {}, R = y * p;
657
+ g = u + C + R;
658
658
  }
659
659
  }
660
660
  let w = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck";
661
661
  if (a === "selection-tree" || a === "tree-selection") {
662
- const C = this.ctx.database.getTreeSelectionState(c);
663
- C.indeterminate && d ? (w = this.ctx.icons.get("checkbox-indeterminate"), E = "checkbox-indeterminate") : C.checked && d ? (w = this.ctx.icons.get("checkbox-check"), E = "checkbox-check") : !C.checked && d ? (w = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck") : (w = this.ctx.icons.get("checkbox-disabled"), E = "checkbox-disabled");
662
+ const p = this.ctx.database.getTreeSelectionState(c);
663
+ 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");
664
664
  } else {
665
- const C = this.ctx.database.getRowSelection(c);
666
- C && d ? (w = this.ctx.icons.get("checkbox-check"), E = "checkbox-check") : C && !d ? (w = this.ctx.icons.get("checkbox-check-disabled"), E = "checkbox-check-disabled") : !C && d ? (w = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck") : (w = this.ctx.icons.get("checkbox-disabled"), E = "checkbox-disabled");
665
+ const p = this.ctx.database.getRowSelection(c);
666
+ 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");
667
667
  }
668
668
  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));
669
669
  }
@@ -687,8 +687,8 @@ class vt extends qt {
687
687
  if (a.rowKey === this.rowKey && (l = this.drawX + this.width - s - o, c = this.drawY + (this.height - s) / 2), this.rowspan !== 1 && r) {
688
688
  const f = this.getSpanInfo(), { yArr: x } = f, u = x[0], g = x[1];
689
689
  if (a.rowIndex >= u && a.rowIndex <= g) {
690
- const { width: m, height: w, offsetTop: E, offsetLeft: C } = f;
691
- l = this.drawX - C + m - s - o, c = this.drawY - E + (w - s) / 2;
690
+ const { width: m, height: w, offsetTop: E, offsetLeft: p } = f;
691
+ l = this.drawX - p + m - s - o, c = this.drawY - E + (w - s) / 2;
692
692
  }
693
693
  }
694
694
  const d = this.ctx.icons.get(this.hoverIconName);
@@ -961,9 +961,9 @@ class vt extends qt {
961
961
  drawBorder(e) {
962
962
  const { drawX: i, drawY: s, rowIndex: o, colIndex: r, height: a, width: l } = this;
963
963
  let c = i, d = s;
964
- const { xArr: f, yArr: x, lineDash: u = [], borderWidth: g = 1, borderColor: m, fillColor: w } = e, E = f[0], C = f[1], p = x[0], b = x[1];
965
- if (r >= E && r <= C && o === p) {
966
- const y = r === C ? 1 : 0, R = r === E ? 1 : 0;
964
+ 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];
965
+ if (r >= E && r <= p && o === C) {
966
+ const y = r === p ? 1 : 0, R = r === E ? 1 : 0;
967
967
  this.ctx.paint.drawLine([c + R, d + 1, c + l - y, d + 1], {
968
968
  borderColor: m,
969
969
  fillColor: w,
@@ -973,8 +973,8 @@ class vt extends qt {
973
973
  lineDash: u
974
974
  });
975
975
  }
976
- if (r === C && o >= p && o <= b) {
977
- const y = o === p ? 1 : 0, R = o === b ? 1 : 0;
976
+ if (r === p && o >= C && o <= b) {
977
+ const y = o === C ? 1 : 0, R = o === b ? 1 : 0;
978
978
  this.ctx.paint.drawLine([c + l - 1, d + y, c + l - 1, d + a - R], {
979
979
  borderColor: m,
980
980
  fillColor: w,
@@ -984,8 +984,8 @@ class vt extends qt {
984
984
  lineDash: u
985
985
  });
986
986
  }
987
- if (r >= E && r <= C && o === b) {
988
- const y = r === C ? 1 : 0, R = r === E ? 1 : 0;
987
+ if (r >= E && r <= p && o === b) {
988
+ const y = r === p ? 1 : 0, R = r === E ? 1 : 0;
989
989
  this.ctx.paint.drawLine([c + R, d + a - 1, c + l - y, d + a - 1], {
990
990
  borderColor: m,
991
991
  fillColor: w,
@@ -995,8 +995,8 @@ class vt extends qt {
995
995
  lineDash: u
996
996
  });
997
997
  }
998
- if (r === E && o >= p && o <= b) {
999
- const y = o === b ? 1 : 0, R = o === p ? 1 : 0;
998
+ if (r === E && o >= C && o <= b) {
999
+ const y = o === b ? 1 : 0, R = o === C ? 1 : 0;
1000
1000
  this.ctx.paint.drawLine([c + 1, d + R, c + 1, d + a - y], {
1001
1001
  borderColor: m,
1002
1002
  fillColor: w,
@@ -1083,7 +1083,7 @@ class be {
1083
1083
  TREE_CHILDREN_KEY: d
1084
1084
  } = this.ctx.config;
1085
1085
  t.forEach((f, x) => {
1086
- var p;
1086
+ var C;
1087
1087
  d !== "children" && (f.children = f[d]);
1088
1088
  const u = f[o], g = u != null ? `${u}` : $t();
1089
1089
  this.itemRowKeyMap.set(f, g);
@@ -1100,10 +1100,10 @@ class be {
1100
1100
  this.selectionMap.set(g, {
1101
1101
  key: c ? f[c] : g,
1102
1102
  row: f,
1103
- check: ((p = this.selectionMap.get(g)) == null ? void 0 : p.check) || !1
1103
+ check: ((C = this.selectionMap.get(g)) == null ? void 0 : C.check) || !1
1104
1104
  });
1105
- const C = r || this.expandMap.get(g) || f._expand || !1;
1106
- this.expandMap.set(g, C), this.rowKeyMap.set(g, {
1105
+ const p = r || this.expandMap.get(g) || f._expand || !1;
1106
+ this.expandMap.set(g, p), this.rowKeyMap.set(g, {
1107
1107
  readonly: w,
1108
1108
  index: x,
1109
1109
  rowIndex: x,
@@ -1112,7 +1112,7 @@ class be {
1112
1112
  calculatedHeight: -1,
1113
1113
  check: !1,
1114
1114
  selectable: E,
1115
- expand: C,
1115
+ expand: p,
1116
1116
  expandLazy: !1,
1117
1117
  hasChildren: f._hasChildren || (Array.isArray(f.children) ? f.children.length > 0 : !1),
1118
1118
  expandLoading: !1,
@@ -1179,19 +1179,20 @@ class be {
1179
1179
  }
1180
1180
  generateColumns(t) {
1181
1181
  const e = (i) => i.map((s) => {
1182
- var l, c, d, f, x, u, g, m;
1182
+ var c, d, f, x, u, g, m, w;
1183
1183
  const o = s.children && Array.isArray(s.children) ? e(s.children) : void 0, r = {
1184
- hide: (c = (l = this.customHeader) == null ? void 0 : l.hideData) == null ? void 0 : c[s.key],
1185
- fixed: (f = (d = this.customHeader) == null ? void 0 : d.fixedData) == null ? void 0 : f[s.key],
1186
- sort: (u = (x = this.customHeader) == null ? void 0 : x.sortData) == null ? void 0 : u[s.key],
1187
- width: (m = (g = this.customHeader) == null ? void 0 : g.resizableData) == null ? void 0 : m[s.key]
1184
+ hide: (d = (c = this.customHeader) == null ? void 0 : c.hideData) == null ? void 0 : d[s.key],
1185
+ fixed: (x = (f = this.customHeader) == null ? void 0 : f.fixedData) == null ? void 0 : x[s.key],
1186
+ sort: (g = (u = this.customHeader) == null ? void 0 : u.sortData) == null ? void 0 : g[s.key],
1187
+ width: (w = (m = this.customHeader) == null ? void 0 : m.resizableData) == null ? void 0 : w[s.key]
1188
1188
  }, a = {};
1189
- for (const [w, E] of Object.entries(r))
1190
- E !== void 0 && (a[w] = E);
1189
+ for (const [E, p] of Object.entries(r))
1190
+ p !== void 0 && (a[E] = p);
1191
+ const l = o && o.every((E) => E.hide);
1191
1192
  return {
1192
1193
  ...s,
1193
1194
  children: o,
1194
- hide: typeof s.hide == "function" ? s.hide(s) : s.hide,
1195
+ hide: l || (typeof s.hide == "function" ? s.hide(s) : s.hide),
1195
1196
  ...a
1196
1197
  };
1197
1198
  });
@@ -1435,18 +1436,18 @@ class be {
1435
1436
  const a = /* @__PURE__ */ new Set();
1436
1437
  let l = [], c = t.map((g) => {
1437
1438
  const { rowKey: m, key: w } = g;
1438
- let E = g.value, C = E;
1439
- const p = this.getRowDataItemForRowKey(m), b = this.getItemValue(m, w), y = this.getVirtualBodyCellByKey(m, w);
1440
- return (y == null ? void 0 : y.type) === "number" && (["", void 0, null].includes(E) ? C = null : /^-?\d+(\.\d+)?$/.test(`${E}`) ? C = Number(E) : (C = b, l.push({
1439
+ let E = g.value, p = E;
1440
+ const C = this.getRowDataItemForRowKey(m), b = this.getItemValue(m, w), y = this.getVirtualBodyCellByKey(m, w);
1441
+ 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({
1441
1442
  ...g,
1442
- value: C,
1443
+ value: p,
1443
1444
  oldValue: b,
1444
- row: p
1445
+ row: C
1445
1446
  }))), {
1446
1447
  ...g,
1447
- value: C,
1448
+ value: p,
1448
1449
  oldValue: b,
1449
- row: p
1450
+ row: C
1450
1451
  };
1451
1452
  });
1452
1453
  if (c = c.filter((g) => !l.some((m) => g.rowKey === m.rowKey && g.key === m.key)), l.length) {
@@ -1461,11 +1462,11 @@ class be {
1461
1462
  return;
1462
1463
  const { BEFORE_VALUE_CHANGE_METHOD: d } = this.ctx.config;
1463
1464
  s === "none" && typeof d == "function" && (c = await d(c), r = !1), c.forEach((g) => {
1464
- const { value: m, rowKey: w, key: E } = g, C = this.getItemValue(w, E);
1465
+ const { value: m, rowKey: w, key: E } = g, p = this.getItemValue(w, E);
1465
1466
  a.add(w), this.setItemValue(w, E, m, !1, !1, !1, r), o.push({
1466
1467
  rowKey: w,
1467
1468
  key: E,
1468
- oldValue: C,
1469
+ oldValue: p,
1469
1470
  newValue: m
1470
1471
  });
1471
1472
  });
@@ -1689,19 +1690,19 @@ class be {
1689
1690
  if (this.ctx.config.TREE_SELECT_MODE === "auto") {
1690
1691
  const c = (w) => {
1691
1692
  const E = this.getTreeChildren(w);
1692
- let C = [];
1693
- for (const p of E)
1694
- C.push(p), C.push(...c(p));
1695
- return C;
1693
+ let p = [];
1694
+ for (const C of E)
1695
+ p.push(C), p.push(...c(C));
1696
+ return p;
1696
1697
  }, 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;
1697
1698
  r = g && !(x === u), a = s || g, s && u > 0 && x === 0 && (a = !1, r = !1);
1698
1699
  } else if (this.ctx.config.TREE_SELECT_MODE === "cautious") {
1699
1700
  const c = (w) => {
1700
1701
  const E = this.getTreeChildren(w);
1701
- let C = [];
1702
- for (const p of E)
1703
- C.push(p), C.push(...c(p));
1704
- return C;
1702
+ let p = [];
1703
+ for (const C of E)
1704
+ p.push(C), p.push(...c(C));
1705
+ return p;
1705
1706
  }, 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;
1706
1707
  r = g && !m, a = s || m, s && u > 0 && x === 0 && (a = !1, r = !1);
1707
1708
  } else this.ctx.config.TREE_SELECT_MODE === "strictly" && (r = !1, a = s);
@@ -2012,7 +2013,7 @@ class be {
2012
2013
  }
2013
2014
  ]
2014
2015
  };
2015
- let w = e, E = e, C = a, p = a, b = [], y = 0, R = 0, S = 0, O = 0;
2016
+ let w = e, E = e, p = a, C = a, b = [], y = 0, R = 0, S = 0, O = 0;
2016
2017
  if (d !== 1 && g) {
2017
2018
  O = x;
2018
2019
  const v = l.reduce((I, _) => {
@@ -2063,7 +2064,7 @@ class be {
2063
2064
  break;
2064
2065
  const _ = this.getItemValue(s, i), T = this.getItemValue(s, I.key);
2065
2066
  if (_ === T && c.includes(I.key))
2066
- C = v;
2067
+ p = v;
2067
2068
  else
2068
2069
  break;
2069
2070
  }
@@ -2073,17 +2074,17 @@ class be {
2073
2074
  break;
2074
2075
  const _ = this.getItemValue(s, i), T = this.getItemValue(s, I.key);
2075
2076
  if (_ === T && c.includes(I.key))
2076
- p = v;
2077
+ C = v;
2077
2078
  else
2078
2079
  break;
2079
2080
  }
2080
- for (let v = C; v < a; v++) {
2081
+ for (let v = p; v < a; v++) {
2081
2082
  const I = this.getColumnByColIndex(v);
2082
2083
  if (!I)
2083
2084
  break;
2084
2085
  R += I.width || 100;
2085
2086
  }
2086
- for (let v = C; v <= p; v++) {
2087
+ for (let v = p; v <= C; v++) {
2087
2088
  const I = this.getColumnByColIndex(v);
2088
2089
  if (!I)
2089
2090
  break;
@@ -2096,7 +2097,7 @@ class be {
2096
2097
  }
2097
2098
  }
2098
2099
  return {
2099
- xArr: [C, p],
2100
+ xArr: [p, C],
2100
2101
  yArr: [w, E],
2101
2102
  rowspan: d,
2102
2103
  colspan: u,
@@ -2529,10 +2530,10 @@ class _e {
2529
2530
  } = r;
2530
2531
  if (this.ctx.font = a, this.ctx.fillStyle = c, this.ctx.textAlign = l, ["", null, void 0].includes(t))
2531
2532
  return this.ctx.restore(), !1;
2532
- const E = parseInt(((I = a.match(/\d+/)) == null ? void 0 : I[0]) || "12") * (r.lineHeight || 1.2), C = s - d * 2 - g - m;
2533
- let p = !1;
2533
+ const E = parseInt(((I = a.match(/\d+/)) == null ? void 0 : I[0]) || "12") * (r.lineHeight || 1.2), p = s - d * 2 - g - m;
2534
+ let C = !1;
2534
2535
  const b = Math.round((o - 2 * d) / E);
2535
- let y = this.wrapText(t, C, r.cacheTextKey), R = Math.min(y.length, Math.max(b, 1));
2536
+ let y = this.wrapText(t, p, r.cacheTextKey), R = Math.min(y.length, Math.max(b, 1));
2536
2537
  x === "auto" && u ? R = y.length : typeof x == "number" && x < R && x !== 1 ? R = x : (x === 1 && (y = [t], R = 1), x === "auto" && b === 1 && (y = [t], R = 1));
2537
2538
  let S = i + d;
2538
2539
  const O = Math.round(R * E);
@@ -2543,7 +2544,7 @@ class _e {
2543
2544
  const T = y[_], M = S + _ * E;
2544
2545
  if (this.ctx.textBaseline = "top", _ === R - 1) {
2545
2546
  const A = y.slice(_).join(""), { _text: H, ellipsis: D } = this.handleEllipsis(A, s, d, a);
2546
- this.ctx.fillText(H, v, M), p = D;
2547
+ this.ctx.fillText(H, v, M), C = D;
2547
2548
  break;
2548
2549
  }
2549
2550
  this.ctx.fillText(T, v, M);
@@ -2564,7 +2565,7 @@ class _e {
2564
2565
  };
2565
2566
  r.textCallback(A);
2566
2567
  }
2567
- return this.ctx.restore(), p;
2568
+ return this.ctx.restore(), C;
2568
2569
  }
2569
2570
  /**
2570
2571
  * 将文本按宽度换行
@@ -4711,9 +4712,9 @@ class Ne {
4711
4712
  let w = this.height + e.height + r;
4712
4713
  w += m;
4713
4714
  let E = w;
4714
- const C = window.innerHeight, { top: p } = this.containerRect || this.ctx.containerElement.getBoundingClientRect();
4715
- if (C > p && d && !a) {
4716
- const T = C - p - f;
4715
+ const p = window.innerHeight, { top: C } = this.containerRect || this.ctx.containerElement.getBoundingClientRect();
4716
+ if (p > C && d && !a) {
4717
+ const T = p - C - f;
4717
4718
  T > e.height + r ? E = T : w > c && (E = c);
4718
4719
  } else this.data.length && a ? E = a : this.data.length && c && w > c && (E = c);
4719
4720
  E > 0 && (this.ctx.stageHeight = Math.floor(E), this.ctx.stageElement.style.height = `${this.ctx.stageHeight}px`);
@@ -5084,14 +5085,14 @@ class Be {
5084
5085
  SELECTOR_AREA_MAX_X_OFFSET: f,
5085
5086
  SELECTOR_AREA_MAX_Y_OFFSET: x
5086
5087
  } = this.ctx.config, u = a, g = l || this.ctx.maxColIndex - f, m = c, w = d || this.ctx.maxRowIndex - x;
5087
- let [E, C] = o, [p, b] = r;
5088
- if (E < u || C > g || p < m || b > w)
5088
+ let [E, p] = o, [C, b] = r;
5089
+ if (E < u || p > g || C < m || b > w)
5089
5090
  return;
5090
5091
  if (this.ctx.config.ENABLE_MERGE_CELL_LINK) {
5091
5092
  const R = this.adjustMergeCells(o, r);
5092
- p = R.yArr[0], b = R.yArr[1], E = R.xArr[0], C = R.xArr[1], this.ctx.onlyMergeCell = R.onlyMergeCell;
5093
+ C = R.yArr[0], b = R.yArr[1], E = R.xArr[0], p = R.xArr[1], this.ctx.onlyMergeCell = R.onlyMergeCell;
5093
5094
  }
5094
- E === C && p === b ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, o = [Math.max(u, E), Math.min(g, C)], r = [Math.max(m, p), Math.min(w, b)];
5095
+ 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)];
5095
5096
  const { BEFORE_SET_SELECTOR_METHOD: y } = this.ctx.config;
5096
5097
  if (typeof y == "function") {
5097
5098
  const S = y({
@@ -5103,7 +5104,7 @@ class Be {
5103
5104
  return;
5104
5105
  o = S.xArr, r = S.yArr;
5105
5106
  }
5106
- this.ctx.selector.xArr = o, this.ctx.selector.yArr = r, b === this.ctx.maxRowIndex && p === 0 ? this.ctx.selectColsIng = !0 : this.ctx.selectColsIng = !1, C === this.ctx.maxColIndex && E === 0 ? this.ctx.selectRowsIng = !0 : this.ctx.selectRowsIng = !1, this.ctx.emit("setSelector", this.ctx.selector), this.ctx.emit("drawView");
5107
+ this.ctx.selector.xArr = o, this.ctx.selector.yArr = r, b === this.ctx.maxRowIndex && C === 0 ? this.ctx.selectColsIng = !0 : this.ctx.selectColsIng = !1, p === this.ctx.maxColIndex && E === 0 ? this.ctx.selectRowsIng = !0 : this.ctx.selectRowsIng = !1, this.ctx.emit("setSelector", this.ctx.selector), this.ctx.emit("drawView");
5107
5108
  }
5108
5109
  }
5109
5110
  adjustMergeCells(t, e) {
@@ -5118,13 +5119,13 @@ class Be {
5118
5119
  let a = [], l = [];
5119
5120
  for (let m = 0; m <= e[1] - e[0]; m++)
5120
5121
  for (let w = 0; w <= t[1] - t[0]; w++) {
5121
- const E = m + e[0], C = w + t[0], p = this.ctx.database.getVirtualBodyCell(E, C);
5122
- p && ((E === i || E === s) && a.push(p), (C === o || C === r) && l.push(p));
5122
+ const E = m + e[0], p = w + t[0], C = this.ctx.database.getVirtualBodyCell(E, p);
5123
+ C && ((E === i || E === s) && a.push(C), (p === o || p === r) && l.push(C));
5123
5124
  }
5124
5125
  const c = a.reduce(
5125
5126
  (m, w) => {
5126
- const { yArr: E } = w.getSpanInfo(), [C, p] = E;
5127
- return m.minY = Math.min(m.minY, C), m.maxY = Math.max(m.maxY, p), m;
5127
+ const { yArr: E } = w.getSpanInfo(), [p, C] = E;
5128
+ return m.minY = Math.min(m.minY, p), m.maxY = Math.max(m.maxY, C), m;
5128
5129
  },
5129
5130
  {
5130
5131
  minY: i,
@@ -5132,8 +5133,8 @@ class Be {
5132
5133
  }
5133
5134
  ), d = l.reduce(
5134
5135
  (m, w) => {
5135
- const { xArr: E } = w.getSpanInfo(), [C, p] = E;
5136
- return m.minX = Math.min(m.minX, C), m.maxX = Math.max(m.maxX, p), m;
5136
+ const { xArr: E } = w.getSpanInfo(), [p, C] = E;
5137
+ return m.minX = Math.min(m.minX, p), m.maxX = Math.max(m.maxX, C), m;
5137
5138
  },
5138
5139
  {
5139
5140
  minX: o,
@@ -5328,18 +5329,18 @@ class Be {
5328
5329
  });
5329
5330
  const m = r.length === 1 && r[0].length === 1;
5330
5331
  if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(a, l) && !m) {
5331
- const p = {
5332
+ const C = {
5332
5333
  code: "ERR_MERGED_CELLS_PASTE",
5333
5334
  message: "Merged cells cannot span paste data"
5334
5335
  };
5335
- this.ctx.hasEvent("error") ? this.ctx.emit("error", p) : alert(p.message);
5336
+ this.ctx.hasEvent("error") ? this.ctx.emit("error", C) : alert(C.message);
5336
5337
  return;
5337
5338
  }
5338
5339
  let w = [];
5339
- for (let p = 0; p <= r.length - 1; p++) {
5340
- const b = r[p].length;
5340
+ for (let C = 0; C <= r.length - 1; C++) {
5341
+ const b = r[C].length;
5341
5342
  for (let y = 0; y <= b - 1; y++) {
5342
- const R = p + e, S = y + i, O = r[p][y], v = this.ctx.database.getItemValueForRowIndexAndColIndex(
5343
+ const R = C + e, S = y + i, O = r[C][y], v = this.ctx.database.getItemValueForRowIndexAndColIndex(
5343
5344
  R,
5344
5345
  S
5345
5346
  );
@@ -5356,13 +5357,13 @@ class Be {
5356
5357
  }
5357
5358
  }
5358
5359
  if (this.isCut) {
5359
- const p = this.clearSelectedData(
5360
+ const C = this.clearSelectedData(
5360
5361
  this.ctx.selector.xArrCopy,
5361
5362
  this.ctx.selector.yArrCopy,
5362
5363
  !0
5363
5364
  // 忽略设置,只返回数据,用于cut,实现历史回退需要返回两次问题
5364
5365
  ), b = w.map((y) => `${y.rowKey}-${y.key}`);
5365
- p.forEach((y) => {
5366
+ C.forEach((y) => {
5366
5367
  b.includes(`${y.rowKey}-${y.key}`) || w.unshift(y);
5367
5368
  }), this.isCut = !1;
5368
5369
  }
@@ -5370,21 +5371,21 @@ class Be {
5370
5371
  return;
5371
5372
  const { BEFORE_PASTE_DATA_METHOD: E } = this.ctx.config;
5372
5373
  if (typeof E == "function") {
5373
- const p = E, b = w.map((y) => ({
5374
+ const C = E, b = w.map((y) => ({
5374
5375
  rowKey: y.rowKey,
5375
5376
  key: y.key,
5376
5377
  value: y.value,
5377
5378
  oldValue: this.ctx.database.getItemValue(y.rowKey, y.key),
5378
5379
  row: this.ctx.database.getRowDataItemForRowKey(y.rowKey)
5379
5380
  }));
5380
- if (w = await p(b, a, l, r), w && !w.length)
5381
+ if (w = await C(b, a, l, r), w && !w.length)
5381
5382
  return;
5382
5383
  }
5383
5384
  this.clearCopyLine(), this.ctx.batchSetItemValueByEditor(w, !0);
5384
- let C = [];
5385
- s.forEach((p) => {
5386
- C.push(this.ctx.database.getRowDataItemForRowKey(p));
5387
- }), this.ctx.emit("pasteChange", w, C), this.ctx.emit("draw");
5385
+ let p = [];
5386
+ s.forEach((C) => {
5387
+ p.push(this.ctx.database.getRowDataItemForRowKey(C));
5388
+ }), this.ctx.emit("pasteChange", w, p), this.ctx.emit("draw");
5388
5389
  }).catch((o) => {
5389
5390
  console.error("Failed to get the clipboard content:", o);
5390
5391
  });
@@ -5450,14 +5451,14 @@ class Be {
5450
5451
  if (!i)
5451
5452
  return;
5452
5453
  g && this.ctx.onlyMergeCell && i.updateSpanInfo();
5453
- const { drawX: m, drawY: w, width: E, height: C, fixed: p } = i, b = o - m + 1, y = i.drawX + E - (e - s) + 1;
5454
- let R = r.height - w, S = C;
5454
+ const { drawX: m, drawY: w, width: E, height: p, fixed: C } = i, b = o - m + 1, y = i.drawX + E - (e - s) + 1;
5455
+ let R = r.height - w, S = p;
5455
5456
  S > l.visibleHeight && (S = l.visibleHeight);
5456
5457
  let O = 0;
5457
5458
  x && (u === "top" ? R = r.height + a.height - w : O = a.visibleHeight);
5458
5459
  const v = w + S - (t - O - f);
5459
5460
  let I = c, _ = d;
5460
- y > 0 && !p ? I = Math.floor(c + y) : b > 0 && !p && (I = Math.floor(c - b)), R > 0 ? _ = Math.floor(d - R) : v > 0 && (_ = Math.floor(d + v)), (Math.abs(c - I) > 2 || Math.abs(d - _) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.emit("adjustBoundaryPosition", i), this.ctx.setScroll(I, _));
5461
+ y > 0 && !C ? I = Math.floor(c + y) : b > 0 && !C && (I = Math.floor(c - b)), R > 0 ? _ = Math.floor(d - R) : v > 0 && (_ = Math.floor(d + v)), (Math.abs(c - I) > 2 || Math.abs(d - _) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.emit("adjustBoundaryPosition", i), this.ctx.setScroll(I, _));
5461
5462
  }
5462
5463
  destroy() {
5463
5464
  }
@@ -5515,11 +5516,11 @@ class Xe {
5515
5516
  SELECTOR_AREA_MAX_Y: u,
5516
5517
  SELECTOR_AREA_MAX_X_OFFSET: g,
5517
5518
  SELECTOR_AREA_MAX_Y_OFFSET: m
5518
- } = this.ctx.config, w = d, E = f || this.ctx.maxColIndex - g, C = x, p = u || this.ctx.maxRowIndex - m;
5519
+ } = this.ctx.config, w = d, E = f || this.ctx.maxColIndex - g, p = x, C = u || this.ctx.maxRowIndex - m;
5519
5520
  let [b, y] = r, [R, S] = a;
5520
- if (b < w || R < C)
5521
+ if (b < w || R < p)
5521
5522
  return;
5522
- r = [Math.max(w, b), Math.min(E, y)], a = [Math.max(C, R), Math.min(p, S)];
5523
+ r = [Math.max(w, b), Math.min(E, y)], a = [Math.max(p, R), Math.min(C, S)];
5523
5524
  const { BEFORE_SET_AUTOFILL_METHOD: O } = this.ctx.config;
5524
5525
  if (typeof O == "function") {
5525
5526
  const I = O({
@@ -5556,9 +5557,9 @@ class Xe {
5556
5557
  let d = [];
5557
5558
  for (let u = 0; u <= l[1] - l[0]; u++)
5558
5559
  for (let g = 0; g <= a[1] - a[0]; g++) {
5559
- const m = g + a[0], w = u + l[0], E = s[u % r][g % o], C = this.ctx.database.getItemValueForRowIndexAndColIndex(w, m), p = `${w}-${m}`;
5560
- if (C && !i.has(p)) {
5561
- const { rowKey: b, key: y } = C;
5560
+ 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}`;
5561
+ if (p && !i.has(C)) {
5562
+ const { rowKey: b, key: y } = p;
5562
5563
  this.ctx.database.getReadonly(b, y) || (t.add(b), d.push({
5563
5564
  rowKey: b,
5564
5565
  key: y,
@@ -5774,8 +5775,8 @@ const je = async (h, t, e) => {
5774
5775
  name: w,
5775
5776
  fn: E
5776
5777
  } = a[m], {
5777
- x: C,
5778
- y: p,
5778
+ x: p,
5779
+ y: C,
5779
5780
  data: b,
5780
5781
  reset: y
5781
5782
  } = await E({
@@ -5792,7 +5793,7 @@ const je = async (h, t, e) => {
5792
5793
  floating: t
5793
5794
  }
5794
5795
  });
5795
- d = C ?? d, f = p ?? f, u = {
5796
+ d = p ?? d, f = C ?? f, u = {
5796
5797
  ...u,
5797
5798
  [w]: {
5798
5799
  ...u[w],
@@ -5836,12 +5837,12 @@ async function ee(h, t) {
5836
5837
  boundary: c,
5837
5838
  rootBoundary: d,
5838
5839
  strategy: l
5839
- })), C = f === "floating" ? {
5840
+ })), p = f === "floating" ? {
5840
5841
  x: i,
5841
5842
  y: s,
5842
5843
  width: r.floating.width,
5843
5844
  height: r.floating.height
5844
- } : r.reference, p = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(a.floating)), b = await (o.isElement == null ? void 0 : o.isElement(p)) ? await (o.getScale == null ? void 0 : o.getScale(p)) || {
5845
+ } : r.reference, C = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(a.floating)), b = await (o.isElement == null ? void 0 : o.isElement(C)) ? await (o.getScale == null ? void 0 : o.getScale(C)) || {
5845
5846
  x: 1,
5846
5847
  y: 1
5847
5848
  } : {
@@ -5849,10 +5850,10 @@ async function ee(h, t) {
5849
5850
  y: 1
5850
5851
  }, y = ct(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
5851
5852
  elements: a,
5852
- rect: C,
5853
- offsetParent: p,
5853
+ rect: p,
5854
+ offsetParent: C,
5854
5855
  strategy: l
5855
- }) : C);
5856
+ }) : p);
5856
5857
  return {
5857
5858
  top: (E.top - y.top + g.top) / b.y,
5858
5859
  bottom: (y.bottom - E.bottom + g.bottom) / b.y,
@@ -5881,10 +5882,10 @@ const qe = (h) => ({
5881
5882
  const f = te(d), x = {
5882
5883
  x: e,
5883
5884
  y: i
5884
- }, u = _t(s), g = Rt(u), m = await r.getDimensions(c), w = u === "y", E = w ? "top" : "left", C = w ? "bottom" : "right", p = w ? "clientHeight" : "clientWidth", b = o.reference[g] + o.reference[u] - x[u] - o.floating[g], y = x[u] - o.reference[u], R = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c));
5885
- let S = R ? R[p] : 0;
5886
- (!S || !await (r.isElement == null ? void 0 : r.isElement(R))) && (S = a.floating[p] || o.floating[g]);
5887
- const O = b / 2 - y / 2, v = S / 2 - m[g] / 2 - 1, I = j(f[E], v), _ = j(f[C], v), T = I, M = S - m[g] - _, L = S / 2 - m[g] / 2 + O, A = Et(T, L, M), H = !l.arrow && et(s) != null && L !== A && o.reference[g] / 2 - (L < T ? I : _) - m[g] / 2 < 0, D = H ? L < T ? L - T : L - M : 0;
5885
+ }, u = _t(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], R = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c));
5886
+ let S = R ? R[C] : 0;
5887
+ (!S || !await (r.isElement == null ? void 0 : r.isElement(R))) && (S = a.floating[C] || o.floating[g]);
5888
+ const O = b / 2 - y / 2, v = S / 2 - m[g] / 2 - 1, I = j(f[E], v), _ = j(f[p], v), T = I, M = S - m[g] - _, L = S / 2 - m[g] / 2 + O, A = Et(T, L, M), H = !l.arrow && et(s) != null && L !== A && o.reference[g] / 2 - (L < T ? I : _) - m[g] / 2 < 0, D = H ? L < T ? L - T : L - M : 0;
5888
5889
  return {
5889
5890
  [u]: x[u] + D,
5890
5891
  data: {
@@ -5921,7 +5922,7 @@ const qe = (h) => ({
5921
5922
  } = tt(h, t);
5922
5923
  if ((e = o.arrow) != null && e.alignmentOffset)
5923
5924
  return {};
5924
- const E = $(s), C = V(a), p = $(a) === a, b = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), y = x || (p || !m ? [lt(a)] : Ve(a)), R = g !== "none";
5925
+ 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)] : Ve(a)), R = g !== "none";
5925
5926
  !x && R && y.push(...Ge(a, m, g, b));
5926
5927
  const S = [a, ...y], O = await ee(t, w), v = [];
5927
5928
  let I = ((i = o.flip) == null ? void 0 : i.overflows) || [];
@@ -5935,9 +5936,9 @@ const qe = (h) => ({
5935
5936
  }], !v.every((L) => L <= 0)) {
5936
5937
  var _, T;
5937
5938
  const L = (((_ = o.flip) == null ? void 0 : _.index) || 0) + 1, A = S[L];
5938
- if (A && (!(f === "alignment" ? C !== V(A) : !1) || // We leave the current main axis only if every placement on that axis
5939
+ if (A && (!(f === "alignment" ? p !== V(A) : !1) || // We leave the current main axis only if every placement on that axis
5939
5940
  // overflows the main axis.
5940
- I.every((k) => V(k.placement) === C ? k.overflows[0] > 0 : !0)))
5941
+ I.every((k) => V(k.placement) === p ? k.overflows[0] > 0 : !0)))
5941
5942
  return {
5942
5943
  data: {
5943
5944
  index: L,
@@ -5955,7 +5956,7 @@ const qe = (h) => ({
5955
5956
  const D = (M = I.filter((k) => {
5956
5957
  if (R) {
5957
5958
  const W = V(k.placement);
5958
- return W === C || // Create a bias to the `y` side axis due to horizontal
5959
+ return W === p || // Create a bias to the `y` side axis due to horizontal
5959
5960
  // reading directions favoring greater width.
5960
5961
  W === "y";
5961
5962
  }
@@ -6044,11 +6045,11 @@ const ti = function(h) {
6044
6045
  fn: (w) => {
6045
6046
  let {
6046
6047
  x: E,
6047
- y: C
6048
+ y: p
6048
6049
  } = w;
6049
6050
  return {
6050
6051
  x: E,
6051
- y: C
6052
+ y: p
6052
6053
  };
6053
6054
  }
6054
6055
  },
@@ -6059,12 +6060,12 @@ const ti = function(h) {
6059
6060
  }, d = await ee(t, l), f = V($(s)), x = Qt(f);
6060
6061
  let u = c[x], g = c[f];
6061
6062
  if (o) {
6062
- const w = x === "y" ? "top" : "left", E = x === "y" ? "bottom" : "right", C = u + d[w], p = u - d[E];
6063
- u = Et(C, u, p);
6063
+ const w = x === "y" ? "top" : "left", E = x === "y" ? "bottom" : "right", p = u + d[w], C = u - d[E];
6064
+ u = Et(p, u, C);
6064
6065
  }
6065
6066
  if (r) {
6066
- const w = f === "y" ? "top" : "left", E = f === "y" ? "bottom" : "right", C = g + d[w], p = g - d[E];
6067
- g = Et(C, g, p);
6067
+ const w = f === "y" ? "top" : "left", E = f === "y" ? "bottom" : "right", p = g + d[w], C = g - d[E];
6068
+ g = Et(p, g, C);
6068
6069
  }
6069
6070
  const m = a.fn({
6070
6071
  ...t,
@@ -6249,8 +6250,8 @@ function G(h, t, e, i) {
6249
6250
  const x = N(o), u = i && B(i) ? N(i) : i;
6250
6251
  let g = x, m = Ct(g);
6251
6252
  for (; m && i && u !== g; ) {
6252
- const w = U(m), E = m.getBoundingClientRect(), C = X(m), p = E.left + (m.clientLeft + parseFloat(C.paddingLeft)) * w.x, b = E.top + (m.clientTop + parseFloat(C.paddingTop)) * w.y;
6253
- l *= w.x, c *= w.y, d *= w.x, f *= w.y, l += p, c += b, g = N(m), m = Ct(g);
6253
+ const w = U(m), E = m.getBoundingClientRect(), p = X(m), C = E.left + (m.clientLeft + parseFloat(p.paddingLeft)) * w.x, b = E.top + (m.clientTop + parseFloat(p.paddingTop)) * w.y;
6254
+ l *= w.x, c *= w.y, d *= w.x, f *= w.y, l += C, c += b, g = N(m), m = Ct(g);
6254
6255
  }
6255
6256
  }
6256
6257
  return ct({
@@ -6505,7 +6506,7 @@ function _i(h, t) {
6505
6506
  } = c;
6506
6507
  if (a || t(), !x || !u)
6507
6508
  return;
6508
- const g = st(f), m = st(s.clientWidth - (d + x)), w = st(s.clientHeight - (f + u)), E = st(d), p = {
6509
+ const g = st(f), m = st(s.clientWidth - (d + x)), w = st(s.clientHeight - (f + u)), E = st(d), C = {
6509
6510
  rootMargin: -g + "px " + -m + "px " + -w + "px " + -E + "px",
6510
6511
  threshold: z(0, j(1, l)) || 1
6511
6512
  };
@@ -6523,12 +6524,12 @@ function _i(h, t) {
6523
6524
  }
6524
6525
  try {
6525
6526
  e = new IntersectionObserver(y, {
6526
- ...p,
6527
+ ...C,
6527
6528
  // Handle <iframe>s
6528
6529
  root: s.ownerDocument
6529
6530
  });
6530
6531
  } catch {
6531
- e = new IntersectionObserver(y, p);
6532
+ e = new IntersectionObserver(y, C);
6532
6533
  }
6533
6534
  e.observe(h);
6534
6535
  }
@@ -6551,10 +6552,10 @@ function yt(h, t, e, i) {
6551
6552
  const f = c && a ? _i(c, e) : null;
6552
6553
  let x = -1, u = null;
6553
6554
  r && (u = new ResizeObserver((E) => {
6554
- let [C] = E;
6555
- C && C.target === c && u && (u.unobserve(t), cancelAnimationFrame(x), x = requestAnimationFrame(() => {
6556
- var p;
6557
- (p = u) == null || p.observe(t);
6555
+ let [p] = E;
6556
+ p && p.target === c && u && (u.unobserve(t), cancelAnimationFrame(x), x = requestAnimationFrame(() => {
6557
+ var C;
6558
+ (C = u) == null || C.observe(t);
6558
6559
  })), e();
6559
6560
  }), c && !l && u.observe(c), u.observe(t));
6560
6561
  let g, m = l ? G(h) : null;
@@ -6565,8 +6566,8 @@ function yt(h, t, e, i) {
6565
6566
  }
6566
6567
  return e(), () => {
6567
6568
  var E;
6568
- d.forEach((C) => {
6569
- s && C.removeEventListener("scroll", e), o && C.removeEventListener("resize", e);
6569
+ d.forEach((p) => {
6570
+ s && p.removeEventListener("scroll", e), o && p.removeEventListener("resize", e);
6570
6571
  }), f == null || f(), (E = u) == null || E.disconnect(), u = null, l && cancelAnimationFrame(g);
6571
6572
  };
6572
6573
  }
@@ -7420,12 +7421,12 @@ class Ai {
7420
7421
  e.preventDefault();
7421
7422
  const { xArr: x } = this.ctx.selector, [u, g] = x, { colIndex: m } = t;
7422
7423
  m >= u && m <= g || (this.ctx.focusCellHeader = t, this.ctx.emit("selectCols", t)), this.currentDOMTreeMenu && this.currentDOMTreeMenu.destroy();
7423
- const E = this.ctx.database.getColumns(), C = f.map((p) => p.value === "visible" ? {
7424
- ...p,
7424
+ const E = this.ctx.database.getColumns(), p = f.map((C) => C.value === "visible" ? {
7425
+ ...C,
7425
7426
  children: this.filterColumns(E)
7426
- } : p);
7427
- this.ctx.contextMenuIng = !0, this.currentDOMTreeMenu = new zt(this.contextMenuEl, C, {
7428
- onClick: (p, b) => {
7427
+ } : C);
7428
+ this.ctx.contextMenuIng = !0, this.currentDOMTreeMenu = new zt(this.contextMenuEl, p, {
7429
+ onClick: (C, b) => {
7429
7430
  const { xArr: y } = this.ctx.selector, [R, S] = y;
7430
7431
  if (b === "fixedLeft" || b === "fixedRight" || b === "fixedNone") {
7431
7432
  const O = this.ctx.header.allCellHeaders.filter((v) => v.colIndex >= R && v.colIndex <= S).filter((v) => v.level === 0).filter((v) => !v.column.fixedDisabled).map((v) => v.key);
@@ -7437,12 +7438,12 @@ class Ai {
7437
7438
  const O = this.ctx.header.leafCellHeaders.filter((v) => v.colIndex >= R && v.colIndex <= S).filter((v) => !v.children.length).filter((v) => !v.column.hideDisabled).map((v) => v.key);
7438
7439
  O.length > 0 && this.ctx.database.setCustomHeaderHideData(O, !0), this.hide();
7439
7440
  } else if (b !== "visible") if (b.startsWith("visible_")) {
7440
- if (!p.key) return;
7441
- if (p.children) {
7442
- const _ = this.getLeafKeys(p.children);
7441
+ if (!C.key) return;
7442
+ if (C.children) {
7443
+ const _ = this.getLeafKeys(C.children);
7443
7444
  this.ctx.database.setCustomHeaderHideData(_, !1);
7444
7445
  } else
7445
- this.ctx.database.setCustomHeaderHideData([p.key], !1);
7446
+ this.ctx.database.setCustomHeaderHideData([C.key], !1);
7446
7447
  this.currentDOMTreeMenu && this.currentDOMTreeMenu.removeSubMenuItem(b);
7447
7448
  const O = this.ctx.database.getColumns();
7448
7449
  J(O).filter((_) => _.hide).length === 0 && this.hide();
@@ -7562,11 +7563,11 @@ class Di {
7562
7563
  e.preventDefault(), this.hide();
7563
7564
  return;
7564
7565
  }
7565
- if (e.code === "ArrowUp") {
7566
+ if (e.code === "ArrowUp" || e.shiftKey && e.code === "Enter") {
7566
7567
  e.preventDefault(), this.navigatePrevious();
7567
7568
  return;
7568
7569
  }
7569
- if (e.code === "ArrowDown") {
7570
+ if (e.code === "ArrowDown" || e.code === "Enter") {
7570
7571
  e.preventDefault(), this.navigateNext();
7571
7572
  return;
7572
7573
  }
@@ -7579,13 +7580,9 @@ class Di {
7579
7580
  });
7580
7581
  }
7581
7582
  async initSearchData() {
7582
- this.showLoading(), this.searchData = [];
7583
- const { allCellHeaders: t } = this.ctx.header;
7584
- await this.batchRun(
7585
- t.length,
7586
- 0,
7587
- 1e4,
7588
- (s) => {
7583
+ this.showLoading(), this.searchData = [], setTimeout(() => {
7584
+ const { allCellHeaders: t } = this.ctx.header;
7585
+ for (let s = 0; s < t.length; s++) {
7589
7586
  const o = t[s];
7590
7587
  o && ["string", "number"].includes(typeof o.text) && this.searchData.push({
7591
7588
  rowIndex: 0,
@@ -7594,25 +7591,20 @@ class Di {
7594
7591
  type: "header",
7595
7592
  colKey: o.key
7596
7593
  });
7597
- },
7598
- 5
7599
- );
7600
- const { maxColIndex: e, maxRowIndex: i } = this.ctx;
7601
- await this.batchRun(
7602
- i,
7603
- e,
7604
- 1e4,
7605
- (s, o) => {
7606
- const r = this.ctx.database.getVirtualBodyCell(s, o, !1), a = r == null ? void 0 : r.getText();
7607
- ["string", "number"].includes(typeof a) && this.searchData.push({
7608
- rowIndex: s,
7609
- colIndex: o,
7610
- text: `${a}`,
7611
- type: "body"
7612
- });
7613
- },
7614
- 5
7615
- ), this.hideLoading();
7594
+ }
7595
+ const { maxColIndex: e, maxRowIndex: i } = this.ctx;
7596
+ for (let s = 0; s < i; s++)
7597
+ for (let o = 0; o < e; o++) {
7598
+ const r = this.ctx.database.getVirtualBodyCell(s, o, !1), a = r == null ? void 0 : r.getText();
7599
+ ["string", "number"].includes(typeof a) && this.searchData.push({
7600
+ rowIndex: s,
7601
+ colIndex: o,
7602
+ text: `${a}`,
7603
+ type: "body"
7604
+ });
7605
+ }
7606
+ this.hideLoading();
7607
+ }, 0);
7616
7608
  }
7617
7609
  createContainer() {
7618
7610
  const t = document.createElement("div");
@@ -7642,15 +7634,14 @@ class Di {
7642
7634
  performSearch() {
7643
7635
  const t = this.input.value.trim();
7644
7636
  if (this.searchResults = [], this.currentIndex = -1, !t) {
7645
- this.updateCount();
7637
+ this.cearFinderBar(), this.updateCount();
7646
7638
  return;
7647
7639
  }
7648
- this.showLoading(), this.searchResults = this.searchData.filter((e) => e.text.includes(t)), this.searchResults.length > 0 ? (this.currentIndex = 0, this.scrollToCurrentResult()) : (this.ctx.finderBar = {
7649
- rowIndex: -1,
7650
- colIndex: -1,
7651
- text: "",
7652
- type: "header"
7653
- }, this.ctx.emit("draw")), this.updateCount(), this.hideLoading();
7640
+ this.showLoading(), setTimeout(() => {
7641
+ this.searchResults = this.searchData.filter(
7642
+ (e) => e.text.toLowerCase().includes(t.toLowerCase())
7643
+ ), this.searchResults.length > 0 ? (this.currentIndex = 0, this.scrollToCurrentResult()) : this.cearFinderBar(), this.updateCount(), this.hideLoading();
7644
+ }, 0);
7654
7645
  }
7655
7646
  scrollToCurrentResult() {
7656
7647
  if (this.currentIndex < 0 || this.currentIndex >= this.searchResults.length)
@@ -7685,22 +7676,21 @@ class Di {
7685
7676
  var t;
7686
7677
  this.loadingEl.classList.remove("show"), (t = this.loadingEl.parentElement) == null || t.classList.remove("loading"), this.input.readOnly = !1;
7687
7678
  }
7688
- async batchRun(t, e, i, s, o = 0) {
7689
- for (let r = 0; r <= t; r += i) {
7690
- const a = Math.min(r + i - 1, t), l = [];
7691
- for (let c = r; c <= a; c++)
7692
- for (let d = 0; d <= e; d++)
7693
- l.push(Promise.resolve(s(c, d)));
7694
- await Promise.all(l), o > 0 && await new Promise((c) => setTimeout(c, o));
7695
- }
7679
+ cearFinderBar() {
7680
+ this.ctx.finderBar = {
7681
+ rowIndex: -1,
7682
+ colIndex: -1,
7683
+ text: "",
7684
+ type: "header"
7685
+ }, this.ctx.emit("draw");
7696
7686
  }
7697
7687
  hide() {
7698
- this.isVisible && (this.isVisible = !1, this.container.classList.remove("show"), this.ctx.finding = !1, this.input.value = "", this.searchResults = [], this.currentIndex = -1, this.hideLoading(), this.ctx.finderBar = {
7688
+ this.isVisible && (this.isVisible = !1, this.container.classList.remove("show"), this.ctx.finding = !1, this.input.value = "", this.searchResults = [], this.searchData = [], this.currentIndex = -1, this.hideLoading(), this.ctx.finderBar = {
7699
7689
  rowIndex: -1,
7700
7690
  colIndex: -1,
7701
7691
  text: "",
7702
7692
  type: "header"
7703
- }, this.updateCount());
7693
+ }, this.updateCount(), this.ctx.emit("draw"));
7704
7694
  }
7705
7695
  destroy() {
7706
7696
  this.hide(), this.container.remove();