@hufe921/canvas-editor 0.9.22 → 0.9.23
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/CHANGELOG.md +32 -0
- package/README.md +3 -3
- package/dist/canvas-editor.es.js +401 -127
- package/dist/canvas-editor.es.js.map +1 -1
- package/dist/canvas-editor.umd.js +19 -19
- package/dist/canvas-editor.umd.js.map +1 -1
- package/dist/src/editor/core/draw/Draw.d.ts +19 -6
- package/dist/src/editor/core/draw/frame/Header.d.ts +18 -1
- package/dist/src/editor/core/event/CanvasEvent.d.ts +1 -1
- package/dist/src/editor/core/event/handlers/click.d.ts +1 -1
- package/dist/src/editor/core/position/Position.d.ts +8 -4
- package/dist/src/editor/core/range/RangeManager.d.ts +1 -0
- package/dist/src/editor/core/zone/Zone.d.ts +15 -0
- package/dist/src/editor/dataset/constant/Header.d.ts +2 -0
- package/dist/src/editor/dataset/enum/Editor.d.ts +5 -0
- package/dist/src/editor/dataset/enum/Header.d.ts +5 -0
- package/dist/src/editor/index.d.ts +5 -5
- package/dist/src/editor/interface/Draw.d.ts +10 -1
- package/dist/src/editor/interface/Editor.d.ts +7 -2
- package/dist/src/editor/interface/Header.d.ts +3 -4
- package/dist/src/editor/interface/Position.d.ts +2 -0
- package/dist/src/editor/interface/Range.d.ts +2 -0
- package/package.json +1 -1
package/dist/canvas-editor.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(()=>{(function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.appendChild(document.createTextNode('.ce-select-control-popup{max-width:160px;min-width:69px;max-height:225px;position:absolute;z-index:1;border:1px solid #e4e7ed;border-radius:4px;background-color:#fff;box-shadow:0 2px 12px #0000001a;box-sizing:border-box;margin:5px 0;overflow-y:auto}.ce-select-control-popup ul{list-style:none;padding:3px 0;margin:0;box-sizing:border-box}.ce-select-control-popup ul li{font-size:13px;padding:0 20px;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#666;height:36px;line-height:36px;box-sizing:border-box;cursor:pointer}.ce-select-control-popup ul li:hover{background-color:#eef2fd}.ce-select-control-popup ul li.active{color:var(--COLOR-HOVER, #5175f4);font-weight:700}.ce-date-container{display:none;width:300px;overflow:hidden;left:0;right:0;position:absolute;z-index:1;color:#606266;background:#ffffff;border-radius:4px;padding:10px;user-select:none;border:1px solid #e4e7ed;box-shadow:0 2px 12px #0000001a}.ce-date-container.active{display:block}.ce-date-wrap{display:none}.ce-date-wrap.active{display:block}.ce-date-title{display:flex;justify-content:center;align-items:center;text-align:center;color:#606266;font-size:16px}.ce-date-title>span{display:inline-block}.ce-date-title>span:not(.ce-date-title__now){font-family:cursive;cursor:pointer}.ce-date-title>span:not(.ce-date-title__now):hover{color:#5175f4}.ce-date-title .ce-date-title__pre-year,.ce-date-title .ce-date-title__pre-month{width:15%}.ce-date-title .ce-date-title__now{width:40%}.ce-date-title .ce-date-title__next-year,.ce-date-title .ce-date-title__next-month{width:15%}.ce-date-week{width:100%;display:flex;justify-content:center;margin-top:15px;padding-bottom:5px;border-bottom:1px solid #e4e7ed}.ce-date-week>span{list-style:none;width:14.28571%;text-align:center;color:#606266;font-size:14px}.ce-date-day{width:100%;display:flex;flex-wrap:wrap;align-items:center;margin-top:5px}.ce-date-day>div{width:14.28571%;height:40px;text-align:center;color:#606266;font-size:14px;cursor:pointer;line-height:40px;border-radius:4px}.ce-date-day>div:hover{color:#5175f4;opacity:.8}.ce-date-day>div.active{color:#5175f4;font-weight:700}.ce-date-day>div.disable{color:#c0c4cc}.ce-date-day>div.select{color:#fff;background-color:#5175f4}.ce-time-wrap{display:none;padding:10px;height:286px}.ce-time-wrap ::-webkit-scrollbar{width:0}.ce-time-wrap.active{display:flex}.ce-time-wrap li{list-style:none}.ce-time-wrap>li{width:33.3%;height:100%;text-align:center}.ce-time-wrap>li>span{transform:translateY(-5px);display:inline-block}.ce-time-wrap>li>ol{height:calc(100% - 20px);overflow-y:auto;border:1px solid #e2e2e2;position:relative}.ce-time-wrap>li:first-child>ol{border-right:0}.ce-time-wrap>li:last-child>ol{border-left:0}.ce-time-wrap>li>ol>li{line-height:30px;cursor:pointer;transition:all .3s}.ce-time-wrap>li>ol>li:hover{background-color:#eaeaea}.ce-time-wrap>li>ol>li.active{color:#fff;background:#5175F4}.ce-date-menu{width:100%;height:28px;display:flex;justify-content:flex-end;align-items:center;padding-top:10px;position:relative;border-top:1px solid #e4e7ed}.ce-date-menu button{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;appearance:none;text-align:center;box-sizing:border-box;outline:none;transition:.1s;font-weight:500;user-select:none;padding:7px 15px;font-size:12px;border-radius:3px;margin:0 0 0 10px}.ce-date-menu button:hover{color:#5175f4;border-color:#5175f4}.ce-date-menu button.ce-date-menu__time{border:1px solid transparent;position:absolute;left:0;margin-left:0}.ce-date-menu button.ce-date-menu__time:hover{color:#5175f4}.ce-block-item{position:absolute;z-index:0;overflow:hidden;border-radius:8px;background-color:#fff;border:1px solid rgb(235 236 240)}.ce-table-tool__row{position:absolute;width:12px;border-radius:6.5px;overflow:hidden;background-color:#e2e6ed}.ce-table-tool__row .ce-table-tool__row__item{width:100%;position:relative}.ce-table-tool__row .ce-table-tool__row__item:after{content:"";position:absolute;bottom:0;left:2px;width:8px;height:1px;background-color:#c0c6cf}.ce-table-tool__row .ce-table-tool__row__item:last-child:after{display:none}.ce-table-tool__col{position:absolute;height:12px;border-radius:6.5px;overflow:hidden;background-color:#e2e6ed;display:flex}.ce-table-tool__col .ce-table-tool__col__item{height:100%;position:relative}.ce-table-tool__col .ce-table-tool__col__item:after{content:"";position:absolute;top:2px;left:-1px;width:1px;height:8px;z-index:1;background-color:#c0c6cf}.ce-table-tool__col .ce-table-tool__col__item:first-child:after{display:none}.ce-table-tool__row .ce-table-tool__row__item.active,.ce-table-tool__col .ce-table-tool__col__item.active{background-color:#c4d7fa}.ce-table-tool__col .ce-table-tool__anchor{right:-5px;width:10px;height:12px;z-index:9;position:absolute;cursor:col-resize}.ce-table-tool__row .ce-table-tool__anchor{bottom:-5px;left:0;width:12px;height:10px;z-index:9;position:absolute;cursor:row-resize}.ce-table-anchor__line{z-index:9;position:absolute;border:1px dotted #000000}.ce-resizer-selection{position:absolute;border:1px solid}.ce-resizer-selection>div{position:absolute;width:10px;height:10px;box-shadow:0 1px 4px #0000004d;border-radius:5px;border:2px solid #ffffff;box-sizing:border-box}.ce-resizer-selection .handle-0{cursor:nw-resize}.ce-resizer-selection .handle-1{cursor:n-resize}.ce-resizer-selection .handle-2{cursor:ne-resize}.ce-resizer-selection .handle-3{cursor:e-resize}.ce-resizer-selection .handle-4{cursor:se-resize}.ce-resizer-selection .handle-5{cursor:s-resize}.ce-resizer-selection .handle-6{cursor:sw-resize}.ce-resizer-selection .handle-7{cursor:w-resize}.ce-resizer-image{position:absolute;opacity:.5}.ce-image-previewer{position:fixed;left:0;top:0;z-index:1000;width:100%;height:100%;overflow:hidden;background:#f2f4f7;display:flex;align-items:center;justify-content:center;animation:previewerAnimation .3s}@keyframes previewerAnimation{0%{opacity:.1}to{opacity:1}}.ce-image-previewer .image-close{width:24px;height:24px;display:inline-block;position:absolute;right:50px;top:30px;z-index:99;cursor:pointer;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIzLjk3IDdsMS40MTUgMS40MTQtNy43NzkgNy43NzggNy43NzkgNy43NzktMS40MTQgMS40MTQtNy43NzktNy43NzktNy43NzggNy43NzlMNyAyMy45N2w3Ljc3OC03Ljc3OUw3IDguNDE0IDguNDE0IDdsNy43NzggNy43NzhMMjMuOTcxIDd6IiBmaWxsPSIjM0Q0NzU3IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=) no-repeat;background-size:100% 100%;transition:all .3s;border-radius:50%}.ce-image-previewer .image-close:hover{background-color:#e2e6ed}.ce-image-previewer .ce-image-container{position:relative}.ce-image-previewer .ce-image-container img{cursor:move;position:relative}.ce-image-previewer .ce-image-menu{height:50px;position:absolute;bottom:50px;z-index:99;display:flex;align-items:center;justify-content:center}.ce-image-previewer .ce-image-menu i{width:32px;height:32px;margin:0 8px;cursor:pointer;display:inline-block;background-repeat:no-repeat;background-size:100% 100%;transition:all .3s;border-radius:50%}.ce-image-previewer .ce-image-menu i:hover{background-color:#e2e6ed}.ce-image-previewer .ce-image-menu i.zoom-in{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE0IDE0di00aDJ2NGg0djJoLTR2NGgtMnYtNGgtNHYtMmg0em04Ljc0OSAxMC4xNjNBMTEuOTUyIDExLjk1MiAwIDAxMTUgMjdDOC4zNzMgMjcgMyAyMS42MjcgMyAxNVM4LjM3MyAzIDE1IDNzMTIgNS4zNzMgMTIgMTJjMCAyLjk1NC0xLjA2NyA1LjY1OC0yLjgzNyA3Ljc0OWw0LjkwOCA0LjkwOC0xLjQxNCAxLjQxNC00LjkwOC00LjkwOHpNMTUgMjVjNS41MjMgMCAxMC00LjQ3NyAxMC0xMFMyMC41MjMgNSAxNSA1IDUgOS40NzcgNSAxNXM0LjQ3NyAxMCAxMCAxMHoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-image-previewer .ce-image-menu i.zoom-out{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIyLjc0OSAyNC4xNjNBMTEuOTUyIDExLjk1MiAwIDAxMTUgMjdDOC4zNzMgMjcgMyAyMS42MjcgMyAxNVM4LjM3MyAzIDE1IDNzMTIgNS4zNzMgMTIgMTJjMCAyLjk1NC0xLjA2NyA1LjY1OC0yLjgzNyA3Ljc0OWw0LjkwOCA0LjkwOC0xLjQxNCAxLjQxNC00LjkwOC00LjkwOHpNMTUgMjVjNS41MjMgMCAxMC00LjQ3NyAxMC0xMFMyMC41MjMgNSAxNSA1IDUgOS40NzcgNSAxNXM0LjQ3NyAxMCAxMCAxMHptLTUtMTFoMTB2MkgxMHYtMnoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-image-previewer .ce-image-menu i.rotate{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTYgNGM2LjYyNyAwIDEyIDUuMzczIDEyIDEyYTExLjk3IDExLjk3IDAgMDEtNCA4Ljk0NFYyM2gtLjg2QTkuOTY4IDkuOTY4IDAgMDAyNiAxNmMwLTUuNTIzLTQuNDc3LTEwLTEwLTEwUzYgMTAuNDc3IDYgMTZjMCA1LjE4NSAzLjk0NyA5LjQ0OSA5IDkuOTV2Mi4wMDlDOC44NCAyNy40NTEgNCAyMi4yOTEgNCAxNiA0IDkuMzczIDkuMzczIDQgMTYgNHoiIGZpbGwtcnVsZT0ibm9uemVybyIvPjxwYXRoIGQ9Ik0xOS44NzkgMjcuMzI4bDEuNzY3LTYuNzE3IDQuOTUgNC45NXoiLz48L2c+PC9zdmc+)}.ce-image-previewer .ce-image-menu i.original-size{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQgNGgyNHYyNEg0VjR6bTIgMnYyMGgyMFY2SDZ6bTQgNWgydjEwaC0yVjExem01IDJoMnYyaC0ydi0yem0wIDRoMnYyaC0ydi0yem01LTZoMnYxMGgtMlYxMXoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-image-previewer .ce-image-menu i.image-download{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQuNSAxNXYzLjVoMTVWMTVIMjF2NUgzdi01aDEuNXptOC4yMzItMTEuMjI2djkuMTk2bDQuMDUtNC4wNSAxLjA2IDEuMDYtNS44MzQgNS44MzQtNS44MzMtNS44MzMgMS4wNi0xLjA2IDMuOTk4IDMuOTk2VjMuNzc0aDEuNXoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-contextmenu-container{z-index:9;position:fixed;display:none;padding:4px;overflow-x:hidden;overflow-y:auto;background:#fff;box-shadow:0 2px 12px #38383833;border:1px solid #e2e6ed;border-radius:2px}.ce-contextmenu-content{display:flex;flex-direction:column}.ce-contextmenu-content .ce-contextmenu-sub-item:after{position:absolute;content:"";width:16px;height:16px;right:12px;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMCAwaDE2djE2SDB6Ii8+PGcgZmlsbD0iIzc2N0M4NSI+PHBhdGggZD0iTTcgMTIuMjQzbC0uNzA3LS43MDcgNC4yNDMtNC4yNDMuNzA3LjcwN3oiLz48cGF0aCBkPSJNNi4yOTMgNC40NjRMNyAzLjc1NyAxMS4yNDMgOGwtLjcwNy43MDd6Ii8+PC9nPjwvZz48L3N2Zz4=)}.ce-contextmenu-content .ce-contextmenu-item{min-width:140px;padding:0 32px 0 16px;height:30px;display:flex;align-items:center;white-space:nowrap;box-sizing:border-box;cursor:pointer}.ce-contextmenu-content .ce-contextmenu-item.hover{background:rgba(25,55,88,.04)}.ce-contextmenu-content .ce-contextmenu-item span{max-width:300px;font-size:12px;color:#3d4757;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ce-contextmenu-content .ce-contextmenu-item span.ce-shortcut{color:#767c85;height:30px;flex:1;text-align:right;line-height:30px;margin-left:20px}.ce-contextmenu-content .ce-contextmenu-item i{width:16px;height:16px;vertical-align:middle;display:inline-block;background-repeat:no-repeat;background-size:100% 100%;flex-shrink:0;margin-right:8px}.ce-contextmenu-divider{background-color:#e2e6ed;margin:4px 16px;height:1px}.ce-contextmenu-print{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjM0Q0NzU3IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0xMiA0aC0xVjJINXYySDRWMmExIDEgMCAwMTEtMWg2YTEgMSAwIDAxMSAxdjJ6bTAgNXY0YTEgMSAwIDAxLTEgMUg1YTEgMSAwIDAxLTEtMVY5aDF2NGg2VjloMXoiLz48cGF0aCBkPSJNMTIgMTJ2LTFoMlY1SDJ2NmgydjFIMmExIDEgMCAwMS0xLTFWNWExIDEgMCAwMTEtMWgxMmExIDEgMCAwMTEgMXY2YTEgMSAwIDAxLTEgMWgtMnoiLz48cGF0aCBkPSJNMyA4aDEwdjFIM3ptOC0yaDJ2MWgtMnoiLz48L2c+PC9zdmc+)}.ce-contextmenu-image{background-image:url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSLlm77lsYJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4PSIwIiB5PSIwIiB2aWV3Qm94PSIwIDAgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxzdHlsZT4uc3Qwe2ZpbGw6IzNkNDc1N308L3N0eWxlPjxnIGlkPSJfeDMwXzAt5YWs5YWxX3gyRl8wMuW3peWFt+agj194MkZf5o+S5YWl5Zu+54mHLTE2cHgtIj48ZyBpZD0iR3JvdXAtMTkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMSkiPjxwYXRoIGlkPSJDb21iaW5lZC1TaGFwZSIgY2xhc3M9InN0MCIgZD0iTTEgMGgxMmMuNiAwIDEgLjQgMSAxdjExYzAgLjYtLjQgMS0xIDFIMWMtLjYgMC0xLS40LTEtMVYxYzAtLjYuNC0xIDEtMXptMCAxdjExaDEyVjFIMXoiLz48Y2lyY2xlIGlkPSLmpK3lnIblvaIiIGNsYXNzPSJzdDAiIGN4PSIxMCIgY3k9IjQiIHI9IjEiLz48cGF0aCBpZD0iUGF0aCIgY2xhc3M9InN0MCIgZD0iTTguNSAxMS4ybC00LTQuMUwxIDEwLjdWOS4yYzEuNy0xLjYgMi43LTIuNSAzLTIuOC40LS41LjctLjQgMSAwTDguNSAxMCAxMSA3LjNjLjQtLjUuNi0uNSAxLS4xbDIgMi44djEuNWwtMi41LTMuNC0zIDMuMXoiLz48L2c+PC9nPjwvc3ZnPg==)}.ce-contextmenu-image-change{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyIDQpIiBmaWxsPSIjM0Q0NzU3Ij48Y2lyY2xlIGZpbGwtcnVsZT0ibm9uemVybyIgY3g9IjMiIGN5PSIxIiByPSIxIi8+PHBhdGggZD0iTTcuNDczIDguMjIzTDMuNDcgNC4xMDcgMCA3LjY2N3YtMS41QzEuNzE1IDQuNiAyLjcwNyAzLjY2NCAyLjk3NSAzLjM1OGMuNDAyLS40NTcuNjUxLS4zOSAxLjA0MiAwTDcuNDczIDcgOS45NiA0LjM0OWMuNDE0LS40NjIuNjItLjQ2MiAxLjAxMS0uMDcxTDEzIDcuMDZ2MS41bC0yLjUxLTMuNDEtMy4wMTcgMy4wNzJ6Ii8+PC9nPjxwYXRoIGQ9Ik02IDEuNUgxLjV2MTJoMTN2LTRWMTNhLjUuNSAwIDAxLS41LjVIMmEuNS41IDAgMDEtLjUtLjVWMmEuNS41IDAgMDEuNS0uNWg0em04LjUgOFY2bC0uNS41aDFsLS41LS41djMuNXpNNiAxLjVoNEw5LjUgMXYxbC41LS41SDZ6IiBzdHJva2U9IiMzRDQ3NTciLz48cGF0aCBkPSJNMTMuMDg1IDEuMzE2bC0zLjgxNCA0YTEgMSAwIDAwMS40NTggMS4zNjhsMy44MTUtNGExIDEgMCAxMC0xLjQ1OS0xLjM2OHoiIGZpbGw9IiMzRDQ3NTciIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-insert-row-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiMzRDQ3NTciIGQ9Ik04LjUgNS41aDZ2NGgtNnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNNCA3djFoMlY3em0tMyAuNUw0IDV2NXpNMSAxaDEydjFIMXptMCAxMmgxMnYxSDF6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-insert-top-row{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNOCA1SDd2M2gxem0tLjUtM0wxMCA1SDV6Ii8+PHJlY3Qgc3Ryb2tlPSIjM0Q0NzU3IiB4PSIxLjUiIHk9IjEwLjUiIHdpZHRoPSIxMiIgaGVpZ2h0PSIzIiByeD0iMSIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-insert-bottom-row{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNNyAxMWgxVjhIN3ptLjUgM0w1IDExaDV6Ii8+PHJlY3Qgc3Ryb2tlPSIjM0Q0NzU3IiB4PSIxLjUiIHk9IjIuNSIgd2lkdGg9IjEyIiBoZWlnaHQ9IjMiIHJ4PSIxIi8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-insert-left-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMTEgN3YxaDNWN3ptLTMgLjVMMTEgNXY1eiIvPjxyZWN0IHN0cm9rZT0iIzNENDc1NyIgdHJhbnNmb3JtPSJyb3RhdGUoOTAgNCA3LjUpIiB4PSItMiIgeT0iNiIgd2lkdGg9IjEyIiBoZWlnaHQ9IjMiIHJ4PSIxIi8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-insert-right-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNNSA4VjdIMnYxem0zLS41TDUgMTBWNXoiLz48cmVjdCBzdHJva2U9IiMzRDQ3NTciIHRyYW5zZm9ybT0icm90YXRlKDkwIDEyIDcuNSkiIHg9IjYiIHk9IjYiIHdpZHRoPSIxMiIgaGVpZ2h0PSIzIiByeD0iMSIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-delete-row-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiM5MjlBQTgiIGQ9Ik04LjUgNi41aDZ2MmgtNnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMiAxMmgxMXYxSDJ6TTIgMmgxMXYxSDJ6bS42MyAzTDcgOS4zNWwtLjYzNS42NUwyIDUuNjN6Ii8+PHBhdGggZmlsbD0iIzNENDc1NyIgZD0iTTIgOS4zNjNMNi4zNTUgNSA3IDUuNzA3IDIuNjk1IDEweiIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-delete-row{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiM5MjlBQTgiIGQ9Ik04LjUgNS41aDZ2NGgtNnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMSAxM2gxMnYxSDF6TTEgMWgxMnYxSDF6bTAgNGgxdjFIMXptMSAxaDF2MUgyem0xIDFoMXYxSDN6bTEtMWgxdjFINHptMS0xaDF2MUg1ek00IDhoMXYxSDR6TTIgOGgxdjFIMnptMyAxaDF2MUg1ek0xIDloMXYxSDF6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-delete-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiM5MjlBQTgiIGQ9Ik01LjUgNy41di02aDR2NnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMTMgMTVWM2gxdjEyek0xIDE1VjNoMXYxMnptNCAwdi0xaDF2MXptMS0xdi0xaDF2MXptMS0xdi0xaDF2MXptLTEtMXYtMWgxdjF6bS0xLTF2LTFoMXYxem0zIDF2LTFoMXYxem0wIDJ2LTFoMXYxem0xLTN2LTFoMXYxem0wIDR2LTFoMXYxeiIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-delete-table{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQgMTNoLTF2LTNIMnYzSDF2LTNhMSAxIDAgMDExLTFoMTFhMSAxIDAgMDExIDF2M3oiIGZpbGwtcnVsZT0ibm9uemVybyIvPjxwYXRoIGQ9Ik01LjYyNSAyTDEwIDYuMzc1IDkuMzc1IDcgNSAyLjYyNXoiLz48cGF0aCBkPSJNNSA2LjM3NUw5LjM3NSAybC42MjUuNjI1TDUuNjI1IDd6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-merge-cell{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNiAxdjFIMnYxMWg0djFIMmExIDEgMCAwMS0xLTFWMmExIDEgMCAwMTEtMWg0em0zIDBoNGExIDEgMCAwMTEgMXYxMWExIDEgMCAwMS0xIDFIOXYtMWg0VjJIOVYxeiIvPjxwYXRoIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTYgMWgxdjRINnptMiAwaDF2NEg4eiIvPjxwYXRoIGQ9Ik04IDcuNUwxMCA2djN6bS0xIDBMNSA2djN6Ii8+PHBhdGggZD0iTTkgN2gzdjFIOXpNMyA3aDN2MUgzeiIvPjxwYXRoIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTggMTBoMXY0SDh6bS0yIDBoMXY0SDZ6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-merge-cancel-cell{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNiAxdjFIMnYxMWg0djFIMmExIDEgMCAwMS0xLTFWMmExIDEgMCAwMTEtMWg0em0zIDBoNGExIDEgMCAwMTEgMXYxMWExIDEgMCAwMS0xIDFIOXYtMWg0VjJIOVYxeiIvPjxwYXRoIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTYgMWgxdjRINnptMiAwaDF2NEg4eiIvPjxwYXRoIGQ9Ik0zIDcuNUw1IDZ2M3ptOSAwTDEwIDZ2M3oiLz48cGF0aCBkPSJNNCA3aDN2MUg0em00IDBoM3YxSDh6Ii8+PHBhdGggZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNOCAxMGgxdjRIOHptLTIgMGgxdjRINnoiLz48L2c+PC9zdmc+)}.ce-hyperlink-popup{background:#fff;box-shadow:0 2px 12px #626b8433;border-radius:2px;color:#3d4757;padding:12px 16px;position:absolute;z-index:1;text-align:center;display:none}.ce-hyperlink-popup a{min-width:100px;max-width:300px;font-size:12px;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;text-decoration:none;border-bottom-width:1px;border-bottom-style:solid;color:#00f}.ce-inputarea{width:0;height:12px;min-width:0;min-height:0;margin:0;padding:0;left:0;right:0;letter-spacing:0;font-size:12px;position:absolute;outline:none;resize:none;border:none;overflow:hidden;color:transparent;user-select:none;background-color:transparent}.ce-cursor{width:1px;height:20px;left:0;right:0;position:absolute;outline:none;background-color:#000;pointer-events:none}.ce-cursor.ce-cursor--animation{animation-duration:1s;animation-iteration-count:infinite;animation-name:cursorAnimation}@keyframes cursorAnimation{0%{opacity:1}13%{opacity:0}50%{opacity:0}63%{opacity:1}to{opacity:1}}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();})();
|
|
1
|
+
(()=>{(function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.appendChild(document.createTextNode('.ce-select-control-popup{max-width:160px;min-width:69px;max-height:225px;position:absolute;z-index:1;border:1px solid #e4e7ed;border-radius:4px;background-color:#fff;box-shadow:0 2px 12px #0000001a;box-sizing:border-box;margin:5px 0;overflow-y:auto}.ce-select-control-popup ul{list-style:none;padding:3px 0;margin:0;box-sizing:border-box}.ce-select-control-popup ul li{font-size:13px;padding:0 20px;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#666;height:36px;line-height:36px;box-sizing:border-box;cursor:pointer}.ce-select-control-popup ul li:hover{background-color:#eef2fd}.ce-select-control-popup ul li.active{color:var(--COLOR-HOVER, #5175f4);font-weight:700}.ce-date-container{display:none;width:300px;overflow:hidden;left:0;right:0;position:absolute;z-index:1;color:#606266;background:#ffffff;border-radius:4px;padding:10px;user-select:none;border:1px solid #e4e7ed;box-shadow:0 2px 12px #0000001a}.ce-date-container.active{display:block}.ce-date-wrap{display:none}.ce-date-wrap.active{display:block}.ce-date-title{display:flex;justify-content:center;align-items:center;text-align:center;color:#606266;font-size:16px}.ce-date-title>span{display:inline-block}.ce-date-title>span:not(.ce-date-title__now){font-family:cursive;cursor:pointer}.ce-date-title>span:not(.ce-date-title__now):hover{color:#5175f4}.ce-date-title .ce-date-title__pre-year,.ce-date-title .ce-date-title__pre-month{width:15%}.ce-date-title .ce-date-title__now{width:40%}.ce-date-title .ce-date-title__next-year,.ce-date-title .ce-date-title__next-month{width:15%}.ce-date-week{width:100%;display:flex;justify-content:center;margin-top:15px;padding-bottom:5px;border-bottom:1px solid #e4e7ed}.ce-date-week>span{list-style:none;width:14.28571%;text-align:center;color:#606266;font-size:14px}.ce-date-day{width:100%;display:flex;flex-wrap:wrap;align-items:center;margin-top:5px}.ce-date-day>div{width:14.28571%;height:40px;text-align:center;color:#606266;font-size:14px;cursor:pointer;line-height:40px;border-radius:4px}.ce-date-day>div:hover{color:#5175f4;opacity:.8}.ce-date-day>div.active{color:#5175f4;font-weight:700}.ce-date-day>div.disable{color:#c0c4cc}.ce-date-day>div.select{color:#fff;background-color:#5175f4}.ce-time-wrap{display:none;padding:10px;height:286px}.ce-time-wrap ::-webkit-scrollbar{width:0}.ce-time-wrap.active{display:flex}.ce-time-wrap li{list-style:none}.ce-time-wrap>li{width:33.3%;height:100%;text-align:center}.ce-time-wrap>li>span{transform:translateY(-5px);display:inline-block}.ce-time-wrap>li>ol{height:calc(100% - 20px);overflow-y:auto;border:1px solid #e2e2e2;position:relative}.ce-time-wrap>li:first-child>ol{border-right:0}.ce-time-wrap>li:last-child>ol{border-left:0}.ce-time-wrap>li>ol>li{line-height:30px;cursor:pointer;transition:all .3s}.ce-time-wrap>li>ol>li:hover{background-color:#eaeaea}.ce-time-wrap>li>ol>li.active{color:#fff;background:#5175F4}.ce-date-menu{width:100%;height:28px;display:flex;justify-content:flex-end;align-items:center;padding-top:10px;position:relative;border-top:1px solid #e4e7ed}.ce-date-menu button{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;appearance:none;text-align:center;box-sizing:border-box;outline:none;transition:.1s;font-weight:500;user-select:none;padding:7px 15px;font-size:12px;border-radius:3px;margin:0 0 0 10px}.ce-date-menu button:hover{color:#5175f4;border-color:#5175f4}.ce-date-menu button.ce-date-menu__time{border:1px solid transparent;position:absolute;left:0;margin-left:0}.ce-date-menu button.ce-date-menu__time:hover{color:#5175f4}.ce-block-item{position:absolute;z-index:0;overflow:hidden;border-radius:8px;background-color:#fff;border:1px solid rgb(235 236 240)}.ce-table-tool__row{position:absolute;width:12px;border-radius:6.5px;overflow:hidden;background-color:#e2e6ed}.ce-table-tool__row .ce-table-tool__row__item{width:100%;position:relative}.ce-table-tool__row .ce-table-tool__row__item:after{content:"";position:absolute;bottom:0;left:2px;width:8px;height:1px;background-color:#c0c6cf}.ce-table-tool__row .ce-table-tool__row__item:last-child:after{display:none}.ce-table-tool__col{position:absolute;height:12px;border-radius:6.5px;overflow:hidden;background-color:#e2e6ed;display:flex}.ce-table-tool__col .ce-table-tool__col__item{height:100%;position:relative}.ce-table-tool__col .ce-table-tool__col__item:after{content:"";position:absolute;top:2px;left:-1px;width:1px;height:8px;z-index:1;background-color:#c0c6cf}.ce-table-tool__col .ce-table-tool__col__item:first-child:after{display:none}.ce-table-tool__row .ce-table-tool__row__item.active,.ce-table-tool__col .ce-table-tool__col__item.active{background-color:#c4d7fa}.ce-table-tool__col .ce-table-tool__anchor{right:-5px;width:10px;height:12px;z-index:9;position:absolute;cursor:col-resize}.ce-table-tool__row .ce-table-tool__anchor{bottom:-5px;left:0;width:12px;height:10px;z-index:9;position:absolute;cursor:row-resize}.ce-table-anchor__line{z-index:9;position:absolute;border:1px dotted #000000}.ce-resizer-selection{position:absolute;border:1px solid}.ce-resizer-selection>div{position:absolute;width:10px;height:10px;box-shadow:0 1px 4px #0000004d;border-radius:5px;border:2px solid #ffffff;box-sizing:border-box}.ce-resizer-selection .handle-0{cursor:nw-resize}.ce-resizer-selection .handle-1{cursor:n-resize}.ce-resizer-selection .handle-2{cursor:ne-resize}.ce-resizer-selection .handle-3{cursor:e-resize}.ce-resizer-selection .handle-4{cursor:se-resize}.ce-resizer-selection .handle-5{cursor:s-resize}.ce-resizer-selection .handle-6{cursor:sw-resize}.ce-resizer-selection .handle-7{cursor:w-resize}.ce-resizer-image{position:absolute;opacity:.5}.ce-image-previewer{position:fixed;left:0;top:0;z-index:1000;width:100%;height:100%;overflow:hidden;background:#f2f4f7;display:flex;align-items:center;justify-content:center;animation:previewerAnimation .3s}@keyframes previewerAnimation{0%{opacity:.1}to{opacity:1}}.ce-image-previewer .image-close{width:24px;height:24px;display:inline-block;position:absolute;right:50px;top:30px;z-index:99;cursor:pointer;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIzLjk3IDdsMS40MTUgMS40MTQtNy43NzkgNy43NzggNy43NzkgNy43NzktMS40MTQgMS40MTQtNy43NzktNy43NzktNy43NzggNy43NzlMNyAyMy45N2w3Ljc3OC03Ljc3OUw3IDguNDE0IDguNDE0IDdsNy43NzggNy43NzhMMjMuOTcxIDd6IiBmaWxsPSIjM0Q0NzU3IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=) no-repeat;background-size:100% 100%;transition:all .3s;border-radius:50%}.ce-image-previewer .image-close:hover{background-color:#e2e6ed}.ce-image-previewer .ce-image-container{position:relative}.ce-image-previewer .ce-image-container img{cursor:move;position:relative}.ce-image-previewer .ce-image-menu{height:50px;position:absolute;bottom:50px;z-index:99;display:flex;align-items:center;justify-content:center}.ce-image-previewer .ce-image-menu i{width:32px;height:32px;margin:0 8px;cursor:pointer;display:inline-block;background-repeat:no-repeat;background-size:100% 100%;transition:all .3s;border-radius:50%}.ce-image-previewer .ce-image-menu i:hover{background-color:#e2e6ed}.ce-image-previewer .ce-image-menu i.zoom-in{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE0IDE0di00aDJ2NGg0djJoLTR2NGgtMnYtNGgtNHYtMmg0em04Ljc0OSAxMC4xNjNBMTEuOTUyIDExLjk1MiAwIDAxMTUgMjdDOC4zNzMgMjcgMyAyMS42MjcgMyAxNVM4LjM3MyAzIDE1IDNzMTIgNS4zNzMgMTIgMTJjMCAyLjk1NC0xLjA2NyA1LjY1OC0yLjgzNyA3Ljc0OWw0LjkwOCA0LjkwOC0xLjQxNCAxLjQxNC00LjkwOC00LjkwOHpNMTUgMjVjNS41MjMgMCAxMC00LjQ3NyAxMC0xMFMyMC41MjMgNSAxNSA1IDUgOS40NzcgNSAxNXM0LjQ3NyAxMCAxMCAxMHoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-image-previewer .ce-image-menu i.zoom-out{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIyLjc0OSAyNC4xNjNBMTEuOTUyIDExLjk1MiAwIDAxMTUgMjdDOC4zNzMgMjcgMyAyMS42MjcgMyAxNVM4LjM3MyAzIDE1IDNzMTIgNS4zNzMgMTIgMTJjMCAyLjk1NC0xLjA2NyA1LjY1OC0yLjgzNyA3Ljc0OWw0LjkwOCA0LjkwOC0xLjQxNCAxLjQxNC00LjkwOC00LjkwOHpNMTUgMjVjNS41MjMgMCAxMC00LjQ3NyAxMC0xMFMyMC41MjMgNSAxNSA1IDUgOS40NzcgNSAxNXM0LjQ3NyAxMCAxMCAxMHptLTUtMTFoMTB2MkgxMHYtMnoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-image-previewer .ce-image-menu i.rotate{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTYgNGM2LjYyNyAwIDEyIDUuMzczIDEyIDEyYTExLjk3IDExLjk3IDAgMDEtNCA4Ljk0NFYyM2gtLjg2QTkuOTY4IDkuOTY4IDAgMDAyNiAxNmMwLTUuNTIzLTQuNDc3LTEwLTEwLTEwUzYgMTAuNDc3IDYgMTZjMCA1LjE4NSAzLjk0NyA5LjQ0OSA5IDkuOTV2Mi4wMDlDOC44NCAyNy40NTEgNCAyMi4yOTEgNCAxNiA0IDkuMzczIDkuMzczIDQgMTYgNHoiIGZpbGwtcnVsZT0ibm9uemVybyIvPjxwYXRoIGQ9Ik0xOS44NzkgMjcuMzI4bDEuNzY3LTYuNzE3IDQuOTUgNC45NXoiLz48L2c+PC9zdmc+)}.ce-image-previewer .ce-image-menu i.original-size{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQgNGgyNHYyNEg0VjR6bTIgMnYyMGgyMFY2SDZ6bTQgNWgydjEwaC0yVjExem01IDJoMnYyaC0ydi0yem0wIDRoMnYyaC0ydi0yem01LTZoMnYxMGgtMlYxMXoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-image-previewer .ce-image-menu i.image-download{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQuNSAxNXYzLjVoMTVWMTVIMjF2NUgzdi01aDEuNXptOC4yMzItMTEuMjI2djkuMTk2bDQuMDUtNC4wNSAxLjA2IDEuMDYtNS44MzQgNS44MzQtNS44MzMtNS44MzMgMS4wNi0xLjA2IDMuOTk4IDMuOTk2VjMuNzc0aDEuNXoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-contextmenu-container{z-index:9;position:fixed;display:none;padding:4px;overflow-x:hidden;overflow-y:auto;background:#fff;box-shadow:0 2px 12px #38383833;border:1px solid #e2e6ed;border-radius:2px}.ce-contextmenu-content{display:flex;flex-direction:column}.ce-contextmenu-content .ce-contextmenu-sub-item:after{position:absolute;content:"";width:16px;height:16px;right:12px;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMCAwaDE2djE2SDB6Ii8+PGcgZmlsbD0iIzc2N0M4NSI+PHBhdGggZD0iTTcgMTIuMjQzbC0uNzA3LS43MDcgNC4yNDMtNC4yNDMuNzA3LjcwN3oiLz48cGF0aCBkPSJNNi4yOTMgNC40NjRMNyAzLjc1NyAxMS4yNDMgOGwtLjcwNy43MDd6Ii8+PC9nPjwvZz48L3N2Zz4=)}.ce-contextmenu-content .ce-contextmenu-item{min-width:140px;padding:0 32px 0 16px;height:30px;display:flex;align-items:center;white-space:nowrap;box-sizing:border-box;cursor:pointer}.ce-contextmenu-content .ce-contextmenu-item.hover{background:rgba(25,55,88,.04)}.ce-contextmenu-content .ce-contextmenu-item span{max-width:300px;font-size:12px;color:#3d4757;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ce-contextmenu-content .ce-contextmenu-item span.ce-shortcut{color:#767c85;height:30px;flex:1;text-align:right;line-height:30px;margin-left:20px}.ce-contextmenu-content .ce-contextmenu-item i{width:16px;height:16px;vertical-align:middle;display:inline-block;background-repeat:no-repeat;background-size:100% 100%;flex-shrink:0;margin-right:8px}.ce-contextmenu-divider{background-color:#e2e6ed;margin:4px 16px;height:1px}.ce-contextmenu-print{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjM0Q0NzU3IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0xMiA0aC0xVjJINXYySDRWMmExIDEgMCAwMTEtMWg2YTEgMSAwIDAxMSAxdjJ6bTAgNXY0YTEgMSAwIDAxLTEgMUg1YTEgMSAwIDAxLTEtMVY5aDF2NGg2VjloMXoiLz48cGF0aCBkPSJNMTIgMTJ2LTFoMlY1SDJ2NmgydjFIMmExIDEgMCAwMS0xLTFWNWExIDEgMCAwMTEtMWgxMmExIDEgMCAwMTEgMXY2YTEgMSAwIDAxLTEgMWgtMnoiLz48cGF0aCBkPSJNMyA4aDEwdjFIM3ptOC0yaDJ2MWgtMnoiLz48L2c+PC9zdmc+)}.ce-contextmenu-image{background-image:url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSLlm77lsYJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4PSIwIiB5PSIwIiB2aWV3Qm94PSIwIDAgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxzdHlsZT4uc3Qwe2ZpbGw6IzNkNDc1N308L3N0eWxlPjxnIGlkPSJfeDMwXzAt5YWs5YWxX3gyRl8wMuW3peWFt+agj194MkZf5o+S5YWl5Zu+54mHLTE2cHgtIj48ZyBpZD0iR3JvdXAtMTkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMSkiPjxwYXRoIGlkPSJDb21iaW5lZC1TaGFwZSIgY2xhc3M9InN0MCIgZD0iTTEgMGgxMmMuNiAwIDEgLjQgMSAxdjExYzAgLjYtLjQgMS0xIDFIMWMtLjYgMC0xLS40LTEtMVYxYzAtLjYuNC0xIDEtMXptMCAxdjExaDEyVjFIMXoiLz48Y2lyY2xlIGlkPSLmpK3lnIblvaIiIGNsYXNzPSJzdDAiIGN4PSIxMCIgY3k9IjQiIHI9IjEiLz48cGF0aCBpZD0iUGF0aCIgY2xhc3M9InN0MCIgZD0iTTguNSAxMS4ybC00LTQuMUwxIDEwLjdWOS4yYzEuNy0xLjYgMi43LTIuNSAzLTIuOC40LS41LjctLjQgMSAwTDguNSAxMCAxMSA3LjNjLjQtLjUuNi0uNSAxLS4xbDIgMi44djEuNWwtMi41LTMuNC0zIDMuMXoiLz48L2c+PC9nPjwvc3ZnPg==)}.ce-contextmenu-image-change{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyIDQpIiBmaWxsPSIjM0Q0NzU3Ij48Y2lyY2xlIGZpbGwtcnVsZT0ibm9uemVybyIgY3g9IjMiIGN5PSIxIiByPSIxIi8+PHBhdGggZD0iTTcuNDczIDguMjIzTDMuNDcgNC4xMDcgMCA3LjY2N3YtMS41QzEuNzE1IDQuNiAyLjcwNyAzLjY2NCAyLjk3NSAzLjM1OGMuNDAyLS40NTcuNjUxLS4zOSAxLjA0MiAwTDcuNDczIDcgOS45NiA0LjM0OWMuNDE0LS40NjIuNjItLjQ2MiAxLjAxMS0uMDcxTDEzIDcuMDZ2MS41bC0yLjUxLTMuNDEtMy4wMTcgMy4wNzJ6Ii8+PC9nPjxwYXRoIGQ9Ik02IDEuNUgxLjV2MTJoMTN2LTRWMTNhLjUuNSAwIDAxLS41LjVIMmEuNS41IDAgMDEtLjUtLjVWMmEuNS41IDAgMDEuNS0uNWg0em04LjUgOFY2bC0uNS41aDFsLS41LS41djMuNXpNNiAxLjVoNEw5LjUgMXYxbC41LS41SDZ6IiBzdHJva2U9IiMzRDQ3NTciLz48cGF0aCBkPSJNMTMuMDg1IDEuMzE2bC0zLjgxNCA0YTEgMSAwIDAwMS40NTggMS4zNjhsMy44MTUtNGExIDEgMCAxMC0xLjQ1OS0xLjM2OHoiIGZpbGw9IiMzRDQ3NTciIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-insert-row-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiMzRDQ3NTciIGQ9Ik04LjUgNS41aDZ2NGgtNnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNNCA3djFoMlY3em0tMyAuNUw0IDV2NXpNMSAxaDEydjFIMXptMCAxMmgxMnYxSDF6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-insert-top-row{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNOCA1SDd2M2gxem0tLjUtM0wxMCA1SDV6Ii8+PHJlY3Qgc3Ryb2tlPSIjM0Q0NzU3IiB4PSIxLjUiIHk9IjEwLjUiIHdpZHRoPSIxMiIgaGVpZ2h0PSIzIiByeD0iMSIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-insert-bottom-row{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNNyAxMWgxVjhIN3ptLjUgM0w1IDExaDV6Ii8+PHJlY3Qgc3Ryb2tlPSIjM0Q0NzU3IiB4PSIxLjUiIHk9IjIuNSIgd2lkdGg9IjEyIiBoZWlnaHQ9IjMiIHJ4PSIxIi8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-insert-left-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMTEgN3YxaDNWN3ptLTMgLjVMMTEgNXY1eiIvPjxyZWN0IHN0cm9rZT0iIzNENDc1NyIgdHJhbnNmb3JtPSJyb3RhdGUoOTAgNCA3LjUpIiB4PSItMiIgeT0iNiIgd2lkdGg9IjEyIiBoZWlnaHQ9IjMiIHJ4PSIxIi8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-insert-right-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNNSA4VjdIMnYxem0zLS41TDUgMTBWNXoiLz48cmVjdCBzdHJva2U9IiMzRDQ3NTciIHRyYW5zZm9ybT0icm90YXRlKDkwIDEyIDcuNSkiIHg9IjYiIHk9IjYiIHdpZHRoPSIxMiIgaGVpZ2h0PSIzIiByeD0iMSIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-delete-row-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiM5MjlBQTgiIGQ9Ik04LjUgNi41aDZ2MmgtNnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMiAxMmgxMXYxSDJ6TTIgMmgxMXYxSDJ6bS42MyAzTDcgOS4zNWwtLjYzNS42NUwyIDUuNjN6Ii8+PHBhdGggZmlsbD0iIzNENDc1NyIgZD0iTTIgOS4zNjNMNi4zNTUgNSA3IDUuNzA3IDIuNjk1IDEweiIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-delete-row{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiM5MjlBQTgiIGQ9Ik04LjUgNS41aDZ2NGgtNnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMSAxM2gxMnYxSDF6TTEgMWgxMnYxSDF6bTAgNGgxdjFIMXptMSAxaDF2MUgyem0xIDFoMXYxSDN6bTEtMWgxdjFINHptMS0xaDF2MUg1ek00IDhoMXYxSDR6TTIgOGgxdjFIMnptMyAxaDF2MUg1ek0xIDloMXYxSDF6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-delete-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiM5MjlBQTgiIGQ9Ik01LjUgNy41di02aDR2NnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMTMgMTVWM2gxdjEyek0xIDE1VjNoMXYxMnptNCAwdi0xaDF2MXptMS0xdi0xaDF2MXptMS0xdi0xaDF2MXptLTEtMXYtMWgxdjF6bS0xLTF2LTFoMXYxem0zIDF2LTFoMXYxem0wIDJ2LTFoMXYxem0xLTN2LTFoMXYxem0wIDR2LTFoMXYxeiIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-delete-table{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQgMTNoLTF2LTNIMnYzSDF2LTNhMSAxIDAgMDExLTFoMTFhMSAxIDAgMDExIDF2M3oiIGZpbGwtcnVsZT0ibm9uemVybyIvPjxwYXRoIGQ9Ik01LjYyNSAyTDEwIDYuMzc1IDkuMzc1IDcgNSAyLjYyNXoiLz48cGF0aCBkPSJNNSA2LjM3NUw5LjM3NSAybC42MjUuNjI1TDUuNjI1IDd6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-merge-cell{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNiAxdjFIMnYxMWg0djFIMmExIDEgMCAwMS0xLTFWMmExIDEgMCAwMTEtMWg0em0zIDBoNGExIDEgMCAwMTEgMXYxMWExIDEgMCAwMS0xIDFIOXYtMWg0VjJIOVYxeiIvPjxwYXRoIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTYgMWgxdjRINnptMiAwaDF2NEg4eiIvPjxwYXRoIGQ9Ik04IDcuNUwxMCA2djN6bS0xIDBMNSA2djN6Ii8+PHBhdGggZD0iTTkgN2gzdjFIOXpNMyA3aDN2MUgzeiIvPjxwYXRoIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTggMTBoMXY0SDh6bS0yIDBoMXY0SDZ6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-merge-cancel-cell{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNiAxdjFIMnYxMWg0djFIMmExIDEgMCAwMS0xLTFWMmExIDEgMCAwMTEtMWg0em0zIDBoNGExIDEgMCAwMTEgMXYxMWExIDEgMCAwMS0xIDFIOXYtMWg0VjJIOVYxeiIvPjxwYXRoIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTYgMWgxdjRINnptMiAwaDF2NEg4eiIvPjxwYXRoIGQ9Ik0zIDcuNUw1IDZ2M3ptOSAwTDEwIDZ2M3oiLz48cGF0aCBkPSJNNCA3aDN2MUg0em00IDBoM3YxSDh6Ii8+PHBhdGggZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNOCAxMGgxdjRIOHptLTIgMGgxdjRINnoiLz48L2c+PC9zdmc+)}.ce-hyperlink-popup{background:#fff;box-shadow:0 2px 12px #626b8433;border-radius:2px;color:#3d4757;padding:12px 16px;position:absolute;z-index:1;text-align:center;display:none}.ce-hyperlink-popup a{min-width:100px;max-width:300px;font-size:12px;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;text-decoration:none;border-bottom-width:1px;border-bottom-style:solid;color:#00f}.ce-header-indicator>div{padding:3px 6px;color:#000;font-size:12px;background:rgb(218 231 252);position:absolute;transform:translate(10px,10px)}.ce-inputarea{width:0;height:12px;min-width:0;min-height:0;margin:0;padding:0;left:0;right:0;letter-spacing:0;font-size:12px;position:absolute;outline:none;resize:none;border:none;overflow:hidden;color:transparent;user-select:none;background-color:transparent}.ce-cursor{width:1px;height:20px;left:0;right:0;position:absolute;outline:none;background-color:#000;pointer-events:none}.ce-cursor.ce-cursor--animation{animation-duration:1s;animation-iteration-count:infinite;animation-name:cursorAnimation}@keyframes cursorAnimation{0%{opacity:1}13%{opacity:0}50%{opacity:0}63%{opacity:1}to{opacity:1}}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();})();
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defProps = Object.defineProperties;
|
|
4
4
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
@@ -23,7 +23,7 @@ var __publicField = (obj, key, value) => {
|
|
|
23
23
|
return value;
|
|
24
24
|
};
|
|
25
25
|
var index = "";
|
|
26
|
-
const version = "0.9.
|
|
26
|
+
const version = "0.9.23";
|
|
27
27
|
const ZERO = "\u200B";
|
|
28
28
|
const WRAP = "\n";
|
|
29
29
|
var RowFlex;
|
|
@@ -4011,7 +4011,9 @@ class Cursor {
|
|
|
4011
4011
|
const height = this.draw.getHeight();
|
|
4012
4012
|
const pageGap = this.draw.getPageGap();
|
|
4013
4013
|
const { metrics, coordinate: { leftTop, rightTop }, ascent, pageNo } = cursorPosition;
|
|
4014
|
-
const
|
|
4014
|
+
const zoneManager = this.draw.getZone();
|
|
4015
|
+
const curPageNo = zoneManager.isMainActive() ? pageNo : this.draw.getPageNo();
|
|
4016
|
+
const preY = curPageNo * (height + pageGap);
|
|
4015
4017
|
const offsetHeight = metrics.height / 4;
|
|
4016
4018
|
const cursorHeight = metrics.height + offsetHeight * 2;
|
|
4017
4019
|
const agentCursorDom = this.cursorAgent.getAgentCursorDom();
|
|
@@ -4264,6 +4266,8 @@ function mousedown(evt, host) {
|
|
|
4264
4266
|
x: evt.offsetX,
|
|
4265
4267
|
y: evt.offsetY
|
|
4266
4268
|
});
|
|
4269
|
+
if (!positionResult)
|
|
4270
|
+
return;
|
|
4267
4271
|
const { index: index2, isDirectHit, isCheckbox, isImage, isTable, tdValueIndex } = positionResult;
|
|
4268
4272
|
host.mouseDownStartPosition = __spreadProps(__spreadValues({}, positionResult), {
|
|
4269
4273
|
index: isTable ? tdValueIndex : index2
|
|
@@ -4494,6 +4498,8 @@ function mousemove(evt, host) {
|
|
|
4494
4498
|
x: evt.offsetX,
|
|
4495
4499
|
y: evt.offsetY
|
|
4496
4500
|
});
|
|
4501
|
+
if (!~positionResult.index)
|
|
4502
|
+
return;
|
|
4497
4503
|
const { index: index2, isTable, tdValueIndex, tdIndex, trIndex, tableId } = positionResult;
|
|
4498
4504
|
const { index: startIndex, isTable: startIsTable, tdIndex: startTdIndex, trIndex: startTrIndex } = host.mouseDownStartPosition;
|
|
4499
4505
|
const endIndex = isTable ? tdValueIndex : index2;
|
|
@@ -4933,9 +4939,17 @@ function drop(evt, host) {
|
|
|
4933
4939
|
}
|
|
4934
4940
|
const LETTER_REG = /[a-zA-Z]/;
|
|
4935
4941
|
const NUMBER_LIKE_REG = /[0-9.]/;
|
|
4936
|
-
function dblclick(host) {
|
|
4942
|
+
function dblclick(host, evt) {
|
|
4937
4943
|
const draw = host.getDraw();
|
|
4938
4944
|
const position = draw.getPosition();
|
|
4945
|
+
const positionContext = position.getPositionByXY({
|
|
4946
|
+
x: evt.offsetX,
|
|
4947
|
+
y: evt.offsetY
|
|
4948
|
+
});
|
|
4949
|
+
if (!~positionContext.index && positionContext.zone) {
|
|
4950
|
+
draw.getZone().setZone(positionContext.zone);
|
|
4951
|
+
return;
|
|
4952
|
+
}
|
|
4939
4953
|
const cursorPosition = position.getCursorPosition();
|
|
4940
4954
|
if (!cursorPosition)
|
|
4941
4955
|
return;
|
|
@@ -5058,10 +5072,13 @@ function dragover(evt, host) {
|
|
|
5058
5072
|
draw.setPageNo(Number(pageIndex));
|
|
5059
5073
|
}
|
|
5060
5074
|
const position = draw.getPosition();
|
|
5061
|
-
const
|
|
5075
|
+
const positionContext = position.adjustPositionContext({
|
|
5062
5076
|
x: evt.offsetX,
|
|
5063
5077
|
y: evt.offsetY
|
|
5064
5078
|
});
|
|
5079
|
+
if (!positionContext)
|
|
5080
|
+
return;
|
|
5081
|
+
const { isTable, tdValueIndex, index: index2 } = positionContext;
|
|
5065
5082
|
const positionList = position.getPositionList();
|
|
5066
5083
|
const curIndex = isTable ? tdValueIndex : index2;
|
|
5067
5084
|
if (~index2) {
|
|
@@ -5184,8 +5201,8 @@ class CanvasEvent {
|
|
|
5184
5201
|
keydown(evt) {
|
|
5185
5202
|
keydown(evt, this);
|
|
5186
5203
|
}
|
|
5187
|
-
dblclick() {
|
|
5188
|
-
click.dblclick(this);
|
|
5204
|
+
dblclick(evt) {
|
|
5205
|
+
click.dblclick(this, evt);
|
|
5189
5206
|
}
|
|
5190
5207
|
threeClick() {
|
|
5191
5208
|
click.threeClick(this);
|
|
@@ -5356,6 +5373,42 @@ class HistoryManager {
|
|
|
5356
5373
|
return !!this.redoStack.length;
|
|
5357
5374
|
}
|
|
5358
5375
|
}
|
|
5376
|
+
var EditorComponent;
|
|
5377
|
+
(function(EditorComponent2) {
|
|
5378
|
+
EditorComponent2["COMPONENT"] = "component";
|
|
5379
|
+
EditorComponent2["MENU"] = "menu";
|
|
5380
|
+
EditorComponent2["MAIN"] = "main";
|
|
5381
|
+
EditorComponent2["FOOTER"] = "footer";
|
|
5382
|
+
EditorComponent2["CONTEXTMENU"] = "contextmenu";
|
|
5383
|
+
EditorComponent2["POPUP"] = "popup";
|
|
5384
|
+
})(EditorComponent || (EditorComponent = {}));
|
|
5385
|
+
var EditorContext;
|
|
5386
|
+
(function(EditorContext2) {
|
|
5387
|
+
EditorContext2["PAGE"] = "page";
|
|
5388
|
+
EditorContext2["TABLE"] = "table";
|
|
5389
|
+
})(EditorContext || (EditorContext = {}));
|
|
5390
|
+
var EditorMode;
|
|
5391
|
+
(function(EditorMode2) {
|
|
5392
|
+
EditorMode2["EDIT"] = "edit";
|
|
5393
|
+
EditorMode2["CLEAN"] = "clean";
|
|
5394
|
+
EditorMode2["READONLY"] = "readonly";
|
|
5395
|
+
})(EditorMode || (EditorMode = {}));
|
|
5396
|
+
var EditorZone;
|
|
5397
|
+
(function(EditorZone2) {
|
|
5398
|
+
EditorZone2["HEADER"] = "header";
|
|
5399
|
+
EditorZone2["MAIN"] = "main";
|
|
5400
|
+
EditorZone2["FOOTER"] = "footer";
|
|
5401
|
+
})(EditorZone || (EditorZone = {}));
|
|
5402
|
+
var PageMode;
|
|
5403
|
+
(function(PageMode2) {
|
|
5404
|
+
PageMode2["PAGING"] = "paging";
|
|
5405
|
+
PageMode2["CONTINUITY"] = "continuity";
|
|
5406
|
+
})(PageMode || (PageMode = {}));
|
|
5407
|
+
var PaperDirection;
|
|
5408
|
+
(function(PaperDirection2) {
|
|
5409
|
+
PaperDirection2["VERTICAL"] = "vertical";
|
|
5410
|
+
PaperDirection2["HORIZONTAL"] = "horizontal";
|
|
5411
|
+
})(PaperDirection || (PaperDirection = {}));
|
|
5359
5412
|
class Position {
|
|
5360
5413
|
constructor(draw) {
|
|
5361
5414
|
__publicField(this, "cursorPosition");
|
|
@@ -5372,16 +5425,22 @@ class Position {
|
|
|
5372
5425
|
this.draw = draw;
|
|
5373
5426
|
this.options = draw.getOptions();
|
|
5374
5427
|
}
|
|
5375
|
-
|
|
5376
|
-
|
|
5428
|
+
getTablePositionList(sourceElementList) {
|
|
5429
|
+
const { index: index2, trIndex, tdIndex } = this.positionContext;
|
|
5430
|
+
return sourceElementList[index2].trList[trIndex].tdList[tdIndex].positionList || [];
|
|
5377
5431
|
}
|
|
5378
5432
|
getPositionList() {
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5433
|
+
return this.positionContext.isTable ? this.getTablePositionList(this.draw.getOriginalElementList()) : this.getOriginalPositionList();
|
|
5434
|
+
}
|
|
5435
|
+
getMainPositionList() {
|
|
5436
|
+
return this.positionContext.isTable ? this.getTablePositionList(this.draw.getOriginalMainElementList()) : this.positionList;
|
|
5437
|
+
}
|
|
5438
|
+
getOriginalPositionList() {
|
|
5439
|
+
const zoneManager = this.draw.getZone();
|
|
5440
|
+
const header = this.draw.getHeader();
|
|
5441
|
+
return zoneManager.isHeaderActive() ? header.getPositionList() : this.positionList;
|
|
5442
|
+
}
|
|
5443
|
+
getOriginalMainPositionList() {
|
|
5385
5444
|
return this.positionList;
|
|
5386
5445
|
}
|
|
5387
5446
|
setPositionList(payload) {
|
|
@@ -5460,7 +5519,9 @@ class Position {
|
|
|
5460
5519
|
const pageRowList = this.draw.getPageRowList();
|
|
5461
5520
|
const margins = this.draw.getMargins();
|
|
5462
5521
|
const startX = margins[3];
|
|
5463
|
-
const
|
|
5522
|
+
const header = this.draw.getHeader();
|
|
5523
|
+
const extraHeight = header.getExtraHeight();
|
|
5524
|
+
const startY = margins[0] + extraHeight;
|
|
5464
5525
|
for (let i = 0; i < pageRowList.length; i++) {
|
|
5465
5526
|
const rowList = pageRowList[i];
|
|
5466
5527
|
const startIndex = rowList[0].startIndex;
|
|
@@ -5495,12 +5556,14 @@ class Position {
|
|
|
5495
5556
|
elementList = this.draw.getOriginalElementList();
|
|
5496
5557
|
}
|
|
5497
5558
|
if (!positionList) {
|
|
5498
|
-
positionList = this.
|
|
5559
|
+
positionList = this.getOriginalPositionList();
|
|
5499
5560
|
}
|
|
5561
|
+
const zoneManager = this.draw.getZone();
|
|
5500
5562
|
const curPageNo = this.draw.getPageNo();
|
|
5563
|
+
const positionNo = zoneManager.isMainActive() ? curPageNo : 0;
|
|
5501
5564
|
for (let j = 0; j < positionList.length; j++) {
|
|
5502
5565
|
const { index: index2, pageNo, coordinate: { leftTop, rightTop, leftBottom } } = positionList[j];
|
|
5503
|
-
if (
|
|
5566
|
+
if (positionNo !== pageNo)
|
|
5504
5567
|
continue;
|
|
5505
5568
|
if (leftTop[0] <= x && rightTop[0] >= x && leftTop[1] <= y && leftBottom[1] >= y) {
|
|
5506
5569
|
let curPositionIndex2 = j;
|
|
@@ -5583,15 +5646,15 @@ class Position {
|
|
|
5583
5646
|
}
|
|
5584
5647
|
}
|
|
5585
5648
|
}
|
|
5586
|
-
const firstLetterList = positionList.filter((p) => p.isLastLetter && p.pageNo ===
|
|
5649
|
+
const firstLetterList = positionList.filter((p) => p.isLastLetter && p.pageNo === positionNo);
|
|
5587
5650
|
for (let j = 0; j < firstLetterList.length; j++) {
|
|
5588
5651
|
const { index: index2, pageNo, coordinate: { leftTop, leftBottom } } = firstLetterList[j];
|
|
5589
|
-
if (
|
|
5652
|
+
if (positionNo !== pageNo)
|
|
5590
5653
|
continue;
|
|
5591
5654
|
if (y > leftTop[1] && y <= leftBottom[1]) {
|
|
5592
5655
|
const isHead = x < this.options.margins[3];
|
|
5593
5656
|
if (isHead) {
|
|
5594
|
-
const headIndex = positionList.findIndex((p) => p.pageNo ===
|
|
5657
|
+
const headIndex = positionList.findIndex((p) => p.pageNo === positionNo && p.rowNo === firstLetterList[j].rowNo);
|
|
5595
5658
|
curPositionIndex = ~headIndex ? headIndex - 1 : index2;
|
|
5596
5659
|
} else {
|
|
5597
5660
|
curPositionIndex = index2;
|
|
@@ -5601,7 +5664,25 @@ class Position {
|
|
|
5601
5664
|
}
|
|
5602
5665
|
}
|
|
5603
5666
|
if (!isLastArea) {
|
|
5604
|
-
|
|
5667
|
+
if (zoneManager.isMainActive()) {
|
|
5668
|
+
if (y < firstLetterList[0].coordinate.leftTop[1]) {
|
|
5669
|
+
return {
|
|
5670
|
+
index: -1,
|
|
5671
|
+
zone: EditorZone.HEADER
|
|
5672
|
+
};
|
|
5673
|
+
}
|
|
5674
|
+
}
|
|
5675
|
+
if (zoneManager.isHeaderActive()) {
|
|
5676
|
+
if (y > firstLetterList[0].coordinate.leftTop[1]) {
|
|
5677
|
+
return {
|
|
5678
|
+
index: -1,
|
|
5679
|
+
zone: EditorZone.MAIN
|
|
5680
|
+
};
|
|
5681
|
+
}
|
|
5682
|
+
}
|
|
5683
|
+
return {
|
|
5684
|
+
index: ((_a = firstLetterList[firstLetterList.length - 1]) == null ? void 0 : _a.index) || positionList.length - 1
|
|
5685
|
+
};
|
|
5605
5686
|
}
|
|
5606
5687
|
return {
|
|
5607
5688
|
index: curPositionIndex,
|
|
@@ -5610,11 +5691,9 @@ class Position {
|
|
|
5610
5691
|
}
|
|
5611
5692
|
adjustPositionContext(payload) {
|
|
5612
5693
|
const isReadonly = this.draw.isReadonly();
|
|
5613
|
-
const
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
y
|
|
5617
|
-
});
|
|
5694
|
+
const positionResult = this.getPositionByXY(payload);
|
|
5695
|
+
if (!~positionResult.index)
|
|
5696
|
+
return null;
|
|
5618
5697
|
if (positionResult.isControl && !isReadonly) {
|
|
5619
5698
|
const { index: index22, isTable: isTable2, trIndex: trIndex2, tdIndex: tdIndex2, tdValueIndex } = positionResult;
|
|
5620
5699
|
const control = this.draw.getControl();
|
|
@@ -5667,6 +5746,9 @@ class RangeManager {
|
|
|
5667
5746
|
getRange() {
|
|
5668
5747
|
return this.range;
|
|
5669
5748
|
}
|
|
5749
|
+
clearRange() {
|
|
5750
|
+
this.setRange(-1, -1);
|
|
5751
|
+
}
|
|
5670
5752
|
getSelection() {
|
|
5671
5753
|
const { startIndex, endIndex } = this.range;
|
|
5672
5754
|
if (startIndex === endIndex)
|
|
@@ -5713,6 +5795,7 @@ class RangeManager {
|
|
|
5713
5795
|
this.range.startTrIndex = startTrIndex;
|
|
5714
5796
|
this.range.endTrIndex = endTrIndex;
|
|
5715
5797
|
this.range.isCrossRowCol = !!(startTdIndex || endTdIndex || startTrIndex || endTrIndex);
|
|
5798
|
+
this.range.zone = this.draw.getZone().getZone();
|
|
5716
5799
|
const control = this.draw.getControl();
|
|
5717
5800
|
if (~startIndex && ~endIndex) {
|
|
5718
5801
|
const elementList = this.draw.getElementList();
|
|
@@ -5940,36 +6023,6 @@ class Highlight extends AbstractRichText {
|
|
|
5940
6023
|
this.clearFillInfo();
|
|
5941
6024
|
}
|
|
5942
6025
|
}
|
|
5943
|
-
var EditorComponent;
|
|
5944
|
-
(function(EditorComponent2) {
|
|
5945
|
-
EditorComponent2["COMPONENT"] = "component";
|
|
5946
|
-
EditorComponent2["MENU"] = "menu";
|
|
5947
|
-
EditorComponent2["MAIN"] = "main";
|
|
5948
|
-
EditorComponent2["FOOTER"] = "footer";
|
|
5949
|
-
EditorComponent2["CONTEXTMENU"] = "contextmenu";
|
|
5950
|
-
EditorComponent2["POPUP"] = "popup";
|
|
5951
|
-
})(EditorComponent || (EditorComponent = {}));
|
|
5952
|
-
var EditorContext;
|
|
5953
|
-
(function(EditorContext2) {
|
|
5954
|
-
EditorContext2["PAGE"] = "page";
|
|
5955
|
-
EditorContext2["TABLE"] = "table";
|
|
5956
|
-
})(EditorContext || (EditorContext = {}));
|
|
5957
|
-
var EditorMode;
|
|
5958
|
-
(function(EditorMode2) {
|
|
5959
|
-
EditorMode2["EDIT"] = "edit";
|
|
5960
|
-
EditorMode2["CLEAN"] = "clean";
|
|
5961
|
-
EditorMode2["READONLY"] = "readonly";
|
|
5962
|
-
})(EditorMode || (EditorMode = {}));
|
|
5963
|
-
var PageMode;
|
|
5964
|
-
(function(PageMode2) {
|
|
5965
|
-
PageMode2["PAGING"] = "paging";
|
|
5966
|
-
PageMode2["CONTINUITY"] = "continuity";
|
|
5967
|
-
})(PageMode || (PageMode = {}));
|
|
5968
|
-
var PaperDirection;
|
|
5969
|
-
(function(PaperDirection2) {
|
|
5970
|
-
PaperDirection2["VERTICAL"] = "vertical";
|
|
5971
|
-
PaperDirection2["HORIZONTAL"] = "horizontal";
|
|
5972
|
-
})(PaperDirection || (PaperDirection = {}));
|
|
5973
6026
|
class Margin {
|
|
5974
6027
|
constructor(draw) {
|
|
5975
6028
|
__publicField(this, "draw");
|
|
@@ -6954,26 +7007,121 @@ class HyperlinkParticle {
|
|
|
6954
7007
|
ctx.restore();
|
|
6955
7008
|
}
|
|
6956
7009
|
}
|
|
7010
|
+
var HeaderMaxHeightRatio;
|
|
7011
|
+
(function(HeaderMaxHeightRatio2) {
|
|
7012
|
+
HeaderMaxHeightRatio2["HALF"] = "half";
|
|
7013
|
+
HeaderMaxHeightRatio2["ONE_THIRD"] = "one-third";
|
|
7014
|
+
HeaderMaxHeightRatio2["QUARTER"] = "quarter";
|
|
7015
|
+
})(HeaderMaxHeightRatio || (HeaderMaxHeightRatio = {}));
|
|
7016
|
+
const defaultHeaderOption = {
|
|
7017
|
+
top: 30,
|
|
7018
|
+
maxHeightRadio: HeaderMaxHeightRatio.HALF
|
|
7019
|
+
};
|
|
7020
|
+
const maxHeightRadioMapping = {
|
|
7021
|
+
[HeaderMaxHeightRatio.HALF]: 1 / 2,
|
|
7022
|
+
[HeaderMaxHeightRatio.ONE_THIRD]: 1 / 3,
|
|
7023
|
+
[HeaderMaxHeightRatio.QUARTER]: 1 / 4
|
|
7024
|
+
};
|
|
6957
7025
|
class Header {
|
|
6958
7026
|
constructor(draw) {
|
|
6959
7027
|
__publicField(this, "draw");
|
|
7028
|
+
__publicField(this, "position");
|
|
6960
7029
|
__publicField(this, "options");
|
|
7030
|
+
__publicField(this, "elementList");
|
|
7031
|
+
__publicField(this, "rowList");
|
|
7032
|
+
__publicField(this, "positionList");
|
|
6961
7033
|
this.draw = draw;
|
|
7034
|
+
this.position = draw.getPosition();
|
|
6962
7035
|
this.options = draw.getOptions();
|
|
7036
|
+
this.elementList = draw.getHeaderElementList();
|
|
7037
|
+
this.rowList = [];
|
|
7038
|
+
this.positionList = [];
|
|
6963
7039
|
}
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
-
|
|
6976
|
-
|
|
7040
|
+
setElementList(elementList) {
|
|
7041
|
+
this.elementList = elementList;
|
|
7042
|
+
}
|
|
7043
|
+
getElementList() {
|
|
7044
|
+
return this.elementList;
|
|
7045
|
+
}
|
|
7046
|
+
getPositionList() {
|
|
7047
|
+
return this.positionList;
|
|
7048
|
+
}
|
|
7049
|
+
compute() {
|
|
7050
|
+
this._recovery();
|
|
7051
|
+
this._computeRowList();
|
|
7052
|
+
this._computePositionList();
|
|
7053
|
+
}
|
|
7054
|
+
_recovery() {
|
|
7055
|
+
this.rowList = [];
|
|
7056
|
+
this.positionList = [];
|
|
7057
|
+
}
|
|
7058
|
+
_computeRowList() {
|
|
7059
|
+
const innerWidth = this.draw.getInnerWidth();
|
|
7060
|
+
this.rowList = this.draw.computeRowList(innerWidth, this.elementList);
|
|
7061
|
+
}
|
|
7062
|
+
_computePositionList() {
|
|
7063
|
+
const headerTop = this.getHeaderTop();
|
|
7064
|
+
const innerWidth = this.draw.getInnerWidth();
|
|
7065
|
+
const margins = this.draw.getMargins();
|
|
7066
|
+
const startX = margins[3];
|
|
7067
|
+
const startY = headerTop;
|
|
7068
|
+
this.position.computePageRowPosition({
|
|
7069
|
+
positionList: this.positionList,
|
|
7070
|
+
rowList: this.rowList,
|
|
7071
|
+
pageNo: 0,
|
|
7072
|
+
startIndex: 0,
|
|
7073
|
+
startX,
|
|
7074
|
+
startY,
|
|
7075
|
+
innerWidth
|
|
7076
|
+
});
|
|
7077
|
+
}
|
|
7078
|
+
getHeaderTop() {
|
|
7079
|
+
const { header: { top }, scale } = this.options;
|
|
7080
|
+
return Math.floor(top * scale);
|
|
7081
|
+
}
|
|
7082
|
+
getMaxHeight() {
|
|
7083
|
+
const { header: { maxHeightRadio } } = this.options;
|
|
7084
|
+
const height = this.draw.getHeight();
|
|
7085
|
+
return Math.floor(height * maxHeightRadioMapping[maxHeightRadio]);
|
|
7086
|
+
}
|
|
7087
|
+
getHeight() {
|
|
7088
|
+
const maxHeight = this.getMaxHeight();
|
|
7089
|
+
const rowHeight = this.getRowHeight();
|
|
7090
|
+
return rowHeight > maxHeight ? maxHeight : rowHeight;
|
|
7091
|
+
}
|
|
7092
|
+
getRowHeight() {
|
|
7093
|
+
return this.rowList.reduce((pre, cur) => pre + cur.height, 0);
|
|
7094
|
+
}
|
|
7095
|
+
getExtraHeight() {
|
|
7096
|
+
const margins = this.draw.getMargins();
|
|
7097
|
+
const headerHeight = this.getHeight();
|
|
7098
|
+
const headerTop = this.getHeaderTop();
|
|
7099
|
+
const extraHeight = headerTop + headerHeight - margins[0];
|
|
7100
|
+
return extraHeight <= 0 ? 0 : extraHeight;
|
|
7101
|
+
}
|
|
7102
|
+
render(ctx, pageNo) {
|
|
7103
|
+
ctx.globalAlpha = 1;
|
|
7104
|
+
const innerWidth = this.draw.getInnerWidth();
|
|
7105
|
+
const maxHeight = this.getMaxHeight();
|
|
7106
|
+
const rowList = [];
|
|
7107
|
+
let curRowHeight = 0;
|
|
7108
|
+
for (let r = 0; r < this.rowList.length; r++) {
|
|
7109
|
+
const row = this.rowList[r];
|
|
7110
|
+
if (curRowHeight + row.height > maxHeight) {
|
|
7111
|
+
break;
|
|
7112
|
+
}
|
|
7113
|
+
rowList.push(row);
|
|
7114
|
+
curRowHeight += row.height;
|
|
7115
|
+
}
|
|
7116
|
+
this.draw.drawRow(ctx, {
|
|
7117
|
+
elementList: this.elementList,
|
|
7118
|
+
positionList: this.positionList,
|
|
7119
|
+
rowList,
|
|
7120
|
+
pageNo,
|
|
7121
|
+
startIndex: 0,
|
|
7122
|
+
innerWidth,
|
|
7123
|
+
zone: EditorZone.HEADER
|
|
7124
|
+
});
|
|
6977
7125
|
}
|
|
6978
7126
|
}
|
|
6979
7127
|
class SuperscriptParticle {
|
|
@@ -8890,8 +9038,64 @@ class ImageObserver {
|
|
|
8890
9038
|
return Promise.allSettled(this.promiseList);
|
|
8891
9039
|
}
|
|
8892
9040
|
}
|
|
9041
|
+
class Zone {
|
|
9042
|
+
constructor(draw) {
|
|
9043
|
+
__publicField(this, "draw");
|
|
9044
|
+
__publicField(this, "container");
|
|
9045
|
+
__publicField(this, "currentZone");
|
|
9046
|
+
__publicField(this, "headerIndicatorContainer");
|
|
9047
|
+
this.draw = draw;
|
|
9048
|
+
this.container = draw.getContainer();
|
|
9049
|
+
this.currentZone = EditorZone.MAIN;
|
|
9050
|
+
this.headerIndicatorContainer = null;
|
|
9051
|
+
}
|
|
9052
|
+
isHeaderActive() {
|
|
9053
|
+
return this.getZone() === EditorZone.HEADER;
|
|
9054
|
+
}
|
|
9055
|
+
isMainActive() {
|
|
9056
|
+
return this.getZone() === EditorZone.MAIN;
|
|
9057
|
+
}
|
|
9058
|
+
getZone() {
|
|
9059
|
+
return this.currentZone;
|
|
9060
|
+
}
|
|
9061
|
+
setZone(payload) {
|
|
9062
|
+
if (this.currentZone === payload)
|
|
9063
|
+
return;
|
|
9064
|
+
this.currentZone = payload;
|
|
9065
|
+
this.draw.getRange().clearRange();
|
|
9066
|
+
this.draw.render({
|
|
9067
|
+
isSubmitHistory: false,
|
|
9068
|
+
isSetCursor: false,
|
|
9069
|
+
isCompute: false
|
|
9070
|
+
});
|
|
9071
|
+
if (this.isHeaderActive()) {
|
|
9072
|
+
this._drawHeaderZoneIndicator();
|
|
9073
|
+
} else {
|
|
9074
|
+
this._clearHeaderZoneIndicator();
|
|
9075
|
+
}
|
|
9076
|
+
}
|
|
9077
|
+
_drawHeaderZoneIndicator() {
|
|
9078
|
+
this.headerIndicatorContainer = document.createElement("div");
|
|
9079
|
+
this.headerIndicatorContainer.classList.add(`${EDITOR_PREFIX}-header-indicator`);
|
|
9080
|
+
const pageList = this.draw.getPageList();
|
|
9081
|
+
const pageHeight = this.draw.getHeight();
|
|
9082
|
+
const pageGap = this.draw.getPageGap();
|
|
9083
|
+
const preY = pageHeight + pageGap;
|
|
9084
|
+
for (let p = 0; p < pageList.length; p++) {
|
|
9085
|
+
const indicator = document.createElement("div");
|
|
9086
|
+
indicator.innerText = `\u7F16\u8F91\u9875\u7709`;
|
|
9087
|
+
indicator.style.top = `${preY * p}px`;
|
|
9088
|
+
this.headerIndicatorContainer.append(indicator);
|
|
9089
|
+
}
|
|
9090
|
+
this.container.append(this.headerIndicatorContainer);
|
|
9091
|
+
}
|
|
9092
|
+
_clearHeaderZoneIndicator() {
|
|
9093
|
+
var _a;
|
|
9094
|
+
(_a = this.headerIndicatorContainer) == null ? void 0 : _a.remove();
|
|
9095
|
+
}
|
|
9096
|
+
}
|
|
8893
9097
|
class Draw {
|
|
8894
|
-
constructor(rootContainer, options,
|
|
9098
|
+
constructor(rootContainer, options, data2, listener) {
|
|
8895
9099
|
__publicField(this, "container");
|
|
8896
9100
|
__publicField(this, "pageContainer");
|
|
8897
9101
|
__publicField(this, "pageList");
|
|
@@ -8900,7 +9104,10 @@ class Draw {
|
|
|
8900
9104
|
__publicField(this, "mode");
|
|
8901
9105
|
__publicField(this, "options");
|
|
8902
9106
|
__publicField(this, "position");
|
|
9107
|
+
__publicField(this, "zone");
|
|
9108
|
+
__publicField(this, "headerElementList");
|
|
8903
9109
|
__publicField(this, "elementList");
|
|
9110
|
+
__publicField(this, "footerElementList");
|
|
8904
9111
|
__publicField(this, "listener");
|
|
8905
9112
|
__publicField(this, "i18n");
|
|
8906
9113
|
__publicField(this, "canvasEvent");
|
|
@@ -8949,7 +9156,9 @@ class Draw {
|
|
|
8949
9156
|
this.pageNo = 0;
|
|
8950
9157
|
this.mode = options.mode;
|
|
8951
9158
|
this.options = options;
|
|
8952
|
-
this.
|
|
9159
|
+
this.headerElementList = data2.header || [];
|
|
9160
|
+
this.elementList = data2.main;
|
|
9161
|
+
this.footerElementList = data2.footer || [];
|
|
8953
9162
|
this.listener = listener;
|
|
8954
9163
|
this._formatContainer();
|
|
8955
9164
|
this.pageContainer = this._createPageContainer();
|
|
@@ -8957,6 +9166,7 @@ class Draw {
|
|
|
8957
9166
|
this.i18n = new I18n();
|
|
8958
9167
|
this.historyManager = new HistoryManager();
|
|
8959
9168
|
this.position = new Position(this);
|
|
9169
|
+
this.zone = new Zone(this);
|
|
8960
9170
|
this.range = new RangeManager(this);
|
|
8961
9171
|
this.margin = new Margin(this);
|
|
8962
9172
|
this.background = new Background(this);
|
|
@@ -9023,6 +9233,12 @@ class Draw {
|
|
|
9023
9233
|
getHeight() {
|
|
9024
9234
|
return Math.floor(this.getOriginalHeight() * this.options.scale);
|
|
9025
9235
|
}
|
|
9236
|
+
getMainHeight() {
|
|
9237
|
+
const pageHeight = this.getHeight();
|
|
9238
|
+
const margins = this.getMargins();
|
|
9239
|
+
const extraHeight = this.header.getExtraHeight();
|
|
9240
|
+
return pageHeight - margins[0] - margins[2] - extraHeight;
|
|
9241
|
+
}
|
|
9026
9242
|
getCanvasWidth(pageNo = -1) {
|
|
9027
9243
|
const page = this.getPage(pageNo);
|
|
9028
9244
|
return page.width;
|
|
@@ -9123,17 +9339,39 @@ class Draw {
|
|
|
9123
9339
|
getPosition() {
|
|
9124
9340
|
return this.position;
|
|
9125
9341
|
}
|
|
9342
|
+
getZone() {
|
|
9343
|
+
return this.zone;
|
|
9344
|
+
}
|
|
9126
9345
|
getRange() {
|
|
9127
9346
|
return this.range;
|
|
9128
9347
|
}
|
|
9348
|
+
getHeaderElementList() {
|
|
9349
|
+
return this.headerElementList;
|
|
9350
|
+
}
|
|
9351
|
+
getTableElementList(sourceElementList) {
|
|
9352
|
+
const positionContext = this.position.getPositionContext();
|
|
9353
|
+
const { index: index2, trIndex, tdIndex } = positionContext;
|
|
9354
|
+
return sourceElementList[index2].trList[trIndex].tdList[tdIndex].value;
|
|
9355
|
+
}
|
|
9129
9356
|
getElementList() {
|
|
9130
9357
|
const positionContext = this.position.getPositionContext();
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
|
|
9358
|
+
const elementList = this.getOriginalElementList();
|
|
9359
|
+
return positionContext.isTable ? this.getTableElementList(elementList) : elementList;
|
|
9360
|
+
}
|
|
9361
|
+
getMainElementList() {
|
|
9362
|
+
const positionContext = this.position.getPositionContext();
|
|
9363
|
+
return positionContext.isTable ? this.getTableElementList(this.elementList) : this.elementList;
|
|
9364
|
+
}
|
|
9365
|
+
getOriginalElementList() {
|
|
9366
|
+
const zoneManager = this.getZone();
|
|
9367
|
+
return zoneManager.isHeaderActive() ? this.header.getElementList() : this.elementList;
|
|
9368
|
+
}
|
|
9369
|
+
getOriginalMainElementList() {
|
|
9135
9370
|
return this.elementList;
|
|
9136
9371
|
}
|
|
9372
|
+
getFooterElementList() {
|
|
9373
|
+
return this.footerElementList;
|
|
9374
|
+
}
|
|
9137
9375
|
insertElementList(payload) {
|
|
9138
9376
|
if (!payload.length)
|
|
9139
9377
|
return;
|
|
@@ -9177,9 +9415,6 @@ class Draw {
|
|
|
9177
9415
|
});
|
|
9178
9416
|
}
|
|
9179
9417
|
}
|
|
9180
|
-
getOriginalElementList() {
|
|
9181
|
-
return this.elementList;
|
|
9182
|
-
}
|
|
9183
9418
|
getCanvasEvent() {
|
|
9184
9419
|
return this.canvasEvent;
|
|
9185
9420
|
}
|
|
@@ -9198,6 +9433,9 @@ class Draw {
|
|
|
9198
9433
|
getTableTool() {
|
|
9199
9434
|
return this.tableTool;
|
|
9200
9435
|
}
|
|
9436
|
+
getHeader() {
|
|
9437
|
+
return this.header;
|
|
9438
|
+
}
|
|
9201
9439
|
getHyperlinkParticle() {
|
|
9202
9440
|
return this.hyperlinkParticle;
|
|
9203
9441
|
}
|
|
@@ -9352,14 +9590,16 @@ class Draw {
|
|
|
9352
9590
|
});
|
|
9353
9591
|
}
|
|
9354
9592
|
getValue() {
|
|
9355
|
-
const { width, height, margins, watermark
|
|
9356
|
-
const data2 =
|
|
9593
|
+
const { width, height, margins, watermark } = this.options;
|
|
9594
|
+
const data2 = {
|
|
9595
|
+
header: zipElementList(this.headerElementList),
|
|
9596
|
+
main: zipElementList(this.elementList)
|
|
9597
|
+
};
|
|
9357
9598
|
return {
|
|
9358
9599
|
version,
|
|
9359
9600
|
width,
|
|
9360
9601
|
height,
|
|
9361
9602
|
margins,
|
|
9362
|
-
header: header.data ? header : void 0,
|
|
9363
9603
|
watermark: watermark.data ? watermark : void 0,
|
|
9364
9604
|
data: data2
|
|
9365
9605
|
};
|
|
@@ -9413,7 +9653,7 @@ class Draw {
|
|
|
9413
9653
|
const size = el.actualSize || el.size || defaultSize;
|
|
9414
9654
|
return `${el.italic ? "italic " : ""}${el.bold ? "bold " : ""}${size * scale}px ${font}`;
|
|
9415
9655
|
}
|
|
9416
|
-
|
|
9656
|
+
computeRowList(innerWidth, elementList) {
|
|
9417
9657
|
var _a, _b, _c, _d;
|
|
9418
9658
|
const { defaultSize, defaultRowMargin, scale, tdPadding, defaultTabWidth } = this.options;
|
|
9419
9659
|
const defaultBasicRowMarginHeight = this.getDefaultBasicRowMarginHeight();
|
|
@@ -9466,7 +9706,7 @@ class Draw {
|
|
|
9466
9706
|
let maxTrHeight = 0;
|
|
9467
9707
|
for (let d = 0; d < tr.tdList.length; d++) {
|
|
9468
9708
|
const td = tr.tdList[d];
|
|
9469
|
-
const rowList2 = this.
|
|
9709
|
+
const rowList2 = this.computeRowList((td.width - tdGap) * scale, td.value);
|
|
9470
9710
|
const rowHeight = rowList2.reduce((pre, cur) => pre + cur.height, 0);
|
|
9471
9711
|
td.rowList = rowList2;
|
|
9472
9712
|
const curTrHeight = (rowHeight + tdGap) / scale;
|
|
@@ -9491,7 +9731,8 @@ class Draw {
|
|
|
9491
9731
|
metrics.boundingBoxAscent = 0;
|
|
9492
9732
|
const margins = this.getMargins();
|
|
9493
9733
|
const height2 = this.getHeight();
|
|
9494
|
-
const
|
|
9734
|
+
const headerExtraHeight = this.header.getExtraHeight();
|
|
9735
|
+
const marginHeight = margins[0] + margins[2] + headerExtraHeight;
|
|
9495
9736
|
let curPagePreHeight = marginHeight;
|
|
9496
9737
|
for (let r = 0; r < rowList.length; r++) {
|
|
9497
9738
|
const row = rowList[r];
|
|
@@ -9501,7 +9742,7 @@ class Draw {
|
|
|
9501
9742
|
curPagePreHeight += row.height;
|
|
9502
9743
|
}
|
|
9503
9744
|
}
|
|
9504
|
-
const rowMarginHeight = rowMargin * 2;
|
|
9745
|
+
const rowMarginHeight = rowMargin * 2 * scale;
|
|
9505
9746
|
if (curPagePreHeight + rowMarginHeight + elementHeight > height2) {
|
|
9506
9747
|
const trList2 = element.trList;
|
|
9507
9748
|
let deleteStart = 0;
|
|
@@ -9510,7 +9751,8 @@ class Draw {
|
|
|
9510
9751
|
if (trList2.length > 1) {
|
|
9511
9752
|
for (let r = 0; r < trList2.length; r++) {
|
|
9512
9753
|
const tr = trList2[r];
|
|
9513
|
-
|
|
9754
|
+
const trHeight = tr.height * scale;
|
|
9755
|
+
if (curPagePreHeight + rowMarginHeight + preTrHeight + trHeight > height2) {
|
|
9514
9756
|
if (((_c = element.colgroup) == null ? void 0 : _c.length) !== tr.tdList.length) {
|
|
9515
9757
|
deleteCount = 0;
|
|
9516
9758
|
}
|
|
@@ -9518,7 +9760,7 @@ class Draw {
|
|
|
9518
9760
|
} else {
|
|
9519
9761
|
deleteStart = r + 1;
|
|
9520
9762
|
deleteCount = trList2.length - deleteStart;
|
|
9521
|
-
preTrHeight +=
|
|
9763
|
+
preTrHeight += trHeight;
|
|
9522
9764
|
}
|
|
9523
9765
|
}
|
|
9524
9766
|
}
|
|
@@ -9543,13 +9785,13 @@ class Draw {
|
|
|
9543
9785
|
} else if (element.type === ElementType.SEPARATOR) {
|
|
9544
9786
|
element.width = innerWidth;
|
|
9545
9787
|
metrics.width = innerWidth;
|
|
9546
|
-
metrics.height =
|
|
9788
|
+
metrics.height = defaultSize;
|
|
9547
9789
|
metrics.boundingBoxAscent = -rowMargin;
|
|
9548
9790
|
metrics.boundingBoxDescent = -rowMargin;
|
|
9549
9791
|
} else if (element.type === ElementType.PAGE_BREAK) {
|
|
9550
9792
|
element.width = innerWidth;
|
|
9551
9793
|
metrics.width = innerWidth;
|
|
9552
|
-
metrics.height =
|
|
9794
|
+
metrics.height = defaultSize;
|
|
9553
9795
|
} else if (element.type === ElementType.CHECKBOX || element.controlComponent === ControlComponent.CHECKBOX) {
|
|
9554
9796
|
const { width, height: height2, gap } = this.options.checkbox;
|
|
9555
9797
|
const elementWidth = (width + gap * 2) * scale;
|
|
@@ -9573,7 +9815,7 @@ class Draw {
|
|
|
9573
9815
|
metrics.boundingBoxDescent = metrics.height;
|
|
9574
9816
|
metrics.boundingBoxAscent = 0;
|
|
9575
9817
|
} else {
|
|
9576
|
-
const size = element.size ||
|
|
9818
|
+
const size = element.size || defaultSize;
|
|
9577
9819
|
if (element.type === ElementType.SUPERSCRIPT || element.type === ElementType.SUBSCRIPT) {
|
|
9578
9820
|
element.actualSize = Math.ceil(size * 0.6);
|
|
9579
9821
|
}
|
|
@@ -9639,7 +9881,8 @@ class Draw {
|
|
|
9639
9881
|
const { pageMode } = this.options;
|
|
9640
9882
|
const height = this.getHeight();
|
|
9641
9883
|
const margins = this.getMargins();
|
|
9642
|
-
const
|
|
9884
|
+
const headerExtraHeight = this.header.getExtraHeight();
|
|
9885
|
+
const marginHeight = margins[0] + margins[2] + headerExtraHeight;
|
|
9643
9886
|
let pageHeight = marginHeight;
|
|
9644
9887
|
let pageNo = 0;
|
|
9645
9888
|
if (pageMode === PageMode.CONTINUITY) {
|
|
@@ -9678,8 +9921,8 @@ class Draw {
|
|
|
9678
9921
|
this.highlight.render(ctx);
|
|
9679
9922
|
this.textParticle.complete();
|
|
9680
9923
|
}
|
|
9681
|
-
|
|
9682
|
-
const { rowList, pageNo, positionList, startIndex } = payload;
|
|
9924
|
+
drawRow(ctx, payload) {
|
|
9925
|
+
const { rowList, pageNo, elementList, positionList, startIndex, zone } = payload;
|
|
9683
9926
|
const { scale, tdPadding } = this.options;
|
|
9684
9927
|
const { isCrossRowCol, tableId } = this.range.getRange();
|
|
9685
9928
|
let index2 = startIndex;
|
|
@@ -9760,10 +10003,10 @@ class Draw {
|
|
|
9760
10003
|
} else if (preElement == null ? void 0 : preElement.highlight) {
|
|
9761
10004
|
this.highlight.render(ctx);
|
|
9762
10005
|
}
|
|
9763
|
-
const { startIndex: startIndex2, endIndex } = this.range.getRange();
|
|
9764
|
-
if (startIndex2 !== endIndex && startIndex2 <= index2 && index2 <= endIndex) {
|
|
10006
|
+
const { zone: currentZone, startIndex: startIndex2, endIndex } = this.range.getRange();
|
|
10007
|
+
if (currentZone === zone && startIndex2 !== endIndex && startIndex2 <= index2 && index2 <= endIndex) {
|
|
9765
10008
|
if (startIndex2 === index2) {
|
|
9766
|
-
const nextElement =
|
|
10009
|
+
const nextElement = elementList[startIndex2 + 1];
|
|
9767
10010
|
if (nextElement && nextElement.value === ZERO) {
|
|
9768
10011
|
rangeRecord.x = x + metrics.width;
|
|
9769
10012
|
rangeRecord.y = y;
|
|
@@ -9793,12 +10036,14 @@ class Draw {
|
|
|
9793
10036
|
const tr = element.trList[t];
|
|
9794
10037
|
for (let d = 0; d < tr.tdList.length; d++) {
|
|
9795
10038
|
const td = tr.tdList[d];
|
|
9796
|
-
this.
|
|
10039
|
+
this.drawRow(ctx, {
|
|
10040
|
+
elementList: td.value,
|
|
9797
10041
|
positionList: td.positionList,
|
|
9798
10042
|
rowList: td.rowList,
|
|
9799
10043
|
pageNo,
|
|
9800
10044
|
startIndex: 0,
|
|
9801
|
-
innerWidth: (td.width - tdGap) * scale
|
|
10045
|
+
innerWidth: (td.width - tdGap) * scale,
|
|
10046
|
+
zone
|
|
9802
10047
|
});
|
|
9803
10048
|
}
|
|
9804
10049
|
}
|
|
@@ -9821,22 +10066,26 @@ class Draw {
|
|
|
9821
10066
|
ctx.clearRect(0, 0, pageDom.width, pageDom.height);
|
|
9822
10067
|
this.blockParticle.clear();
|
|
9823
10068
|
}
|
|
9824
|
-
_drawPage(
|
|
9825
|
-
const {
|
|
10069
|
+
_drawPage(payload) {
|
|
10070
|
+
const { elementList, positionList, rowList, pageNo } = payload;
|
|
10071
|
+
const { inactiveAlpha, pageMode } = this.options;
|
|
9826
10072
|
const innerWidth = this.getInnerWidth();
|
|
9827
10073
|
const ctx = this.ctxList[pageNo];
|
|
10074
|
+
ctx.globalAlpha = this.zone.isHeaderActive() ? inactiveAlpha : 1;
|
|
9828
10075
|
this._clearPage(pageNo);
|
|
9829
10076
|
this.background.render(ctx);
|
|
9830
10077
|
this.margin.render(ctx, pageNo);
|
|
9831
10078
|
const index2 = rowList[0].startIndex;
|
|
9832
|
-
this.
|
|
10079
|
+
this.drawRow(ctx, {
|
|
10080
|
+
elementList,
|
|
9833
10081
|
positionList,
|
|
9834
10082
|
rowList,
|
|
9835
10083
|
pageNo,
|
|
9836
10084
|
startIndex: index2,
|
|
9837
|
-
innerWidth
|
|
10085
|
+
innerWidth,
|
|
10086
|
+
zone: EditorZone.MAIN
|
|
9838
10087
|
});
|
|
9839
|
-
this.header.render(ctx);
|
|
10088
|
+
this.header.render(ctx, pageNo);
|
|
9840
10089
|
this.pageNumber.render(ctx, pageNo);
|
|
9841
10090
|
if (this.search.getSearchKeyword()) {
|
|
9842
10091
|
this.search.render(ctx, pageNo);
|
|
@@ -9847,13 +10096,20 @@ class Draw {
|
|
|
9847
10096
|
}
|
|
9848
10097
|
_lazyRender() {
|
|
9849
10098
|
var _a;
|
|
9850
|
-
const positionList = this.position.
|
|
10099
|
+
const positionList = this.position.getOriginalMainPositionList();
|
|
10100
|
+
const elementList = this.getOriginalMainElementList();
|
|
9851
10101
|
(_a = this.lazyRenderIntersectionObserver) == null ? void 0 : _a.disconnect();
|
|
9852
10102
|
this.lazyRenderIntersectionObserver = new IntersectionObserver((entries) => {
|
|
9853
10103
|
entries.forEach((entry) => {
|
|
9854
10104
|
if (entry.isIntersecting) {
|
|
9855
10105
|
const index2 = Number(entry.target.dataset.index);
|
|
9856
|
-
this.
|
|
10106
|
+
this.header.render(this.ctxList[index2], index2);
|
|
10107
|
+
this._drawPage({
|
|
10108
|
+
elementList,
|
|
10109
|
+
positionList,
|
|
10110
|
+
rowList: this.pageRowList[index2],
|
|
10111
|
+
pageNo: index2
|
|
10112
|
+
});
|
|
9857
10113
|
}
|
|
9858
10114
|
});
|
|
9859
10115
|
});
|
|
@@ -9862,9 +10118,15 @@ class Draw {
|
|
|
9862
10118
|
});
|
|
9863
10119
|
}
|
|
9864
10120
|
_immediateRender() {
|
|
9865
|
-
const positionList = this.position.
|
|
10121
|
+
const positionList = this.position.getOriginalMainPositionList();
|
|
10122
|
+
const elementList = this.getOriginalMainElementList();
|
|
9866
10123
|
for (let i = 0; i < this.pageRowList.length; i++) {
|
|
9867
|
-
this._drawPage(
|
|
10124
|
+
this._drawPage({
|
|
10125
|
+
elementList,
|
|
10126
|
+
positionList,
|
|
10127
|
+
rowList: this.pageRowList[i],
|
|
10128
|
+
pageNo: i
|
|
10129
|
+
});
|
|
9868
10130
|
}
|
|
9869
10131
|
}
|
|
9870
10132
|
render(payload) {
|
|
@@ -9874,7 +10136,8 @@ class Draw {
|
|
|
9874
10136
|
let { curIndex } = payload || {};
|
|
9875
10137
|
const innerWidth = this.getInnerWidth();
|
|
9876
10138
|
if (isCompute) {
|
|
9877
|
-
this.
|
|
10139
|
+
this.header.compute();
|
|
10140
|
+
this.rowList = this.computeRowList(innerWidth, this.elementList);
|
|
9878
10141
|
this.pageRowList = this._computePageList();
|
|
9879
10142
|
this.position.computePositionList();
|
|
9880
10143
|
const searchKeyword = this.search.getSearchKeyword();
|
|
@@ -9884,7 +10147,6 @@ class Draw {
|
|
|
9884
10147
|
}
|
|
9885
10148
|
this.imageObserver.clearAll();
|
|
9886
10149
|
this.cursor.recoveryCursor();
|
|
9887
|
-
const positionList = this.position.getOriginalPositionList();
|
|
9888
10150
|
for (let i = 0; i < this.pageRowList.length; i++) {
|
|
9889
10151
|
if (!this.pageList[i]) {
|
|
9890
10152
|
this._createPage(i);
|
|
@@ -9903,32 +10165,35 @@ class Draw {
|
|
|
9903
10165
|
this._immediateRender();
|
|
9904
10166
|
}
|
|
9905
10167
|
if (isSetCursor) {
|
|
10168
|
+
const positionList = this.position.getPositionList();
|
|
9906
10169
|
const positionContext = this.position.getPositionContext();
|
|
9907
10170
|
if (positionContext.isTable) {
|
|
9908
10171
|
const { index: index2, trIndex, tdIndex } = positionContext;
|
|
9909
|
-
const
|
|
10172
|
+
const elementList = this.getOriginalElementList();
|
|
10173
|
+
const tablePositionList = (_a = elementList[index2].trList) == null ? void 0 : _a[trIndex].tdList[tdIndex].positionList;
|
|
9910
10174
|
if (curIndex === void 0 && tablePositionList) {
|
|
9911
10175
|
curIndex = tablePositionList.length - 1;
|
|
9912
10176
|
}
|
|
9913
10177
|
const tablePosition = tablePositionList == null ? void 0 : tablePositionList[curIndex];
|
|
9914
10178
|
this.position.setCursorPosition(tablePosition || null);
|
|
9915
10179
|
} else {
|
|
9916
|
-
|
|
9917
|
-
curIndex = positionList.length - 1;
|
|
9918
|
-
}
|
|
9919
|
-
this.position.setCursorPosition(positionList[curIndex] || null);
|
|
10180
|
+
this.position.setCursorPosition(curIndex !== void 0 ? positionList[curIndex] : null);
|
|
9920
10181
|
}
|
|
9921
10182
|
this.cursor.drawCursor();
|
|
9922
10183
|
}
|
|
9923
10184
|
if (isSubmitHistory) {
|
|
9924
10185
|
const self = this;
|
|
9925
10186
|
const oldElementList = deepClone(this.elementList);
|
|
10187
|
+
const oldHeaderElementList = deepClone(this.header.getElementList());
|
|
9926
10188
|
const { startIndex, endIndex } = this.range.getRange();
|
|
9927
10189
|
const pageNo = this.pageNo;
|
|
9928
10190
|
const oldPositionContext = deepClone(this.position.getPositionContext());
|
|
10191
|
+
const zone = this.zone.getZone();
|
|
9929
10192
|
this.historyManager.execute(function() {
|
|
10193
|
+
self.zone.setZone(zone);
|
|
9930
10194
|
self.setPageNo(pageNo);
|
|
9931
10195
|
self.position.setPositionContext(oldPositionContext);
|
|
10196
|
+
self.header.setElementList(oldHeaderElementList);
|
|
9932
10197
|
self.elementList = deepClone(oldElementList);
|
|
9933
10198
|
self.range.setRange(startIndex, endIndex);
|
|
9934
10199
|
self.render({ curIndex, isSubmitHistory: false });
|
|
@@ -10738,7 +11003,7 @@ class CommandAdapt {
|
|
|
10738
11003
|
if (!~startIndex && !~endIndex)
|
|
10739
11004
|
return;
|
|
10740
11005
|
const elementList = this.draw.getElementList();
|
|
10741
|
-
const innerWidth = this.draw.
|
|
11006
|
+
const innerWidth = this.draw.getOriginalInnerWidth();
|
|
10742
11007
|
const colgroup = [];
|
|
10743
11008
|
const colWidth = innerWidth / col;
|
|
10744
11009
|
for (let c = 0; c < col; c++) {
|
|
@@ -12280,12 +12545,6 @@ class ContextMenu {
|
|
|
12280
12545
|
this.contextMenuRelationShip.clear();
|
|
12281
12546
|
}
|
|
12282
12547
|
}
|
|
12283
|
-
const defaultHeaderOption = {
|
|
12284
|
-
data: "",
|
|
12285
|
-
color: "#AAAAAA",
|
|
12286
|
-
size: 14,
|
|
12287
|
-
font: "Yahei"
|
|
12288
|
-
};
|
|
12289
12548
|
const richtextKeys = [
|
|
12290
12549
|
{
|
|
12291
12550
|
key: KeyMap.X_UPPERCASE,
|
|
@@ -12431,7 +12690,7 @@ class Shortcut {
|
|
|
12431
12690
|
}
|
|
12432
12691
|
}
|
|
12433
12692
|
class Editor {
|
|
12434
|
-
constructor(container,
|
|
12693
|
+
constructor(container, data2, options = {}) {
|
|
12435
12694
|
__publicField(this, "command");
|
|
12436
12695
|
__publicField(this, "listener");
|
|
12437
12696
|
__publicField(this, "register");
|
|
@@ -12475,7 +12734,8 @@ class Editor {
|
|
|
12475
12734
|
defaultTdHeight: 40,
|
|
12476
12735
|
defaultHyperlinkColor: "#0000FF",
|
|
12477
12736
|
headerTop: 50,
|
|
12478
|
-
paperDirection: PaperDirection.VERTICAL
|
|
12737
|
+
paperDirection: PaperDirection.VERTICAL,
|
|
12738
|
+
inactiveAlpha: 0.6
|
|
12479
12739
|
}, options), {
|
|
12480
12740
|
header: headerOptions,
|
|
12481
12741
|
watermark: waterMarkOptions,
|
|
@@ -12483,11 +12743,25 @@ class Editor {
|
|
|
12483
12743
|
checkbox: checkboxOptions,
|
|
12484
12744
|
cursor: cursorOptions
|
|
12485
12745
|
});
|
|
12486
|
-
|
|
12746
|
+
let headerElementList = [];
|
|
12747
|
+
let mainElementList = [];
|
|
12748
|
+
if (Array.isArray(data2)) {
|
|
12749
|
+
mainElementList = data2;
|
|
12750
|
+
} else {
|
|
12751
|
+
headerElementList = data2.header || [];
|
|
12752
|
+
mainElementList = data2.main;
|
|
12753
|
+
}
|
|
12754
|
+
formatElementList(headerElementList, {
|
|
12755
|
+
editorOptions
|
|
12756
|
+
});
|
|
12757
|
+
formatElementList(mainElementList, {
|
|
12487
12758
|
editorOptions
|
|
12488
12759
|
});
|
|
12489
12760
|
this.listener = new Listener();
|
|
12490
|
-
const draw = new Draw(container, editorOptions,
|
|
12761
|
+
const draw = new Draw(container, editorOptions, {
|
|
12762
|
+
header: headerElementList,
|
|
12763
|
+
main: mainElementList
|
|
12764
|
+
}, this.listener);
|
|
12491
12765
|
this.command = new Command(new CommandAdapt(draw));
|
|
12492
12766
|
const contextMenu = new ContextMenu(draw, this.command);
|
|
12493
12767
|
const shortcut = new Shortcut(draw, this.command);
|
|
@@ -12503,5 +12777,5 @@ class Editor {
|
|
|
12503
12777
|
};
|
|
12504
12778
|
}
|
|
12505
12779
|
}
|
|
12506
|
-
export { BlockType, Command, ControlType, EDITOR_COMPONENT, Editor, EditorComponent, EditorMode, ElementType, ImageDisplay, KeyMap, PageMode, PaperDirection, RowFlex, Editor as default };
|
|
12780
|
+
export { BlockType, Command, ControlType, EDITOR_COMPONENT, Editor, EditorComponent, EditorMode, EditorZone, ElementType, ImageDisplay, KeyMap, PageMode, PaperDirection, RowFlex, Editor as default };
|
|
12507
12781
|
//# sourceMappingURL=canvas-editor.es.js.map
|