@hufe921/canvas-editor 0.9.22 → 0.9.24
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 +71 -0
- package/README.md +3 -3
- package/dist/canvas-editor.es.js +600 -166
- 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/command/Command.d.ts +5 -1
- package/dist/src/editor/core/command/CommandAdapt.d.ts +3 -0
- 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 +2 -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/constant/PageNumber.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/dataset/enum/VerticalAlign.d.ts +5 -0
- package/dist/src/editor/index.d.ts +6 -5
- package/dist/src/editor/interface/Draw.d.ts +10 -1
- package/dist/src/editor/interface/Editor.d.ts +11 -5
- package/dist/src/editor/interface/Header.d.ts +3 -4
- package/dist/src/editor/interface/Listener.d.ts +1 -0
- package/dist/src/editor/interface/PageNumber.d.ts +8 -0
- package/dist/src/editor/interface/Position.d.ts +2 -0
- package/dist/src/editor/interface/Range.d.ts +2 -0
- package/dist/src/editor/interface/table/Td.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-contextmenu-vertical-align{background-image:url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiIHdpZHRoPSIxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMiAxM2gxMnYxSDJ6bTAtM2g4djFIMnptMC0zaDEydjFIMnptMC02aDEydjFIMnptMCAzaDh2MUgyeiIgZmlsbD0iIzNkNDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ce-contextmenu-vertical-align-top{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggOEg3djZoMXptLS41LTNMMTAgOEg1ek0yIDNoMTF2MUgyeiIgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ce-contextmenu-vertical-align-middle{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOCAxMkg3djNoMXptLS41LTNsMi41IDNINXpNNyAzaDFWMEg3em0uNSAzTDUgM2g1ek0yIDdoMTF2MUgyeiIgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.ce-contextmenu-vertical-align-bottom{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcgOWgxVjNIN3ptLjUgM0w1IDloNXpNMiAxM2gxMXYxSDJ6IiBmaWxsPSIjM0Q0NzU3IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.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:1px;height:12px;min-width:0;min-height:0;margin:0;padding:0;left:0;right:0;letter-spacing:0;font-size:12px;position:absolute;z-index:-1;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.24";
|
|
27
27
|
const ZERO = "\u200B";
|
|
28
28
|
const WRAP = "\n";
|
|
29
29
|
var RowFlex;
|
|
@@ -3503,7 +3503,7 @@ function zipElementList(payload) {
|
|
|
3503
3503
|
let e = 0;
|
|
3504
3504
|
while (e < elementList.length) {
|
|
3505
3505
|
let element = elementList[e];
|
|
3506
|
-
if (e === 0 && element.value === ZERO) {
|
|
3506
|
+
if (e === 0 && element.value === ZERO && (!element.type || element.type === ElementType.TEXT)) {
|
|
3507
3507
|
e++;
|
|
3508
3508
|
continue;
|
|
3509
3509
|
}
|
|
@@ -3514,11 +3514,15 @@ function zipElementList(payload) {
|
|
|
3514
3514
|
delete tr.id;
|
|
3515
3515
|
for (let d = 0; d < tr.tdList.length; d++) {
|
|
3516
3516
|
const td = tr.tdList[d];
|
|
3517
|
-
|
|
3517
|
+
const zipTd = {
|
|
3518
3518
|
colspan: td.colspan,
|
|
3519
3519
|
rowspan: td.rowspan,
|
|
3520
3520
|
value: zipElementList(td.value)
|
|
3521
3521
|
};
|
|
3522
|
+
if (td.verticalAlign) {
|
|
3523
|
+
zipTd.verticalAlign = td.verticalAlign;
|
|
3524
|
+
}
|
|
3525
|
+
tr.tdList[d] = zipTd;
|
|
3522
3526
|
}
|
|
3523
3527
|
}
|
|
3524
3528
|
}
|
|
@@ -4011,7 +4015,9 @@ class Cursor {
|
|
|
4011
4015
|
const height = this.draw.getHeight();
|
|
4012
4016
|
const pageGap = this.draw.getPageGap();
|
|
4013
4017
|
const { metrics, coordinate: { leftTop, rightTop }, ascent, pageNo } = cursorPosition;
|
|
4014
|
-
const
|
|
4018
|
+
const zoneManager = this.draw.getZone();
|
|
4019
|
+
const curPageNo = zoneManager.isMainActive() ? pageNo : this.draw.getPageNo();
|
|
4020
|
+
const preY = curPageNo * (height + pageGap);
|
|
4015
4021
|
const offsetHeight = metrics.height / 4;
|
|
4016
4022
|
const cursorHeight = metrics.height + offsetHeight * 2;
|
|
4017
4023
|
const agentCursorDom = this.cursorAgent.getAgentCursorDom();
|
|
@@ -4264,6 +4270,8 @@ function mousedown(evt, host) {
|
|
|
4264
4270
|
x: evt.offsetX,
|
|
4265
4271
|
y: evt.offsetY
|
|
4266
4272
|
});
|
|
4273
|
+
if (!positionResult)
|
|
4274
|
+
return;
|
|
4267
4275
|
const { index: index2, isDirectHit, isCheckbox, isImage, isTable, tdValueIndex } = positionResult;
|
|
4268
4276
|
host.mouseDownStartPosition = __spreadProps(__spreadValues({}, positionResult), {
|
|
4269
4277
|
index: isTable ? tdValueIndex : index2
|
|
@@ -4494,6 +4502,8 @@ function mousemove(evt, host) {
|
|
|
4494
4502
|
x: evt.offsetX,
|
|
4495
4503
|
y: evt.offsetY
|
|
4496
4504
|
});
|
|
4505
|
+
if (!~positionResult.index)
|
|
4506
|
+
return;
|
|
4497
4507
|
const { index: index2, isTable, tdValueIndex, tdIndex, trIndex, tableId } = positionResult;
|
|
4498
4508
|
const { index: startIndex, isTable: startIsTable, tdIndex: startTdIndex, trIndex: startTrIndex } = host.mouseDownStartPosition;
|
|
4499
4509
|
const endIndex = isTable ? tdValueIndex : index2;
|
|
@@ -4933,9 +4943,17 @@ function drop(evt, host) {
|
|
|
4933
4943
|
}
|
|
4934
4944
|
const LETTER_REG = /[a-zA-Z]/;
|
|
4935
4945
|
const NUMBER_LIKE_REG = /[0-9.]/;
|
|
4936
|
-
function dblclick(host) {
|
|
4946
|
+
function dblclick(host, evt) {
|
|
4937
4947
|
const draw = host.getDraw();
|
|
4938
4948
|
const position = draw.getPosition();
|
|
4949
|
+
const positionContext = position.getPositionByXY({
|
|
4950
|
+
x: evt.offsetX,
|
|
4951
|
+
y: evt.offsetY
|
|
4952
|
+
});
|
|
4953
|
+
if (!~positionContext.index && positionContext.zone) {
|
|
4954
|
+
draw.getZone().setZone(positionContext.zone);
|
|
4955
|
+
return;
|
|
4956
|
+
}
|
|
4939
4957
|
const cursorPosition = position.getCursorPosition();
|
|
4940
4958
|
if (!cursorPosition)
|
|
4941
4959
|
return;
|
|
@@ -5058,10 +5076,13 @@ function dragover(evt, host) {
|
|
|
5058
5076
|
draw.setPageNo(Number(pageIndex));
|
|
5059
5077
|
}
|
|
5060
5078
|
const position = draw.getPosition();
|
|
5061
|
-
const
|
|
5079
|
+
const positionContext = position.adjustPositionContext({
|
|
5062
5080
|
x: evt.offsetX,
|
|
5063
5081
|
y: evt.offsetY
|
|
5064
5082
|
});
|
|
5083
|
+
if (!positionContext)
|
|
5084
|
+
return;
|
|
5085
|
+
const { isTable, tdValueIndex, index: index2 } = positionContext;
|
|
5065
5086
|
const positionList = position.getPositionList();
|
|
5066
5087
|
const curIndex = isTable ? tdValueIndex : index2;
|
|
5067
5088
|
if (~index2) {
|
|
@@ -5184,8 +5205,8 @@ class CanvasEvent {
|
|
|
5184
5205
|
keydown(evt) {
|
|
5185
5206
|
keydown(evt, this);
|
|
5186
5207
|
}
|
|
5187
|
-
dblclick() {
|
|
5188
|
-
click.dblclick(this);
|
|
5208
|
+
dblclick(evt) {
|
|
5209
|
+
click.dblclick(this, evt);
|
|
5189
5210
|
}
|
|
5190
5211
|
threeClick() {
|
|
5191
5212
|
click.threeClick(this);
|
|
@@ -5356,6 +5377,42 @@ class HistoryManager {
|
|
|
5356
5377
|
return !!this.redoStack.length;
|
|
5357
5378
|
}
|
|
5358
5379
|
}
|
|
5380
|
+
var EditorComponent;
|
|
5381
|
+
(function(EditorComponent2) {
|
|
5382
|
+
EditorComponent2["COMPONENT"] = "component";
|
|
5383
|
+
EditorComponent2["MENU"] = "menu";
|
|
5384
|
+
EditorComponent2["MAIN"] = "main";
|
|
5385
|
+
EditorComponent2["FOOTER"] = "footer";
|
|
5386
|
+
EditorComponent2["CONTEXTMENU"] = "contextmenu";
|
|
5387
|
+
EditorComponent2["POPUP"] = "popup";
|
|
5388
|
+
})(EditorComponent || (EditorComponent = {}));
|
|
5389
|
+
var EditorContext;
|
|
5390
|
+
(function(EditorContext2) {
|
|
5391
|
+
EditorContext2["PAGE"] = "page";
|
|
5392
|
+
EditorContext2["TABLE"] = "table";
|
|
5393
|
+
})(EditorContext || (EditorContext = {}));
|
|
5394
|
+
var EditorMode;
|
|
5395
|
+
(function(EditorMode2) {
|
|
5396
|
+
EditorMode2["EDIT"] = "edit";
|
|
5397
|
+
EditorMode2["CLEAN"] = "clean";
|
|
5398
|
+
EditorMode2["READONLY"] = "readonly";
|
|
5399
|
+
})(EditorMode || (EditorMode = {}));
|
|
5400
|
+
var EditorZone;
|
|
5401
|
+
(function(EditorZone2) {
|
|
5402
|
+
EditorZone2["HEADER"] = "header";
|
|
5403
|
+
EditorZone2["MAIN"] = "main";
|
|
5404
|
+
EditorZone2["FOOTER"] = "footer";
|
|
5405
|
+
})(EditorZone || (EditorZone = {}));
|
|
5406
|
+
var PageMode;
|
|
5407
|
+
(function(PageMode2) {
|
|
5408
|
+
PageMode2["PAGING"] = "paging";
|
|
5409
|
+
PageMode2["CONTINUITY"] = "continuity";
|
|
5410
|
+
})(PageMode || (PageMode = {}));
|
|
5411
|
+
var PaperDirection;
|
|
5412
|
+
(function(PaperDirection2) {
|
|
5413
|
+
PaperDirection2["VERTICAL"] = "vertical";
|
|
5414
|
+
PaperDirection2["HORIZONTAL"] = "horizontal";
|
|
5415
|
+
})(PaperDirection || (PaperDirection = {}));
|
|
5359
5416
|
class Position {
|
|
5360
5417
|
constructor(draw) {
|
|
5361
5418
|
__publicField(this, "cursorPosition");
|
|
@@ -5372,16 +5429,22 @@ class Position {
|
|
|
5372
5429
|
this.draw = draw;
|
|
5373
5430
|
this.options = draw.getOptions();
|
|
5374
5431
|
}
|
|
5375
|
-
|
|
5376
|
-
|
|
5432
|
+
getTablePositionList(sourceElementList) {
|
|
5433
|
+
const { index: index2, trIndex, tdIndex } = this.positionContext;
|
|
5434
|
+
return sourceElementList[index2].trList[trIndex].tdList[tdIndex].positionList || [];
|
|
5377
5435
|
}
|
|
5378
5436
|
getPositionList() {
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5437
|
+
return this.positionContext.isTable ? this.getTablePositionList(this.draw.getOriginalElementList()) : this.getOriginalPositionList();
|
|
5438
|
+
}
|
|
5439
|
+
getMainPositionList() {
|
|
5440
|
+
return this.positionContext.isTable ? this.getTablePositionList(this.draw.getOriginalMainElementList()) : this.positionList;
|
|
5441
|
+
}
|
|
5442
|
+
getOriginalPositionList() {
|
|
5443
|
+
const zoneManager = this.draw.getZone();
|
|
5444
|
+
const header = this.draw.getHeader();
|
|
5445
|
+
return zoneManager.isHeaderActive() ? header.getPositionList() : this.positionList;
|
|
5446
|
+
}
|
|
5447
|
+
getOriginalMainPositionList() {
|
|
5385
5448
|
return this.positionList;
|
|
5386
5449
|
}
|
|
5387
5450
|
setPositionList(payload) {
|
|
@@ -5432,15 +5495,30 @@ class Position {
|
|
|
5432
5495
|
for (let d = 0; d < tr.tdList.length; d++) {
|
|
5433
5496
|
const td = tr.tdList[d];
|
|
5434
5497
|
td.positionList = [];
|
|
5498
|
+
const rowList2 = td.rowList;
|
|
5435
5499
|
const drawRowResult = this.computePageRowPosition({
|
|
5436
5500
|
positionList: td.positionList,
|
|
5437
|
-
rowList:
|
|
5501
|
+
rowList: rowList2,
|
|
5438
5502
|
pageNo,
|
|
5439
5503
|
startIndex: 0,
|
|
5440
5504
|
startX: (td.x + tdPadding) * scale + tablePreX,
|
|
5441
5505
|
startY: td.y * scale + tablePreY,
|
|
5442
5506
|
innerWidth: (td.width - tdGap) * scale
|
|
5443
5507
|
});
|
|
5508
|
+
if (td.verticalAlign === VerticalAlign.MIDDLE || td.verticalAlign == VerticalAlign.BOTTOM) {
|
|
5509
|
+
const rowsHeight = rowList2.reduce((pre, cur) => pre + cur.height, 0);
|
|
5510
|
+
const blankHeight = td.height - tdGap - rowsHeight;
|
|
5511
|
+
const offsetHeight = td.verticalAlign === VerticalAlign.MIDDLE ? blankHeight / 2 : blankHeight;
|
|
5512
|
+
if (Math.floor(offsetHeight) > 0) {
|
|
5513
|
+
td.positionList.forEach((tdPosition) => {
|
|
5514
|
+
const { coordinate: { leftTop, leftBottom, rightBottom, rightTop } } = tdPosition;
|
|
5515
|
+
leftTop[1] += offsetHeight;
|
|
5516
|
+
leftBottom[1] += offsetHeight;
|
|
5517
|
+
rightBottom[1] += offsetHeight;
|
|
5518
|
+
rightTop[1] += offsetHeight;
|
|
5519
|
+
});
|
|
5520
|
+
}
|
|
5521
|
+
}
|
|
5444
5522
|
x = drawRowResult.x;
|
|
5445
5523
|
y = drawRowResult.y;
|
|
5446
5524
|
}
|
|
@@ -5460,7 +5538,9 @@ class Position {
|
|
|
5460
5538
|
const pageRowList = this.draw.getPageRowList();
|
|
5461
5539
|
const margins = this.draw.getMargins();
|
|
5462
5540
|
const startX = margins[3];
|
|
5463
|
-
const
|
|
5541
|
+
const header = this.draw.getHeader();
|
|
5542
|
+
const extraHeight = header.getExtraHeight();
|
|
5543
|
+
const startY = margins[0] + extraHeight;
|
|
5464
5544
|
for (let i = 0; i < pageRowList.length; i++) {
|
|
5465
5545
|
const rowList = pageRowList[i];
|
|
5466
5546
|
const startIndex = rowList[0].startIndex;
|
|
@@ -5495,12 +5575,14 @@ class Position {
|
|
|
5495
5575
|
elementList = this.draw.getOriginalElementList();
|
|
5496
5576
|
}
|
|
5497
5577
|
if (!positionList) {
|
|
5498
|
-
positionList = this.
|
|
5578
|
+
positionList = this.getOriginalPositionList();
|
|
5499
5579
|
}
|
|
5580
|
+
const zoneManager = this.draw.getZone();
|
|
5500
5581
|
const curPageNo = this.draw.getPageNo();
|
|
5582
|
+
const positionNo = zoneManager.isMainActive() ? curPageNo : 0;
|
|
5501
5583
|
for (let j = 0; j < positionList.length; j++) {
|
|
5502
5584
|
const { index: index2, pageNo, coordinate: { leftTop, rightTop, leftBottom } } = positionList[j];
|
|
5503
|
-
if (
|
|
5585
|
+
if (positionNo !== pageNo)
|
|
5504
5586
|
continue;
|
|
5505
5587
|
if (leftTop[0] <= x && rightTop[0] >= x && leftTop[1] <= y && leftBottom[1] >= y) {
|
|
5506
5588
|
let curPositionIndex2 = j;
|
|
@@ -5583,15 +5665,15 @@ class Position {
|
|
|
5583
5665
|
}
|
|
5584
5666
|
}
|
|
5585
5667
|
}
|
|
5586
|
-
const firstLetterList = positionList.filter((p) => p.isLastLetter && p.pageNo ===
|
|
5668
|
+
const firstLetterList = positionList.filter((p) => p.isLastLetter && p.pageNo === positionNo);
|
|
5587
5669
|
for (let j = 0; j < firstLetterList.length; j++) {
|
|
5588
5670
|
const { index: index2, pageNo, coordinate: { leftTop, leftBottom } } = firstLetterList[j];
|
|
5589
|
-
if (
|
|
5671
|
+
if (positionNo !== pageNo)
|
|
5590
5672
|
continue;
|
|
5591
5673
|
if (y > leftTop[1] && y <= leftBottom[1]) {
|
|
5592
5674
|
const isHead = x < this.options.margins[3];
|
|
5593
5675
|
if (isHead) {
|
|
5594
|
-
const headIndex = positionList.findIndex((p) => p.pageNo ===
|
|
5676
|
+
const headIndex = positionList.findIndex((p) => p.pageNo === positionNo && p.rowNo === firstLetterList[j].rowNo);
|
|
5595
5677
|
curPositionIndex = ~headIndex ? headIndex - 1 : index2;
|
|
5596
5678
|
} else {
|
|
5597
5679
|
curPositionIndex = index2;
|
|
@@ -5601,7 +5683,25 @@ class Position {
|
|
|
5601
5683
|
}
|
|
5602
5684
|
}
|
|
5603
5685
|
if (!isLastArea) {
|
|
5604
|
-
|
|
5686
|
+
if (zoneManager.isMainActive()) {
|
|
5687
|
+
if (y < firstLetterList[0].coordinate.leftTop[1]) {
|
|
5688
|
+
return {
|
|
5689
|
+
index: -1,
|
|
5690
|
+
zone: EditorZone.HEADER
|
|
5691
|
+
};
|
|
5692
|
+
}
|
|
5693
|
+
}
|
|
5694
|
+
if (zoneManager.isHeaderActive()) {
|
|
5695
|
+
if (y > firstLetterList[0].coordinate.leftTop[1]) {
|
|
5696
|
+
return {
|
|
5697
|
+
index: -1,
|
|
5698
|
+
zone: EditorZone.MAIN
|
|
5699
|
+
};
|
|
5700
|
+
}
|
|
5701
|
+
}
|
|
5702
|
+
return {
|
|
5703
|
+
index: ((_a = firstLetterList[firstLetterList.length - 1]) == null ? void 0 : _a.index) || positionList.length - 1
|
|
5704
|
+
};
|
|
5605
5705
|
}
|
|
5606
5706
|
return {
|
|
5607
5707
|
index: curPositionIndex,
|
|
@@ -5610,11 +5710,9 @@ class Position {
|
|
|
5610
5710
|
}
|
|
5611
5711
|
adjustPositionContext(payload) {
|
|
5612
5712
|
const isReadonly = this.draw.isReadonly();
|
|
5613
|
-
const
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
y
|
|
5617
|
-
});
|
|
5713
|
+
const positionResult = this.getPositionByXY(payload);
|
|
5714
|
+
if (!~positionResult.index)
|
|
5715
|
+
return null;
|
|
5618
5716
|
if (positionResult.isControl && !isReadonly) {
|
|
5619
5717
|
const { index: index22, isTable: isTable2, trIndex: trIndex2, tdIndex: tdIndex2, tdValueIndex } = positionResult;
|
|
5620
5718
|
const control = this.draw.getControl();
|
|
@@ -5667,6 +5765,9 @@ class RangeManager {
|
|
|
5667
5765
|
getRange() {
|
|
5668
5766
|
return this.range;
|
|
5669
5767
|
}
|
|
5768
|
+
clearRange() {
|
|
5769
|
+
this.setRange(-1, -1);
|
|
5770
|
+
}
|
|
5670
5771
|
getSelection() {
|
|
5671
5772
|
const { startIndex, endIndex } = this.range;
|
|
5672
5773
|
if (startIndex === endIndex)
|
|
@@ -5674,6 +5775,12 @@ class RangeManager {
|
|
|
5674
5775
|
const elementList = this.draw.getElementList();
|
|
5675
5776
|
return elementList.slice(startIndex + 1, endIndex + 1);
|
|
5676
5777
|
}
|
|
5778
|
+
getTextLikeSelection() {
|
|
5779
|
+
const selection = this.getSelection();
|
|
5780
|
+
if (!selection)
|
|
5781
|
+
return null;
|
|
5782
|
+
return selection.filter((s) => !s.type || TEXTLIKE_ELEMENT_TYPE.includes(s.type));
|
|
5783
|
+
}
|
|
5677
5784
|
getRangeRow() {
|
|
5678
5785
|
const { startIndex, endIndex } = this.range;
|
|
5679
5786
|
if (!~startIndex && !~endIndex)
|
|
@@ -5713,6 +5820,7 @@ class RangeManager {
|
|
|
5713
5820
|
this.range.startTrIndex = startTrIndex;
|
|
5714
5821
|
this.range.endTrIndex = endTrIndex;
|
|
5715
5822
|
this.range.isCrossRowCol = !!(startTdIndex || endTdIndex || startTrIndex || endTrIndex);
|
|
5823
|
+
this.range.zone = this.draw.getZone().getZone();
|
|
5716
5824
|
const control = this.draw.getControl();
|
|
5717
5825
|
if (~startIndex && ~endIndex) {
|
|
5718
5826
|
const elementList = this.draw.getElementList();
|
|
@@ -5742,6 +5850,7 @@ class RangeManager {
|
|
|
5742
5850
|
return;
|
|
5743
5851
|
const type = curElement.type || ElementType.TEXT;
|
|
5744
5852
|
const font = curElement.font || this.options.defaultFont;
|
|
5853
|
+
const size = curElement.size || this.options.defaultSize;
|
|
5745
5854
|
const bold = !~curElementList.findIndex((el) => !el.bold);
|
|
5746
5855
|
const italic = !~curElementList.findIndex((el) => !el.italic);
|
|
5747
5856
|
const underline = !~curElementList.findIndex((el) => !el.underline);
|
|
@@ -5760,6 +5869,7 @@ class RangeManager {
|
|
|
5760
5869
|
redo,
|
|
5761
5870
|
painter,
|
|
5762
5871
|
font,
|
|
5872
|
+
size,
|
|
5763
5873
|
bold,
|
|
5764
5874
|
italic,
|
|
5765
5875
|
underline,
|
|
@@ -5775,6 +5885,7 @@ class RangeManager {
|
|
|
5775
5885
|
if (!this.listener.rangeStyleChange)
|
|
5776
5886
|
return;
|
|
5777
5887
|
const font = this.options.defaultFont;
|
|
5888
|
+
const size = this.options.defaultSize;
|
|
5778
5889
|
const rowMargin = this.options.defaultRowMargin;
|
|
5779
5890
|
const painter = !!this.draw.getPainterStyle();
|
|
5780
5891
|
const undo = this.historyManager.isCanUndo();
|
|
@@ -5785,6 +5896,7 @@ class RangeManager {
|
|
|
5785
5896
|
redo,
|
|
5786
5897
|
painter,
|
|
5787
5898
|
font,
|
|
5899
|
+
size,
|
|
5788
5900
|
bold: false,
|
|
5789
5901
|
italic: false,
|
|
5790
5902
|
underline: false,
|
|
@@ -5940,36 +6052,6 @@ class Highlight extends AbstractRichText {
|
|
|
5940
6052
|
this.clearFillInfo();
|
|
5941
6053
|
}
|
|
5942
6054
|
}
|
|
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
6055
|
class Margin {
|
|
5974
6056
|
constructor(draw) {
|
|
5975
6057
|
__publicField(this, "draw");
|
|
@@ -6362,14 +6444,26 @@ class PageNumber {
|
|
|
6362
6444
|
this.options = draw.getOptions();
|
|
6363
6445
|
}
|
|
6364
6446
|
render(ctx, pageNo) {
|
|
6365
|
-
const {
|
|
6447
|
+
const { pageNumber: { size, font, color, rowFlex }, scale, pageMode } = this.options;
|
|
6448
|
+
const text = `${pageNo + 1}`;
|
|
6366
6449
|
const width = this.draw.getWidth();
|
|
6367
6450
|
const height = pageMode === PageMode.CONTINUITY ? this.draw.getCanvasHeight(pageNo) : this.draw.getHeight();
|
|
6368
6451
|
const pageNumberBottom = this.draw.getPageNumberBottom();
|
|
6452
|
+
const y = height - pageNumberBottom;
|
|
6369
6453
|
ctx.save();
|
|
6370
|
-
ctx.fillStyle =
|
|
6371
|
-
ctx.font = `${
|
|
6372
|
-
|
|
6454
|
+
ctx.fillStyle = color;
|
|
6455
|
+
ctx.font = `${size * scale}px ${font}`;
|
|
6456
|
+
let x = 0;
|
|
6457
|
+
const margins = this.draw.getMargins();
|
|
6458
|
+
const { width: textWidth } = ctx.measureText(text);
|
|
6459
|
+
if (rowFlex === RowFlex.CENTER) {
|
|
6460
|
+
x = (width + textWidth) / 2;
|
|
6461
|
+
} else if (rowFlex === RowFlex.RIGHT) {
|
|
6462
|
+
x = width - textWidth - margins[1];
|
|
6463
|
+
} else {
|
|
6464
|
+
x = margins[3];
|
|
6465
|
+
}
|
|
6466
|
+
ctx.fillText(text, x, y);
|
|
6373
6467
|
ctx.restore();
|
|
6374
6468
|
}
|
|
6375
6469
|
}
|
|
@@ -6954,26 +7048,121 @@ class HyperlinkParticle {
|
|
|
6954
7048
|
ctx.restore();
|
|
6955
7049
|
}
|
|
6956
7050
|
}
|
|
7051
|
+
var HeaderMaxHeightRatio;
|
|
7052
|
+
(function(HeaderMaxHeightRatio2) {
|
|
7053
|
+
HeaderMaxHeightRatio2["HALF"] = "half";
|
|
7054
|
+
HeaderMaxHeightRatio2["ONE_THIRD"] = "one-third";
|
|
7055
|
+
HeaderMaxHeightRatio2["QUARTER"] = "quarter";
|
|
7056
|
+
})(HeaderMaxHeightRatio || (HeaderMaxHeightRatio = {}));
|
|
7057
|
+
const defaultHeaderOption = {
|
|
7058
|
+
top: 30,
|
|
7059
|
+
maxHeightRadio: HeaderMaxHeightRatio.HALF
|
|
7060
|
+
};
|
|
7061
|
+
const maxHeightRadioMapping = {
|
|
7062
|
+
[HeaderMaxHeightRatio.HALF]: 1 / 2,
|
|
7063
|
+
[HeaderMaxHeightRatio.ONE_THIRD]: 1 / 3,
|
|
7064
|
+
[HeaderMaxHeightRatio.QUARTER]: 1 / 4
|
|
7065
|
+
};
|
|
6957
7066
|
class Header {
|
|
6958
7067
|
constructor(draw) {
|
|
6959
7068
|
__publicField(this, "draw");
|
|
7069
|
+
__publicField(this, "position");
|
|
6960
7070
|
__publicField(this, "options");
|
|
7071
|
+
__publicField(this, "elementList");
|
|
7072
|
+
__publicField(this, "rowList");
|
|
7073
|
+
__publicField(this, "positionList");
|
|
6961
7074
|
this.draw = draw;
|
|
7075
|
+
this.position = draw.getPosition();
|
|
6962
7076
|
this.options = draw.getOptions();
|
|
7077
|
+
this.elementList = draw.getHeaderElementList();
|
|
7078
|
+
this.rowList = [];
|
|
7079
|
+
this.positionList = [];
|
|
6963
7080
|
}
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
-
|
|
6976
|
-
|
|
7081
|
+
setElementList(elementList) {
|
|
7082
|
+
this.elementList = elementList;
|
|
7083
|
+
}
|
|
7084
|
+
getElementList() {
|
|
7085
|
+
return this.elementList;
|
|
7086
|
+
}
|
|
7087
|
+
getPositionList() {
|
|
7088
|
+
return this.positionList;
|
|
7089
|
+
}
|
|
7090
|
+
compute() {
|
|
7091
|
+
this._recovery();
|
|
7092
|
+
this._computeRowList();
|
|
7093
|
+
this._computePositionList();
|
|
7094
|
+
}
|
|
7095
|
+
_recovery() {
|
|
7096
|
+
this.rowList = [];
|
|
7097
|
+
this.positionList = [];
|
|
7098
|
+
}
|
|
7099
|
+
_computeRowList() {
|
|
7100
|
+
const innerWidth = this.draw.getInnerWidth();
|
|
7101
|
+
this.rowList = this.draw.computeRowList(innerWidth, this.elementList);
|
|
7102
|
+
}
|
|
7103
|
+
_computePositionList() {
|
|
7104
|
+
const headerTop = this.getHeaderTop();
|
|
7105
|
+
const innerWidth = this.draw.getInnerWidth();
|
|
7106
|
+
const margins = this.draw.getMargins();
|
|
7107
|
+
const startX = margins[3];
|
|
7108
|
+
const startY = headerTop;
|
|
7109
|
+
this.position.computePageRowPosition({
|
|
7110
|
+
positionList: this.positionList,
|
|
7111
|
+
rowList: this.rowList,
|
|
7112
|
+
pageNo: 0,
|
|
7113
|
+
startIndex: 0,
|
|
7114
|
+
startX,
|
|
7115
|
+
startY,
|
|
7116
|
+
innerWidth
|
|
7117
|
+
});
|
|
7118
|
+
}
|
|
7119
|
+
getHeaderTop() {
|
|
7120
|
+
const { header: { top }, scale } = this.options;
|
|
7121
|
+
return Math.floor(top * scale);
|
|
7122
|
+
}
|
|
7123
|
+
getMaxHeight() {
|
|
7124
|
+
const { header: { maxHeightRadio } } = this.options;
|
|
7125
|
+
const height = this.draw.getHeight();
|
|
7126
|
+
return Math.floor(height * maxHeightRadioMapping[maxHeightRadio]);
|
|
7127
|
+
}
|
|
7128
|
+
getHeight() {
|
|
7129
|
+
const maxHeight = this.getMaxHeight();
|
|
7130
|
+
const rowHeight = this.getRowHeight();
|
|
7131
|
+
return rowHeight > maxHeight ? maxHeight : rowHeight;
|
|
7132
|
+
}
|
|
7133
|
+
getRowHeight() {
|
|
7134
|
+
return this.rowList.reduce((pre, cur) => pre + cur.height, 0);
|
|
7135
|
+
}
|
|
7136
|
+
getExtraHeight() {
|
|
7137
|
+
const margins = this.draw.getMargins();
|
|
7138
|
+
const headerHeight = this.getHeight();
|
|
7139
|
+
const headerTop = this.getHeaderTop();
|
|
7140
|
+
const extraHeight = headerTop + headerHeight - margins[0];
|
|
7141
|
+
return extraHeight <= 0 ? 0 : extraHeight;
|
|
7142
|
+
}
|
|
7143
|
+
render(ctx, pageNo) {
|
|
7144
|
+
ctx.globalAlpha = 1;
|
|
7145
|
+
const innerWidth = this.draw.getInnerWidth();
|
|
7146
|
+
const maxHeight = this.getMaxHeight();
|
|
7147
|
+
const rowList = [];
|
|
7148
|
+
let curRowHeight = 0;
|
|
7149
|
+
for (let r = 0; r < this.rowList.length; r++) {
|
|
7150
|
+
const row = this.rowList[r];
|
|
7151
|
+
if (curRowHeight + row.height > maxHeight) {
|
|
7152
|
+
break;
|
|
7153
|
+
}
|
|
7154
|
+
rowList.push(row);
|
|
7155
|
+
curRowHeight += row.height;
|
|
7156
|
+
}
|
|
7157
|
+
this.draw.drawRow(ctx, {
|
|
7158
|
+
elementList: this.elementList,
|
|
7159
|
+
positionList: this.positionList,
|
|
7160
|
+
rowList,
|
|
7161
|
+
pageNo,
|
|
7162
|
+
startIndex: 0,
|
|
7163
|
+
innerWidth,
|
|
7164
|
+
zone: EditorZone.HEADER
|
|
7165
|
+
});
|
|
6977
7166
|
}
|
|
6978
7167
|
}
|
|
6979
7168
|
class SuperscriptParticle {
|
|
@@ -7725,7 +7914,7 @@ class WorkerManager {
|
|
|
7725
7914
|
this.wordCountWorker.onerror = (evt) => {
|
|
7726
7915
|
reject(evt);
|
|
7727
7916
|
};
|
|
7728
|
-
const elementList = this.draw.
|
|
7917
|
+
const elementList = this.draw.getOriginalMainElementList();
|
|
7729
7918
|
this.wordCountWorker.postMessage(elementList);
|
|
7730
7919
|
});
|
|
7731
7920
|
}
|
|
@@ -8064,7 +8253,11 @@ const contextmenu$1 = {
|
|
|
8064
8253
|
deleteCol: "\u5220\u96641\u5217",
|
|
8065
8254
|
deleteTable: "\u5220\u9664\u6574\u4E2A\u8868\u683C",
|
|
8066
8255
|
mergeCell: "\u5408\u5E76\u5355\u5143\u683C",
|
|
8067
|
-
mergeCancelCell: "\u53D6\u6D88\u5408\u5E76"
|
|
8256
|
+
mergeCancelCell: "\u53D6\u6D88\u5408\u5E76",
|
|
8257
|
+
verticalAlign: "\u5782\u76F4\u5BF9\u9F50",
|
|
8258
|
+
verticalAlignTop: "\u9876\u7AEF\u5BF9\u9F50",
|
|
8259
|
+
verticalAlignMiddle: "\u5782\u76F4\u5C45\u4E2D",
|
|
8260
|
+
verticalAlignBottom: "\u5E95\u7AEF\u5BF9\u9F50"
|
|
8068
8261
|
}
|
|
8069
8262
|
};
|
|
8070
8263
|
const datePicker$1 = {
|
|
@@ -8814,7 +9007,11 @@ const contextmenu = {
|
|
|
8814
9007
|
deleteCol: "Delete 1 col",
|
|
8815
9008
|
deleteTable: "Delete table",
|
|
8816
9009
|
mergeCell: "Merge cell",
|
|
8817
|
-
mergeCancelCell: "Cancel merge cell"
|
|
9010
|
+
mergeCancelCell: "Cancel merge cell",
|
|
9011
|
+
verticalAlign: "Vertical align",
|
|
9012
|
+
verticalAlignTop: "Top",
|
|
9013
|
+
verticalAlignMiddle: "Middle",
|
|
9014
|
+
verticalAlignBottom: "Bottom"
|
|
8818
9015
|
}
|
|
8819
9016
|
};
|
|
8820
9017
|
const datePicker = {
|
|
@@ -8890,8 +9087,64 @@ class ImageObserver {
|
|
|
8890
9087
|
return Promise.allSettled(this.promiseList);
|
|
8891
9088
|
}
|
|
8892
9089
|
}
|
|
9090
|
+
class Zone {
|
|
9091
|
+
constructor(draw) {
|
|
9092
|
+
__publicField(this, "draw");
|
|
9093
|
+
__publicField(this, "container");
|
|
9094
|
+
__publicField(this, "currentZone");
|
|
9095
|
+
__publicField(this, "headerIndicatorContainer");
|
|
9096
|
+
this.draw = draw;
|
|
9097
|
+
this.container = draw.getContainer();
|
|
9098
|
+
this.currentZone = EditorZone.MAIN;
|
|
9099
|
+
this.headerIndicatorContainer = null;
|
|
9100
|
+
}
|
|
9101
|
+
isHeaderActive() {
|
|
9102
|
+
return this.getZone() === EditorZone.HEADER;
|
|
9103
|
+
}
|
|
9104
|
+
isMainActive() {
|
|
9105
|
+
return this.getZone() === EditorZone.MAIN;
|
|
9106
|
+
}
|
|
9107
|
+
getZone() {
|
|
9108
|
+
return this.currentZone;
|
|
9109
|
+
}
|
|
9110
|
+
setZone(payload) {
|
|
9111
|
+
if (this.currentZone === payload)
|
|
9112
|
+
return;
|
|
9113
|
+
this.currentZone = payload;
|
|
9114
|
+
this.draw.getRange().clearRange();
|
|
9115
|
+
this.draw.render({
|
|
9116
|
+
isSubmitHistory: false,
|
|
9117
|
+
isSetCursor: false,
|
|
9118
|
+
isCompute: false
|
|
9119
|
+
});
|
|
9120
|
+
if (this.isHeaderActive()) {
|
|
9121
|
+
this._drawHeaderZoneIndicator();
|
|
9122
|
+
} else {
|
|
9123
|
+
this._clearHeaderZoneIndicator();
|
|
9124
|
+
}
|
|
9125
|
+
}
|
|
9126
|
+
_drawHeaderZoneIndicator() {
|
|
9127
|
+
this.headerIndicatorContainer = document.createElement("div");
|
|
9128
|
+
this.headerIndicatorContainer.classList.add(`${EDITOR_PREFIX}-header-indicator`);
|
|
9129
|
+
const pageList = this.draw.getPageList();
|
|
9130
|
+
const pageHeight = this.draw.getHeight();
|
|
9131
|
+
const pageGap = this.draw.getPageGap();
|
|
9132
|
+
const preY = pageHeight + pageGap;
|
|
9133
|
+
for (let p = 0; p < pageList.length; p++) {
|
|
9134
|
+
const indicator = document.createElement("div");
|
|
9135
|
+
indicator.innerText = `\u7F16\u8F91\u9875\u7709`;
|
|
9136
|
+
indicator.style.top = `${preY * p}px`;
|
|
9137
|
+
this.headerIndicatorContainer.append(indicator);
|
|
9138
|
+
}
|
|
9139
|
+
this.container.append(this.headerIndicatorContainer);
|
|
9140
|
+
}
|
|
9141
|
+
_clearHeaderZoneIndicator() {
|
|
9142
|
+
var _a;
|
|
9143
|
+
(_a = this.headerIndicatorContainer) == null ? void 0 : _a.remove();
|
|
9144
|
+
}
|
|
9145
|
+
}
|
|
8893
9146
|
class Draw {
|
|
8894
|
-
constructor(rootContainer, options,
|
|
9147
|
+
constructor(rootContainer, options, data2, listener) {
|
|
8895
9148
|
__publicField(this, "container");
|
|
8896
9149
|
__publicField(this, "pageContainer");
|
|
8897
9150
|
__publicField(this, "pageList");
|
|
@@ -8900,7 +9153,10 @@ class Draw {
|
|
|
8900
9153
|
__publicField(this, "mode");
|
|
8901
9154
|
__publicField(this, "options");
|
|
8902
9155
|
__publicField(this, "position");
|
|
9156
|
+
__publicField(this, "zone");
|
|
9157
|
+
__publicField(this, "headerElementList");
|
|
8903
9158
|
__publicField(this, "elementList");
|
|
9159
|
+
__publicField(this, "footerElementList");
|
|
8904
9160
|
__publicField(this, "listener");
|
|
8905
9161
|
__publicField(this, "i18n");
|
|
8906
9162
|
__publicField(this, "canvasEvent");
|
|
@@ -8949,7 +9205,9 @@ class Draw {
|
|
|
8949
9205
|
this.pageNo = 0;
|
|
8950
9206
|
this.mode = options.mode;
|
|
8951
9207
|
this.options = options;
|
|
8952
|
-
this.
|
|
9208
|
+
this.headerElementList = data2.header || [];
|
|
9209
|
+
this.elementList = data2.main;
|
|
9210
|
+
this.footerElementList = data2.footer || [];
|
|
8953
9211
|
this.listener = listener;
|
|
8954
9212
|
this._formatContainer();
|
|
8955
9213
|
this.pageContainer = this._createPageContainer();
|
|
@@ -8957,6 +9215,7 @@ class Draw {
|
|
|
8957
9215
|
this.i18n = new I18n();
|
|
8958
9216
|
this.historyManager = new HistoryManager();
|
|
8959
9217
|
this.position = new Position(this);
|
|
9218
|
+
this.zone = new Zone(this);
|
|
8960
9219
|
this.range = new RangeManager(this);
|
|
8961
9220
|
this.margin = new Margin(this);
|
|
8962
9221
|
this.background = new Background(this);
|
|
@@ -9023,6 +9282,12 @@ class Draw {
|
|
|
9023
9282
|
getHeight() {
|
|
9024
9283
|
return Math.floor(this.getOriginalHeight() * this.options.scale);
|
|
9025
9284
|
}
|
|
9285
|
+
getMainHeight() {
|
|
9286
|
+
const pageHeight = this.getHeight();
|
|
9287
|
+
const margins = this.getMargins();
|
|
9288
|
+
const extraHeight = this.header.getExtraHeight();
|
|
9289
|
+
return pageHeight - margins[0] - margins[2] - extraHeight;
|
|
9290
|
+
}
|
|
9026
9291
|
getCanvasWidth(pageNo = -1) {
|
|
9027
9292
|
const page = this.getPage(pageNo);
|
|
9028
9293
|
return page.width;
|
|
@@ -9052,7 +9317,8 @@ class Draw {
|
|
|
9052
9317
|
return this.options.pageGap * this.options.scale;
|
|
9053
9318
|
}
|
|
9054
9319
|
getPageNumberBottom() {
|
|
9055
|
-
|
|
9320
|
+
const { pageNumber: { bottom }, scale } = this.options;
|
|
9321
|
+
return bottom * scale;
|
|
9056
9322
|
}
|
|
9057
9323
|
getHeaderTop() {
|
|
9058
9324
|
return this.options.headerTop * this.options.scale;
|
|
@@ -9123,17 +9389,39 @@ class Draw {
|
|
|
9123
9389
|
getPosition() {
|
|
9124
9390
|
return this.position;
|
|
9125
9391
|
}
|
|
9392
|
+
getZone() {
|
|
9393
|
+
return this.zone;
|
|
9394
|
+
}
|
|
9126
9395
|
getRange() {
|
|
9127
9396
|
return this.range;
|
|
9128
9397
|
}
|
|
9398
|
+
getHeaderElementList() {
|
|
9399
|
+
return this.headerElementList;
|
|
9400
|
+
}
|
|
9401
|
+
getTableElementList(sourceElementList) {
|
|
9402
|
+
const positionContext = this.position.getPositionContext();
|
|
9403
|
+
const { index: index2, trIndex, tdIndex } = positionContext;
|
|
9404
|
+
return sourceElementList[index2].trList[trIndex].tdList[tdIndex].value;
|
|
9405
|
+
}
|
|
9129
9406
|
getElementList() {
|
|
9130
9407
|
const positionContext = this.position.getPositionContext();
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
|
|
9408
|
+
const elementList = this.getOriginalElementList();
|
|
9409
|
+
return positionContext.isTable ? this.getTableElementList(elementList) : elementList;
|
|
9410
|
+
}
|
|
9411
|
+
getMainElementList() {
|
|
9412
|
+
const positionContext = this.position.getPositionContext();
|
|
9413
|
+
return positionContext.isTable ? this.getTableElementList(this.elementList) : this.elementList;
|
|
9414
|
+
}
|
|
9415
|
+
getOriginalElementList() {
|
|
9416
|
+
const zoneManager = this.getZone();
|
|
9417
|
+
return zoneManager.isHeaderActive() ? this.header.getElementList() : this.elementList;
|
|
9418
|
+
}
|
|
9419
|
+
getOriginalMainElementList() {
|
|
9135
9420
|
return this.elementList;
|
|
9136
9421
|
}
|
|
9422
|
+
getFooterElementList() {
|
|
9423
|
+
return this.footerElementList;
|
|
9424
|
+
}
|
|
9137
9425
|
insertElementList(payload) {
|
|
9138
9426
|
if (!payload.length)
|
|
9139
9427
|
return;
|
|
@@ -9177,9 +9465,6 @@ class Draw {
|
|
|
9177
9465
|
});
|
|
9178
9466
|
}
|
|
9179
9467
|
}
|
|
9180
|
-
getOriginalElementList() {
|
|
9181
|
-
return this.elementList;
|
|
9182
|
-
}
|
|
9183
9468
|
getCanvasEvent() {
|
|
9184
9469
|
return this.canvasEvent;
|
|
9185
9470
|
}
|
|
@@ -9198,6 +9483,9 @@ class Draw {
|
|
|
9198
9483
|
getTableTool() {
|
|
9199
9484
|
return this.tableTool;
|
|
9200
9485
|
}
|
|
9486
|
+
getHeader() {
|
|
9487
|
+
return this.header;
|
|
9488
|
+
}
|
|
9201
9489
|
getHyperlinkParticle() {
|
|
9202
9490
|
return this.hyperlinkParticle;
|
|
9203
9491
|
}
|
|
@@ -9352,14 +9640,16 @@ class Draw {
|
|
|
9352
9640
|
});
|
|
9353
9641
|
}
|
|
9354
9642
|
getValue() {
|
|
9355
|
-
const { width, height, margins, watermark
|
|
9356
|
-
const data2 =
|
|
9643
|
+
const { width, height, margins, watermark } = this.options;
|
|
9644
|
+
const data2 = {
|
|
9645
|
+
header: zipElementList(this.headerElementList),
|
|
9646
|
+
main: zipElementList(this.elementList)
|
|
9647
|
+
};
|
|
9357
9648
|
return {
|
|
9358
9649
|
version,
|
|
9359
9650
|
width,
|
|
9360
9651
|
height,
|
|
9361
9652
|
margins,
|
|
9362
|
-
header: header.data ? header : void 0,
|
|
9363
9653
|
watermark: watermark.data ? watermark : void 0,
|
|
9364
9654
|
data: data2
|
|
9365
9655
|
};
|
|
@@ -9413,7 +9703,7 @@ class Draw {
|
|
|
9413
9703
|
const size = el.actualSize || el.size || defaultSize;
|
|
9414
9704
|
return `${el.italic ? "italic " : ""}${el.bold ? "bold " : ""}${size * scale}px ${font}`;
|
|
9415
9705
|
}
|
|
9416
|
-
|
|
9706
|
+
computeRowList(innerWidth, elementList) {
|
|
9417
9707
|
var _a, _b, _c, _d;
|
|
9418
9708
|
const { defaultSize, defaultRowMargin, scale, tdPadding, defaultTabWidth } = this.options;
|
|
9419
9709
|
const defaultBasicRowMarginHeight = this.getDefaultBasicRowMarginHeight();
|
|
@@ -9463,20 +9753,21 @@ class Draw {
|
|
|
9463
9753
|
const trList = element.trList;
|
|
9464
9754
|
for (let t = 0; t < trList.length; t++) {
|
|
9465
9755
|
const tr = trList[t];
|
|
9466
|
-
let maxTrHeight = 0;
|
|
9467
9756
|
for (let d = 0; d < tr.tdList.length; d++) {
|
|
9468
9757
|
const td = tr.tdList[d];
|
|
9469
|
-
const rowList2 = this.
|
|
9758
|
+
const rowList2 = this.computeRowList((td.width - tdGap) * scale, td.value);
|
|
9470
9759
|
const rowHeight = rowList2.reduce((pre, cur) => pre + cur.height, 0);
|
|
9471
9760
|
td.rowList = rowList2;
|
|
9472
|
-
const
|
|
9473
|
-
if (
|
|
9474
|
-
|
|
9761
|
+
const curTdHeight = (rowHeight + tdGap) / scale;
|
|
9762
|
+
if (td.height < curTdHeight) {
|
|
9763
|
+
const extraHeight = curTdHeight - td.height;
|
|
9764
|
+
const changeTr = trList[t + td.rowspan - 1];
|
|
9765
|
+
changeTr.height += extraHeight;
|
|
9766
|
+
changeTr.tdList.forEach((changeTd) => {
|
|
9767
|
+
changeTd.height += extraHeight;
|
|
9768
|
+
});
|
|
9475
9769
|
}
|
|
9476
9770
|
}
|
|
9477
|
-
if (maxTrHeight > tr.height) {
|
|
9478
|
-
tr.height = maxTrHeight;
|
|
9479
|
-
}
|
|
9480
9771
|
}
|
|
9481
9772
|
this.tableParticle.computeRowColInfo(element);
|
|
9482
9773
|
const tableHeight = trList.reduce((pre, cur) => pre + cur.height, 0);
|
|
@@ -9491,7 +9782,8 @@ class Draw {
|
|
|
9491
9782
|
metrics.boundingBoxAscent = 0;
|
|
9492
9783
|
const margins = this.getMargins();
|
|
9493
9784
|
const height2 = this.getHeight();
|
|
9494
|
-
const
|
|
9785
|
+
const headerExtraHeight = this.header.getExtraHeight();
|
|
9786
|
+
const marginHeight = margins[0] + margins[2] + headerExtraHeight;
|
|
9495
9787
|
let curPagePreHeight = marginHeight;
|
|
9496
9788
|
for (let r = 0; r < rowList.length; r++) {
|
|
9497
9789
|
const row = rowList[r];
|
|
@@ -9501,7 +9793,7 @@ class Draw {
|
|
|
9501
9793
|
curPagePreHeight += row.height;
|
|
9502
9794
|
}
|
|
9503
9795
|
}
|
|
9504
|
-
const rowMarginHeight = rowMargin * 2;
|
|
9796
|
+
const rowMarginHeight = rowMargin * 2 * scale;
|
|
9505
9797
|
if (curPagePreHeight + rowMarginHeight + elementHeight > height2) {
|
|
9506
9798
|
const trList2 = element.trList;
|
|
9507
9799
|
let deleteStart = 0;
|
|
@@ -9510,7 +9802,8 @@ class Draw {
|
|
|
9510
9802
|
if (trList2.length > 1) {
|
|
9511
9803
|
for (let r = 0; r < trList2.length; r++) {
|
|
9512
9804
|
const tr = trList2[r];
|
|
9513
|
-
|
|
9805
|
+
const trHeight = tr.height * scale;
|
|
9806
|
+
if (curPagePreHeight + rowMarginHeight + preTrHeight + trHeight > height2) {
|
|
9514
9807
|
if (((_c = element.colgroup) == null ? void 0 : _c.length) !== tr.tdList.length) {
|
|
9515
9808
|
deleteCount = 0;
|
|
9516
9809
|
}
|
|
@@ -9518,7 +9811,7 @@ class Draw {
|
|
|
9518
9811
|
} else {
|
|
9519
9812
|
deleteStart = r + 1;
|
|
9520
9813
|
deleteCount = trList2.length - deleteStart;
|
|
9521
|
-
preTrHeight +=
|
|
9814
|
+
preTrHeight += trHeight;
|
|
9522
9815
|
}
|
|
9523
9816
|
}
|
|
9524
9817
|
}
|
|
@@ -9543,13 +9836,13 @@ class Draw {
|
|
|
9543
9836
|
} else if (element.type === ElementType.SEPARATOR) {
|
|
9544
9837
|
element.width = innerWidth;
|
|
9545
9838
|
metrics.width = innerWidth;
|
|
9546
|
-
metrics.height =
|
|
9839
|
+
metrics.height = defaultSize;
|
|
9547
9840
|
metrics.boundingBoxAscent = -rowMargin;
|
|
9548
9841
|
metrics.boundingBoxDescent = -rowMargin;
|
|
9549
9842
|
} else if (element.type === ElementType.PAGE_BREAK) {
|
|
9550
9843
|
element.width = innerWidth;
|
|
9551
9844
|
metrics.width = innerWidth;
|
|
9552
|
-
metrics.height =
|
|
9845
|
+
metrics.height = defaultSize;
|
|
9553
9846
|
} else if (element.type === ElementType.CHECKBOX || element.controlComponent === ControlComponent.CHECKBOX) {
|
|
9554
9847
|
const { width, height: height2, gap } = this.options.checkbox;
|
|
9555
9848
|
const elementWidth = (width + gap * 2) * scale;
|
|
@@ -9573,7 +9866,7 @@ class Draw {
|
|
|
9573
9866
|
metrics.boundingBoxDescent = metrics.height;
|
|
9574
9867
|
metrics.boundingBoxAscent = 0;
|
|
9575
9868
|
} else {
|
|
9576
|
-
const size = element.size ||
|
|
9869
|
+
const size = element.size || defaultSize;
|
|
9577
9870
|
if (element.type === ElementType.SUPERSCRIPT || element.type === ElementType.SUBSCRIPT) {
|
|
9578
9871
|
element.actualSize = Math.ceil(size * 0.6);
|
|
9579
9872
|
}
|
|
@@ -9639,7 +9932,8 @@ class Draw {
|
|
|
9639
9932
|
const { pageMode } = this.options;
|
|
9640
9933
|
const height = this.getHeight();
|
|
9641
9934
|
const margins = this.getMargins();
|
|
9642
|
-
const
|
|
9935
|
+
const headerExtraHeight = this.header.getExtraHeight();
|
|
9936
|
+
const marginHeight = margins[0] + margins[2] + headerExtraHeight;
|
|
9643
9937
|
let pageHeight = marginHeight;
|
|
9644
9938
|
let pageNo = 0;
|
|
9645
9939
|
if (pageMode === PageMode.CONTINUITY) {
|
|
@@ -9678,8 +9972,8 @@ class Draw {
|
|
|
9678
9972
|
this.highlight.render(ctx);
|
|
9679
9973
|
this.textParticle.complete();
|
|
9680
9974
|
}
|
|
9681
|
-
|
|
9682
|
-
const { rowList, pageNo, positionList, startIndex } = payload;
|
|
9975
|
+
drawRow(ctx, payload) {
|
|
9976
|
+
const { rowList, pageNo, elementList, positionList, startIndex, zone } = payload;
|
|
9683
9977
|
const { scale, tdPadding } = this.options;
|
|
9684
9978
|
const { isCrossRowCol, tableId } = this.range.getRange();
|
|
9685
9979
|
let index2 = startIndex;
|
|
@@ -9760,10 +10054,10 @@ class Draw {
|
|
|
9760
10054
|
} else if (preElement == null ? void 0 : preElement.highlight) {
|
|
9761
10055
|
this.highlight.render(ctx);
|
|
9762
10056
|
}
|
|
9763
|
-
const { startIndex: startIndex2, endIndex } = this.range.getRange();
|
|
9764
|
-
if (startIndex2 !== endIndex && startIndex2 <= index2 && index2 <= endIndex) {
|
|
10057
|
+
const { zone: currentZone, startIndex: startIndex2, endIndex } = this.range.getRange();
|
|
10058
|
+
if (currentZone === zone && startIndex2 !== endIndex && startIndex2 <= index2 && index2 <= endIndex) {
|
|
9765
10059
|
if (startIndex2 === index2) {
|
|
9766
|
-
const nextElement =
|
|
10060
|
+
const nextElement = elementList[startIndex2 + 1];
|
|
9767
10061
|
if (nextElement && nextElement.value === ZERO) {
|
|
9768
10062
|
rangeRecord.x = x + metrics.width;
|
|
9769
10063
|
rangeRecord.y = y;
|
|
@@ -9793,12 +10087,14 @@ class Draw {
|
|
|
9793
10087
|
const tr = element.trList[t];
|
|
9794
10088
|
for (let d = 0; d < tr.tdList.length; d++) {
|
|
9795
10089
|
const td = tr.tdList[d];
|
|
9796
|
-
this.
|
|
10090
|
+
this.drawRow(ctx, {
|
|
10091
|
+
elementList: td.value,
|
|
9797
10092
|
positionList: td.positionList,
|
|
9798
10093
|
rowList: td.rowList,
|
|
9799
10094
|
pageNo,
|
|
9800
10095
|
startIndex: 0,
|
|
9801
|
-
innerWidth: (td.width - tdGap) * scale
|
|
10096
|
+
innerWidth: (td.width - tdGap) * scale,
|
|
10097
|
+
zone
|
|
9802
10098
|
});
|
|
9803
10099
|
}
|
|
9804
10100
|
}
|
|
@@ -9821,22 +10117,26 @@ class Draw {
|
|
|
9821
10117
|
ctx.clearRect(0, 0, pageDom.width, pageDom.height);
|
|
9822
10118
|
this.blockParticle.clear();
|
|
9823
10119
|
}
|
|
9824
|
-
_drawPage(
|
|
9825
|
-
const {
|
|
10120
|
+
_drawPage(payload) {
|
|
10121
|
+
const { elementList, positionList, rowList, pageNo } = payload;
|
|
10122
|
+
const { inactiveAlpha, pageMode } = this.options;
|
|
9826
10123
|
const innerWidth = this.getInnerWidth();
|
|
9827
10124
|
const ctx = this.ctxList[pageNo];
|
|
10125
|
+
ctx.globalAlpha = this.zone.isHeaderActive() ? inactiveAlpha : 1;
|
|
9828
10126
|
this._clearPage(pageNo);
|
|
9829
10127
|
this.background.render(ctx);
|
|
9830
10128
|
this.margin.render(ctx, pageNo);
|
|
9831
10129
|
const index2 = rowList[0].startIndex;
|
|
9832
|
-
this.
|
|
10130
|
+
this.drawRow(ctx, {
|
|
10131
|
+
elementList,
|
|
9833
10132
|
positionList,
|
|
9834
10133
|
rowList,
|
|
9835
10134
|
pageNo,
|
|
9836
10135
|
startIndex: index2,
|
|
9837
|
-
innerWidth
|
|
10136
|
+
innerWidth,
|
|
10137
|
+
zone: EditorZone.MAIN
|
|
9838
10138
|
});
|
|
9839
|
-
this.header.render(ctx);
|
|
10139
|
+
this.header.render(ctx, pageNo);
|
|
9840
10140
|
this.pageNumber.render(ctx, pageNo);
|
|
9841
10141
|
if (this.search.getSearchKeyword()) {
|
|
9842
10142
|
this.search.render(ctx, pageNo);
|
|
@@ -9847,13 +10147,20 @@ class Draw {
|
|
|
9847
10147
|
}
|
|
9848
10148
|
_lazyRender() {
|
|
9849
10149
|
var _a;
|
|
9850
|
-
const positionList = this.position.
|
|
10150
|
+
const positionList = this.position.getOriginalMainPositionList();
|
|
10151
|
+
const elementList = this.getOriginalMainElementList();
|
|
9851
10152
|
(_a = this.lazyRenderIntersectionObserver) == null ? void 0 : _a.disconnect();
|
|
9852
10153
|
this.lazyRenderIntersectionObserver = new IntersectionObserver((entries) => {
|
|
9853
10154
|
entries.forEach((entry) => {
|
|
9854
10155
|
if (entry.isIntersecting) {
|
|
9855
10156
|
const index2 = Number(entry.target.dataset.index);
|
|
9856
|
-
this.
|
|
10157
|
+
this.header.render(this.ctxList[index2], index2);
|
|
10158
|
+
this._drawPage({
|
|
10159
|
+
elementList,
|
|
10160
|
+
positionList,
|
|
10161
|
+
rowList: this.pageRowList[index2],
|
|
10162
|
+
pageNo: index2
|
|
10163
|
+
});
|
|
9857
10164
|
}
|
|
9858
10165
|
});
|
|
9859
10166
|
});
|
|
@@ -9862,9 +10169,15 @@ class Draw {
|
|
|
9862
10169
|
});
|
|
9863
10170
|
}
|
|
9864
10171
|
_immediateRender() {
|
|
9865
|
-
const positionList = this.position.
|
|
10172
|
+
const positionList = this.position.getOriginalMainPositionList();
|
|
10173
|
+
const elementList = this.getOriginalMainElementList();
|
|
9866
10174
|
for (let i = 0; i < this.pageRowList.length; i++) {
|
|
9867
|
-
this._drawPage(
|
|
10175
|
+
this._drawPage({
|
|
10176
|
+
elementList,
|
|
10177
|
+
positionList,
|
|
10178
|
+
rowList: this.pageRowList[i],
|
|
10179
|
+
pageNo: i
|
|
10180
|
+
});
|
|
9868
10181
|
}
|
|
9869
10182
|
}
|
|
9870
10183
|
render(payload) {
|
|
@@ -9874,7 +10187,8 @@ class Draw {
|
|
|
9874
10187
|
let { curIndex } = payload || {};
|
|
9875
10188
|
const innerWidth = this.getInnerWidth();
|
|
9876
10189
|
if (isCompute) {
|
|
9877
|
-
this.
|
|
10190
|
+
this.header.compute();
|
|
10191
|
+
this.rowList = this.computeRowList(innerWidth, this.elementList);
|
|
9878
10192
|
this.pageRowList = this._computePageList();
|
|
9879
10193
|
this.position.computePositionList();
|
|
9880
10194
|
const searchKeyword = this.search.getSearchKeyword();
|
|
@@ -9884,7 +10198,6 @@ class Draw {
|
|
|
9884
10198
|
}
|
|
9885
10199
|
this.imageObserver.clearAll();
|
|
9886
10200
|
this.cursor.recoveryCursor();
|
|
9887
|
-
const positionList = this.position.getOriginalPositionList();
|
|
9888
10201
|
for (let i = 0; i < this.pageRowList.length; i++) {
|
|
9889
10202
|
if (!this.pageList[i]) {
|
|
9890
10203
|
this._createPage(i);
|
|
@@ -9903,32 +10216,35 @@ class Draw {
|
|
|
9903
10216
|
this._immediateRender();
|
|
9904
10217
|
}
|
|
9905
10218
|
if (isSetCursor) {
|
|
10219
|
+
const positionList = this.position.getPositionList();
|
|
9906
10220
|
const positionContext = this.position.getPositionContext();
|
|
9907
10221
|
if (positionContext.isTable) {
|
|
9908
10222
|
const { index: index2, trIndex, tdIndex } = positionContext;
|
|
9909
|
-
const
|
|
10223
|
+
const elementList = this.getOriginalElementList();
|
|
10224
|
+
const tablePositionList = (_a = elementList[index2].trList) == null ? void 0 : _a[trIndex].tdList[tdIndex].positionList;
|
|
9910
10225
|
if (curIndex === void 0 && tablePositionList) {
|
|
9911
10226
|
curIndex = tablePositionList.length - 1;
|
|
9912
10227
|
}
|
|
9913
10228
|
const tablePosition = tablePositionList == null ? void 0 : tablePositionList[curIndex];
|
|
9914
10229
|
this.position.setCursorPosition(tablePosition || null);
|
|
9915
10230
|
} else {
|
|
9916
|
-
|
|
9917
|
-
curIndex = positionList.length - 1;
|
|
9918
|
-
}
|
|
9919
|
-
this.position.setCursorPosition(positionList[curIndex] || null);
|
|
10231
|
+
this.position.setCursorPosition(curIndex !== void 0 ? positionList[curIndex] : null);
|
|
9920
10232
|
}
|
|
9921
10233
|
this.cursor.drawCursor();
|
|
9922
10234
|
}
|
|
9923
10235
|
if (isSubmitHistory) {
|
|
9924
10236
|
const self = this;
|
|
9925
10237
|
const oldElementList = deepClone(this.elementList);
|
|
10238
|
+
const oldHeaderElementList = deepClone(this.header.getElementList());
|
|
9926
10239
|
const { startIndex, endIndex } = this.range.getRange();
|
|
9927
10240
|
const pageNo = this.pageNo;
|
|
9928
10241
|
const oldPositionContext = deepClone(this.position.getPositionContext());
|
|
10242
|
+
const zone = this.zone.getZone();
|
|
9929
10243
|
this.historyManager.execute(function() {
|
|
10244
|
+
self.zone.setZone(zone);
|
|
9930
10245
|
self.setPageNo(pageNo);
|
|
9931
10246
|
self.position.setPositionContext(oldPositionContext);
|
|
10247
|
+
self.header.setElementList(oldHeaderElementList);
|
|
9932
10248
|
self.elementList = deepClone(oldElementList);
|
|
9933
10249
|
self.range.setRange(startIndex, endIndex);
|
|
9934
10250
|
self.render({ curIndex, isSubmitHistory: false });
|
|
@@ -9965,6 +10281,7 @@ const _Command = class {
|
|
|
9965
10281
|
_Command.applyPainterStyle = adapt.applyPainterStyle.bind(adapt);
|
|
9966
10282
|
_Command.format = adapt.format.bind(adapt);
|
|
9967
10283
|
_Command.font = adapt.font.bind(adapt);
|
|
10284
|
+
_Command.size = adapt.size.bind(adapt);
|
|
9968
10285
|
_Command.sizeAdd = adapt.sizeAdd.bind(adapt);
|
|
9969
10286
|
_Command.sizeMinus = adapt.sizeMinus.bind(adapt);
|
|
9970
10287
|
_Command.bold = adapt.bold.bind(adapt);
|
|
@@ -9990,6 +10307,7 @@ const _Command = class {
|
|
|
9990
10307
|
_Command.deleteTable = adapt.deleteTable.bind(adapt);
|
|
9991
10308
|
_Command.mergeTableCell = adapt.mergeTableCell.bind(adapt);
|
|
9992
10309
|
_Command.cancelMergeTableCell = adapt.cancelMergeTableCell.bind(adapt);
|
|
10310
|
+
_Command.tableTdVerticalAlign = adapt.tableTdVerticalAlign.bind(adapt);
|
|
9993
10311
|
_Command.image = adapt.image.bind(adapt);
|
|
9994
10312
|
_Command.hyperlink = adapt.hyperlink.bind(adapt);
|
|
9995
10313
|
_Command.deleteHyperlink = adapt.deleteHyperlink.bind(adapt);
|
|
@@ -10063,6 +10381,9 @@ const _Command = class {
|
|
|
10063
10381
|
executeFont(payload) {
|
|
10064
10382
|
return _Command.font(payload);
|
|
10065
10383
|
}
|
|
10384
|
+
executeSize(payload) {
|
|
10385
|
+
return _Command.size(payload);
|
|
10386
|
+
}
|
|
10066
10387
|
executeSizeAdd() {
|
|
10067
10388
|
return _Command.sizeAdd();
|
|
10068
10389
|
}
|
|
@@ -10138,6 +10459,9 @@ const _Command = class {
|
|
|
10138
10459
|
executeCancelMergeTableCell() {
|
|
10139
10460
|
return _Command.cancelMergeTableCell();
|
|
10140
10461
|
}
|
|
10462
|
+
executeTableTdVerticalAlign(payload) {
|
|
10463
|
+
return _Command.tableTdVerticalAlign(payload);
|
|
10464
|
+
}
|
|
10141
10465
|
executeHyperlink(payload) {
|
|
10142
10466
|
return _Command.hyperlink(payload);
|
|
10143
10467
|
}
|
|
@@ -10252,6 +10576,7 @@ __publicField(Command, "painter");
|
|
|
10252
10576
|
__publicField(Command, "applyPainterStyle");
|
|
10253
10577
|
__publicField(Command, "format");
|
|
10254
10578
|
__publicField(Command, "font");
|
|
10579
|
+
__publicField(Command, "size");
|
|
10255
10580
|
__publicField(Command, "sizeAdd");
|
|
10256
10581
|
__publicField(Command, "sizeMinus");
|
|
10257
10582
|
__publicField(Command, "bold");
|
|
@@ -10277,6 +10602,7 @@ __publicField(Command, "deleteTableCol");
|
|
|
10277
10602
|
__publicField(Command, "deleteTable");
|
|
10278
10603
|
__publicField(Command, "mergeTableCell");
|
|
10279
10604
|
__publicField(Command, "cancelMergeTableCell");
|
|
10605
|
+
__publicField(Command, "tableTdVerticalAlign");
|
|
10280
10606
|
__publicField(Command, "image");
|
|
10281
10607
|
__publicField(Command, "hyperlink");
|
|
10282
10608
|
__publicField(Command, "deleteHyperlink");
|
|
@@ -10317,6 +10643,12 @@ const defaultWatermarkOption = {
|
|
|
10317
10643
|
size: 200,
|
|
10318
10644
|
font: "Yahei"
|
|
10319
10645
|
};
|
|
10646
|
+
var VerticalAlign;
|
|
10647
|
+
(function(VerticalAlign2) {
|
|
10648
|
+
VerticalAlign2["TOP"] = "top";
|
|
10649
|
+
VerticalAlign2["MIDDLE"] = "middle";
|
|
10650
|
+
VerticalAlign2["BOTTOM"] = "bottom";
|
|
10651
|
+
})(VerticalAlign || (VerticalAlign = {}));
|
|
10320
10652
|
function printImageBase64(base64List, width, height) {
|
|
10321
10653
|
const iframe = document.createElement("iframe");
|
|
10322
10654
|
iframe.style.visibility = "hidden";
|
|
@@ -10503,47 +10835,78 @@ class CommandAdapt {
|
|
|
10503
10835
|
});
|
|
10504
10836
|
this.draw.render({ isSetCursor: false });
|
|
10505
10837
|
}
|
|
10506
|
-
|
|
10838
|
+
size(payload) {
|
|
10839
|
+
const { minSize, maxSize, defaultSize } = this.options;
|
|
10840
|
+
if (payload < minSize || payload > maxSize)
|
|
10841
|
+
return;
|
|
10507
10842
|
const isReadonly = this.draw.isReadonly();
|
|
10508
10843
|
if (isReadonly)
|
|
10509
10844
|
return;
|
|
10510
|
-
const selection = this.range.
|
|
10511
|
-
if (!selection)
|
|
10845
|
+
const selection = this.range.getTextLikeSelection();
|
|
10846
|
+
if (!selection || !selection.length)
|
|
10847
|
+
return;
|
|
10848
|
+
let isExistUpdate = false;
|
|
10849
|
+
selection.forEach((el) => {
|
|
10850
|
+
if (!el.size && payload === defaultSize || el.size && el.size === payload)
|
|
10851
|
+
return;
|
|
10852
|
+
el.size = payload;
|
|
10853
|
+
isExistUpdate = true;
|
|
10854
|
+
});
|
|
10855
|
+
if (isExistUpdate) {
|
|
10856
|
+
this.draw.render({ isSetCursor: false });
|
|
10857
|
+
}
|
|
10858
|
+
}
|
|
10859
|
+
sizeAdd() {
|
|
10860
|
+
const isReadonly = this.draw.isReadonly();
|
|
10861
|
+
if (isReadonly)
|
|
10512
10862
|
return;
|
|
10513
|
-
const
|
|
10514
|
-
|
|
10515
|
-
if (!~lessThanMaxSizeIndex)
|
|
10863
|
+
const selection = this.range.getTextLikeSelection();
|
|
10864
|
+
if (!selection || !selection.length)
|
|
10516
10865
|
return;
|
|
10866
|
+
const { defaultSize, maxSize } = this.options;
|
|
10867
|
+
let isExistUpdate = false;
|
|
10517
10868
|
selection.forEach((el) => {
|
|
10518
10869
|
if (!el.size) {
|
|
10519
10870
|
el.size = defaultSize;
|
|
10520
10871
|
}
|
|
10521
|
-
if (el.size
|
|
10872
|
+
if (el.size >= maxSize)
|
|
10522
10873
|
return;
|
|
10523
|
-
el.size
|
|
10874
|
+
if (el.size + 2 > maxSize) {
|
|
10875
|
+
el.size = maxSize;
|
|
10876
|
+
} else {
|
|
10877
|
+
el.size += 2;
|
|
10878
|
+
}
|
|
10879
|
+
isExistUpdate = true;
|
|
10524
10880
|
});
|
|
10525
|
-
|
|
10881
|
+
if (isExistUpdate) {
|
|
10882
|
+
this.draw.render({ isSetCursor: false });
|
|
10883
|
+
}
|
|
10526
10884
|
}
|
|
10527
10885
|
sizeMinus() {
|
|
10528
10886
|
const isReadonly = this.draw.isReadonly();
|
|
10529
10887
|
if (isReadonly)
|
|
10530
10888
|
return;
|
|
10531
|
-
const selection = this.range.
|
|
10532
|
-
if (!selection)
|
|
10533
|
-
return;
|
|
10534
|
-
const greaterThanMaxSizeIndex = selection.findIndex((s) => !s.size || s.size - 2 >= 8);
|
|
10535
|
-
if (!~greaterThanMaxSizeIndex)
|
|
10889
|
+
const selection = this.range.getTextLikeSelection();
|
|
10890
|
+
if (!selection || !selection.length)
|
|
10536
10891
|
return;
|
|
10537
|
-
const { defaultSize } = this.options;
|
|
10892
|
+
const { defaultSize, minSize } = this.options;
|
|
10893
|
+
let isExistUpdate = false;
|
|
10538
10894
|
selection.forEach((el) => {
|
|
10539
10895
|
if (!el.size) {
|
|
10540
10896
|
el.size = defaultSize;
|
|
10541
10897
|
}
|
|
10542
|
-
if (el.size
|
|
10898
|
+
if (el.size <= minSize)
|
|
10543
10899
|
return;
|
|
10544
|
-
el.size
|
|
10900
|
+
if (el.size - 2 < minSize) {
|
|
10901
|
+
el.size = minSize;
|
|
10902
|
+
} else {
|
|
10903
|
+
el.size -= 2;
|
|
10904
|
+
}
|
|
10905
|
+
isExistUpdate = true;
|
|
10545
10906
|
});
|
|
10546
|
-
|
|
10907
|
+
if (isExistUpdate) {
|
|
10908
|
+
this.draw.render({ isSetCursor: false });
|
|
10909
|
+
}
|
|
10547
10910
|
}
|
|
10548
10911
|
bold() {
|
|
10549
10912
|
const isReadonly = this.draw.isReadonly();
|
|
@@ -10738,7 +11101,7 @@ class CommandAdapt {
|
|
|
10738
11101
|
if (!~startIndex && !~endIndex)
|
|
10739
11102
|
return;
|
|
10740
11103
|
const elementList = this.draw.getElementList();
|
|
10741
|
-
const innerWidth = this.draw.
|
|
11104
|
+
const innerWidth = this.draw.getOriginalInnerWidth();
|
|
10742
11105
|
const colgroup = [];
|
|
10743
11106
|
const colWidth = innerWidth / col;
|
|
10744
11107
|
for (let c = 0; c < col; c++) {
|
|
@@ -11294,6 +11657,27 @@ class CommandAdapt {
|
|
|
11294
11657
|
const position = this.position.getOriginalPositionList();
|
|
11295
11658
|
this.tableTool.render(element, position[index2]);
|
|
11296
11659
|
}
|
|
11660
|
+
tableTdVerticalAlign(payload) {
|
|
11661
|
+
var _a, _b, _c;
|
|
11662
|
+
const isReadonly = this.draw.isReadonly();
|
|
11663
|
+
if (isReadonly)
|
|
11664
|
+
return;
|
|
11665
|
+
const positionContext = this.position.getPositionContext();
|
|
11666
|
+
if (!positionContext.isTable)
|
|
11667
|
+
return;
|
|
11668
|
+
const { index: index2, trIndex, tdIndex } = positionContext;
|
|
11669
|
+
const originalElementList = this.draw.getOriginalElementList();
|
|
11670
|
+
const element = originalElementList[index2];
|
|
11671
|
+
const curTd = (_c = (_b = (_a = element == null ? void 0 : element.trList) == null ? void 0 : _a[trIndex]) == null ? void 0 : _b.tdList) == null ? void 0 : _c[tdIndex];
|
|
11672
|
+
if (!curTd || curTd.verticalAlign === payload || !curTd.verticalAlign && payload === VerticalAlign.TOP) {
|
|
11673
|
+
return;
|
|
11674
|
+
}
|
|
11675
|
+
curTd.verticalAlign = payload;
|
|
11676
|
+
const { endIndex } = this.range.getRange();
|
|
11677
|
+
this.draw.render({
|
|
11678
|
+
curIndex: endIndex
|
|
11679
|
+
});
|
|
11680
|
+
}
|
|
11297
11681
|
hyperlink(payload) {
|
|
11298
11682
|
const isReadonly = this.draw.isReadonly();
|
|
11299
11683
|
if (isReadonly)
|
|
@@ -11962,6 +12346,39 @@ const tableMenus = [
|
|
|
11962
12346
|
{
|
|
11963
12347
|
isDivider: true
|
|
11964
12348
|
},
|
|
12349
|
+
{
|
|
12350
|
+
i18nPath: "contextmenu.table.verticalAlign",
|
|
12351
|
+
icon: "vertical-align",
|
|
12352
|
+
when: (payload) => {
|
|
12353
|
+
return !payload.isReadonly && payload.isInTable;
|
|
12354
|
+
},
|
|
12355
|
+
childMenus: [
|
|
12356
|
+
{
|
|
12357
|
+
i18nPath: "contextmenu.table.verticalAlignTop",
|
|
12358
|
+
icon: "vertical-align-top",
|
|
12359
|
+
when: () => true,
|
|
12360
|
+
callback: (command) => {
|
|
12361
|
+
command.executeTableTdVerticalAlign(VerticalAlign.TOP);
|
|
12362
|
+
}
|
|
12363
|
+
},
|
|
12364
|
+
{
|
|
12365
|
+
i18nPath: "contextmenu.table.verticalAlignMiddle",
|
|
12366
|
+
icon: "vertical-align-middle",
|
|
12367
|
+
when: () => true,
|
|
12368
|
+
callback: (command) => {
|
|
12369
|
+
command.executeTableTdVerticalAlign(VerticalAlign.MIDDLE);
|
|
12370
|
+
}
|
|
12371
|
+
},
|
|
12372
|
+
{
|
|
12373
|
+
i18nPath: "contextmenu.table.verticalAlignBottom",
|
|
12374
|
+
icon: "vertical-align-bottom",
|
|
12375
|
+
when: () => true,
|
|
12376
|
+
callback: (command) => {
|
|
12377
|
+
command.executeTableTdVerticalAlign(VerticalAlign.BOTTOM);
|
|
12378
|
+
}
|
|
12379
|
+
}
|
|
12380
|
+
]
|
|
12381
|
+
},
|
|
11965
12382
|
{
|
|
11966
12383
|
i18nPath: "contextmenu.table.insertRowCol",
|
|
11967
12384
|
icon: "insert-row-col",
|
|
@@ -12280,12 +12697,6 @@ class ContextMenu {
|
|
|
12280
12697
|
this.contextMenuRelationShip.clear();
|
|
12281
12698
|
}
|
|
12282
12699
|
}
|
|
12283
|
-
const defaultHeaderOption = {
|
|
12284
|
-
data: "",
|
|
12285
|
-
color: "#AAAAAA",
|
|
12286
|
-
size: 14,
|
|
12287
|
-
font: "Yahei"
|
|
12288
|
-
};
|
|
12289
12700
|
const richtextKeys = [
|
|
12290
12701
|
{
|
|
12291
12702
|
key: KeyMap.X_UPPERCASE,
|
|
@@ -12430,13 +12841,21 @@ class Shortcut {
|
|
|
12430
12841
|
}
|
|
12431
12842
|
}
|
|
12432
12843
|
}
|
|
12844
|
+
const defaultPageNumberOption = {
|
|
12845
|
+
bottom: 60,
|
|
12846
|
+
size: 12,
|
|
12847
|
+
font: "Yahei",
|
|
12848
|
+
color: "#000000",
|
|
12849
|
+
rowFlex: RowFlex.CENTER
|
|
12850
|
+
};
|
|
12433
12851
|
class Editor {
|
|
12434
|
-
constructor(container,
|
|
12852
|
+
constructor(container, data2, options = {}) {
|
|
12435
12853
|
__publicField(this, "command");
|
|
12436
12854
|
__publicField(this, "listener");
|
|
12437
12855
|
__publicField(this, "register");
|
|
12438
12856
|
__publicField(this, "destroy");
|
|
12439
12857
|
const headerOptions = __spreadValues(__spreadValues({}, defaultHeaderOption), options.header);
|
|
12858
|
+
const pageNumberOptions = __spreadValues(__spreadValues({}, defaultPageNumberOption), options.pageNumber);
|
|
12440
12859
|
const waterMarkOptions = __spreadValues(__spreadValues({}, defaultWatermarkOption), options.watermark);
|
|
12441
12860
|
const controlOptions = __spreadValues(__spreadValues({}, defaultControlOption), options.control);
|
|
12442
12861
|
const checkboxOptions = __spreadValues(__spreadValues({}, defaultCheckboxOption), options.checkbox);
|
|
@@ -12446,6 +12865,8 @@ class Editor {
|
|
|
12446
12865
|
defaultType: "TEXT",
|
|
12447
12866
|
defaultFont: "Yahei",
|
|
12448
12867
|
defaultSize: 16,
|
|
12868
|
+
minSize: 5,
|
|
12869
|
+
maxSize: 72,
|
|
12449
12870
|
defaultRowMargin: 1,
|
|
12450
12871
|
defaultBasicRowMarginHeight: 8,
|
|
12451
12872
|
defaultTabWidth: 32,
|
|
@@ -12453,9 +12874,6 @@ class Editor {
|
|
|
12453
12874
|
height: 1123,
|
|
12454
12875
|
scale: 1,
|
|
12455
12876
|
pageGap: 20,
|
|
12456
|
-
pageNumberBottom: 60,
|
|
12457
|
-
pageNumberSize: 12,
|
|
12458
|
-
pageNumberFont: "Yahei",
|
|
12459
12877
|
underlineColor: "#000000",
|
|
12460
12878
|
strikeoutColor: "#FF0000",
|
|
12461
12879
|
rangeAlpha: 0.6,
|
|
@@ -12475,19 +12893,35 @@ class Editor {
|
|
|
12475
12893
|
defaultTdHeight: 40,
|
|
12476
12894
|
defaultHyperlinkColor: "#0000FF",
|
|
12477
12895
|
headerTop: 50,
|
|
12478
|
-
paperDirection: PaperDirection.VERTICAL
|
|
12896
|
+
paperDirection: PaperDirection.VERTICAL,
|
|
12897
|
+
inactiveAlpha: 0.6
|
|
12479
12898
|
}, options), {
|
|
12480
12899
|
header: headerOptions,
|
|
12900
|
+
pageNumber: pageNumberOptions,
|
|
12481
12901
|
watermark: waterMarkOptions,
|
|
12482
12902
|
control: controlOptions,
|
|
12483
12903
|
checkbox: checkboxOptions,
|
|
12484
12904
|
cursor: cursorOptions
|
|
12485
12905
|
});
|
|
12486
|
-
|
|
12906
|
+
let headerElementList = [];
|
|
12907
|
+
let mainElementList = [];
|
|
12908
|
+
if (Array.isArray(data2)) {
|
|
12909
|
+
mainElementList = data2;
|
|
12910
|
+
} else {
|
|
12911
|
+
headerElementList = data2.header || [];
|
|
12912
|
+
mainElementList = data2.main;
|
|
12913
|
+
}
|
|
12914
|
+
formatElementList(headerElementList, {
|
|
12915
|
+
editorOptions
|
|
12916
|
+
});
|
|
12917
|
+
formatElementList(mainElementList, {
|
|
12487
12918
|
editorOptions
|
|
12488
12919
|
});
|
|
12489
12920
|
this.listener = new Listener();
|
|
12490
|
-
const draw = new Draw(container, editorOptions,
|
|
12921
|
+
const draw = new Draw(container, editorOptions, {
|
|
12922
|
+
header: headerElementList,
|
|
12923
|
+
main: mainElementList
|
|
12924
|
+
}, this.listener);
|
|
12491
12925
|
this.command = new Command(new CommandAdapt(draw));
|
|
12492
12926
|
const contextMenu = new ContextMenu(draw, this.command);
|
|
12493
12927
|
const shortcut = new Shortcut(draw, this.command);
|
|
@@ -12503,5 +12937,5 @@ class Editor {
|
|
|
12503
12937
|
};
|
|
12504
12938
|
}
|
|
12505
12939
|
}
|
|
12506
|
-
export { BlockType, Command, ControlType, EDITOR_COMPONENT, Editor, EditorComponent, EditorMode, ElementType, ImageDisplay, KeyMap, PageMode, PaperDirection, RowFlex, Editor as default };
|
|
12940
|
+
export { BlockType, Command, ControlType, EDITOR_COMPONENT, Editor, EditorComponent, EditorMode, EditorZone, ElementType, ImageDisplay, KeyMap, PageMode, PaperDirection, RowFlex, VerticalAlign, Editor as default };
|
|
12507
12941
|
//# sourceMappingURL=canvas-editor.es.js.map
|