e-virt-table 1.3.9 → 1.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +5 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +806 -596
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/Cell.d.ts +1 -1
- package/dist/lib/Cell.js +10 -3
- package/dist/lib/Cell.js.map +1 -1
- package/dist/lib/CellHeader.js +5 -0
- package/dist/lib/CellHeader.js.map +1 -1
- package/dist/lib/Config.d.ts +6 -0
- package/dist/lib/Config.js +21 -0
- package/dist/lib/Config.js.map +1 -1
- package/dist/lib/Context.d.ts +3 -0
- package/dist/lib/Context.js +17 -0
- package/dist/lib/Context.js.map +1 -1
- package/dist/lib/ContextMenu.d.ts +1 -0
- package/dist/lib/ContextMenu.js +26 -5
- package/dist/lib/ContextMenu.js.map +1 -1
- package/dist/lib/Database.d.ts +1 -1
- package/dist/lib/Database.js +6 -3
- package/dist/lib/Database.js.map +1 -1
- package/dist/lib/EVirtTable.d.ts +1 -0
- package/dist/lib/EVirtTable.js +9 -0
- package/dist/lib/EVirtTable.js.map +1 -1
- package/dist/lib/Editor.js +3 -0
- package/dist/lib/Editor.js.map +1 -1
- package/dist/lib/FinderBar.d.ts +38 -0
- package/dist/lib/FinderBar.js +352 -0
- package/dist/lib/FinderBar.js.map +1 -0
- package/dist/lib/Header.js +1 -1
- package/dist/lib/Header.js.map +1 -1
- package/dist/lib/Icons.d.ts +2 -1
- package/dist/lib/Icons.js +3 -2
- package/dist/lib/Icons.js.map +1 -1
- package/dist/lib/Scroller.d.ts +1 -0
- package/dist/lib/Scroller.js +9 -7
- package/dist/lib/Scroller.js.map +1 -1
- package/dist/lib/Selector.js +3 -0
- package/dist/lib/Selector.js.map +1 -1
- package/dist/lib/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var n = (h, t, e) =>
|
|
5
|
-
class
|
|
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)}})();
|
|
2
|
+
var de = Object.defineProperty;
|
|
3
|
+
var fe = (h, t, e) => t in h ? de(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
|
|
4
|
+
var n = (h, t, e) => fe(h, typeof t != "symbol" ? t + "" : t, e);
|
|
5
|
+
class ue {
|
|
6
6
|
constructor(t) {
|
|
7
7
|
n(this, "rules");
|
|
8
8
|
this.rules = t;
|
|
@@ -60,13 +60,13 @@ class fe {
|
|
|
60
60
|
return e;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function $t() {
|
|
64
64
|
return "xxxxxxxxxxxxxxxxxx".replace(/[x]/g, function(h) {
|
|
65
65
|
const t = Math.random() * 16 | 0;
|
|
66
66
|
return (h === "x" ? t : t & 3 | 8).toString(16);
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function bt(h, t) {
|
|
70
70
|
let e = 0, i;
|
|
71
71
|
return function(...s) {
|
|
72
72
|
const o = (/* @__PURE__ */ new Date()).getTime(), r = o - e, a = typeof t == "function" ? t() : t;
|
|
@@ -78,7 +78,7 @@ function yt(h, t) {
|
|
|
78
78
|
function ot(h = []) {
|
|
79
79
|
return h.length ? h.map((t) => ot(t.children) + 1).sort((t, e) => e - t)[0] : 0;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function xe(h = []) {
|
|
82
82
|
let t = [], e = [], i = [];
|
|
83
83
|
return h.forEach((s) => {
|
|
84
84
|
s.fixed === "left" ? t.push(s) : s.fixed === "right" ? i.push(s) : e.push(s);
|
|
@@ -123,24 +123,24 @@ function J(h = []) {
|
|
|
123
123
|
e.children ? t = t.concat(J(e.children)) : t.push(e);
|
|
124
124
|
}), t;
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function Gt(h) {
|
|
127
127
|
return h.filter((t) => !t.hide).map((t) => Array.isArray(t.children) && t.children.length > 0 ? {
|
|
128
128
|
...t,
|
|
129
|
-
children:
|
|
129
|
+
children: Gt(t.children)
|
|
130
130
|
// 递归处理
|
|
131
131
|
} : { ...t });
|
|
132
132
|
}
|
|
133
|
-
const
|
|
134
|
-
function
|
|
133
|
+
const At = /^(\r\n|\n\r|\r|\n)/, ge = /^[^\t\r\n]+/, Ht = /^\t/;
|
|
134
|
+
function we(h) {
|
|
135
135
|
let t = [[""]];
|
|
136
136
|
if (h.length === 0)
|
|
137
137
|
return t;
|
|
138
138
|
let e = 0, i = 0, s;
|
|
139
139
|
for (; h.length > 0 && s !== h.length; )
|
|
140
|
-
if (s = h.length, h.match(
|
|
141
|
-
h = h.replace(
|
|
142
|
-
else if (h.match(
|
|
143
|
-
h = h.replace(
|
|
140
|
+
if (s = h.length, h.match(Ht))
|
|
141
|
+
h = h.replace(Ht, ""), e += 1, t[i][e] = "";
|
|
142
|
+
else if (h.match(At))
|
|
143
|
+
h = h.replace(At, ""), e = 0, i += 1, t[i] = [""];
|
|
144
144
|
else {
|
|
145
145
|
let o = "";
|
|
146
146
|
if (h.startsWith('"')) {
|
|
@@ -151,14 +151,14 @@ function ge(h) {
|
|
|
151
151
|
}
|
|
152
152
|
o = o.replace(/^"/, "").replace(/"$/, "").replace(/["]*/g, (l) => new Array(Math.floor(l.length / 2)).fill('"').join(""));
|
|
153
153
|
} else {
|
|
154
|
-
const r = h.match(
|
|
154
|
+
const r = h.match(ge);
|
|
155
155
|
o = r ? r[0] : "", h = h.slice(o.length);
|
|
156
156
|
}
|
|
157
157
|
t[i][e] = o;
|
|
158
158
|
}
|
|
159
159
|
return Array.isArray(t) && t.length > 1 && t[t.length - 1].length === 1 && t[t.length - 1][0] === "" && (t = t.slice(0, t.length - 1)), t;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function me(h) {
|
|
162
162
|
let t, e, i, s, o = "", r;
|
|
163
163
|
for (t = 0, e = h.length; t < e; t += 1) {
|
|
164
164
|
for (s = h[t].length, i = 0; i < s; i += 1)
|
|
@@ -169,7 +169,7 @@ function we(h) {
|
|
|
169
169
|
}
|
|
170
170
|
return o;
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function Ut(h, t, e = []) {
|
|
173
173
|
let i = 0;
|
|
174
174
|
const s = [];
|
|
175
175
|
return h.forEach((o, r) => {
|
|
@@ -181,15 +181,15 @@ function Gt(h, t, e = []) {
|
|
|
181
181
|
}
|
|
182
182
|
}), s;
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function jt(h, t) {
|
|
185
185
|
let e = "", i = "";
|
|
186
186
|
const s = {};
|
|
187
187
|
return t.forEach((o, r) => {
|
|
188
188
|
r === 0 ? (e = o.key, i = o.key, s[o.key] = 1) : h[o.key] === h[e] ? (s[o.key] = 0, s[i] += 1) : (s[o.key] = 1, e = o.key, i = o.key);
|
|
189
189
|
}), s;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
192
|
-
const { visibleRows: i, rowIndex: s, headIndex: o } = h, r =
|
|
191
|
+
function Ee(h, t, e = []) {
|
|
192
|
+
const { visibleRows: i, rowIndex: s, headIndex: o } = h, r = Ut(i, t, e);
|
|
193
193
|
return r[s - o] === 0 ? {
|
|
194
194
|
rowspan: 0,
|
|
195
195
|
colspan: 0,
|
|
@@ -202,10 +202,10 @@ function me(h, t, e = []) {
|
|
|
202
202
|
mergeRow: !0
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function pe(h, t = []) {
|
|
206
206
|
const { column: e, row: i, visibleLeafColumns: s } = h, o = s.filter((r) => t.includes(r.key));
|
|
207
207
|
if (t.includes(e.key)) {
|
|
208
|
-
const r =
|
|
208
|
+
const r = jt(i, o);
|
|
209
209
|
return r[e.key] === 0 ? {
|
|
210
210
|
rowspan: 0,
|
|
211
211
|
colspan: 0,
|
|
@@ -219,11 +219,11 @@ function Ee(h, t = []) {
|
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function Ce(h, t = document.documentElement) {
|
|
223
223
|
const e = h.startsWith("--") ? h : `--${h}`;
|
|
224
224
|
return getComputedStyle(t).getPropertyValue(e).trim();
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function Dt(h) {
|
|
227
227
|
if (!h) return /* @__PURE__ */ new Date(0);
|
|
228
228
|
if (typeof h == "number")
|
|
229
229
|
return new Date(h);
|
|
@@ -277,11 +277,11 @@ function Ht(h) {
|
|
|
277
277
|
}
|
|
278
278
|
return /* @__PURE__ */ new Date(NaN);
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
const e =
|
|
280
|
+
function ye(h, t) {
|
|
281
|
+
const e = Dt(h), i = Dt(t);
|
|
282
282
|
return isNaN(e.getTime()) && isNaN(i.getTime()) ? 0 : isNaN(e.getTime()) ? -1 : isNaN(i.getTime()) ? 1 : e.getTime() - i.getTime();
|
|
283
283
|
}
|
|
284
|
-
class
|
|
284
|
+
class qt {
|
|
285
285
|
constructor(t, e, i, s, o, r, a) {
|
|
286
286
|
n(this, "ctx");
|
|
287
287
|
n(this, "x", 0);
|
|
@@ -327,8 +327,8 @@ class jt {
|
|
|
327
327
|
getRightFixedX() {
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
class
|
|
331
|
-
constructor(e, i, s, o, r, a, l, c, d, f = "body") {
|
|
330
|
+
class vt extends qt {
|
|
331
|
+
constructor(e, i, s, o, r, a, l, c, d, f = "body", x = !0) {
|
|
332
332
|
super(e, o, r, a, l, f, c.fixed);
|
|
333
333
|
n(this, "formatter");
|
|
334
334
|
n(this, "formatterFooter");
|
|
@@ -411,7 +411,7 @@ class bt extends jt {
|
|
|
411
411
|
n(this, "overflowTooltipMaxWidth", 500);
|
|
412
412
|
n(this, "overflowTooltipPlacement", "top");
|
|
413
413
|
n(this, "maxLineClamp", "auto");
|
|
414
|
-
this.visibleWidth = this.width, this.visibleHeight = this.height, this.colIndex = s, this.rowIndex = i, this.key = c.key, this.type = c.type || "", this.editorType = c.editorType || "text", this.selectorCellValueType = c.selectorCellValueType || this.ctx.config.SELECTOR_CELL_VALUE_TYPE || "value", this.editorProps = c.editorProps || {}, this.cellType = f, this.align = c.align || this.ctx.config.COLUMNS_ALIGN, this.verticalAlign = c.verticalAlign || this.ctx.config.COLUMNS_VERTICAL_ALIGN, this.fixed = c.fixed || "", this.level = c.level || 0, this.operation = c.operation || !1, this.column = c, this.rules = c.rules || [], this.row = d, this.rowKey = this.cellType === "body" ? this.ctx.database.getRowKeyForRowIndex(i) : `${this.cellType}_${this.rowIndex}`, this.value = this.getValue(), this.render = c.render, this.overflowTooltipShow = c.overflowTooltipShow !== !1, this.autoRowHeight = c.autoRowHeight !== void 0 ? c.autoRowHeight : this.ctx.config.AUTO_ROW_HEIGHT, this.overflowTooltipMaxWidth = c.overflowTooltipMaxWidth || 500, this.overflowTooltipPlacement = c.overflowTooltipPlacement || "top", this.renderFooter = c.renderFooter, this.hoverIconName = c.hoverIconName, this.formatter = c.formatter, this.formatterFooter = c.formatterFooter, this.maxLineClamp = c.maxLineClamp || "auto", this.update();
|
|
414
|
+
this.visibleWidth = this.width, this.visibleHeight = this.height, this.colIndex = s, this.rowIndex = i, this.key = c.key, this.type = c.type || "", this.editorType = c.editorType || "text", this.selectorCellValueType = c.selectorCellValueType || this.ctx.config.SELECTOR_CELL_VALUE_TYPE || "value", this.editorProps = c.editorProps || {}, this.cellType = f, this.align = c.align || this.ctx.config.COLUMNS_ALIGN, this.verticalAlign = c.verticalAlign || this.ctx.config.COLUMNS_VERTICAL_ALIGN, this.fixed = c.fixed || "", this.level = c.level || 0, this.operation = c.operation || !1, this.column = c, this.rules = c.rules || [], this.row = d, this.rowKey = this.cellType === "body" ? this.ctx.database.getRowKeyForRowIndex(i) : `${this.cellType}_${this.rowIndex}`, this.value = this.getValue(), this.render = c.render, this.overflowTooltipShow = c.overflowTooltipShow !== !1, this.autoRowHeight = c.autoRowHeight !== void 0 ? c.autoRowHeight : this.ctx.config.AUTO_ROW_HEIGHT, this.overflowTooltipMaxWidth = c.overflowTooltipMaxWidth || 500, this.overflowTooltipPlacement = c.overflowTooltipPlacement || "top", this.renderFooter = c.renderFooter, this.hoverIconName = c.hoverIconName, this.formatter = c.formatter, this.formatterFooter = c.formatterFooter, this.maxLineClamp = c.maxLineClamp || "auto", x && this.update();
|
|
415
415
|
}
|
|
416
416
|
setWidthHeight(e, i) {
|
|
417
417
|
this.width = e, this.height = i;
|
|
@@ -533,16 +533,16 @@ class bt extends jt {
|
|
|
533
533
|
this.rowExpand = c, this.rowHasChildren = d;
|
|
534
534
|
const { TREE_INDENT: u = 16, CHECKBOX_SIZE: g, TREE_ICON_SIZE: m } = this.ctx.config;
|
|
535
535
|
if (r = x * u, f) {
|
|
536
|
-
const
|
|
537
|
-
a = "loading", o =
|
|
536
|
+
const R = this.ctx.icons.get("loading");
|
|
537
|
+
a = "loading", o = R;
|
|
538
538
|
} else if (d) {
|
|
539
|
-
const
|
|
540
|
-
o = c ?
|
|
539
|
+
const R = this.ctx.icons.get("expand"), S = this.ctx.icons.get("shrink");
|
|
540
|
+
o = c ? S : R, a = c ? "shrink" : "expand";
|
|
541
541
|
}
|
|
542
|
-
let w = m, E = m,
|
|
543
|
-
(this.align === "center" || this.align === "right") && (
|
|
544
|
-
let
|
|
545
|
-
this.type === "selection-tree" ? (
|
|
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)));
|
|
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;
|
|
@@ -602,34 +602,35 @@ class bt extends jt {
|
|
|
602
602
|
HIGHLIGHT_HOVER_ROW: x,
|
|
603
603
|
HIGHLIGHT_HOVER_ROW_COLOR: u,
|
|
604
604
|
STRIPE: g,
|
|
605
|
-
STRIPE_COLOR: m
|
|
605
|
+
STRIPE_COLOR: m,
|
|
606
|
+
FINDER_CELL_BG_COLOR: w
|
|
606
607
|
} = this.ctx.config;
|
|
607
608
|
if (this.cellType === "footer") {
|
|
608
|
-
let _ = c,
|
|
609
|
+
let _ = c, T = l;
|
|
609
610
|
if (typeof o == "function") {
|
|
610
|
-
const
|
|
611
|
+
const M = o, { backgroundColor: L, color: A, font: H } = M({
|
|
611
612
|
row: this.row,
|
|
612
613
|
rowIndex: this.rowIndex,
|
|
613
614
|
colIndex: this.colIndex,
|
|
614
615
|
column: this.column,
|
|
615
616
|
value: this.getValue()
|
|
616
617
|
}) || {};
|
|
617
|
-
|
|
618
|
+
L && (_ = L), A && (T = A), H && (this.drawTextFont = H);
|
|
618
619
|
}
|
|
619
|
-
this.drawCellSkyBgColor = "transparent", this.drawCellBgColor = _, this.drawTextColor =
|
|
620
|
+
this.drawCellSkyBgColor = "transparent", this.drawCellBgColor = _, this.drawTextColor = T;
|
|
620
621
|
return;
|
|
621
622
|
}
|
|
622
|
-
let
|
|
623
|
-
const
|
|
624
|
-
let
|
|
623
|
+
let E = "transparent";
|
|
624
|
+
const C = this.ctx.hoverCell, p = this.ctx.currentCell;
|
|
625
|
+
let b = this.rowIndex, y = this.rowIndex;
|
|
625
626
|
if (this.rowspan !== 1 && (x || d)) {
|
|
626
|
-
const _ = this.getSpanInfo(), { yArr:
|
|
627
|
-
|
|
627
|
+
const _ = this.getSpanInfo(), { yArr: T } = _;
|
|
628
|
+
b = T[0], y = T[1];
|
|
628
629
|
}
|
|
629
|
-
x &&
|
|
630
|
-
let
|
|
631
|
-
if (this.ctx.database.getReadonly(this.rowKey, this.key) || (
|
|
632
|
-
const _ = s, { backgroundColor:
|
|
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;
|
|
631
|
+
let R = e, S = a;
|
|
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
|
+
const _ = s, { backgroundColor: T, color: M, font: L } = _({
|
|
633
634
|
row: this.row,
|
|
634
635
|
rowIndex: this.rowIndex,
|
|
635
636
|
colIndex: this.colIndex,
|
|
@@ -637,9 +638,10 @@ class bt extends jt {
|
|
|
637
638
|
isHasChanged: this.isHasChanged,
|
|
638
639
|
value: this.getValue()
|
|
639
640
|
}) || {};
|
|
640
|
-
|
|
641
|
+
T && (R = T), M && (S = M), L && (this.drawTextFont = L);
|
|
641
642
|
}
|
|
642
|
-
|
|
643
|
+
const { rowIndex: O, colIndex: v, type: I } = this.ctx.finderBar;
|
|
644
|
+
O === this.rowIndex && v === this.colIndex && I === "body" && (R = w), this.drawCellBgColor = R, this.drawTextColor = S;
|
|
643
645
|
}
|
|
644
646
|
updateSelection() {
|
|
645
647
|
const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: o, cellType: r, type: a, rowIndex: l, rowKey: c } = this;
|
|
@@ -651,17 +653,17 @@ class bt extends jt {
|
|
|
651
653
|
let g = u, m = this.drawY + (i - f) / 2;
|
|
652
654
|
if (a !== "selection-tree") {
|
|
653
655
|
if (a === "tree-selection") {
|
|
654
|
-
const { TREE_INDENT:
|
|
655
|
-
g = u +
|
|
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
658
|
}
|
|
657
659
|
}
|
|
658
660
|
let w = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck";
|
|
659
661
|
if (a === "selection-tree" || a === "tree-selection") {
|
|
660
|
-
const
|
|
661
|
-
|
|
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
664
|
} else {
|
|
663
|
-
const
|
|
664
|
-
|
|
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
667
|
}
|
|
666
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));
|
|
667
669
|
}
|
|
@@ -685,8 +687,8 @@ class bt extends jt {
|
|
|
685
687
|
if (a.rowKey === this.rowKey && (l = this.drawX + this.width - s - o, c = this.drawY + (this.height - s) / 2), this.rowspan !== 1 && r) {
|
|
686
688
|
const f = this.getSpanInfo(), { yArr: x } = f, u = x[0], g = x[1];
|
|
687
689
|
if (a.rowIndex >= u && a.rowIndex <= g) {
|
|
688
|
-
const { width: m, height: w, offsetTop: E, offsetLeft:
|
|
689
|
-
l = this.drawX -
|
|
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
692
|
}
|
|
691
693
|
}
|
|
692
694
|
const d = this.ctx.icons.get(this.hoverIconName);
|
|
@@ -959,10 +961,10 @@ class bt extends jt {
|
|
|
959
961
|
drawBorder(e) {
|
|
960
962
|
const { drawX: i, drawY: s, rowIndex: o, colIndex: r, height: a, width: l } = this;
|
|
961
963
|
let c = i, d = s;
|
|
962
|
-
const { xArr: f, yArr: x, lineDash: u = [], borderWidth: g = 1, borderColor: m, fillColor: w } = e, E = f[0],
|
|
963
|
-
if (r >= E && r <=
|
|
964
|
-
const y = r ===
|
|
965
|
-
this.ctx.paint.drawLine([c +
|
|
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;
|
|
967
|
+
this.ctx.paint.drawLine([c + R, d + 1, c + l - y, d + 1], {
|
|
966
968
|
borderColor: m,
|
|
967
969
|
fillColor: w,
|
|
968
970
|
borderWidth: g,
|
|
@@ -971,9 +973,9 @@ class bt extends jt {
|
|
|
971
973
|
lineDash: u
|
|
972
974
|
});
|
|
973
975
|
}
|
|
974
|
-
if (r ===
|
|
975
|
-
const y = o ===
|
|
976
|
-
this.ctx.paint.drawLine([c + l - 1, d + y, c + l - 1, d + a -
|
|
976
|
+
if (r === C && o >= p && o <= b) {
|
|
977
|
+
const y = o === p ? 1 : 0, R = o === b ? 1 : 0;
|
|
978
|
+
this.ctx.paint.drawLine([c + l - 1, d + y, c + l - 1, d + a - R], {
|
|
977
979
|
borderColor: m,
|
|
978
980
|
fillColor: w,
|
|
979
981
|
borderWidth: g,
|
|
@@ -982,9 +984,9 @@ class bt extends jt {
|
|
|
982
984
|
lineDash: u
|
|
983
985
|
});
|
|
984
986
|
}
|
|
985
|
-
if (r >= E && r <=
|
|
986
|
-
const y = r ===
|
|
987
|
-
this.ctx.paint.drawLine([c +
|
|
987
|
+
if (r >= E && r <= C && o === b) {
|
|
988
|
+
const y = r === C ? 1 : 0, R = r === E ? 1 : 0;
|
|
989
|
+
this.ctx.paint.drawLine([c + R, d + a - 1, c + l - y, d + a - 1], {
|
|
988
990
|
borderColor: m,
|
|
989
991
|
fillColor: w,
|
|
990
992
|
borderWidth: g,
|
|
@@ -993,9 +995,9 @@ class bt extends jt {
|
|
|
993
995
|
lineDash: u
|
|
994
996
|
});
|
|
995
997
|
}
|
|
996
|
-
if (r === E && o >=
|
|
997
|
-
const y = o === b ? 1 : 0,
|
|
998
|
-
this.ctx.paint.drawLine([c + 1, d +
|
|
998
|
+
if (r === E && o >= p && o <= b) {
|
|
999
|
+
const y = o === b ? 1 : 0, R = o === p ? 1 : 0;
|
|
1000
|
+
this.ctx.paint.drawLine([c + 1, d + R, c + 1, d + a - y], {
|
|
999
1001
|
borderColor: m,
|
|
1000
1002
|
fillColor: w,
|
|
1001
1003
|
borderWidth: g,
|
|
@@ -1006,7 +1008,7 @@ class bt extends jt {
|
|
|
1006
1008
|
}
|
|
1007
1009
|
}
|
|
1008
1010
|
}
|
|
1009
|
-
class
|
|
1011
|
+
class be {
|
|
1010
1012
|
constructor(t, e) {
|
|
1011
1013
|
n(this, "ctx");
|
|
1012
1014
|
n(this, "data");
|
|
@@ -1072,45 +1074,53 @@ class ye {
|
|
|
1072
1074
|
* @param level
|
|
1073
1075
|
*/
|
|
1074
1076
|
initData(t, e = 0, i = []) {
|
|
1075
|
-
const s = t.length
|
|
1076
|
-
|
|
1077
|
+
const s = t.length, {
|
|
1078
|
+
ROW_KEY: o = "",
|
|
1079
|
+
DEFAULT_EXPAND_ALL: r,
|
|
1080
|
+
CELL_HEIGHT: a,
|
|
1081
|
+
SELECTABLE_METHOD: l,
|
|
1082
|
+
CHECKBOX_KEY: c,
|
|
1083
|
+
TREE_CHILDREN_KEY: d
|
|
1084
|
+
} = this.ctx.config;
|
|
1085
|
+
t.forEach((f, x) => {
|
|
1077
1086
|
var p;
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
+
d !== "children" && (f.children = f[d]);
|
|
1088
|
+
const u = f[o], g = u != null ? `${u}` : $t();
|
|
1089
|
+
this.itemRowKeyMap.set(f, g);
|
|
1090
|
+
const m = f._height || a, w = f._readonly;
|
|
1091
|
+
let E = !0;
|
|
1092
|
+
if (typeof l == "function" && (E = l), c) {
|
|
1093
|
+
const b = f[c];
|
|
1094
|
+
if (this.checkboxKeyMap.has(b)) {
|
|
1095
|
+
const y = this.checkboxKeyMap.get(b) || [];
|
|
1096
|
+
y.push(g), this.checkboxKeyMap.set(b, y);
|
|
1087
1097
|
} else
|
|
1088
|
-
this.checkboxKeyMap.set(
|
|
1098
|
+
this.checkboxKeyMap.set(b, [g]);
|
|
1089
1099
|
}
|
|
1090
|
-
this.selectionMap.set(
|
|
1091
|
-
key:
|
|
1092
|
-
row:
|
|
1093
|
-
check: ((p = this.selectionMap.get(
|
|
1100
|
+
this.selectionMap.set(g, {
|
|
1101
|
+
key: c ? f[c] : g,
|
|
1102
|
+
row: f,
|
|
1103
|
+
check: ((p = this.selectionMap.get(g)) == null ? void 0 : p.check) || !1
|
|
1094
1104
|
});
|
|
1095
|
-
const
|
|
1096
|
-
this.expandMap.set(
|
|
1097
|
-
readonly:
|
|
1098
|
-
index:
|
|
1099
|
-
rowIndex:
|
|
1105
|
+
const C = r || this.expandMap.get(g) || f._expand || !1;
|
|
1106
|
+
this.expandMap.set(g, C), this.rowKeyMap.set(g, {
|
|
1107
|
+
readonly: w,
|
|
1108
|
+
index: x,
|
|
1109
|
+
rowIndex: x,
|
|
1100
1110
|
level: e,
|
|
1101
|
-
height:
|
|
1111
|
+
height: m,
|
|
1102
1112
|
calculatedHeight: -1,
|
|
1103
1113
|
check: !1,
|
|
1104
|
-
selectable:
|
|
1105
|
-
expand:
|
|
1114
|
+
selectable: E,
|
|
1115
|
+
expand: C,
|
|
1106
1116
|
expandLazy: !1,
|
|
1107
|
-
hasChildren:
|
|
1117
|
+
hasChildren: f._hasChildren || (Array.isArray(f.children) ? f.children.length > 0 : !1),
|
|
1108
1118
|
expandLoading: !1,
|
|
1109
|
-
item:
|
|
1119
|
+
item: f,
|
|
1110
1120
|
parentRowKeys: i,
|
|
1111
1121
|
parentRowKey: i[i.length - 1] || "",
|
|
1112
|
-
isLastChild:
|
|
1113
|
-
}), Array.isArray(
|
|
1122
|
+
isLastChild: x === s - 1
|
|
1123
|
+
}), Array.isArray(f.children) && f.children.length && this.initData(f.children, e + 1, [...i, g]);
|
|
1114
1124
|
});
|
|
1115
1125
|
}
|
|
1116
1126
|
/**
|
|
@@ -1310,7 +1320,7 @@ class ye {
|
|
|
1310
1320
|
} else if (s === "string") {
|
|
1311
1321
|
const d = String(a || ""), f = String(l || "");
|
|
1312
1322
|
c = d.localeCompare(f);
|
|
1313
|
-
} else s === "date" && (c =
|
|
1323
|
+
} else s === "date" && (c = ye(a, l));
|
|
1314
1324
|
return i === "asc" ? c : -c;
|
|
1315
1325
|
});
|
|
1316
1326
|
}
|
|
@@ -1425,18 +1435,18 @@ class ye {
|
|
|
1425
1435
|
const a = /* @__PURE__ */ new Set();
|
|
1426
1436
|
let l = [], c = t.map((g) => {
|
|
1427
1437
|
const { rowKey: m, key: w } = g;
|
|
1428
|
-
let E = g.value,
|
|
1429
|
-
const
|
|
1430
|
-
return (y == null ? void 0 : y.type) === "number" && (["", void 0, null].includes(E) ?
|
|
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({
|
|
1431
1441
|
...g,
|
|
1432
|
-
value:
|
|
1442
|
+
value: C,
|
|
1433
1443
|
oldValue: b,
|
|
1434
|
-
row:
|
|
1444
|
+
row: p
|
|
1435
1445
|
}))), {
|
|
1436
1446
|
...g,
|
|
1437
|
-
value:
|
|
1447
|
+
value: C,
|
|
1438
1448
|
oldValue: b,
|
|
1439
|
-
row:
|
|
1449
|
+
row: p
|
|
1440
1450
|
};
|
|
1441
1451
|
});
|
|
1442
1452
|
if (c = c.filter((g) => !l.some((m) => g.rowKey === m.rowKey && g.key === m.key)), l.length) {
|
|
@@ -1451,11 +1461,11 @@ class ye {
|
|
|
1451
1461
|
return;
|
|
1452
1462
|
const { BEFORE_VALUE_CHANGE_METHOD: d } = this.ctx.config;
|
|
1453
1463
|
s === "none" && typeof d == "function" && (c = await d(c), r = !1), c.forEach((g) => {
|
|
1454
|
-
const { value: m, rowKey: w, key: E } = g,
|
|
1464
|
+
const { value: m, rowKey: w, key: E } = g, C = this.getItemValue(w, E);
|
|
1455
1465
|
a.add(w), this.setItemValue(w, E, m, !1, !1, !1, r), o.push({
|
|
1456
1466
|
rowKey: w,
|
|
1457
1467
|
key: E,
|
|
1458
|
-
oldValue:
|
|
1468
|
+
oldValue: C,
|
|
1459
1469
|
newValue: m
|
|
1460
1470
|
});
|
|
1461
1471
|
});
|
|
@@ -1679,19 +1689,19 @@ class ye {
|
|
|
1679
1689
|
if (this.ctx.config.TREE_SELECT_MODE === "auto") {
|
|
1680
1690
|
const c = (w) => {
|
|
1681
1691
|
const E = this.getTreeChildren(w);
|
|
1682
|
-
let
|
|
1683
|
-
for (const
|
|
1684
|
-
|
|
1685
|
-
return
|
|
1692
|
+
let C = [];
|
|
1693
|
+
for (const p of E)
|
|
1694
|
+
C.push(p), C.push(...c(p));
|
|
1695
|
+
return C;
|
|
1686
1696
|
}, 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
1697
|
r = g && !(x === u), a = s || g, s && u > 0 && x === 0 && (a = !1, r = !1);
|
|
1688
1698
|
} else if (this.ctx.config.TREE_SELECT_MODE === "cautious") {
|
|
1689
1699
|
const c = (w) => {
|
|
1690
1700
|
const E = this.getTreeChildren(w);
|
|
1691
|
-
let
|
|
1692
|
-
for (const
|
|
1693
|
-
|
|
1694
|
-
return
|
|
1701
|
+
let C = [];
|
|
1702
|
+
for (const p of E)
|
|
1703
|
+
C.push(p), C.push(...c(p));
|
|
1704
|
+
return C;
|
|
1695
1705
|
}, 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
1706
|
r = g && !m, a = s || m, s && u > 0 && x === 0 && (a = !1, r = !1);
|
|
1697
1707
|
} else this.ctx.config.TREE_SELECT_MODE === "strictly" && (r = !1, a = s);
|
|
@@ -1952,7 +1962,7 @@ class ye {
|
|
|
1952
1962
|
value: this.getItemValue(t, e),
|
|
1953
1963
|
field: e,
|
|
1954
1964
|
fieldValue: this.getItemValue(t, e)
|
|
1955
|
-
}, f = new
|
|
1965
|
+
}, f = new ue(l).validate(c);
|
|
1956
1966
|
this.setValidationError(t, e, f), i(f);
|
|
1957
1967
|
} else
|
|
1958
1968
|
this.clearValidationError(t, e), i([]);
|
|
@@ -2002,43 +2012,43 @@ class ye {
|
|
|
2002
2012
|
}
|
|
2003
2013
|
]
|
|
2004
2014
|
};
|
|
2005
|
-
let w = e, E = e,
|
|
2015
|
+
let w = e, E = e, C = a, p = a, b = [], y = 0, R = 0, S = 0, O = 0;
|
|
2006
2016
|
if (d !== 1 && g) {
|
|
2007
|
-
|
|
2008
|
-
const
|
|
2009
|
-
const
|
|
2010
|
-
return `${I}${
|
|
2017
|
+
O = x;
|
|
2018
|
+
const v = l.reduce((I, _) => {
|
|
2019
|
+
const T = this.getItemValue(s, _) ?? "";
|
|
2020
|
+
return `${I}${T}`;
|
|
2011
2021
|
}, "");
|
|
2012
2022
|
for (let I = e - 1; I >= 0; I--) {
|
|
2013
|
-
const
|
|
2014
|
-
const A = this.getItemValue(
|
|
2023
|
+
const _ = this.rowIndexRowKeyMap.get(I) || "", T = l.reduce((M, L) => {
|
|
2024
|
+
const A = this.getItemValue(_, L) ?? "";
|
|
2015
2025
|
return `${M}${A}`;
|
|
2016
2026
|
}, "");
|
|
2017
|
-
if (
|
|
2027
|
+
if (v === T)
|
|
2018
2028
|
w = I;
|
|
2019
2029
|
else
|
|
2020
2030
|
break;
|
|
2021
2031
|
}
|
|
2022
2032
|
for (let I = e; I <= this.ctx.maxRowIndex; I++) {
|
|
2023
|
-
const
|
|
2024
|
-
const A = this.getItemValue(
|
|
2033
|
+
const _ = this.rowIndexRowKeyMap.get(I) || "", T = l.reduce((M, L) => {
|
|
2034
|
+
const A = this.getItemValue(_, L) ?? "";
|
|
2025
2035
|
return `${M}${A}`;
|
|
2026
2036
|
}, "");
|
|
2027
|
-
if (
|
|
2037
|
+
if (v === T)
|
|
2028
2038
|
E = I;
|
|
2029
2039
|
else
|
|
2030
2040
|
break;
|
|
2031
2041
|
}
|
|
2032
2042
|
for (let I = w; I < e; I++) {
|
|
2033
|
-
const { height:
|
|
2034
|
-
y +=
|
|
2043
|
+
const { height: _ } = this.positions[I];
|
|
2044
|
+
y += _;
|
|
2035
2045
|
}
|
|
2036
2046
|
for (let I = w; I <= E; I++) {
|
|
2037
|
-
const { height:
|
|
2038
|
-
|
|
2039
|
-
const
|
|
2047
|
+
const { height: _ } = this.positions[I];
|
|
2048
|
+
S += _;
|
|
2049
|
+
const T = this.rowIndexRowKeyMap.get(I) || "", { item: M } = this.rowKeyMap.get(T), L = this.getItemValue(T, i);
|
|
2040
2050
|
b.push({
|
|
2041
|
-
rowKey:
|
|
2051
|
+
rowKey: T,
|
|
2042
2052
|
key: i,
|
|
2043
2053
|
value: L,
|
|
2044
2054
|
row: M
|
|
@@ -2046,38 +2056,38 @@ class ye {
|
|
|
2046
2056
|
}
|
|
2047
2057
|
}
|
|
2048
2058
|
if (u !== 1 && m) {
|
|
2049
|
-
|
|
2050
|
-
for (let
|
|
2051
|
-
const I = this.getColumnByColIndex(
|
|
2059
|
+
S = f;
|
|
2060
|
+
for (let v = a - 1; v >= 0; v--) {
|
|
2061
|
+
const I = this.getColumnByColIndex(v);
|
|
2052
2062
|
if (!I)
|
|
2053
2063
|
break;
|
|
2054
|
-
const
|
|
2055
|
-
if (
|
|
2056
|
-
|
|
2064
|
+
const _ = this.getItemValue(s, i), T = this.getItemValue(s, I.key);
|
|
2065
|
+
if (_ === T && c.includes(I.key))
|
|
2066
|
+
C = v;
|
|
2057
2067
|
else
|
|
2058
2068
|
break;
|
|
2059
2069
|
}
|
|
2060
|
-
for (let
|
|
2061
|
-
const I = this.getColumnByColIndex(
|
|
2070
|
+
for (let v = a; v <= this.ctx.maxColIndex; v++) {
|
|
2071
|
+
const I = this.getColumnByColIndex(v);
|
|
2062
2072
|
if (!I)
|
|
2063
2073
|
break;
|
|
2064
|
-
const
|
|
2065
|
-
if (
|
|
2066
|
-
|
|
2074
|
+
const _ = this.getItemValue(s, i), T = this.getItemValue(s, I.key);
|
|
2075
|
+
if (_ === T && c.includes(I.key))
|
|
2076
|
+
p = v;
|
|
2067
2077
|
else
|
|
2068
2078
|
break;
|
|
2069
2079
|
}
|
|
2070
|
-
for (let
|
|
2071
|
-
const I = this.getColumnByColIndex(
|
|
2080
|
+
for (let v = C; v < a; v++) {
|
|
2081
|
+
const I = this.getColumnByColIndex(v);
|
|
2072
2082
|
if (!I)
|
|
2073
2083
|
break;
|
|
2074
|
-
|
|
2084
|
+
R += I.width || 100;
|
|
2075
2085
|
}
|
|
2076
|
-
for (let
|
|
2077
|
-
const I = this.getColumnByColIndex(
|
|
2086
|
+
for (let v = C; v <= p; v++) {
|
|
2087
|
+
const I = this.getColumnByColIndex(v);
|
|
2078
2088
|
if (!I)
|
|
2079
2089
|
break;
|
|
2080
|
-
|
|
2090
|
+
O += I.width || 100, b.push({
|
|
2081
2091
|
rowKey: s,
|
|
2082
2092
|
key: I.key,
|
|
2083
2093
|
value: this.getItemValue(s, I.key),
|
|
@@ -2086,14 +2096,14 @@ class ye {
|
|
|
2086
2096
|
}
|
|
2087
2097
|
}
|
|
2088
2098
|
return {
|
|
2089
|
-
xArr: [
|
|
2099
|
+
xArr: [C, p],
|
|
2090
2100
|
yArr: [w, E],
|
|
2091
2101
|
rowspan: d,
|
|
2092
2102
|
colspan: u,
|
|
2093
|
-
height:
|
|
2094
|
-
width:
|
|
2103
|
+
height: S,
|
|
2104
|
+
width: O,
|
|
2095
2105
|
offsetTop: y,
|
|
2096
|
-
offsetLeft:
|
|
2106
|
+
offsetLeft: R,
|
|
2097
2107
|
dataList: b
|
|
2098
2108
|
};
|
|
2099
2109
|
}
|
|
@@ -2130,9 +2140,9 @@ class ye {
|
|
|
2130
2140
|
return this.validationErrorMap.get(i) || [];
|
|
2131
2141
|
}
|
|
2132
2142
|
// 获取虚拟单元格,只针对可见的
|
|
2133
|
-
getVirtualBodyCell(t, e) {
|
|
2134
|
-
const
|
|
2135
|
-
return !
|
|
2143
|
+
getVirtualBodyCell(t, e, i = !0) {
|
|
2144
|
+
const s = this.getColumnByColIndex(e), o = this.getRowForRowIndex(t);
|
|
2145
|
+
return !s || !o ? void 0 : new vt(this.ctx, t, e, 0, 0, 0, 0, s, o.item, "body", i);
|
|
2136
2146
|
}
|
|
2137
2147
|
getVirtualBodyCellByKey(t, e) {
|
|
2138
2148
|
const i = this.getRowIndexForRowKey(t), s = this.getColIndexForKey(e);
|
|
@@ -2233,7 +2243,7 @@ class ye {
|
|
|
2233
2243
|
this.changedDataMap.clear();
|
|
2234
2244
|
}
|
|
2235
2245
|
}
|
|
2236
|
-
class
|
|
2246
|
+
class ve {
|
|
2237
2247
|
constructor(t) {
|
|
2238
2248
|
n(this, "ctx");
|
|
2239
2249
|
n(this, "history", []);
|
|
@@ -2288,7 +2298,7 @@ class be {
|
|
|
2288
2298
|
this.history = [], this.historyIndex = -1;
|
|
2289
2299
|
}
|
|
2290
2300
|
}
|
|
2291
|
-
class
|
|
2301
|
+
class Ie {
|
|
2292
2302
|
constructor(t) {
|
|
2293
2303
|
n(this, "eventTasks", /* @__PURE__ */ new Set());
|
|
2294
2304
|
n(this, "ctx");
|
|
@@ -2370,7 +2380,7 @@ class Re {
|
|
|
2370
2380
|
}
|
|
2371
2381
|
}
|
|
2372
2382
|
}
|
|
2373
|
-
class
|
|
2383
|
+
class Re {
|
|
2374
2384
|
constructor() {
|
|
2375
2385
|
n(this, "events", /* @__PURE__ */ new Map());
|
|
2376
2386
|
}
|
|
@@ -2408,7 +2418,7 @@ class Ie {
|
|
|
2408
2418
|
this.events.clear();
|
|
2409
2419
|
}
|
|
2410
2420
|
}
|
|
2411
|
-
class
|
|
2421
|
+
class _e {
|
|
2412
2422
|
constructor(t) {
|
|
2413
2423
|
n(this, "ctx");
|
|
2414
2424
|
n(this, "textCacheMap", /* @__PURE__ */ new Map());
|
|
@@ -2519,42 +2529,42 @@ class ve {
|
|
|
2519
2529
|
} = r;
|
|
2520
2530
|
if (this.ctx.font = a, this.ctx.fillStyle = c, this.ctx.textAlign = l, ["", null, void 0].includes(t))
|
|
2521
2531
|
return this.ctx.restore(), !1;
|
|
2522
|
-
const E = parseInt(((I = a.match(/\d+/)) == null ? void 0 : I[0]) || "12") * (r.lineHeight || 1.2),
|
|
2523
|
-
let
|
|
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;
|
|
2524
2534
|
const b = Math.round((o - 2 * d) / E);
|
|
2525
|
-
let y = this.wrapText(t,
|
|
2526
|
-
x === "auto" && u ?
|
|
2527
|
-
let
|
|
2528
|
-
const
|
|
2529
|
-
f === "middle" ?
|
|
2530
|
-
let
|
|
2531
|
-
l === "center" ?
|
|
2532
|
-
for (let
|
|
2533
|
-
const
|
|
2534
|
-
if (this.ctx.textBaseline = "top",
|
|
2535
|
-
const A = y.slice(
|
|
2536
|
-
this.ctx.fillText(
|
|
2535
|
+
let y = this.wrapText(t, C, r.cacheTextKey), R = Math.min(y.length, Math.max(b, 1));
|
|
2536
|
+
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
|
+
let S = i + d;
|
|
2538
|
+
const O = Math.round(R * E);
|
|
2539
|
+
f === "middle" ? S = i + (o - O) / 2 : f === "bottom" && (S = i + o - O - d);
|
|
2540
|
+
let v = e + d + g;
|
|
2541
|
+
l === "center" ? v = e + s / 2 : l === "right" && (v = e + s - d - m);
|
|
2542
|
+
for (let _ = 0; _ < y.length; _++) {
|
|
2543
|
+
const T = y[_], M = S + _ * E;
|
|
2544
|
+
if (this.ctx.textBaseline = "top", _ === R - 1) {
|
|
2545
|
+
const A = y.slice(_).join(""), { _text: H, ellipsis: D } = this.handleEllipsis(A, s, d, a);
|
|
2546
|
+
this.ctx.fillText(H, v, M), p = D;
|
|
2537
2547
|
break;
|
|
2538
2548
|
}
|
|
2539
|
-
this.ctx.fillText(
|
|
2549
|
+
this.ctx.fillText(T, v, M);
|
|
2540
2550
|
}
|
|
2541
2551
|
if (r.textCallback && y.length) {
|
|
2542
|
-
const
|
|
2543
|
-
let M =
|
|
2544
|
-
l === "center" ? (M =
|
|
2552
|
+
const _ = y.reduce((H, D) => Math.max(H, this.ctx.measureText(D).width), 0), T = Math.round(_);
|
|
2553
|
+
let M = v, L = v + T;
|
|
2554
|
+
l === "center" ? (M = v - T / 2, L = v + T / 2) : l === "right" && (M = v - T, L = v);
|
|
2545
2555
|
const A = {
|
|
2546
|
-
x:
|
|
2547
|
-
y:
|
|
2548
|
-
width:
|
|
2549
|
-
height:
|
|
2556
|
+
x: v,
|
|
2557
|
+
y: S,
|
|
2558
|
+
width: T,
|
|
2559
|
+
height: O,
|
|
2550
2560
|
left: M,
|
|
2551
2561
|
right: L,
|
|
2552
|
-
top:
|
|
2553
|
-
bottom:
|
|
2562
|
+
top: S,
|
|
2563
|
+
bottom: S + O
|
|
2554
2564
|
};
|
|
2555
2565
|
r.textCallback(A);
|
|
2556
2566
|
}
|
|
2557
|
-
return this.ctx.restore(),
|
|
2567
|
+
return this.ctx.restore(), p;
|
|
2558
2568
|
}
|
|
2559
2569
|
/**
|
|
2560
2570
|
* 将文本按宽度换行
|
|
@@ -2636,7 +2646,7 @@ class ve {
|
|
|
2636
2646
|
};
|
|
2637
2647
|
}
|
|
2638
2648
|
}
|
|
2639
|
-
class
|
|
2649
|
+
class Nt {
|
|
2640
2650
|
constructor(t) {
|
|
2641
2651
|
n(this, "_config", {});
|
|
2642
2652
|
/** CSS 类名前缀 */
|
|
@@ -2755,6 +2765,10 @@ class Dt {
|
|
|
2755
2765
|
n(this, "CHECKBOX_KEY", "");
|
|
2756
2766
|
/** 选择框颜色 */
|
|
2757
2767
|
n(this, "CHECKBOX_COLOR", "rgb(82,146,247)");
|
|
2768
|
+
/** 查找结果当前行颜色 */
|
|
2769
|
+
n(this, "FINDER_CELL_BG_COLOR", "rgb(255,229,144)");
|
|
2770
|
+
/** 启用查找 */
|
|
2771
|
+
n(this, "ENABLE_FINDER", !0);
|
|
2758
2772
|
/** 选择框大小 */
|
|
2759
2773
|
n(this, "CHECKBOX_SIZE", 20);
|
|
2760
2774
|
/** 选择框禁用图标 */
|
|
@@ -2809,6 +2823,8 @@ class Dt {
|
|
|
2809
2823
|
n(this, "ENABLE_SELECTOR", !0);
|
|
2810
2824
|
/** 树形选择模式 */
|
|
2811
2825
|
n(this, "TREE_SELECT_MODE", "auto");
|
|
2826
|
+
/** 树形子项key名称 */
|
|
2827
|
+
n(this, "TREE_CHILDREN_KEY", "children");
|
|
2812
2828
|
/** 树形缩进宽度 */
|
|
2813
2829
|
n(this, "TREE_INDENT", 20);
|
|
2814
2830
|
/** 树形图标大小 */
|
|
@@ -2987,14 +3003,14 @@ class Dt {
|
|
|
2987
3003
|
let t = {};
|
|
2988
3004
|
Object.keys(this).forEach((e) => {
|
|
2989
3005
|
if (e.endsWith("_COLOR") || e.endsWith("_FONT")) {
|
|
2990
|
-
const i = `--evt-${e.toLocaleLowerCase().replace(/_/g, "-")}`, s =
|
|
3006
|
+
const i = `--evt-${e.toLocaleLowerCase().replace(/_/g, "-")}`, s = Ce(i);
|
|
2991
3007
|
s && (t[e] = s);
|
|
2992
3008
|
}
|
|
2993
3009
|
}), Object.assign(this, t, this._config);
|
|
2994
3010
|
}
|
|
2995
3011
|
}
|
|
2996
|
-
const qt = '<svg t="1724122015492" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4237" width="32" height="32"><path d="M401.472 316.992l159.04 217.664L591.488 512l-30.976-22.656-159.04 217.728q-2.24 3.008-3.84 6.464-1.6 3.456-2.496 7.104-0.896 3.648-1.024 7.424-0.192 3.84 0.384 7.552 0.64 3.712 1.92 7.296 1.28 3.52 3.2 6.784 1.984 3.2 4.544 6.016 2.56 2.752 5.632 4.992 3.072 2.24 6.464 3.84 3.456 1.6 7.168 2.496 3.648 0.896 7.424 1.024 3.776 0.192 7.488-0.448 3.776-0.576 7.296-1.856 3.584-1.28 6.784-3.264 3.2-1.92 6.016-4.48 2.816-2.56 5.056-5.632l159.04-217.728q3.584-4.928 5.504-10.752 1.92-5.76 1.92-11.904 0-6.08-1.92-11.904-1.92-5.76-5.504-10.752L463.488 271.68q-2.24-3.072-5.056-5.632-2.752-2.56-6.016-4.48-3.2-1.984-6.784-3.328-3.52-1.28-7.296-1.856-3.712-0.576-7.488-0.448-3.84 0.192-7.424 1.088-3.712 0.896-7.168 2.496-3.392 1.6-6.4 3.84-3.136 2.176-5.696 4.992-2.56 2.752-4.48 6.016-1.984 3.2-3.264 6.784-1.28 3.52-1.92 7.296-0.576 3.712-0.384 7.488 0.128 3.84 1.024 7.488 0.896 3.648 2.496 7.04 1.6 3.456 3.84 6.528z m30.976-61.056q-3.776 0-7.488 0.704-3.712 0.768-7.168 2.24-3.52 1.408-6.656 3.52-3.2 2.112-5.824 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.52 6.656-1.472 3.52-2.176 7.232-0.768 3.712-0.768 7.488 0 3.776 0.768 7.488 0.704 3.712 2.176 7.232 1.408 3.456 3.52 6.592 2.112 3.2 4.8 5.824 2.688 2.688 5.76 4.8 3.2 2.112 6.72 3.52 3.456 1.472 7.168 2.176 3.712 0.768 7.488 0.768 3.84 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.408 6.592-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.112-3.2 3.52-6.656 1.472-3.52 2.24-7.232 0.704-3.712 0.704-7.488 0-3.84-0.704-7.488-0.768-3.712-2.24-7.232-1.408-3.456-3.52-6.592-2.112-3.2-4.8-5.824-2.624-2.688-5.76-4.8-3.2-2.112-6.656-3.52-3.52-1.472-7.232-2.24Q436.224 256 432.448 256z m0 435.392q-3.776 0-7.488 0.704-3.712 0.768-7.168 2.176-3.52 1.472-6.656 3.584-3.2 2.112-5.824 4.736-2.688 2.688-4.8 5.824-2.112 3.2-3.52 6.656-1.472 3.52-2.176 7.232-0.768 3.712-0.768 7.488 0 3.776 0.768 7.488 0.704 3.712 2.176 7.168 1.408 3.52 3.52 6.656 2.112 3.2 4.8 5.76 2.688 2.752 5.76 4.8 3.2 2.112 6.72 3.584 3.456 1.472 7.168 2.176 3.712 0.768 7.488 0.768 3.84 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.472 6.592-3.584 3.2-2.048 5.824-4.736 2.688-2.688 4.8-5.824 2.112-3.2 3.52-6.656 1.472-3.456 2.24-7.168 0.704-3.712 0.704-7.488 0-3.84-0.704-7.488-0.768-3.712-2.24-7.232-1.408-3.52-3.52-6.656-2.112-3.136-4.8-5.76-2.624-2.688-5.76-4.8-3.2-2.112-6.656-3.584-3.52-1.408-7.232-2.176-3.712-0.704-7.488-0.704z" p-id="4238"></path></svg>', Nt = '<svg t="1722595535853" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4551" width="32" height="32"><path d="M640 128H384c-170.496 0-256 85.504-256 256v256c0 170.496 85.504 256 256 256h256c170.496 0 256-85.504 256-256V384c0-170.496-85.504-256-256-256z m67.584 302.592c-2.048 4.608-4.608 8.704-8.192 12.288L506.88 634.88c-3.584 3.584-7.68 6.144-12.288 8.192-4.608 2.048-9.728 3.072-14.848 3.072s-10.24-1.024-14.848-3.072c-4.608-2.048-8.704-4.608-12.288-8.192l-96.256-96.256c-3.584-3.584-6.144-7.68-8.192-12.288-2.048-4.608-3.072-9.728-3.072-14.848 0-2.56 0-5.12 1.024-7.68 0.512-2.56 1.024-5.12 2.048-7.168 1.024-2.56 2.048-4.608 3.584-6.656 1.536-2.048 3.072-4.096 4.608-5.632 1.536-2.048 3.584-3.584 5.632-4.608 2.048-1.536 4.096-2.56 6.656-3.584 2.56-1.024 4.608-1.536 7.168-2.048 2.56-0.512 5.12-0.512 7.68-0.512 5.12 0 10.24 1.024 14.848 3.072 4.608 2.048 8.704 4.608 12.288 8.192l69.12 68.608L645.12 389.12c3.584-3.584 7.68-6.144 12.288-8.192 4.608-2.048 9.728-3.072 14.848-3.072 2.56 0 5.12 0 7.68 0.512s5.12 1.024 7.168 2.048c2.56 1.024 4.608 2.048 6.656 3.584 2.048 1.536 4.096 3.072 5.632 4.608 1.536 1.536 3.584 3.584 4.608 5.632 1.536 2.048 2.56 4.096 3.584 6.656 1.024 2.56 1.536 4.608 2.048 7.168 0.512 2.56 1.024 5.12 1.024 7.68 0 5.12-1.024 10.24-3.072 14.848z" p-id="4552"></path></svg>', kt = '<svg t="1724122044148" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4551" width="32" height="32"><path d="M707.648 401.28L489.28 560.704l22.656 30.976 22.656-30.976L316.16 401.216q-3.072-2.24-6.464-3.84-3.456-1.536-7.104-2.432-3.712-0.896-7.488-1.088-3.776-0.128-7.488 0.448-3.776 0.64-7.296 1.92-3.584 1.28-6.784 3.2-3.2 1.984-6.016 4.544-2.816 2.56-5.056 5.632-2.176 3.072-3.84 6.464-1.536 3.456-2.432 7.104-0.896 3.712-1.088 7.488-0.128 3.776 0.448 7.488 0.64 3.776 1.92 7.296 1.28 3.584 3.2 6.784 1.984 3.2 4.544 6.016 2.56 2.752 5.632 4.992l218.368 159.552q4.928 3.584 10.752 5.504 5.76 1.92 11.904 1.92 6.08 0 11.904-1.92 5.76-1.92 10.752-5.504l218.368-159.552q3.008-2.24 5.568-4.992 2.56-2.816 4.544-6.016 1.92-3.2 3.264-6.784 1.28-3.52 1.92-7.296 0.576-3.712 0.384-7.488-0.128-3.84-1.024-7.488-0.896-3.648-2.496-7.04-1.6-3.456-3.84-6.528-2.24-3.072-4.992-5.632-2.816-2.56-6.016-4.48-3.2-1.984-6.784-3.328-3.584-1.28-7.296-1.856-3.712-0.64-7.488-0.448-3.84 0.192-7.488 1.088-3.648 0.896-7.04 2.496-3.456 1.536-6.528 3.84z m61.056 30.976q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.472-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.72-3.584-3.456-1.408-7.168-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.656 3.584-3.136 2.112-5.76 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.584 6.656-1.408 3.52-2.176 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.176 7.168 1.472 3.52 3.584 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.168-2.176 3.52-1.408 6.656-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.048-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z m-436.736 0q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.408-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.656-3.584-3.52-1.408-7.232-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.592 3.584-3.2 2.112-5.824 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.52 6.656-1.472 3.52-2.24 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.24 7.168 1.408 3.52 3.52 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.408 6.592-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.112-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z" p-id="4552"></path></svg>', Rt = '<svg t="1755138507987" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5079" width="200" height="200"><path d="M512 938.688a42.688 42.688 0 0 1-35.072-18.432l-192-277.312A42.56 42.56 0 0 1 320 576h384a42.752 42.752 0 0 1 35.072 66.944l-192 277.312a42.688 42.688 0 0 1-35.072 18.432" fill="currentColor" p-id="2016"></path><path d="M704 448H320a42.752 42.752 0 0 1-35.072-66.944l192-277.312c16-23.04 54.208-23.04 70.144 0l192 277.312A42.56 42.56 0 0 1 704 448" fill="currentColor" p-id="2015"></path></svg>', _e = Rt.replace('fill="currentColor" p-id="2016"', 'fill="#bec4c7" p-id="2016"'), Se = Rt.replace('fill="currentColor" p-id="2015"', 'fill="#bec4c7" p-id="2015"');
|
|
2997
|
-
class
|
|
3012
|
+
const nt = '<svg t="1724122015492" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4237" width="32" height="32"><path d="M401.472 316.992l159.04 217.664L591.488 512l-30.976-22.656-159.04 217.728q-2.24 3.008-3.84 6.464-1.6 3.456-2.496 7.104-0.896 3.648-1.024 7.424-0.192 3.84 0.384 7.552 0.64 3.712 1.92 7.296 1.28 3.52 3.2 6.784 1.984 3.2 4.544 6.016 2.56 2.752 5.632 4.992 3.072 2.24 6.464 3.84 3.456 1.6 7.168 2.496 3.648 0.896 7.424 1.024 3.776 0.192 7.488-0.448 3.776-0.576 7.296-1.856 3.584-1.28 6.784-3.264 3.2-1.92 6.016-4.48 2.816-2.56 5.056-5.632l159.04-217.728q3.584-4.928 5.504-10.752 1.92-5.76 1.92-11.904 0-6.08-1.92-11.904-1.92-5.76-5.504-10.752L463.488 271.68q-2.24-3.072-5.056-5.632-2.752-2.56-6.016-4.48-3.2-1.984-6.784-3.328-3.52-1.28-7.296-1.856-3.712-0.576-7.488-0.448-3.84 0.192-7.424 1.088-3.712 0.896-7.168 2.496-3.392 1.6-6.4 3.84-3.136 2.176-5.696 4.992-2.56 2.752-4.48 6.016-1.984 3.2-3.264 6.784-1.28 3.52-1.92 7.296-0.576 3.712-0.384 7.488 0.128 3.84 1.024 7.488 0.896 3.648 2.496 7.04 1.6 3.456 3.84 6.528z m30.976-61.056q-3.776 0-7.488 0.704-3.712 0.768-7.168 2.24-3.52 1.408-6.656 3.52-3.2 2.112-5.824 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.52 6.656-1.472 3.52-2.176 7.232-0.768 3.712-0.768 7.488 0 3.776 0.768 7.488 0.704 3.712 2.176 7.232 1.408 3.456 3.52 6.592 2.112 3.2 4.8 5.824 2.688 2.688 5.76 4.8 3.2 2.112 6.72 3.52 3.456 1.472 7.168 2.176 3.712 0.768 7.488 0.768 3.84 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.408 6.592-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.112-3.2 3.52-6.656 1.472-3.52 2.24-7.232 0.704-3.712 0.704-7.488 0-3.84-0.704-7.488-0.768-3.712-2.24-7.232-1.408-3.456-3.52-6.592-2.112-3.2-4.8-5.824-2.624-2.688-5.76-4.8-3.2-2.112-6.656-3.52-3.52-1.472-7.232-2.24Q436.224 256 432.448 256z m0 435.392q-3.776 0-7.488 0.704-3.712 0.768-7.168 2.176-3.52 1.472-6.656 3.584-3.2 2.112-5.824 4.736-2.688 2.688-4.8 5.824-2.112 3.2-3.52 6.656-1.472 3.52-2.176 7.232-0.768 3.712-0.768 7.488 0 3.776 0.768 7.488 0.704 3.712 2.176 7.168 1.408 3.52 3.52 6.656 2.112 3.2 4.8 5.76 2.688 2.752 5.76 4.8 3.2 2.112 6.72 3.584 3.456 1.472 7.168 2.176 3.712 0.768 7.488 0.768 3.84 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.472 6.592-3.584 3.2-2.048 5.824-4.736 2.688-2.688 4.8-5.824 2.112-3.2 3.52-6.656 1.472-3.456 2.24-7.168 0.704-3.712 0.704-7.488 0-3.84-0.704-7.488-0.768-3.712-2.24-7.232-1.408-3.52-3.52-6.656-2.112-3.136-4.8-5.76-2.624-2.688-5.76-4.8-3.2-2.112-6.656-3.584-3.52-1.408-7.232-2.176-3.712-0.704-7.488-0.704z" p-id="4238"></path></svg>', kt = '<svg t="1722595535853" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4551" width="32" height="32"><path d="M640 128H384c-170.496 0-256 85.504-256 256v256c0 170.496 85.504 256 256 256h256c170.496 0 256-85.504 256-256V384c0-170.496-85.504-256-256-256z m67.584 302.592c-2.048 4.608-4.608 8.704-8.192 12.288L506.88 634.88c-3.584 3.584-7.68 6.144-12.288 8.192-4.608 2.048-9.728 3.072-14.848 3.072s-10.24-1.024-14.848-3.072c-4.608-2.048-8.704-4.608-12.288-8.192l-96.256-96.256c-3.584-3.584-6.144-7.68-8.192-12.288-2.048-4.608-3.072-9.728-3.072-14.848 0-2.56 0-5.12 1.024-7.68 0.512-2.56 1.024-5.12 2.048-7.168 1.024-2.56 2.048-4.608 3.584-6.656 1.536-2.048 3.072-4.096 4.608-5.632 1.536-2.048 3.584-3.584 5.632-4.608 2.048-1.536 4.096-2.56 6.656-3.584 2.56-1.024 4.608-1.536 7.168-2.048 2.56-0.512 5.12-0.512 7.68-0.512 5.12 0 10.24 1.024 14.848 3.072 4.608 2.048 8.704 4.608 12.288 8.192l69.12 68.608L645.12 389.12c3.584-3.584 7.68-6.144 12.288-8.192 4.608-2.048 9.728-3.072 14.848-3.072 2.56 0 5.12 0 7.68 0.512s5.12 1.024 7.168 2.048c2.56 1.024 4.608 2.048 6.656 3.584 2.048 1.536 4.096 3.072 5.632 4.608 1.536 1.536 3.584 3.584 4.608 5.632 1.536 2.048 2.56 4.096 3.584 6.656 1.024 2.56 1.536 4.608 2.048 7.168 0.512 2.56 1.024 5.12 1.024 7.68 0 5.12-1.024 10.24-3.072 14.848z" p-id="4552"></path></svg>', Bt = '<svg t="1724122044148" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4551" width="32" height="32"><path d="M707.648 401.28L489.28 560.704l22.656 30.976 22.656-30.976L316.16 401.216q-3.072-2.24-6.464-3.84-3.456-1.536-7.104-2.432-3.712-0.896-7.488-1.088-3.776-0.128-7.488 0.448-3.776 0.64-7.296 1.92-3.584 1.28-6.784 3.2-3.2 1.984-6.016 4.544-2.816 2.56-5.056 5.632-2.176 3.072-3.84 6.464-1.536 3.456-2.432 7.104-0.896 3.712-1.088 7.488-0.128 3.776 0.448 7.488 0.64 3.776 1.92 7.296 1.28 3.584 3.2 6.784 1.984 3.2 4.544 6.016 2.56 2.752 5.632 4.992l218.368 159.552q4.928 3.584 10.752 5.504 5.76 1.92 11.904 1.92 6.08 0 11.904-1.92 5.76-1.92 10.752-5.504l218.368-159.552q3.008-2.24 5.568-4.992 2.56-2.816 4.544-6.016 1.92-3.2 3.264-6.784 1.28-3.52 1.92-7.296 0.576-3.712 0.384-7.488-0.128-3.84-1.024-7.488-0.896-3.648-2.496-7.04-1.6-3.456-3.84-6.528-2.24-3.072-4.992-5.632-2.816-2.56-6.016-4.48-3.2-1.984-6.784-3.328-3.584-1.28-7.296-1.856-3.712-0.64-7.488-0.448-3.84 0.192-7.488 1.088-3.648 0.896-7.04 2.496-3.456 1.536-6.528 3.84z m61.056 30.976q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.472-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.72-3.584-3.456-1.408-7.168-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.656 3.584-3.136 2.112-5.76 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.584 6.656-1.408 3.52-2.176 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.176 7.168 1.472 3.52 3.584 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.168-2.176 3.52-1.408 6.656-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.048-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z m-436.736 0q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.408-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.656-3.584-3.52-1.408-7.232-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.592 3.584-3.2 2.112-5.824 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.52 6.656-1.472 3.52-2.24 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.24 7.168 1.408 3.52 3.52 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.408 6.592-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.112-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z" p-id="4552"></path></svg>', It = '<svg t="1755138507987" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5079" width="200" height="200"><path d="M512 938.688a42.688 42.688 0 0 1-35.072-18.432l-192-277.312A42.56 42.56 0 0 1 320 576h384a42.752 42.752 0 0 1 35.072 66.944l-192 277.312a42.688 42.688 0 0 1-35.072 18.432" fill="currentColor" p-id="2016"></path><path d="M704 448H320a42.752 42.752 0 0 1-35.072-66.944l192-277.312c16-23.04 54.208-23.04 70.144 0l192 277.312A42.56 42.56 0 0 1 704 448" fill="currentColor" p-id="2015"></path></svg>', Se = It.replace('fill="currentColor" p-id="2016"', 'fill="#bec4c7" p-id="2016"'), Te = It.replace('fill="currentColor" p-id="2015"', 'fill="#bec4c7" p-id="2015"'), Zt = '<svg t="1724133395728" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2893" width="32" height="32"><path d="M512 226.8476541a19.82487759 19.82487759 0 0 1 14.66497778 5.70304692c3.80203107 3.82918865 5.70304692 8.71751457 5.70304693 14.66497779v122.20814825a19.82487759 19.82487759 0 0 1-5.70304693 14.66497778 19.82487759 19.82487759 0 0 1-14.66497778 5.70304691 19.82487759 19.82487759 0 0 1-14.66497778-5.70304691 19.82487759 19.82487759 0 0 1-5.70304693-14.66497778v-122.20814825a19.82487759 19.82487759 0 0 1 5.70304693-14.66497779 19.82487759 19.82487759 0 0 1 14.66497778-5.70304692z m0 407.36049415a19.82487759 19.82487759 0 0 1 14.66497778 5.70304691c3.80203107 3.82918865 5.70304692 8.71751457 5.70304693 14.66497778v122.20814827a19.82487759 19.82487759 0 0 1-5.70304693 14.66497776 19.82487759 19.82487759 0 0 1-14.66497778 5.70304693 19.82487759 19.82487759 0 0 1-14.66497778-5.70304693 19.82487759 19.82487759 0 0 1-5.70304693-14.66497776v-122.20814827a19.82487759 19.82487759 0 0 1 5.70304693-14.66497778 19.82487759 19.82487759 0 0 1 14.66497778-5.70304691zM797.1523459 512a19.82487759 19.82487759 0 0 1-5.70304692 14.66497778 19.82487759 19.82487759 0 0 1-14.66497779 5.70304693h-122.20814825a19.82487759 19.82487759 0 0 1-14.66497778-5.70304693 19.82487759 19.82487759 0 0 1-5.70304691-14.66497778 19.82487759 19.82487759 0 0 1 5.70304691-14.66497778 19.82487759 19.82487759 0 0 1 14.66497778-5.70304693h122.20814825a19.82487759 19.82487759 0 0 1 14.66497779 5.70304693c3.80203107 3.82918865 5.70304692 8.71751457 5.70304692 14.66497778z m-407.36049415 0a19.82487759 19.82487759 0 0 1-5.70304691 14.66497778 19.82487759 19.82487759 0 0 1-14.66497778 5.70304693h-122.20814827a19.82487759 19.82487759 0 0 1-14.66497776-5.70304693 19.82487759 19.82487759 0 0 1-5.70304693-14.66497778 19.82487759 19.82487759 0 0 1 5.70304693-14.66497778 19.82487759 19.82487759 0 0 1 14.66497776-5.70304693h122.20814827a19.82487759 19.82487759 0 0 1 14.66497778 5.70304693c3.80203107 3.82918865 5.70304692 8.71751457 5.70304691 14.66497778zM310.22076878 310.22076878a21.29137537 21.29137537 0 0 1 14.66497779-5.70304693c5.51294514 0 10.18401235 1.90101585 14.01320099 5.70304693l86.55052591 86.57768347a20.91117183 20.91117183 0 0 1 5.73020449 14.31193182 19.28172983 19.28172983 0 0 1-6.05609289 14.013201 19.11878565 19.11878565 0 0 1-14.013201 6.05609289 20.96548698 20.96548698 0 0 1-14.31193182-5.70304692L310.22076878 338.87178998a19.06447114 19.06447114 0 0 1-5.70304693-14.01320099c0-5.54010272 1.90101585-10.42842865 5.70304693-14.66497778z m288.32975775 288.32975775a19.79772001 19.79772001 0 0 1 14.3390894-6.35482371c5.29568642 0 10.04822572 2.11827457 14.31193182 6.38198066l86.57768347 86.55052651c3.80203107 3.80203107 5.70304692 8.47309828 5.70304691 14.01320102a19.55330372 19.55330372 0 0 1-6.05609225 14.31193182 19.66193339 19.66193339 0 0 1-14.31193245 6.05609288 19.01015661 19.01015661 0 0 1-14.01320099-5.70304692l-86.55052591-86.57768347a19.79772001 19.79772001 0 0 1-6.38198129-14.31193245c0-5.29568642 2.11827457-10.07538268 6.38198129-14.33908939zM713.77923122 310.22076878c3.80203107 4.26370672 5.70304692 9.15203265 5.70304693 14.66497779s-1.90101585 10.18401235-5.70304693 14.01320099l-86.57768347 86.55052591a20.91117183 20.91117183 0 0 1-14.31193182 5.73020449 19.28172983 19.28172983 0 0 1-14.013201-6.05609289 19.11878565 19.11878565 0 0 1-6.05609289-14.013201c0-5.29568642 1.90101585-10.07538268 5.70304692-14.31193182l86.57768348-86.57768347c3.80203107-3.80203107 8.50025585-5.70304692 14.01320099-5.70304693 5.54010272 0 10.40127108 1.90101585 14.66497779 5.70304693zM425.44947347 598.57768347a19.79772001 19.79772001 0 0 1 6.35482371 14.33908939c0 5.29568642-2.11827457 10.04822572-6.38198066 14.31193245L338.89894756 713.77923122a19.06447114 19.06447114 0 0 1-14.01320099 5.70304693 19.55330372 19.55330372 0 0 1-14.31193245-6.05609227 19.68909035 19.68909035 0 0 1-6.05609227-14.31193245 19.01015661 19.01015661 0 0 1 5.70304693-14.01320099l86.57768347-86.55052591a19.79772001 19.79772001 0 0 1 14.31193182-6.38198129c5.29568642 0 10.07538268 2.11827457 14.3390894 6.38198129z" fill="#000000" fill-opacity=".65" p-id="2894"></path></svg>';
|
|
3013
|
+
class Oe {
|
|
2998
3014
|
constructor(t) {
|
|
2999
3015
|
n(this, "ctx");
|
|
3000
3016
|
n(this, "list", [
|
|
@@ -3002,21 +3018,21 @@ class Te {
|
|
|
3002
3018
|
name: "loading",
|
|
3003
3019
|
configName: "LOADING_ICON_SVG",
|
|
3004
3020
|
configColorName: "LOADING_ICON_COLOR",
|
|
3005
|
-
svg:
|
|
3021
|
+
svg: Zt,
|
|
3006
3022
|
color: "#4E5969"
|
|
3007
3023
|
},
|
|
3008
3024
|
{
|
|
3009
3025
|
name: "expand",
|
|
3010
3026
|
configName: "EXPAND_ICON_SVG",
|
|
3011
3027
|
configColorName: "EXPAND_ICON_COLOR",
|
|
3012
|
-
svg:
|
|
3028
|
+
svg: nt,
|
|
3013
3029
|
color: "#4E5969"
|
|
3014
3030
|
},
|
|
3015
3031
|
{
|
|
3016
3032
|
name: "shrink",
|
|
3017
3033
|
configName: "SHRINK_ICON_SVG",
|
|
3018
3034
|
configColorName: "SHRINK_ICON_COLOR",
|
|
3019
|
-
svg:
|
|
3035
|
+
svg: Bt,
|
|
3020
3036
|
color: "#4E5969"
|
|
3021
3037
|
},
|
|
3022
3038
|
{
|
|
@@ -3030,7 +3046,7 @@ class Te {
|
|
|
3030
3046
|
name: "checkbox-check",
|
|
3031
3047
|
configName: "CHECKBOX_CHECK_SVG",
|
|
3032
3048
|
configColorName: "CHECKBOX_COLOR",
|
|
3033
|
-
svg:
|
|
3049
|
+
svg: kt,
|
|
3034
3050
|
color: "rgb(82,146,247)"
|
|
3035
3051
|
},
|
|
3036
3052
|
{
|
|
@@ -3043,7 +3059,7 @@ class Te {
|
|
|
3043
3059
|
{
|
|
3044
3060
|
name: "checkbox-check-disabled",
|
|
3045
3061
|
configName: "CHECKBOX_CHECK_DISABLED_SVG",
|
|
3046
|
-
svg:
|
|
3062
|
+
svg: kt,
|
|
3047
3063
|
color: "#DDE0EA"
|
|
3048
3064
|
},
|
|
3049
3065
|
{
|
|
@@ -3064,27 +3080,27 @@ class Te {
|
|
|
3064
3080
|
name: "icon-select",
|
|
3065
3081
|
configName: "ICON_SELECT_SVG",
|
|
3066
3082
|
configColorName: "ICON_SELECT_COLOR",
|
|
3067
|
-
svg:
|
|
3083
|
+
svg: Bt,
|
|
3068
3084
|
color: "#4E5969"
|
|
3069
3085
|
},
|
|
3070
3086
|
{
|
|
3071
3087
|
name: "sort-asc",
|
|
3072
3088
|
configName: "SORT_ASC_ICON_SVG",
|
|
3073
3089
|
configColorName: "SORT_ICON_COLOR",
|
|
3074
|
-
svg:
|
|
3090
|
+
svg: Se,
|
|
3075
3091
|
color: "rgb(82,146,247)"
|
|
3076
3092
|
},
|
|
3077
3093
|
{
|
|
3078
3094
|
name: "sort-desc",
|
|
3079
3095
|
configName: "SORT_DESC_ICON_SVG",
|
|
3080
3096
|
configColorName: "SORT_ICON_COLOR",
|
|
3081
|
-
svg:
|
|
3097
|
+
svg: Te,
|
|
3082
3098
|
color: "rgb(82,146,247)"
|
|
3083
3099
|
},
|
|
3084
3100
|
{
|
|
3085
3101
|
name: "sort-default",
|
|
3086
3102
|
configName: "SORTABLE_ICON_SVG",
|
|
3087
|
-
svg:
|
|
3103
|
+
svg: It,
|
|
3088
3104
|
color: "#bec4c7"
|
|
3089
3105
|
}
|
|
3090
3106
|
]);
|
|
@@ -3147,7 +3163,7 @@ class Te {
|
|
|
3147
3163
|
return this.list.find((e) => e.name === t);
|
|
3148
3164
|
}
|
|
3149
3165
|
}
|
|
3150
|
-
class
|
|
3166
|
+
class mt extends qt {
|
|
3151
3167
|
constructor(e, i, s, o, r, a, l) {
|
|
3152
3168
|
super(e, s, o, r, a, "header", l.fixed);
|
|
3153
3169
|
n(this, "align");
|
|
@@ -3209,7 +3225,7 @@ class wt extends jt {
|
|
|
3209
3225
|
n(this, "drawSortImageHeight", 0);
|
|
3210
3226
|
n(this, "drawSortImageName", "");
|
|
3211
3227
|
n(this, "drawSortImageSource");
|
|
3212
|
-
this.ctx = e, this.x = s, this.y = o, this.width = r, this.height = a, this.visibleWidth = r, this.visibleHeight = a, this.colIndex = i, this.key = l.key, this.minWidth = l.minWidth, this.maxWidth = l.maxWidth, this.hide = (typeof l.hide == "function" ? l.hide(l) : l.hide) || !1, this.type = l.type || "", this.editorType = l.editorType || "text", this.hideHeaderSelection = l.hideHeaderSelection || !1, this.align = l.headerAlign || l.align || this.ctx.config.COLUMNS_ALIGN, this.verticalAlign = l.headerVerticalAlign || l.verticalAlign || this.ctx.config.COLUMNS_VERTICAL_ALIGN, this.fixed = l.fixed || "", this.level = l.level || 0, this.operation = l.operation || !1, this.text = l.title, this.column = l, this.colspan = l.colspan || 1, this.widthFillDisable = l.widthFillDisable || !1, this.rowspan = l.rowspan || 1, this.rules = l.rules, this.readonly = l.readonly || !1, this.required = l.required || !1, this.sortIconName = l.sortIconName || "sort-default", this.sortAscIconName = l.sortAscIconName || "sort-asc", this.sortDescIconName = l.sortDescIconName || "sort-desc", this.rowKey =
|
|
3228
|
+
this.ctx = e, this.x = s, this.y = o, this.width = r, this.height = a, this.visibleWidth = r, this.visibleHeight = a, this.colIndex = i, this.key = l.key, this.minWidth = l.minWidth, this.maxWidth = l.maxWidth, this.hide = (typeof l.hide == "function" ? l.hide(l) : l.hide) || !1, this.type = l.type || "", this.editorType = l.editorType || "text", this.hideHeaderSelection = l.hideHeaderSelection || !1, this.align = l.headerAlign || l.align || this.ctx.config.COLUMNS_ALIGN, this.verticalAlign = l.headerVerticalAlign || l.verticalAlign || this.ctx.config.COLUMNS_VERTICAL_ALIGN, this.fixed = l.fixed || "", this.level = l.level || 0, this.operation = l.operation || !1, this.text = l.title, this.column = l, this.colspan = l.colspan || 1, this.widthFillDisable = l.widthFillDisable || !1, this.rowspan = l.rowspan || 1, this.rules = l.rules, this.readonly = l.readonly || !1, this.required = l.required || !1, this.sortIconName = l.sortIconName || "sort-default", this.sortAscIconName = l.sortAscIconName || "sort-asc", this.sortDescIconName = l.sortDescIconName || "sort-desc", this.rowKey = $t(), this.overflowTooltipShow = l.overflowTooltipHeaderShow !== !1, this.hasChildren = l.children && l.children.length > 0 || !1, this.render = l.renderHeader, this.maxLineClampHeader = l.maxLineClampHeader || "auto";
|
|
3213
3229
|
}
|
|
3214
3230
|
/**
|
|
3215
3231
|
* 是否可见,覆盖基类方法,表头是跟y滚动条没有关系的所以不需要加滚动参数
|
|
@@ -3229,13 +3245,14 @@ class wt extends jt {
|
|
|
3229
3245
|
const { HEADER_CELL_STYLE_METHOD: e, HEADER_BG_COLOR: i, HEADER_TEXT_COLOR: s } = this.ctx.config;
|
|
3230
3246
|
let o = i, r = s;
|
|
3231
3247
|
if (typeof e == "function") {
|
|
3232
|
-
const
|
|
3248
|
+
const c = e, { backgroundColor: d, color: f, font: x } = c({
|
|
3233
3249
|
colIndex: this.colIndex,
|
|
3234
3250
|
column: this.column
|
|
3235
3251
|
}) || {};
|
|
3236
|
-
|
|
3252
|
+
d && (o = d), f && (r = f), x && (this.drawTextFont = x);
|
|
3237
3253
|
}
|
|
3238
|
-
|
|
3254
|
+
const { colKey: a, type: l } = this.ctx.finderBar;
|
|
3255
|
+
l === "header" && a === this.key && (o = this.ctx.config.FINDER_CELL_BG_COLOR), this.drawCellBgColor = o, this.drawTextColor = r;
|
|
3239
3256
|
}
|
|
3240
3257
|
update() {
|
|
3241
3258
|
this.updateContainer(), this.displayText = this.getText(), this.drawX = this.getDrawX(), this.drawY = this.getDrawY(), this.drawTextX = this.drawX, this.drawTextY = this.drawY, this.drawTextWidth = this.width, this.drawTextHeight = this.height, this.updateStyle();
|
|
@@ -3354,7 +3371,7 @@ class wt extends jt {
|
|
|
3354
3371
|
};
|
|
3355
3372
|
}
|
|
3356
3373
|
}
|
|
3357
|
-
class
|
|
3374
|
+
class Le {
|
|
3358
3375
|
constructor(t) {
|
|
3359
3376
|
n(this, "ctx");
|
|
3360
3377
|
n(this, "visibleHoverCell");
|
|
@@ -3475,7 +3492,7 @@ class Oe {
|
|
|
3475
3492
|
t.drawSelectionImageWidth,
|
|
3476
3493
|
t.drawSelectionImageHeight
|
|
3477
3494
|
))
|
|
3478
|
-
if (t instanceof
|
|
3495
|
+
if (t instanceof mt)
|
|
3479
3496
|
t.drawSelectionImageName === "checkbox-uncheck" || t.drawSelectionImageName === "checkbox-indeterminate" ? this.ctx.database.toggleAllSelection() : t.drawSelectionImageName === "checkbox-check" && this.ctx.database.clearSelection(!0);
|
|
3480
3497
|
else {
|
|
3481
3498
|
if (!this.ctx.database.getRowSelectable(t.rowKey))
|
|
@@ -3540,7 +3557,7 @@ class Oe {
|
|
|
3540
3557
|
*/
|
|
3541
3558
|
imageEnterAndLeave(t, e) {
|
|
3542
3559
|
const { offsetY: i, offsetX: s } = this.ctx.getOffset(e), o = i, r = s;
|
|
3543
|
-
if (t instanceof
|
|
3560
|
+
if (t instanceof mt) {
|
|
3544
3561
|
if (t.drawSelectionImageSource && this.isInsideElement(
|
|
3545
3562
|
r,
|
|
3546
3563
|
o,
|
|
@@ -3564,7 +3581,7 @@ class Oe {
|
|
|
3564
3581
|
return;
|
|
3565
3582
|
}
|
|
3566
3583
|
}
|
|
3567
|
-
if (t instanceof
|
|
3584
|
+
if (t instanceof vt) {
|
|
3568
3585
|
if (t.drawSelectionImageSource && this.isInsideElement(
|
|
3569
3586
|
r,
|
|
3570
3587
|
o,
|
|
@@ -3661,7 +3678,7 @@ class Oe {
|
|
|
3661
3678
|
this.resizeObserver.unobserve(this.ctx.stageElement), this.mutationObserver.disconnect();
|
|
3662
3679
|
}
|
|
3663
3680
|
}
|
|
3664
|
-
class
|
|
3681
|
+
class Me {
|
|
3665
3682
|
constructor(t, e) {
|
|
3666
3683
|
n(this, "eventBus");
|
|
3667
3684
|
n(this, "eventBrowser");
|
|
@@ -3704,6 +3721,8 @@ class Le {
|
|
|
3704
3721
|
// 选择行中
|
|
3705
3722
|
n(this, "dragHeaderIng", !1);
|
|
3706
3723
|
// 拖拽表头中
|
|
3724
|
+
n(this, "finding", !1);
|
|
3725
|
+
// 查找中
|
|
3707
3726
|
n(this, "adjustPositioning", !1);
|
|
3708
3727
|
// 调整位置中
|
|
3709
3728
|
n(this, "contextMenuIng", !1);
|
|
@@ -3787,6 +3806,12 @@ class Le {
|
|
|
3787
3806
|
xArr: [-1, -1],
|
|
3788
3807
|
yArr: [-1, -1]
|
|
3789
3808
|
});
|
|
3809
|
+
n(this, "finderBar", {
|
|
3810
|
+
text: "",
|
|
3811
|
+
rowIndex: -1,
|
|
3812
|
+
colIndex: -1,
|
|
3813
|
+
type: "body"
|
|
3814
|
+
});
|
|
3790
3815
|
n(this, "database");
|
|
3791
3816
|
n(this, "history");
|
|
3792
3817
|
n(this, "config");
|
|
@@ -3800,10 +3825,10 @@ class Le {
|
|
|
3800
3825
|
loadingElement: c,
|
|
3801
3826
|
contextMenuElement: d
|
|
3802
3827
|
} = t;
|
|
3803
|
-
this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = o, this.overlayerElement = r, this.editorElement = a, this.emptyElement = l, this.loadingElement = c, this.contextMenuElement = d, this.config = new
|
|
3828
|
+
this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = o, this.overlayerElement = r, this.editorElement = a, this.emptyElement = l, this.loadingElement = c, this.contextMenuElement = d, this.config = new Nt(e.config || {}), this.eventBus = new Re(), this.eventBrowser = new Ie(this), this.eventTable = new Le(this), this.paint = new _e(this.canvasElement), this.database = new be(this, e), this.history = new ve(this), this.icons = new Oe(this);
|
|
3804
3829
|
}
|
|
3805
3830
|
setConfig(t) {
|
|
3806
|
-
this.config = new
|
|
3831
|
+
this.config = new Nt(t);
|
|
3807
3832
|
}
|
|
3808
3833
|
setItemValueByEditor(t, e, i, s = !0, o = !0, r = !0) {
|
|
3809
3834
|
if (this.config.ENABLE_MERGE_CELL_LINK) {
|
|
@@ -4061,7 +4086,7 @@ class Xt {
|
|
|
4061
4086
|
}), this.ctx.scrollerFocus = this.isFocus;
|
|
4062
4087
|
}
|
|
4063
4088
|
}
|
|
4064
|
-
class
|
|
4089
|
+
class Ae {
|
|
4065
4090
|
// 垂直滚动定时器
|
|
4066
4091
|
constructor(t) {
|
|
4067
4092
|
n(this, "ctx");
|
|
@@ -4082,6 +4107,8 @@ class Me {
|
|
|
4082
4107
|
this.setScrollX(e);
|
|
4083
4108
|
}), this.ctx.on("setScrollY", (e) => {
|
|
4084
4109
|
this.setScrollY(e);
|
|
4110
|
+
}), this.ctx.on("scrollToIndex", (e, i) => {
|
|
4111
|
+
this.scrollToIndex(e, i);
|
|
4085
4112
|
}), this.ctx.on("cellHeaderMousedown", () => {
|
|
4086
4113
|
this.mousedownHeader = !0;
|
|
4087
4114
|
}), this.ctx.on("startAdjustPosition", (e) => {
|
|
@@ -4128,11 +4155,14 @@ class Me {
|
|
|
4128
4155
|
}
|
|
4129
4156
|
scrollToColIndex(t) {
|
|
4130
4157
|
const { header: e } = this.ctx, i = e.leafCellHeaders.find((s) => s.colIndex === t);
|
|
4131
|
-
i &&
|
|
4158
|
+
i && this.setScrollX(i.x - e.visibleWidth / 2);
|
|
4132
4159
|
}
|
|
4133
4160
|
scrollToRowIndex(t) {
|
|
4134
4161
|
const { body: e, database: i } = this.ctx, { top: s } = i.getPositionForRowIndex(t);
|
|
4135
|
-
|
|
4162
|
+
this.setScrollY(s - e.visibleHeight / 2);
|
|
4163
|
+
}
|
|
4164
|
+
scrollToIndex(t, e) {
|
|
4165
|
+
this.scrollToRowIndex(t), this.scrollToColIndex(e);
|
|
4136
4166
|
}
|
|
4137
4167
|
scrollToRowKey(t) {
|
|
4138
4168
|
const { body: e, database: i } = this.ctx, s = i.getRowIndexForRowKey(t);
|
|
@@ -4171,7 +4201,7 @@ class Me {
|
|
|
4171
4201
|
t && (this.adjustPositionX = "", this.timerX && (clearInterval(this.timerX), this.timerX = 0)), e && (this.adjustPositionY = "", this.timerY && (clearInterval(this.timerY), this.timerY = 0));
|
|
4172
4202
|
}
|
|
4173
4203
|
}
|
|
4174
|
-
class
|
|
4204
|
+
class He {
|
|
4175
4205
|
constructor(t, e) {
|
|
4176
4206
|
n(this, "root");
|
|
4177
4207
|
n(this, "key");
|
|
@@ -4211,7 +4241,7 @@ class Ae {
|
|
|
4211
4241
|
return null;
|
|
4212
4242
|
}
|
|
4213
4243
|
}
|
|
4214
|
-
class
|
|
4244
|
+
class De {
|
|
4215
4245
|
constructor(t) {
|
|
4216
4246
|
n(this, "ctx");
|
|
4217
4247
|
// 上下文
|
|
@@ -4257,7 +4287,7 @@ class He {
|
|
|
4257
4287
|
n(this, "renderFixedCellHeaders", []);
|
|
4258
4288
|
this.ctx = t, this.ctx.on(
|
|
4259
4289
|
"resetHeader",
|
|
4260
|
-
|
|
4290
|
+
bt(() => {
|
|
4261
4291
|
this.init(), this.ctx.clearSelector(), this.ctx.emit("draw");
|
|
4262
4292
|
}, 100)
|
|
4263
4293
|
), this.init(), this.initResizeColumn(), this.initDragColumn();
|
|
@@ -4270,13 +4300,13 @@ class He {
|
|
|
4270
4300
|
const f = this.ctx.database.getColumns();
|
|
4271
4301
|
this.columns = f;
|
|
4272
4302
|
}
|
|
4273
|
-
this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [], this.
|
|
4303
|
+
this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [], this.visibleColumns = Gt(this.columns);
|
|
4274
4304
|
const s = ot(this.visibleColumns), o = J(this.visibleColumns);
|
|
4275
|
-
this.height = e * s, this.width = o.reduce((f, x) => {
|
|
4305
|
+
this.height = e * s, this.visibleHeight = this.height, this.width = o.reduce((f, x) => {
|
|
4276
4306
|
const u = x.width || 100, { maxWidth: g, minWidth: m } = x;
|
|
4277
4307
|
return g && u > g ? f + g : m && u < m ? f + m : f + u;
|
|
4278
4308
|
}, 0), this.columnIndex = 0, this.resizeNum = 0;
|
|
4279
|
-
const r =
|
|
4309
|
+
const r = xe(rt(this.visibleColumns, s));
|
|
4280
4310
|
this.render(r, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
|
|
4281
4311
|
const a = this.ctx.containerElement.getBoundingClientRect();
|
|
4282
4312
|
this.resizeNum > 0 ? this.ctx.stageWidth = Math.floor(a.width) : this.ctx.stageWidth = Math.min(
|
|
@@ -4341,7 +4371,7 @@ class He {
|
|
|
4341
4371
|
if (this.dragingCell && this.dragTarget) {
|
|
4342
4372
|
const t = (c, d = {}) => (c.forEach((f, x) => {
|
|
4343
4373
|
f.children && t(f.children, d), d[f.key] = x;
|
|
4344
|
-
}), d), e = this.ctx.database.getColumns(), i = rt(e, ot(e)), s = new
|
|
4374
|
+
}), d), e = this.ctx.database.getColumns(), i = rt(e, ot(e)), s = new He(i, {
|
|
4345
4375
|
key: "key",
|
|
4346
4376
|
// 节点唯一标识字段(对应我们之前的field)
|
|
4347
4377
|
childrenKey: "children"
|
|
@@ -4447,7 +4477,7 @@ class He {
|
|
|
4447
4477
|
const a = t[r], l = o * (a.rowspan || 0), c = o * (a.level || 0);
|
|
4448
4478
|
let { minWidth: d, maxWidth: f } = a, x = a.width || 100;
|
|
4449
4479
|
d && x < d && (x = d), f && x > f && (x = f), a.children && (x = J(a.children).reduce((m, w) => m + ((w == null ? void 0 : w.width) || 100), 0));
|
|
4450
|
-
const u = new
|
|
4480
|
+
const u = new mt(this.ctx, this.columnIndex, s, c, x, l, a);
|
|
4451
4481
|
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;
|
|
4452
4482
|
}
|
|
4453
4483
|
}
|
|
@@ -4566,7 +4596,7 @@ class He {
|
|
|
4566
4596
|
}), this.drawBottomLine(), this.drawTipLine(), this.drawDragTip();
|
|
4567
4597
|
}
|
|
4568
4598
|
}
|
|
4569
|
-
class
|
|
4599
|
+
class Jt {
|
|
4570
4600
|
constructor(t, e, i = 0, s = 0, o = 0, r = 0, a, l = "body") {
|
|
4571
4601
|
n(this, "ctx");
|
|
4572
4602
|
n(this, "x", 0);
|
|
@@ -4587,7 +4617,7 @@ class Zt {
|
|
|
4587
4617
|
update() {
|
|
4588
4618
|
const { header: t } = this.ctx, e = [], i = [], s = [], o = [];
|
|
4589
4619
|
t.renderLeafCellHeaders.forEach((r) => {
|
|
4590
|
-
const a = new
|
|
4620
|
+
const a = new vt(
|
|
4591
4621
|
this.ctx,
|
|
4592
4622
|
this.rowIndex,
|
|
4593
4623
|
r.colIndex,
|
|
@@ -4627,7 +4657,7 @@ class Zt {
|
|
|
4627
4657
|
});
|
|
4628
4658
|
}
|
|
4629
4659
|
}
|
|
4630
|
-
class
|
|
4660
|
+
class Ne {
|
|
4631
4661
|
constructor(t) {
|
|
4632
4662
|
n(this, "resizeTarget", null);
|
|
4633
4663
|
//调整行大小的目标
|
|
@@ -4681,28 +4711,28 @@ class De {
|
|
|
4681
4711
|
let w = this.height + e.height + r;
|
|
4682
4712
|
w += m;
|
|
4683
4713
|
let E = w;
|
|
4684
|
-
const
|
|
4685
|
-
if (
|
|
4686
|
-
const
|
|
4687
|
-
|
|
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;
|
|
4717
|
+
T > e.height + r ? E = T : w > c && (E = c);
|
|
4688
4718
|
} else this.data.length && a ? E = a : this.data.length && c && w > c && (E = c);
|
|
4689
4719
|
E > 0 && (this.ctx.stageHeight = Math.floor(E), this.ctx.stageElement.style.height = `${this.ctx.stageHeight}px`);
|
|
4690
4720
|
let b = this.ctx.stageHeight - e.height - r;
|
|
4691
4721
|
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;
|
|
4692
|
-
const y = window.devicePixelRatio || 1,
|
|
4693
|
-
t.width = Math.round(
|
|
4694
|
-
const
|
|
4722
|
+
const y = window.devicePixelRatio || 1, R = this.ctx.stageWidth * y, S = this.ctx.stageHeight * y;
|
|
4723
|
+
t.width = Math.round(R), t.height = Math.round(S);
|
|
4724
|
+
const O = this.data.length ? "not-empty" : "empty";
|
|
4695
4725
|
this.ctx.emit("emptyChange", {
|
|
4696
|
-
isEmpty:
|
|
4697
|
-
type:
|
|
4726
|
+
isEmpty: O,
|
|
4727
|
+
type: O,
|
|
4698
4728
|
headerHeight: e.height,
|
|
4699
4729
|
bodyHeight: this.height,
|
|
4700
4730
|
footerHeight: m,
|
|
4701
4731
|
width: this.width,
|
|
4702
4732
|
height: this.data.length ? 0 : l + m
|
|
4703
4733
|
});
|
|
4704
|
-
const
|
|
4705
|
-
this.ctx.canvasElement.setAttribute("style", `height:${I}px;width:${
|
|
4734
|
+
const v = Math.round(t.width / y * 1e4) / 1e4, I = Math.round(t.height / y * 1e4) / 1e4;
|
|
4735
|
+
this.ctx.canvasElement.setAttribute("style", `height:${I}px;width:${v}px;`), this.ctx.paint.scale(y);
|
|
4706
4736
|
}
|
|
4707
4737
|
// 调整行的高度
|
|
4708
4738
|
initResizeRow() {
|
|
@@ -4826,7 +4856,7 @@ class De {
|
|
|
4826
4856
|
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;
|
|
4827
4857
|
const d = [];
|
|
4828
4858
|
for (let f = 0; f < this.visibleRows.length; f++) {
|
|
4829
|
-
const x = this.headIndex + f, u = this.visibleRows[f], { height: g, top: m } = this.ctx.database.getPositionForRowIndex(x), w = new
|
|
4859
|
+
const x = this.headIndex + f, u = this.visibleRows[f], { height: g, top: m } = this.ctx.database.getPositionForRowIndex(x), w = new Jt(this.ctx, x, 0, m + this.y, t.width, g, u);
|
|
4830
4860
|
d.push(w);
|
|
4831
4861
|
}
|
|
4832
4862
|
this.renderRows = d, this.ctx.body.renderRows = d;
|
|
@@ -4856,7 +4886,7 @@ class De {
|
|
|
4856
4886
|
}), this.drawTipLine();
|
|
4857
4887
|
}
|
|
4858
4888
|
}
|
|
4859
|
-
class
|
|
4889
|
+
class ke {
|
|
4860
4890
|
constructor(t) {
|
|
4861
4891
|
n(this, "ctx");
|
|
4862
4892
|
n(this, "renderRows", []);
|
|
@@ -4911,7 +4941,7 @@ class Ne {
|
|
|
4911
4941
|
let e = this.y;
|
|
4912
4942
|
const i = [];
|
|
4913
4943
|
this.data.forEach((s, o) => {
|
|
4914
|
-
const r = new
|
|
4944
|
+
const r = new Jt(this.ctx, o, 0, e, this.width, t, s, "footer");
|
|
4915
4945
|
e += t, i.push(r);
|
|
4916
4946
|
}), this.renderRows = i, this.ctx.footer.renderRows = this.renderRows;
|
|
4917
4947
|
}
|
|
@@ -4937,7 +4967,7 @@ class Ne {
|
|
|
4937
4967
|
}), this.drawTopLine();
|
|
4938
4968
|
}
|
|
4939
4969
|
}
|
|
4940
|
-
class
|
|
4970
|
+
class Be {
|
|
4941
4971
|
constructor(t) {
|
|
4942
4972
|
n(this, "isCut", !1);
|
|
4943
4973
|
n(this, "isMultipleRow", !1);
|
|
@@ -4949,7 +4979,7 @@ class ke {
|
|
|
4949
4979
|
this.moveFocus(t);
|
|
4950
4980
|
}), this.ctx.on(
|
|
4951
4981
|
"mousemove",
|
|
4952
|
-
|
|
4982
|
+
bt((t) => {
|
|
4953
4983
|
var e, i;
|
|
4954
4984
|
(e = this.ctx.focusCell) != null && e.fixed || (i = this.ctx.focusCellHeader) != null && i.fixed || !this.ctx.dragHeaderIng && this.ctx.selectorMove && this.ctx.startAdjustPosition(t);
|
|
4955
4985
|
}, 100)
|
|
@@ -4980,7 +5010,7 @@ class ke {
|
|
|
4980
5010
|
return;
|
|
4981
5011
|
window.getComputedStyle(e.target).userSelect !== "text" && e.preventDefault(), this.ctx.clearSelector(), t.operation ? this.selectAll() : this.selectCols(t);
|
|
4982
5012
|
}), this.ctx.on("keydown", (t) => {
|
|
4983
|
-
if (!this.ctx.editing) {
|
|
5013
|
+
if (!this.ctx.editing && !this.ctx.finding) {
|
|
4984
5014
|
if (t.ctrlKey && t.code === "KeyV" || t.metaKey && t.code === "KeyV") {
|
|
4985
5015
|
this.paste();
|
|
4986
5016
|
return;
|
|
@@ -5054,26 +5084,26 @@ class ke {
|
|
|
5054
5084
|
SELECTOR_AREA_MAX_X_OFFSET: f,
|
|
5055
5085
|
SELECTOR_AREA_MAX_Y_OFFSET: x
|
|
5056
5086
|
} = this.ctx.config, u = a, g = l || this.ctx.maxColIndex - f, m = c, w = d || this.ctx.maxRowIndex - x;
|
|
5057
|
-
let [E,
|
|
5058
|
-
if (E < u ||
|
|
5087
|
+
let [E, C] = o, [p, b] = r;
|
|
5088
|
+
if (E < u || C > g || p < m || b > w)
|
|
5059
5089
|
return;
|
|
5060
5090
|
if (this.ctx.config.ENABLE_MERGE_CELL_LINK) {
|
|
5061
|
-
const
|
|
5062
|
-
|
|
5091
|
+
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;
|
|
5063
5093
|
}
|
|
5064
|
-
E ===
|
|
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)];
|
|
5065
5095
|
const { BEFORE_SET_SELECTOR_METHOD: y } = this.ctx.config;
|
|
5066
5096
|
if (typeof y == "function") {
|
|
5067
|
-
const
|
|
5097
|
+
const S = y({
|
|
5068
5098
|
focusCell: this.ctx.focusCell,
|
|
5069
5099
|
xArr: o,
|
|
5070
5100
|
yArr: r
|
|
5071
5101
|
});
|
|
5072
|
-
if (!
|
|
5102
|
+
if (!S)
|
|
5073
5103
|
return;
|
|
5074
|
-
o =
|
|
5104
|
+
o = S.xArr, r = S.yArr;
|
|
5075
5105
|
}
|
|
5076
|
-
this.ctx.selector.xArr = o, this.ctx.selector.yArr = r, b === this.ctx.maxRowIndex &&
|
|
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");
|
|
5077
5107
|
}
|
|
5078
5108
|
}
|
|
5079
5109
|
adjustMergeCells(t, e) {
|
|
@@ -5088,13 +5118,13 @@ class ke {
|
|
|
5088
5118
|
let a = [], l = [];
|
|
5089
5119
|
for (let m = 0; m <= e[1] - e[0]; m++)
|
|
5090
5120
|
for (let w = 0; w <= t[1] - t[0]; w++) {
|
|
5091
|
-
const E = m + e[0],
|
|
5092
|
-
|
|
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));
|
|
5093
5123
|
}
|
|
5094
5124
|
const c = a.reduce(
|
|
5095
5125
|
(m, w) => {
|
|
5096
|
-
const { yArr: E } = w.getSpanInfo(), [
|
|
5097
|
-
return m.minY = Math.min(m.minY,
|
|
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;
|
|
5098
5128
|
},
|
|
5099
5129
|
{
|
|
5100
5130
|
minY: i,
|
|
@@ -5102,8 +5132,8 @@ class ke {
|
|
|
5102
5132
|
}
|
|
5103
5133
|
), d = l.reduce(
|
|
5104
5134
|
(m, w) => {
|
|
5105
|
-
const { xArr: E } = w.getSpanInfo(), [
|
|
5106
|
-
return m.minX = Math.min(m.minX,
|
|
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;
|
|
5107
5137
|
},
|
|
5108
5138
|
{
|
|
5109
5139
|
minX: o,
|
|
@@ -5240,7 +5270,7 @@ class ke {
|
|
|
5240
5270
|
return;
|
|
5241
5271
|
t = a.data;
|
|
5242
5272
|
}
|
|
5243
|
-
const o =
|
|
5273
|
+
const o = me(t);
|
|
5244
5274
|
navigator.clipboard ? navigator.clipboard.writeText(o).then(() => {
|
|
5245
5275
|
this.ctx.selector.xArrCopy = this.ctx.selector.xArr.slice(), this.ctx.selector.yArrCopy = this.ctx.selector.yArr.slice(), this.ctx.emit("copyChange", {
|
|
5246
5276
|
xArr: this.ctx.selector.xArrCopy,
|
|
@@ -5285,7 +5315,7 @@ class ke {
|
|
|
5285
5315
|
if (this.ctx.selector.enable && t) {
|
|
5286
5316
|
const e = this.ctx.selector.yArr[0], i = this.ctx.selector.xArr[0], s = /* @__PURE__ */ new Set();
|
|
5287
5317
|
navigator.clipboard.readText().then(async (o) => {
|
|
5288
|
-
let r =
|
|
5318
|
+
let r = we(o);
|
|
5289
5319
|
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;
|
|
5290
5320
|
(u > 0 || g > 0) && this.ctx.emit("onPastedDataOverflow", {
|
|
5291
5321
|
maxY: d,
|
|
@@ -5298,27 +5328,27 @@ class ke {
|
|
|
5298
5328
|
});
|
|
5299
5329
|
const m = r.length === 1 && r[0].length === 1;
|
|
5300
5330
|
if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(a, l) && !m) {
|
|
5301
|
-
const
|
|
5331
|
+
const p = {
|
|
5302
5332
|
code: "ERR_MERGED_CELLS_PASTE",
|
|
5303
5333
|
message: "Merged cells cannot span paste data"
|
|
5304
5334
|
};
|
|
5305
|
-
this.ctx.hasEvent("error") ? this.ctx.emit("error",
|
|
5335
|
+
this.ctx.hasEvent("error") ? this.ctx.emit("error", p) : alert(p.message);
|
|
5306
5336
|
return;
|
|
5307
5337
|
}
|
|
5308
5338
|
let w = [];
|
|
5309
|
-
for (let
|
|
5310
|
-
const b = r[
|
|
5339
|
+
for (let p = 0; p <= r.length - 1; p++) {
|
|
5340
|
+
const b = r[p].length;
|
|
5311
5341
|
for (let y = 0; y <= b - 1; y++) {
|
|
5312
|
-
const
|
|
5313
|
-
|
|
5314
|
-
|
|
5342
|
+
const R = p + e, S = y + i, O = r[p][y], v = this.ctx.database.getItemValueForRowIndexAndColIndex(
|
|
5343
|
+
R,
|
|
5344
|
+
S
|
|
5315
5345
|
);
|
|
5316
|
-
if (
|
|
5317
|
-
const { rowKey: I, key:
|
|
5318
|
-
this.ctx.database.getReadonly(I,
|
|
5346
|
+
if (v) {
|
|
5347
|
+
const { rowKey: I, key: _ } = v;
|
|
5348
|
+
this.ctx.database.getReadonly(I, _) || (s.add(I), w.push({
|
|
5319
5349
|
rowKey: I,
|
|
5320
|
-
key:
|
|
5321
|
-
value:
|
|
5350
|
+
key: _,
|
|
5351
|
+
value: O,
|
|
5322
5352
|
row: {}
|
|
5323
5353
|
//内部有设置
|
|
5324
5354
|
}));
|
|
@@ -5326,13 +5356,13 @@ class ke {
|
|
|
5326
5356
|
}
|
|
5327
5357
|
}
|
|
5328
5358
|
if (this.isCut) {
|
|
5329
|
-
const
|
|
5359
|
+
const p = this.clearSelectedData(
|
|
5330
5360
|
this.ctx.selector.xArrCopy,
|
|
5331
5361
|
this.ctx.selector.yArrCopy,
|
|
5332
5362
|
!0
|
|
5333
5363
|
// 忽略设置,只返回数据,用于cut,实现历史回退需要返回两次问题
|
|
5334
5364
|
), b = w.map((y) => `${y.rowKey}-${y.key}`);
|
|
5335
|
-
|
|
5365
|
+
p.forEach((y) => {
|
|
5336
5366
|
b.includes(`${y.rowKey}-${y.key}`) || w.unshift(y);
|
|
5337
5367
|
}), this.isCut = !1;
|
|
5338
5368
|
}
|
|
@@ -5340,21 +5370,21 @@ class ke {
|
|
|
5340
5370
|
return;
|
|
5341
5371
|
const { BEFORE_PASTE_DATA_METHOD: E } = this.ctx.config;
|
|
5342
5372
|
if (typeof E == "function") {
|
|
5343
|
-
const
|
|
5373
|
+
const p = E, b = w.map((y) => ({
|
|
5344
5374
|
rowKey: y.rowKey,
|
|
5345
5375
|
key: y.key,
|
|
5346
5376
|
value: y.value,
|
|
5347
5377
|
oldValue: this.ctx.database.getItemValue(y.rowKey, y.key),
|
|
5348
5378
|
row: this.ctx.database.getRowDataItemForRowKey(y.rowKey)
|
|
5349
5379
|
}));
|
|
5350
|
-
if (w = await
|
|
5380
|
+
if (w = await p(b, a, l, r), w && !w.length)
|
|
5351
5381
|
return;
|
|
5352
5382
|
}
|
|
5353
5383
|
this.clearCopyLine(), this.ctx.batchSetItemValueByEditor(w, !0);
|
|
5354
|
-
let
|
|
5355
|
-
s.forEach((
|
|
5356
|
-
|
|
5357
|
-
}), this.ctx.emit("pasteChange", w,
|
|
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");
|
|
5358
5388
|
}).catch((o) => {
|
|
5359
5389
|
console.error("Failed to get the clipboard content:", o);
|
|
5360
5390
|
});
|
|
@@ -5420,14 +5450,14 @@ class ke {
|
|
|
5420
5450
|
if (!i)
|
|
5421
5451
|
return;
|
|
5422
5452
|
g && this.ctx.onlyMergeCell && i.updateSpanInfo();
|
|
5423
|
-
const { drawX: m, drawY: w, width: E, height:
|
|
5424
|
-
let
|
|
5425
|
-
|
|
5426
|
-
let
|
|
5427
|
-
x && (u === "top" ?
|
|
5428
|
-
const
|
|
5429
|
-
let I = c,
|
|
5430
|
-
y > 0 && !
|
|
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;
|
|
5455
|
+
S > l.visibleHeight && (S = l.visibleHeight);
|
|
5456
|
+
let O = 0;
|
|
5457
|
+
x && (u === "top" ? R = r.height + a.height - w : O = a.visibleHeight);
|
|
5458
|
+
const v = w + S - (t - O - f);
|
|
5459
|
+
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, _));
|
|
5431
5461
|
}
|
|
5432
5462
|
destroy() {
|
|
5433
5463
|
}
|
|
@@ -5485,14 +5515,14 @@ class Xe {
|
|
|
5485
5515
|
SELECTOR_AREA_MAX_Y: u,
|
|
5486
5516
|
SELECTOR_AREA_MAX_X_OFFSET: g,
|
|
5487
5517
|
SELECTOR_AREA_MAX_Y_OFFSET: m
|
|
5488
|
-
} = this.ctx.config, w = d, E = f || this.ctx.maxColIndex - g,
|
|
5489
|
-
let [b, y] = r, [
|
|
5490
|
-
if (b < w ||
|
|
5518
|
+
} = this.ctx.config, w = d, E = f || this.ctx.maxColIndex - g, C = x, p = u || this.ctx.maxRowIndex - m;
|
|
5519
|
+
let [b, y] = r, [R, S] = a;
|
|
5520
|
+
if (b < w || R < C)
|
|
5491
5521
|
return;
|
|
5492
|
-
r = [Math.max(w, b), Math.min(E, y)], a = [Math.max(
|
|
5493
|
-
const { BEFORE_SET_AUTOFILL_METHOD:
|
|
5494
|
-
if (typeof
|
|
5495
|
-
const I =
|
|
5522
|
+
r = [Math.max(w, b), Math.min(E, y)], a = [Math.max(C, R), Math.min(p, S)];
|
|
5523
|
+
const { BEFORE_SET_AUTOFILL_METHOD: O } = this.ctx.config;
|
|
5524
|
+
if (typeof O == "function") {
|
|
5525
|
+
const I = O({
|
|
5496
5526
|
focusCell: this.ctx.focusCell,
|
|
5497
5527
|
xArr: r,
|
|
5498
5528
|
yArr: a
|
|
@@ -5526,9 +5556,9 @@ class Xe {
|
|
|
5526
5556
|
let d = [];
|
|
5527
5557
|
for (let u = 0; u <= l[1] - l[0]; u++)
|
|
5528
5558
|
for (let g = 0; g <= a[1] - a[0]; g++) {
|
|
5529
|
-
const m = g + a[0], w = u + l[0], E = s[u % r][g % o],
|
|
5530
|
-
if (
|
|
5531
|
-
const { rowKey: b, key: y } =
|
|
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;
|
|
5532
5562
|
this.ctx.database.getReadonly(b, y) || (t.add(b), d.push({
|
|
5533
5563
|
rowKey: b,
|
|
5534
5564
|
key: y,
|
|
@@ -5570,19 +5600,19 @@ class Xe {
|
|
|
5570
5600
|
destroy() {
|
|
5571
5601
|
}
|
|
5572
5602
|
}
|
|
5573
|
-
const j = Math.min, z = Math.max,
|
|
5603
|
+
const j = Math.min, z = Math.max, at = Math.round, st = Math.floor, Y = (h) => ({
|
|
5574
5604
|
x: h,
|
|
5575
5605
|
y: h
|
|
5576
|
-
}),
|
|
5606
|
+
}), Ye = {
|
|
5577
5607
|
left: "right",
|
|
5578
5608
|
right: "left",
|
|
5579
5609
|
bottom: "top",
|
|
5580
5610
|
top: "bottom"
|
|
5581
|
-
},
|
|
5611
|
+
}, Ke = {
|
|
5582
5612
|
start: "end",
|
|
5583
5613
|
end: "start"
|
|
5584
5614
|
};
|
|
5585
|
-
function
|
|
5615
|
+
function Et(h, t, e) {
|
|
5586
5616
|
return z(h, j(t, e));
|
|
5587
5617
|
}
|
|
5588
5618
|
function tt(h, t) {
|
|
@@ -5594,54 +5624,54 @@ function $(h) {
|
|
|
5594
5624
|
function et(h) {
|
|
5595
5625
|
return h.split("-")[1];
|
|
5596
5626
|
}
|
|
5597
|
-
function
|
|
5627
|
+
function Qt(h) {
|
|
5598
5628
|
return h === "x" ? "y" : "x";
|
|
5599
5629
|
}
|
|
5600
|
-
function
|
|
5630
|
+
function Rt(h) {
|
|
5601
5631
|
return h === "y" ? "height" : "width";
|
|
5602
5632
|
}
|
|
5603
|
-
const
|
|
5633
|
+
const Fe = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
5604
5634
|
function V(h) {
|
|
5605
|
-
return
|
|
5635
|
+
return Fe.has($(h)) ? "y" : "x";
|
|
5606
5636
|
}
|
|
5607
|
-
function
|
|
5608
|
-
return
|
|
5637
|
+
function _t(h) {
|
|
5638
|
+
return Qt(V(h));
|
|
5609
5639
|
}
|
|
5610
|
-
function
|
|
5640
|
+
function We(h, t, e) {
|
|
5611
5641
|
e === void 0 && (e = !1);
|
|
5612
|
-
const i = et(h), s =
|
|
5642
|
+
const i = et(h), s = _t(h), o = Rt(s);
|
|
5613
5643
|
let r = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
|
|
5614
|
-
return t.reference[o] > t.floating[o] && (r =
|
|
5644
|
+
return t.reference[o] > t.floating[o] && (r = lt(r)), [r, lt(r)];
|
|
5615
5645
|
}
|
|
5616
|
-
function
|
|
5617
|
-
const t =
|
|
5618
|
-
return [
|
|
5646
|
+
function Ve(h) {
|
|
5647
|
+
const t = lt(h);
|
|
5648
|
+
return [pt(h), t, pt(t)];
|
|
5619
5649
|
}
|
|
5620
|
-
function
|
|
5621
|
-
return h.replace(/start|end/g, (t) =>
|
|
5650
|
+
function pt(h) {
|
|
5651
|
+
return h.replace(/start|end/g, (t) => Ke[t]);
|
|
5622
5652
|
}
|
|
5623
|
-
const
|
|
5624
|
-
function
|
|
5653
|
+
const Yt = ["left", "right"], Kt = ["right", "left"], Pe = ["top", "bottom"], ze = ["bottom", "top"];
|
|
5654
|
+
function $e(h, t, e) {
|
|
5625
5655
|
switch (h) {
|
|
5626
5656
|
case "top":
|
|
5627
5657
|
case "bottom":
|
|
5628
|
-
return e ? t ?
|
|
5658
|
+
return e ? t ? Kt : Yt : t ? Yt : Kt;
|
|
5629
5659
|
case "left":
|
|
5630
5660
|
case "right":
|
|
5631
|
-
return t ?
|
|
5661
|
+
return t ? Pe : ze;
|
|
5632
5662
|
default:
|
|
5633
5663
|
return [];
|
|
5634
5664
|
}
|
|
5635
5665
|
}
|
|
5636
|
-
function
|
|
5666
|
+
function Ge(h, t, e, i) {
|
|
5637
5667
|
const s = et(h);
|
|
5638
|
-
let o =
|
|
5639
|
-
return s && (o = o.map((r) => r + "-" + s), t && (o = o.concat(o.map(
|
|
5668
|
+
let o = $e($(h), e === "start", i);
|
|
5669
|
+
return s && (o = o.map((r) => r + "-" + s), t && (o = o.concat(o.map(pt)))), o;
|
|
5640
5670
|
}
|
|
5641
|
-
function
|
|
5642
|
-
return h.replace(/left|right|bottom|top/g, (t) =>
|
|
5671
|
+
function lt(h) {
|
|
5672
|
+
return h.replace(/left|right|bottom|top/g, (t) => Ye[t]);
|
|
5643
5673
|
}
|
|
5644
|
-
function
|
|
5674
|
+
function Ue(h) {
|
|
5645
5675
|
return {
|
|
5646
5676
|
top: 0,
|
|
5647
5677
|
right: 0,
|
|
@@ -5650,15 +5680,15 @@ function Ge(h) {
|
|
|
5650
5680
|
...h
|
|
5651
5681
|
};
|
|
5652
5682
|
}
|
|
5653
|
-
function
|
|
5654
|
-
return typeof h != "number" ?
|
|
5683
|
+
function te(h) {
|
|
5684
|
+
return typeof h != "number" ? Ue(h) : {
|
|
5655
5685
|
top: h,
|
|
5656
5686
|
right: h,
|
|
5657
5687
|
bottom: h,
|
|
5658
5688
|
left: h
|
|
5659
5689
|
};
|
|
5660
5690
|
}
|
|
5661
|
-
function
|
|
5691
|
+
function ct(h) {
|
|
5662
5692
|
const {
|
|
5663
5693
|
x: t,
|
|
5664
5694
|
y: e,
|
|
@@ -5676,12 +5706,12 @@ function lt(h) {
|
|
|
5676
5706
|
y: e
|
|
5677
5707
|
};
|
|
5678
5708
|
}
|
|
5679
|
-
function
|
|
5709
|
+
function Ft(h, t, e) {
|
|
5680
5710
|
let {
|
|
5681
5711
|
reference: i,
|
|
5682
5712
|
floating: s
|
|
5683
5713
|
} = h;
|
|
5684
|
-
const o = V(t), r =
|
|
5714
|
+
const o = V(t), r = _t(t), a = Rt(r), l = $(t), c = o === "y", d = i.x + i.width / 2 - s.width / 2, f = i.y + i.height / 2 - s.height / 2, x = i[a] / 2 - s[a] / 2;
|
|
5685
5715
|
let u;
|
|
5686
5716
|
switch (l) {
|
|
5687
5717
|
case "top":
|
|
@@ -5724,7 +5754,7 @@ function Kt(h, t, e) {
|
|
|
5724
5754
|
}
|
|
5725
5755
|
return u;
|
|
5726
5756
|
}
|
|
5727
|
-
const
|
|
5757
|
+
const je = async (h, t, e) => {
|
|
5728
5758
|
const {
|
|
5729
5759
|
placement: i = "bottom",
|
|
5730
5760
|
strategy: s = "absolute",
|
|
@@ -5738,14 +5768,14 @@ const Ue = async (h, t, e) => {
|
|
|
5738
5768
|
}), {
|
|
5739
5769
|
x: d,
|
|
5740
5770
|
y: f
|
|
5741
|
-
} =
|
|
5771
|
+
} = Ft(c, i, l), x = i, u = {}, g = 0;
|
|
5742
5772
|
for (let m = 0; m < a.length; m++) {
|
|
5743
5773
|
const {
|
|
5744
5774
|
name: w,
|
|
5745
5775
|
fn: E
|
|
5746
5776
|
} = a[m], {
|
|
5747
|
-
x:
|
|
5748
|
-
y:
|
|
5777
|
+
x: C,
|
|
5778
|
+
y: p,
|
|
5749
5779
|
data: b,
|
|
5750
5780
|
reset: y
|
|
5751
5781
|
} = await E({
|
|
@@ -5762,7 +5792,7 @@ const Ue = async (h, t, e) => {
|
|
|
5762
5792
|
floating: t
|
|
5763
5793
|
}
|
|
5764
5794
|
});
|
|
5765
|
-
d =
|
|
5795
|
+
d = C ?? d, f = p ?? f, u = {
|
|
5766
5796
|
...u,
|
|
5767
5797
|
[w]: {
|
|
5768
5798
|
...u[w],
|
|
@@ -5775,7 +5805,7 @@ const Ue = async (h, t, e) => {
|
|
|
5775
5805
|
}) : y.rects), {
|
|
5776
5806
|
x: d,
|
|
5777
5807
|
y: f
|
|
5778
|
-
} =
|
|
5808
|
+
} = Ft(c, x, l)), m = -1);
|
|
5779
5809
|
}
|
|
5780
5810
|
return {
|
|
5781
5811
|
x: d,
|
|
@@ -5785,7 +5815,7 @@ const Ue = async (h, t, e) => {
|
|
|
5785
5815
|
middlewareData: u
|
|
5786
5816
|
};
|
|
5787
5817
|
};
|
|
5788
|
-
async function
|
|
5818
|
+
async function ee(h, t) {
|
|
5789
5819
|
var e;
|
|
5790
5820
|
t === void 0 && (t = {});
|
|
5791
5821
|
const {
|
|
@@ -5801,28 +5831,28 @@ async function te(h, t) {
|
|
|
5801
5831
|
elementContext: f = "floating",
|
|
5802
5832
|
altBoundary: x = !1,
|
|
5803
5833
|
padding: u = 0
|
|
5804
|
-
} = tt(t, h), g =
|
|
5834
|
+
} = tt(t, h), g = te(u), w = a[x ? f === "floating" ? "reference" : "floating" : f], E = ct(await o.getClippingRect({
|
|
5805
5835
|
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)),
|
|
5806
5836
|
boundary: c,
|
|
5807
5837
|
rootBoundary: d,
|
|
5808
5838
|
strategy: l
|
|
5809
|
-
})),
|
|
5839
|
+
})), C = f === "floating" ? {
|
|
5810
5840
|
x: i,
|
|
5811
5841
|
y: s,
|
|
5812
5842
|
width: r.floating.width,
|
|
5813
5843
|
height: r.floating.height
|
|
5814
|
-
} : r.reference,
|
|
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)) || {
|
|
5815
5845
|
x: 1,
|
|
5816
5846
|
y: 1
|
|
5817
5847
|
} : {
|
|
5818
5848
|
x: 1,
|
|
5819
5849
|
y: 1
|
|
5820
|
-
}, y =
|
|
5850
|
+
}, y = ct(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
5821
5851
|
elements: a,
|
|
5822
|
-
rect:
|
|
5823
|
-
offsetParent:
|
|
5852
|
+
rect: C,
|
|
5853
|
+
offsetParent: p,
|
|
5824
5854
|
strategy: l
|
|
5825
|
-
}) :
|
|
5855
|
+
}) : C);
|
|
5826
5856
|
return {
|
|
5827
5857
|
top: (E.top - y.top + g.top) / b.y,
|
|
5828
5858
|
bottom: (y.bottom - E.bottom + g.bottom) / b.y,
|
|
@@ -5830,7 +5860,7 @@ async function te(h, t) {
|
|
|
5830
5860
|
right: (y.right - E.right + g.right) / b.x
|
|
5831
5861
|
};
|
|
5832
5862
|
}
|
|
5833
|
-
const
|
|
5863
|
+
const qe = (h) => ({
|
|
5834
5864
|
name: "arrow",
|
|
5835
5865
|
options: h,
|
|
5836
5866
|
async fn(t) {
|
|
@@ -5848,26 +5878,26 @@ const je = (h) => ({
|
|
|
5848
5878
|
} = tt(h, t) || {};
|
|
5849
5879
|
if (c == null)
|
|
5850
5880
|
return {};
|
|
5851
|
-
const f =
|
|
5881
|
+
const f = te(d), x = {
|
|
5852
5882
|
x: e,
|
|
5853
5883
|
y: i
|
|
5854
|
-
}, u =
|
|
5855
|
-
let
|
|
5856
|
-
(!
|
|
5857
|
-
const
|
|
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;
|
|
5858
5888
|
return {
|
|
5859
|
-
[u]: x[u] +
|
|
5889
|
+
[u]: x[u] + D,
|
|
5860
5890
|
data: {
|
|
5861
5891
|
[u]: A,
|
|
5862
|
-
centerOffset: L - A -
|
|
5863
|
-
...
|
|
5864
|
-
alignmentOffset:
|
|
5892
|
+
centerOffset: L - A - D,
|
|
5893
|
+
...H && {
|
|
5894
|
+
alignmentOffset: D
|
|
5865
5895
|
}
|
|
5866
5896
|
},
|
|
5867
|
-
reset:
|
|
5897
|
+
reset: H
|
|
5868
5898
|
};
|
|
5869
5899
|
}
|
|
5870
|
-
}),
|
|
5900
|
+
}), Ze = function(h) {
|
|
5871
5901
|
return h === void 0 && (h = {}), {
|
|
5872
5902
|
name: "flip",
|
|
5873
5903
|
options: h,
|
|
@@ -5891,23 +5921,23 @@ const je = (h) => ({
|
|
|
5891
5921
|
} = tt(h, t);
|
|
5892
5922
|
if ((e = o.arrow) != null && e.alignmentOffset)
|
|
5893
5923
|
return {};
|
|
5894
|
-
const E = $(s),
|
|
5895
|
-
!x &&
|
|
5896
|
-
const
|
|
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
|
+
!x && R && y.push(...Ge(a, m, g, b));
|
|
5926
|
+
const S = [a, ...y], O = await ee(t, w), v = [];
|
|
5897
5927
|
let I = ((i = o.flip) == null ? void 0 : i.overflows) || [];
|
|
5898
|
-
if (d &&
|
|
5899
|
-
const L =
|
|
5900
|
-
|
|
5928
|
+
if (d && v.push(O[E]), f) {
|
|
5929
|
+
const L = We(s, r, b);
|
|
5930
|
+
v.push(O[L[0]], O[L[1]]);
|
|
5901
5931
|
}
|
|
5902
5932
|
if (I = [...I, {
|
|
5903
5933
|
placement: s,
|
|
5904
|
-
overflows:
|
|
5905
|
-
}], !
|
|
5906
|
-
var
|
|
5907
|
-
const L = (((
|
|
5908
|
-
if (A && (!(f === "alignment" ?
|
|
5934
|
+
overflows: v
|
|
5935
|
+
}], !v.every((L) => L <= 0)) {
|
|
5936
|
+
var _, T;
|
|
5937
|
+
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
|
|
5909
5939
|
// overflows the main axis.
|
|
5910
|
-
I.every((k) => V(k.placement) ===
|
|
5940
|
+
I.every((k) => V(k.placement) === C ? k.overflows[0] > 0 : !0)))
|
|
5911
5941
|
return {
|
|
5912
5942
|
data: {
|
|
5913
5943
|
index: L,
|
|
@@ -5917,44 +5947,44 @@ const je = (h) => ({
|
|
|
5917
5947
|
placement: A
|
|
5918
5948
|
}
|
|
5919
5949
|
};
|
|
5920
|
-
let
|
|
5921
|
-
if (!
|
|
5950
|
+
let H = (T = I.filter((D) => D.overflows[0] <= 0).sort((D, k) => D.overflows[1] - k.overflows[1])[0]) == null ? void 0 : T.placement;
|
|
5951
|
+
if (!H)
|
|
5922
5952
|
switch (u) {
|
|
5923
5953
|
case "bestFit": {
|
|
5924
5954
|
var M;
|
|
5925
|
-
const
|
|
5926
|
-
if (
|
|
5955
|
+
const D = (M = I.filter((k) => {
|
|
5956
|
+
if (R) {
|
|
5927
5957
|
const W = V(k.placement);
|
|
5928
|
-
return W ===
|
|
5958
|
+
return W === C || // Create a bias to the `y` side axis due to horizontal
|
|
5929
5959
|
// reading directions favoring greater width.
|
|
5930
5960
|
W === "y";
|
|
5931
5961
|
}
|
|
5932
5962
|
return !0;
|
|
5933
|
-
}).map((k) => [k.placement, k.overflows.filter((W) => W > 0).reduce((W,
|
|
5934
|
-
|
|
5963
|
+
}).map((k) => [k.placement, k.overflows.filter((W) => W > 0).reduce((W, he) => W + he, 0)]).sort((k, W) => k[1] - W[1])[0]) == null ? void 0 : M[0];
|
|
5964
|
+
D && (H = D);
|
|
5935
5965
|
break;
|
|
5936
5966
|
}
|
|
5937
5967
|
case "initialPlacement":
|
|
5938
|
-
|
|
5968
|
+
H = a;
|
|
5939
5969
|
break;
|
|
5940
5970
|
}
|
|
5941
|
-
if (s !==
|
|
5971
|
+
if (s !== H)
|
|
5942
5972
|
return {
|
|
5943
5973
|
reset: {
|
|
5944
|
-
placement:
|
|
5974
|
+
placement: H
|
|
5945
5975
|
}
|
|
5946
5976
|
};
|
|
5947
5977
|
}
|
|
5948
5978
|
return {};
|
|
5949
5979
|
}
|
|
5950
5980
|
};
|
|
5951
|
-
},
|
|
5952
|
-
async function
|
|
5981
|
+
}, Je = /* @__PURE__ */ new Set(["left", "top"]);
|
|
5982
|
+
async function Qe(h, t) {
|
|
5953
5983
|
const {
|
|
5954
5984
|
placement: e,
|
|
5955
5985
|
platform: i,
|
|
5956
5986
|
elements: s
|
|
5957
|
-
} = h, o = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), r = $(e), a = et(e), l = V(e) === "y", c =
|
|
5987
|
+
} = h, o = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), r = $(e), a = et(e), l = V(e) === "y", c = Je.has(r) ? -1 : 1, d = o && l ? -1 : 1, f = tt(t, h);
|
|
5958
5988
|
let {
|
|
5959
5989
|
mainAxis: x,
|
|
5960
5990
|
crossAxis: u,
|
|
@@ -5976,7 +6006,7 @@ async function Je(h, t) {
|
|
|
5976
6006
|
y: u * d
|
|
5977
6007
|
};
|
|
5978
6008
|
}
|
|
5979
|
-
const
|
|
6009
|
+
const ti = function(h) {
|
|
5980
6010
|
return h === void 0 && (h = 0), {
|
|
5981
6011
|
name: "offset",
|
|
5982
6012
|
options: h,
|
|
@@ -5987,7 +6017,7 @@ const Qe = function(h) {
|
|
|
5987
6017
|
y: o,
|
|
5988
6018
|
placement: r,
|
|
5989
6019
|
middlewareData: a
|
|
5990
|
-
} = t, l = await
|
|
6020
|
+
} = t, l = await Qe(t, h);
|
|
5991
6021
|
return r === ((e = a.offset) == null ? void 0 : e.placement) && (i = a.arrow) != null && i.alignmentOffset ? {} : {
|
|
5992
6022
|
x: s + l.x,
|
|
5993
6023
|
y: o + l.y,
|
|
@@ -5998,7 +6028,7 @@ const Qe = function(h) {
|
|
|
5998
6028
|
};
|
|
5999
6029
|
}
|
|
6000
6030
|
};
|
|
6001
|
-
},
|
|
6031
|
+
}, ei = function(h) {
|
|
6002
6032
|
return h === void 0 && (h = {}), {
|
|
6003
6033
|
name: "shift",
|
|
6004
6034
|
options: h,
|
|
@@ -6014,11 +6044,11 @@ const Qe = function(h) {
|
|
|
6014
6044
|
fn: (w) => {
|
|
6015
6045
|
let {
|
|
6016
6046
|
x: E,
|
|
6017
|
-
y:
|
|
6047
|
+
y: C
|
|
6018
6048
|
} = w;
|
|
6019
6049
|
return {
|
|
6020
6050
|
x: E,
|
|
6021
|
-
y:
|
|
6051
|
+
y: C
|
|
6022
6052
|
};
|
|
6023
6053
|
}
|
|
6024
6054
|
},
|
|
@@ -6026,15 +6056,15 @@ const Qe = function(h) {
|
|
|
6026
6056
|
} = tt(h, t), c = {
|
|
6027
6057
|
x: e,
|
|
6028
6058
|
y: i
|
|
6029
|
-
}, d = await
|
|
6059
|
+
}, d = await ee(t, l), f = V($(s)), x = Qt(f);
|
|
6030
6060
|
let u = c[x], g = c[f];
|
|
6031
6061
|
if (o) {
|
|
6032
|
-
const w = x === "y" ? "top" : "left", E = x === "y" ? "bottom" : "right",
|
|
6033
|
-
u =
|
|
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);
|
|
6034
6064
|
}
|
|
6035
6065
|
if (r) {
|
|
6036
|
-
const w = f === "y" ? "top" : "left", E = f === "y" ? "bottom" : "right",
|
|
6037
|
-
g =
|
|
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);
|
|
6038
6068
|
}
|
|
6039
6069
|
const m = a.fn({
|
|
6040
6070
|
...t,
|
|
@@ -6055,11 +6085,11 @@ const Qe = function(h) {
|
|
|
6055
6085
|
}
|
|
6056
6086
|
};
|
|
6057
6087
|
};
|
|
6058
|
-
function
|
|
6088
|
+
function ut() {
|
|
6059
6089
|
return typeof window < "u";
|
|
6060
6090
|
}
|
|
6061
6091
|
function Z(h) {
|
|
6062
|
-
return
|
|
6092
|
+
return ie(h) ? (h.nodeName || "").toLowerCase() : "#document";
|
|
6063
6093
|
}
|
|
6064
6094
|
function N(h) {
|
|
6065
6095
|
var t;
|
|
@@ -6067,37 +6097,37 @@ function N(h) {
|
|
|
6067
6097
|
}
|
|
6068
6098
|
function F(h) {
|
|
6069
6099
|
var t;
|
|
6070
|
-
return (t = (
|
|
6100
|
+
return (t = (ie(h) ? h.ownerDocument : h.document) || window.document) == null ? void 0 : t.documentElement;
|
|
6071
6101
|
}
|
|
6072
|
-
function
|
|
6073
|
-
return
|
|
6102
|
+
function ie(h) {
|
|
6103
|
+
return ut() ? h instanceof Node || h instanceof N(h).Node : !1;
|
|
6074
6104
|
}
|
|
6075
|
-
function
|
|
6076
|
-
return
|
|
6105
|
+
function B(h) {
|
|
6106
|
+
return ut() ? h instanceof Element || h instanceof N(h).Element : !1;
|
|
6077
6107
|
}
|
|
6078
6108
|
function K(h) {
|
|
6079
|
-
return
|
|
6109
|
+
return ut() ? h instanceof HTMLElement || h instanceof N(h).HTMLElement : !1;
|
|
6080
6110
|
}
|
|
6081
|
-
function
|
|
6082
|
-
return !
|
|
6111
|
+
function Wt(h) {
|
|
6112
|
+
return !ut() || typeof ShadowRoot > "u" ? !1 : h instanceof ShadowRoot || h instanceof N(h).ShadowRoot;
|
|
6083
6113
|
}
|
|
6084
|
-
const
|
|
6114
|
+
const ii = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
6085
6115
|
function it(h) {
|
|
6086
6116
|
const {
|
|
6087
6117
|
overflow: t,
|
|
6088
6118
|
overflowX: e,
|
|
6089
6119
|
overflowY: i,
|
|
6090
6120
|
display: s
|
|
6091
|
-
} =
|
|
6092
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !
|
|
6121
|
+
} = X(h);
|
|
6122
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !ii.has(s);
|
|
6093
6123
|
}
|
|
6094
|
-
const
|
|
6095
|
-
function
|
|
6096
|
-
return
|
|
6124
|
+
const si = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
6125
|
+
function oi(h) {
|
|
6126
|
+
return si.has(Z(h));
|
|
6097
6127
|
}
|
|
6098
|
-
const
|
|
6099
|
-
function
|
|
6100
|
-
return
|
|
6128
|
+
const ri = [":popover-open", ":modal"];
|
|
6129
|
+
function xt(h) {
|
|
6130
|
+
return ri.some((t) => {
|
|
6101
6131
|
try {
|
|
6102
6132
|
return h.matches(t);
|
|
6103
6133
|
} catch {
|
|
@@ -6105,34 +6135,34 @@ function ut(h) {
|
|
|
6105
6135
|
}
|
|
6106
6136
|
});
|
|
6107
6137
|
}
|
|
6108
|
-
const
|
|
6109
|
-
function
|
|
6110
|
-
const t =
|
|
6111
|
-
return
|
|
6138
|
+
const ni = ["transform", "translate", "scale", "rotate", "perspective"], ai = ["transform", "translate", "scale", "rotate", "perspective", "filter"], li = ["paint", "layout", "strict", "content"];
|
|
6139
|
+
function St(h) {
|
|
6140
|
+
const t = Tt(), e = B(h) ? X(h) : h;
|
|
6141
|
+
return ni.some((i) => e[i] ? e[i] !== "none" : !1) || (e.containerType ? e.containerType !== "normal" : !1) || !t && (e.backdropFilter ? e.backdropFilter !== "none" : !1) || !t && (e.filter ? e.filter !== "none" : !1) || ai.some((i) => (e.willChange || "").includes(i)) || li.some((i) => (e.contain || "").includes(i));
|
|
6112
6142
|
}
|
|
6113
|
-
function
|
|
6143
|
+
function ci(h) {
|
|
6114
6144
|
let t = P(h);
|
|
6115
6145
|
for (; K(t) && !q(t); ) {
|
|
6116
|
-
if (
|
|
6146
|
+
if (St(t))
|
|
6117
6147
|
return t;
|
|
6118
|
-
if (
|
|
6148
|
+
if (xt(t))
|
|
6119
6149
|
return null;
|
|
6120
6150
|
t = P(t);
|
|
6121
6151
|
}
|
|
6122
6152
|
return null;
|
|
6123
6153
|
}
|
|
6124
|
-
function
|
|
6154
|
+
function Tt() {
|
|
6125
6155
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
6126
6156
|
}
|
|
6127
|
-
const
|
|
6157
|
+
const hi = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
6128
6158
|
function q(h) {
|
|
6129
|
-
return
|
|
6159
|
+
return hi.has(Z(h));
|
|
6130
6160
|
}
|
|
6131
|
-
function
|
|
6161
|
+
function X(h) {
|
|
6132
6162
|
return N(h).getComputedStyle(h);
|
|
6133
6163
|
}
|
|
6134
|
-
function
|
|
6135
|
-
return
|
|
6164
|
+
function gt(h) {
|
|
6165
|
+
return B(h) ? {
|
|
6136
6166
|
scrollLeft: h.scrollLeft,
|
|
6137
6167
|
scrollTop: h.scrollTop
|
|
6138
6168
|
} : {
|
|
@@ -6147,112 +6177,112 @@ function P(h) {
|
|
|
6147
6177
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
6148
6178
|
h.assignedSlot || // DOM Element detected.
|
|
6149
6179
|
h.parentNode || // ShadowRoot detected.
|
|
6150
|
-
|
|
6180
|
+
Wt(h) && h.host || // Fallback.
|
|
6151
6181
|
F(h)
|
|
6152
6182
|
);
|
|
6153
|
-
return
|
|
6183
|
+
return Wt(t) ? t.host : t;
|
|
6154
6184
|
}
|
|
6155
|
-
function
|
|
6185
|
+
function se(h) {
|
|
6156
6186
|
const t = P(h);
|
|
6157
|
-
return q(t) ? h.ownerDocument ? h.ownerDocument.body : h.body : K(t) && it(t) ? t :
|
|
6187
|
+
return q(t) ? h.ownerDocument ? h.ownerDocument.body : h.body : K(t) && it(t) ? t : se(t);
|
|
6158
6188
|
}
|
|
6159
6189
|
function Q(h, t, e) {
|
|
6160
6190
|
var i;
|
|
6161
6191
|
t === void 0 && (t = []), e === void 0 && (e = !0);
|
|
6162
|
-
const s =
|
|
6192
|
+
const s = se(h), o = s === ((i = h.ownerDocument) == null ? void 0 : i.body), r = N(s);
|
|
6163
6193
|
if (o) {
|
|
6164
|
-
const a =
|
|
6194
|
+
const a = Ct(r);
|
|
6165
6195
|
return t.concat(r, r.visualViewport || [], it(s) ? s : [], a && e ? Q(a) : []);
|
|
6166
6196
|
}
|
|
6167
6197
|
return t.concat(s, Q(s, [], e));
|
|
6168
6198
|
}
|
|
6169
|
-
function
|
|
6199
|
+
function Ct(h) {
|
|
6170
6200
|
return h.parent && Object.getPrototypeOf(h.parent) ? h.frameElement : null;
|
|
6171
6201
|
}
|
|
6172
|
-
function
|
|
6173
|
-
const t =
|
|
6202
|
+
function oe(h) {
|
|
6203
|
+
const t = X(h);
|
|
6174
6204
|
let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
|
|
6175
|
-
const s = K(h), o = s ? h.offsetWidth : e, r = s ? h.offsetHeight : i, a =
|
|
6205
|
+
const s = K(h), o = s ? h.offsetWidth : e, r = s ? h.offsetHeight : i, a = at(e) !== o || at(i) !== r;
|
|
6176
6206
|
return a && (e = o, i = r), {
|
|
6177
6207
|
width: e,
|
|
6178
6208
|
height: i,
|
|
6179
6209
|
$: a
|
|
6180
6210
|
};
|
|
6181
6211
|
}
|
|
6182
|
-
function
|
|
6183
|
-
return
|
|
6212
|
+
function Ot(h) {
|
|
6213
|
+
return B(h) ? h : h.contextElement;
|
|
6184
6214
|
}
|
|
6185
6215
|
function U(h) {
|
|
6186
|
-
const t =
|
|
6216
|
+
const t = Ot(h);
|
|
6187
6217
|
if (!K(t))
|
|
6188
6218
|
return Y(1);
|
|
6189
6219
|
const e = t.getBoundingClientRect(), {
|
|
6190
6220
|
width: i,
|
|
6191
6221
|
height: s,
|
|
6192
6222
|
$: o
|
|
6193
|
-
} =
|
|
6194
|
-
let r = (o ?
|
|
6223
|
+
} = oe(t);
|
|
6224
|
+
let r = (o ? at(e.width) : e.width) / i, a = (o ? at(e.height) : e.height) / s;
|
|
6195
6225
|
return (!r || !Number.isFinite(r)) && (r = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
6196
6226
|
x: r,
|
|
6197
6227
|
y: a
|
|
6198
6228
|
};
|
|
6199
6229
|
}
|
|
6200
|
-
const
|
|
6201
|
-
function
|
|
6230
|
+
const di = /* @__PURE__ */ Y(0);
|
|
6231
|
+
function re(h) {
|
|
6202
6232
|
const t = N(h);
|
|
6203
|
-
return !
|
|
6233
|
+
return !Tt() || !t.visualViewport ? di : {
|
|
6204
6234
|
x: t.visualViewport.offsetLeft,
|
|
6205
6235
|
y: t.visualViewport.offsetTop
|
|
6206
6236
|
};
|
|
6207
6237
|
}
|
|
6208
|
-
function
|
|
6238
|
+
function fi(h, t, e) {
|
|
6209
6239
|
return t === void 0 && (t = !1), !e || t && e !== N(h) ? !1 : t;
|
|
6210
6240
|
}
|
|
6211
6241
|
function G(h, t, e, i) {
|
|
6212
6242
|
t === void 0 && (t = !1), e === void 0 && (e = !1);
|
|
6213
|
-
const s = h.getBoundingClientRect(), o =
|
|
6243
|
+
const s = h.getBoundingClientRect(), o = Ot(h);
|
|
6214
6244
|
let r = Y(1);
|
|
6215
|
-
t && (i ?
|
|
6216
|
-
const a =
|
|
6245
|
+
t && (i ? B(i) && (r = U(i)) : r = U(h));
|
|
6246
|
+
const a = fi(o, e, i) ? re(o) : Y(0);
|
|
6217
6247
|
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;
|
|
6218
6248
|
if (o) {
|
|
6219
|
-
const x = N(o), u = i &&
|
|
6220
|
-
let g = x, m =
|
|
6249
|
+
const x = N(o), u = i && B(i) ? N(i) : i;
|
|
6250
|
+
let g = x, m = Ct(g);
|
|
6221
6251
|
for (; m && i && u !== g; ) {
|
|
6222
|
-
const w = U(m), E = m.getBoundingClientRect(),
|
|
6223
|
-
l *= w.x, c *= w.y, d *= w.x, f *= w.y, l +=
|
|
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);
|
|
6224
6254
|
}
|
|
6225
6255
|
}
|
|
6226
|
-
return
|
|
6256
|
+
return ct({
|
|
6227
6257
|
width: d,
|
|
6228
6258
|
height: f,
|
|
6229
6259
|
x: l,
|
|
6230
6260
|
y: c
|
|
6231
6261
|
});
|
|
6232
6262
|
}
|
|
6233
|
-
function
|
|
6234
|
-
const e =
|
|
6263
|
+
function Lt(h, t) {
|
|
6264
|
+
const e = gt(h).scrollLeft;
|
|
6235
6265
|
return t ? t.left + e : G(F(h)).left + e;
|
|
6236
6266
|
}
|
|
6237
|
-
function
|
|
6267
|
+
function ne(h, t, e) {
|
|
6238
6268
|
e === void 0 && (e = !1);
|
|
6239
6269
|
const i = h.getBoundingClientRect(), s = i.left + t.scrollLeft - (e ? 0 : (
|
|
6240
6270
|
// RTL <body> scrollbar.
|
|
6241
|
-
|
|
6271
|
+
Lt(h, i)
|
|
6242
6272
|
)), o = i.top + t.scrollTop;
|
|
6243
6273
|
return {
|
|
6244
6274
|
x: s,
|
|
6245
6275
|
y: o
|
|
6246
6276
|
};
|
|
6247
6277
|
}
|
|
6248
|
-
function
|
|
6278
|
+
function ui(h) {
|
|
6249
6279
|
let {
|
|
6250
6280
|
elements: t,
|
|
6251
6281
|
rect: e,
|
|
6252
6282
|
offsetParent: i,
|
|
6253
6283
|
strategy: s
|
|
6254
6284
|
} = h;
|
|
6255
|
-
const o = s === "fixed", r = F(i), a = t ?
|
|
6285
|
+
const o = s === "fixed", r = F(i), a = t ? xt(t.floating) : !1;
|
|
6256
6286
|
if (i === r || a && o)
|
|
6257
6287
|
return e;
|
|
6258
6288
|
let l = {
|
|
@@ -6260,11 +6290,11 @@ function fi(h) {
|
|
|
6260
6290
|
scrollTop: 0
|
|
6261
6291
|
}, c = Y(1);
|
|
6262
6292
|
const d = Y(0), f = K(i);
|
|
6263
|
-
if ((f || !f && !o) && ((Z(i) !== "body" || it(r)) && (l =
|
|
6293
|
+
if ((f || !f && !o) && ((Z(i) !== "body" || it(r)) && (l = gt(i)), K(i))) {
|
|
6264
6294
|
const u = G(i);
|
|
6265
6295
|
c = U(i), d.x = u.x + i.clientLeft, d.y = u.y + i.clientTop;
|
|
6266
6296
|
}
|
|
6267
|
-
const x = r && !f && !o ?
|
|
6297
|
+
const x = r && !f && !o ? ne(r, l, !0) : Y(0);
|
|
6268
6298
|
return {
|
|
6269
6299
|
width: e.width * c.x,
|
|
6270
6300
|
height: e.height * c.y,
|
|
@@ -6272,26 +6302,26 @@ function fi(h) {
|
|
|
6272
6302
|
y: e.y * c.y - l.scrollTop * c.y + d.y + x.y
|
|
6273
6303
|
};
|
|
6274
6304
|
}
|
|
6275
|
-
function
|
|
6305
|
+
function xi(h) {
|
|
6276
6306
|
return Array.from(h.getClientRects());
|
|
6277
6307
|
}
|
|
6278
|
-
function
|
|
6279
|
-
const t = F(h), e =
|
|
6280
|
-
let r = -e.scrollLeft +
|
|
6308
|
+
function gi(h) {
|
|
6309
|
+
const t = F(h), e = gt(h), i = h.ownerDocument.body, s = z(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), o = z(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
|
|
6310
|
+
let r = -e.scrollLeft + Lt(h);
|
|
6281
6311
|
const a = -e.scrollTop;
|
|
6282
|
-
return
|
|
6312
|
+
return X(i).direction === "rtl" && (r += z(t.clientWidth, i.clientWidth) - s), {
|
|
6283
6313
|
width: s,
|
|
6284
6314
|
height: o,
|
|
6285
6315
|
x: r,
|
|
6286
6316
|
y: a
|
|
6287
6317
|
};
|
|
6288
6318
|
}
|
|
6289
|
-
function
|
|
6319
|
+
function wi(h, t) {
|
|
6290
6320
|
const e = N(h), i = F(h), s = e.visualViewport;
|
|
6291
6321
|
let o = i.clientWidth, r = i.clientHeight, a = 0, l = 0;
|
|
6292
6322
|
if (s) {
|
|
6293
6323
|
o = s.width, r = s.height;
|
|
6294
|
-
const c =
|
|
6324
|
+
const c = Tt();
|
|
6295
6325
|
(!c || c && t === "fixed") && (a = s.offsetLeft, l = s.offsetTop);
|
|
6296
6326
|
}
|
|
6297
6327
|
return {
|
|
@@ -6301,8 +6331,8 @@ function gi(h, t) {
|
|
|
6301
6331
|
y: l
|
|
6302
6332
|
};
|
|
6303
6333
|
}
|
|
6304
|
-
const
|
|
6305
|
-
function
|
|
6334
|
+
const mi = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
6335
|
+
function Ei(h, t) {
|
|
6306
6336
|
const e = G(h, !0, t === "fixed"), i = e.top + h.clientTop, s = e.left + h.clientLeft, o = K(h) ? U(h) : Y(1), r = h.clientWidth * o.x, a = h.clientHeight * o.y, l = s * o.x, c = i * o.y;
|
|
6307
6337
|
return {
|
|
6308
6338
|
width: r,
|
|
@@ -6311,16 +6341,16 @@ function mi(h, t) {
|
|
|
6311
6341
|
y: c
|
|
6312
6342
|
};
|
|
6313
6343
|
}
|
|
6314
|
-
function
|
|
6344
|
+
function Vt(h, t, e) {
|
|
6315
6345
|
let i;
|
|
6316
6346
|
if (t === "viewport")
|
|
6317
|
-
i =
|
|
6347
|
+
i = wi(h, e);
|
|
6318
6348
|
else if (t === "document")
|
|
6319
|
-
i =
|
|
6320
|
-
else if (
|
|
6321
|
-
i =
|
|
6349
|
+
i = gi(F(h));
|
|
6350
|
+
else if (B(t))
|
|
6351
|
+
i = Ei(t, e);
|
|
6322
6352
|
else {
|
|
6323
|
-
const s =
|
|
6353
|
+
const s = re(h);
|
|
6324
6354
|
i = {
|
|
6325
6355
|
x: t.x - s.x,
|
|
6326
6356
|
y: t.y - s.y,
|
|
@@ -6328,36 +6358,36 @@ function Wt(h, t, e) {
|
|
|
6328
6358
|
height: t.height
|
|
6329
6359
|
};
|
|
6330
6360
|
}
|
|
6331
|
-
return
|
|
6361
|
+
return ct(i);
|
|
6332
6362
|
}
|
|
6333
|
-
function
|
|
6363
|
+
function ae(h, t) {
|
|
6334
6364
|
const e = P(h);
|
|
6335
|
-
return e === t || !
|
|
6365
|
+
return e === t || !B(e) || q(e) ? !1 : X(e).position === "fixed" || ae(e, t);
|
|
6336
6366
|
}
|
|
6337
|
-
function
|
|
6367
|
+
function pi(h, t) {
|
|
6338
6368
|
const e = t.get(h);
|
|
6339
6369
|
if (e)
|
|
6340
6370
|
return e;
|
|
6341
|
-
let i = Q(h, [], !1).filter((a) =>
|
|
6342
|
-
const o =
|
|
6371
|
+
let i = Q(h, [], !1).filter((a) => B(a) && Z(a) !== "body"), s = null;
|
|
6372
|
+
const o = X(h).position === "fixed";
|
|
6343
6373
|
let r = o ? P(h) : h;
|
|
6344
|
-
for (;
|
|
6345
|
-
const a =
|
|
6346
|
-
!l && a.position === "fixed" && (s = null), (o ? !l && !s : !l && a.position === "static" && !!s &&
|
|
6374
|
+
for (; B(r) && !q(r); ) {
|
|
6375
|
+
const a = X(r), l = St(r);
|
|
6376
|
+
!l && a.position === "fixed" && (s = null), (o ? !l && !s : !l && a.position === "static" && !!s && mi.has(s.position) || it(r) && !l && ae(h, r)) ? i = i.filter((d) => d !== r) : s = a, r = P(r);
|
|
6347
6377
|
}
|
|
6348
6378
|
return t.set(h, i), i;
|
|
6349
6379
|
}
|
|
6350
|
-
function
|
|
6380
|
+
function Ci(h) {
|
|
6351
6381
|
let {
|
|
6352
6382
|
element: t,
|
|
6353
6383
|
boundary: e,
|
|
6354
6384
|
rootBoundary: i,
|
|
6355
6385
|
strategy: s
|
|
6356
6386
|
} = h;
|
|
6357
|
-
const r = [...e === "clippingAncestors" ?
|
|
6358
|
-
const f =
|
|
6387
|
+
const r = [...e === "clippingAncestors" ? xt(t) ? [] : pi(t, this._c) : [].concat(e), i], a = r[0], l = r.reduce((c, d) => {
|
|
6388
|
+
const f = Vt(t, d, s);
|
|
6359
6389
|
return c.top = z(f.top, c.top), c.right = j(f.right, c.right), c.bottom = j(f.bottom, c.bottom), c.left = z(f.left, c.left), c;
|
|
6360
|
-
},
|
|
6390
|
+
}, Vt(t, a, s));
|
|
6361
6391
|
return {
|
|
6362
6392
|
width: l.right - l.left,
|
|
6363
6393
|
height: l.bottom - l.top,
|
|
@@ -6365,17 +6395,17 @@ function pi(h) {
|
|
|
6365
6395
|
y: l.top
|
|
6366
6396
|
};
|
|
6367
6397
|
}
|
|
6368
|
-
function
|
|
6398
|
+
function yi(h) {
|
|
6369
6399
|
const {
|
|
6370
6400
|
width: t,
|
|
6371
6401
|
height: e
|
|
6372
|
-
} =
|
|
6402
|
+
} = oe(h);
|
|
6373
6403
|
return {
|
|
6374
6404
|
width: t,
|
|
6375
6405
|
height: e
|
|
6376
6406
|
};
|
|
6377
6407
|
}
|
|
6378
|
-
function
|
|
6408
|
+
function bi(h, t, e) {
|
|
6379
6409
|
const i = K(t), s = F(t), o = e === "fixed", r = G(h, !0, o, t);
|
|
6380
6410
|
let a = {
|
|
6381
6411
|
scrollLeft: 0,
|
|
@@ -6383,15 +6413,15 @@ function yi(h, t, e) {
|
|
|
6383
6413
|
};
|
|
6384
6414
|
const l = Y(0);
|
|
6385
6415
|
function c() {
|
|
6386
|
-
l.x =
|
|
6416
|
+
l.x = Lt(s);
|
|
6387
6417
|
}
|
|
6388
6418
|
if (i || !i && !o)
|
|
6389
|
-
if ((Z(t) !== "body" || it(s)) && (a =
|
|
6419
|
+
if ((Z(t) !== "body" || it(s)) && (a = gt(t)), i) {
|
|
6390
6420
|
const u = G(t, !0, o, t);
|
|
6391
6421
|
l.x = u.x + t.clientLeft, l.y = u.y + t.clientTop;
|
|
6392
6422
|
} else s && c();
|
|
6393
6423
|
o && !i && s && c();
|
|
6394
|
-
const d = s && !i && !o ?
|
|
6424
|
+
const d = s && !i && !o ? ne(s, a) : Y(0), f = r.left + a.scrollLeft - l.x - d.x, x = r.top + a.scrollTop - l.y - d.y;
|
|
6395
6425
|
return {
|
|
6396
6426
|
x: f,
|
|
6397
6427
|
y: x,
|
|
@@ -6399,39 +6429,39 @@ function yi(h, t, e) {
|
|
|
6399
6429
|
height: r.height
|
|
6400
6430
|
};
|
|
6401
6431
|
}
|
|
6402
|
-
function
|
|
6403
|
-
return
|
|
6432
|
+
function wt(h) {
|
|
6433
|
+
return X(h).position === "static";
|
|
6404
6434
|
}
|
|
6405
|
-
function
|
|
6406
|
-
if (!K(h) ||
|
|
6435
|
+
function Pt(h, t) {
|
|
6436
|
+
if (!K(h) || X(h).position === "fixed")
|
|
6407
6437
|
return null;
|
|
6408
6438
|
if (t)
|
|
6409
6439
|
return t(h);
|
|
6410
6440
|
let e = h.offsetParent;
|
|
6411
6441
|
return F(h) === e && (e = e.ownerDocument.body), e;
|
|
6412
6442
|
}
|
|
6413
|
-
function
|
|
6443
|
+
function le(h, t) {
|
|
6414
6444
|
const e = N(h);
|
|
6415
|
-
if (
|
|
6445
|
+
if (xt(h))
|
|
6416
6446
|
return e;
|
|
6417
6447
|
if (!K(h)) {
|
|
6418
6448
|
let s = P(h);
|
|
6419
6449
|
for (; s && !q(s); ) {
|
|
6420
|
-
if (
|
|
6450
|
+
if (B(s) && !wt(s))
|
|
6421
6451
|
return s;
|
|
6422
6452
|
s = P(s);
|
|
6423
6453
|
}
|
|
6424
6454
|
return e;
|
|
6425
6455
|
}
|
|
6426
|
-
let i =
|
|
6427
|
-
for (; i &&
|
|
6428
|
-
i =
|
|
6429
|
-
return i && q(i) &&
|
|
6456
|
+
let i = Pt(h, t);
|
|
6457
|
+
for (; i && oi(i) && wt(i); )
|
|
6458
|
+
i = Pt(i, t);
|
|
6459
|
+
return i && q(i) && wt(i) && !St(i) ? e : i || ci(h) || e;
|
|
6430
6460
|
}
|
|
6431
|
-
const
|
|
6432
|
-
const t = this.getOffsetParent ||
|
|
6461
|
+
const vi = async function(h) {
|
|
6462
|
+
const t = this.getOffsetParent || le, e = this.getDimensions, i = await e(h.floating);
|
|
6433
6463
|
return {
|
|
6434
|
-
reference:
|
|
6464
|
+
reference: bi(h.reference, await t(h.floating), h.strategy),
|
|
6435
6465
|
floating: {
|
|
6436
6466
|
x: 0,
|
|
6437
6467
|
y: 0,
|
|
@@ -6440,25 +6470,25 @@ const bi = async function(h) {
|
|
|
6440
6470
|
}
|
|
6441
6471
|
};
|
|
6442
6472
|
};
|
|
6443
|
-
function
|
|
6444
|
-
return
|
|
6473
|
+
function Ii(h) {
|
|
6474
|
+
return X(h).direction === "rtl";
|
|
6445
6475
|
}
|
|
6446
|
-
const
|
|
6447
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
6476
|
+
const Ri = {
|
|
6477
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: ui,
|
|
6448
6478
|
getDocumentElement: F,
|
|
6449
|
-
getClippingRect:
|
|
6450
|
-
getOffsetParent:
|
|
6451
|
-
getElementRects:
|
|
6452
|
-
getClientRects:
|
|
6453
|
-
getDimensions:
|
|
6479
|
+
getClippingRect: Ci,
|
|
6480
|
+
getOffsetParent: le,
|
|
6481
|
+
getElementRects: vi,
|
|
6482
|
+
getClientRects: xi,
|
|
6483
|
+
getDimensions: yi,
|
|
6454
6484
|
getScale: U,
|
|
6455
|
-
isElement:
|
|
6456
|
-
isRTL:
|
|
6485
|
+
isElement: B,
|
|
6486
|
+
isRTL: Ii
|
|
6457
6487
|
};
|
|
6458
|
-
function
|
|
6488
|
+
function ce(h, t) {
|
|
6459
6489
|
return h.x === t.x && h.y === t.y && h.width === t.width && h.height === t.height;
|
|
6460
6490
|
}
|
|
6461
|
-
function
|
|
6491
|
+
function _i(h, t) {
|
|
6462
6492
|
let e = null, i;
|
|
6463
6493
|
const s = F(h);
|
|
6464
6494
|
function o() {
|
|
@@ -6475,36 +6505,36 @@ function vi(h, t) {
|
|
|
6475
6505
|
} = c;
|
|
6476
6506
|
if (a || t(), !x || !u)
|
|
6477
6507
|
return;
|
|
6478
|
-
const g = st(f), m = st(s.clientWidth - (d + x)), w = st(s.clientHeight - (f + u)), E = st(d),
|
|
6508
|
+
const g = st(f), m = st(s.clientWidth - (d + x)), w = st(s.clientHeight - (f + u)), E = st(d), p = {
|
|
6479
6509
|
rootMargin: -g + "px " + -m + "px " + -w + "px " + -E + "px",
|
|
6480
6510
|
threshold: z(0, j(1, l)) || 1
|
|
6481
6511
|
};
|
|
6482
6512
|
let b = !0;
|
|
6483
|
-
function y(
|
|
6484
|
-
const
|
|
6485
|
-
if (
|
|
6513
|
+
function y(R) {
|
|
6514
|
+
const S = R[0].intersectionRatio;
|
|
6515
|
+
if (S !== l) {
|
|
6486
6516
|
if (!b)
|
|
6487
6517
|
return r();
|
|
6488
|
-
|
|
6518
|
+
S ? r(!1, S) : i = setTimeout(() => {
|
|
6489
6519
|
r(!1, 1e-7);
|
|
6490
6520
|
}, 1e3);
|
|
6491
6521
|
}
|
|
6492
|
-
|
|
6522
|
+
S === 1 && !ce(c, h.getBoundingClientRect()) && r(), b = !1;
|
|
6493
6523
|
}
|
|
6494
6524
|
try {
|
|
6495
6525
|
e = new IntersectionObserver(y, {
|
|
6496
|
-
...
|
|
6526
|
+
...p,
|
|
6497
6527
|
// Handle <iframe>s
|
|
6498
6528
|
root: s.ownerDocument
|
|
6499
6529
|
});
|
|
6500
6530
|
} catch {
|
|
6501
|
-
e = new IntersectionObserver(y,
|
|
6531
|
+
e = new IntersectionObserver(y, p);
|
|
6502
6532
|
}
|
|
6503
6533
|
e.observe(h);
|
|
6504
6534
|
}
|
|
6505
6535
|
return r(!0), o;
|
|
6506
6536
|
}
|
|
6507
|
-
function
|
|
6537
|
+
function yt(h, t, e, i) {
|
|
6508
6538
|
i === void 0 && (i = {});
|
|
6509
6539
|
const {
|
|
6510
6540
|
ancestorScroll: s = !0,
|
|
@@ -6512,48 +6542,48 @@ function Ct(h, t, e, i) {
|
|
|
6512
6542
|
elementResize: r = typeof ResizeObserver == "function",
|
|
6513
6543
|
layoutShift: a = typeof IntersectionObserver == "function",
|
|
6514
6544
|
animationFrame: l = !1
|
|
6515
|
-
} = i, c =
|
|
6545
|
+
} = i, c = Ot(h), d = s || o ? [...c ? Q(c) : [], ...Q(t)] : [];
|
|
6516
6546
|
d.forEach((E) => {
|
|
6517
6547
|
s && E.addEventListener("scroll", e, {
|
|
6518
6548
|
passive: !0
|
|
6519
6549
|
}), o && E.addEventListener("resize", e);
|
|
6520
6550
|
});
|
|
6521
|
-
const f = c && a ?
|
|
6551
|
+
const f = c && a ? _i(c, e) : null;
|
|
6522
6552
|
let x = -1, u = null;
|
|
6523
6553
|
r && (u = new ResizeObserver((E) => {
|
|
6524
|
-
let [
|
|
6525
|
-
|
|
6526
|
-
var
|
|
6527
|
-
(
|
|
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);
|
|
6528
6558
|
})), e();
|
|
6529
6559
|
}), c && !l && u.observe(c), u.observe(t));
|
|
6530
6560
|
let g, m = l ? G(h) : null;
|
|
6531
6561
|
l && w();
|
|
6532
6562
|
function w() {
|
|
6533
6563
|
const E = G(h);
|
|
6534
|
-
m && !
|
|
6564
|
+
m && !ce(m, E) && e(), m = E, g = requestAnimationFrame(w);
|
|
6535
6565
|
}
|
|
6536
6566
|
return e(), () => {
|
|
6537
6567
|
var E;
|
|
6538
|
-
d.forEach((
|
|
6539
|
-
s &&
|
|
6568
|
+
d.forEach((C) => {
|
|
6569
|
+
s && C.removeEventListener("scroll", e), o && C.removeEventListener("resize", e);
|
|
6540
6570
|
}), f == null || f(), (E = u) == null || E.disconnect(), u = null, l && cancelAnimationFrame(g);
|
|
6541
6571
|
};
|
|
6542
6572
|
}
|
|
6543
|
-
const
|
|
6573
|
+
const ht = ti, dt = ei, Mt = Ze, Si = qe, ft = (h, t, e) => {
|
|
6544
6574
|
const i = /* @__PURE__ */ new Map(), s = {
|
|
6545
|
-
platform:
|
|
6575
|
+
platform: Ri,
|
|
6546
6576
|
...e
|
|
6547
6577
|
}, o = {
|
|
6548
6578
|
...s.platform,
|
|
6549
6579
|
_c: i
|
|
6550
6580
|
};
|
|
6551
|
-
return
|
|
6581
|
+
return je(h, t, {
|
|
6552
6582
|
...s,
|
|
6553
6583
|
platform: o
|
|
6554
6584
|
});
|
|
6555
6585
|
};
|
|
6556
|
-
let
|
|
6586
|
+
let Ti = class {
|
|
6557
6587
|
constructor(t) {
|
|
6558
6588
|
n(this, "ctx");
|
|
6559
6589
|
n(this, "enable", !1);
|
|
@@ -6619,7 +6649,7 @@ let Si = class {
|
|
|
6619
6649
|
return;
|
|
6620
6650
|
this.enable = !0, this.contentEl.style.maxWidth = `${t.overflowTooltipMaxWidth || 500}px`, this.contentEl.style.minWidth = "100px", this.contentEl.style.width = "100%", this.contentEl.style.display = "inline-block", this.contentEl.style.wordBreak = "break-all", this.contentEl.style.lineHeight = "1.5", this.contentEl.innerText = e;
|
|
6621
6651
|
const s = t.drawX + i.x, o = t.drawY + i.y;
|
|
6622
|
-
|
|
6652
|
+
ft({
|
|
6623
6653
|
getBoundingClientRect() {
|
|
6624
6654
|
return {
|
|
6625
6655
|
width: t.visibleWidth,
|
|
@@ -6634,7 +6664,7 @@ let Si = class {
|
|
|
6634
6664
|
}
|
|
6635
6665
|
}, this.floatingEl, {
|
|
6636
6666
|
placement: t.overflowTooltipPlacement,
|
|
6637
|
-
middleware: [
|
|
6667
|
+
middleware: [dt(), Mt(), ht(6), Si({ element: this.arrowEl })]
|
|
6638
6668
|
}).then((a) => {
|
|
6639
6669
|
const { x: l, y: c, placement: d, middlewareData: f } = a;
|
|
6640
6670
|
if (Object.assign(this.floatingEl.style, {
|
|
@@ -6673,7 +6703,7 @@ let Si = class {
|
|
|
6673
6703
|
this.contentEl.remove(), this.arrowEl.remove(), this.floatingEl.remove();
|
|
6674
6704
|
}
|
|
6675
6705
|
};
|
|
6676
|
-
class
|
|
6706
|
+
class Oi {
|
|
6677
6707
|
constructor(t) {
|
|
6678
6708
|
n(this, "editorEl");
|
|
6679
6709
|
n(this, "inputEl");
|
|
@@ -6702,7 +6732,7 @@ class Ti {
|
|
|
6702
6732
|
}), this.ctx.on("cellMousedown", () => {
|
|
6703
6733
|
this.inputEl.focus({ preventScroll: !0 });
|
|
6704
6734
|
}), this.ctx.on("keydown", (t) => {
|
|
6705
|
-
if (!this.ctx.isTarget(t) || !this.ctx.focusCell)
|
|
6735
|
+
if (!this.ctx.isTarget(t) || !this.ctx.focusCell || this.ctx.finding)
|
|
6706
6736
|
return;
|
|
6707
6737
|
if (t.code === "Escape" && this.ctx.editing) {
|
|
6708
6738
|
this.cancel = !0;
|
|
@@ -6866,7 +6896,7 @@ class Ti {
|
|
|
6866
6896
|
(t = this.editorEl) == null || t.remove();
|
|
6867
6897
|
}
|
|
6868
6898
|
}
|
|
6869
|
-
let
|
|
6899
|
+
let Li = class {
|
|
6870
6900
|
constructor(t) {
|
|
6871
6901
|
n(this, "ctx");
|
|
6872
6902
|
n(this, "emptyEl");
|
|
@@ -6890,7 +6920,7 @@ let Oi = class {
|
|
|
6890
6920
|
this.emptyEl.remove();
|
|
6891
6921
|
}
|
|
6892
6922
|
};
|
|
6893
|
-
class
|
|
6923
|
+
class Mi {
|
|
6894
6924
|
constructor(t) {
|
|
6895
6925
|
n(this, "ctx");
|
|
6896
6926
|
n(this, "observer");
|
|
@@ -6904,7 +6934,7 @@ class Li {
|
|
|
6904
6934
|
}
|
|
6905
6935
|
init() {
|
|
6906
6936
|
this.observer = new MutationObserver(
|
|
6907
|
-
|
|
6937
|
+
bt(() => {
|
|
6908
6938
|
const t = this.ctx.overlayerElement.querySelectorAll('[data-auto-height="true"]'), e = /* @__PURE__ */ new Map();
|
|
6909
6939
|
t.forEach((o) => {
|
|
6910
6940
|
const r = Number(o.getAttribute("data-row-index")), a = Number(o.getAttribute("data-col-index"));
|
|
@@ -7126,7 +7156,7 @@ class Li {
|
|
|
7126
7156
|
};
|
|
7127
7157
|
}
|
|
7128
7158
|
}
|
|
7129
|
-
class
|
|
7159
|
+
class zt {
|
|
7130
7160
|
constructor(t, e = [], i = {}) {
|
|
7131
7161
|
n(this, "container");
|
|
7132
7162
|
n(this, "menuData");
|
|
@@ -7160,7 +7190,7 @@ class Pt {
|
|
|
7160
7190
|
const o = this.createElement("span", "e-virt-table-menu-item-text");
|
|
7161
7191
|
if (o.textContent = t.label, s.appendChild(o), i.appendChild(s), (r = t.children) != null && r.length) {
|
|
7162
7192
|
const a = this.createElement("span", "e-virt-table-menu-arrow");
|
|
7163
|
-
a.innerHTML =
|
|
7193
|
+
a.innerHTML = nt, i.appendChild(a);
|
|
7164
7194
|
const l = this.createSubmenu(t.children);
|
|
7165
7195
|
i._submenu = l, this.container.appendChild(l);
|
|
7166
7196
|
}
|
|
@@ -7214,10 +7244,10 @@ class Pt {
|
|
|
7214
7244
|
async showSubmenu(t, e) {
|
|
7215
7245
|
if (this.activeSubmenus.has(e)) return;
|
|
7216
7246
|
this.activeSubmenus.add(e), e.classList.add("show");
|
|
7217
|
-
const i =
|
|
7218
|
-
const s = this.container.getBoundingClientRect(), o = window.innerWidth, r = e.offsetWidth || 200, a = o - s.right, l = s.left, c = a >= r || a >= l ? "right-start" : "left-start", { x: d, y: f } = await
|
|
7247
|
+
const i = yt(t, e, async () => {
|
|
7248
|
+
const s = this.container.getBoundingClientRect(), o = window.innerWidth, r = e.offsetWidth || 200, a = o - s.right, l = s.left, c = a >= r || a >= l ? "right-start" : "left-start", { x: d, y: f } = await ft(t, e, {
|
|
7219
7249
|
placement: c,
|
|
7220
|
-
middleware: [
|
|
7250
|
+
middleware: [ht(8), dt({ padding: 8 })]
|
|
7221
7251
|
});
|
|
7222
7252
|
Object.assign(e.style, {
|
|
7223
7253
|
left: `${d}px`,
|
|
@@ -7284,10 +7314,10 @@ class Pt {
|
|
|
7284
7314
|
}),
|
|
7285
7315
|
contextElement: document.body
|
|
7286
7316
|
};
|
|
7287
|
-
|
|
7288
|
-
|
|
7317
|
+
yt(e, this.container, () => {
|
|
7318
|
+
ft(e, this.container, {
|
|
7289
7319
|
placement: "right-start",
|
|
7290
|
-
middleware: [
|
|
7320
|
+
middleware: [ht(), dt(), Mt()]
|
|
7291
7321
|
}).then(({ x: i, y: s }) => {
|
|
7292
7322
|
this.container && Object.assign(this.container.style, {
|
|
7293
7323
|
left: `${i}px`,
|
|
@@ -7352,7 +7382,7 @@ class Pt {
|
|
|
7352
7382
|
}), t.remove();
|
|
7353
7383
|
}
|
|
7354
7384
|
}
|
|
7355
|
-
class
|
|
7385
|
+
class Ai {
|
|
7356
7386
|
constructor(t) {
|
|
7357
7387
|
n(this, "ctx");
|
|
7358
7388
|
n(this, "contextMenuEl");
|
|
@@ -7372,7 +7402,7 @@ class Mi {
|
|
|
7372
7402
|
if (!i || r.length === 0) return;
|
|
7373
7403
|
e.preventDefault();
|
|
7374
7404
|
const { xArr: a, yArr: l } = this.ctx.selector, [c, d] = a, [f, x] = l, { rowIndex: u, colIndex: g } = t;
|
|
7375
|
-
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
|
|
7405
|
+
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 zt(this.contextMenuEl, r, {
|
|
7376
7406
|
onClick: (w, E) => {
|
|
7377
7407
|
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());
|
|
7378
7408
|
}
|
|
@@ -7390,27 +7420,32 @@ class Mi {
|
|
|
7390
7420
|
e.preventDefault();
|
|
7391
7421
|
const { xArr: x } = this.ctx.selector, [u, g] = x, { colIndex: m } = t;
|
|
7392
7422
|
m >= u && m <= g || (this.ctx.focusCellHeader = t, this.ctx.emit("selectCols", t)), this.currentDOMTreeMenu && this.currentDOMTreeMenu.destroy();
|
|
7393
|
-
const E = this.ctx.database.getColumns(),
|
|
7394
|
-
...
|
|
7423
|
+
const E = this.ctx.database.getColumns(), C = f.map((p) => p.value === "visible" ? {
|
|
7424
|
+
...p,
|
|
7395
7425
|
children: this.filterColumns(E)
|
|
7396
|
-
} :
|
|
7397
|
-
this.ctx.contextMenuIng = !0, this.currentDOMTreeMenu = new
|
|
7398
|
-
onClick: (
|
|
7399
|
-
const { xArr: y } = this.ctx.selector, [
|
|
7426
|
+
} : p);
|
|
7427
|
+
this.ctx.contextMenuIng = !0, this.currentDOMTreeMenu = new zt(this.contextMenuEl, C, {
|
|
7428
|
+
onClick: (p, b) => {
|
|
7429
|
+
const { xArr: y } = this.ctx.selector, [R, S] = y;
|
|
7400
7430
|
if (b === "fixedLeft" || b === "fixedRight" || b === "fixedNone") {
|
|
7401
|
-
const
|
|
7431
|
+
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);
|
|
7402
7432
|
this.ctx.database.setCustomHeaderFixedData(
|
|
7403
|
-
|
|
7433
|
+
O,
|
|
7404
7434
|
b === "fixedLeft" ? "left" : b === "fixedRight" ? "right" : ""
|
|
7405
7435
|
), this.hide();
|
|
7406
7436
|
} else if (b === "hide") {
|
|
7407
|
-
const
|
|
7408
|
-
|
|
7437
|
+
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
|
+
O.length > 0 && this.ctx.database.setCustomHeaderHideData(O, !0), this.hide();
|
|
7409
7439
|
} else if (b !== "visible") if (b.startsWith("visible_")) {
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7440
|
+
if (!p.key) return;
|
|
7441
|
+
if (p.children) {
|
|
7442
|
+
const _ = this.getLeafKeys(p.children);
|
|
7443
|
+
this.ctx.database.setCustomHeaderHideData(_, !1);
|
|
7444
|
+
} else
|
|
7445
|
+
this.ctx.database.setCustomHeaderHideData([p.key], !1);
|
|
7446
|
+
this.currentDOMTreeMenu && this.currentDOMTreeMenu.removeSubMenuItem(b);
|
|
7447
|
+
const O = this.ctx.database.getColumns();
|
|
7448
|
+
J(O).filter((_) => _.hide).length === 0 && this.hide();
|
|
7414
7449
|
} else b === "resetHeader" && (this.ctx.database.resetCustomHeader(), this.hide());
|
|
7415
7450
|
}
|
|
7416
7451
|
}), this.positionMenu(e);
|
|
@@ -7432,10 +7467,10 @@ class Mi {
|
|
|
7432
7467
|
}),
|
|
7433
7468
|
contextElement: document.body
|
|
7434
7469
|
};
|
|
7435
|
-
|
|
7436
|
-
|
|
7470
|
+
yt(e, this.contextMenuEl, () => {
|
|
7471
|
+
ft(e, this.contextMenuEl, {
|
|
7437
7472
|
placement: "right-start",
|
|
7438
|
-
middleware: [
|
|
7473
|
+
middleware: [ht(), dt(), Mt()]
|
|
7439
7474
|
}).then(({ x: i, y: s }) => {
|
|
7440
7475
|
this.contextMenuEl && Object.assign(this.contextMenuEl.style, {
|
|
7441
7476
|
left: `${i}px`,
|
|
@@ -7451,14 +7486,18 @@ class Mi {
|
|
|
7451
7486
|
const s = this.filterColumns(i.children);
|
|
7452
7487
|
s.length > 0 && e.push({
|
|
7453
7488
|
label: i.title,
|
|
7489
|
+
key: i.key,
|
|
7454
7490
|
value: `visible_${i.key}`,
|
|
7455
|
-
disabled:
|
|
7456
|
-
// 非末级,且有子项保留 → disabled
|
|
7491
|
+
// disabled: true, // 非末级,且有子项保留 → disabled
|
|
7457
7492
|
children: s
|
|
7458
7493
|
});
|
|
7459
|
-
} else i.hide && e.push({ label: i.title, value: `visible_${i.key}
|
|
7494
|
+
} else i.hide && e.push({ label: i.title, value: `visible_${i.key}`, key: i.key });
|
|
7460
7495
|
return e;
|
|
7461
7496
|
}
|
|
7497
|
+
// 递归获取所有子项key
|
|
7498
|
+
getLeafKeys(t) {
|
|
7499
|
+
return t.reduce((e, i) => (!i.children || i.children.length === 0 ? e.push(String(i.key)) : e.push(...this.getLeafKeys(i.children)), e), []);
|
|
7500
|
+
}
|
|
7462
7501
|
hide() {
|
|
7463
7502
|
this.currentDOMTreeMenu && (this.currentDOMTreeMenu.destroy(), this.currentDOMTreeMenu = void 0), this.contextMenuEl.style.display = "none", this.ctx.contextMenuIng = !1;
|
|
7464
7503
|
}
|
|
@@ -7467,7 +7506,7 @@ class Mi {
|
|
|
7467
7506
|
this.hide(), (t = this.contextMenuEl) == null || t.remove();
|
|
7468
7507
|
}
|
|
7469
7508
|
}
|
|
7470
|
-
class
|
|
7509
|
+
class Hi {
|
|
7471
7510
|
constructor(t) {
|
|
7472
7511
|
n(this, "ctx");
|
|
7473
7512
|
n(this, "loadingEl");
|
|
@@ -7497,7 +7536,177 @@ class Ai {
|
|
|
7497
7536
|
this.loadingEl.remove();
|
|
7498
7537
|
}
|
|
7499
7538
|
}
|
|
7500
|
-
class
|
|
7539
|
+
class Di {
|
|
7540
|
+
constructor(t) {
|
|
7541
|
+
n(this, "ctx");
|
|
7542
|
+
n(this, "container");
|
|
7543
|
+
n(this, "input");
|
|
7544
|
+
n(this, "prevBtn");
|
|
7545
|
+
n(this, "nextBtn");
|
|
7546
|
+
n(this, "closeBtn");
|
|
7547
|
+
n(this, "countEl");
|
|
7548
|
+
n(this, "loadingEl");
|
|
7549
|
+
n(this, "isVisible", !1);
|
|
7550
|
+
n(this, "searchResults", []);
|
|
7551
|
+
n(this, "currentIndex", -1);
|
|
7552
|
+
n(this, "searchData", []);
|
|
7553
|
+
n(this, "isComposing", !1);
|
|
7554
|
+
this.ctx = t, this.container = this.createContainer(), this.ctx.containerElement.appendChild(this.container), this.bindEvents(), this.ctx.on("keydown", (e) => {
|
|
7555
|
+
if (this.ctx.config.ENABLE_FINDER && !this.ctx.editing) {
|
|
7556
|
+
if ((e.ctrlKey || e.metaKey) && e.code === "KeyF") {
|
|
7557
|
+
e.preventDefault(), this.show();
|
|
7558
|
+
return;
|
|
7559
|
+
}
|
|
7560
|
+
if (this.ctx.finding) {
|
|
7561
|
+
if (e.code === "Escape") {
|
|
7562
|
+
e.preventDefault(), this.hide();
|
|
7563
|
+
return;
|
|
7564
|
+
}
|
|
7565
|
+
if (e.code === "ArrowUp") {
|
|
7566
|
+
e.preventDefault(), this.navigatePrevious();
|
|
7567
|
+
return;
|
|
7568
|
+
}
|
|
7569
|
+
if (e.code === "ArrowDown") {
|
|
7570
|
+
e.preventDefault(), this.navigateNext();
|
|
7571
|
+
return;
|
|
7572
|
+
}
|
|
7573
|
+
}
|
|
7574
|
+
}
|
|
7575
|
+
}), this.ctx.on("setSelector", () => {
|
|
7576
|
+
this.hide();
|
|
7577
|
+
}), this.ctx.on("outsideMousedown", () => {
|
|
7578
|
+
this.hide();
|
|
7579
|
+
});
|
|
7580
|
+
}
|
|
7581
|
+
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) => {
|
|
7589
|
+
const o = t[s];
|
|
7590
|
+
o && ["string", "number"].includes(typeof o.text) && this.searchData.push({
|
|
7591
|
+
rowIndex: 0,
|
|
7592
|
+
colIndex: o.colIndex,
|
|
7593
|
+
text: `${o.text}`,
|
|
7594
|
+
type: "header",
|
|
7595
|
+
colKey: o.key
|
|
7596
|
+
});
|
|
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();
|
|
7616
|
+
}
|
|
7617
|
+
createContainer() {
|
|
7618
|
+
const t = document.createElement("div");
|
|
7619
|
+
t.className = "e-virt-table-finder-bar";
|
|
7620
|
+
const e = document.createElement("div");
|
|
7621
|
+
e.className = "e-virt-table-finder-bar-input-wrapper", this.input = document.createElement("input"), this.input.type = "text", this.input.className = "e-virt-table-finder-bar-input", this.input.placeholder = "", e.appendChild(this.input), this.loadingEl = document.createElement("div"), this.loadingEl.className = "e-virt-table-finder-bar-loading";
|
|
7622
|
+
const i = Zt;
|
|
7623
|
+
this.loadingEl.innerHTML = i, e.appendChild(this.loadingEl), this.countEl = document.createElement("span"), this.countEl.className = "e-virt-table-finder-bar-count";
|
|
7624
|
+
const s = document.createElement("div");
|
|
7625
|
+
return s.className = "e-virt-table-finder-bar-nav", this.prevBtn = document.createElement("button"), this.prevBtn.className = "e-virt-table-finder-bar-nav-btn prev-btn", this.prevBtn.innerHTML = nt, this.nextBtn = document.createElement("button"), this.nextBtn.className = "e-virt-table-finder-bar-nav-btn next-btn", this.nextBtn.innerHTML = nt, s.appendChild(this.prevBtn), s.appendChild(this.nextBtn), this.closeBtn = document.createElement("button"), this.closeBtn.className = "e-virt-table-finder-bar-nav-btn close-btn", this.closeBtn.innerHTML = "×", t.appendChild(e), t.appendChild(this.countEl), t.appendChild(s), t.appendChild(this.closeBtn), t;
|
|
7626
|
+
}
|
|
7627
|
+
bindEvents() {
|
|
7628
|
+
this.input.addEventListener("input", () => {
|
|
7629
|
+
this.isComposing || this.performSearch();
|
|
7630
|
+
}), this.input.addEventListener("compositionstart", () => {
|
|
7631
|
+
this.isComposing = !0;
|
|
7632
|
+
}), this.input.addEventListener("compositionend", () => {
|
|
7633
|
+
this.isComposing = !1, this.performSearch();
|
|
7634
|
+
}), this.prevBtn.addEventListener("click", () => {
|
|
7635
|
+
this.navigatePrevious();
|
|
7636
|
+
}), this.nextBtn.addEventListener("click", () => {
|
|
7637
|
+
this.navigateNext();
|
|
7638
|
+
}), this.closeBtn.addEventListener("click", () => {
|
|
7639
|
+
this.hide();
|
|
7640
|
+
});
|
|
7641
|
+
}
|
|
7642
|
+
performSearch() {
|
|
7643
|
+
const t = this.input.value.trim();
|
|
7644
|
+
if (this.searchResults = [], this.currentIndex = -1, !t) {
|
|
7645
|
+
this.updateCount();
|
|
7646
|
+
return;
|
|
7647
|
+
}
|
|
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();
|
|
7654
|
+
}
|
|
7655
|
+
scrollToCurrentResult() {
|
|
7656
|
+
if (this.currentIndex < 0 || this.currentIndex >= this.searchResults.length)
|
|
7657
|
+
return;
|
|
7658
|
+
const t = this.searchResults[this.currentIndex];
|
|
7659
|
+
this.ctx.finderBar = t;
|
|
7660
|
+
const { rowIndex: e, colIndex: i } = t;
|
|
7661
|
+
this.ctx.emit("scrollToIndex", e, i);
|
|
7662
|
+
}
|
|
7663
|
+
navigateNext() {
|
|
7664
|
+
this.searchResults.length !== 0 && (this.currentIndex = (this.currentIndex + 1) % this.searchResults.length, this.scrollToCurrentResult(), this.updateCount());
|
|
7665
|
+
}
|
|
7666
|
+
navigatePrevious() {
|
|
7667
|
+
this.searchResults.length !== 0 && (this.currentIndex = this.currentIndex <= 0 ? this.searchResults.length - 1 : this.currentIndex - 1, this.scrollToCurrentResult(), this.updateCount());
|
|
7668
|
+
}
|
|
7669
|
+
updateCount() {
|
|
7670
|
+
if (this.searchResults.length === 0)
|
|
7671
|
+
this.input.value.trim() ? (this.countEl.textContent = "0/0", this.countEl.classList.add("no-results")) : (this.countEl.textContent = "", this.countEl.classList.remove("no-results"));
|
|
7672
|
+
else {
|
|
7673
|
+
const t = this.currentIndex + 1, e = this.searchResults.length;
|
|
7674
|
+
this.countEl.textContent = `${t}/${e}`, this.countEl.classList.remove("no-results");
|
|
7675
|
+
}
|
|
7676
|
+
}
|
|
7677
|
+
show() {
|
|
7678
|
+
this.isVisible || (this.isVisible = !0, this.ctx.finding = !0, this.container.classList.add("show"), this.input.focus(), this.initSearchData());
|
|
7679
|
+
}
|
|
7680
|
+
showLoading() {
|
|
7681
|
+
var t;
|
|
7682
|
+
this.loadingEl.classList.add("show"), (t = this.loadingEl.parentElement) == null || t.classList.add("loading"), this.input.readOnly = !0;
|
|
7683
|
+
}
|
|
7684
|
+
hideLoading() {
|
|
7685
|
+
var t;
|
|
7686
|
+
this.loadingEl.classList.remove("show"), (t = this.loadingEl.parentElement) == null || t.classList.remove("loading"), this.input.readOnly = !1;
|
|
7687
|
+
}
|
|
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
|
+
}
|
|
7696
|
+
}
|
|
7697
|
+
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 = {
|
|
7699
|
+
rowIndex: -1,
|
|
7700
|
+
colIndex: -1,
|
|
7701
|
+
text: "",
|
|
7702
|
+
type: "header"
|
|
7703
|
+
}, this.updateCount());
|
|
7704
|
+
}
|
|
7705
|
+
destroy() {
|
|
7706
|
+
this.hide(), this.container.remove();
|
|
7707
|
+
}
|
|
7708
|
+
}
|
|
7709
|
+
class Xi {
|
|
7501
7710
|
constructor(t, e) {
|
|
7502
7711
|
n(this, "options");
|
|
7503
7712
|
n(this, "scroller");
|
|
@@ -7512,6 +7721,7 @@ class ki {
|
|
|
7512
7721
|
n(this, "overlayer");
|
|
7513
7722
|
n(this, "contextMenu");
|
|
7514
7723
|
n(this, "loading");
|
|
7724
|
+
n(this, "finderBar");
|
|
7515
7725
|
n(this, "animationFrameId");
|
|
7516
7726
|
n(this, "animationFrameId2");
|
|
7517
7727
|
n(this, "ctx");
|
|
@@ -7523,7 +7733,7 @@ class ki {
|
|
|
7523
7733
|
o,
|
|
7524
7734
|
r
|
|
7525
7735
|
);
|
|
7526
|
-
this.ctx = new
|
|
7736
|
+
this.ctx = new Me(a, this.options), this.header = new De(this.ctx), this.footer = new ke(this.ctx), this.body = new Ne(this.ctx), this.scroller = new Ae(this.ctx), this.selector = new Be(this.ctx), this.autofill = new Xe(this.ctx), this.tooltip = new Ti(this.ctx), this.empty = new Li(this.ctx), this.editor = new Oi(this.ctx), this.overlayer = new Mi(this.ctx), this.contextMenu = new Ai(this.ctx), this.loading = new Hi(this.ctx), this.finderBar = new Di(this.ctx), this.ctx.on("draw", () => {
|
|
7527
7737
|
this.draw();
|
|
7528
7738
|
}), this.ctx.on("drawView", () => {
|
|
7529
7739
|
this.draw(!0);
|
|
@@ -7783,10 +7993,10 @@ class ki {
|
|
|
7783
7993
|
}
|
|
7784
7994
|
getUtils() {
|
|
7785
7995
|
return {
|
|
7786
|
-
mergeColCell:
|
|
7787
|
-
mergeRowCell:
|
|
7788
|
-
getSpanArrByRow:
|
|
7789
|
-
getSpanObjByColumn:
|
|
7996
|
+
mergeColCell: pe,
|
|
7997
|
+
mergeRowCell: Ee,
|
|
7998
|
+
getSpanArrByRow: Ut,
|
|
7999
|
+
getSpanObjByColumn: jt
|
|
7790
8000
|
};
|
|
7791
8001
|
}
|
|
7792
8002
|
getColumnByKey(t) {
|
|
@@ -7800,10 +8010,10 @@ class ki {
|
|
|
7800
8010
|
* 销毁
|
|
7801
8011
|
*/
|
|
7802
8012
|
destroy() {
|
|
7803
|
-
this.overlayer.destroy(), this.empty.destroy(), this.editor.destroy(), this.tooltip.destroy(), this.selector.destroy(), this.autofill.destroy(), this.contextMenu.destroy(), this.loading.destroy(), this.ctx.destroy(), this.ctx.containerElement.remove();
|
|
8013
|
+
this.overlayer.destroy(), this.empty.destroy(), this.editor.destroy(), this.tooltip.destroy(), this.selector.destroy(), this.autofill.destroy(), this.contextMenu.destroy(), this.loading.destroy(), this.finderBar.destroy(), this.ctx.destroy(), this.ctx.containerElement.remove();
|
|
7804
8014
|
}
|
|
7805
8015
|
}
|
|
7806
8016
|
export {
|
|
7807
|
-
|
|
8017
|
+
Xi as default
|
|
7808
8018
|
};
|
|
7809
8019
|
//# sourceMappingURL=index.es.js.map
|