e-virt-table 1.3.10 → 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 +773 -573
- 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 +4 -0
- package/dist/lib/Config.js +14 -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 +2 -2
- 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/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");
|
|
@@ -1081,9 +1083,9 @@ class ye {
|
|
|
1081
1083
|
TREE_CHILDREN_KEY: d
|
|
1082
1084
|
} = this.ctx.config;
|
|
1083
1085
|
t.forEach((f, x) => {
|
|
1084
|
-
var
|
|
1086
|
+
var p;
|
|
1085
1087
|
d !== "children" && (f.children = f[d]);
|
|
1086
|
-
const u = f[o], g = u != null ? `${u}` :
|
|
1088
|
+
const u = f[o], g = u != null ? `${u}` : $t();
|
|
1087
1089
|
this.itemRowKeyMap.set(f, g);
|
|
1088
1090
|
const m = f._height || a, w = f._readonly;
|
|
1089
1091
|
let E = !0;
|
|
@@ -1098,10 +1100,10 @@ class ye {
|
|
|
1098
1100
|
this.selectionMap.set(g, {
|
|
1099
1101
|
key: c ? f[c] : g,
|
|
1100
1102
|
row: f,
|
|
1101
|
-
check: ((
|
|
1103
|
+
check: ((p = this.selectionMap.get(g)) == null ? void 0 : p.check) || !1
|
|
1102
1104
|
});
|
|
1103
|
-
const
|
|
1104
|
-
this.expandMap.set(g,
|
|
1105
|
+
const C = r || this.expandMap.get(g) || f._expand || !1;
|
|
1106
|
+
this.expandMap.set(g, C), this.rowKeyMap.set(g, {
|
|
1105
1107
|
readonly: w,
|
|
1106
1108
|
index: x,
|
|
1107
1109
|
rowIndex: x,
|
|
@@ -1110,7 +1112,7 @@ class ye {
|
|
|
1110
1112
|
calculatedHeight: -1,
|
|
1111
1113
|
check: !1,
|
|
1112
1114
|
selectable: E,
|
|
1113
|
-
expand:
|
|
1115
|
+
expand: C,
|
|
1114
1116
|
expandLazy: !1,
|
|
1115
1117
|
hasChildren: f._hasChildren || (Array.isArray(f.children) ? f.children.length > 0 : !1),
|
|
1116
1118
|
expandLoading: !1,
|
|
@@ -1318,7 +1320,7 @@ class ye {
|
|
|
1318
1320
|
} else if (s === "string") {
|
|
1319
1321
|
const d = String(a || ""), f = String(l || "");
|
|
1320
1322
|
c = d.localeCompare(f);
|
|
1321
|
-
} else s === "date" && (c =
|
|
1323
|
+
} else s === "date" && (c = ye(a, l));
|
|
1322
1324
|
return i === "asc" ? c : -c;
|
|
1323
1325
|
});
|
|
1324
1326
|
}
|
|
@@ -1433,18 +1435,18 @@ class ye {
|
|
|
1433
1435
|
const a = /* @__PURE__ */ new Set();
|
|
1434
1436
|
let l = [], c = t.map((g) => {
|
|
1435
1437
|
const { rowKey: m, key: w } = g;
|
|
1436
|
-
let E = g.value,
|
|
1437
|
-
const
|
|
1438
|
-
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({
|
|
1439
1441
|
...g,
|
|
1440
|
-
value:
|
|
1442
|
+
value: C,
|
|
1441
1443
|
oldValue: b,
|
|
1442
|
-
row:
|
|
1444
|
+
row: p
|
|
1443
1445
|
}))), {
|
|
1444
1446
|
...g,
|
|
1445
|
-
value:
|
|
1447
|
+
value: C,
|
|
1446
1448
|
oldValue: b,
|
|
1447
|
-
row:
|
|
1449
|
+
row: p
|
|
1448
1450
|
};
|
|
1449
1451
|
});
|
|
1450
1452
|
if (c = c.filter((g) => !l.some((m) => g.rowKey === m.rowKey && g.key === m.key)), l.length) {
|
|
@@ -1459,11 +1461,11 @@ class ye {
|
|
|
1459
1461
|
return;
|
|
1460
1462
|
const { BEFORE_VALUE_CHANGE_METHOD: d } = this.ctx.config;
|
|
1461
1463
|
s === "none" && typeof d == "function" && (c = await d(c), r = !1), c.forEach((g) => {
|
|
1462
|
-
const { value: m, rowKey: w, key: E } = g,
|
|
1464
|
+
const { value: m, rowKey: w, key: E } = g, C = this.getItemValue(w, E);
|
|
1463
1465
|
a.add(w), this.setItemValue(w, E, m, !1, !1, !1, r), o.push({
|
|
1464
1466
|
rowKey: w,
|
|
1465
1467
|
key: E,
|
|
1466
|
-
oldValue:
|
|
1468
|
+
oldValue: C,
|
|
1467
1469
|
newValue: m
|
|
1468
1470
|
});
|
|
1469
1471
|
});
|
|
@@ -1687,19 +1689,19 @@ class ye {
|
|
|
1687
1689
|
if (this.ctx.config.TREE_SELECT_MODE === "auto") {
|
|
1688
1690
|
const c = (w) => {
|
|
1689
1691
|
const E = this.getTreeChildren(w);
|
|
1690
|
-
let
|
|
1691
|
-
for (const
|
|
1692
|
-
|
|
1693
|
-
return
|
|
1692
|
+
let C = [];
|
|
1693
|
+
for (const p of E)
|
|
1694
|
+
C.push(p), C.push(...c(p));
|
|
1695
|
+
return C;
|
|
1694
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;
|
|
1695
1697
|
r = g && !(x === u), a = s || g, s && u > 0 && x === 0 && (a = !1, r = !1);
|
|
1696
1698
|
} else if (this.ctx.config.TREE_SELECT_MODE === "cautious") {
|
|
1697
1699
|
const c = (w) => {
|
|
1698
1700
|
const E = this.getTreeChildren(w);
|
|
1699
|
-
let
|
|
1700
|
-
for (const
|
|
1701
|
-
|
|
1702
|
-
return
|
|
1701
|
+
let C = [];
|
|
1702
|
+
for (const p of E)
|
|
1703
|
+
C.push(p), C.push(...c(p));
|
|
1704
|
+
return C;
|
|
1703
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;
|
|
1704
1706
|
r = g && !m, a = s || m, s && u > 0 && x === 0 && (a = !1, r = !1);
|
|
1705
1707
|
} else this.ctx.config.TREE_SELECT_MODE === "strictly" && (r = !1, a = s);
|
|
@@ -1960,7 +1962,7 @@ class ye {
|
|
|
1960
1962
|
value: this.getItemValue(t, e),
|
|
1961
1963
|
field: e,
|
|
1962
1964
|
fieldValue: this.getItemValue(t, e)
|
|
1963
|
-
}, f = new
|
|
1965
|
+
}, f = new ue(l).validate(c);
|
|
1964
1966
|
this.setValidationError(t, e, f), i(f);
|
|
1965
1967
|
} else
|
|
1966
1968
|
this.clearValidationError(t, e), i([]);
|
|
@@ -2010,43 +2012,43 @@ class ye {
|
|
|
2010
2012
|
}
|
|
2011
2013
|
]
|
|
2012
2014
|
};
|
|
2013
|
-
let w = e, E = e,
|
|
2015
|
+
let w = e, E = e, C = a, p = a, b = [], y = 0, R = 0, S = 0, O = 0;
|
|
2014
2016
|
if (d !== 1 && g) {
|
|
2015
|
-
|
|
2016
|
-
const
|
|
2017
|
-
const
|
|
2018
|
-
return `${I}${
|
|
2017
|
+
O = x;
|
|
2018
|
+
const v = l.reduce((I, _) => {
|
|
2019
|
+
const T = this.getItemValue(s, _) ?? "";
|
|
2020
|
+
return `${I}${T}`;
|
|
2019
2021
|
}, "");
|
|
2020
2022
|
for (let I = e - 1; I >= 0; I--) {
|
|
2021
|
-
const
|
|
2022
|
-
const A = this.getItemValue(
|
|
2023
|
+
const _ = this.rowIndexRowKeyMap.get(I) || "", T = l.reduce((M, L) => {
|
|
2024
|
+
const A = this.getItemValue(_, L) ?? "";
|
|
2023
2025
|
return `${M}${A}`;
|
|
2024
2026
|
}, "");
|
|
2025
|
-
if (
|
|
2027
|
+
if (v === T)
|
|
2026
2028
|
w = I;
|
|
2027
2029
|
else
|
|
2028
2030
|
break;
|
|
2029
2031
|
}
|
|
2030
2032
|
for (let I = e; I <= this.ctx.maxRowIndex; I++) {
|
|
2031
|
-
const
|
|
2032
|
-
const A = this.getItemValue(
|
|
2033
|
+
const _ = this.rowIndexRowKeyMap.get(I) || "", T = l.reduce((M, L) => {
|
|
2034
|
+
const A = this.getItemValue(_, L) ?? "";
|
|
2033
2035
|
return `${M}${A}`;
|
|
2034
2036
|
}, "");
|
|
2035
|
-
if (
|
|
2037
|
+
if (v === T)
|
|
2036
2038
|
E = I;
|
|
2037
2039
|
else
|
|
2038
2040
|
break;
|
|
2039
2041
|
}
|
|
2040
2042
|
for (let I = w; I < e; I++) {
|
|
2041
|
-
const { height:
|
|
2042
|
-
y +=
|
|
2043
|
+
const { height: _ } = this.positions[I];
|
|
2044
|
+
y += _;
|
|
2043
2045
|
}
|
|
2044
2046
|
for (let I = w; I <= E; I++) {
|
|
2045
|
-
const { height:
|
|
2046
|
-
|
|
2047
|
-
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);
|
|
2048
2050
|
b.push({
|
|
2049
|
-
rowKey:
|
|
2051
|
+
rowKey: T,
|
|
2050
2052
|
key: i,
|
|
2051
2053
|
value: L,
|
|
2052
2054
|
row: M
|
|
@@ -2054,38 +2056,38 @@ class ye {
|
|
|
2054
2056
|
}
|
|
2055
2057
|
}
|
|
2056
2058
|
if (u !== 1 && m) {
|
|
2057
|
-
|
|
2058
|
-
for (let
|
|
2059
|
-
const I = this.getColumnByColIndex(
|
|
2059
|
+
S = f;
|
|
2060
|
+
for (let v = a - 1; v >= 0; v--) {
|
|
2061
|
+
const I = this.getColumnByColIndex(v);
|
|
2060
2062
|
if (!I)
|
|
2061
2063
|
break;
|
|
2062
|
-
const
|
|
2063
|
-
if (
|
|
2064
|
-
|
|
2064
|
+
const _ = this.getItemValue(s, i), T = this.getItemValue(s, I.key);
|
|
2065
|
+
if (_ === T && c.includes(I.key))
|
|
2066
|
+
C = v;
|
|
2065
2067
|
else
|
|
2066
2068
|
break;
|
|
2067
2069
|
}
|
|
2068
|
-
for (let
|
|
2069
|
-
const I = this.getColumnByColIndex(
|
|
2070
|
+
for (let v = a; v <= this.ctx.maxColIndex; v++) {
|
|
2071
|
+
const I = this.getColumnByColIndex(v);
|
|
2070
2072
|
if (!I)
|
|
2071
2073
|
break;
|
|
2072
|
-
const
|
|
2073
|
-
if (
|
|
2074
|
-
|
|
2074
|
+
const _ = this.getItemValue(s, i), T = this.getItemValue(s, I.key);
|
|
2075
|
+
if (_ === T && c.includes(I.key))
|
|
2076
|
+
p = v;
|
|
2075
2077
|
else
|
|
2076
2078
|
break;
|
|
2077
2079
|
}
|
|
2078
|
-
for (let
|
|
2079
|
-
const I = this.getColumnByColIndex(
|
|
2080
|
+
for (let v = C; v < a; v++) {
|
|
2081
|
+
const I = this.getColumnByColIndex(v);
|
|
2080
2082
|
if (!I)
|
|
2081
2083
|
break;
|
|
2082
|
-
|
|
2084
|
+
R += I.width || 100;
|
|
2083
2085
|
}
|
|
2084
|
-
for (let
|
|
2085
|
-
const I = this.getColumnByColIndex(
|
|
2086
|
+
for (let v = C; v <= p; v++) {
|
|
2087
|
+
const I = this.getColumnByColIndex(v);
|
|
2086
2088
|
if (!I)
|
|
2087
2089
|
break;
|
|
2088
|
-
|
|
2090
|
+
O += I.width || 100, b.push({
|
|
2089
2091
|
rowKey: s,
|
|
2090
2092
|
key: I.key,
|
|
2091
2093
|
value: this.getItemValue(s, I.key),
|
|
@@ -2094,14 +2096,14 @@ class ye {
|
|
|
2094
2096
|
}
|
|
2095
2097
|
}
|
|
2096
2098
|
return {
|
|
2097
|
-
xArr: [
|
|
2099
|
+
xArr: [C, p],
|
|
2098
2100
|
yArr: [w, E],
|
|
2099
2101
|
rowspan: d,
|
|
2100
2102
|
colspan: u,
|
|
2101
|
-
height:
|
|
2102
|
-
width:
|
|
2103
|
+
height: S,
|
|
2104
|
+
width: O,
|
|
2103
2105
|
offsetTop: y,
|
|
2104
|
-
offsetLeft:
|
|
2106
|
+
offsetLeft: R,
|
|
2105
2107
|
dataList: b
|
|
2106
2108
|
};
|
|
2107
2109
|
}
|
|
@@ -2138,9 +2140,9 @@ class ye {
|
|
|
2138
2140
|
return this.validationErrorMap.get(i) || [];
|
|
2139
2141
|
}
|
|
2140
2142
|
// 获取虚拟单元格,只针对可见的
|
|
2141
|
-
getVirtualBodyCell(t, e) {
|
|
2142
|
-
const
|
|
2143
|
-
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);
|
|
2144
2146
|
}
|
|
2145
2147
|
getVirtualBodyCellByKey(t, e) {
|
|
2146
2148
|
const i = this.getRowIndexForRowKey(t), s = this.getColIndexForKey(e);
|
|
@@ -2241,7 +2243,7 @@ class ye {
|
|
|
2241
2243
|
this.changedDataMap.clear();
|
|
2242
2244
|
}
|
|
2243
2245
|
}
|
|
2244
|
-
class
|
|
2246
|
+
class ve {
|
|
2245
2247
|
constructor(t) {
|
|
2246
2248
|
n(this, "ctx");
|
|
2247
2249
|
n(this, "history", []);
|
|
@@ -2296,7 +2298,7 @@ class be {
|
|
|
2296
2298
|
this.history = [], this.historyIndex = -1;
|
|
2297
2299
|
}
|
|
2298
2300
|
}
|
|
2299
|
-
class
|
|
2301
|
+
class Ie {
|
|
2300
2302
|
constructor(t) {
|
|
2301
2303
|
n(this, "eventTasks", /* @__PURE__ */ new Set());
|
|
2302
2304
|
n(this, "ctx");
|
|
@@ -2378,7 +2380,7 @@ class Re {
|
|
|
2378
2380
|
}
|
|
2379
2381
|
}
|
|
2380
2382
|
}
|
|
2381
|
-
class
|
|
2383
|
+
class Re {
|
|
2382
2384
|
constructor() {
|
|
2383
2385
|
n(this, "events", /* @__PURE__ */ new Map());
|
|
2384
2386
|
}
|
|
@@ -2416,7 +2418,7 @@ class Ie {
|
|
|
2416
2418
|
this.events.clear();
|
|
2417
2419
|
}
|
|
2418
2420
|
}
|
|
2419
|
-
class
|
|
2421
|
+
class _e {
|
|
2420
2422
|
constructor(t) {
|
|
2421
2423
|
n(this, "ctx");
|
|
2422
2424
|
n(this, "textCacheMap", /* @__PURE__ */ new Map());
|
|
@@ -2527,42 +2529,42 @@ class ve {
|
|
|
2527
2529
|
} = r;
|
|
2528
2530
|
if (this.ctx.font = a, this.ctx.fillStyle = c, this.ctx.textAlign = l, ["", null, void 0].includes(t))
|
|
2529
2531
|
return this.ctx.restore(), !1;
|
|
2530
|
-
const E = parseInt(((I = a.match(/\d+/)) == null ? void 0 : I[0]) || "12") * (r.lineHeight || 1.2),
|
|
2531
|
-
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;
|
|
2532
2534
|
const b = Math.round((o - 2 * d) / E);
|
|
2533
|
-
let y = this.wrapText(t,
|
|
2534
|
-
x === "auto" && u ?
|
|
2535
|
-
let
|
|
2536
|
-
const
|
|
2537
|
-
f === "middle" ?
|
|
2538
|
-
let
|
|
2539
|
-
l === "center" ?
|
|
2540
|
-
for (let
|
|
2541
|
-
const
|
|
2542
|
-
if (this.ctx.textBaseline = "top",
|
|
2543
|
-
const A = y.slice(
|
|
2544
|
-
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;
|
|
2545
2547
|
break;
|
|
2546
2548
|
}
|
|
2547
|
-
this.ctx.fillText(
|
|
2549
|
+
this.ctx.fillText(T, v, M);
|
|
2548
2550
|
}
|
|
2549
2551
|
if (r.textCallback && y.length) {
|
|
2550
|
-
const
|
|
2551
|
-
let M =
|
|
2552
|
-
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);
|
|
2553
2555
|
const A = {
|
|
2554
|
-
x:
|
|
2555
|
-
y:
|
|
2556
|
-
width:
|
|
2557
|
-
height:
|
|
2556
|
+
x: v,
|
|
2557
|
+
y: S,
|
|
2558
|
+
width: T,
|
|
2559
|
+
height: O,
|
|
2558
2560
|
left: M,
|
|
2559
2561
|
right: L,
|
|
2560
|
-
top:
|
|
2561
|
-
bottom:
|
|
2562
|
+
top: S,
|
|
2563
|
+
bottom: S + O
|
|
2562
2564
|
};
|
|
2563
2565
|
r.textCallback(A);
|
|
2564
2566
|
}
|
|
2565
|
-
return this.ctx.restore(),
|
|
2567
|
+
return this.ctx.restore(), p;
|
|
2566
2568
|
}
|
|
2567
2569
|
/**
|
|
2568
2570
|
* 将文本按宽度换行
|
|
@@ -2644,7 +2646,7 @@ class ve {
|
|
|
2644
2646
|
};
|
|
2645
2647
|
}
|
|
2646
2648
|
}
|
|
2647
|
-
class
|
|
2649
|
+
class Nt {
|
|
2648
2650
|
constructor(t) {
|
|
2649
2651
|
n(this, "_config", {});
|
|
2650
2652
|
/** CSS 类名前缀 */
|
|
@@ -2763,6 +2765,10 @@ class Dt {
|
|
|
2763
2765
|
n(this, "CHECKBOX_KEY", "");
|
|
2764
2766
|
/** 选择框颜色 */
|
|
2765
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);
|
|
2766
2772
|
/** 选择框大小 */
|
|
2767
2773
|
n(this, "CHECKBOX_SIZE", 20);
|
|
2768
2774
|
/** 选择框禁用图标 */
|
|
@@ -2997,14 +3003,14 @@ class Dt {
|
|
|
2997
3003
|
let t = {};
|
|
2998
3004
|
Object.keys(this).forEach((e) => {
|
|
2999
3005
|
if (e.endsWith("_COLOR") || e.endsWith("_FONT")) {
|
|
3000
|
-
const i = `--evt-${e.toLocaleLowerCase().replace(/_/g, "-")}`, s =
|
|
3006
|
+
const i = `--evt-${e.toLocaleLowerCase().replace(/_/g, "-")}`, s = Ce(i);
|
|
3001
3007
|
s && (t[e] = s);
|
|
3002
3008
|
}
|
|
3003
3009
|
}), Object.assign(this, t, this._config);
|
|
3004
3010
|
}
|
|
3005
3011
|
}
|
|
3006
|
-
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"');
|
|
3007
|
-
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 {
|
|
3008
3014
|
constructor(t) {
|
|
3009
3015
|
n(this, "ctx");
|
|
3010
3016
|
n(this, "list", [
|
|
@@ -3012,21 +3018,21 @@ class Te {
|
|
|
3012
3018
|
name: "loading",
|
|
3013
3019
|
configName: "LOADING_ICON_SVG",
|
|
3014
3020
|
configColorName: "LOADING_ICON_COLOR",
|
|
3015
|
-
svg:
|
|
3021
|
+
svg: Zt,
|
|
3016
3022
|
color: "#4E5969"
|
|
3017
3023
|
},
|
|
3018
3024
|
{
|
|
3019
3025
|
name: "expand",
|
|
3020
3026
|
configName: "EXPAND_ICON_SVG",
|
|
3021
3027
|
configColorName: "EXPAND_ICON_COLOR",
|
|
3022
|
-
svg:
|
|
3028
|
+
svg: nt,
|
|
3023
3029
|
color: "#4E5969"
|
|
3024
3030
|
},
|
|
3025
3031
|
{
|
|
3026
3032
|
name: "shrink",
|
|
3027
3033
|
configName: "SHRINK_ICON_SVG",
|
|
3028
3034
|
configColorName: "SHRINK_ICON_COLOR",
|
|
3029
|
-
svg:
|
|
3035
|
+
svg: Bt,
|
|
3030
3036
|
color: "#4E5969"
|
|
3031
3037
|
},
|
|
3032
3038
|
{
|
|
@@ -3040,7 +3046,7 @@ class Te {
|
|
|
3040
3046
|
name: "checkbox-check",
|
|
3041
3047
|
configName: "CHECKBOX_CHECK_SVG",
|
|
3042
3048
|
configColorName: "CHECKBOX_COLOR",
|
|
3043
|
-
svg:
|
|
3049
|
+
svg: kt,
|
|
3044
3050
|
color: "rgb(82,146,247)"
|
|
3045
3051
|
},
|
|
3046
3052
|
{
|
|
@@ -3053,7 +3059,7 @@ class Te {
|
|
|
3053
3059
|
{
|
|
3054
3060
|
name: "checkbox-check-disabled",
|
|
3055
3061
|
configName: "CHECKBOX_CHECK_DISABLED_SVG",
|
|
3056
|
-
svg:
|
|
3062
|
+
svg: kt,
|
|
3057
3063
|
color: "#DDE0EA"
|
|
3058
3064
|
},
|
|
3059
3065
|
{
|
|
@@ -3074,27 +3080,27 @@ class Te {
|
|
|
3074
3080
|
name: "icon-select",
|
|
3075
3081
|
configName: "ICON_SELECT_SVG",
|
|
3076
3082
|
configColorName: "ICON_SELECT_COLOR",
|
|
3077
|
-
svg:
|
|
3083
|
+
svg: Bt,
|
|
3078
3084
|
color: "#4E5969"
|
|
3079
3085
|
},
|
|
3080
3086
|
{
|
|
3081
3087
|
name: "sort-asc",
|
|
3082
3088
|
configName: "SORT_ASC_ICON_SVG",
|
|
3083
3089
|
configColorName: "SORT_ICON_COLOR",
|
|
3084
|
-
svg:
|
|
3090
|
+
svg: Se,
|
|
3085
3091
|
color: "rgb(82,146,247)"
|
|
3086
3092
|
},
|
|
3087
3093
|
{
|
|
3088
3094
|
name: "sort-desc",
|
|
3089
3095
|
configName: "SORT_DESC_ICON_SVG",
|
|
3090
3096
|
configColorName: "SORT_ICON_COLOR",
|
|
3091
|
-
svg:
|
|
3097
|
+
svg: Te,
|
|
3092
3098
|
color: "rgb(82,146,247)"
|
|
3093
3099
|
},
|
|
3094
3100
|
{
|
|
3095
3101
|
name: "sort-default",
|
|
3096
3102
|
configName: "SORTABLE_ICON_SVG",
|
|
3097
|
-
svg:
|
|
3103
|
+
svg: It,
|
|
3098
3104
|
color: "#bec4c7"
|
|
3099
3105
|
}
|
|
3100
3106
|
]);
|
|
@@ -3157,7 +3163,7 @@ class Te {
|
|
|
3157
3163
|
return this.list.find((e) => e.name === t);
|
|
3158
3164
|
}
|
|
3159
3165
|
}
|
|
3160
|
-
class
|
|
3166
|
+
class mt extends qt {
|
|
3161
3167
|
constructor(e, i, s, o, r, a, l) {
|
|
3162
3168
|
super(e, s, o, r, a, "header", l.fixed);
|
|
3163
3169
|
n(this, "align");
|
|
@@ -3219,7 +3225,7 @@ class wt extends jt {
|
|
|
3219
3225
|
n(this, "drawSortImageHeight", 0);
|
|
3220
3226
|
n(this, "drawSortImageName", "");
|
|
3221
3227
|
n(this, "drawSortImageSource");
|
|
3222
|
-
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";
|
|
3223
3229
|
}
|
|
3224
3230
|
/**
|
|
3225
3231
|
* 是否可见,覆盖基类方法,表头是跟y滚动条没有关系的所以不需要加滚动参数
|
|
@@ -3239,13 +3245,14 @@ class wt extends jt {
|
|
|
3239
3245
|
const { HEADER_CELL_STYLE_METHOD: e, HEADER_BG_COLOR: i, HEADER_TEXT_COLOR: s } = this.ctx.config;
|
|
3240
3246
|
let o = i, r = s;
|
|
3241
3247
|
if (typeof e == "function") {
|
|
3242
|
-
const
|
|
3248
|
+
const c = e, { backgroundColor: d, color: f, font: x } = c({
|
|
3243
3249
|
colIndex: this.colIndex,
|
|
3244
3250
|
column: this.column
|
|
3245
3251
|
}) || {};
|
|
3246
|
-
|
|
3252
|
+
d && (o = d), f && (r = f), x && (this.drawTextFont = x);
|
|
3247
3253
|
}
|
|
3248
|
-
|
|
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;
|
|
3249
3256
|
}
|
|
3250
3257
|
update() {
|
|
3251
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();
|
|
@@ -3364,7 +3371,7 @@ class wt extends jt {
|
|
|
3364
3371
|
};
|
|
3365
3372
|
}
|
|
3366
3373
|
}
|
|
3367
|
-
class
|
|
3374
|
+
class Le {
|
|
3368
3375
|
constructor(t) {
|
|
3369
3376
|
n(this, "ctx");
|
|
3370
3377
|
n(this, "visibleHoverCell");
|
|
@@ -3485,7 +3492,7 @@ class Oe {
|
|
|
3485
3492
|
t.drawSelectionImageWidth,
|
|
3486
3493
|
t.drawSelectionImageHeight
|
|
3487
3494
|
))
|
|
3488
|
-
if (t instanceof
|
|
3495
|
+
if (t instanceof mt)
|
|
3489
3496
|
t.drawSelectionImageName === "checkbox-uncheck" || t.drawSelectionImageName === "checkbox-indeterminate" ? this.ctx.database.toggleAllSelection() : t.drawSelectionImageName === "checkbox-check" && this.ctx.database.clearSelection(!0);
|
|
3490
3497
|
else {
|
|
3491
3498
|
if (!this.ctx.database.getRowSelectable(t.rowKey))
|
|
@@ -3550,7 +3557,7 @@ class Oe {
|
|
|
3550
3557
|
*/
|
|
3551
3558
|
imageEnterAndLeave(t, e) {
|
|
3552
3559
|
const { offsetY: i, offsetX: s } = this.ctx.getOffset(e), o = i, r = s;
|
|
3553
|
-
if (t instanceof
|
|
3560
|
+
if (t instanceof mt) {
|
|
3554
3561
|
if (t.drawSelectionImageSource && this.isInsideElement(
|
|
3555
3562
|
r,
|
|
3556
3563
|
o,
|
|
@@ -3574,7 +3581,7 @@ class Oe {
|
|
|
3574
3581
|
return;
|
|
3575
3582
|
}
|
|
3576
3583
|
}
|
|
3577
|
-
if (t instanceof
|
|
3584
|
+
if (t instanceof vt) {
|
|
3578
3585
|
if (t.drawSelectionImageSource && this.isInsideElement(
|
|
3579
3586
|
r,
|
|
3580
3587
|
o,
|
|
@@ -3671,7 +3678,7 @@ class Oe {
|
|
|
3671
3678
|
this.resizeObserver.unobserve(this.ctx.stageElement), this.mutationObserver.disconnect();
|
|
3672
3679
|
}
|
|
3673
3680
|
}
|
|
3674
|
-
class
|
|
3681
|
+
class Me {
|
|
3675
3682
|
constructor(t, e) {
|
|
3676
3683
|
n(this, "eventBus");
|
|
3677
3684
|
n(this, "eventBrowser");
|
|
@@ -3714,6 +3721,8 @@ class Le {
|
|
|
3714
3721
|
// 选择行中
|
|
3715
3722
|
n(this, "dragHeaderIng", !1);
|
|
3716
3723
|
// 拖拽表头中
|
|
3724
|
+
n(this, "finding", !1);
|
|
3725
|
+
// 查找中
|
|
3717
3726
|
n(this, "adjustPositioning", !1);
|
|
3718
3727
|
// 调整位置中
|
|
3719
3728
|
n(this, "contextMenuIng", !1);
|
|
@@ -3797,6 +3806,12 @@ class Le {
|
|
|
3797
3806
|
xArr: [-1, -1],
|
|
3798
3807
|
yArr: [-1, -1]
|
|
3799
3808
|
});
|
|
3809
|
+
n(this, "finderBar", {
|
|
3810
|
+
text: "",
|
|
3811
|
+
rowIndex: -1,
|
|
3812
|
+
colIndex: -1,
|
|
3813
|
+
type: "body"
|
|
3814
|
+
});
|
|
3800
3815
|
n(this, "database");
|
|
3801
3816
|
n(this, "history");
|
|
3802
3817
|
n(this, "config");
|
|
@@ -3810,10 +3825,10 @@ class Le {
|
|
|
3810
3825
|
loadingElement: c,
|
|
3811
3826
|
contextMenuElement: d
|
|
3812
3827
|
} = t;
|
|
3813
|
-
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);
|
|
3814
3829
|
}
|
|
3815
3830
|
setConfig(t) {
|
|
3816
|
-
this.config = new
|
|
3831
|
+
this.config = new Nt(t);
|
|
3817
3832
|
}
|
|
3818
3833
|
setItemValueByEditor(t, e, i, s = !0, o = !0, r = !0) {
|
|
3819
3834
|
if (this.config.ENABLE_MERGE_CELL_LINK) {
|
|
@@ -4071,7 +4086,7 @@ class Xt {
|
|
|
4071
4086
|
}), this.ctx.scrollerFocus = this.isFocus;
|
|
4072
4087
|
}
|
|
4073
4088
|
}
|
|
4074
|
-
class
|
|
4089
|
+
class Ae {
|
|
4075
4090
|
// 垂直滚动定时器
|
|
4076
4091
|
constructor(t) {
|
|
4077
4092
|
n(this, "ctx");
|
|
@@ -4092,6 +4107,8 @@ class Me {
|
|
|
4092
4107
|
this.setScrollX(e);
|
|
4093
4108
|
}), this.ctx.on("setScrollY", (e) => {
|
|
4094
4109
|
this.setScrollY(e);
|
|
4110
|
+
}), this.ctx.on("scrollToIndex", (e, i) => {
|
|
4111
|
+
this.scrollToIndex(e, i);
|
|
4095
4112
|
}), this.ctx.on("cellHeaderMousedown", () => {
|
|
4096
4113
|
this.mousedownHeader = !0;
|
|
4097
4114
|
}), this.ctx.on("startAdjustPosition", (e) => {
|
|
@@ -4138,11 +4155,14 @@ class Me {
|
|
|
4138
4155
|
}
|
|
4139
4156
|
scrollToColIndex(t) {
|
|
4140
4157
|
const { header: e } = this.ctx, i = e.leafCellHeaders.find((s) => s.colIndex === t);
|
|
4141
|
-
i &&
|
|
4158
|
+
i && this.setScrollX(i.x - e.visibleWidth / 2);
|
|
4142
4159
|
}
|
|
4143
4160
|
scrollToRowIndex(t) {
|
|
4144
4161
|
const { body: e, database: i } = this.ctx, { top: s } = i.getPositionForRowIndex(t);
|
|
4145
|
-
|
|
4162
|
+
this.setScrollY(s - e.visibleHeight / 2);
|
|
4163
|
+
}
|
|
4164
|
+
scrollToIndex(t, e) {
|
|
4165
|
+
this.scrollToRowIndex(t), this.scrollToColIndex(e);
|
|
4146
4166
|
}
|
|
4147
4167
|
scrollToRowKey(t) {
|
|
4148
4168
|
const { body: e, database: i } = this.ctx, s = i.getRowIndexForRowKey(t);
|
|
@@ -4181,7 +4201,7 @@ class Me {
|
|
|
4181
4201
|
t && (this.adjustPositionX = "", this.timerX && (clearInterval(this.timerX), this.timerX = 0)), e && (this.adjustPositionY = "", this.timerY && (clearInterval(this.timerY), this.timerY = 0));
|
|
4182
4202
|
}
|
|
4183
4203
|
}
|
|
4184
|
-
class
|
|
4204
|
+
class He {
|
|
4185
4205
|
constructor(t, e) {
|
|
4186
4206
|
n(this, "root");
|
|
4187
4207
|
n(this, "key");
|
|
@@ -4221,7 +4241,7 @@ class Ae {
|
|
|
4221
4241
|
return null;
|
|
4222
4242
|
}
|
|
4223
4243
|
}
|
|
4224
|
-
class
|
|
4244
|
+
class De {
|
|
4225
4245
|
constructor(t) {
|
|
4226
4246
|
n(this, "ctx");
|
|
4227
4247
|
// 上下文
|
|
@@ -4267,7 +4287,7 @@ class He {
|
|
|
4267
4287
|
n(this, "renderFixedCellHeaders", []);
|
|
4268
4288
|
this.ctx = t, this.ctx.on(
|
|
4269
4289
|
"resetHeader",
|
|
4270
|
-
|
|
4290
|
+
bt(() => {
|
|
4271
4291
|
this.init(), this.ctx.clearSelector(), this.ctx.emit("draw");
|
|
4272
4292
|
}, 100)
|
|
4273
4293
|
), this.init(), this.initResizeColumn(), this.initDragColumn();
|
|
@@ -4280,13 +4300,13 @@ class He {
|
|
|
4280
4300
|
const f = this.ctx.database.getColumns();
|
|
4281
4301
|
this.columns = f;
|
|
4282
4302
|
}
|
|
4283
|
-
this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [], this.visibleColumns =
|
|
4303
|
+
this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [], this.visibleColumns = Gt(this.columns);
|
|
4284
4304
|
const s = ot(this.visibleColumns), o = J(this.visibleColumns);
|
|
4285
4305
|
this.height = e * s, this.visibleHeight = this.height, this.width = o.reduce((f, x) => {
|
|
4286
4306
|
const u = x.width || 100, { maxWidth: g, minWidth: m } = x;
|
|
4287
4307
|
return g && u > g ? f + g : m && u < m ? f + m : f + u;
|
|
4288
4308
|
}, 0), this.columnIndex = 0, this.resizeNum = 0;
|
|
4289
|
-
const r =
|
|
4309
|
+
const r = xe(rt(this.visibleColumns, s));
|
|
4290
4310
|
this.render(r, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
|
|
4291
4311
|
const a = this.ctx.containerElement.getBoundingClientRect();
|
|
4292
4312
|
this.resizeNum > 0 ? this.ctx.stageWidth = Math.floor(a.width) : this.ctx.stageWidth = Math.min(
|
|
@@ -4351,7 +4371,7 @@ class He {
|
|
|
4351
4371
|
if (this.dragingCell && this.dragTarget) {
|
|
4352
4372
|
const t = (c, d = {}) => (c.forEach((f, x) => {
|
|
4353
4373
|
f.children && t(f.children, d), d[f.key] = x;
|
|
4354
|
-
}), 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, {
|
|
4355
4375
|
key: "key",
|
|
4356
4376
|
// 节点唯一标识字段(对应我们之前的field)
|
|
4357
4377
|
childrenKey: "children"
|
|
@@ -4457,7 +4477,7 @@ class He {
|
|
|
4457
4477
|
const a = t[r], l = o * (a.rowspan || 0), c = o * (a.level || 0);
|
|
4458
4478
|
let { minWidth: d, maxWidth: f } = a, x = a.width || 100;
|
|
4459
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));
|
|
4460
|
-
const u = new
|
|
4480
|
+
const u = new mt(this.ctx, this.columnIndex, s, c, x, l, a);
|
|
4461
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;
|
|
4462
4482
|
}
|
|
4463
4483
|
}
|
|
@@ -4576,7 +4596,7 @@ class He {
|
|
|
4576
4596
|
}), this.drawBottomLine(), this.drawTipLine(), this.drawDragTip();
|
|
4577
4597
|
}
|
|
4578
4598
|
}
|
|
4579
|
-
class
|
|
4599
|
+
class Jt {
|
|
4580
4600
|
constructor(t, e, i = 0, s = 0, o = 0, r = 0, a, l = "body") {
|
|
4581
4601
|
n(this, "ctx");
|
|
4582
4602
|
n(this, "x", 0);
|
|
@@ -4597,7 +4617,7 @@ class Zt {
|
|
|
4597
4617
|
update() {
|
|
4598
4618
|
const { header: t } = this.ctx, e = [], i = [], s = [], o = [];
|
|
4599
4619
|
t.renderLeafCellHeaders.forEach((r) => {
|
|
4600
|
-
const a = new
|
|
4620
|
+
const a = new vt(
|
|
4601
4621
|
this.ctx,
|
|
4602
4622
|
this.rowIndex,
|
|
4603
4623
|
r.colIndex,
|
|
@@ -4637,7 +4657,7 @@ class Zt {
|
|
|
4637
4657
|
});
|
|
4638
4658
|
}
|
|
4639
4659
|
}
|
|
4640
|
-
class
|
|
4660
|
+
class Ne {
|
|
4641
4661
|
constructor(t) {
|
|
4642
4662
|
n(this, "resizeTarget", null);
|
|
4643
4663
|
//调整行大小的目标
|
|
@@ -4691,28 +4711,28 @@ class De {
|
|
|
4691
4711
|
let w = this.height + e.height + r;
|
|
4692
4712
|
w += m;
|
|
4693
4713
|
let E = w;
|
|
4694
|
-
const
|
|
4695
|
-
if (
|
|
4696
|
-
const
|
|
4697
|
-
|
|
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);
|
|
4698
4718
|
} else this.data.length && a ? E = a : this.data.length && c && w > c && (E = c);
|
|
4699
4719
|
E > 0 && (this.ctx.stageHeight = Math.floor(E), this.ctx.stageElement.style.height = `${this.ctx.stageHeight}px`);
|
|
4700
4720
|
let b = this.ctx.stageHeight - e.height - r;
|
|
4701
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;
|
|
4702
|
-
const y = window.devicePixelRatio || 1,
|
|
4703
|
-
t.width = Math.round(
|
|
4704
|
-
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";
|
|
4705
4725
|
this.ctx.emit("emptyChange", {
|
|
4706
|
-
isEmpty:
|
|
4707
|
-
type:
|
|
4726
|
+
isEmpty: O,
|
|
4727
|
+
type: O,
|
|
4708
4728
|
headerHeight: e.height,
|
|
4709
4729
|
bodyHeight: this.height,
|
|
4710
4730
|
footerHeight: m,
|
|
4711
4731
|
width: this.width,
|
|
4712
4732
|
height: this.data.length ? 0 : l + m
|
|
4713
4733
|
});
|
|
4714
|
-
const
|
|
4715
|
-
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);
|
|
4716
4736
|
}
|
|
4717
4737
|
// 调整行的高度
|
|
4718
4738
|
initResizeRow() {
|
|
@@ -4836,7 +4856,7 @@ class De {
|
|
|
4836
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;
|
|
4837
4857
|
const d = [];
|
|
4838
4858
|
for (let f = 0; f < this.visibleRows.length; f++) {
|
|
4839
|
-
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);
|
|
4840
4860
|
d.push(w);
|
|
4841
4861
|
}
|
|
4842
4862
|
this.renderRows = d, this.ctx.body.renderRows = d;
|
|
@@ -4866,7 +4886,7 @@ class De {
|
|
|
4866
4886
|
}), this.drawTipLine();
|
|
4867
4887
|
}
|
|
4868
4888
|
}
|
|
4869
|
-
class
|
|
4889
|
+
class ke {
|
|
4870
4890
|
constructor(t) {
|
|
4871
4891
|
n(this, "ctx");
|
|
4872
4892
|
n(this, "renderRows", []);
|
|
@@ -4921,7 +4941,7 @@ class Ne {
|
|
|
4921
4941
|
let e = this.y;
|
|
4922
4942
|
const i = [];
|
|
4923
4943
|
this.data.forEach((s, o) => {
|
|
4924
|
-
const r = new
|
|
4944
|
+
const r = new Jt(this.ctx, o, 0, e, this.width, t, s, "footer");
|
|
4925
4945
|
e += t, i.push(r);
|
|
4926
4946
|
}), this.renderRows = i, this.ctx.footer.renderRows = this.renderRows;
|
|
4927
4947
|
}
|
|
@@ -4947,7 +4967,7 @@ class Ne {
|
|
|
4947
4967
|
}), this.drawTopLine();
|
|
4948
4968
|
}
|
|
4949
4969
|
}
|
|
4950
|
-
class
|
|
4970
|
+
class Be {
|
|
4951
4971
|
constructor(t) {
|
|
4952
4972
|
n(this, "isCut", !1);
|
|
4953
4973
|
n(this, "isMultipleRow", !1);
|
|
@@ -4959,7 +4979,7 @@ class ke {
|
|
|
4959
4979
|
this.moveFocus(t);
|
|
4960
4980
|
}), this.ctx.on(
|
|
4961
4981
|
"mousemove",
|
|
4962
|
-
|
|
4982
|
+
bt((t) => {
|
|
4963
4983
|
var e, i;
|
|
4964
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);
|
|
4965
4985
|
}, 100)
|
|
@@ -4990,7 +5010,7 @@ class ke {
|
|
|
4990
5010
|
return;
|
|
4991
5011
|
window.getComputedStyle(e.target).userSelect !== "text" && e.preventDefault(), this.ctx.clearSelector(), t.operation ? this.selectAll() : this.selectCols(t);
|
|
4992
5012
|
}), this.ctx.on("keydown", (t) => {
|
|
4993
|
-
if (!this.ctx.editing) {
|
|
5013
|
+
if (!this.ctx.editing && !this.ctx.finding) {
|
|
4994
5014
|
if (t.ctrlKey && t.code === "KeyV" || t.metaKey && t.code === "KeyV") {
|
|
4995
5015
|
this.paste();
|
|
4996
5016
|
return;
|
|
@@ -5064,26 +5084,26 @@ class ke {
|
|
|
5064
5084
|
SELECTOR_AREA_MAX_X_OFFSET: f,
|
|
5065
5085
|
SELECTOR_AREA_MAX_Y_OFFSET: x
|
|
5066
5086
|
} = this.ctx.config, u = a, g = l || this.ctx.maxColIndex - f, m = c, w = d || this.ctx.maxRowIndex - x;
|
|
5067
|
-
let [E,
|
|
5068
|
-
if (E < u ||
|
|
5087
|
+
let [E, C] = o, [p, b] = r;
|
|
5088
|
+
if (E < u || C > g || p < m || b > w)
|
|
5069
5089
|
return;
|
|
5070
5090
|
if (this.ctx.config.ENABLE_MERGE_CELL_LINK) {
|
|
5071
|
-
const
|
|
5072
|
-
|
|
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;
|
|
5073
5093
|
}
|
|
5074
|
-
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)];
|
|
5075
5095
|
const { BEFORE_SET_SELECTOR_METHOD: y } = this.ctx.config;
|
|
5076
5096
|
if (typeof y == "function") {
|
|
5077
|
-
const
|
|
5097
|
+
const S = y({
|
|
5078
5098
|
focusCell: this.ctx.focusCell,
|
|
5079
5099
|
xArr: o,
|
|
5080
5100
|
yArr: r
|
|
5081
5101
|
});
|
|
5082
|
-
if (!
|
|
5102
|
+
if (!S)
|
|
5083
5103
|
return;
|
|
5084
|
-
o =
|
|
5104
|
+
o = S.xArr, r = S.yArr;
|
|
5085
5105
|
}
|
|
5086
|
-
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");
|
|
5087
5107
|
}
|
|
5088
5108
|
}
|
|
5089
5109
|
adjustMergeCells(t, e) {
|
|
@@ -5098,13 +5118,13 @@ class ke {
|
|
|
5098
5118
|
let a = [], l = [];
|
|
5099
5119
|
for (let m = 0; m <= e[1] - e[0]; m++)
|
|
5100
5120
|
for (let w = 0; w <= t[1] - t[0]; w++) {
|
|
5101
|
-
const E = m + e[0],
|
|
5102
|
-
|
|
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));
|
|
5103
5123
|
}
|
|
5104
5124
|
const c = a.reduce(
|
|
5105
5125
|
(m, w) => {
|
|
5106
|
-
const { yArr: E } = w.getSpanInfo(), [
|
|
5107
|
-
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;
|
|
5108
5128
|
},
|
|
5109
5129
|
{
|
|
5110
5130
|
minY: i,
|
|
@@ -5112,8 +5132,8 @@ class ke {
|
|
|
5112
5132
|
}
|
|
5113
5133
|
), d = l.reduce(
|
|
5114
5134
|
(m, w) => {
|
|
5115
|
-
const { xArr: E } = w.getSpanInfo(), [
|
|
5116
|
-
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;
|
|
5117
5137
|
},
|
|
5118
5138
|
{
|
|
5119
5139
|
minX: o,
|
|
@@ -5250,7 +5270,7 @@ class ke {
|
|
|
5250
5270
|
return;
|
|
5251
5271
|
t = a.data;
|
|
5252
5272
|
}
|
|
5253
|
-
const o =
|
|
5273
|
+
const o = me(t);
|
|
5254
5274
|
navigator.clipboard ? navigator.clipboard.writeText(o).then(() => {
|
|
5255
5275
|
this.ctx.selector.xArrCopy = this.ctx.selector.xArr.slice(), this.ctx.selector.yArrCopy = this.ctx.selector.yArr.slice(), this.ctx.emit("copyChange", {
|
|
5256
5276
|
xArr: this.ctx.selector.xArrCopy,
|
|
@@ -5295,7 +5315,7 @@ class ke {
|
|
|
5295
5315
|
if (this.ctx.selector.enable && t) {
|
|
5296
5316
|
const e = this.ctx.selector.yArr[0], i = this.ctx.selector.xArr[0], s = /* @__PURE__ */ new Set();
|
|
5297
5317
|
navigator.clipboard.readText().then(async (o) => {
|
|
5298
|
-
let r =
|
|
5318
|
+
let r = we(o);
|
|
5299
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;
|
|
5300
5320
|
(u > 0 || g > 0) && this.ctx.emit("onPastedDataOverflow", {
|
|
5301
5321
|
maxY: d,
|
|
@@ -5308,27 +5328,27 @@ class ke {
|
|
|
5308
5328
|
});
|
|
5309
5329
|
const m = r.length === 1 && r[0].length === 1;
|
|
5310
5330
|
if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(a, l) && !m) {
|
|
5311
|
-
const
|
|
5331
|
+
const p = {
|
|
5312
5332
|
code: "ERR_MERGED_CELLS_PASTE",
|
|
5313
5333
|
message: "Merged cells cannot span paste data"
|
|
5314
5334
|
};
|
|
5315
|
-
this.ctx.hasEvent("error") ? this.ctx.emit("error",
|
|
5335
|
+
this.ctx.hasEvent("error") ? this.ctx.emit("error", p) : alert(p.message);
|
|
5316
5336
|
return;
|
|
5317
5337
|
}
|
|
5318
5338
|
let w = [];
|
|
5319
|
-
for (let
|
|
5320
|
-
const b = r[
|
|
5339
|
+
for (let p = 0; p <= r.length - 1; p++) {
|
|
5340
|
+
const b = r[p].length;
|
|
5321
5341
|
for (let y = 0; y <= b - 1; y++) {
|
|
5322
|
-
const
|
|
5323
|
-
|
|
5324
|
-
|
|
5342
|
+
const R = p + e, S = y + i, O = r[p][y], v = this.ctx.database.getItemValueForRowIndexAndColIndex(
|
|
5343
|
+
R,
|
|
5344
|
+
S
|
|
5325
5345
|
);
|
|
5326
|
-
if (
|
|
5327
|
-
const { rowKey: I, key:
|
|
5328
|
-
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({
|
|
5329
5349
|
rowKey: I,
|
|
5330
|
-
key:
|
|
5331
|
-
value:
|
|
5350
|
+
key: _,
|
|
5351
|
+
value: O,
|
|
5332
5352
|
row: {}
|
|
5333
5353
|
//内部有设置
|
|
5334
5354
|
}));
|
|
@@ -5336,13 +5356,13 @@ class ke {
|
|
|
5336
5356
|
}
|
|
5337
5357
|
}
|
|
5338
5358
|
if (this.isCut) {
|
|
5339
|
-
const
|
|
5359
|
+
const p = this.clearSelectedData(
|
|
5340
5360
|
this.ctx.selector.xArrCopy,
|
|
5341
5361
|
this.ctx.selector.yArrCopy,
|
|
5342
5362
|
!0
|
|
5343
5363
|
// 忽略设置,只返回数据,用于cut,实现历史回退需要返回两次问题
|
|
5344
5364
|
), b = w.map((y) => `${y.rowKey}-${y.key}`);
|
|
5345
|
-
|
|
5365
|
+
p.forEach((y) => {
|
|
5346
5366
|
b.includes(`${y.rowKey}-${y.key}`) || w.unshift(y);
|
|
5347
5367
|
}), this.isCut = !1;
|
|
5348
5368
|
}
|
|
@@ -5350,21 +5370,21 @@ class ke {
|
|
|
5350
5370
|
return;
|
|
5351
5371
|
const { BEFORE_PASTE_DATA_METHOD: E } = this.ctx.config;
|
|
5352
5372
|
if (typeof E == "function") {
|
|
5353
|
-
const
|
|
5373
|
+
const p = E, b = w.map((y) => ({
|
|
5354
5374
|
rowKey: y.rowKey,
|
|
5355
5375
|
key: y.key,
|
|
5356
5376
|
value: y.value,
|
|
5357
5377
|
oldValue: this.ctx.database.getItemValue(y.rowKey, y.key),
|
|
5358
5378
|
row: this.ctx.database.getRowDataItemForRowKey(y.rowKey)
|
|
5359
5379
|
}));
|
|
5360
|
-
if (w = await
|
|
5380
|
+
if (w = await p(b, a, l, r), w && !w.length)
|
|
5361
5381
|
return;
|
|
5362
5382
|
}
|
|
5363
5383
|
this.clearCopyLine(), this.ctx.batchSetItemValueByEditor(w, !0);
|
|
5364
|
-
let
|
|
5365
|
-
s.forEach((
|
|
5366
|
-
|
|
5367
|
-
}), 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");
|
|
5368
5388
|
}).catch((o) => {
|
|
5369
5389
|
console.error("Failed to get the clipboard content:", o);
|
|
5370
5390
|
});
|
|
@@ -5430,14 +5450,14 @@ class ke {
|
|
|
5430
5450
|
if (!i)
|
|
5431
5451
|
return;
|
|
5432
5452
|
g && this.ctx.onlyMergeCell && i.updateSpanInfo();
|
|
5433
|
-
const { drawX: m, drawY: w, width: E, height:
|
|
5434
|
-
let
|
|
5435
|
-
|
|
5436
|
-
let
|
|
5437
|
-
x && (u === "top" ?
|
|
5438
|
-
const
|
|
5439
|
-
let I = c,
|
|
5440
|
-
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, _));
|
|
5441
5461
|
}
|
|
5442
5462
|
destroy() {
|
|
5443
5463
|
}
|
|
@@ -5495,14 +5515,14 @@ class Xe {
|
|
|
5495
5515
|
SELECTOR_AREA_MAX_Y: u,
|
|
5496
5516
|
SELECTOR_AREA_MAX_X_OFFSET: g,
|
|
5497
5517
|
SELECTOR_AREA_MAX_Y_OFFSET: m
|
|
5498
|
-
} = this.ctx.config, w = d, E = f || this.ctx.maxColIndex - g,
|
|
5499
|
-
let [b, y] = r, [
|
|
5500
|
-
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)
|
|
5501
5521
|
return;
|
|
5502
|
-
r = [Math.max(w, b), Math.min(E, y)], a = [Math.max(
|
|
5503
|
-
const { BEFORE_SET_AUTOFILL_METHOD:
|
|
5504
|
-
if (typeof
|
|
5505
|
-
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({
|
|
5506
5526
|
focusCell: this.ctx.focusCell,
|
|
5507
5527
|
xArr: r,
|
|
5508
5528
|
yArr: a
|
|
@@ -5536,9 +5556,9 @@ class Xe {
|
|
|
5536
5556
|
let d = [];
|
|
5537
5557
|
for (let u = 0; u <= l[1] - l[0]; u++)
|
|
5538
5558
|
for (let g = 0; g <= a[1] - a[0]; g++) {
|
|
5539
|
-
const m = g + a[0], w = u + l[0], E = s[u % r][g % o],
|
|
5540
|
-
if (
|
|
5541
|
-
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;
|
|
5542
5562
|
this.ctx.database.getReadonly(b, y) || (t.add(b), d.push({
|
|
5543
5563
|
rowKey: b,
|
|
5544
5564
|
key: y,
|
|
@@ -5580,19 +5600,19 @@ class Xe {
|
|
|
5580
5600
|
destroy() {
|
|
5581
5601
|
}
|
|
5582
5602
|
}
|
|
5583
|
-
const j = Math.min, z = Math.max,
|
|
5603
|
+
const j = Math.min, z = Math.max, at = Math.round, st = Math.floor, Y = (h) => ({
|
|
5584
5604
|
x: h,
|
|
5585
5605
|
y: h
|
|
5586
|
-
}),
|
|
5606
|
+
}), Ye = {
|
|
5587
5607
|
left: "right",
|
|
5588
5608
|
right: "left",
|
|
5589
5609
|
bottom: "top",
|
|
5590
5610
|
top: "bottom"
|
|
5591
|
-
},
|
|
5611
|
+
}, Ke = {
|
|
5592
5612
|
start: "end",
|
|
5593
5613
|
end: "start"
|
|
5594
5614
|
};
|
|
5595
|
-
function
|
|
5615
|
+
function Et(h, t, e) {
|
|
5596
5616
|
return z(h, j(t, e));
|
|
5597
5617
|
}
|
|
5598
5618
|
function tt(h, t) {
|
|
@@ -5604,54 +5624,54 @@ function $(h) {
|
|
|
5604
5624
|
function et(h) {
|
|
5605
5625
|
return h.split("-")[1];
|
|
5606
5626
|
}
|
|
5607
|
-
function
|
|
5627
|
+
function Qt(h) {
|
|
5608
5628
|
return h === "x" ? "y" : "x";
|
|
5609
5629
|
}
|
|
5610
|
-
function
|
|
5630
|
+
function Rt(h) {
|
|
5611
5631
|
return h === "y" ? "height" : "width";
|
|
5612
5632
|
}
|
|
5613
|
-
const
|
|
5633
|
+
const Fe = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
5614
5634
|
function V(h) {
|
|
5615
|
-
return
|
|
5635
|
+
return Fe.has($(h)) ? "y" : "x";
|
|
5616
5636
|
}
|
|
5617
|
-
function
|
|
5618
|
-
return
|
|
5637
|
+
function _t(h) {
|
|
5638
|
+
return Qt(V(h));
|
|
5619
5639
|
}
|
|
5620
|
-
function
|
|
5640
|
+
function We(h, t, e) {
|
|
5621
5641
|
e === void 0 && (e = !1);
|
|
5622
|
-
const i = et(h), s =
|
|
5642
|
+
const i = et(h), s = _t(h), o = Rt(s);
|
|
5623
5643
|
let r = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
|
|
5624
|
-
return t.reference[o] > t.floating[o] && (r =
|
|
5644
|
+
return t.reference[o] > t.floating[o] && (r = lt(r)), [r, lt(r)];
|
|
5625
5645
|
}
|
|
5626
|
-
function
|
|
5627
|
-
const t =
|
|
5628
|
-
return [
|
|
5646
|
+
function Ve(h) {
|
|
5647
|
+
const t = lt(h);
|
|
5648
|
+
return [pt(h), t, pt(t)];
|
|
5629
5649
|
}
|
|
5630
|
-
function
|
|
5631
|
-
return h.replace(/start|end/g, (t) =>
|
|
5650
|
+
function pt(h) {
|
|
5651
|
+
return h.replace(/start|end/g, (t) => Ke[t]);
|
|
5632
5652
|
}
|
|
5633
|
-
const
|
|
5634
|
-
function
|
|
5653
|
+
const Yt = ["left", "right"], Kt = ["right", "left"], Pe = ["top", "bottom"], ze = ["bottom", "top"];
|
|
5654
|
+
function $e(h, t, e) {
|
|
5635
5655
|
switch (h) {
|
|
5636
5656
|
case "top":
|
|
5637
5657
|
case "bottom":
|
|
5638
|
-
return e ? t ?
|
|
5658
|
+
return e ? t ? Kt : Yt : t ? Yt : Kt;
|
|
5639
5659
|
case "left":
|
|
5640
5660
|
case "right":
|
|
5641
|
-
return t ?
|
|
5661
|
+
return t ? Pe : ze;
|
|
5642
5662
|
default:
|
|
5643
5663
|
return [];
|
|
5644
5664
|
}
|
|
5645
5665
|
}
|
|
5646
|
-
function
|
|
5666
|
+
function Ge(h, t, e, i) {
|
|
5647
5667
|
const s = et(h);
|
|
5648
|
-
let o =
|
|
5649
|
-
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;
|
|
5650
5670
|
}
|
|
5651
|
-
function
|
|
5652
|
-
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]);
|
|
5653
5673
|
}
|
|
5654
|
-
function
|
|
5674
|
+
function Ue(h) {
|
|
5655
5675
|
return {
|
|
5656
5676
|
top: 0,
|
|
5657
5677
|
right: 0,
|
|
@@ -5660,15 +5680,15 @@ function Ge(h) {
|
|
|
5660
5680
|
...h
|
|
5661
5681
|
};
|
|
5662
5682
|
}
|
|
5663
|
-
function
|
|
5664
|
-
return typeof h != "number" ?
|
|
5683
|
+
function te(h) {
|
|
5684
|
+
return typeof h != "number" ? Ue(h) : {
|
|
5665
5685
|
top: h,
|
|
5666
5686
|
right: h,
|
|
5667
5687
|
bottom: h,
|
|
5668
5688
|
left: h
|
|
5669
5689
|
};
|
|
5670
5690
|
}
|
|
5671
|
-
function
|
|
5691
|
+
function ct(h) {
|
|
5672
5692
|
const {
|
|
5673
5693
|
x: t,
|
|
5674
5694
|
y: e,
|
|
@@ -5686,12 +5706,12 @@ function lt(h) {
|
|
|
5686
5706
|
y: e
|
|
5687
5707
|
};
|
|
5688
5708
|
}
|
|
5689
|
-
function
|
|
5709
|
+
function Ft(h, t, e) {
|
|
5690
5710
|
let {
|
|
5691
5711
|
reference: i,
|
|
5692
5712
|
floating: s
|
|
5693
5713
|
} = h;
|
|
5694
|
-
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;
|
|
5695
5715
|
let u;
|
|
5696
5716
|
switch (l) {
|
|
5697
5717
|
case "top":
|
|
@@ -5734,7 +5754,7 @@ function Kt(h, t, e) {
|
|
|
5734
5754
|
}
|
|
5735
5755
|
return u;
|
|
5736
5756
|
}
|
|
5737
|
-
const
|
|
5757
|
+
const je = async (h, t, e) => {
|
|
5738
5758
|
const {
|
|
5739
5759
|
placement: i = "bottom",
|
|
5740
5760
|
strategy: s = "absolute",
|
|
@@ -5748,14 +5768,14 @@ const Ue = async (h, t, e) => {
|
|
|
5748
5768
|
}), {
|
|
5749
5769
|
x: d,
|
|
5750
5770
|
y: f
|
|
5751
|
-
} =
|
|
5771
|
+
} = Ft(c, i, l), x = i, u = {}, g = 0;
|
|
5752
5772
|
for (let m = 0; m < a.length; m++) {
|
|
5753
5773
|
const {
|
|
5754
5774
|
name: w,
|
|
5755
5775
|
fn: E
|
|
5756
5776
|
} = a[m], {
|
|
5757
|
-
x:
|
|
5758
|
-
y:
|
|
5777
|
+
x: C,
|
|
5778
|
+
y: p,
|
|
5759
5779
|
data: b,
|
|
5760
5780
|
reset: y
|
|
5761
5781
|
} = await E({
|
|
@@ -5772,7 +5792,7 @@ const Ue = async (h, t, e) => {
|
|
|
5772
5792
|
floating: t
|
|
5773
5793
|
}
|
|
5774
5794
|
});
|
|
5775
|
-
d =
|
|
5795
|
+
d = C ?? d, f = p ?? f, u = {
|
|
5776
5796
|
...u,
|
|
5777
5797
|
[w]: {
|
|
5778
5798
|
...u[w],
|
|
@@ -5785,7 +5805,7 @@ const Ue = async (h, t, e) => {
|
|
|
5785
5805
|
}) : y.rects), {
|
|
5786
5806
|
x: d,
|
|
5787
5807
|
y: f
|
|
5788
|
-
} =
|
|
5808
|
+
} = Ft(c, x, l)), m = -1);
|
|
5789
5809
|
}
|
|
5790
5810
|
return {
|
|
5791
5811
|
x: d,
|
|
@@ -5795,7 +5815,7 @@ const Ue = async (h, t, e) => {
|
|
|
5795
5815
|
middlewareData: u
|
|
5796
5816
|
};
|
|
5797
5817
|
};
|
|
5798
|
-
async function
|
|
5818
|
+
async function ee(h, t) {
|
|
5799
5819
|
var e;
|
|
5800
5820
|
t === void 0 && (t = {});
|
|
5801
5821
|
const {
|
|
@@ -5811,28 +5831,28 @@ async function te(h, t) {
|
|
|
5811
5831
|
elementContext: f = "floating",
|
|
5812
5832
|
altBoundary: x = !1,
|
|
5813
5833
|
padding: u = 0
|
|
5814
|
-
} = tt(t, h), g =
|
|
5834
|
+
} = tt(t, h), g = te(u), w = a[x ? f === "floating" ? "reference" : "floating" : f], E = ct(await o.getClippingRect({
|
|
5815
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)),
|
|
5816
5836
|
boundary: c,
|
|
5817
5837
|
rootBoundary: d,
|
|
5818
5838
|
strategy: l
|
|
5819
|
-
})),
|
|
5839
|
+
})), C = f === "floating" ? {
|
|
5820
5840
|
x: i,
|
|
5821
5841
|
y: s,
|
|
5822
5842
|
width: r.floating.width,
|
|
5823
5843
|
height: r.floating.height
|
|
5824
|
-
} : 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)) || {
|
|
5825
5845
|
x: 1,
|
|
5826
5846
|
y: 1
|
|
5827
5847
|
} : {
|
|
5828
5848
|
x: 1,
|
|
5829
5849
|
y: 1
|
|
5830
|
-
}, y =
|
|
5850
|
+
}, y = ct(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
5831
5851
|
elements: a,
|
|
5832
|
-
rect:
|
|
5833
|
-
offsetParent:
|
|
5852
|
+
rect: C,
|
|
5853
|
+
offsetParent: p,
|
|
5834
5854
|
strategy: l
|
|
5835
|
-
}) :
|
|
5855
|
+
}) : C);
|
|
5836
5856
|
return {
|
|
5837
5857
|
top: (E.top - y.top + g.top) / b.y,
|
|
5838
5858
|
bottom: (y.bottom - E.bottom + g.bottom) / b.y,
|
|
@@ -5840,7 +5860,7 @@ async function te(h, t) {
|
|
|
5840
5860
|
right: (y.right - E.right + g.right) / b.x
|
|
5841
5861
|
};
|
|
5842
5862
|
}
|
|
5843
|
-
const
|
|
5863
|
+
const qe = (h) => ({
|
|
5844
5864
|
name: "arrow",
|
|
5845
5865
|
options: h,
|
|
5846
5866
|
async fn(t) {
|
|
@@ -5858,26 +5878,26 @@ const je = (h) => ({
|
|
|
5858
5878
|
} = tt(h, t) || {};
|
|
5859
5879
|
if (c == null)
|
|
5860
5880
|
return {};
|
|
5861
|
-
const f =
|
|
5881
|
+
const f = te(d), x = {
|
|
5862
5882
|
x: e,
|
|
5863
5883
|
y: i
|
|
5864
|
-
}, u =
|
|
5865
|
-
let
|
|
5866
|
-
(!
|
|
5867
|
-
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;
|
|
5868
5888
|
return {
|
|
5869
|
-
[u]: x[u] +
|
|
5889
|
+
[u]: x[u] + D,
|
|
5870
5890
|
data: {
|
|
5871
5891
|
[u]: A,
|
|
5872
|
-
centerOffset: L - A -
|
|
5873
|
-
...
|
|
5874
|
-
alignmentOffset:
|
|
5892
|
+
centerOffset: L - A - D,
|
|
5893
|
+
...H && {
|
|
5894
|
+
alignmentOffset: D
|
|
5875
5895
|
}
|
|
5876
5896
|
},
|
|
5877
|
-
reset:
|
|
5897
|
+
reset: H
|
|
5878
5898
|
};
|
|
5879
5899
|
}
|
|
5880
|
-
}),
|
|
5900
|
+
}), Ze = function(h) {
|
|
5881
5901
|
return h === void 0 && (h = {}), {
|
|
5882
5902
|
name: "flip",
|
|
5883
5903
|
options: h,
|
|
@@ -5901,23 +5921,23 @@ const je = (h) => ({
|
|
|
5901
5921
|
} = tt(h, t);
|
|
5902
5922
|
if ((e = o.arrow) != null && e.alignmentOffset)
|
|
5903
5923
|
return {};
|
|
5904
|
-
const E = $(s),
|
|
5905
|
-
!x &&
|
|
5906
|
-
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 = [];
|
|
5907
5927
|
let I = ((i = o.flip) == null ? void 0 : i.overflows) || [];
|
|
5908
|
-
if (d &&
|
|
5909
|
-
const L =
|
|
5910
|
-
|
|
5928
|
+
if (d && v.push(O[E]), f) {
|
|
5929
|
+
const L = We(s, r, b);
|
|
5930
|
+
v.push(O[L[0]], O[L[1]]);
|
|
5911
5931
|
}
|
|
5912
5932
|
if (I = [...I, {
|
|
5913
5933
|
placement: s,
|
|
5914
|
-
overflows:
|
|
5915
|
-
}], !
|
|
5916
|
-
var
|
|
5917
|
-
const L = (((
|
|
5918
|
-
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
|
|
5919
5939
|
// overflows the main axis.
|
|
5920
|
-
I.every((k) => V(k.placement) ===
|
|
5940
|
+
I.every((k) => V(k.placement) === C ? k.overflows[0] > 0 : !0)))
|
|
5921
5941
|
return {
|
|
5922
5942
|
data: {
|
|
5923
5943
|
index: L,
|
|
@@ -5927,44 +5947,44 @@ const je = (h) => ({
|
|
|
5927
5947
|
placement: A
|
|
5928
5948
|
}
|
|
5929
5949
|
};
|
|
5930
|
-
let
|
|
5931
|
-
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)
|
|
5932
5952
|
switch (u) {
|
|
5933
5953
|
case "bestFit": {
|
|
5934
5954
|
var M;
|
|
5935
|
-
const
|
|
5936
|
-
if (
|
|
5955
|
+
const D = (M = I.filter((k) => {
|
|
5956
|
+
if (R) {
|
|
5937
5957
|
const W = V(k.placement);
|
|
5938
|
-
return W ===
|
|
5958
|
+
return W === C || // Create a bias to the `y` side axis due to horizontal
|
|
5939
5959
|
// reading directions favoring greater width.
|
|
5940
5960
|
W === "y";
|
|
5941
5961
|
}
|
|
5942
5962
|
return !0;
|
|
5943
|
-
}).map((k) => [k.placement, k.overflows.filter((W) => W > 0).reduce((W,
|
|
5944
|
-
|
|
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);
|
|
5945
5965
|
break;
|
|
5946
5966
|
}
|
|
5947
5967
|
case "initialPlacement":
|
|
5948
|
-
|
|
5968
|
+
H = a;
|
|
5949
5969
|
break;
|
|
5950
5970
|
}
|
|
5951
|
-
if (s !==
|
|
5971
|
+
if (s !== H)
|
|
5952
5972
|
return {
|
|
5953
5973
|
reset: {
|
|
5954
|
-
placement:
|
|
5974
|
+
placement: H
|
|
5955
5975
|
}
|
|
5956
5976
|
};
|
|
5957
5977
|
}
|
|
5958
5978
|
return {};
|
|
5959
5979
|
}
|
|
5960
5980
|
};
|
|
5961
|
-
},
|
|
5962
|
-
async function
|
|
5981
|
+
}, Je = /* @__PURE__ */ new Set(["left", "top"]);
|
|
5982
|
+
async function Qe(h, t) {
|
|
5963
5983
|
const {
|
|
5964
5984
|
placement: e,
|
|
5965
5985
|
platform: i,
|
|
5966
5986
|
elements: s
|
|
5967
|
-
} = 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);
|
|
5968
5988
|
let {
|
|
5969
5989
|
mainAxis: x,
|
|
5970
5990
|
crossAxis: u,
|
|
@@ -5986,7 +6006,7 @@ async function Je(h, t) {
|
|
|
5986
6006
|
y: u * d
|
|
5987
6007
|
};
|
|
5988
6008
|
}
|
|
5989
|
-
const
|
|
6009
|
+
const ti = function(h) {
|
|
5990
6010
|
return h === void 0 && (h = 0), {
|
|
5991
6011
|
name: "offset",
|
|
5992
6012
|
options: h,
|
|
@@ -5997,7 +6017,7 @@ const Qe = function(h) {
|
|
|
5997
6017
|
y: o,
|
|
5998
6018
|
placement: r,
|
|
5999
6019
|
middlewareData: a
|
|
6000
|
-
} = t, l = await
|
|
6020
|
+
} = t, l = await Qe(t, h);
|
|
6001
6021
|
return r === ((e = a.offset) == null ? void 0 : e.placement) && (i = a.arrow) != null && i.alignmentOffset ? {} : {
|
|
6002
6022
|
x: s + l.x,
|
|
6003
6023
|
y: o + l.y,
|
|
@@ -6008,7 +6028,7 @@ const Qe = function(h) {
|
|
|
6008
6028
|
};
|
|
6009
6029
|
}
|
|
6010
6030
|
};
|
|
6011
|
-
},
|
|
6031
|
+
}, ei = function(h) {
|
|
6012
6032
|
return h === void 0 && (h = {}), {
|
|
6013
6033
|
name: "shift",
|
|
6014
6034
|
options: h,
|
|
@@ -6024,11 +6044,11 @@ const Qe = function(h) {
|
|
|
6024
6044
|
fn: (w) => {
|
|
6025
6045
|
let {
|
|
6026
6046
|
x: E,
|
|
6027
|
-
y:
|
|
6047
|
+
y: C
|
|
6028
6048
|
} = w;
|
|
6029
6049
|
return {
|
|
6030
6050
|
x: E,
|
|
6031
|
-
y:
|
|
6051
|
+
y: C
|
|
6032
6052
|
};
|
|
6033
6053
|
}
|
|
6034
6054
|
},
|
|
@@ -6036,15 +6056,15 @@ const Qe = function(h) {
|
|
|
6036
6056
|
} = tt(h, t), c = {
|
|
6037
6057
|
x: e,
|
|
6038
6058
|
y: i
|
|
6039
|
-
}, d = await
|
|
6059
|
+
}, d = await ee(t, l), f = V($(s)), x = Qt(f);
|
|
6040
6060
|
let u = c[x], g = c[f];
|
|
6041
6061
|
if (o) {
|
|
6042
|
-
const w = x === "y" ? "top" : "left", E = x === "y" ? "bottom" : "right",
|
|
6043
|
-
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);
|
|
6044
6064
|
}
|
|
6045
6065
|
if (r) {
|
|
6046
|
-
const w = f === "y" ? "top" : "left", E = f === "y" ? "bottom" : "right",
|
|
6047
|
-
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);
|
|
6048
6068
|
}
|
|
6049
6069
|
const m = a.fn({
|
|
6050
6070
|
...t,
|
|
@@ -6065,11 +6085,11 @@ const Qe = function(h) {
|
|
|
6065
6085
|
}
|
|
6066
6086
|
};
|
|
6067
6087
|
};
|
|
6068
|
-
function
|
|
6088
|
+
function ut() {
|
|
6069
6089
|
return typeof window < "u";
|
|
6070
6090
|
}
|
|
6071
6091
|
function Z(h) {
|
|
6072
|
-
return
|
|
6092
|
+
return ie(h) ? (h.nodeName || "").toLowerCase() : "#document";
|
|
6073
6093
|
}
|
|
6074
6094
|
function N(h) {
|
|
6075
6095
|
var t;
|
|
@@ -6077,37 +6097,37 @@ function N(h) {
|
|
|
6077
6097
|
}
|
|
6078
6098
|
function F(h) {
|
|
6079
6099
|
var t;
|
|
6080
|
-
return (t = (
|
|
6100
|
+
return (t = (ie(h) ? h.ownerDocument : h.document) || window.document) == null ? void 0 : t.documentElement;
|
|
6081
6101
|
}
|
|
6082
|
-
function
|
|
6083
|
-
return
|
|
6102
|
+
function ie(h) {
|
|
6103
|
+
return ut() ? h instanceof Node || h instanceof N(h).Node : !1;
|
|
6084
6104
|
}
|
|
6085
|
-
function
|
|
6086
|
-
return
|
|
6105
|
+
function B(h) {
|
|
6106
|
+
return ut() ? h instanceof Element || h instanceof N(h).Element : !1;
|
|
6087
6107
|
}
|
|
6088
6108
|
function K(h) {
|
|
6089
|
-
return
|
|
6109
|
+
return ut() ? h instanceof HTMLElement || h instanceof N(h).HTMLElement : !1;
|
|
6090
6110
|
}
|
|
6091
|
-
function
|
|
6092
|
-
return !
|
|
6111
|
+
function Wt(h) {
|
|
6112
|
+
return !ut() || typeof ShadowRoot > "u" ? !1 : h instanceof ShadowRoot || h instanceof N(h).ShadowRoot;
|
|
6093
6113
|
}
|
|
6094
|
-
const
|
|
6114
|
+
const ii = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
6095
6115
|
function it(h) {
|
|
6096
6116
|
const {
|
|
6097
6117
|
overflow: t,
|
|
6098
6118
|
overflowX: e,
|
|
6099
6119
|
overflowY: i,
|
|
6100
6120
|
display: s
|
|
6101
|
-
} =
|
|
6102
|
-
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);
|
|
6103
6123
|
}
|
|
6104
|
-
const
|
|
6105
|
-
function
|
|
6106
|
-
return
|
|
6124
|
+
const si = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
6125
|
+
function oi(h) {
|
|
6126
|
+
return si.has(Z(h));
|
|
6107
6127
|
}
|
|
6108
|
-
const
|
|
6109
|
-
function
|
|
6110
|
-
return
|
|
6128
|
+
const ri = [":popover-open", ":modal"];
|
|
6129
|
+
function xt(h) {
|
|
6130
|
+
return ri.some((t) => {
|
|
6111
6131
|
try {
|
|
6112
6132
|
return h.matches(t);
|
|
6113
6133
|
} catch {
|
|
@@ -6115,34 +6135,34 @@ function ut(h) {
|
|
|
6115
6135
|
}
|
|
6116
6136
|
});
|
|
6117
6137
|
}
|
|
6118
|
-
const
|
|
6119
|
-
function
|
|
6120
|
-
const t =
|
|
6121
|
-
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));
|
|
6122
6142
|
}
|
|
6123
|
-
function
|
|
6143
|
+
function ci(h) {
|
|
6124
6144
|
let t = P(h);
|
|
6125
6145
|
for (; K(t) && !q(t); ) {
|
|
6126
|
-
if (
|
|
6146
|
+
if (St(t))
|
|
6127
6147
|
return t;
|
|
6128
|
-
if (
|
|
6148
|
+
if (xt(t))
|
|
6129
6149
|
return null;
|
|
6130
6150
|
t = P(t);
|
|
6131
6151
|
}
|
|
6132
6152
|
return null;
|
|
6133
6153
|
}
|
|
6134
|
-
function
|
|
6154
|
+
function Tt() {
|
|
6135
6155
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
6136
6156
|
}
|
|
6137
|
-
const
|
|
6157
|
+
const hi = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
6138
6158
|
function q(h) {
|
|
6139
|
-
return
|
|
6159
|
+
return hi.has(Z(h));
|
|
6140
6160
|
}
|
|
6141
|
-
function
|
|
6161
|
+
function X(h) {
|
|
6142
6162
|
return N(h).getComputedStyle(h);
|
|
6143
6163
|
}
|
|
6144
|
-
function
|
|
6145
|
-
return
|
|
6164
|
+
function gt(h) {
|
|
6165
|
+
return B(h) ? {
|
|
6146
6166
|
scrollLeft: h.scrollLeft,
|
|
6147
6167
|
scrollTop: h.scrollTop
|
|
6148
6168
|
} : {
|
|
@@ -6157,112 +6177,112 @@ function P(h) {
|
|
|
6157
6177
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
6158
6178
|
h.assignedSlot || // DOM Element detected.
|
|
6159
6179
|
h.parentNode || // ShadowRoot detected.
|
|
6160
|
-
|
|
6180
|
+
Wt(h) && h.host || // Fallback.
|
|
6161
6181
|
F(h)
|
|
6162
6182
|
);
|
|
6163
|
-
return
|
|
6183
|
+
return Wt(t) ? t.host : t;
|
|
6164
6184
|
}
|
|
6165
|
-
function
|
|
6185
|
+
function se(h) {
|
|
6166
6186
|
const t = P(h);
|
|
6167
|
-
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);
|
|
6168
6188
|
}
|
|
6169
6189
|
function Q(h, t, e) {
|
|
6170
6190
|
var i;
|
|
6171
6191
|
t === void 0 && (t = []), e === void 0 && (e = !0);
|
|
6172
|
-
const s =
|
|
6192
|
+
const s = se(h), o = s === ((i = h.ownerDocument) == null ? void 0 : i.body), r = N(s);
|
|
6173
6193
|
if (o) {
|
|
6174
|
-
const a =
|
|
6194
|
+
const a = Ct(r);
|
|
6175
6195
|
return t.concat(r, r.visualViewport || [], it(s) ? s : [], a && e ? Q(a) : []);
|
|
6176
6196
|
}
|
|
6177
6197
|
return t.concat(s, Q(s, [], e));
|
|
6178
6198
|
}
|
|
6179
|
-
function
|
|
6199
|
+
function Ct(h) {
|
|
6180
6200
|
return h.parent && Object.getPrototypeOf(h.parent) ? h.frameElement : null;
|
|
6181
6201
|
}
|
|
6182
|
-
function
|
|
6183
|
-
const t =
|
|
6202
|
+
function oe(h) {
|
|
6203
|
+
const t = X(h);
|
|
6184
6204
|
let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
|
|
6185
|
-
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;
|
|
6186
6206
|
return a && (e = o, i = r), {
|
|
6187
6207
|
width: e,
|
|
6188
6208
|
height: i,
|
|
6189
6209
|
$: a
|
|
6190
6210
|
};
|
|
6191
6211
|
}
|
|
6192
|
-
function
|
|
6193
|
-
return
|
|
6212
|
+
function Ot(h) {
|
|
6213
|
+
return B(h) ? h : h.contextElement;
|
|
6194
6214
|
}
|
|
6195
6215
|
function U(h) {
|
|
6196
|
-
const t =
|
|
6216
|
+
const t = Ot(h);
|
|
6197
6217
|
if (!K(t))
|
|
6198
6218
|
return Y(1);
|
|
6199
6219
|
const e = t.getBoundingClientRect(), {
|
|
6200
6220
|
width: i,
|
|
6201
6221
|
height: s,
|
|
6202
6222
|
$: o
|
|
6203
|
-
} =
|
|
6204
|
-
let r = (o ?
|
|
6223
|
+
} = oe(t);
|
|
6224
|
+
let r = (o ? at(e.width) : e.width) / i, a = (o ? at(e.height) : e.height) / s;
|
|
6205
6225
|
return (!r || !Number.isFinite(r)) && (r = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
6206
6226
|
x: r,
|
|
6207
6227
|
y: a
|
|
6208
6228
|
};
|
|
6209
6229
|
}
|
|
6210
|
-
const
|
|
6211
|
-
function
|
|
6230
|
+
const di = /* @__PURE__ */ Y(0);
|
|
6231
|
+
function re(h) {
|
|
6212
6232
|
const t = N(h);
|
|
6213
|
-
return !
|
|
6233
|
+
return !Tt() || !t.visualViewport ? di : {
|
|
6214
6234
|
x: t.visualViewport.offsetLeft,
|
|
6215
6235
|
y: t.visualViewport.offsetTop
|
|
6216
6236
|
};
|
|
6217
6237
|
}
|
|
6218
|
-
function
|
|
6238
|
+
function fi(h, t, e) {
|
|
6219
6239
|
return t === void 0 && (t = !1), !e || t && e !== N(h) ? !1 : t;
|
|
6220
6240
|
}
|
|
6221
6241
|
function G(h, t, e, i) {
|
|
6222
6242
|
t === void 0 && (t = !1), e === void 0 && (e = !1);
|
|
6223
|
-
const s = h.getBoundingClientRect(), o =
|
|
6243
|
+
const s = h.getBoundingClientRect(), o = Ot(h);
|
|
6224
6244
|
let r = Y(1);
|
|
6225
|
-
t && (i ?
|
|
6226
|
-
const a =
|
|
6245
|
+
t && (i ? B(i) && (r = U(i)) : r = U(h));
|
|
6246
|
+
const a = fi(o, e, i) ? re(o) : Y(0);
|
|
6227
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;
|
|
6228
6248
|
if (o) {
|
|
6229
|
-
const x = N(o), u = i &&
|
|
6230
|
-
let g = x, m =
|
|
6249
|
+
const x = N(o), u = i && B(i) ? N(i) : i;
|
|
6250
|
+
let g = x, m = Ct(g);
|
|
6231
6251
|
for (; m && i && u !== g; ) {
|
|
6232
|
-
const w = U(m), E = m.getBoundingClientRect(),
|
|
6233
|
-
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);
|
|
6234
6254
|
}
|
|
6235
6255
|
}
|
|
6236
|
-
return
|
|
6256
|
+
return ct({
|
|
6237
6257
|
width: d,
|
|
6238
6258
|
height: f,
|
|
6239
6259
|
x: l,
|
|
6240
6260
|
y: c
|
|
6241
6261
|
});
|
|
6242
6262
|
}
|
|
6243
|
-
function
|
|
6244
|
-
const e =
|
|
6263
|
+
function Lt(h, t) {
|
|
6264
|
+
const e = gt(h).scrollLeft;
|
|
6245
6265
|
return t ? t.left + e : G(F(h)).left + e;
|
|
6246
6266
|
}
|
|
6247
|
-
function
|
|
6267
|
+
function ne(h, t, e) {
|
|
6248
6268
|
e === void 0 && (e = !1);
|
|
6249
6269
|
const i = h.getBoundingClientRect(), s = i.left + t.scrollLeft - (e ? 0 : (
|
|
6250
6270
|
// RTL <body> scrollbar.
|
|
6251
|
-
|
|
6271
|
+
Lt(h, i)
|
|
6252
6272
|
)), o = i.top + t.scrollTop;
|
|
6253
6273
|
return {
|
|
6254
6274
|
x: s,
|
|
6255
6275
|
y: o
|
|
6256
6276
|
};
|
|
6257
6277
|
}
|
|
6258
|
-
function
|
|
6278
|
+
function ui(h) {
|
|
6259
6279
|
let {
|
|
6260
6280
|
elements: t,
|
|
6261
6281
|
rect: e,
|
|
6262
6282
|
offsetParent: i,
|
|
6263
6283
|
strategy: s
|
|
6264
6284
|
} = h;
|
|
6265
|
-
const o = s === "fixed", r = F(i), a = t ?
|
|
6285
|
+
const o = s === "fixed", r = F(i), a = t ? xt(t.floating) : !1;
|
|
6266
6286
|
if (i === r || a && o)
|
|
6267
6287
|
return e;
|
|
6268
6288
|
let l = {
|
|
@@ -6270,11 +6290,11 @@ function fi(h) {
|
|
|
6270
6290
|
scrollTop: 0
|
|
6271
6291
|
}, c = Y(1);
|
|
6272
6292
|
const d = Y(0), f = K(i);
|
|
6273
|
-
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))) {
|
|
6274
6294
|
const u = G(i);
|
|
6275
6295
|
c = U(i), d.x = u.x + i.clientLeft, d.y = u.y + i.clientTop;
|
|
6276
6296
|
}
|
|
6277
|
-
const x = r && !f && !o ?
|
|
6297
|
+
const x = r && !f && !o ? ne(r, l, !0) : Y(0);
|
|
6278
6298
|
return {
|
|
6279
6299
|
width: e.width * c.x,
|
|
6280
6300
|
height: e.height * c.y,
|
|
@@ -6282,26 +6302,26 @@ function fi(h) {
|
|
|
6282
6302
|
y: e.y * c.y - l.scrollTop * c.y + d.y + x.y
|
|
6283
6303
|
};
|
|
6284
6304
|
}
|
|
6285
|
-
function
|
|
6305
|
+
function xi(h) {
|
|
6286
6306
|
return Array.from(h.getClientRects());
|
|
6287
6307
|
}
|
|
6288
|
-
function
|
|
6289
|
-
const t = F(h), e =
|
|
6290
|
-
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);
|
|
6291
6311
|
const a = -e.scrollTop;
|
|
6292
|
-
return
|
|
6312
|
+
return X(i).direction === "rtl" && (r += z(t.clientWidth, i.clientWidth) - s), {
|
|
6293
6313
|
width: s,
|
|
6294
6314
|
height: o,
|
|
6295
6315
|
x: r,
|
|
6296
6316
|
y: a
|
|
6297
6317
|
};
|
|
6298
6318
|
}
|
|
6299
|
-
function
|
|
6319
|
+
function wi(h, t) {
|
|
6300
6320
|
const e = N(h), i = F(h), s = e.visualViewport;
|
|
6301
6321
|
let o = i.clientWidth, r = i.clientHeight, a = 0, l = 0;
|
|
6302
6322
|
if (s) {
|
|
6303
6323
|
o = s.width, r = s.height;
|
|
6304
|
-
const c =
|
|
6324
|
+
const c = Tt();
|
|
6305
6325
|
(!c || c && t === "fixed") && (a = s.offsetLeft, l = s.offsetTop);
|
|
6306
6326
|
}
|
|
6307
6327
|
return {
|
|
@@ -6311,8 +6331,8 @@ function gi(h, t) {
|
|
|
6311
6331
|
y: l
|
|
6312
6332
|
};
|
|
6313
6333
|
}
|
|
6314
|
-
const
|
|
6315
|
-
function
|
|
6334
|
+
const mi = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
6335
|
+
function Ei(h, t) {
|
|
6316
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;
|
|
6317
6337
|
return {
|
|
6318
6338
|
width: r,
|
|
@@ -6321,16 +6341,16 @@ function mi(h, t) {
|
|
|
6321
6341
|
y: c
|
|
6322
6342
|
};
|
|
6323
6343
|
}
|
|
6324
|
-
function
|
|
6344
|
+
function Vt(h, t, e) {
|
|
6325
6345
|
let i;
|
|
6326
6346
|
if (t === "viewport")
|
|
6327
|
-
i =
|
|
6347
|
+
i = wi(h, e);
|
|
6328
6348
|
else if (t === "document")
|
|
6329
|
-
i =
|
|
6330
|
-
else if (
|
|
6331
|
-
i =
|
|
6349
|
+
i = gi(F(h));
|
|
6350
|
+
else if (B(t))
|
|
6351
|
+
i = Ei(t, e);
|
|
6332
6352
|
else {
|
|
6333
|
-
const s =
|
|
6353
|
+
const s = re(h);
|
|
6334
6354
|
i = {
|
|
6335
6355
|
x: t.x - s.x,
|
|
6336
6356
|
y: t.y - s.y,
|
|
@@ -6338,36 +6358,36 @@ function Wt(h, t, e) {
|
|
|
6338
6358
|
height: t.height
|
|
6339
6359
|
};
|
|
6340
6360
|
}
|
|
6341
|
-
return
|
|
6361
|
+
return ct(i);
|
|
6342
6362
|
}
|
|
6343
|
-
function
|
|
6363
|
+
function ae(h, t) {
|
|
6344
6364
|
const e = P(h);
|
|
6345
|
-
return e === t || !
|
|
6365
|
+
return e === t || !B(e) || q(e) ? !1 : X(e).position === "fixed" || ae(e, t);
|
|
6346
6366
|
}
|
|
6347
|
-
function
|
|
6367
|
+
function pi(h, t) {
|
|
6348
6368
|
const e = t.get(h);
|
|
6349
6369
|
if (e)
|
|
6350
6370
|
return e;
|
|
6351
|
-
let i = Q(h, [], !1).filter((a) =>
|
|
6352
|
-
const o =
|
|
6371
|
+
let i = Q(h, [], !1).filter((a) => B(a) && Z(a) !== "body"), s = null;
|
|
6372
|
+
const o = X(h).position === "fixed";
|
|
6353
6373
|
let r = o ? P(h) : h;
|
|
6354
|
-
for (;
|
|
6355
|
-
const a =
|
|
6356
|
-
!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);
|
|
6357
6377
|
}
|
|
6358
6378
|
return t.set(h, i), i;
|
|
6359
6379
|
}
|
|
6360
|
-
function
|
|
6380
|
+
function Ci(h) {
|
|
6361
6381
|
let {
|
|
6362
6382
|
element: t,
|
|
6363
6383
|
boundary: e,
|
|
6364
6384
|
rootBoundary: i,
|
|
6365
6385
|
strategy: s
|
|
6366
6386
|
} = h;
|
|
6367
|
-
const r = [...e === "clippingAncestors" ?
|
|
6368
|
-
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);
|
|
6369
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;
|
|
6370
|
-
},
|
|
6390
|
+
}, Vt(t, a, s));
|
|
6371
6391
|
return {
|
|
6372
6392
|
width: l.right - l.left,
|
|
6373
6393
|
height: l.bottom - l.top,
|
|
@@ -6375,17 +6395,17 @@ function pi(h) {
|
|
|
6375
6395
|
y: l.top
|
|
6376
6396
|
};
|
|
6377
6397
|
}
|
|
6378
|
-
function
|
|
6398
|
+
function yi(h) {
|
|
6379
6399
|
const {
|
|
6380
6400
|
width: t,
|
|
6381
6401
|
height: e
|
|
6382
|
-
} =
|
|
6402
|
+
} = oe(h);
|
|
6383
6403
|
return {
|
|
6384
6404
|
width: t,
|
|
6385
6405
|
height: e
|
|
6386
6406
|
};
|
|
6387
6407
|
}
|
|
6388
|
-
function
|
|
6408
|
+
function bi(h, t, e) {
|
|
6389
6409
|
const i = K(t), s = F(t), o = e === "fixed", r = G(h, !0, o, t);
|
|
6390
6410
|
let a = {
|
|
6391
6411
|
scrollLeft: 0,
|
|
@@ -6393,15 +6413,15 @@ function yi(h, t, e) {
|
|
|
6393
6413
|
};
|
|
6394
6414
|
const l = Y(0);
|
|
6395
6415
|
function c() {
|
|
6396
|
-
l.x =
|
|
6416
|
+
l.x = Lt(s);
|
|
6397
6417
|
}
|
|
6398
6418
|
if (i || !i && !o)
|
|
6399
|
-
if ((Z(t) !== "body" || it(s)) && (a =
|
|
6419
|
+
if ((Z(t) !== "body" || it(s)) && (a = gt(t)), i) {
|
|
6400
6420
|
const u = G(t, !0, o, t);
|
|
6401
6421
|
l.x = u.x + t.clientLeft, l.y = u.y + t.clientTop;
|
|
6402
6422
|
} else s && c();
|
|
6403
6423
|
o && !i && s && c();
|
|
6404
|
-
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;
|
|
6405
6425
|
return {
|
|
6406
6426
|
x: f,
|
|
6407
6427
|
y: x,
|
|
@@ -6409,39 +6429,39 @@ function yi(h, t, e) {
|
|
|
6409
6429
|
height: r.height
|
|
6410
6430
|
};
|
|
6411
6431
|
}
|
|
6412
|
-
function
|
|
6413
|
-
return
|
|
6432
|
+
function wt(h) {
|
|
6433
|
+
return X(h).position === "static";
|
|
6414
6434
|
}
|
|
6415
|
-
function
|
|
6416
|
-
if (!K(h) ||
|
|
6435
|
+
function Pt(h, t) {
|
|
6436
|
+
if (!K(h) || X(h).position === "fixed")
|
|
6417
6437
|
return null;
|
|
6418
6438
|
if (t)
|
|
6419
6439
|
return t(h);
|
|
6420
6440
|
let e = h.offsetParent;
|
|
6421
6441
|
return F(h) === e && (e = e.ownerDocument.body), e;
|
|
6422
6442
|
}
|
|
6423
|
-
function
|
|
6443
|
+
function le(h, t) {
|
|
6424
6444
|
const e = N(h);
|
|
6425
|
-
if (
|
|
6445
|
+
if (xt(h))
|
|
6426
6446
|
return e;
|
|
6427
6447
|
if (!K(h)) {
|
|
6428
6448
|
let s = P(h);
|
|
6429
6449
|
for (; s && !q(s); ) {
|
|
6430
|
-
if (
|
|
6450
|
+
if (B(s) && !wt(s))
|
|
6431
6451
|
return s;
|
|
6432
6452
|
s = P(s);
|
|
6433
6453
|
}
|
|
6434
6454
|
return e;
|
|
6435
6455
|
}
|
|
6436
|
-
let i =
|
|
6437
|
-
for (; i &&
|
|
6438
|
-
i =
|
|
6439
|
-
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;
|
|
6440
6460
|
}
|
|
6441
|
-
const
|
|
6442
|
-
const t = this.getOffsetParent ||
|
|
6461
|
+
const vi = async function(h) {
|
|
6462
|
+
const t = this.getOffsetParent || le, e = this.getDimensions, i = await e(h.floating);
|
|
6443
6463
|
return {
|
|
6444
|
-
reference:
|
|
6464
|
+
reference: bi(h.reference, await t(h.floating), h.strategy),
|
|
6445
6465
|
floating: {
|
|
6446
6466
|
x: 0,
|
|
6447
6467
|
y: 0,
|
|
@@ -6450,25 +6470,25 @@ const bi = async function(h) {
|
|
|
6450
6470
|
}
|
|
6451
6471
|
};
|
|
6452
6472
|
};
|
|
6453
|
-
function
|
|
6454
|
-
return
|
|
6473
|
+
function Ii(h) {
|
|
6474
|
+
return X(h).direction === "rtl";
|
|
6455
6475
|
}
|
|
6456
|
-
const
|
|
6457
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
6476
|
+
const Ri = {
|
|
6477
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: ui,
|
|
6458
6478
|
getDocumentElement: F,
|
|
6459
|
-
getClippingRect:
|
|
6460
|
-
getOffsetParent:
|
|
6461
|
-
getElementRects:
|
|
6462
|
-
getClientRects:
|
|
6463
|
-
getDimensions:
|
|
6479
|
+
getClippingRect: Ci,
|
|
6480
|
+
getOffsetParent: le,
|
|
6481
|
+
getElementRects: vi,
|
|
6482
|
+
getClientRects: xi,
|
|
6483
|
+
getDimensions: yi,
|
|
6464
6484
|
getScale: U,
|
|
6465
|
-
isElement:
|
|
6466
|
-
isRTL:
|
|
6485
|
+
isElement: B,
|
|
6486
|
+
isRTL: Ii
|
|
6467
6487
|
};
|
|
6468
|
-
function
|
|
6488
|
+
function ce(h, t) {
|
|
6469
6489
|
return h.x === t.x && h.y === t.y && h.width === t.width && h.height === t.height;
|
|
6470
6490
|
}
|
|
6471
|
-
function
|
|
6491
|
+
function _i(h, t) {
|
|
6472
6492
|
let e = null, i;
|
|
6473
6493
|
const s = F(h);
|
|
6474
6494
|
function o() {
|
|
@@ -6485,36 +6505,36 @@ function vi(h, t) {
|
|
|
6485
6505
|
} = c;
|
|
6486
6506
|
if (a || t(), !x || !u)
|
|
6487
6507
|
return;
|
|
6488
|
-
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 = {
|
|
6489
6509
|
rootMargin: -g + "px " + -m + "px " + -w + "px " + -E + "px",
|
|
6490
6510
|
threshold: z(0, j(1, l)) || 1
|
|
6491
6511
|
};
|
|
6492
6512
|
let b = !0;
|
|
6493
|
-
function y(
|
|
6494
|
-
const
|
|
6495
|
-
if (
|
|
6513
|
+
function y(R) {
|
|
6514
|
+
const S = R[0].intersectionRatio;
|
|
6515
|
+
if (S !== l) {
|
|
6496
6516
|
if (!b)
|
|
6497
6517
|
return r();
|
|
6498
|
-
|
|
6518
|
+
S ? r(!1, S) : i = setTimeout(() => {
|
|
6499
6519
|
r(!1, 1e-7);
|
|
6500
6520
|
}, 1e3);
|
|
6501
6521
|
}
|
|
6502
|
-
|
|
6522
|
+
S === 1 && !ce(c, h.getBoundingClientRect()) && r(), b = !1;
|
|
6503
6523
|
}
|
|
6504
6524
|
try {
|
|
6505
6525
|
e = new IntersectionObserver(y, {
|
|
6506
|
-
...
|
|
6526
|
+
...p,
|
|
6507
6527
|
// Handle <iframe>s
|
|
6508
6528
|
root: s.ownerDocument
|
|
6509
6529
|
});
|
|
6510
6530
|
} catch {
|
|
6511
|
-
e = new IntersectionObserver(y,
|
|
6531
|
+
e = new IntersectionObserver(y, p);
|
|
6512
6532
|
}
|
|
6513
6533
|
e.observe(h);
|
|
6514
6534
|
}
|
|
6515
6535
|
return r(!0), o;
|
|
6516
6536
|
}
|
|
6517
|
-
function
|
|
6537
|
+
function yt(h, t, e, i) {
|
|
6518
6538
|
i === void 0 && (i = {});
|
|
6519
6539
|
const {
|
|
6520
6540
|
ancestorScroll: s = !0,
|
|
@@ -6522,48 +6542,48 @@ function Ct(h, t, e, i) {
|
|
|
6522
6542
|
elementResize: r = typeof ResizeObserver == "function",
|
|
6523
6543
|
layoutShift: a = typeof IntersectionObserver == "function",
|
|
6524
6544
|
animationFrame: l = !1
|
|
6525
|
-
} = i, c =
|
|
6545
|
+
} = i, c = Ot(h), d = s || o ? [...c ? Q(c) : [], ...Q(t)] : [];
|
|
6526
6546
|
d.forEach((E) => {
|
|
6527
6547
|
s && E.addEventListener("scroll", e, {
|
|
6528
6548
|
passive: !0
|
|
6529
6549
|
}), o && E.addEventListener("resize", e);
|
|
6530
6550
|
});
|
|
6531
|
-
const f = c && a ?
|
|
6551
|
+
const f = c && a ? _i(c, e) : null;
|
|
6532
6552
|
let x = -1, u = null;
|
|
6533
6553
|
r && (u = new ResizeObserver((E) => {
|
|
6534
|
-
let [
|
|
6535
|
-
|
|
6536
|
-
var
|
|
6537
|
-
(
|
|
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);
|
|
6538
6558
|
})), e();
|
|
6539
6559
|
}), c && !l && u.observe(c), u.observe(t));
|
|
6540
6560
|
let g, m = l ? G(h) : null;
|
|
6541
6561
|
l && w();
|
|
6542
6562
|
function w() {
|
|
6543
6563
|
const E = G(h);
|
|
6544
|
-
m && !
|
|
6564
|
+
m && !ce(m, E) && e(), m = E, g = requestAnimationFrame(w);
|
|
6545
6565
|
}
|
|
6546
6566
|
return e(), () => {
|
|
6547
6567
|
var E;
|
|
6548
|
-
d.forEach((
|
|
6549
|
-
s &&
|
|
6568
|
+
d.forEach((C) => {
|
|
6569
|
+
s && C.removeEventListener("scroll", e), o && C.removeEventListener("resize", e);
|
|
6550
6570
|
}), f == null || f(), (E = u) == null || E.disconnect(), u = null, l && cancelAnimationFrame(g);
|
|
6551
6571
|
};
|
|
6552
6572
|
}
|
|
6553
|
-
const
|
|
6573
|
+
const ht = ti, dt = ei, Mt = Ze, Si = qe, ft = (h, t, e) => {
|
|
6554
6574
|
const i = /* @__PURE__ */ new Map(), s = {
|
|
6555
|
-
platform:
|
|
6575
|
+
platform: Ri,
|
|
6556
6576
|
...e
|
|
6557
6577
|
}, o = {
|
|
6558
6578
|
...s.platform,
|
|
6559
6579
|
_c: i
|
|
6560
6580
|
};
|
|
6561
|
-
return
|
|
6581
|
+
return je(h, t, {
|
|
6562
6582
|
...s,
|
|
6563
6583
|
platform: o
|
|
6564
6584
|
});
|
|
6565
6585
|
};
|
|
6566
|
-
let
|
|
6586
|
+
let Ti = class {
|
|
6567
6587
|
constructor(t) {
|
|
6568
6588
|
n(this, "ctx");
|
|
6569
6589
|
n(this, "enable", !1);
|
|
@@ -6629,7 +6649,7 @@ let Si = class {
|
|
|
6629
6649
|
return;
|
|
6630
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;
|
|
6631
6651
|
const s = t.drawX + i.x, o = t.drawY + i.y;
|
|
6632
|
-
|
|
6652
|
+
ft({
|
|
6633
6653
|
getBoundingClientRect() {
|
|
6634
6654
|
return {
|
|
6635
6655
|
width: t.visibleWidth,
|
|
@@ -6644,7 +6664,7 @@ let Si = class {
|
|
|
6644
6664
|
}
|
|
6645
6665
|
}, this.floatingEl, {
|
|
6646
6666
|
placement: t.overflowTooltipPlacement,
|
|
6647
|
-
middleware: [
|
|
6667
|
+
middleware: [dt(), Mt(), ht(6), Si({ element: this.arrowEl })]
|
|
6648
6668
|
}).then((a) => {
|
|
6649
6669
|
const { x: l, y: c, placement: d, middlewareData: f } = a;
|
|
6650
6670
|
if (Object.assign(this.floatingEl.style, {
|
|
@@ -6683,7 +6703,7 @@ let Si = class {
|
|
|
6683
6703
|
this.contentEl.remove(), this.arrowEl.remove(), this.floatingEl.remove();
|
|
6684
6704
|
}
|
|
6685
6705
|
};
|
|
6686
|
-
class
|
|
6706
|
+
class Oi {
|
|
6687
6707
|
constructor(t) {
|
|
6688
6708
|
n(this, "editorEl");
|
|
6689
6709
|
n(this, "inputEl");
|
|
@@ -6712,7 +6732,7 @@ class Ti {
|
|
|
6712
6732
|
}), this.ctx.on("cellMousedown", () => {
|
|
6713
6733
|
this.inputEl.focus({ preventScroll: !0 });
|
|
6714
6734
|
}), this.ctx.on("keydown", (t) => {
|
|
6715
|
-
if (!this.ctx.isTarget(t) || !this.ctx.focusCell)
|
|
6735
|
+
if (!this.ctx.isTarget(t) || !this.ctx.focusCell || this.ctx.finding)
|
|
6716
6736
|
return;
|
|
6717
6737
|
if (t.code === "Escape" && this.ctx.editing) {
|
|
6718
6738
|
this.cancel = !0;
|
|
@@ -6876,7 +6896,7 @@ class Ti {
|
|
|
6876
6896
|
(t = this.editorEl) == null || t.remove();
|
|
6877
6897
|
}
|
|
6878
6898
|
}
|
|
6879
|
-
let
|
|
6899
|
+
let Li = class {
|
|
6880
6900
|
constructor(t) {
|
|
6881
6901
|
n(this, "ctx");
|
|
6882
6902
|
n(this, "emptyEl");
|
|
@@ -6900,7 +6920,7 @@ let Oi = class {
|
|
|
6900
6920
|
this.emptyEl.remove();
|
|
6901
6921
|
}
|
|
6902
6922
|
};
|
|
6903
|
-
class
|
|
6923
|
+
class Mi {
|
|
6904
6924
|
constructor(t) {
|
|
6905
6925
|
n(this, "ctx");
|
|
6906
6926
|
n(this, "observer");
|
|
@@ -6914,7 +6934,7 @@ class Li {
|
|
|
6914
6934
|
}
|
|
6915
6935
|
init() {
|
|
6916
6936
|
this.observer = new MutationObserver(
|
|
6917
|
-
|
|
6937
|
+
bt(() => {
|
|
6918
6938
|
const t = this.ctx.overlayerElement.querySelectorAll('[data-auto-height="true"]'), e = /* @__PURE__ */ new Map();
|
|
6919
6939
|
t.forEach((o) => {
|
|
6920
6940
|
const r = Number(o.getAttribute("data-row-index")), a = Number(o.getAttribute("data-col-index"));
|
|
@@ -7136,7 +7156,7 @@ class Li {
|
|
|
7136
7156
|
};
|
|
7137
7157
|
}
|
|
7138
7158
|
}
|
|
7139
|
-
class
|
|
7159
|
+
class zt {
|
|
7140
7160
|
constructor(t, e = [], i = {}) {
|
|
7141
7161
|
n(this, "container");
|
|
7142
7162
|
n(this, "menuData");
|
|
@@ -7170,7 +7190,7 @@ class Pt {
|
|
|
7170
7190
|
const o = this.createElement("span", "e-virt-table-menu-item-text");
|
|
7171
7191
|
if (o.textContent = t.label, s.appendChild(o), i.appendChild(s), (r = t.children) != null && r.length) {
|
|
7172
7192
|
const a = this.createElement("span", "e-virt-table-menu-arrow");
|
|
7173
|
-
a.innerHTML =
|
|
7193
|
+
a.innerHTML = nt, i.appendChild(a);
|
|
7174
7194
|
const l = this.createSubmenu(t.children);
|
|
7175
7195
|
i._submenu = l, this.container.appendChild(l);
|
|
7176
7196
|
}
|
|
@@ -7224,10 +7244,10 @@ class Pt {
|
|
|
7224
7244
|
async showSubmenu(t, e) {
|
|
7225
7245
|
if (this.activeSubmenus.has(e)) return;
|
|
7226
7246
|
this.activeSubmenus.add(e), e.classList.add("show");
|
|
7227
|
-
const i =
|
|
7228
|
-
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, {
|
|
7229
7249
|
placement: c,
|
|
7230
|
-
middleware: [
|
|
7250
|
+
middleware: [ht(8), dt({ padding: 8 })]
|
|
7231
7251
|
});
|
|
7232
7252
|
Object.assign(e.style, {
|
|
7233
7253
|
left: `${d}px`,
|
|
@@ -7294,10 +7314,10 @@ class Pt {
|
|
|
7294
7314
|
}),
|
|
7295
7315
|
contextElement: document.body
|
|
7296
7316
|
};
|
|
7297
|
-
|
|
7298
|
-
|
|
7317
|
+
yt(e, this.container, () => {
|
|
7318
|
+
ft(e, this.container, {
|
|
7299
7319
|
placement: "right-start",
|
|
7300
|
-
middleware: [
|
|
7320
|
+
middleware: [ht(), dt(), Mt()]
|
|
7301
7321
|
}).then(({ x: i, y: s }) => {
|
|
7302
7322
|
this.container && Object.assign(this.container.style, {
|
|
7303
7323
|
left: `${i}px`,
|
|
@@ -7362,7 +7382,7 @@ class Pt {
|
|
|
7362
7382
|
}), t.remove();
|
|
7363
7383
|
}
|
|
7364
7384
|
}
|
|
7365
|
-
class
|
|
7385
|
+
class Ai {
|
|
7366
7386
|
constructor(t) {
|
|
7367
7387
|
n(this, "ctx");
|
|
7368
7388
|
n(this, "contextMenuEl");
|
|
@@ -7382,7 +7402,7 @@ class Mi {
|
|
|
7382
7402
|
if (!i || r.length === 0) return;
|
|
7383
7403
|
e.preventDefault();
|
|
7384
7404
|
const { xArr: a, yArr: l } = this.ctx.selector, [c, d] = a, [f, x] = l, { rowIndex: u, colIndex: g } = t;
|
|
7385
|
-
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, {
|
|
7386
7406
|
onClick: (w, E) => {
|
|
7387
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());
|
|
7388
7408
|
}
|
|
@@ -7400,27 +7420,32 @@ class Mi {
|
|
|
7400
7420
|
e.preventDefault();
|
|
7401
7421
|
const { xArr: x } = this.ctx.selector, [u, g] = x, { colIndex: m } = t;
|
|
7402
7422
|
m >= u && m <= g || (this.ctx.focusCellHeader = t, this.ctx.emit("selectCols", t)), this.currentDOMTreeMenu && this.currentDOMTreeMenu.destroy();
|
|
7403
|
-
const E = this.ctx.database.getColumns(),
|
|
7404
|
-
...
|
|
7423
|
+
const E = this.ctx.database.getColumns(), C = f.map((p) => p.value === "visible" ? {
|
|
7424
|
+
...p,
|
|
7405
7425
|
children: this.filterColumns(E)
|
|
7406
|
-
} :
|
|
7407
|
-
this.ctx.contextMenuIng = !0, this.currentDOMTreeMenu = new
|
|
7408
|
-
onClick: (
|
|
7409
|
-
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;
|
|
7410
7430
|
if (b === "fixedLeft" || b === "fixedRight" || b === "fixedNone") {
|
|
7411
|
-
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);
|
|
7412
7432
|
this.ctx.database.setCustomHeaderFixedData(
|
|
7413
|
-
|
|
7433
|
+
O,
|
|
7414
7434
|
b === "fixedLeft" ? "left" : b === "fixedRight" ? "right" : ""
|
|
7415
7435
|
), this.hide();
|
|
7416
7436
|
} else if (b === "hide") {
|
|
7417
|
-
const
|
|
7418
|
-
|
|
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();
|
|
7419
7439
|
} else if (b !== "visible") if (b.startsWith("visible_")) {
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
|
|
7423
|
-
|
|
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();
|
|
7424
7449
|
} else b === "resetHeader" && (this.ctx.database.resetCustomHeader(), this.hide());
|
|
7425
7450
|
}
|
|
7426
7451
|
}), this.positionMenu(e);
|
|
@@ -7442,10 +7467,10 @@ class Mi {
|
|
|
7442
7467
|
}),
|
|
7443
7468
|
contextElement: document.body
|
|
7444
7469
|
};
|
|
7445
|
-
|
|
7446
|
-
|
|
7470
|
+
yt(e, this.contextMenuEl, () => {
|
|
7471
|
+
ft(e, this.contextMenuEl, {
|
|
7447
7472
|
placement: "right-start",
|
|
7448
|
-
middleware: [
|
|
7473
|
+
middleware: [ht(), dt(), Mt()]
|
|
7449
7474
|
}).then(({ x: i, y: s }) => {
|
|
7450
7475
|
this.contextMenuEl && Object.assign(this.contextMenuEl.style, {
|
|
7451
7476
|
left: `${i}px`,
|
|
@@ -7461,14 +7486,18 @@ class Mi {
|
|
|
7461
7486
|
const s = this.filterColumns(i.children);
|
|
7462
7487
|
s.length > 0 && e.push({
|
|
7463
7488
|
label: i.title,
|
|
7489
|
+
key: i.key,
|
|
7464
7490
|
value: `visible_${i.key}`,
|
|
7465
|
-
disabled:
|
|
7466
|
-
// 非末级,且有子项保留 → disabled
|
|
7491
|
+
// disabled: true, // 非末级,且有子项保留 → disabled
|
|
7467
7492
|
children: s
|
|
7468
7493
|
});
|
|
7469
|
-
} 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 });
|
|
7470
7495
|
return e;
|
|
7471
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
|
+
}
|
|
7472
7501
|
hide() {
|
|
7473
7502
|
this.currentDOMTreeMenu && (this.currentDOMTreeMenu.destroy(), this.currentDOMTreeMenu = void 0), this.contextMenuEl.style.display = "none", this.ctx.contextMenuIng = !1;
|
|
7474
7503
|
}
|
|
@@ -7477,7 +7506,7 @@ class Mi {
|
|
|
7477
7506
|
this.hide(), (t = this.contextMenuEl) == null || t.remove();
|
|
7478
7507
|
}
|
|
7479
7508
|
}
|
|
7480
|
-
class
|
|
7509
|
+
class Hi {
|
|
7481
7510
|
constructor(t) {
|
|
7482
7511
|
n(this, "ctx");
|
|
7483
7512
|
n(this, "loadingEl");
|
|
@@ -7507,7 +7536,177 @@ class Ai {
|
|
|
7507
7536
|
this.loadingEl.remove();
|
|
7508
7537
|
}
|
|
7509
7538
|
}
|
|
7510
|
-
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 {
|
|
7511
7710
|
constructor(t, e) {
|
|
7512
7711
|
n(this, "options");
|
|
7513
7712
|
n(this, "scroller");
|
|
@@ -7522,6 +7721,7 @@ class ki {
|
|
|
7522
7721
|
n(this, "overlayer");
|
|
7523
7722
|
n(this, "contextMenu");
|
|
7524
7723
|
n(this, "loading");
|
|
7724
|
+
n(this, "finderBar");
|
|
7525
7725
|
n(this, "animationFrameId");
|
|
7526
7726
|
n(this, "animationFrameId2");
|
|
7527
7727
|
n(this, "ctx");
|
|
@@ -7533,7 +7733,7 @@ class ki {
|
|
|
7533
7733
|
o,
|
|
7534
7734
|
r
|
|
7535
7735
|
);
|
|
7536
|
-
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", () => {
|
|
7537
7737
|
this.draw();
|
|
7538
7738
|
}), this.ctx.on("drawView", () => {
|
|
7539
7739
|
this.draw(!0);
|
|
@@ -7793,10 +7993,10 @@ class ki {
|
|
|
7793
7993
|
}
|
|
7794
7994
|
getUtils() {
|
|
7795
7995
|
return {
|
|
7796
|
-
mergeColCell:
|
|
7797
|
-
mergeRowCell:
|
|
7798
|
-
getSpanArrByRow:
|
|
7799
|
-
getSpanObjByColumn:
|
|
7996
|
+
mergeColCell: pe,
|
|
7997
|
+
mergeRowCell: Ee,
|
|
7998
|
+
getSpanArrByRow: Ut,
|
|
7999
|
+
getSpanObjByColumn: jt
|
|
7800
8000
|
};
|
|
7801
8001
|
}
|
|
7802
8002
|
getColumnByKey(t) {
|
|
@@ -7810,10 +8010,10 @@ class ki {
|
|
|
7810
8010
|
* 销毁
|
|
7811
8011
|
*/
|
|
7812
8012
|
destroy() {
|
|
7813
|
-
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();
|
|
7814
8014
|
}
|
|
7815
8015
|
}
|
|
7816
8016
|
export {
|
|
7817
|
-
|
|
8017
|
+
Xi as default
|
|
7818
8018
|
};
|
|
7819
8019
|
//# sourceMappingURL=index.es.js.map
|