@hufe921/canvas-editor 0.9.92 → 0.9.93
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 +29 -0
- package/dist/canvas-editor.es.js +1429 -1147
- package/dist/canvas-editor.es.js.map +1 -1
- package/dist/canvas-editor.umd.js +34 -34
- package/dist/canvas-editor.umd.js.map +1 -1
- package/dist/src/editor/core/command/CommandAdapt.d.ts +1 -1
- package/dist/src/editor/core/draw/Draw.d.ts +3 -0
- package/dist/src/editor/core/draw/particle/table/TableOperate.d.ts +28 -0
- package/dist/src/editor/core/draw/particle/table/TableTool.d.ts +5 -0
- package/dist/src/editor/core/event/GlobalEvent.d.ts +1 -0
- package/dist/src/editor/core/position/Position.d.ts +5 -1
- package/dist/src/editor/dataset/constant/ContextMenu.d.ts +1 -0
- package/dist/src/editor/dataset/enum/Common.d.ts +1 -0
- package/dist/src/editor/interface/Catalog.d.ts +1 -0
- package/dist/src/editor/interface/Draw.d.ts +7 -1
- package/dist/src/editor/interface/Element.d.ts +1 -0
- package/dist/src/editor/interface/Position.d.ts +11 -3
- package/dist/src/editor/interface/Range.d.ts +2 -0
- package/dist/src/editor/interface/Row.d.ts +1 -0
- package/dist/src/editor/utils/element.d.ts +2 -0
- package/dist/src/editor/utils/index.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.id="canvas-editor-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-table-tool__border{position:absolute;z-index:1;background:transparent;pointer-events:none}.ce-table-tool__border__row{position:absolute;cursor:row-resize;pointer-events:auto}.ce-table-tool__border__col{position:absolute;cursor:col-resize;pointer-events:auto}.ce-resizer-selection{position:absolute;border:1px solid;pointer-events:none}.ce-resizer-selection .resizer-handle{position:absolute;z-index:9;width:10px;height:10px;box-shadow:0 1px 4px #0000004d;border-radius:5px;border:2px solid #ffffff;box-sizing:border-box;pointer-events:initial}.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-size-view{display:flex;align-items:center;height:20px;white-space:nowrap;position:absolute;z-index:9;top:-30px;left:0;opacity:.9;background-color:#000;padding:0 5px;border-radius:4px}.ce-resizer-size-view span{color:#fff;font-size:12px}.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-contextmenu-border-all{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iIzNENDc1NyIvPjxwYXRoIGZpbGw9IiMzRDQ3NTciIGQ9Ik0zIDhoMTF2MUgzeiIvPjxwYXRoIGZpbGw9IiMzRDQ3NTciIGQ9Ik05IDN2MTFIOFYzeiIvPjwvc3ZnPg==)}.ce-contextmenu-border-empty{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMyAzaC0xVjJoMWExIDEgMCAwMTEgMXYxaC0xVjN6bS0zLTF2MUg4LjV2MmgtMVYzSDZWMmg0ek00IDJ2MUgzdjFIMlYzYTEgMSAwIDAxMS0xaDF6TTIgNmgxdjEuNWgydjFIM1YxMEgyVjZ6bTAgNmgxdjFoMXYxSDNhMSAxIDAgMDEtMS0xdi0xem00IDJ2LTFoMS41di0yaDF2MkgxMHYxSDZ6bTYgMHYtMWgxdi0xaDF2MWExIDEgMCAwMS0xIDFoLTF6bTItNGgtMVY4LjVoLTJ2LTFoMlY2aDF2NHpNOC41IDcuNXYtMWgtMXYxaC0xdjFoMXYxaDF2LTFoMXYtMWgtMXoiIGZpbGw9IiNBQUFDQjAiLz48L3N2Zz4=)}.ce-contextmenu-border-external{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iIzNENDc1NyIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOSA1VjNIOHYyaDF6bTAgOXYtMkg4djJoMXpNNSA4SDN2MWgyVjh6bTkgMGgtMnYxaDJWOHpNOSA3djFoMXYxSDl2MUg4VjlIN1Y4aDFWN2gxeiIgZmlsbD0iI0FBQUNCMCIvPjwvc3ZnPg==)}.ce-contextmenu-border-td{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgZD0iTTguNSAyLjUgdjYgaC02Ii8+PC9zdmc+)}.ce-contextmenu-border-td-top{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIyIiBkPSJNMi41IDMgaDEyIi8+PC9zdmc+)}.ce-contextmenu-border-td-left{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIyIiBkPSJNMyAzIHYxMSIvPjwvc3ZnPg==)}.ce-contextmenu-border-td-bottom{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIyIiBkPSJNMi41IDE0IGgxMiIvPjwvc3ZnPg==)}.ce-contextmenu-border-td-right{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIyIiBkPSJNMTQgMyB2MTEiLz48L3N2Zz4=)}.ce-contextmenu-border-td-forward{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIgLz48cGF0aCBzdHJva2U9IiMzRDQ3NTciIGQ9Ik0xNCAzIGwtMTEgMTEiIC8+PC9zdmc+)}.ce-contextmenu-border-td-back{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIgLz48cGF0aCBzdHJva2U9IiMzRDQ3NTciIGQ9Ik0zIDMgbDExIDExIiAvPjwvc3ZnPg==)}.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-zone-indicator>div{padding:3px 6px;color:#000;font-size:12px;background:rgb(218 231 252);position:absolute;transform-origin:0 0}.ce-zone-indicator-border__top,.ce-zone-indicator-border__bottom,.ce-zone-indicator-border__left,.ce-zone-indicator-border__right{display:block;position:absolute;z-index:0}.ce-zone-indicator-border__top{border-top:2px dashed rgb(238,238,238)}.ce-zone-indicator-border__bottom{border-top:2px dashed rgb(238,238,238);width:100%}.ce-zone-indicator-border__left{border-left:2px dashed rgb(238,238,238)}.ce-zone-indicator-border__right{border-right:2px dashed rgb(238,238,238)}.ce-zone-tip{display:none;align-items:center;height:30px;white-space:nowrap;position:fixed;opacity:.9;background-color:#000;padding:0 5px;border-radius:4px;z-index:9;transition:all .3s;outline:none;user-select:none;pointer-events:none;transform:translate(10px,10px)}.ce-zone-tip.show{display:flex}.ce-zone-tip span{color:#fff;font-size:12px}.ce-inputarea{width:100px;height:30px;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;caret-color:transparent;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}}.ce-float-image{position:absolute;opacity:.5;pointer-events:none}')),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.id="canvas-editor-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__quick__add{width:16px;height:16px;position:absolute;border-radius:50%;background-color:#e2e6ed;cursor:pointer}.ce-table-tool__quick__add:after{content:"+";color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-55%)}.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-table-tool__border{position:absolute;z-index:1;background:transparent;pointer-events:none}.ce-table-tool__border__row{position:absolute;cursor:row-resize;pointer-events:auto}.ce-table-tool__border__col{position:absolute;cursor:col-resize;pointer-events:auto}.ce-resizer-selection{position:absolute;border:1px solid;pointer-events:none}.ce-resizer-selection .resizer-handle{position:absolute;z-index:9;width:10px;height:10px;box-shadow:0 1px 4px #0000004d;border-radius:5px;border:2px solid #ffffff;box-sizing:border-box;pointer-events:initial}.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-size-view{display:flex;align-items:center;height:20px;white-space:nowrap;position:absolute;z-index:9;top:-30px;left:0;opacity:.9;background-color:#000;padding:0 5px;border-radius:4px}.ce-resizer-size-view span{color:#fff;font-size:12px}.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-contextmenu-border-all{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iIzNENDc1NyIvPjxwYXRoIGZpbGw9IiMzRDQ3NTciIGQ9Ik0zIDhoMTF2MUgzeiIvPjxwYXRoIGZpbGw9IiMzRDQ3NTciIGQ9Ik05IDN2MTFIOFYzeiIvPjwvc3ZnPg==)}.ce-contextmenu-border-empty{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMyAzaC0xVjJoMWExIDEgMCAwMTEgMXYxaC0xVjN6bS0zLTF2MUg4LjV2MmgtMVYzSDZWMmg0ek00IDJ2MUgzdjFIMlYzYTEgMSAwIDAxMS0xaDF6TTIgNmgxdjEuNWgydjFIM1YxMEgyVjZ6bTAgNmgxdjFoMXYxSDNhMSAxIDAgMDEtMS0xdi0xem00IDJ2LTFoMS41di0yaDF2MkgxMHYxSDZ6bTYgMHYtMWgxdi0xaDF2MWExIDEgMCAwMS0xIDFoLTF6bTItNGgtMVY4LjVoLTJ2LTFoMlY2aDF2NHpNOC41IDcuNXYtMWgtMXYxaC0xdjFoMXYxaDF2LTFoMXYtMWgtMXoiIGZpbGw9IiNBQUFDQjAiLz48L3N2Zz4=)}.ce-contextmenu-border-external{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iIzNENDc1NyIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOSA1VjNIOHYyaDF6bTAgOXYtMkg4djJoMXpNNSA4SDN2MWgyVjh6bTkgMGgtMnYxaDJWOHpNOSA3djFoMXYxSDl2MUg4VjlIN1Y4aDFWN2gxeiIgZmlsbD0iI0FBQUNCMCIvPjwvc3ZnPg==)}.ce-contextmenu-border-td{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgZD0iTTguNSAyLjUgdjYgaC02Ii8+PC9zdmc+)}.ce-contextmenu-border-td-top{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIyIiBkPSJNMi41IDMgaDEyIi8+PC9zdmc+)}.ce-contextmenu-border-td-left{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIyIiBkPSJNMyAzIHYxMSIvPjwvc3ZnPg==)}.ce-contextmenu-border-td-bottom{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIyIiBkPSJNMi41IDE0IGgxMiIvPjwvc3ZnPg==)}.ce-contextmenu-border-td-right{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIyIiBkPSJNMTQgMyB2MTEiLz48L3N2Zz4=)}.ce-contextmenu-border-td-forward{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIgLz48cGF0aCBzdHJva2U9IiMzRDQ3NTciIGQ9Ik0xNCAzIGwtMTEgMTEiIC8+PC9zdmc+)}.ce-contextmenu-border-td-back{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIgLz48cGF0aCBzdHJva2U9IiMzRDQ3NTciIGQ9Ik0zIDMgbDExIDExIiAvPjwvc3ZnPg==)}.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-zone-indicator>div{padding:3px 6px;color:#000;font-size:12px;background:rgb(218 231 252);position:absolute;transform-origin:0 0}.ce-zone-indicator-border__top,.ce-zone-indicator-border__bottom,.ce-zone-indicator-border__left,.ce-zone-indicator-border__right{display:block;position:absolute;z-index:0}.ce-zone-indicator-border__top{border-top:2px dashed rgb(238,238,238)}.ce-zone-indicator-border__bottom{border-top:2px dashed rgb(238,238,238);width:100%}.ce-zone-indicator-border__left{border-left:2px dashed rgb(238,238,238)}.ce-zone-indicator-border__right{border-right:2px dashed rgb(238,238,238)}.ce-zone-tip{display:none;align-items:center;height:30px;white-space:nowrap;position:fixed;opacity:.9;background-color:#000;padding:0 5px;border-radius:4px;z-index:9;transition:all .3s;outline:none;user-select:none;pointer-events:none;transform:translate(10px,10px)}.ce-zone-tip.show{display:flex}.ce-zone-tip span{color:#fff;font-size:12px}.ce-inputarea{width:100px;height:30px;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;caret-color:transparent;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}}.ce-float-image{position:absolute;opacity:.5;pointer-events:none}')),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.93";
|
|
27
27
|
var MaxHeightRatio;
|
|
28
28
|
(function(MaxHeightRatio2) {
|
|
29
29
|
MaxHeightRatio2["HALF"] = "half";
|
|
@@ -39,6 +39,7 @@ var ImageDisplay;
|
|
|
39
39
|
(function(ImageDisplay2) {
|
|
40
40
|
ImageDisplay2["INLINE"] = "inline";
|
|
41
41
|
ImageDisplay2["BLOCK"] = "block";
|
|
42
|
+
ImageDisplay2["SURROUND"] = "surround";
|
|
42
43
|
ImageDisplay2["FLOAT_TOP"] = "float-top";
|
|
43
44
|
ImageDisplay2["FLOAT_BOTTOM"] = "float-bottom";
|
|
44
45
|
})(ImageDisplay || (ImageDisplay = {}));
|
|
@@ -369,6 +370,20 @@ function isObjectEqual(obj1, obj2) {
|
|
|
369
370
|
}
|
|
370
371
|
return !obj1Keys.some((key) => obj2[key] !== obj1[key]);
|
|
371
372
|
}
|
|
373
|
+
function isRectIntersect(rect1, rect2) {
|
|
374
|
+
const rect1Left = rect1.x;
|
|
375
|
+
const rect1Right = rect1.x + rect1.width;
|
|
376
|
+
const rect1Top = rect1.y;
|
|
377
|
+
const rect1Bottom = rect1.y + rect1.height;
|
|
378
|
+
const rect2Left = rect2.x;
|
|
379
|
+
const rect2Right = rect2.x + rect2.width;
|
|
380
|
+
const rect2Top = rect2.y;
|
|
381
|
+
const rect2Bottom = rect2.y + rect2.height;
|
|
382
|
+
if (rect1Left > rect2Right || rect1Right < rect2Left || rect1Top > rect2Bottom || rect1Bottom < rect2Top) {
|
|
383
|
+
return false;
|
|
384
|
+
}
|
|
385
|
+
return true;
|
|
386
|
+
}
|
|
372
387
|
const CURSOR_AGENT_OFFSET_HEIGHT = 12;
|
|
373
388
|
const defaultCursorOption = {
|
|
374
389
|
width: 1,
|
|
@@ -4934,6 +4949,25 @@ function replaceHTMLElementTag(oldDom, tagName) {
|
|
|
4934
4949
|
newDom.innerHTML = oldDom.innerHTML;
|
|
4935
4950
|
return newDom;
|
|
4936
4951
|
}
|
|
4952
|
+
function pickSurroundElementList(elementList) {
|
|
4953
|
+
const surroundElementList = [];
|
|
4954
|
+
for (let e = 0; e < elementList.length; e++) {
|
|
4955
|
+
const element = elementList[e];
|
|
4956
|
+
if (element.imgDisplay === ImageDisplay.SURROUND) {
|
|
4957
|
+
surroundElementList.push(element);
|
|
4958
|
+
}
|
|
4959
|
+
}
|
|
4960
|
+
return surroundElementList;
|
|
4961
|
+
}
|
|
4962
|
+
function deleteSurroundElementList(elementList, pageNo) {
|
|
4963
|
+
var _a;
|
|
4964
|
+
for (let s = elementList.length - 1; s >= 0; s--) {
|
|
4965
|
+
const surroundElement = elementList[s];
|
|
4966
|
+
if (((_a = surroundElement.imgFloatPosition) == null ? void 0 : _a.pageNo) === pageNo) {
|
|
4967
|
+
elementList.splice(s, 1);
|
|
4968
|
+
}
|
|
4969
|
+
}
|
|
4970
|
+
}
|
|
4937
4971
|
function setClipboardData(data2) {
|
|
4938
4972
|
localStorage.setItem(EDITOR_CLIPBOARD, JSON.stringify({
|
|
4939
4973
|
text: data2.text,
|
|
@@ -5813,7 +5847,7 @@ function mousedown(evt, host) {
|
|
|
5813
5847
|
isShow: false
|
|
5814
5848
|
});
|
|
5815
5849
|
setRangeCache(host);
|
|
5816
|
-
if (curElement.imgDisplay === ImageDisplay.FLOAT_TOP || curElement.imgDisplay === ImageDisplay.FLOAT_BOTTOM) {
|
|
5850
|
+
if (curElement.imgDisplay === ImageDisplay.SURROUND || curElement.imgDisplay === ImageDisplay.FLOAT_TOP || curElement.imgDisplay === ImageDisplay.FLOAT_BOTTOM) {
|
|
5817
5851
|
draw.getImageParticle().createFloatImage(curElement);
|
|
5818
5852
|
}
|
|
5819
5853
|
}
|
|
@@ -5847,13 +5881,14 @@ function getElementIndexByDragId(dragId, elementList) {
|
|
|
5847
5881
|
}
|
|
5848
5882
|
function moveImgPosition(element, evt, host) {
|
|
5849
5883
|
const draw = host.getDraw();
|
|
5850
|
-
if (element.imgDisplay === ImageDisplay.FLOAT_TOP || element.imgDisplay === ImageDisplay.FLOAT_BOTTOM) {
|
|
5884
|
+
if (element.imgDisplay === ImageDisplay.SURROUND || element.imgDisplay === ImageDisplay.FLOAT_TOP || element.imgDisplay === ImageDisplay.FLOAT_BOTTOM) {
|
|
5851
5885
|
const moveX = evt.offsetX - host.mouseDownStartPosition.x;
|
|
5852
5886
|
const moveY = evt.offsetY - host.mouseDownStartPosition.y;
|
|
5853
5887
|
const imgFloatPosition = element.imgFloatPosition;
|
|
5854
5888
|
element.imgFloatPosition = {
|
|
5855
5889
|
x: imgFloatPosition.x + moveX,
|
|
5856
|
-
y: imgFloatPosition.y + moveY
|
|
5890
|
+
y: imgFloatPosition.y + moveY,
|
|
5891
|
+
pageNo: draw.getPageNo()
|
|
5857
5892
|
};
|
|
5858
5893
|
}
|
|
5859
5894
|
draw.getImageParticle().destroyFloatImage();
|
|
@@ -5880,24 +5915,26 @@ function mouseup(evt, host) {
|
|
|
5880
5915
|
if (range.startIndex >= cacheStartIndex && range.endIndex <= cacheEndIndex && ((_a = host.cachePositionContext) == null ? void 0 : _a.tdId) === positionContext.tdId) {
|
|
5881
5916
|
draw.clearSideEffect();
|
|
5882
5917
|
let isSubmitHistory = false;
|
|
5918
|
+
let isCompute = false;
|
|
5883
5919
|
if (isCacheRangeCollapsed) {
|
|
5884
5920
|
const dragElement = cacheElementList[cacheEndIndex];
|
|
5885
5921
|
if (dragElement.type === ElementType.IMAGE || dragElement.type === ElementType.LATEX) {
|
|
5886
5922
|
moveImgPosition(dragElement, evt, host);
|
|
5887
|
-
if (dragElement.imgDisplay === ImageDisplay.FLOAT_TOP || dragElement.imgDisplay === ImageDisplay.FLOAT_BOTTOM) {
|
|
5923
|
+
if (dragElement.imgDisplay === ImageDisplay.SURROUND || dragElement.imgDisplay === ImageDisplay.FLOAT_TOP || dragElement.imgDisplay === ImageDisplay.FLOAT_BOTTOM) {
|
|
5888
5924
|
draw.getPreviewer().drawResizer(dragElement);
|
|
5889
5925
|
isSubmitHistory = true;
|
|
5890
5926
|
} else {
|
|
5891
5927
|
const cachePosition = cachePositionList[cacheEndIndex];
|
|
5892
5928
|
draw.getPreviewer().drawResizer(dragElement, cachePosition);
|
|
5893
5929
|
}
|
|
5930
|
+
isCompute = dragElement.imgDisplay === ImageDisplay.SURROUND;
|
|
5894
5931
|
}
|
|
5895
5932
|
}
|
|
5896
5933
|
rangeManager.replaceRange(__spreadValues({}, cacheRange));
|
|
5897
5934
|
draw.render({
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5935
|
+
isCompute,
|
|
5936
|
+
isSubmitHistory,
|
|
5937
|
+
isSetCursor: false
|
|
5901
5938
|
});
|
|
5902
5939
|
return;
|
|
5903
5940
|
}
|
|
@@ -6019,7 +6056,7 @@ function mouseup(evt, host) {
|
|
|
6019
6056
|
isSetCursor: false
|
|
6020
6057
|
});
|
|
6021
6058
|
if (imgElement) {
|
|
6022
|
-
if (imgElement.imgDisplay === ImageDisplay.FLOAT_TOP || imgElement.imgDisplay === ImageDisplay.FLOAT_BOTTOM) {
|
|
6059
|
+
if (imgElement.imgDisplay === ImageDisplay.SURROUND || imgElement.imgDisplay === ImageDisplay.FLOAT_TOP || imgElement.imgDisplay === ImageDisplay.FLOAT_BOTTOM) {
|
|
6023
6060
|
draw.getPreviewer().drawResizer(imgElement);
|
|
6024
6061
|
} else {
|
|
6025
6062
|
const dragPositionList = position.getPositionList();
|
|
@@ -6057,7 +6094,7 @@ function mousemove(evt, host) {
|
|
|
6057
6094
|
const cacheStartIndex = (_a = host.cacheRange) == null ? void 0 : _a.startIndex;
|
|
6058
6095
|
if (cacheStartIndex) {
|
|
6059
6096
|
const dragElement = host.cacheElementList[cacheStartIndex];
|
|
6060
|
-
if ((dragElement == null ? void 0 : dragElement.type) === ElementType.IMAGE && (dragElement.imgDisplay === ImageDisplay.FLOAT_TOP || dragElement.imgDisplay === ImageDisplay.FLOAT_BOTTOM)) {
|
|
6097
|
+
if ((dragElement == null ? void 0 : dragElement.type) === ElementType.IMAGE && (dragElement.imgDisplay === ImageDisplay.SURROUND || dragElement.imgDisplay === ImageDisplay.FLOAT_TOP || dragElement.imgDisplay === ImageDisplay.FLOAT_BOTTOM)) {
|
|
6061
6098
|
draw.getPreviewer().clearResizer();
|
|
6062
6099
|
draw.getImageParticle().dragFloatImage(evt.movementX, evt.movementY);
|
|
6063
6100
|
}
|
|
@@ -7567,6 +7604,7 @@ class GlobalEvent {
|
|
|
7567
7604
|
__publicField(this, "hyperlinkParticle");
|
|
7568
7605
|
__publicField(this, "control");
|
|
7569
7606
|
__publicField(this, "dateParticle");
|
|
7607
|
+
__publicField(this, "imageParticle");
|
|
7570
7608
|
__publicField(this, "dprMediaQueryList");
|
|
7571
7609
|
__publicField(this, "clearSideEffect", (evt) => {
|
|
7572
7610
|
if (!this.cursor)
|
|
@@ -7591,6 +7629,7 @@ class GlobalEvent {
|
|
|
7591
7629
|
this.hyperlinkParticle.clearHyperlinkPopup();
|
|
7592
7630
|
this.control.destroyControl();
|
|
7593
7631
|
this.dateParticle.clearDatePicker();
|
|
7632
|
+
this.imageParticle.destroyFloatImage();
|
|
7594
7633
|
});
|
|
7595
7634
|
__publicField(this, "setCanvasEventAbility", () => {
|
|
7596
7635
|
this.canvasEvent.setIsAllowDrag(false);
|
|
@@ -7641,6 +7680,7 @@ class GlobalEvent {
|
|
|
7641
7680
|
this.tableTool = draw.getTableTool();
|
|
7642
7681
|
this.hyperlinkParticle = draw.getHyperlinkParticle();
|
|
7643
7682
|
this.dateParticle = draw.getDateParticle();
|
|
7683
|
+
this.imageParticle = draw.getImageParticle();
|
|
7644
7684
|
this.control = draw.getControl();
|
|
7645
7685
|
this.dprMediaQueryList = window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);
|
|
7646
7686
|
}
|
|
@@ -7798,11 +7838,13 @@ class Position {
|
|
|
7798
7838
|
let index2 = startIndex;
|
|
7799
7839
|
for (let i = 0; i < rowList.length; i++) {
|
|
7800
7840
|
const curRow = rowList[i];
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7841
|
+
if (!curRow.isSurround) {
|
|
7842
|
+
const curRowWidth = curRow.width + (curRow.offsetX || 0);
|
|
7843
|
+
if (curRow.rowFlex === RowFlex.CENTER) {
|
|
7844
|
+
x += (innerWidth - curRowWidth) / 2;
|
|
7845
|
+
} else if (curRow.rowFlex === RowFlex.RIGHT) {
|
|
7846
|
+
x += innerWidth - curRowWidth;
|
|
7847
|
+
}
|
|
7806
7848
|
}
|
|
7807
7849
|
x += curRow.offsetX || 0;
|
|
7808
7850
|
const tablePreX = x;
|
|
@@ -7833,7 +7875,7 @@ class Position {
|
|
|
7833
7875
|
rightBottom: [x + metrics.width, y + curRow.height]
|
|
7834
7876
|
}
|
|
7835
7877
|
};
|
|
7836
|
-
if (element.imgDisplay === ImageDisplay.FLOAT_TOP || element.imgDisplay === ImageDisplay.FLOAT_BOTTOM) {
|
|
7878
|
+
if (element.imgDisplay === ImageDisplay.SURROUND || element.imgDisplay === ImageDisplay.FLOAT_TOP || element.imgDisplay === ImageDisplay.FLOAT_BOTTOM) {
|
|
7837
7879
|
const prePosition = positionList[positionList.length - 1];
|
|
7838
7880
|
if (prePosition) {
|
|
7839
7881
|
positionItem.metrics = prePosition.metrics;
|
|
@@ -7842,7 +7884,8 @@ class Position {
|
|
|
7842
7884
|
if (!element.imgFloatPosition) {
|
|
7843
7885
|
element.imgFloatPosition = {
|
|
7844
7886
|
x,
|
|
7845
|
-
y
|
|
7887
|
+
y,
|
|
7888
|
+
pageNo
|
|
7846
7889
|
};
|
|
7847
7890
|
}
|
|
7848
7891
|
this.floatPositionList.push({
|
|
@@ -7985,7 +8028,7 @@ class Position {
|
|
|
7985
8028
|
const positionNo = isMainActive ? curPageNo : 0;
|
|
7986
8029
|
if (!isTable) {
|
|
7987
8030
|
const floatTopPosition = this.getFloatPositionByXY(__spreadProps(__spreadValues({}, payload), {
|
|
7988
|
-
|
|
8031
|
+
imgDisplays: [ImageDisplay.FLOAT_TOP, ImageDisplay.SURROUND]
|
|
7989
8032
|
}));
|
|
7990
8033
|
if (floatTopPosition)
|
|
7991
8034
|
return floatTopPosition;
|
|
@@ -8078,7 +8121,7 @@ class Position {
|
|
|
8078
8121
|
}
|
|
8079
8122
|
if (!isTable) {
|
|
8080
8123
|
const floatBottomPosition = this.getFloatPositionByXY(__spreadProps(__spreadValues({}, payload), {
|
|
8081
|
-
|
|
8124
|
+
imgDisplays: [ImageDisplay.FLOAT_BOTTOM]
|
|
8082
8125
|
}));
|
|
8083
8126
|
if (floatBottomPosition)
|
|
8084
8127
|
return floatBottomPosition;
|
|
@@ -8211,7 +8254,7 @@ class Position {
|
|
|
8211
8254
|
const currentZone = this.draw.getZone().getZone();
|
|
8212
8255
|
for (let f = 0; f < this.floatPositionList.length; f++) {
|
|
8213
8256
|
const { position, element, isTable, index: index2, trIndex, tdIndex, tdValueIndex, zone: floatElementZone, pageNo } = this.floatPositionList[f];
|
|
8214
|
-
if (currentPageNo === pageNo && element.type === ElementType.IMAGE && element.imgDisplay
|
|
8257
|
+
if (currentPageNo === pageNo && element.type === ElementType.IMAGE && element.imgDisplay && payload.imgDisplays.includes(element.imgDisplay) && (!floatElementZone || floatElementZone === currentZone)) {
|
|
8215
8258
|
const imgFloatPosition = element.imgFloatPosition;
|
|
8216
8259
|
if (x >= imgFloatPosition.x && x <= imgFloatPosition.x + element.width && y >= imgFloatPosition.y && y <= imgFloatPosition.y + element.height) {
|
|
8217
8260
|
if (isTable) {
|
|
@@ -8274,6 +8317,38 @@ class Position {
|
|
|
8274
8317
|
});
|
|
8275
8318
|
return positionResult;
|
|
8276
8319
|
}
|
|
8320
|
+
setSurroundPosition(payload) {
|
|
8321
|
+
var _a;
|
|
8322
|
+
const { pageNo, row, rowElement, rowElementRect, surroundElementList, availableWidth } = payload;
|
|
8323
|
+
let x = rowElementRect.x;
|
|
8324
|
+
let rowIncreaseWidth = 0;
|
|
8325
|
+
if (surroundElementList.length && !getIsBlockElement(rowElement) && !((_a = rowElement.control) == null ? void 0 : _a.minWidth)) {
|
|
8326
|
+
for (let s = 0; s < surroundElementList.length; s++) {
|
|
8327
|
+
const surroundElement = surroundElementList[s];
|
|
8328
|
+
const floatPosition = surroundElement.imgFloatPosition;
|
|
8329
|
+
if (floatPosition.pageNo !== pageNo)
|
|
8330
|
+
continue;
|
|
8331
|
+
const surroundRect = __spreadProps(__spreadValues({}, floatPosition), {
|
|
8332
|
+
width: surroundElement.width,
|
|
8333
|
+
height: surroundElement.height
|
|
8334
|
+
});
|
|
8335
|
+
if (isRectIntersect(rowElementRect, surroundRect)) {
|
|
8336
|
+
row.isSurround = true;
|
|
8337
|
+
const translateX = surroundRect.width + surroundRect.x - rowElementRect.x;
|
|
8338
|
+
rowElement.left = translateX;
|
|
8339
|
+
row.width += translateX;
|
|
8340
|
+
rowIncreaseWidth += translateX;
|
|
8341
|
+
x = surroundRect.x + surroundRect.width;
|
|
8342
|
+
if (row.width + rowElement.metrics.width > availableWidth) {
|
|
8343
|
+
rowElement.left = 0;
|
|
8344
|
+
row.width -= rowIncreaseWidth;
|
|
8345
|
+
break;
|
|
8346
|
+
}
|
|
8347
|
+
}
|
|
8348
|
+
}
|
|
8349
|
+
}
|
|
8350
|
+
return { x, rowIncreaseWidth };
|
|
8351
|
+
}
|
|
8277
8352
|
}
|
|
8278
8353
|
class RangeManager {
|
|
8279
8354
|
constructor(draw) {
|
|
@@ -10011,6 +10086,9 @@ class TableTool {
|
|
|
10011
10086
|
constructor(draw) {
|
|
10012
10087
|
__publicField(this, "MIN_TD_WIDTH", 20);
|
|
10013
10088
|
__publicField(this, "ROW_COL_OFFSET", 18);
|
|
10089
|
+
__publicField(this, "ROW_COL_QUICK_WIDTH", 16);
|
|
10090
|
+
__publicField(this, "ROW_COL_QUICK_OFFSET", 5);
|
|
10091
|
+
__publicField(this, "ROW_COL_QUICK_POSITION", this.ROW_COL_OFFSET + (this.ROW_COL_OFFSET - this.ROW_COL_QUICK_WIDTH) / 2);
|
|
10014
10092
|
__publicField(this, "BORDER_VALUE", 4);
|
|
10015
10093
|
__publicField(this, "draw");
|
|
10016
10094
|
__publicField(this, "canvas");
|
|
@@ -10018,6 +10096,8 @@ class TableTool {
|
|
|
10018
10096
|
__publicField(this, "position");
|
|
10019
10097
|
__publicField(this, "container");
|
|
10020
10098
|
__publicField(this, "toolRowContainer");
|
|
10099
|
+
__publicField(this, "toolRowAddBtn");
|
|
10100
|
+
__publicField(this, "toolColAddBtn");
|
|
10021
10101
|
__publicField(this, "toolColContainer");
|
|
10022
10102
|
__publicField(this, "toolBorderContainer");
|
|
10023
10103
|
__publicField(this, "anchorLine");
|
|
@@ -10029,6 +10109,8 @@ class TableTool {
|
|
|
10029
10109
|
this.position = draw.getPosition();
|
|
10030
10110
|
this.container = draw.getContainer();
|
|
10031
10111
|
this.toolRowContainer = null;
|
|
10112
|
+
this.toolRowAddBtn = null;
|
|
10113
|
+
this.toolColAddBtn = null;
|
|
10032
10114
|
this.toolColContainer = null;
|
|
10033
10115
|
this.toolBorderContainer = null;
|
|
10034
10116
|
this.anchorLine = null;
|
|
@@ -10036,11 +10118,15 @@ class TableTool {
|
|
|
10036
10118
|
this.mousedownY = 0;
|
|
10037
10119
|
}
|
|
10038
10120
|
dispose() {
|
|
10039
|
-
var _a, _b, _c;
|
|
10121
|
+
var _a, _b, _c, _d, _e;
|
|
10040
10122
|
(_a = this.toolRowContainer) == null ? void 0 : _a.remove();
|
|
10041
|
-
(_b = this.
|
|
10042
|
-
(_c = this.
|
|
10123
|
+
(_b = this.toolRowAddBtn) == null ? void 0 : _b.remove();
|
|
10124
|
+
(_c = this.toolColAddBtn) == null ? void 0 : _c.remove();
|
|
10125
|
+
(_d = this.toolColContainer) == null ? void 0 : _d.remove();
|
|
10126
|
+
(_e = this.toolBorderContainer) == null ? void 0 : _e.remove();
|
|
10043
10127
|
this.toolRowContainer = null;
|
|
10128
|
+
this.toolRowAddBtn = null;
|
|
10129
|
+
this.toolColAddBtn = null;
|
|
10044
10130
|
this.toolColContainer = null;
|
|
10045
10131
|
this.toolBorderContainer = null;
|
|
10046
10132
|
}
|
|
@@ -10064,6 +10150,8 @@ class TableTool {
|
|
|
10064
10150
|
const td = element.trList[trIndex].tdList[tdIndex];
|
|
10065
10151
|
const rowIndex = td.rowIndex;
|
|
10066
10152
|
const colIndex = td.colIndex;
|
|
10153
|
+
const tableHeight = element.height * scale;
|
|
10154
|
+
const tableWidth = element.width * scale;
|
|
10067
10155
|
const rowHeightList = trList.map((tr) => tr.height);
|
|
10068
10156
|
const rowContainer = document.createElement("div");
|
|
10069
10157
|
rowContainer.classList.add(`${EDITOR_PREFIX}-table-tool__row`);
|
|
@@ -10093,6 +10181,23 @@ class TableTool {
|
|
|
10093
10181
|
rowContainer.style.top = `${tableY}px`;
|
|
10094
10182
|
this.container.append(rowContainer);
|
|
10095
10183
|
this.toolRowContainer = rowContainer;
|
|
10184
|
+
const rowAddBtn = document.createElement("div");
|
|
10185
|
+
rowAddBtn.classList.add(`${EDITOR_PREFIX}-table-tool__quick__add`);
|
|
10186
|
+
rowAddBtn.style.height = `${tableHeight * scale}`;
|
|
10187
|
+
rowAddBtn.style.left = `${tableX}px`;
|
|
10188
|
+
rowAddBtn.style.top = `${tableY + tableHeight}px`;
|
|
10189
|
+
rowAddBtn.style.transform = `translate(-${this.ROW_COL_QUICK_POSITION * scale}px, ${this.ROW_COL_QUICK_OFFSET * scale}px)`;
|
|
10190
|
+
rowAddBtn.onclick = () => {
|
|
10191
|
+
this.position.setPositionContext({
|
|
10192
|
+
index: index2,
|
|
10193
|
+
isTable: true,
|
|
10194
|
+
trIndex: trList.length - 1,
|
|
10195
|
+
tdIndex: 0
|
|
10196
|
+
});
|
|
10197
|
+
this.draw.getTableOperate().insertTableBottomRow();
|
|
10198
|
+
};
|
|
10199
|
+
this.container.append(rowAddBtn);
|
|
10200
|
+
this.toolRowAddBtn = rowAddBtn;
|
|
10096
10201
|
const colWidthList = colgroup.map((col) => col.width);
|
|
10097
10202
|
const colContainer = document.createElement("div");
|
|
10098
10203
|
colContainer.classList.add(`${EDITOR_PREFIX}-table-tool__col`);
|
|
@@ -10122,8 +10227,23 @@ class TableTool {
|
|
|
10122
10227
|
colContainer.style.top = `${tableY}px`;
|
|
10123
10228
|
this.container.append(colContainer);
|
|
10124
10229
|
this.toolColContainer = colContainer;
|
|
10125
|
-
const
|
|
10126
|
-
|
|
10230
|
+
const colAddBtn = document.createElement("div");
|
|
10231
|
+
colAddBtn.classList.add(`${EDITOR_PREFIX}-table-tool__quick__add`);
|
|
10232
|
+
colAddBtn.style.height = `${tableHeight * scale}`;
|
|
10233
|
+
colAddBtn.style.left = `${tableX + tableWidth}px`;
|
|
10234
|
+
colAddBtn.style.top = `${tableY}px`;
|
|
10235
|
+
colAddBtn.style.transform = `translate(${this.ROW_COL_QUICK_OFFSET * scale}px, -${this.ROW_COL_QUICK_POSITION * scale}px)`;
|
|
10236
|
+
colAddBtn.onclick = () => {
|
|
10237
|
+
this.position.setPositionContext({
|
|
10238
|
+
index: index2,
|
|
10239
|
+
isTable: true,
|
|
10240
|
+
trIndex: 0,
|
|
10241
|
+
tdIndex: trList[0].tdList.length - 1 || 0
|
|
10242
|
+
});
|
|
10243
|
+
this.draw.getTableOperate().insertTableRightCol();
|
|
10244
|
+
};
|
|
10245
|
+
this.container.append(colAddBtn);
|
|
10246
|
+
this.toolColAddBtn = colAddBtn;
|
|
10127
10247
|
const borderContainer = document.createElement("div");
|
|
10128
10248
|
borderContainer.classList.add(`${EDITOR_PREFIX}-table-tool__border`);
|
|
10129
10249
|
borderContainer.style.height = `${tableHeight}px`;
|
|
@@ -10393,9 +10513,14 @@ class Header {
|
|
|
10393
10513
|
}
|
|
10394
10514
|
_computeRowList() {
|
|
10395
10515
|
const innerWidth = this.draw.getInnerWidth();
|
|
10516
|
+
const margins = this.draw.getMargins();
|
|
10517
|
+
const surroundElementList = pickSurroundElementList(this.elementList);
|
|
10396
10518
|
this.rowList = this.draw.computeRowList({
|
|
10519
|
+
startX: margins[3],
|
|
10520
|
+
startY: this.getHeaderTop(),
|
|
10397
10521
|
innerWidth,
|
|
10398
|
-
elementList: this.elementList
|
|
10522
|
+
elementList: this.elementList,
|
|
10523
|
+
surroundElementList
|
|
10399
10524
|
});
|
|
10400
10525
|
}
|
|
10401
10526
|
_computePositionList() {
|
|
@@ -13018,7 +13143,7 @@ function WorkerWrapper$2() {
|
|
|
13018
13143
|
objURL && (window.URL || window.webkitURL).revokeObjectURL(objURL);
|
|
13019
13144
|
}
|
|
13020
13145
|
}
|
|
13021
|
-
const encodedJs$1 = "
|
|
13146
|
+
const encodedJs$1 = "KCgpPT57KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBsOyhmdW5jdGlvbih0KXt0LlRFWFQ9InRleHQiLHQuSU1BR0U9ImltYWdlIix0LlRBQkxFPSJ0YWJsZSIsdC5IWVBFUkxJTks9Imh5cGVybGluayIsdC5TVVBFUlNDUklQVD0ic3VwZXJzY3JpcHQiLHQuU1VCU0NSSVBUPSJzdWJzY3JpcHQiLHQuU0VQQVJBVE9SPSJzZXBhcmF0b3IiLHQuUEFHRV9CUkVBSz0icGFnZUJyZWFrIix0LkNPTlRST0w9ImNvbnRyb2wiLHQuQ0hFQ0tCT1g9ImNoZWNrYm94Iix0LlJBRElPPSJyYWRpbyIsdC5MQVRFWD0ibGF0ZXgiLHQuVEFCPSJ0YWIiLHQuREFURT0iZGF0ZSIsdC5CTE9DSz0iYmxvY2siLHQuVElUTEU9InRpdGxlIix0LkxJU1Q9Imxpc3QifSkobHx8KGw9e30pKTt2YXIgYTsoZnVuY3Rpb24odCl7dC5GSVJTVD0iZmlyc3QiLHQuU0VDT05EPSJzZWNvbmQiLHQuVEhJUkQ9InRoaXJkIix0LkZPVVJUSD0iZm91cnRoIix0LkZJRlRIPSJmaWZ0aCIsdC5TSVhUSD0ic2l4dGgifSkoYXx8KGE9e30pKTtjb25zdCBnPXtbYS5GSVJTVF06MSxbYS5TRUNPTkRdOjIsW2EuVEhJUkRdOjMsW2EuRk9VUlRIXTo0LFthLkZJRlRIXTo1LFthLlNJWFRIXTo2fSxMPVtsLlRFWFQsbC5IWVBFUkxJTkssbC5TVUJTQ1JJUFQsbC5TVVBFUlNDUklQVCxsLkNPTlRST0wsbC5EQVRFXSxUPSJcdTIwMEIiO2Z1bmN0aW9uIGQodCl7cmV0dXJuIXQudHlwZXx8TC5pbmNsdWRlcyh0LnR5cGUpfWZ1bmN0aW9uIGYodCl7Y29uc3R7ZWxlbWVudExpc3Q6bixwb3NpdGlvbkxpc3Q6dn09dCxJPVtdO2xldCBpPTA7Zm9yKDtpPG4ubGVuZ3RoOyl7Y29uc3Qgcz1uW2ldO2lmKHMudGl0bGVJZCl7Y29uc3QgZT1zLnRpdGxlSWQsbz1zLmxldmVsLGM9e3R5cGU6bC5USVRMRSx2YWx1ZToiIixsZXZlbDpvLHRpdGxlSWQ6ZSxwYWdlTm86dltpXS5wYWdlTm99LHI9W107Zm9yKDtpPG4ubGVuZ3RoOyl7Y29uc3QgdT1uW2ldO2lmKGUhPT11LnRpdGxlSWQpe2ktLTticmVha31yLnB1c2godSksaSsrfWMudmFsdWU9ci5maWx0ZXIodT0+ZCh1KSkubWFwKHU9PnUudmFsdWUpLmpvaW4oIiIpLnJlcGxhY2UobmV3IFJlZ0V4cChULCJnIiksIiIpLEkucHVzaChjKX1pKyt9aWYoIUkubGVuZ3RoKXJldHVybiBudWxsO2NvbnN0IGg9KHMsZSk9Pntjb25zdCBvPWUuc3ViQ2F0YWxvZ1tlLnN1YkNhdGFsb2cubGVuZ3RoLTFdLGM9Z1tvPT1udWxsP3ZvaWQgMDpvLmxldmVsXSxyPWdbcy5sZXZlbF07byYmcj5jP2gocyxvKTplLnN1YkNhdGFsb2cucHVzaCh7aWQ6cy50aXRsZUlkLG5hbWU6cy52YWx1ZSxsZXZlbDpzLmxldmVsLHBhZ2VObzpzLnBhZ2VObyxzdWJDYXRhbG9nOltdfSl9LFI9W107Zm9yKGxldCBzPTA7czxJLmxlbmd0aDtzKyspe2NvbnN0IGU9SVtzXSxvPVJbUi5sZW5ndGgtMV0sYz1nW289PW51bGw/dm9pZCAwOm8ubGV2ZWxdLHI9Z1tlLmxldmVsXTtvJiZyPmM/aChlLG8pOlIucHVzaCh7aWQ6ZS50aXRsZUlkLG5hbWU6ZS52YWx1ZSxsZXZlbDplLmxldmVsLHBhZ2VObzplLnBhZ2VObyxzdWJDYXRhbG9nOltdfSl9cmV0dXJuIFJ9b25tZXNzYWdlPXQ9Pntjb25zdCBuPXQuZGF0YSx2PWYobik7cG9zdE1lc3NhZ2Uodil9fSkoKTt9KSgpOwo=";
|
|
13022
13147
|
const blob$1 = typeof window !== "undefined" && window.Blob && new Blob([atob(encodedJs$1)], { type: "text/javascript;charset=utf-8" });
|
|
13023
13148
|
function WorkerWrapper$1() {
|
|
13024
13149
|
const objURL = blob$1 && (window.URL || window.webkitURL).createObjectURL(blob$1);
|
|
@@ -13070,7 +13195,11 @@ class WorkerManager {
|
|
|
13070
13195
|
reject(evt);
|
|
13071
13196
|
};
|
|
13072
13197
|
const elementList = this.draw.getOriginalMainElementList();
|
|
13073
|
-
this.
|
|
13198
|
+
const positionList = this.draw.getPosition().getOriginalMainPositionList();
|
|
13199
|
+
this.catalogWorker.postMessage({
|
|
13200
|
+
elementList,
|
|
13201
|
+
positionList
|
|
13202
|
+
});
|
|
13074
13203
|
});
|
|
13075
13204
|
}
|
|
13076
13205
|
getGroupIds() {
|
|
@@ -13728,6 +13857,7 @@ const contextmenu$1 = {
|
|
|
13728
13857
|
textWrapType: {
|
|
13729
13858
|
embed: "\u5D4C\u5165\u578B",
|
|
13730
13859
|
upDown: "\u4E0A\u4E0B\u578B\u73AF\u7ED5",
|
|
13860
|
+
surround: "\u56DB\u5468\u578B\u73AF\u7ED5",
|
|
13731
13861
|
floatTop: "\u6D6E\u4E8E\u6587\u5B57\u4E0A\u65B9",
|
|
13732
13862
|
floatBottom: "\u886C\u4E8E\u6587\u5B57\u4E0B\u65B9"
|
|
13733
13863
|
}
|
|
@@ -13822,6 +13952,7 @@ const contextmenu = {
|
|
|
13822
13952
|
textWrapType: {
|
|
13823
13953
|
embed: "Embed",
|
|
13824
13954
|
upDown: "Up down",
|
|
13955
|
+
surround: "Surround",
|
|
13825
13956
|
floatTop: "Float above text",
|
|
13826
13957
|
floatBottom: "Float below text"
|
|
13827
13958
|
}
|
|
@@ -14838,187 +14969,893 @@ class Actuator {
|
|
|
14838
14969
|
});
|
|
14839
14970
|
}
|
|
14840
14971
|
}
|
|
14841
|
-
class
|
|
14842
|
-
constructor(
|
|
14843
|
-
__publicField(this, "
|
|
14844
|
-
__publicField(this, "pageContainer");
|
|
14845
|
-
__publicField(this, "pageList");
|
|
14846
|
-
__publicField(this, "ctxList");
|
|
14847
|
-
__publicField(this, "pageNo");
|
|
14848
|
-
__publicField(this, "pagePixelRatio");
|
|
14849
|
-
__publicField(this, "mode");
|
|
14850
|
-
__publicField(this, "options");
|
|
14851
|
-
__publicField(this, "position");
|
|
14852
|
-
__publicField(this, "zone");
|
|
14853
|
-
__publicField(this, "elementList");
|
|
14854
|
-
__publicField(this, "listener");
|
|
14855
|
-
__publicField(this, "eventBus");
|
|
14856
|
-
__publicField(this, "override");
|
|
14857
|
-
__publicField(this, "i18n");
|
|
14858
|
-
__publicField(this, "canvasEvent");
|
|
14859
|
-
__publicField(this, "globalEvent");
|
|
14860
|
-
__publicField(this, "cursor");
|
|
14972
|
+
class TableOperate {
|
|
14973
|
+
constructor(draw) {
|
|
14974
|
+
__publicField(this, "draw");
|
|
14861
14975
|
__publicField(this, "range");
|
|
14862
|
-
__publicField(this, "
|
|
14863
|
-
__publicField(this, "background");
|
|
14864
|
-
__publicField(this, "search");
|
|
14865
|
-
__publicField(this, "group");
|
|
14866
|
-
__publicField(this, "underline");
|
|
14867
|
-
__publicField(this, "strikeout");
|
|
14868
|
-
__publicField(this, "highlight");
|
|
14869
|
-
__publicField(this, "historyManager");
|
|
14870
|
-
__publicField(this, "previewer");
|
|
14871
|
-
__publicField(this, "imageParticle");
|
|
14872
|
-
__publicField(this, "laTexParticle");
|
|
14873
|
-
__publicField(this, "textParticle");
|
|
14874
|
-
__publicField(this, "tableParticle");
|
|
14976
|
+
__publicField(this, "position");
|
|
14875
14977
|
__publicField(this, "tableTool");
|
|
14876
|
-
__publicField(this, "
|
|
14877
|
-
__publicField(this, "
|
|
14878
|
-
|
|
14879
|
-
|
|
14880
|
-
|
|
14881
|
-
|
|
14882
|
-
|
|
14883
|
-
|
|
14884
|
-
__publicField(this, "separatorParticle");
|
|
14885
|
-
__publicField(this, "pageBreakParticle");
|
|
14886
|
-
__publicField(this, "superscriptParticle");
|
|
14887
|
-
__publicField(this, "subscriptParticle");
|
|
14888
|
-
__publicField(this, "checkboxParticle");
|
|
14889
|
-
__publicField(this, "radioParticle");
|
|
14890
|
-
__publicField(this, "blockParticle");
|
|
14891
|
-
__publicField(this, "listParticle");
|
|
14892
|
-
__publicField(this, "lineBreakParticle");
|
|
14893
|
-
__publicField(this, "control");
|
|
14894
|
-
__publicField(this, "pageBorder");
|
|
14895
|
-
__publicField(this, "workerManager");
|
|
14896
|
-
__publicField(this, "scrollObserver");
|
|
14897
|
-
__publicField(this, "selectionObserver");
|
|
14898
|
-
__publicField(this, "imageObserver");
|
|
14899
|
-
__publicField(this, "LETTER_REG");
|
|
14900
|
-
__publicField(this, "WORD_LIKE_REG");
|
|
14901
|
-
__publicField(this, "rowList");
|
|
14902
|
-
__publicField(this, "pageRowList");
|
|
14903
|
-
__publicField(this, "painterStyle");
|
|
14904
|
-
__publicField(this, "painterOptions");
|
|
14905
|
-
__publicField(this, "visiblePageNoList");
|
|
14906
|
-
__publicField(this, "intersectionPageNo");
|
|
14907
|
-
__publicField(this, "lazyRenderIntersectionObserver");
|
|
14908
|
-
__publicField(this, "printModeData");
|
|
14909
|
-
this.container = this._wrapContainer(rootContainer);
|
|
14910
|
-
this.pageList = [];
|
|
14911
|
-
this.ctxList = [];
|
|
14912
|
-
this.pageNo = 0;
|
|
14913
|
-
this.pagePixelRatio = null;
|
|
14914
|
-
this.mode = options.mode;
|
|
14915
|
-
this.options = options;
|
|
14916
|
-
this.elementList = data2.main;
|
|
14917
|
-
this.listener = listener;
|
|
14918
|
-
this.eventBus = eventBus;
|
|
14919
|
-
this.override = override;
|
|
14920
|
-
this._formatContainer();
|
|
14921
|
-
this.pageContainer = this._createPageContainer();
|
|
14922
|
-
this._createPage(0);
|
|
14923
|
-
this.i18n = new I18n();
|
|
14924
|
-
this.historyManager = new HistoryManager(this);
|
|
14925
|
-
this.position = new Position(this);
|
|
14926
|
-
this.zone = new Zone(this);
|
|
14927
|
-
this.range = new RangeManager(this);
|
|
14928
|
-
this.margin = new Margin(this);
|
|
14929
|
-
this.background = new Background(this);
|
|
14930
|
-
this.search = new Search(this);
|
|
14931
|
-
this.group = new Group(this);
|
|
14932
|
-
this.underline = new Underline(this);
|
|
14933
|
-
this.strikeout = new Strikeout(this);
|
|
14934
|
-
this.highlight = new Highlight(this);
|
|
14935
|
-
this.previewer = new Previewer(this);
|
|
14936
|
-
this.imageParticle = new ImageParticle(this);
|
|
14937
|
-
this.laTexParticle = new LaTexParticle(this);
|
|
14938
|
-
this.textParticle = new TextParticle(this);
|
|
14939
|
-
this.tableParticle = new TableParticle(this);
|
|
14940
|
-
this.tableTool = new TableTool(this);
|
|
14941
|
-
this.pageNumber = new PageNumber(this);
|
|
14942
|
-
this.lineNumber = new LineNumber(this);
|
|
14943
|
-
this.waterMark = new Watermark(this);
|
|
14944
|
-
this.placeholder = new Placeholder(this);
|
|
14945
|
-
this.header = new Header(this, data2.header);
|
|
14946
|
-
this.footer = new Footer(this, data2.footer);
|
|
14947
|
-
this.hyperlinkParticle = new HyperlinkParticle(this);
|
|
14948
|
-
this.dateParticle = new DateParticle(this);
|
|
14949
|
-
this.separatorParticle = new SeparatorParticle(this);
|
|
14950
|
-
this.pageBreakParticle = new PageBreakParticle(this);
|
|
14951
|
-
this.superscriptParticle = new SuperscriptParticle();
|
|
14952
|
-
this.subscriptParticle = new SubscriptParticle();
|
|
14953
|
-
this.checkboxParticle = new CheckboxParticle(this);
|
|
14954
|
-
this.radioParticle = new RadioParticle(this);
|
|
14955
|
-
this.blockParticle = new BlockParticle(this);
|
|
14956
|
-
this.listParticle = new ListParticle(this);
|
|
14957
|
-
this.lineBreakParticle = new LineBreakParticle(this);
|
|
14958
|
-
this.control = new Control(this);
|
|
14959
|
-
this.pageBorder = new PageBorder(this);
|
|
14960
|
-
this.scrollObserver = new ScrollObserver(this);
|
|
14961
|
-
this.selectionObserver = new SelectionObserver(this);
|
|
14962
|
-
this.imageObserver = new ImageObserver();
|
|
14963
|
-
new MouseObserver(this);
|
|
14964
|
-
this.canvasEvent = new CanvasEvent(this);
|
|
14965
|
-
this.cursor = new Cursor(this, this.canvasEvent);
|
|
14966
|
-
this.canvasEvent.register();
|
|
14967
|
-
this.globalEvent = new GlobalEvent(this, this.canvasEvent);
|
|
14968
|
-
this.globalEvent.register();
|
|
14969
|
-
this.workerManager = new WorkerManager(this);
|
|
14970
|
-
new Actuator(this);
|
|
14971
|
-
const { letterClass } = options;
|
|
14972
|
-
this.LETTER_REG = new RegExp(`[${letterClass.join("")}]`);
|
|
14973
|
-
this.WORD_LIKE_REG = new RegExp(`${letterClass.map((letter) => `[^${letter}][${letter}]`).join("|")}`);
|
|
14974
|
-
this.rowList = [];
|
|
14975
|
-
this.pageRowList = [];
|
|
14976
|
-
this.painterStyle = null;
|
|
14977
|
-
this.painterOptions = null;
|
|
14978
|
-
this.visiblePageNoList = [];
|
|
14979
|
-
this.intersectionPageNo = 0;
|
|
14980
|
-
this.lazyRenderIntersectionObserver = null;
|
|
14981
|
-
this.printModeData = null;
|
|
14982
|
-
this.render({
|
|
14983
|
-
isInit: true,
|
|
14984
|
-
isSetCursor: false,
|
|
14985
|
-
isFirstRender: true
|
|
14986
|
-
});
|
|
14987
|
-
}
|
|
14988
|
-
getLetterReg() {
|
|
14989
|
-
return this.LETTER_REG;
|
|
14990
|
-
}
|
|
14991
|
-
getMode() {
|
|
14992
|
-
return this.mode;
|
|
14978
|
+
__publicField(this, "tableParticle");
|
|
14979
|
+
__publicField(this, "options");
|
|
14980
|
+
this.draw = draw;
|
|
14981
|
+
this.range = draw.getRange();
|
|
14982
|
+
this.position = draw.getPosition();
|
|
14983
|
+
this.tableTool = draw.getTableTool();
|
|
14984
|
+
this.tableParticle = draw.getTableParticle();
|
|
14985
|
+
this.options = draw.getOptions();
|
|
14993
14986
|
}
|
|
14994
|
-
|
|
14995
|
-
|
|
14987
|
+
insertTable(row, col) {
|
|
14988
|
+
var _a;
|
|
14989
|
+
const { startIndex, endIndex } = this.range.getRange();
|
|
14990
|
+
if (!~startIndex && !~endIndex)
|
|
14996
14991
|
return;
|
|
14997
|
-
|
|
14998
|
-
|
|
14999
|
-
|
|
15000
|
-
|
|
15001
|
-
|
|
15002
|
-
};
|
|
15003
|
-
const
|
|
15004
|
-
const
|
|
15005
|
-
|
|
15006
|
-
clonePrintModeData[key] = this.control.filterAssistElement(clonePrintModeData[key]);
|
|
15007
|
-
});
|
|
15008
|
-
this.setEditorData(clonePrintModeData);
|
|
14992
|
+
const { defaultTrMinHeight } = this.options.table;
|
|
14993
|
+
const elementList = this.draw.getElementList();
|
|
14994
|
+
let offsetX = 0;
|
|
14995
|
+
if ((_a = elementList[startIndex]) == null ? void 0 : _a.listId) {
|
|
14996
|
+
const positionList = this.position.getPositionList();
|
|
14997
|
+
const { rowIndex } = positionList[startIndex];
|
|
14998
|
+
const rowList = this.draw.getRowList();
|
|
14999
|
+
const row2 = rowList[rowIndex];
|
|
15000
|
+
offsetX = (row2 == null ? void 0 : row2.offsetX) || 0;
|
|
15009
15001
|
}
|
|
15010
|
-
|
|
15011
|
-
|
|
15012
|
-
|
|
15002
|
+
const innerWidth = this.draw.getContextInnerWidth() - offsetX;
|
|
15003
|
+
const colgroup = [];
|
|
15004
|
+
const colWidth = innerWidth / col;
|
|
15005
|
+
for (let c = 0; c < col; c++) {
|
|
15006
|
+
colgroup.push({
|
|
15007
|
+
width: colWidth
|
|
15008
|
+
});
|
|
15013
15009
|
}
|
|
15014
|
-
|
|
15015
|
-
|
|
15016
|
-
|
|
15017
|
-
|
|
15018
|
-
|
|
15019
|
-
|
|
15020
|
-
|
|
15021
|
-
|
|
15010
|
+
const trList = [];
|
|
15011
|
+
for (let r = 0; r < row; r++) {
|
|
15012
|
+
const tdList = [];
|
|
15013
|
+
const tr = {
|
|
15014
|
+
height: defaultTrMinHeight,
|
|
15015
|
+
tdList
|
|
15016
|
+
};
|
|
15017
|
+
for (let c = 0; c < col; c++) {
|
|
15018
|
+
tdList.push({
|
|
15019
|
+
colspan: 1,
|
|
15020
|
+
rowspan: 1,
|
|
15021
|
+
value: []
|
|
15022
|
+
});
|
|
15023
|
+
}
|
|
15024
|
+
trList.push(tr);
|
|
15025
|
+
}
|
|
15026
|
+
const element = {
|
|
15027
|
+
type: ElementType.TABLE,
|
|
15028
|
+
value: "",
|
|
15029
|
+
colgroup,
|
|
15030
|
+
trList
|
|
15031
|
+
};
|
|
15032
|
+
formatElementList([element], {
|
|
15033
|
+
editorOptions: this.options
|
|
15034
|
+
});
|
|
15035
|
+
formatElementContext(elementList, [element], startIndex, {
|
|
15036
|
+
editorOptions: this.options
|
|
15037
|
+
});
|
|
15038
|
+
const curIndex = startIndex + 1;
|
|
15039
|
+
this.draw.spliceElementList(elementList, curIndex, startIndex === endIndex ? 0 : endIndex - startIndex, element);
|
|
15040
|
+
this.range.setRange(curIndex, curIndex);
|
|
15041
|
+
this.draw.render({ curIndex, isSetCursor: false });
|
|
15042
|
+
}
|
|
15043
|
+
insertTableTopRow() {
|
|
15044
|
+
const positionContext = this.position.getPositionContext();
|
|
15045
|
+
if (!positionContext.isTable)
|
|
15046
|
+
return;
|
|
15047
|
+
const { index: index2, trIndex, tableId } = positionContext;
|
|
15048
|
+
const originalElementList = this.draw.getOriginalElementList();
|
|
15049
|
+
const element = originalElementList[index2];
|
|
15050
|
+
const curTrList = element.trList;
|
|
15051
|
+
const curTr = curTrList[trIndex];
|
|
15052
|
+
if (curTr.tdList.length < element.colgroup.length) {
|
|
15053
|
+
const curTrNo = curTr.tdList[0].rowIndex;
|
|
15054
|
+
for (let t = 0; t < trIndex; t++) {
|
|
15055
|
+
const tr = curTrList[t];
|
|
15056
|
+
for (let d = 0; d < tr.tdList.length; d++) {
|
|
15057
|
+
const td = tr.tdList[d];
|
|
15058
|
+
if (td.rowspan > 1 && td.rowIndex + td.rowspan >= curTrNo + 1) {
|
|
15059
|
+
td.rowspan += 1;
|
|
15060
|
+
}
|
|
15061
|
+
}
|
|
15062
|
+
}
|
|
15063
|
+
}
|
|
15064
|
+
const newTrId = getUUID();
|
|
15065
|
+
const newTr = {
|
|
15066
|
+
height: curTr.height,
|
|
15067
|
+
id: newTrId,
|
|
15068
|
+
tdList: []
|
|
15069
|
+
};
|
|
15070
|
+
for (let t = 0; t < curTr.tdList.length; t++) {
|
|
15071
|
+
const curTd = curTr.tdList[t];
|
|
15072
|
+
const newTdId = getUUID();
|
|
15073
|
+
newTr.tdList.push({
|
|
15074
|
+
id: newTdId,
|
|
15075
|
+
rowspan: 1,
|
|
15076
|
+
colspan: curTd.colspan,
|
|
15077
|
+
value: [
|
|
15078
|
+
{
|
|
15079
|
+
value: ZERO,
|
|
15080
|
+
size: 16,
|
|
15081
|
+
tableId,
|
|
15082
|
+
trId: newTrId,
|
|
15083
|
+
tdId: newTdId
|
|
15084
|
+
}
|
|
15085
|
+
]
|
|
15086
|
+
});
|
|
15087
|
+
}
|
|
15088
|
+
curTrList.splice(trIndex, 0, newTr);
|
|
15089
|
+
this.position.setPositionContext({
|
|
15090
|
+
isTable: true,
|
|
15091
|
+
index: index2,
|
|
15092
|
+
trIndex,
|
|
15093
|
+
tdIndex: 0,
|
|
15094
|
+
tdId: newTr.tdList[0].id,
|
|
15095
|
+
trId: newTr.id,
|
|
15096
|
+
tableId
|
|
15097
|
+
});
|
|
15098
|
+
this.range.setRange(0, 0);
|
|
15099
|
+
this.draw.render({ curIndex: 0 });
|
|
15100
|
+
this.tableTool.render();
|
|
15101
|
+
}
|
|
15102
|
+
insertTableBottomRow() {
|
|
15103
|
+
const positionContext = this.position.getPositionContext();
|
|
15104
|
+
if (!positionContext.isTable)
|
|
15105
|
+
return;
|
|
15106
|
+
const { index: index2, trIndex, tableId } = positionContext;
|
|
15107
|
+
const originalElementList = this.draw.getOriginalElementList();
|
|
15108
|
+
const element = originalElementList[index2];
|
|
15109
|
+
const curTrList = element.trList;
|
|
15110
|
+
const curTr = curTrList[trIndex];
|
|
15111
|
+
const anchorTr = curTrList.length - 1 === trIndex ? curTr : curTrList[trIndex + 1];
|
|
15112
|
+
if (anchorTr.tdList.length < element.colgroup.length) {
|
|
15113
|
+
const curTrNo = anchorTr.tdList[0].rowIndex;
|
|
15114
|
+
for (let t = 0; t < trIndex + 1; t++) {
|
|
15115
|
+
const tr = curTrList[t];
|
|
15116
|
+
for (let d = 0; d < tr.tdList.length; d++) {
|
|
15117
|
+
const td = tr.tdList[d];
|
|
15118
|
+
if (td.rowspan > 1 && td.rowIndex + td.rowspan >= curTrNo + 1) {
|
|
15119
|
+
td.rowspan += 1;
|
|
15120
|
+
}
|
|
15121
|
+
}
|
|
15122
|
+
}
|
|
15123
|
+
}
|
|
15124
|
+
const newTrId = getUUID();
|
|
15125
|
+
const newTr = {
|
|
15126
|
+
height: anchorTr.height,
|
|
15127
|
+
id: newTrId,
|
|
15128
|
+
tdList: []
|
|
15129
|
+
};
|
|
15130
|
+
for (let t = 0; t < anchorTr.tdList.length; t++) {
|
|
15131
|
+
const curTd = anchorTr.tdList[t];
|
|
15132
|
+
const newTdId = getUUID();
|
|
15133
|
+
newTr.tdList.push({
|
|
15134
|
+
id: newTdId,
|
|
15135
|
+
rowspan: 1,
|
|
15136
|
+
colspan: curTd.colspan,
|
|
15137
|
+
value: [
|
|
15138
|
+
{
|
|
15139
|
+
value: ZERO,
|
|
15140
|
+
size: 16,
|
|
15141
|
+
tableId,
|
|
15142
|
+
trId: newTrId,
|
|
15143
|
+
tdId: newTdId
|
|
15144
|
+
}
|
|
15145
|
+
]
|
|
15146
|
+
});
|
|
15147
|
+
}
|
|
15148
|
+
curTrList.splice(trIndex + 1, 0, newTr);
|
|
15149
|
+
this.position.setPositionContext({
|
|
15150
|
+
isTable: true,
|
|
15151
|
+
index: index2,
|
|
15152
|
+
trIndex: trIndex + 1,
|
|
15153
|
+
tdIndex: 0,
|
|
15154
|
+
tdId: newTr.tdList[0].id,
|
|
15155
|
+
trId: newTr.id,
|
|
15156
|
+
tableId
|
|
15157
|
+
});
|
|
15158
|
+
this.range.setRange(0, 0);
|
|
15159
|
+
this.draw.render({ curIndex: 0 });
|
|
15160
|
+
}
|
|
15161
|
+
insertTableLeftCol() {
|
|
15162
|
+
const positionContext = this.position.getPositionContext();
|
|
15163
|
+
if (!positionContext.isTable)
|
|
15164
|
+
return;
|
|
15165
|
+
const { index: index2, tdIndex, tableId } = positionContext;
|
|
15166
|
+
const originalElementList = this.draw.getOriginalElementList();
|
|
15167
|
+
const element = originalElementList[index2];
|
|
15168
|
+
const curTrList = element.trList;
|
|
15169
|
+
const curTdIndex = tdIndex;
|
|
15170
|
+
for (let t = 0; t < curTrList.length; t++) {
|
|
15171
|
+
const tr = curTrList[t];
|
|
15172
|
+
const tdId = getUUID();
|
|
15173
|
+
tr.tdList.splice(curTdIndex, 0, {
|
|
15174
|
+
id: tdId,
|
|
15175
|
+
rowspan: 1,
|
|
15176
|
+
colspan: 1,
|
|
15177
|
+
value: [
|
|
15178
|
+
{
|
|
15179
|
+
value: ZERO,
|
|
15180
|
+
size: 16,
|
|
15181
|
+
tableId,
|
|
15182
|
+
trId: tr.id,
|
|
15183
|
+
tdId
|
|
15184
|
+
}
|
|
15185
|
+
]
|
|
15186
|
+
});
|
|
15187
|
+
}
|
|
15188
|
+
const colgroup = element.colgroup;
|
|
15189
|
+
colgroup.splice(curTdIndex, 0, {
|
|
15190
|
+
width: this.options.table.defaultColMinWidth
|
|
15191
|
+
});
|
|
15192
|
+
const colgroupWidth = colgroup.reduce((pre, cur) => pre + cur.width, 0);
|
|
15193
|
+
const width = this.draw.getOriginalInnerWidth();
|
|
15194
|
+
if (colgroupWidth > width) {
|
|
15195
|
+
const adjustWidth = (colgroupWidth - width) / colgroup.length;
|
|
15196
|
+
for (let g = 0; g < colgroup.length; g++) {
|
|
15197
|
+
const group2 = colgroup[g];
|
|
15198
|
+
group2.width -= adjustWidth;
|
|
15199
|
+
}
|
|
15200
|
+
}
|
|
15201
|
+
this.position.setPositionContext({
|
|
15202
|
+
isTable: true,
|
|
15203
|
+
index: index2,
|
|
15204
|
+
trIndex: 0,
|
|
15205
|
+
tdIndex: curTdIndex,
|
|
15206
|
+
tdId: curTrList[0].tdList[curTdIndex].id,
|
|
15207
|
+
trId: curTrList[0].id,
|
|
15208
|
+
tableId
|
|
15209
|
+
});
|
|
15210
|
+
this.range.setRange(0, 0);
|
|
15211
|
+
this.draw.render({ curIndex: 0 });
|
|
15212
|
+
this.tableTool.render();
|
|
15213
|
+
}
|
|
15214
|
+
insertTableRightCol() {
|
|
15215
|
+
const positionContext = this.position.getPositionContext();
|
|
15216
|
+
if (!positionContext.isTable)
|
|
15217
|
+
return;
|
|
15218
|
+
const { index: index2, tdIndex, tableId } = positionContext;
|
|
15219
|
+
const originalElementList = this.draw.getOriginalElementList();
|
|
15220
|
+
const element = originalElementList[index2];
|
|
15221
|
+
const curTrList = element.trList;
|
|
15222
|
+
const curTdIndex = tdIndex + 1;
|
|
15223
|
+
for (let t = 0; t < curTrList.length; t++) {
|
|
15224
|
+
const tr = curTrList[t];
|
|
15225
|
+
const tdId = getUUID();
|
|
15226
|
+
tr.tdList.splice(curTdIndex, 0, {
|
|
15227
|
+
id: tdId,
|
|
15228
|
+
rowspan: 1,
|
|
15229
|
+
colspan: 1,
|
|
15230
|
+
value: [
|
|
15231
|
+
{
|
|
15232
|
+
value: ZERO,
|
|
15233
|
+
size: 16,
|
|
15234
|
+
tableId,
|
|
15235
|
+
trId: tr.id,
|
|
15236
|
+
tdId
|
|
15237
|
+
}
|
|
15238
|
+
]
|
|
15239
|
+
});
|
|
15240
|
+
}
|
|
15241
|
+
const colgroup = element.colgroup;
|
|
15242
|
+
colgroup.splice(curTdIndex, 0, {
|
|
15243
|
+
width: this.options.table.defaultColMinWidth
|
|
15244
|
+
});
|
|
15245
|
+
const colgroupWidth = colgroup.reduce((pre, cur) => pre + cur.width, 0);
|
|
15246
|
+
const width = this.draw.getOriginalInnerWidth();
|
|
15247
|
+
if (colgroupWidth > width) {
|
|
15248
|
+
const adjustWidth = (colgroupWidth - width) / colgroup.length;
|
|
15249
|
+
for (let g = 0; g < colgroup.length; g++) {
|
|
15250
|
+
const group2 = colgroup[g];
|
|
15251
|
+
group2.width -= adjustWidth;
|
|
15252
|
+
}
|
|
15253
|
+
}
|
|
15254
|
+
this.position.setPositionContext({
|
|
15255
|
+
isTable: true,
|
|
15256
|
+
index: index2,
|
|
15257
|
+
trIndex: 0,
|
|
15258
|
+
tdIndex: curTdIndex,
|
|
15259
|
+
tdId: curTrList[0].tdList[curTdIndex].id,
|
|
15260
|
+
trId: curTrList[0].id,
|
|
15261
|
+
tableId
|
|
15262
|
+
});
|
|
15263
|
+
this.range.setRange(0, 0);
|
|
15264
|
+
this.draw.render({ curIndex: 0 });
|
|
15265
|
+
}
|
|
15266
|
+
deleteTableRow() {
|
|
15267
|
+
const positionContext = this.position.getPositionContext();
|
|
15268
|
+
if (!positionContext.isTable)
|
|
15269
|
+
return;
|
|
15270
|
+
const { index: index2, trIndex, tdIndex } = positionContext;
|
|
15271
|
+
const originalElementList = this.draw.getOriginalElementList();
|
|
15272
|
+
const element = originalElementList[index2];
|
|
15273
|
+
const trList = element.trList;
|
|
15274
|
+
const curTr = trList[trIndex];
|
|
15275
|
+
const curTdRowIndex = curTr.tdList[tdIndex].rowIndex;
|
|
15276
|
+
if (trList.length <= 1) {
|
|
15277
|
+
this.deleteTable();
|
|
15278
|
+
return;
|
|
15279
|
+
}
|
|
15280
|
+
for (let r = 0; r < curTdRowIndex; r++) {
|
|
15281
|
+
const tr = trList[r];
|
|
15282
|
+
const tdList = tr.tdList;
|
|
15283
|
+
for (let d = 0; d < tdList.length; d++) {
|
|
15284
|
+
const td = tdList[d];
|
|
15285
|
+
if (td.rowIndex + td.rowspan > curTdRowIndex) {
|
|
15286
|
+
td.rowspan--;
|
|
15287
|
+
}
|
|
15288
|
+
}
|
|
15289
|
+
}
|
|
15290
|
+
for (let d = 0; d < curTr.tdList.length; d++) {
|
|
15291
|
+
const td = curTr.tdList[d];
|
|
15292
|
+
if (td.rowspan > 1) {
|
|
15293
|
+
const tdId = getUUID();
|
|
15294
|
+
const nextTr = trList[trIndex + 1];
|
|
15295
|
+
nextTr.tdList.splice(d, 0, {
|
|
15296
|
+
id: tdId,
|
|
15297
|
+
rowspan: td.rowspan - 1,
|
|
15298
|
+
colspan: td.colspan,
|
|
15299
|
+
value: [
|
|
15300
|
+
{
|
|
15301
|
+
value: ZERO,
|
|
15302
|
+
size: 16,
|
|
15303
|
+
tableId: element.id,
|
|
15304
|
+
trId: nextTr.id,
|
|
15305
|
+
tdId
|
|
15306
|
+
}
|
|
15307
|
+
]
|
|
15308
|
+
});
|
|
15309
|
+
}
|
|
15310
|
+
}
|
|
15311
|
+
trList.splice(trIndex, 1);
|
|
15312
|
+
this.position.setPositionContext({
|
|
15313
|
+
isTable: false
|
|
15314
|
+
});
|
|
15315
|
+
this.range.clearRange();
|
|
15316
|
+
this.draw.render({
|
|
15317
|
+
curIndex: positionContext.index
|
|
15318
|
+
});
|
|
15319
|
+
this.tableTool.dispose();
|
|
15320
|
+
}
|
|
15321
|
+
deleteTableCol() {
|
|
15322
|
+
var _a;
|
|
15323
|
+
const positionContext = this.position.getPositionContext();
|
|
15324
|
+
if (!positionContext.isTable)
|
|
15325
|
+
return;
|
|
15326
|
+
const { index: index2, tdIndex, trIndex } = positionContext;
|
|
15327
|
+
const originalElementList = this.draw.getOriginalElementList();
|
|
15328
|
+
const element = originalElementList[index2];
|
|
15329
|
+
const curTrList = element.trList;
|
|
15330
|
+
const curTd = curTrList[trIndex].tdList[tdIndex];
|
|
15331
|
+
const curColIndex = curTd.colIndex;
|
|
15332
|
+
const moreTdTr = curTrList.find((tr) => tr.tdList.length > 1);
|
|
15333
|
+
if (!moreTdTr) {
|
|
15334
|
+
this.deleteTable();
|
|
15335
|
+
return;
|
|
15336
|
+
}
|
|
15337
|
+
for (let t = 0; t < curTrList.length; t++) {
|
|
15338
|
+
const tr = curTrList[t];
|
|
15339
|
+
for (let d = 0; d < tr.tdList.length; d++) {
|
|
15340
|
+
const td = tr.tdList[d];
|
|
15341
|
+
if (td.colIndex <= curColIndex && td.colIndex + td.colspan > curColIndex) {
|
|
15342
|
+
if (td.colspan > 1) {
|
|
15343
|
+
td.colspan--;
|
|
15344
|
+
} else {
|
|
15345
|
+
tr.tdList.splice(d, 1);
|
|
15346
|
+
}
|
|
15347
|
+
}
|
|
15348
|
+
}
|
|
15349
|
+
}
|
|
15350
|
+
(_a = element.colgroup) == null ? void 0 : _a.splice(curColIndex, 1);
|
|
15351
|
+
this.position.setPositionContext({
|
|
15352
|
+
isTable: false
|
|
15353
|
+
});
|
|
15354
|
+
this.range.setRange(0, 0);
|
|
15355
|
+
this.draw.render({
|
|
15356
|
+
curIndex: positionContext.index
|
|
15357
|
+
});
|
|
15358
|
+
this.tableTool.dispose();
|
|
15359
|
+
}
|
|
15360
|
+
deleteTable() {
|
|
15361
|
+
const positionContext = this.position.getPositionContext();
|
|
15362
|
+
if (!positionContext.isTable)
|
|
15363
|
+
return;
|
|
15364
|
+
const originalElementList = this.draw.getOriginalElementList();
|
|
15365
|
+
originalElementList.splice(positionContext.index, 1);
|
|
15366
|
+
const curIndex = positionContext.index - 1;
|
|
15367
|
+
this.position.setPositionContext({
|
|
15368
|
+
isTable: false,
|
|
15369
|
+
index: curIndex
|
|
15370
|
+
});
|
|
15371
|
+
this.range.setRange(curIndex, curIndex);
|
|
15372
|
+
this.draw.render({ curIndex });
|
|
15373
|
+
this.tableTool.dispose();
|
|
15374
|
+
}
|
|
15375
|
+
mergeTableCell() {
|
|
15376
|
+
const positionContext = this.position.getPositionContext();
|
|
15377
|
+
if (!positionContext.isTable)
|
|
15378
|
+
return;
|
|
15379
|
+
const { isCrossRowCol, startTdIndex, endTdIndex, startTrIndex, endTrIndex } = this.range.getRange();
|
|
15380
|
+
if (!isCrossRowCol)
|
|
15381
|
+
return;
|
|
15382
|
+
const { index: index2 } = positionContext;
|
|
15383
|
+
const originalElementList = this.draw.getOriginalElementList();
|
|
15384
|
+
const element = originalElementList[index2];
|
|
15385
|
+
const curTrList = element.trList;
|
|
15386
|
+
let startTd = curTrList[startTrIndex].tdList[startTdIndex];
|
|
15387
|
+
let endTd = curTrList[endTrIndex].tdList[endTdIndex];
|
|
15388
|
+
if (startTd.x > endTd.x || startTd.y > endTd.y) {
|
|
15389
|
+
[startTd, endTd] = [endTd, startTd];
|
|
15390
|
+
}
|
|
15391
|
+
const startColIndex = startTd.colIndex;
|
|
15392
|
+
const endColIndex = endTd.colIndex + (endTd.colspan - 1);
|
|
15393
|
+
const startRowIndex = startTd.rowIndex;
|
|
15394
|
+
const endRowIndex = endTd.rowIndex + (endTd.rowspan - 1);
|
|
15395
|
+
const rowCol = [];
|
|
15396
|
+
for (let t = 0; t < curTrList.length; t++) {
|
|
15397
|
+
const tr = curTrList[t];
|
|
15398
|
+
const tdList = [];
|
|
15399
|
+
for (let d = 0; d < tr.tdList.length; d++) {
|
|
15400
|
+
const td = tr.tdList[d];
|
|
15401
|
+
const tdColIndex = td.colIndex;
|
|
15402
|
+
const tdRowIndex = td.rowIndex;
|
|
15403
|
+
if (tdColIndex >= startColIndex && tdColIndex <= endColIndex && tdRowIndex >= startRowIndex && tdRowIndex <= endRowIndex) {
|
|
15404
|
+
tdList.push(td);
|
|
15405
|
+
}
|
|
15406
|
+
}
|
|
15407
|
+
if (tdList.length) {
|
|
15408
|
+
rowCol.push(tdList);
|
|
15409
|
+
}
|
|
15410
|
+
}
|
|
15411
|
+
if (!rowCol.length)
|
|
15412
|
+
return;
|
|
15413
|
+
const lastRow = rowCol[rowCol.length - 1];
|
|
15414
|
+
const leftTop = rowCol[0][0];
|
|
15415
|
+
const rightBottom = lastRow[lastRow.length - 1];
|
|
15416
|
+
const startX = leftTop.x;
|
|
15417
|
+
const startY = leftTop.y;
|
|
15418
|
+
const endX = rightBottom.x + rightBottom.width;
|
|
15419
|
+
const endY = rightBottom.y + rightBottom.height;
|
|
15420
|
+
for (let t = 0; t < rowCol.length; t++) {
|
|
15421
|
+
const tr = rowCol[t];
|
|
15422
|
+
for (let d = 0; d < tr.length; d++) {
|
|
15423
|
+
const td = tr[d];
|
|
15424
|
+
const tdStartX = td.x;
|
|
15425
|
+
const tdStartY = td.y;
|
|
15426
|
+
const tdEndX = tdStartX + td.width;
|
|
15427
|
+
const tdEndY = tdStartY + td.height;
|
|
15428
|
+
if (startX > tdStartX || startY > tdStartY || endX < tdEndX || endY < tdEndY) {
|
|
15429
|
+
return;
|
|
15430
|
+
}
|
|
15431
|
+
}
|
|
15432
|
+
}
|
|
15433
|
+
const mergeTdIdList = [];
|
|
15434
|
+
const anchorTd = rowCol[0][0];
|
|
15435
|
+
for (let t = 0; t < rowCol.length; t++) {
|
|
15436
|
+
const tr = rowCol[t];
|
|
15437
|
+
for (let d = 0; d < tr.length; d++) {
|
|
15438
|
+
const td = tr[d];
|
|
15439
|
+
const isAnchorTd = t === 0 && d === 0;
|
|
15440
|
+
if (!isAnchorTd) {
|
|
15441
|
+
mergeTdIdList.push(td.id);
|
|
15442
|
+
}
|
|
15443
|
+
if (t === 0 && d !== 0) {
|
|
15444
|
+
anchorTd.colspan += td.colspan;
|
|
15445
|
+
}
|
|
15446
|
+
if (t !== 0) {
|
|
15447
|
+
if (anchorTd.colIndex === td.colIndex) {
|
|
15448
|
+
anchorTd.rowspan += td.rowspan;
|
|
15449
|
+
}
|
|
15450
|
+
}
|
|
15451
|
+
}
|
|
15452
|
+
}
|
|
15453
|
+
for (let t = 0; t < curTrList.length; t++) {
|
|
15454
|
+
const tr = curTrList[t];
|
|
15455
|
+
let d = 0;
|
|
15456
|
+
while (d < tr.tdList.length) {
|
|
15457
|
+
const td = tr.tdList[d];
|
|
15458
|
+
if (mergeTdIdList.includes(td.id)) {
|
|
15459
|
+
tr.tdList.splice(d, 1);
|
|
15460
|
+
d--;
|
|
15461
|
+
}
|
|
15462
|
+
d++;
|
|
15463
|
+
}
|
|
15464
|
+
}
|
|
15465
|
+
this.position.setPositionContext(__spreadProps(__spreadValues({}, positionContext), {
|
|
15466
|
+
trIndex: anchorTd.trIndex,
|
|
15467
|
+
tdIndex: anchorTd.tdIndex
|
|
15468
|
+
}));
|
|
15469
|
+
const curIndex = anchorTd.value.length - 1;
|
|
15470
|
+
this.range.setRange(curIndex, curIndex);
|
|
15471
|
+
this.draw.render();
|
|
15472
|
+
this.tableTool.render();
|
|
15473
|
+
}
|
|
15474
|
+
cancelMergeTableCell() {
|
|
15475
|
+
const positionContext = this.position.getPositionContext();
|
|
15476
|
+
if (!positionContext.isTable)
|
|
15477
|
+
return;
|
|
15478
|
+
const { index: index2, tdIndex, trIndex } = positionContext;
|
|
15479
|
+
const originalElementList = this.draw.getOriginalElementList();
|
|
15480
|
+
const element = originalElementList[index2];
|
|
15481
|
+
const curTrList = element.trList;
|
|
15482
|
+
const curTr = curTrList[trIndex];
|
|
15483
|
+
const curTd = curTr.tdList[tdIndex];
|
|
15484
|
+
if (curTd.rowspan === 1 && curTd.colspan === 1)
|
|
15485
|
+
return;
|
|
15486
|
+
const colspan = curTd.colspan;
|
|
15487
|
+
if (curTd.colspan > 1) {
|
|
15488
|
+
for (let c = 1; c < curTd.colspan; c++) {
|
|
15489
|
+
const tdId = getUUID();
|
|
15490
|
+
curTr.tdList.splice(tdIndex + c, 0, {
|
|
15491
|
+
id: tdId,
|
|
15492
|
+
rowspan: 1,
|
|
15493
|
+
colspan: 1,
|
|
15494
|
+
value: [
|
|
15495
|
+
{
|
|
15496
|
+
value: ZERO,
|
|
15497
|
+
size: 16,
|
|
15498
|
+
tableId: element.id,
|
|
15499
|
+
trId: curTr.id,
|
|
15500
|
+
tdId
|
|
15501
|
+
}
|
|
15502
|
+
]
|
|
15503
|
+
});
|
|
15504
|
+
}
|
|
15505
|
+
curTd.colspan = 1;
|
|
15506
|
+
}
|
|
15507
|
+
if (curTd.rowspan > 1) {
|
|
15508
|
+
for (let r = 1; r < curTd.rowspan; r++) {
|
|
15509
|
+
const tr = curTrList[trIndex + r];
|
|
15510
|
+
for (let c = 0; c < colspan; c++) {
|
|
15511
|
+
const tdId = getUUID();
|
|
15512
|
+
tr.tdList.splice(curTd.colIndex, 0, {
|
|
15513
|
+
id: tdId,
|
|
15514
|
+
rowspan: 1,
|
|
15515
|
+
colspan: 1,
|
|
15516
|
+
value: [
|
|
15517
|
+
{
|
|
15518
|
+
value: ZERO,
|
|
15519
|
+
size: 16,
|
|
15520
|
+
tableId: element.id,
|
|
15521
|
+
trId: tr.id,
|
|
15522
|
+
tdId
|
|
15523
|
+
}
|
|
15524
|
+
]
|
|
15525
|
+
});
|
|
15526
|
+
}
|
|
15527
|
+
}
|
|
15528
|
+
curTd.rowspan = 1;
|
|
15529
|
+
}
|
|
15530
|
+
const curIndex = curTd.value.length - 1;
|
|
15531
|
+
this.range.setRange(curIndex, curIndex);
|
|
15532
|
+
this.draw.render();
|
|
15533
|
+
this.tableTool.render();
|
|
15534
|
+
}
|
|
15535
|
+
tableTdVerticalAlign(payload) {
|
|
15536
|
+
const rowCol = this.tableParticle.getRangeRowCol();
|
|
15537
|
+
if (!rowCol)
|
|
15538
|
+
return;
|
|
15539
|
+
for (let r = 0; r < rowCol.length; r++) {
|
|
15540
|
+
const row = rowCol[r];
|
|
15541
|
+
for (let c = 0; c < row.length; c++) {
|
|
15542
|
+
const td = row[c];
|
|
15543
|
+
if (!td || td.verticalAlign === payload || !td.verticalAlign && payload === VerticalAlign.TOP) {
|
|
15544
|
+
continue;
|
|
15545
|
+
}
|
|
15546
|
+
td.verticalAlign = payload;
|
|
15547
|
+
}
|
|
15548
|
+
}
|
|
15549
|
+
const { endIndex } = this.range.getRange();
|
|
15550
|
+
this.draw.render({
|
|
15551
|
+
curIndex: endIndex
|
|
15552
|
+
});
|
|
15553
|
+
}
|
|
15554
|
+
tableBorderType(payload) {
|
|
15555
|
+
const positionContext = this.position.getPositionContext();
|
|
15556
|
+
if (!positionContext.isTable)
|
|
15557
|
+
return;
|
|
15558
|
+
const { index: index2 } = positionContext;
|
|
15559
|
+
const originalElementList = this.draw.getOriginalElementList();
|
|
15560
|
+
const element = originalElementList[index2];
|
|
15561
|
+
if (!element.borderType && payload === TableBorder.ALL || element.borderType === payload) {
|
|
15562
|
+
return;
|
|
15563
|
+
}
|
|
15564
|
+
element.borderType = payload;
|
|
15565
|
+
const { endIndex } = this.range.getRange();
|
|
15566
|
+
this.draw.render({
|
|
15567
|
+
curIndex: endIndex
|
|
15568
|
+
});
|
|
15569
|
+
}
|
|
15570
|
+
tableTdBorderType(payload) {
|
|
15571
|
+
const rowCol = this.tableParticle.getRangeRowCol();
|
|
15572
|
+
if (!rowCol)
|
|
15573
|
+
return;
|
|
15574
|
+
const tdList = rowCol.flat();
|
|
15575
|
+
const isSetBorderType = tdList.some((td) => {
|
|
15576
|
+
var _a;
|
|
15577
|
+
return !((_a = td.borderTypes) == null ? void 0 : _a.includes(payload));
|
|
15578
|
+
});
|
|
15579
|
+
tdList.forEach((td) => {
|
|
15580
|
+
if (!td.borderTypes) {
|
|
15581
|
+
td.borderTypes = [];
|
|
15582
|
+
}
|
|
15583
|
+
const borderTypeIndex = td.borderTypes.findIndex((type) => type === payload);
|
|
15584
|
+
if (isSetBorderType) {
|
|
15585
|
+
if (!~borderTypeIndex) {
|
|
15586
|
+
td.borderTypes.push(payload);
|
|
15587
|
+
}
|
|
15588
|
+
} else {
|
|
15589
|
+
if (~borderTypeIndex) {
|
|
15590
|
+
td.borderTypes.splice(borderTypeIndex, 1);
|
|
15591
|
+
}
|
|
15592
|
+
}
|
|
15593
|
+
if (!td.borderTypes.length) {
|
|
15594
|
+
delete td.borderTypes;
|
|
15595
|
+
}
|
|
15596
|
+
});
|
|
15597
|
+
const { endIndex } = this.range.getRange();
|
|
15598
|
+
this.draw.render({
|
|
15599
|
+
curIndex: endIndex
|
|
15600
|
+
});
|
|
15601
|
+
}
|
|
15602
|
+
tableTdSlashType(payload) {
|
|
15603
|
+
const rowCol = this.tableParticle.getRangeRowCol();
|
|
15604
|
+
if (!rowCol)
|
|
15605
|
+
return;
|
|
15606
|
+
const tdList = rowCol.flat();
|
|
15607
|
+
const isSetTdSlashType = tdList.some((td) => {
|
|
15608
|
+
var _a;
|
|
15609
|
+
return !((_a = td.slashTypes) == null ? void 0 : _a.includes(payload));
|
|
15610
|
+
});
|
|
15611
|
+
tdList.forEach((td) => {
|
|
15612
|
+
if (!td.slashTypes) {
|
|
15613
|
+
td.slashTypes = [];
|
|
15614
|
+
}
|
|
15615
|
+
const slashTypeIndex = td.slashTypes.findIndex((type) => type === payload);
|
|
15616
|
+
if (isSetTdSlashType) {
|
|
15617
|
+
if (!~slashTypeIndex) {
|
|
15618
|
+
td.slashTypes.push(payload);
|
|
15619
|
+
}
|
|
15620
|
+
} else {
|
|
15621
|
+
if (~slashTypeIndex) {
|
|
15622
|
+
td.slashTypes.splice(slashTypeIndex, 1);
|
|
15623
|
+
}
|
|
15624
|
+
}
|
|
15625
|
+
if (!td.slashTypes.length) {
|
|
15626
|
+
delete td.slashTypes;
|
|
15627
|
+
}
|
|
15628
|
+
});
|
|
15629
|
+
const { endIndex } = this.range.getRange();
|
|
15630
|
+
this.draw.render({
|
|
15631
|
+
curIndex: endIndex
|
|
15632
|
+
});
|
|
15633
|
+
}
|
|
15634
|
+
tableTdBackgroundColor(payload) {
|
|
15635
|
+
const rowCol = this.tableParticle.getRangeRowCol();
|
|
15636
|
+
if (!rowCol)
|
|
15637
|
+
return;
|
|
15638
|
+
for (let r = 0; r < rowCol.length; r++) {
|
|
15639
|
+
const row = rowCol[r];
|
|
15640
|
+
for (let c = 0; c < row.length; c++) {
|
|
15641
|
+
const col = row[c];
|
|
15642
|
+
col.backgroundColor = payload;
|
|
15643
|
+
}
|
|
15644
|
+
}
|
|
15645
|
+
const { endIndex } = this.range.getRange();
|
|
15646
|
+
this.range.setRange(endIndex, endIndex);
|
|
15647
|
+
this.draw.render({
|
|
15648
|
+
isCompute: false
|
|
15649
|
+
});
|
|
15650
|
+
}
|
|
15651
|
+
tableSelectAll() {
|
|
15652
|
+
const positionContext = this.position.getPositionContext();
|
|
15653
|
+
const { index: index2, tableId, isTable } = positionContext;
|
|
15654
|
+
if (!isTable || !tableId)
|
|
15655
|
+
return;
|
|
15656
|
+
const { startIndex, endIndex } = this.range.getRange();
|
|
15657
|
+
const originalElementList = this.draw.getOriginalElementList();
|
|
15658
|
+
const trList = originalElementList[index2].trList;
|
|
15659
|
+
const endTrIndex = trList.length - 1;
|
|
15660
|
+
const endTdIndex = trList[endTrIndex].tdList.length - 1;
|
|
15661
|
+
this.range.replaceRange({
|
|
15662
|
+
startIndex,
|
|
15663
|
+
endIndex,
|
|
15664
|
+
tableId,
|
|
15665
|
+
startTdIndex: 0,
|
|
15666
|
+
endTdIndex,
|
|
15667
|
+
startTrIndex: 0,
|
|
15668
|
+
endTrIndex
|
|
15669
|
+
});
|
|
15670
|
+
this.draw.render({
|
|
15671
|
+
isCompute: false,
|
|
15672
|
+
isSubmitHistory: false
|
|
15673
|
+
});
|
|
15674
|
+
}
|
|
15675
|
+
}
|
|
15676
|
+
class Draw {
|
|
15677
|
+
constructor(rootContainer, options, data2, listener, eventBus, override) {
|
|
15678
|
+
__publicField(this, "container");
|
|
15679
|
+
__publicField(this, "pageContainer");
|
|
15680
|
+
__publicField(this, "pageList");
|
|
15681
|
+
__publicField(this, "ctxList");
|
|
15682
|
+
__publicField(this, "pageNo");
|
|
15683
|
+
__publicField(this, "pagePixelRatio");
|
|
15684
|
+
__publicField(this, "mode");
|
|
15685
|
+
__publicField(this, "options");
|
|
15686
|
+
__publicField(this, "position");
|
|
15687
|
+
__publicField(this, "zone");
|
|
15688
|
+
__publicField(this, "elementList");
|
|
15689
|
+
__publicField(this, "listener");
|
|
15690
|
+
__publicField(this, "eventBus");
|
|
15691
|
+
__publicField(this, "override");
|
|
15692
|
+
__publicField(this, "i18n");
|
|
15693
|
+
__publicField(this, "canvasEvent");
|
|
15694
|
+
__publicField(this, "globalEvent");
|
|
15695
|
+
__publicField(this, "cursor");
|
|
15696
|
+
__publicField(this, "range");
|
|
15697
|
+
__publicField(this, "margin");
|
|
15698
|
+
__publicField(this, "background");
|
|
15699
|
+
__publicField(this, "search");
|
|
15700
|
+
__publicField(this, "group");
|
|
15701
|
+
__publicField(this, "underline");
|
|
15702
|
+
__publicField(this, "strikeout");
|
|
15703
|
+
__publicField(this, "highlight");
|
|
15704
|
+
__publicField(this, "historyManager");
|
|
15705
|
+
__publicField(this, "previewer");
|
|
15706
|
+
__publicField(this, "imageParticle");
|
|
15707
|
+
__publicField(this, "laTexParticle");
|
|
15708
|
+
__publicField(this, "textParticle");
|
|
15709
|
+
__publicField(this, "tableParticle");
|
|
15710
|
+
__publicField(this, "tableTool");
|
|
15711
|
+
__publicField(this, "tableOperate");
|
|
15712
|
+
__publicField(this, "pageNumber");
|
|
15713
|
+
__publicField(this, "lineNumber");
|
|
15714
|
+
__publicField(this, "waterMark");
|
|
15715
|
+
__publicField(this, "placeholder");
|
|
15716
|
+
__publicField(this, "header");
|
|
15717
|
+
__publicField(this, "footer");
|
|
15718
|
+
__publicField(this, "hyperlinkParticle");
|
|
15719
|
+
__publicField(this, "dateParticle");
|
|
15720
|
+
__publicField(this, "separatorParticle");
|
|
15721
|
+
__publicField(this, "pageBreakParticle");
|
|
15722
|
+
__publicField(this, "superscriptParticle");
|
|
15723
|
+
__publicField(this, "subscriptParticle");
|
|
15724
|
+
__publicField(this, "checkboxParticle");
|
|
15725
|
+
__publicField(this, "radioParticle");
|
|
15726
|
+
__publicField(this, "blockParticle");
|
|
15727
|
+
__publicField(this, "listParticle");
|
|
15728
|
+
__publicField(this, "lineBreakParticle");
|
|
15729
|
+
__publicField(this, "control");
|
|
15730
|
+
__publicField(this, "pageBorder");
|
|
15731
|
+
__publicField(this, "workerManager");
|
|
15732
|
+
__publicField(this, "scrollObserver");
|
|
15733
|
+
__publicField(this, "selectionObserver");
|
|
15734
|
+
__publicField(this, "imageObserver");
|
|
15735
|
+
__publicField(this, "LETTER_REG");
|
|
15736
|
+
__publicField(this, "WORD_LIKE_REG");
|
|
15737
|
+
__publicField(this, "rowList");
|
|
15738
|
+
__publicField(this, "pageRowList");
|
|
15739
|
+
__publicField(this, "painterStyle");
|
|
15740
|
+
__publicField(this, "painterOptions");
|
|
15741
|
+
__publicField(this, "visiblePageNoList");
|
|
15742
|
+
__publicField(this, "intersectionPageNo");
|
|
15743
|
+
__publicField(this, "lazyRenderIntersectionObserver");
|
|
15744
|
+
__publicField(this, "printModeData");
|
|
15745
|
+
this.container = this._wrapContainer(rootContainer);
|
|
15746
|
+
this.pageList = [];
|
|
15747
|
+
this.ctxList = [];
|
|
15748
|
+
this.pageNo = 0;
|
|
15749
|
+
this.pagePixelRatio = null;
|
|
15750
|
+
this.mode = options.mode;
|
|
15751
|
+
this.options = options;
|
|
15752
|
+
this.elementList = data2.main;
|
|
15753
|
+
this.listener = listener;
|
|
15754
|
+
this.eventBus = eventBus;
|
|
15755
|
+
this.override = override;
|
|
15756
|
+
this._formatContainer();
|
|
15757
|
+
this.pageContainer = this._createPageContainer();
|
|
15758
|
+
this._createPage(0);
|
|
15759
|
+
this.i18n = new I18n();
|
|
15760
|
+
this.historyManager = new HistoryManager(this);
|
|
15761
|
+
this.position = new Position(this);
|
|
15762
|
+
this.zone = new Zone(this);
|
|
15763
|
+
this.range = new RangeManager(this);
|
|
15764
|
+
this.margin = new Margin(this);
|
|
15765
|
+
this.background = new Background(this);
|
|
15766
|
+
this.search = new Search(this);
|
|
15767
|
+
this.group = new Group(this);
|
|
15768
|
+
this.underline = new Underline(this);
|
|
15769
|
+
this.strikeout = new Strikeout(this);
|
|
15770
|
+
this.highlight = new Highlight(this);
|
|
15771
|
+
this.previewer = new Previewer(this);
|
|
15772
|
+
this.imageParticle = new ImageParticle(this);
|
|
15773
|
+
this.laTexParticle = new LaTexParticle(this);
|
|
15774
|
+
this.textParticle = new TextParticle(this);
|
|
15775
|
+
this.tableParticle = new TableParticle(this);
|
|
15776
|
+
this.tableTool = new TableTool(this);
|
|
15777
|
+
this.tableOperate = new TableOperate(this);
|
|
15778
|
+
this.pageNumber = new PageNumber(this);
|
|
15779
|
+
this.lineNumber = new LineNumber(this);
|
|
15780
|
+
this.waterMark = new Watermark(this);
|
|
15781
|
+
this.placeholder = new Placeholder(this);
|
|
15782
|
+
this.header = new Header(this, data2.header);
|
|
15783
|
+
this.footer = new Footer(this, data2.footer);
|
|
15784
|
+
this.hyperlinkParticle = new HyperlinkParticle(this);
|
|
15785
|
+
this.dateParticle = new DateParticle(this);
|
|
15786
|
+
this.separatorParticle = new SeparatorParticle(this);
|
|
15787
|
+
this.pageBreakParticle = new PageBreakParticle(this);
|
|
15788
|
+
this.superscriptParticle = new SuperscriptParticle();
|
|
15789
|
+
this.subscriptParticle = new SubscriptParticle();
|
|
15790
|
+
this.checkboxParticle = new CheckboxParticle(this);
|
|
15791
|
+
this.radioParticle = new RadioParticle(this);
|
|
15792
|
+
this.blockParticle = new BlockParticle(this);
|
|
15793
|
+
this.listParticle = new ListParticle(this);
|
|
15794
|
+
this.lineBreakParticle = new LineBreakParticle(this);
|
|
15795
|
+
this.control = new Control(this);
|
|
15796
|
+
this.pageBorder = new PageBorder(this);
|
|
15797
|
+
this.scrollObserver = new ScrollObserver(this);
|
|
15798
|
+
this.selectionObserver = new SelectionObserver(this);
|
|
15799
|
+
this.imageObserver = new ImageObserver();
|
|
15800
|
+
new MouseObserver(this);
|
|
15801
|
+
this.canvasEvent = new CanvasEvent(this);
|
|
15802
|
+
this.cursor = new Cursor(this, this.canvasEvent);
|
|
15803
|
+
this.canvasEvent.register();
|
|
15804
|
+
this.globalEvent = new GlobalEvent(this, this.canvasEvent);
|
|
15805
|
+
this.globalEvent.register();
|
|
15806
|
+
this.workerManager = new WorkerManager(this);
|
|
15807
|
+
new Actuator(this);
|
|
15808
|
+
const { letterClass } = options;
|
|
15809
|
+
this.LETTER_REG = new RegExp(`[${letterClass.join("")}]`);
|
|
15810
|
+
this.WORD_LIKE_REG = new RegExp(`${letterClass.map((letter) => `[^${letter}][${letter}]`).join("|")}`);
|
|
15811
|
+
this.rowList = [];
|
|
15812
|
+
this.pageRowList = [];
|
|
15813
|
+
this.painterStyle = null;
|
|
15814
|
+
this.painterOptions = null;
|
|
15815
|
+
this.visiblePageNoList = [];
|
|
15816
|
+
this.intersectionPageNo = 0;
|
|
15817
|
+
this.lazyRenderIntersectionObserver = null;
|
|
15818
|
+
this.printModeData = null;
|
|
15819
|
+
this.render({
|
|
15820
|
+
isInit: true,
|
|
15821
|
+
isSetCursor: false,
|
|
15822
|
+
isFirstRender: true
|
|
15823
|
+
});
|
|
15824
|
+
}
|
|
15825
|
+
getLetterReg() {
|
|
15826
|
+
return this.LETTER_REG;
|
|
15827
|
+
}
|
|
15828
|
+
getMode() {
|
|
15829
|
+
return this.mode;
|
|
15830
|
+
}
|
|
15831
|
+
setMode(payload) {
|
|
15832
|
+
if (this.mode === payload)
|
|
15833
|
+
return;
|
|
15834
|
+
if (payload === EditorMode.PRINT) {
|
|
15835
|
+
this.printModeData = {
|
|
15836
|
+
header: this.header.getElementList(),
|
|
15837
|
+
main: this.elementList,
|
|
15838
|
+
footer: this.footer.getElementList()
|
|
15839
|
+
};
|
|
15840
|
+
const clonePrintModeData = deepClone(this.printModeData);
|
|
15841
|
+
const editorDataKeys = ["header", "main", "footer"];
|
|
15842
|
+
editorDataKeys.forEach((key) => {
|
|
15843
|
+
clonePrintModeData[key] = this.control.filterAssistElement(clonePrintModeData[key]);
|
|
15844
|
+
});
|
|
15845
|
+
this.setEditorData(clonePrintModeData);
|
|
15846
|
+
}
|
|
15847
|
+
if (this.mode === EditorMode.PRINT && this.printModeData) {
|
|
15848
|
+
this.setEditorData(this.printModeData);
|
|
15849
|
+
this.printModeData = null;
|
|
15850
|
+
}
|
|
15851
|
+
this.clearSideEffect();
|
|
15852
|
+
this.range.clearRange();
|
|
15853
|
+
this.mode = payload;
|
|
15854
|
+
this.options.mode = payload;
|
|
15855
|
+
this.render({
|
|
15856
|
+
isSetCursor: false,
|
|
15857
|
+
isSubmitHistory: false
|
|
15858
|
+
});
|
|
15022
15859
|
}
|
|
15023
15860
|
isReadonly() {
|
|
15024
15861
|
switch (this.mode) {
|
|
@@ -15403,6 +16240,9 @@ class Draw {
|
|
|
15403
16240
|
getTableTool() {
|
|
15404
16241
|
return this.tableTool;
|
|
15405
16242
|
}
|
|
16243
|
+
getTableOperate() {
|
|
16244
|
+
return this.tableOperate;
|
|
16245
|
+
}
|
|
15406
16246
|
getTableParticle() {
|
|
15407
16247
|
return this.tableParticle;
|
|
15408
16248
|
}
|
|
@@ -15750,7 +16590,7 @@ class Draw {
|
|
|
15750
16590
|
}
|
|
15751
16591
|
computeRowList(payload) {
|
|
15752
16592
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
15753
|
-
const { innerWidth, elementList, isPagingMode = false } = payload;
|
|
16593
|
+
const { innerWidth, elementList, isPagingMode = false, isFromTable = false, startX = 0, startY = 0, pageHeight = 0, mainOuterHeight = 0, surroundElementList = [] } = payload;
|
|
15754
16594
|
const { defaultSize, defaultRowMargin, scale, table: { tdPadding }, defaultTabWidth } = this.options;
|
|
15755
16595
|
const defaultBasicRowMarginHeight = this.getDefaultBasicRowMarginHeight();
|
|
15756
16596
|
const canvas = document.createElement("canvas");
|
|
@@ -15768,6 +16608,9 @@ class Draw {
|
|
|
15768
16608
|
rowFlex: ((_a = elementList == null ? void 0 : elementList[0]) == null ? void 0 : _a.rowFlex) || ((_b = elementList == null ? void 0 : elementList[1]) == null ? void 0 : _b.rowFlex)
|
|
15769
16609
|
});
|
|
15770
16610
|
}
|
|
16611
|
+
let x = startX;
|
|
16612
|
+
let y = startY;
|
|
16613
|
+
let pageNo = 0;
|
|
15771
16614
|
let listId;
|
|
15772
16615
|
let listIndex = 0;
|
|
15773
16616
|
let controlRealWidth = 0;
|
|
@@ -15783,8 +16626,9 @@ class Draw {
|
|
|
15783
16626
|
};
|
|
15784
16627
|
const offsetX = curRow.offsetX || element.listId && listStyleMap.get(element.listId) || 0;
|
|
15785
16628
|
const availableWidth = innerWidth - offsetX;
|
|
16629
|
+
x += curRow.elementList.length === 1 ? offsetX : 0;
|
|
15786
16630
|
if (element.type === ElementType.IMAGE || element.type === ElementType.LATEX) {
|
|
15787
|
-
if (element.imgDisplay === ImageDisplay.FLOAT_TOP || element.imgDisplay === ImageDisplay.FLOAT_BOTTOM) {
|
|
16631
|
+
if (element.imgDisplay === ImageDisplay.SURROUND || element.imgDisplay === ImageDisplay.FLOAT_TOP || element.imgDisplay === ImageDisplay.FLOAT_BOTTOM) {
|
|
15788
16632
|
metrics.width = 0;
|
|
15789
16633
|
metrics.height = 0;
|
|
15790
16634
|
metrics.boundingBoxDescent = 0;
|
|
@@ -15837,6 +16681,7 @@ class Draw {
|
|
|
15837
16681
|
const rowList2 = this.computeRowList({
|
|
15838
16682
|
innerWidth: (td.width - tdPaddingWidth) * scale,
|
|
15839
16683
|
elementList: td.value,
|
|
16684
|
+
isFromTable: true,
|
|
15840
16685
|
isPagingMode
|
|
15841
16686
|
});
|
|
15842
16687
|
const rowHeight = rowList2.reduce((pre, cur) => pre + cur.height, 0);
|
|
@@ -16045,6 +16890,7 @@ class Draw {
|
|
|
16045
16890
|
const height = rowMargin + metrics.boundingBoxAscent + metrics.boundingBoxDescent + rowMargin;
|
|
16046
16891
|
const rowElement = Object.assign(element, {
|
|
16047
16892
|
metrics,
|
|
16893
|
+
left: 0,
|
|
16048
16894
|
style: this.getElementFont(element, scale)
|
|
16049
16895
|
});
|
|
16050
16896
|
if ((_g = rowElement.control) == null ? void 0 : _g.minWidth) {
|
|
@@ -16058,8 +16904,6 @@ class Draw {
|
|
|
16058
16904
|
const left2 = Math.min(rowRemainingWidth, extraWidth) * scale;
|
|
16059
16905
|
rowElement.left = left2;
|
|
16060
16906
|
curRow.width += left2;
|
|
16061
|
-
} else {
|
|
16062
|
-
rowElement.left = 0;
|
|
16063
16907
|
}
|
|
16064
16908
|
controlRealWidth = 0;
|
|
16065
16909
|
}
|
|
@@ -16090,9 +16934,26 @@ class Draw {
|
|
|
16090
16934
|
}
|
|
16091
16935
|
}
|
|
16092
16936
|
listId = element.listId;
|
|
16937
|
+
const surroundPosition = this.position.setSurroundPosition({
|
|
16938
|
+
pageNo,
|
|
16939
|
+
rowElement,
|
|
16940
|
+
row: curRow,
|
|
16941
|
+
rowElementRect: {
|
|
16942
|
+
x,
|
|
16943
|
+
y,
|
|
16944
|
+
height,
|
|
16945
|
+
width: metrics.width
|
|
16946
|
+
},
|
|
16947
|
+
availableWidth,
|
|
16948
|
+
surroundElementList
|
|
16949
|
+
});
|
|
16950
|
+
x = surroundPosition.x;
|
|
16951
|
+
curRowWidth += surroundPosition.rowIncreaseWidth;
|
|
16952
|
+
x += metrics.width;
|
|
16093
16953
|
const isForceBreak = element.type === ElementType.SEPARATOR || element.type === ElementType.TABLE || (preElement == null ? void 0 : preElement.type) === ElementType.TABLE || (preElement == null ? void 0 : preElement.type) === ElementType.BLOCK || element.type === ElementType.BLOCK || (preElement == null ? void 0 : preElement.imgDisplay) === ImageDisplay.INLINE || element.imgDisplay === ImageDisplay.INLINE || (preElement == null ? void 0 : preElement.listId) !== element.listId || i !== 0 && element.value === ZERO;
|
|
16094
16954
|
const isWidthNotEnough = curRowWidth > availableWidth;
|
|
16095
|
-
|
|
16955
|
+
const isWrap = isForceBreak || isWidthNotEnough;
|
|
16956
|
+
if (isWrap) {
|
|
16096
16957
|
const row = {
|
|
16097
16958
|
width: metrics.width,
|
|
16098
16959
|
height,
|
|
@@ -16133,9 +16994,9 @@ class Draw {
|
|
|
16133
16994
|
}
|
|
16134
16995
|
curRow.elementList.push(rowElement);
|
|
16135
16996
|
}
|
|
16136
|
-
if (
|
|
16997
|
+
if (isWrap || i === elementList.length - 1) {
|
|
16137
16998
|
curRow.isWidthNotEnough = isWidthNotEnough && !isForceBreak;
|
|
16138
|
-
if ((preElement == null ? void 0 : preElement.rowFlex) === RowFlex.JUSTIFY || (preElement == null ? void 0 : preElement.rowFlex) === RowFlex.ALIGNMENT && isWidthNotEnough) {
|
|
16999
|
+
if (!curRow.isSurround && ((preElement == null ? void 0 : preElement.rowFlex) === RowFlex.JUSTIFY || (preElement == null ? void 0 : preElement.rowFlex) === RowFlex.ALIGNMENT && isWidthNotEnough)) {
|
|
16139
17000
|
const rowElementList = ((_k = curRow.elementList[0]) == null ? void 0 : _k.value) === ZERO ? curRow.elementList.slice(1) : curRow.elementList;
|
|
16140
17001
|
const gap = (availableWidth - curRow.width) / (rowElementList.length - 1);
|
|
16141
17002
|
for (let e = 0; e < rowElementList.length - 1; e++) {
|
|
@@ -16145,6 +17006,32 @@ class Draw {
|
|
|
16145
17006
|
curRow.width = availableWidth;
|
|
16146
17007
|
}
|
|
16147
17008
|
}
|
|
17009
|
+
if (isWrap) {
|
|
17010
|
+
x = startX;
|
|
17011
|
+
y += curRow.height;
|
|
17012
|
+
if (isPagingMode && !isFromTable && pageHeight && (y - startY + mainOuterHeight + height > pageHeight || element.type === ElementType.PAGE_BREAK)) {
|
|
17013
|
+
y = startY;
|
|
17014
|
+
deleteSurroundElementList(surroundElementList, pageNo);
|
|
17015
|
+
pageNo += 1;
|
|
17016
|
+
}
|
|
17017
|
+
rowElement.left = 0;
|
|
17018
|
+
const nextRow = rowList[rowList.length - 1];
|
|
17019
|
+
const surroundPosition2 = this.position.setSurroundPosition({
|
|
17020
|
+
pageNo,
|
|
17021
|
+
rowElement,
|
|
17022
|
+
row: nextRow,
|
|
17023
|
+
rowElementRect: {
|
|
17024
|
+
x,
|
|
17025
|
+
y,
|
|
17026
|
+
height,
|
|
17027
|
+
width: metrics.width
|
|
17028
|
+
},
|
|
17029
|
+
availableWidth,
|
|
17030
|
+
surroundElementList
|
|
17031
|
+
});
|
|
17032
|
+
x = surroundPosition2.x;
|
|
17033
|
+
x += metrics.width;
|
|
17034
|
+
}
|
|
16148
17035
|
}
|
|
16149
17036
|
return rowList;
|
|
16150
17037
|
}
|
|
@@ -16238,7 +17125,7 @@ class Draw {
|
|
|
16238
17125
|
const preElement = curRow.elementList[j - 1];
|
|
16239
17126
|
if (element.type === ElementType.IMAGE) {
|
|
16240
17127
|
this.textParticle.complete();
|
|
16241
|
-
if (element.imgDisplay !== ImageDisplay.FLOAT_TOP && element.imgDisplay !== ImageDisplay.FLOAT_BOTTOM) {
|
|
17128
|
+
if (element.imgDisplay !== ImageDisplay.SURROUND && element.imgDisplay !== ImageDisplay.FLOAT_TOP && element.imgDisplay !== ImageDisplay.FLOAT_BOTTOM) {
|
|
16242
17129
|
this.imageParticle.render(ctx, element, x, y + offsetY);
|
|
16243
17130
|
}
|
|
16244
17131
|
} else if (element.type === ElementType.LATEX) {
|
|
@@ -16428,11 +17315,11 @@ class Draw {
|
|
|
16428
17315
|
_drawFloat(ctx, payload) {
|
|
16429
17316
|
const { scale } = this.options;
|
|
16430
17317
|
const floatPositionList = this.position.getFloatPositionList();
|
|
16431
|
-
const {
|
|
17318
|
+
const { imgDisplays, pageNo } = payload;
|
|
16432
17319
|
for (let e = 0; e < floatPositionList.length; e++) {
|
|
16433
17320
|
const floatPosition = floatPositionList[e];
|
|
16434
17321
|
const element = floatPosition.element;
|
|
16435
|
-
if ((pageNo === floatPosition.pageNo || floatPosition.zone === EditorZone.HEADER || floatPosition.zone == EditorZone.FOOTER) && element.imgDisplay
|
|
17322
|
+
if ((pageNo === floatPosition.pageNo || floatPosition.zone === EditorZone.HEADER || floatPosition.zone == EditorZone.FOOTER) && element.imgDisplay && imgDisplays.includes(element.imgDisplay) && element.type === ElementType.IMAGE) {
|
|
16436
17323
|
const imgFloatPosition = element.imgFloatPosition;
|
|
16437
17324
|
this.imageParticle.render(ctx, element, imgFloatPosition.x * scale, imgFloatPosition.y * scale);
|
|
16438
17325
|
}
|
|
@@ -16458,7 +17345,7 @@ class Draw {
|
|
|
16458
17345
|
}
|
|
16459
17346
|
this._drawFloat(ctx, {
|
|
16460
17347
|
pageNo,
|
|
16461
|
-
|
|
17348
|
+
imgDisplays: [ImageDisplay.FLOAT_BOTTOM]
|
|
16462
17349
|
});
|
|
16463
17350
|
this.control.renderHighlightList(ctx, pageNo);
|
|
16464
17351
|
const index2 = (_a = rowList[0]) == null ? void 0 : _a.startIndex;
|
|
@@ -16484,7 +17371,7 @@ class Draw {
|
|
|
16484
17371
|
}
|
|
16485
17372
|
this._drawFloat(ctx, {
|
|
16486
17373
|
pageNo,
|
|
16487
|
-
|
|
17374
|
+
imgDisplays: [ImageDisplay.FLOAT_TOP, ImageDisplay.SURROUND]
|
|
16488
17375
|
});
|
|
16489
17376
|
if (this.search.getSearchKeyword()) {
|
|
16490
17377
|
this.search.render(ctx, pageNo);
|
|
@@ -16555,9 +17442,21 @@ class Draw {
|
|
|
16555
17442
|
this.footer.compute();
|
|
16556
17443
|
}
|
|
16557
17444
|
}
|
|
17445
|
+
const margins = this.getMargins();
|
|
17446
|
+
const pageHeight = this.getHeight();
|
|
17447
|
+
const extraHeight = this.header.getExtraHeight();
|
|
17448
|
+
const mainOuterHeight = this.getMainOuterHeight();
|
|
17449
|
+
const startX = margins[3];
|
|
17450
|
+
const startY = margins[0] + extraHeight;
|
|
17451
|
+
const surroundElementList = pickSurroundElementList(this.elementList);
|
|
16558
17452
|
this.rowList = this.computeRowList({
|
|
17453
|
+
startX,
|
|
17454
|
+
startY,
|
|
17455
|
+
pageHeight,
|
|
17456
|
+
mainOuterHeight,
|
|
16559
17457
|
isPagingMode,
|
|
16560
17458
|
innerWidth,
|
|
17459
|
+
surroundElementList,
|
|
16561
17460
|
elementList: this.elementList
|
|
16562
17461
|
});
|
|
16563
17462
|
this.pageRowList = this._computePageList();
|
|
@@ -17187,25 +18086,25 @@ class CommandAdapt {
|
|
|
17187
18086
|
__publicField(this, "position");
|
|
17188
18087
|
__publicField(this, "historyManager");
|
|
17189
18088
|
__publicField(this, "canvasEvent");
|
|
17190
|
-
__publicField(this, "tableTool");
|
|
17191
18089
|
__publicField(this, "options");
|
|
17192
18090
|
__publicField(this, "control");
|
|
17193
18091
|
__publicField(this, "workerManager");
|
|
17194
18092
|
__publicField(this, "searchManager");
|
|
17195
18093
|
__publicField(this, "i18n");
|
|
17196
18094
|
__publicField(this, "zone");
|
|
18095
|
+
__publicField(this, "tableOperate");
|
|
17197
18096
|
this.draw = draw;
|
|
17198
18097
|
this.range = draw.getRange();
|
|
17199
18098
|
this.position = draw.getPosition();
|
|
17200
18099
|
this.historyManager = draw.getHistoryManager();
|
|
17201
18100
|
this.canvasEvent = draw.getCanvasEvent();
|
|
17202
|
-
this.tableTool = draw.getTableTool();
|
|
17203
18101
|
this.options = draw.getOptions();
|
|
17204
18102
|
this.control = draw.getControl();
|
|
17205
18103
|
this.workerManager = draw.getWorkerManager();
|
|
17206
18104
|
this.searchManager = draw.getSearch();
|
|
17207
18105
|
this.i18n = draw.getI18n();
|
|
17208
18106
|
this.zone = draw.getZone();
|
|
18107
|
+
this.tableOperate = draw.getTableOperate();
|
|
17209
18108
|
}
|
|
17210
18109
|
mode(payload) {
|
|
17211
18110
|
this.draw.setMode(payload);
|
|
@@ -17496,1026 +18395,384 @@ class CommandAdapt {
|
|
|
17496
18395
|
el.size -= 2;
|
|
17497
18396
|
}
|
|
17498
18397
|
isExistUpdate = true;
|
|
17499
|
-
});
|
|
17500
|
-
if (isExistUpdate) {
|
|
17501
|
-
this.draw.render(renderOption);
|
|
17502
|
-
}
|
|
17503
|
-
}
|
|
17504
|
-
bold() {
|
|
17505
|
-
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
17506
|
-
if (isDisabled)
|
|
17507
|
-
return;
|
|
17508
|
-
const selection = this.range.getSelectionElementList();
|
|
17509
|
-
if (selection == null ? void 0 : selection.length) {
|
|
17510
|
-
const noBoldIndex = selection.findIndex((s) => !s.bold);
|
|
17511
|
-
selection.forEach((el) => {
|
|
17512
|
-
el.bold = !!~noBoldIndex;
|
|
17513
|
-
});
|
|
17514
|
-
this.draw.render({ isSetCursor: false });
|
|
17515
|
-
} else {
|
|
17516
|
-
const { endIndex } = this.range.getRange();
|
|
17517
|
-
const elementList = this.draw.getElementList();
|
|
17518
|
-
const enterElement = elementList[endIndex];
|
|
17519
|
-
if ((enterElement == null ? void 0 : enterElement.value) === ZERO) {
|
|
17520
|
-
enterElement.bold = !enterElement.bold;
|
|
17521
|
-
this.draw.render({ curIndex: endIndex, isCompute: false });
|
|
17522
|
-
}
|
|
17523
|
-
}
|
|
17524
|
-
}
|
|
17525
|
-
italic() {
|
|
17526
|
-
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
17527
|
-
if (isDisabled)
|
|
17528
|
-
return;
|
|
17529
|
-
const selection = this.range.getSelectionElementList();
|
|
17530
|
-
if (selection == null ? void 0 : selection.length) {
|
|
17531
|
-
const noItalicIndex = selection.findIndex((s) => !s.italic);
|
|
17532
|
-
selection.forEach((el) => {
|
|
17533
|
-
el.italic = !!~noItalicIndex;
|
|
17534
|
-
});
|
|
17535
|
-
this.draw.render({ isSetCursor: false });
|
|
17536
|
-
} else {
|
|
17537
|
-
const { endIndex } = this.range.getRange();
|
|
17538
|
-
const elementList = this.draw.getElementList();
|
|
17539
|
-
const enterElement = elementList[endIndex];
|
|
17540
|
-
if ((enterElement == null ? void 0 : enterElement.value) === ZERO) {
|
|
17541
|
-
enterElement.italic = !enterElement.italic;
|
|
17542
|
-
this.draw.render({ curIndex: endIndex, isCompute: false });
|
|
17543
|
-
}
|
|
17544
|
-
}
|
|
17545
|
-
}
|
|
17546
|
-
underline(textDecoration) {
|
|
17547
|
-
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
17548
|
-
if (isDisabled)
|
|
17549
|
-
return;
|
|
17550
|
-
const selection = this.range.getSelectionElementList();
|
|
17551
|
-
if (selection == null ? void 0 : selection.length) {
|
|
17552
|
-
const isSetUnderline = selection.some((s) => !s.underline || !textDecoration && s.textDecoration || textDecoration && !s.textDecoration || textDecoration && s.textDecoration && !isObjectEqual(s.textDecoration, textDecoration));
|
|
17553
|
-
selection.forEach((el) => {
|
|
17554
|
-
el.underline = isSetUnderline;
|
|
17555
|
-
if (isSetUnderline && textDecoration) {
|
|
17556
|
-
el.textDecoration = textDecoration;
|
|
17557
|
-
} else {
|
|
17558
|
-
delete el.textDecoration;
|
|
17559
|
-
}
|
|
17560
|
-
});
|
|
17561
|
-
this.draw.render({
|
|
17562
|
-
isSetCursor: false,
|
|
17563
|
-
isCompute: false
|
|
17564
|
-
});
|
|
17565
|
-
} else {
|
|
17566
|
-
const { endIndex } = this.range.getRange();
|
|
17567
|
-
const elementList = this.draw.getElementList();
|
|
17568
|
-
const enterElement = elementList[endIndex];
|
|
17569
|
-
if ((enterElement == null ? void 0 : enterElement.value) === ZERO) {
|
|
17570
|
-
enterElement.underline = !enterElement.underline;
|
|
17571
|
-
this.draw.render({ curIndex: endIndex, isCompute: false });
|
|
17572
|
-
}
|
|
17573
|
-
}
|
|
17574
|
-
}
|
|
17575
|
-
strikeout() {
|
|
17576
|
-
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
17577
|
-
if (isDisabled)
|
|
17578
|
-
return;
|
|
17579
|
-
const selection = this.range.getSelectionElementList();
|
|
17580
|
-
if (selection == null ? void 0 : selection.length) {
|
|
17581
|
-
const noStrikeoutIndex = selection.findIndex((s) => !s.strikeout);
|
|
17582
|
-
selection.forEach((el) => {
|
|
17583
|
-
el.strikeout = !!~noStrikeoutIndex;
|
|
17584
|
-
});
|
|
17585
|
-
this.draw.render({
|
|
17586
|
-
isSetCursor: false,
|
|
17587
|
-
isCompute: false
|
|
17588
|
-
});
|
|
17589
|
-
} else {
|
|
17590
|
-
const { endIndex } = this.range.getRange();
|
|
17591
|
-
const elementList = this.draw.getElementList();
|
|
17592
|
-
const enterElement = elementList[endIndex];
|
|
17593
|
-
if ((enterElement == null ? void 0 : enterElement.value) === ZERO) {
|
|
17594
|
-
enterElement.strikeout = !enterElement.strikeout;
|
|
17595
|
-
this.draw.render({ curIndex: endIndex, isCompute: false });
|
|
17596
|
-
}
|
|
17597
|
-
}
|
|
17598
|
-
}
|
|
17599
|
-
superscript() {
|
|
17600
|
-
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
17601
|
-
if (isDisabled)
|
|
17602
|
-
return;
|
|
17603
|
-
const selection = this.range.getSelectionElementList();
|
|
17604
|
-
if (!selection)
|
|
17605
|
-
return;
|
|
17606
|
-
const superscriptIndex = selection.findIndex((s) => s.type === ElementType.SUPERSCRIPT);
|
|
17607
|
-
selection.forEach((el) => {
|
|
17608
|
-
if (~superscriptIndex) {
|
|
17609
|
-
if (el.type === ElementType.SUPERSCRIPT) {
|
|
17610
|
-
el.type = ElementType.TEXT;
|
|
17611
|
-
delete el.actualSize;
|
|
17612
|
-
}
|
|
17613
|
-
} else {
|
|
17614
|
-
if (!el.type || el.type === ElementType.TEXT || el.type === ElementType.SUBSCRIPT) {
|
|
17615
|
-
el.type = ElementType.SUPERSCRIPT;
|
|
17616
|
-
}
|
|
17617
|
-
}
|
|
17618
|
-
});
|
|
17619
|
-
this.draw.render({ isSetCursor: false });
|
|
17620
|
-
}
|
|
17621
|
-
subscript() {
|
|
17622
|
-
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
17623
|
-
if (isDisabled)
|
|
17624
|
-
return;
|
|
17625
|
-
const selection = this.range.getSelectionElementList();
|
|
17626
|
-
if (!selection)
|
|
17627
|
-
return;
|
|
17628
|
-
const subscriptIndex = selection.findIndex((s) => s.type === ElementType.SUBSCRIPT);
|
|
17629
|
-
selection.forEach((el) => {
|
|
17630
|
-
if (~subscriptIndex) {
|
|
17631
|
-
if (el.type === ElementType.SUBSCRIPT) {
|
|
17632
|
-
el.type = ElementType.TEXT;
|
|
17633
|
-
delete el.actualSize;
|
|
17634
|
-
}
|
|
17635
|
-
} else {
|
|
17636
|
-
if (!el.type || el.type === ElementType.TEXT || el.type === ElementType.SUPERSCRIPT) {
|
|
17637
|
-
el.type = ElementType.SUBSCRIPT;
|
|
17638
|
-
}
|
|
17639
|
-
}
|
|
17640
|
-
});
|
|
17641
|
-
this.draw.render({ isSetCursor: false });
|
|
17642
|
-
}
|
|
17643
|
-
color(payload) {
|
|
17644
|
-
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
17645
|
-
if (isDisabled)
|
|
17646
|
-
return;
|
|
17647
|
-
const selection = this.range.getSelectionElementList();
|
|
17648
|
-
if (selection == null ? void 0 : selection.length) {
|
|
17649
|
-
selection.forEach((el) => {
|
|
17650
|
-
if (payload) {
|
|
17651
|
-
el.color = payload;
|
|
17652
|
-
} else {
|
|
17653
|
-
delete el.color;
|
|
17654
|
-
}
|
|
17655
|
-
});
|
|
17656
|
-
this.draw.render({
|
|
17657
|
-
isSetCursor: false,
|
|
17658
|
-
isCompute: false
|
|
17659
|
-
});
|
|
17660
|
-
} else {
|
|
17661
|
-
const { endIndex } = this.range.getRange();
|
|
17662
|
-
const elementList = this.draw.getElementList();
|
|
17663
|
-
const enterElement = elementList[endIndex];
|
|
17664
|
-
if ((enterElement == null ? void 0 : enterElement.value) === ZERO) {
|
|
17665
|
-
if (payload) {
|
|
17666
|
-
enterElement.color = payload;
|
|
17667
|
-
} else {
|
|
17668
|
-
delete enterElement.color;
|
|
17669
|
-
}
|
|
17670
|
-
this.draw.render({ curIndex: endIndex, isCompute: false });
|
|
17671
|
-
}
|
|
18398
|
+
});
|
|
18399
|
+
if (isExistUpdate) {
|
|
18400
|
+
this.draw.render(renderOption);
|
|
17672
18401
|
}
|
|
17673
18402
|
}
|
|
17674
|
-
|
|
18403
|
+
bold() {
|
|
17675
18404
|
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
17676
18405
|
if (isDisabled)
|
|
17677
18406
|
return;
|
|
17678
18407
|
const selection = this.range.getSelectionElementList();
|
|
17679
18408
|
if (selection == null ? void 0 : selection.length) {
|
|
18409
|
+
const noBoldIndex = selection.findIndex((s) => !s.bold);
|
|
17680
18410
|
selection.forEach((el) => {
|
|
17681
|
-
|
|
17682
|
-
el.highlight = payload;
|
|
17683
|
-
} else {
|
|
17684
|
-
delete el.highlight;
|
|
17685
|
-
}
|
|
17686
|
-
});
|
|
17687
|
-
this.draw.render({
|
|
17688
|
-
isSetCursor: false,
|
|
17689
|
-
isCompute: false
|
|
18411
|
+
el.bold = !!~noBoldIndex;
|
|
17690
18412
|
});
|
|
18413
|
+
this.draw.render({ isSetCursor: false });
|
|
17691
18414
|
} else {
|
|
17692
18415
|
const { endIndex } = this.range.getRange();
|
|
17693
18416
|
const elementList = this.draw.getElementList();
|
|
17694
18417
|
const enterElement = elementList[endIndex];
|
|
17695
18418
|
if ((enterElement == null ? void 0 : enterElement.value) === ZERO) {
|
|
17696
|
-
|
|
17697
|
-
enterElement.highlight = payload;
|
|
17698
|
-
} else {
|
|
17699
|
-
delete enterElement.highlight;
|
|
17700
|
-
}
|
|
18419
|
+
enterElement.bold = !enterElement.bold;
|
|
17701
18420
|
this.draw.render({ curIndex: endIndex, isCompute: false });
|
|
17702
18421
|
}
|
|
17703
18422
|
}
|
|
17704
18423
|
}
|
|
17705
|
-
|
|
17706
|
-
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
17707
|
-
if (isDisabled)
|
|
17708
|
-
return;
|
|
17709
|
-
const { startIndex, endIndex } = this.range.getRange();
|
|
17710
|
-
if (!~startIndex && !~endIndex)
|
|
17711
|
-
return;
|
|
17712
|
-
const elementList = this.draw.getElementList();
|
|
17713
|
-
const changeElementList = startIndex === endIndex ? this.range.getRangeParagraphElementList() : elementList.slice(startIndex + 1, endIndex + 1);
|
|
17714
|
-
if (!changeElementList || !changeElementList.length)
|
|
17715
|
-
return;
|
|
17716
|
-
const titleId = getUUID();
|
|
17717
|
-
const titleOptions = this.draw.getOptions().title;
|
|
17718
|
-
changeElementList.forEach((el) => {
|
|
17719
|
-
if (!el.type && el.value === ZERO)
|
|
17720
|
-
return;
|
|
17721
|
-
if (payload) {
|
|
17722
|
-
el.level = payload;
|
|
17723
|
-
el.titleId = titleId;
|
|
17724
|
-
if (isTextLikeElement(el)) {
|
|
17725
|
-
el.size = titleOptions[titleSizeMapping[payload]];
|
|
17726
|
-
el.bold = true;
|
|
17727
|
-
}
|
|
17728
|
-
} else {
|
|
17729
|
-
if (el.titleId) {
|
|
17730
|
-
delete el.titleId;
|
|
17731
|
-
delete el.title;
|
|
17732
|
-
delete el.level;
|
|
17733
|
-
delete el.size;
|
|
17734
|
-
delete el.bold;
|
|
17735
|
-
}
|
|
17736
|
-
}
|
|
17737
|
-
});
|
|
17738
|
-
const isSetCursor = startIndex === endIndex;
|
|
17739
|
-
const curIndex = isSetCursor ? endIndex : startIndex;
|
|
17740
|
-
this.draw.render({ curIndex, isSetCursor });
|
|
17741
|
-
}
|
|
17742
|
-
list(listType, listStyle) {
|
|
17743
|
-
const isReadonly = this.draw.isReadonly();
|
|
17744
|
-
if (isReadonly)
|
|
17745
|
-
return;
|
|
17746
|
-
this.draw.getListParticle().setList(listType, listStyle);
|
|
17747
|
-
}
|
|
17748
|
-
rowFlex(payload) {
|
|
17749
|
-
const isReadonly = this.draw.isReadonly();
|
|
17750
|
-
if (isReadonly)
|
|
17751
|
-
return;
|
|
17752
|
-
const { startIndex, endIndex } = this.range.getRange();
|
|
17753
|
-
if (!~startIndex && !~endIndex)
|
|
17754
|
-
return;
|
|
17755
|
-
const rowElementList = this.range.getRangeRowElementList();
|
|
17756
|
-
if (!rowElementList)
|
|
17757
|
-
return;
|
|
17758
|
-
rowElementList.forEach((element) => {
|
|
17759
|
-
element.rowFlex = payload;
|
|
17760
|
-
});
|
|
17761
|
-
const isSetCursor = startIndex === endIndex;
|
|
17762
|
-
const curIndex = isSetCursor ? endIndex : startIndex;
|
|
17763
|
-
this.draw.render({ curIndex, isSetCursor });
|
|
17764
|
-
}
|
|
17765
|
-
rowMargin(payload) {
|
|
17766
|
-
const isReadonly = this.draw.isReadonly();
|
|
17767
|
-
if (isReadonly)
|
|
17768
|
-
return;
|
|
17769
|
-
const { startIndex, endIndex } = this.range.getRange();
|
|
17770
|
-
if (!~startIndex && !~endIndex)
|
|
17771
|
-
return;
|
|
17772
|
-
const rowElementList = this.range.getRangeRowElementList();
|
|
17773
|
-
if (!rowElementList)
|
|
17774
|
-
return;
|
|
17775
|
-
rowElementList.forEach((element) => {
|
|
17776
|
-
element.rowMargin = payload;
|
|
17777
|
-
});
|
|
17778
|
-
const isSetCursor = startIndex === endIndex;
|
|
17779
|
-
const curIndex = isSetCursor ? endIndex : startIndex;
|
|
17780
|
-
this.draw.render({ curIndex, isSetCursor });
|
|
17781
|
-
}
|
|
17782
|
-
insertTable(row, col) {
|
|
17783
|
-
var _a;
|
|
18424
|
+
italic() {
|
|
17784
18425
|
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
17785
18426
|
if (isDisabled)
|
|
17786
18427
|
return;
|
|
17787
|
-
const
|
|
17788
|
-
if (
|
|
17789
|
-
|
|
17790
|
-
|
|
17791
|
-
|
|
17792
|
-
return;
|
|
17793
|
-
const { defaultTrMinHeight } = this.options.table;
|
|
17794
|
-
const elementList = this.draw.getElementList();
|
|
17795
|
-
let offsetX = 0;
|
|
17796
|
-
if ((_a = elementList[startIndex]) == null ? void 0 : _a.listId) {
|
|
17797
|
-
const positionList = this.position.getPositionList();
|
|
17798
|
-
const { rowIndex } = positionList[startIndex];
|
|
17799
|
-
const rowList = this.draw.getRowList();
|
|
17800
|
-
const row2 = rowList[rowIndex];
|
|
17801
|
-
offsetX = (row2 == null ? void 0 : row2.offsetX) || 0;
|
|
17802
|
-
}
|
|
17803
|
-
const innerWidth = this.draw.getContextInnerWidth() - offsetX;
|
|
17804
|
-
const colgroup = [];
|
|
17805
|
-
const colWidth = innerWidth / col;
|
|
17806
|
-
for (let c = 0; c < col; c++) {
|
|
17807
|
-
colgroup.push({
|
|
17808
|
-
width: colWidth
|
|
17809
|
-
});
|
|
17810
|
-
}
|
|
17811
|
-
const trList = [];
|
|
17812
|
-
for (let r = 0; r < row; r++) {
|
|
17813
|
-
const tdList = [];
|
|
17814
|
-
const tr = {
|
|
17815
|
-
height: defaultTrMinHeight,
|
|
17816
|
-
tdList
|
|
17817
|
-
};
|
|
17818
|
-
for (let c = 0; c < col; c++) {
|
|
17819
|
-
tdList.push({
|
|
17820
|
-
colspan: 1,
|
|
17821
|
-
rowspan: 1,
|
|
17822
|
-
value: []
|
|
17823
|
-
});
|
|
17824
|
-
}
|
|
17825
|
-
trList.push(tr);
|
|
17826
|
-
}
|
|
17827
|
-
const element = {
|
|
17828
|
-
type: ElementType.TABLE,
|
|
17829
|
-
value: "",
|
|
17830
|
-
colgroup,
|
|
17831
|
-
trList
|
|
17832
|
-
};
|
|
17833
|
-
formatElementList([element], {
|
|
17834
|
-
editorOptions: this.options
|
|
17835
|
-
});
|
|
17836
|
-
formatElementContext(elementList, [element], startIndex, {
|
|
17837
|
-
editorOptions: this.options
|
|
17838
|
-
});
|
|
17839
|
-
const curIndex = startIndex + 1;
|
|
17840
|
-
this.draw.spliceElementList(elementList, curIndex, startIndex === endIndex ? 0 : endIndex - startIndex, element);
|
|
17841
|
-
this.range.setRange(curIndex, curIndex);
|
|
17842
|
-
this.draw.render({ curIndex, isSetCursor: false });
|
|
17843
|
-
}
|
|
17844
|
-
insertTableTopRow() {
|
|
17845
|
-
const isReadonly = this.draw.isReadonly();
|
|
17846
|
-
if (isReadonly)
|
|
17847
|
-
return;
|
|
17848
|
-
const positionContext = this.position.getPositionContext();
|
|
17849
|
-
if (!positionContext.isTable)
|
|
17850
|
-
return;
|
|
17851
|
-
const { index: index2, trIndex, tableId } = positionContext;
|
|
17852
|
-
const originalElementList = this.draw.getOriginalElementList();
|
|
17853
|
-
const element = originalElementList[index2];
|
|
17854
|
-
const curTrList = element.trList;
|
|
17855
|
-
const curTr = curTrList[trIndex];
|
|
17856
|
-
if (curTr.tdList.length < element.colgroup.length) {
|
|
17857
|
-
const curTrNo = curTr.tdList[0].rowIndex;
|
|
17858
|
-
for (let t = 0; t < trIndex; t++) {
|
|
17859
|
-
const tr = curTrList[t];
|
|
17860
|
-
for (let d = 0; d < tr.tdList.length; d++) {
|
|
17861
|
-
const td = tr.tdList[d];
|
|
17862
|
-
if (td.rowspan > 1 && td.rowIndex + td.rowspan >= curTrNo + 1) {
|
|
17863
|
-
td.rowspan += 1;
|
|
17864
|
-
}
|
|
17865
|
-
}
|
|
17866
|
-
}
|
|
17867
|
-
}
|
|
17868
|
-
const newTrId = getUUID();
|
|
17869
|
-
const newTr = {
|
|
17870
|
-
height: curTr.height,
|
|
17871
|
-
id: newTrId,
|
|
17872
|
-
tdList: []
|
|
17873
|
-
};
|
|
17874
|
-
for (let t = 0; t < curTr.tdList.length; t++) {
|
|
17875
|
-
const curTd = curTr.tdList[t];
|
|
17876
|
-
const newTdId = getUUID();
|
|
17877
|
-
newTr.tdList.push({
|
|
17878
|
-
id: newTdId,
|
|
17879
|
-
rowspan: 1,
|
|
17880
|
-
colspan: curTd.colspan,
|
|
17881
|
-
value: [
|
|
17882
|
-
{
|
|
17883
|
-
value: ZERO,
|
|
17884
|
-
size: 16,
|
|
17885
|
-
tableId,
|
|
17886
|
-
trId: newTrId,
|
|
17887
|
-
tdId: newTdId
|
|
17888
|
-
}
|
|
17889
|
-
]
|
|
18428
|
+
const selection = this.range.getSelectionElementList();
|
|
18429
|
+
if (selection == null ? void 0 : selection.length) {
|
|
18430
|
+
const noItalicIndex = selection.findIndex((s) => !s.italic);
|
|
18431
|
+
selection.forEach((el) => {
|
|
18432
|
+
el.italic = !!~noItalicIndex;
|
|
17890
18433
|
});
|
|
17891
|
-
|
|
17892
|
-
|
|
17893
|
-
|
|
17894
|
-
|
|
17895
|
-
|
|
17896
|
-
|
|
17897
|
-
|
|
17898
|
-
|
|
17899
|
-
trId: newTr.id,
|
|
17900
|
-
tableId
|
|
17901
|
-
});
|
|
17902
|
-
this.range.setRange(0, 0);
|
|
17903
|
-
this.draw.render({ curIndex: 0 });
|
|
17904
|
-
this.tableTool.render();
|
|
17905
|
-
}
|
|
17906
|
-
insertTableBottomRow() {
|
|
17907
|
-
const isReadonly = this.draw.isReadonly();
|
|
17908
|
-
if (isReadonly)
|
|
17909
|
-
return;
|
|
17910
|
-
const positionContext = this.position.getPositionContext();
|
|
17911
|
-
if (!positionContext.isTable)
|
|
17912
|
-
return;
|
|
17913
|
-
const { index: index2, trIndex, tableId } = positionContext;
|
|
17914
|
-
const originalElementList = this.draw.getOriginalElementList();
|
|
17915
|
-
const element = originalElementList[index2];
|
|
17916
|
-
const curTrList = element.trList;
|
|
17917
|
-
const curTr = curTrList[trIndex];
|
|
17918
|
-
const anchorTr = curTrList.length - 1 === trIndex ? curTr : curTrList[trIndex + 1];
|
|
17919
|
-
if (anchorTr.tdList.length < element.colgroup.length) {
|
|
17920
|
-
const curTrNo = anchorTr.tdList[0].rowIndex;
|
|
17921
|
-
for (let t = 0; t < trIndex + 1; t++) {
|
|
17922
|
-
const tr = curTrList[t];
|
|
17923
|
-
for (let d = 0; d < tr.tdList.length; d++) {
|
|
17924
|
-
const td = tr.tdList[d];
|
|
17925
|
-
if (td.rowspan > 1 && td.rowIndex + td.rowspan >= curTrNo + 1) {
|
|
17926
|
-
td.rowspan += 1;
|
|
17927
|
-
}
|
|
17928
|
-
}
|
|
18434
|
+
this.draw.render({ isSetCursor: false });
|
|
18435
|
+
} else {
|
|
18436
|
+
const { endIndex } = this.range.getRange();
|
|
18437
|
+
const elementList = this.draw.getElementList();
|
|
18438
|
+
const enterElement = elementList[endIndex];
|
|
18439
|
+
if ((enterElement == null ? void 0 : enterElement.value) === ZERO) {
|
|
18440
|
+
enterElement.italic = !enterElement.italic;
|
|
18441
|
+
this.draw.render({ curIndex: endIndex, isCompute: false });
|
|
17929
18442
|
}
|
|
17930
18443
|
}
|
|
17931
|
-
|
|
17932
|
-
|
|
17933
|
-
|
|
17934
|
-
|
|
17935
|
-
|
|
17936
|
-
|
|
17937
|
-
|
|
17938
|
-
const
|
|
17939
|
-
|
|
17940
|
-
|
|
17941
|
-
|
|
17942
|
-
|
|
17943
|
-
|
|
17944
|
-
|
|
17945
|
-
|
|
17946
|
-
|
|
17947
|
-
|
|
17948
|
-
|
|
17949
|
-
|
|
17950
|
-
tdId: newTdId
|
|
17951
|
-
}
|
|
17952
|
-
]
|
|
18444
|
+
}
|
|
18445
|
+
underline(textDecoration) {
|
|
18446
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
18447
|
+
if (isDisabled)
|
|
18448
|
+
return;
|
|
18449
|
+
const selection = this.range.getSelectionElementList();
|
|
18450
|
+
if (selection == null ? void 0 : selection.length) {
|
|
18451
|
+
const isSetUnderline = selection.some((s) => !s.underline || !textDecoration && s.textDecoration || textDecoration && !s.textDecoration || textDecoration && s.textDecoration && !isObjectEqual(s.textDecoration, textDecoration));
|
|
18452
|
+
selection.forEach((el) => {
|
|
18453
|
+
el.underline = isSetUnderline;
|
|
18454
|
+
if (isSetUnderline && textDecoration) {
|
|
18455
|
+
el.textDecoration = textDecoration;
|
|
18456
|
+
} else {
|
|
18457
|
+
delete el.textDecoration;
|
|
18458
|
+
}
|
|
18459
|
+
});
|
|
18460
|
+
this.draw.render({
|
|
18461
|
+
isSetCursor: false,
|
|
18462
|
+
isCompute: false
|
|
17953
18463
|
});
|
|
18464
|
+
} else {
|
|
18465
|
+
const { endIndex } = this.range.getRange();
|
|
18466
|
+
const elementList = this.draw.getElementList();
|
|
18467
|
+
const enterElement = elementList[endIndex];
|
|
18468
|
+
if ((enterElement == null ? void 0 : enterElement.value) === ZERO) {
|
|
18469
|
+
enterElement.underline = !enterElement.underline;
|
|
18470
|
+
this.draw.render({ curIndex: endIndex, isCompute: false });
|
|
18471
|
+
}
|
|
17954
18472
|
}
|
|
17955
|
-
curTrList.splice(trIndex + 1, 0, newTr);
|
|
17956
|
-
this.position.setPositionContext({
|
|
17957
|
-
isTable: true,
|
|
17958
|
-
index: index2,
|
|
17959
|
-
trIndex: trIndex + 1,
|
|
17960
|
-
tdIndex: 0,
|
|
17961
|
-
tdId: newTr.tdList[0].id,
|
|
17962
|
-
trId: newTr.id,
|
|
17963
|
-
tableId
|
|
17964
|
-
});
|
|
17965
|
-
this.range.setRange(0, 0);
|
|
17966
|
-
this.draw.render({ curIndex: 0 });
|
|
17967
|
-
this.tableTool.render();
|
|
17968
18473
|
}
|
|
17969
|
-
|
|
17970
|
-
const
|
|
17971
|
-
if (
|
|
17972
|
-
return;
|
|
17973
|
-
const positionContext = this.position.getPositionContext();
|
|
17974
|
-
if (!positionContext.isTable)
|
|
18474
|
+
strikeout() {
|
|
18475
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
18476
|
+
if (isDisabled)
|
|
17975
18477
|
return;
|
|
17976
|
-
const
|
|
17977
|
-
|
|
17978
|
-
|
|
17979
|
-
|
|
17980
|
-
|
|
17981
|
-
for (let t = 0; t < curTrList.length; t++) {
|
|
17982
|
-
const tr = curTrList[t];
|
|
17983
|
-
const tdId = getUUID();
|
|
17984
|
-
tr.tdList.splice(curTdIndex, 0, {
|
|
17985
|
-
id: tdId,
|
|
17986
|
-
rowspan: 1,
|
|
17987
|
-
colspan: 1,
|
|
17988
|
-
value: [
|
|
17989
|
-
{
|
|
17990
|
-
value: ZERO,
|
|
17991
|
-
size: 16,
|
|
17992
|
-
tableId,
|
|
17993
|
-
trId: tr.id,
|
|
17994
|
-
tdId
|
|
17995
|
-
}
|
|
17996
|
-
]
|
|
18478
|
+
const selection = this.range.getSelectionElementList();
|
|
18479
|
+
if (selection == null ? void 0 : selection.length) {
|
|
18480
|
+
const noStrikeoutIndex = selection.findIndex((s) => !s.strikeout);
|
|
18481
|
+
selection.forEach((el) => {
|
|
18482
|
+
el.strikeout = !!~noStrikeoutIndex;
|
|
17997
18483
|
});
|
|
17998
|
-
|
|
17999
|
-
|
|
18000
|
-
|
|
18001
|
-
|
|
18002
|
-
}
|
|
18003
|
-
|
|
18004
|
-
|
|
18005
|
-
|
|
18006
|
-
|
|
18007
|
-
|
|
18008
|
-
|
|
18009
|
-
group2.width -= adjustWidth;
|
|
18484
|
+
this.draw.render({
|
|
18485
|
+
isSetCursor: false,
|
|
18486
|
+
isCompute: false
|
|
18487
|
+
});
|
|
18488
|
+
} else {
|
|
18489
|
+
const { endIndex } = this.range.getRange();
|
|
18490
|
+
const elementList = this.draw.getElementList();
|
|
18491
|
+
const enterElement = elementList[endIndex];
|
|
18492
|
+
if ((enterElement == null ? void 0 : enterElement.value) === ZERO) {
|
|
18493
|
+
enterElement.strikeout = !enterElement.strikeout;
|
|
18494
|
+
this.draw.render({ curIndex: endIndex, isCompute: false });
|
|
18010
18495
|
}
|
|
18011
18496
|
}
|
|
18012
|
-
this.position.setPositionContext({
|
|
18013
|
-
isTable: true,
|
|
18014
|
-
index: index2,
|
|
18015
|
-
trIndex: 0,
|
|
18016
|
-
tdIndex: curTdIndex,
|
|
18017
|
-
tdId: curTrList[0].tdList[curTdIndex].id,
|
|
18018
|
-
trId: curTrList[0].id,
|
|
18019
|
-
tableId
|
|
18020
|
-
});
|
|
18021
|
-
this.range.setRange(0, 0);
|
|
18022
|
-
this.draw.render({ curIndex: 0 });
|
|
18023
|
-
this.tableTool.render();
|
|
18024
18497
|
}
|
|
18025
|
-
|
|
18026
|
-
const
|
|
18027
|
-
if (
|
|
18498
|
+
superscript() {
|
|
18499
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
18500
|
+
if (isDisabled)
|
|
18028
18501
|
return;
|
|
18029
|
-
const
|
|
18030
|
-
if (!
|
|
18502
|
+
const selection = this.range.getSelectionElementList();
|
|
18503
|
+
if (!selection)
|
|
18031
18504
|
return;
|
|
18032
|
-
const
|
|
18033
|
-
|
|
18034
|
-
|
|
18035
|
-
|
|
18036
|
-
|
|
18037
|
-
|
|
18038
|
-
|
|
18039
|
-
|
|
18040
|
-
|
|
18041
|
-
|
|
18042
|
-
|
|
18043
|
-
colspan: 1,
|
|
18044
|
-
value: [
|
|
18045
|
-
{
|
|
18046
|
-
value: ZERO,
|
|
18047
|
-
size: 16,
|
|
18048
|
-
tableId,
|
|
18049
|
-
trId: tr.id,
|
|
18050
|
-
tdId
|
|
18051
|
-
}
|
|
18052
|
-
]
|
|
18053
|
-
});
|
|
18054
|
-
}
|
|
18055
|
-
const colgroup = element.colgroup;
|
|
18056
|
-
colgroup.splice(curTdIndex, 0, {
|
|
18057
|
-
width: this.options.table.defaultColMinWidth
|
|
18058
|
-
});
|
|
18059
|
-
const colgroupWidth = colgroup.reduce((pre, cur) => pre + cur.width, 0);
|
|
18060
|
-
const width = this.draw.getOriginalInnerWidth();
|
|
18061
|
-
if (colgroupWidth > width) {
|
|
18062
|
-
const adjustWidth = (colgroupWidth - width) / colgroup.length;
|
|
18063
|
-
for (let g = 0; g < colgroup.length; g++) {
|
|
18064
|
-
const group2 = colgroup[g];
|
|
18065
|
-
group2.width -= adjustWidth;
|
|
18505
|
+
const superscriptIndex = selection.findIndex((s) => s.type === ElementType.SUPERSCRIPT);
|
|
18506
|
+
selection.forEach((el) => {
|
|
18507
|
+
if (~superscriptIndex) {
|
|
18508
|
+
if (el.type === ElementType.SUPERSCRIPT) {
|
|
18509
|
+
el.type = ElementType.TEXT;
|
|
18510
|
+
delete el.actualSize;
|
|
18511
|
+
}
|
|
18512
|
+
} else {
|
|
18513
|
+
if (!el.type || el.type === ElementType.TEXT || el.type === ElementType.SUBSCRIPT) {
|
|
18514
|
+
el.type = ElementType.SUPERSCRIPT;
|
|
18515
|
+
}
|
|
18066
18516
|
}
|
|
18067
|
-
}
|
|
18068
|
-
this.position.setPositionContext({
|
|
18069
|
-
isTable: true,
|
|
18070
|
-
index: index2,
|
|
18071
|
-
trIndex: 0,
|
|
18072
|
-
tdIndex: curTdIndex,
|
|
18073
|
-
tdId: curTrList[0].tdList[curTdIndex].id,
|
|
18074
|
-
trId: curTrList[0].id,
|
|
18075
|
-
tableId
|
|
18076
18517
|
});
|
|
18077
|
-
this.
|
|
18078
|
-
this.draw.render({ curIndex: 0 });
|
|
18079
|
-
this.tableTool.render();
|
|
18518
|
+
this.draw.render({ isSetCursor: false });
|
|
18080
18519
|
}
|
|
18081
|
-
|
|
18082
|
-
const
|
|
18083
|
-
if (
|
|
18520
|
+
subscript() {
|
|
18521
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
18522
|
+
if (isDisabled)
|
|
18084
18523
|
return;
|
|
18085
|
-
const
|
|
18086
|
-
if (!
|
|
18524
|
+
const selection = this.range.getSelectionElementList();
|
|
18525
|
+
if (!selection)
|
|
18087
18526
|
return;
|
|
18088
|
-
const
|
|
18089
|
-
|
|
18090
|
-
|
|
18091
|
-
|
|
18092
|
-
|
|
18093
|
-
|
|
18094
|
-
|
|
18095
|
-
|
|
18527
|
+
const subscriptIndex = selection.findIndex((s) => s.type === ElementType.SUBSCRIPT);
|
|
18528
|
+
selection.forEach((el) => {
|
|
18529
|
+
if (~subscriptIndex) {
|
|
18530
|
+
if (el.type === ElementType.SUBSCRIPT) {
|
|
18531
|
+
el.type = ElementType.TEXT;
|
|
18532
|
+
delete el.actualSize;
|
|
18533
|
+
}
|
|
18534
|
+
} else {
|
|
18535
|
+
if (!el.type || el.type === ElementType.TEXT || el.type === ElementType.SUPERSCRIPT) {
|
|
18536
|
+
el.type = ElementType.SUBSCRIPT;
|
|
18537
|
+
}
|
|
18538
|
+
}
|
|
18539
|
+
});
|
|
18540
|
+
this.draw.render({ isSetCursor: false });
|
|
18541
|
+
}
|
|
18542
|
+
color(payload) {
|
|
18543
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
18544
|
+
if (isDisabled)
|
|
18096
18545
|
return;
|
|
18097
|
-
|
|
18098
|
-
|
|
18099
|
-
|
|
18100
|
-
|
|
18101
|
-
|
|
18102
|
-
|
|
18103
|
-
|
|
18104
|
-
|
|
18546
|
+
const selection = this.range.getSelectionElementList();
|
|
18547
|
+
if (selection == null ? void 0 : selection.length) {
|
|
18548
|
+
selection.forEach((el) => {
|
|
18549
|
+
if (payload) {
|
|
18550
|
+
el.color = payload;
|
|
18551
|
+
} else {
|
|
18552
|
+
delete el.color;
|
|
18553
|
+
}
|
|
18554
|
+
});
|
|
18555
|
+
this.draw.render({
|
|
18556
|
+
isSetCursor: false,
|
|
18557
|
+
isCompute: false
|
|
18558
|
+
});
|
|
18559
|
+
} else {
|
|
18560
|
+
const { endIndex } = this.range.getRange();
|
|
18561
|
+
const elementList = this.draw.getElementList();
|
|
18562
|
+
const enterElement = elementList[endIndex];
|
|
18563
|
+
if ((enterElement == null ? void 0 : enterElement.value) === ZERO) {
|
|
18564
|
+
if (payload) {
|
|
18565
|
+
enterElement.color = payload;
|
|
18566
|
+
} else {
|
|
18567
|
+
delete enterElement.color;
|
|
18105
18568
|
}
|
|
18569
|
+
this.draw.render({ curIndex: endIndex, isCompute: false });
|
|
18106
18570
|
}
|
|
18107
18571
|
}
|
|
18108
|
-
|
|
18109
|
-
|
|
18110
|
-
|
|
18111
|
-
|
|
18112
|
-
|
|
18113
|
-
|
|
18114
|
-
|
|
18115
|
-
|
|
18116
|
-
|
|
18117
|
-
|
|
18118
|
-
|
|
18119
|
-
|
|
18120
|
-
|
|
18121
|
-
|
|
18122
|
-
|
|
18123
|
-
|
|
18124
|
-
|
|
18125
|
-
|
|
18126
|
-
|
|
18572
|
+
}
|
|
18573
|
+
highlight(payload) {
|
|
18574
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
18575
|
+
if (isDisabled)
|
|
18576
|
+
return;
|
|
18577
|
+
const selection = this.range.getSelectionElementList();
|
|
18578
|
+
if (selection == null ? void 0 : selection.length) {
|
|
18579
|
+
selection.forEach((el) => {
|
|
18580
|
+
if (payload) {
|
|
18581
|
+
el.highlight = payload;
|
|
18582
|
+
} else {
|
|
18583
|
+
delete el.highlight;
|
|
18584
|
+
}
|
|
18585
|
+
});
|
|
18586
|
+
this.draw.render({
|
|
18587
|
+
isSetCursor: false,
|
|
18588
|
+
isCompute: false
|
|
18589
|
+
});
|
|
18590
|
+
} else {
|
|
18591
|
+
const { endIndex } = this.range.getRange();
|
|
18592
|
+
const elementList = this.draw.getElementList();
|
|
18593
|
+
const enterElement = elementList[endIndex];
|
|
18594
|
+
if ((enterElement == null ? void 0 : enterElement.value) === ZERO) {
|
|
18595
|
+
if (payload) {
|
|
18596
|
+
enterElement.highlight = payload;
|
|
18597
|
+
} else {
|
|
18598
|
+
delete enterElement.highlight;
|
|
18599
|
+
}
|
|
18600
|
+
this.draw.render({ curIndex: endIndex, isCompute: false });
|
|
18127
18601
|
}
|
|
18128
18602
|
}
|
|
18129
|
-
trList.splice(trIndex, 1);
|
|
18130
|
-
this.position.setPositionContext({
|
|
18131
|
-
isTable: false
|
|
18132
|
-
});
|
|
18133
|
-
this.range.clearRange();
|
|
18134
|
-
this.draw.render({
|
|
18135
|
-
curIndex: positionContext.index
|
|
18136
|
-
});
|
|
18137
|
-
this.tableTool.dispose();
|
|
18138
18603
|
}
|
|
18139
|
-
|
|
18140
|
-
|
|
18141
|
-
|
|
18142
|
-
if (isReadonly)
|
|
18604
|
+
title(payload) {
|
|
18605
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
18606
|
+
if (isDisabled)
|
|
18143
18607
|
return;
|
|
18144
|
-
const
|
|
18145
|
-
if (
|
|
18608
|
+
const { startIndex, endIndex } = this.range.getRange();
|
|
18609
|
+
if (!~startIndex && !~endIndex)
|
|
18146
18610
|
return;
|
|
18147
|
-
const
|
|
18148
|
-
const
|
|
18149
|
-
|
|
18150
|
-
const curTrList = element.trList;
|
|
18151
|
-
const curTd = curTrList[trIndex].tdList[tdIndex];
|
|
18152
|
-
const curColIndex = curTd.colIndex;
|
|
18153
|
-
const moreTdTr = curTrList.find((tr) => tr.tdList.length > 1);
|
|
18154
|
-
if (!moreTdTr) {
|
|
18155
|
-
this.deleteTable();
|
|
18611
|
+
const elementList = this.draw.getElementList();
|
|
18612
|
+
const changeElementList = startIndex === endIndex ? this.range.getRangeParagraphElementList() : elementList.slice(startIndex + 1, endIndex + 1);
|
|
18613
|
+
if (!changeElementList || !changeElementList.length)
|
|
18156
18614
|
return;
|
|
18157
|
-
|
|
18158
|
-
|
|
18159
|
-
|
|
18160
|
-
|
|
18161
|
-
|
|
18162
|
-
|
|
18163
|
-
|
|
18164
|
-
|
|
18165
|
-
|
|
18166
|
-
|
|
18167
|
-
|
|
18615
|
+
const titleId = getUUID();
|
|
18616
|
+
const titleOptions = this.draw.getOptions().title;
|
|
18617
|
+
changeElementList.forEach((el) => {
|
|
18618
|
+
if (!el.type && el.value === ZERO)
|
|
18619
|
+
return;
|
|
18620
|
+
if (payload) {
|
|
18621
|
+
el.level = payload;
|
|
18622
|
+
el.titleId = titleId;
|
|
18623
|
+
if (isTextLikeElement(el)) {
|
|
18624
|
+
el.size = titleOptions[titleSizeMapping[payload]];
|
|
18625
|
+
el.bold = true;
|
|
18626
|
+
}
|
|
18627
|
+
} else {
|
|
18628
|
+
if (el.titleId) {
|
|
18629
|
+
delete el.titleId;
|
|
18630
|
+
delete el.title;
|
|
18631
|
+
delete el.level;
|
|
18632
|
+
delete el.size;
|
|
18633
|
+
delete el.bold;
|
|
18168
18634
|
}
|
|
18169
18635
|
}
|
|
18170
|
-
}
|
|
18171
|
-
(_a = element.colgroup) == null ? void 0 : _a.splice(curColIndex, 1);
|
|
18172
|
-
this.position.setPositionContext({
|
|
18173
|
-
isTable: false
|
|
18174
|
-
});
|
|
18175
|
-
this.range.setRange(0, 0);
|
|
18176
|
-
this.draw.render({
|
|
18177
|
-
curIndex: positionContext.index
|
|
18178
18636
|
});
|
|
18179
|
-
|
|
18637
|
+
const isSetCursor = startIndex === endIndex;
|
|
18638
|
+
const curIndex = isSetCursor ? endIndex : startIndex;
|
|
18639
|
+
this.draw.render({ curIndex, isSetCursor });
|
|
18180
18640
|
}
|
|
18181
|
-
|
|
18641
|
+
list(listType, listStyle) {
|
|
18182
18642
|
const isReadonly = this.draw.isReadonly();
|
|
18183
18643
|
if (isReadonly)
|
|
18184
18644
|
return;
|
|
18185
|
-
|
|
18186
|
-
if (!positionContext.isTable)
|
|
18187
|
-
return;
|
|
18188
|
-
const originalElementList = this.draw.getOriginalElementList();
|
|
18189
|
-
originalElementList.splice(positionContext.index, 1);
|
|
18190
|
-
const curIndex = positionContext.index - 1;
|
|
18191
|
-
this.position.setPositionContext({
|
|
18192
|
-
isTable: false,
|
|
18193
|
-
index: curIndex
|
|
18194
|
-
});
|
|
18195
|
-
this.range.setRange(curIndex, curIndex);
|
|
18196
|
-
this.draw.render({ curIndex });
|
|
18197
|
-
this.tableTool.dispose();
|
|
18645
|
+
this.draw.getListParticle().setList(listType, listStyle);
|
|
18198
18646
|
}
|
|
18199
|
-
|
|
18647
|
+
rowFlex(payload) {
|
|
18200
18648
|
const isReadonly = this.draw.isReadonly();
|
|
18201
18649
|
if (isReadonly)
|
|
18202
18650
|
return;
|
|
18203
|
-
const
|
|
18204
|
-
if (
|
|
18205
|
-
return;
|
|
18206
|
-
const { isCrossRowCol, startTdIndex, endTdIndex, startTrIndex, endTrIndex } = this.range.getRange();
|
|
18207
|
-
if (!isCrossRowCol)
|
|
18651
|
+
const { startIndex, endIndex } = this.range.getRange();
|
|
18652
|
+
if (!~startIndex && !~endIndex)
|
|
18208
18653
|
return;
|
|
18209
|
-
const
|
|
18210
|
-
|
|
18211
|
-
const element = originalElementList[index2];
|
|
18212
|
-
const curTrList = element.trList;
|
|
18213
|
-
let startTd = curTrList[startTrIndex].tdList[startTdIndex];
|
|
18214
|
-
let endTd = curTrList[endTrIndex].tdList[endTdIndex];
|
|
18215
|
-
if (startTd.x > endTd.x || startTd.y > endTd.y) {
|
|
18216
|
-
[startTd, endTd] = [endTd, startTd];
|
|
18217
|
-
}
|
|
18218
|
-
const startColIndex = startTd.colIndex;
|
|
18219
|
-
const endColIndex = endTd.colIndex + (endTd.colspan - 1);
|
|
18220
|
-
const startRowIndex = startTd.rowIndex;
|
|
18221
|
-
const endRowIndex = endTd.rowIndex + (endTd.rowspan - 1);
|
|
18222
|
-
const rowCol = [];
|
|
18223
|
-
for (let t = 0; t < curTrList.length; t++) {
|
|
18224
|
-
const tr = curTrList[t];
|
|
18225
|
-
const tdList = [];
|
|
18226
|
-
for (let d = 0; d < tr.tdList.length; d++) {
|
|
18227
|
-
const td = tr.tdList[d];
|
|
18228
|
-
const tdColIndex = td.colIndex;
|
|
18229
|
-
const tdRowIndex = td.rowIndex;
|
|
18230
|
-
if (tdColIndex >= startColIndex && tdColIndex <= endColIndex && tdRowIndex >= startRowIndex && tdRowIndex <= endRowIndex) {
|
|
18231
|
-
tdList.push(td);
|
|
18232
|
-
}
|
|
18233
|
-
}
|
|
18234
|
-
if (tdList.length) {
|
|
18235
|
-
rowCol.push(tdList);
|
|
18236
|
-
}
|
|
18237
|
-
}
|
|
18238
|
-
if (!rowCol.length)
|
|
18654
|
+
const rowElementList = this.range.getRangeRowElementList();
|
|
18655
|
+
if (!rowElementList)
|
|
18239
18656
|
return;
|
|
18240
|
-
|
|
18241
|
-
|
|
18242
|
-
|
|
18243
|
-
const
|
|
18244
|
-
const
|
|
18245
|
-
|
|
18246
|
-
const endY = rightBottom.y + rightBottom.height;
|
|
18247
|
-
for (let t = 0; t < rowCol.length; t++) {
|
|
18248
|
-
const tr = rowCol[t];
|
|
18249
|
-
for (let d = 0; d < tr.length; d++) {
|
|
18250
|
-
const td = tr[d];
|
|
18251
|
-
const tdStartX = td.x;
|
|
18252
|
-
const tdStartY = td.y;
|
|
18253
|
-
const tdEndX = tdStartX + td.width;
|
|
18254
|
-
const tdEndY = tdStartY + td.height;
|
|
18255
|
-
if (startX > tdStartX || startY > tdStartY || endX < tdEndX || endY < tdEndY) {
|
|
18256
|
-
return;
|
|
18257
|
-
}
|
|
18258
|
-
}
|
|
18259
|
-
}
|
|
18260
|
-
const mergeTdIdList = [];
|
|
18261
|
-
const anchorTd = rowCol[0][0];
|
|
18262
|
-
for (let t = 0; t < rowCol.length; t++) {
|
|
18263
|
-
const tr = rowCol[t];
|
|
18264
|
-
for (let d = 0; d < tr.length; d++) {
|
|
18265
|
-
const td = tr[d];
|
|
18266
|
-
const isAnchorTd = t === 0 && d === 0;
|
|
18267
|
-
if (!isAnchorTd) {
|
|
18268
|
-
mergeTdIdList.push(td.id);
|
|
18269
|
-
}
|
|
18270
|
-
if (t === 0 && d !== 0) {
|
|
18271
|
-
anchorTd.colspan += td.colspan;
|
|
18272
|
-
}
|
|
18273
|
-
if (t !== 0) {
|
|
18274
|
-
if (anchorTd.colIndex === td.colIndex) {
|
|
18275
|
-
anchorTd.rowspan += td.rowspan;
|
|
18276
|
-
}
|
|
18277
|
-
}
|
|
18278
|
-
}
|
|
18279
|
-
}
|
|
18280
|
-
for (let t = 0; t < curTrList.length; t++) {
|
|
18281
|
-
const tr = curTrList[t];
|
|
18282
|
-
let d = 0;
|
|
18283
|
-
while (d < tr.tdList.length) {
|
|
18284
|
-
const td = tr.tdList[d];
|
|
18285
|
-
if (mergeTdIdList.includes(td.id)) {
|
|
18286
|
-
tr.tdList.splice(d, 1);
|
|
18287
|
-
d--;
|
|
18288
|
-
}
|
|
18289
|
-
d++;
|
|
18290
|
-
}
|
|
18291
|
-
}
|
|
18292
|
-
this.position.setPositionContext(__spreadProps(__spreadValues({}, positionContext), {
|
|
18293
|
-
trIndex: anchorTd.trIndex,
|
|
18294
|
-
tdIndex: anchorTd.tdIndex
|
|
18295
|
-
}));
|
|
18296
|
-
const curIndex = anchorTd.value.length - 1;
|
|
18297
|
-
this.range.setRange(curIndex, curIndex);
|
|
18298
|
-
this.draw.render();
|
|
18299
|
-
this.tableTool.render();
|
|
18657
|
+
rowElementList.forEach((element) => {
|
|
18658
|
+
element.rowFlex = payload;
|
|
18659
|
+
});
|
|
18660
|
+
const isSetCursor = startIndex === endIndex;
|
|
18661
|
+
const curIndex = isSetCursor ? endIndex : startIndex;
|
|
18662
|
+
this.draw.render({ curIndex, isSetCursor });
|
|
18300
18663
|
}
|
|
18301
|
-
|
|
18664
|
+
rowMargin(payload) {
|
|
18302
18665
|
const isReadonly = this.draw.isReadonly();
|
|
18303
18666
|
if (isReadonly)
|
|
18304
18667
|
return;
|
|
18305
|
-
const
|
|
18306
|
-
if (
|
|
18668
|
+
const { startIndex, endIndex } = this.range.getRange();
|
|
18669
|
+
if (!~startIndex && !~endIndex)
|
|
18307
18670
|
return;
|
|
18308
|
-
const
|
|
18309
|
-
|
|
18310
|
-
const element = originalElementList[index2];
|
|
18311
|
-
const curTrList = element.trList;
|
|
18312
|
-
const curTr = curTrList[trIndex];
|
|
18313
|
-
const curTd = curTr.tdList[tdIndex];
|
|
18314
|
-
if (curTd.rowspan === 1 && curTd.colspan === 1)
|
|
18671
|
+
const rowElementList = this.range.getRangeRowElementList();
|
|
18672
|
+
if (!rowElementList)
|
|
18315
18673
|
return;
|
|
18316
|
-
|
|
18317
|
-
|
|
18318
|
-
|
|
18319
|
-
|
|
18320
|
-
|
|
18321
|
-
|
|
18322
|
-
rowspan: 1,
|
|
18323
|
-
colspan: 1,
|
|
18324
|
-
value: [
|
|
18325
|
-
{
|
|
18326
|
-
value: ZERO,
|
|
18327
|
-
size: 16,
|
|
18328
|
-
tableId: element.id,
|
|
18329
|
-
trId: curTr.id,
|
|
18330
|
-
tdId
|
|
18331
|
-
}
|
|
18332
|
-
]
|
|
18333
|
-
});
|
|
18334
|
-
}
|
|
18335
|
-
curTd.colspan = 1;
|
|
18336
|
-
}
|
|
18337
|
-
if (curTd.rowspan > 1) {
|
|
18338
|
-
for (let r = 1; r < curTd.rowspan; r++) {
|
|
18339
|
-
const tr = curTrList[trIndex + r];
|
|
18340
|
-
for (let c = 0; c < colspan; c++) {
|
|
18341
|
-
const tdId = getUUID();
|
|
18342
|
-
tr.tdList.splice(curTd.colIndex, 0, {
|
|
18343
|
-
id: tdId,
|
|
18344
|
-
rowspan: 1,
|
|
18345
|
-
colspan: 1,
|
|
18346
|
-
value: [
|
|
18347
|
-
{
|
|
18348
|
-
value: ZERO,
|
|
18349
|
-
size: 16,
|
|
18350
|
-
tableId: element.id,
|
|
18351
|
-
trId: tr.id,
|
|
18352
|
-
tdId
|
|
18353
|
-
}
|
|
18354
|
-
]
|
|
18355
|
-
});
|
|
18356
|
-
}
|
|
18357
|
-
}
|
|
18358
|
-
curTd.rowspan = 1;
|
|
18359
|
-
}
|
|
18360
|
-
const curIndex = curTd.value.length - 1;
|
|
18361
|
-
this.range.setRange(curIndex, curIndex);
|
|
18362
|
-
this.draw.render();
|
|
18363
|
-
this.tableTool.render();
|
|
18674
|
+
rowElementList.forEach((element) => {
|
|
18675
|
+
element.rowMargin = payload;
|
|
18676
|
+
});
|
|
18677
|
+
const isSetCursor = startIndex === endIndex;
|
|
18678
|
+
const curIndex = isSetCursor ? endIndex : startIndex;
|
|
18679
|
+
this.draw.render({ curIndex, isSetCursor });
|
|
18364
18680
|
}
|
|
18365
|
-
|
|
18681
|
+
insertTable(row, col) {
|
|
18682
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
18683
|
+
if (isDisabled)
|
|
18684
|
+
return;
|
|
18685
|
+
const activeControl = this.control.getActiveControl();
|
|
18686
|
+
if (activeControl)
|
|
18687
|
+
return;
|
|
18688
|
+
this.tableOperate.insertTable(row, col);
|
|
18689
|
+
}
|
|
18690
|
+
insertTableTopRow() {
|
|
18366
18691
|
const isReadonly = this.draw.isReadonly();
|
|
18367
18692
|
if (isReadonly)
|
|
18368
18693
|
return;
|
|
18369
|
-
|
|
18370
|
-
|
|
18694
|
+
this.tableOperate.insertTableTopRow();
|
|
18695
|
+
}
|
|
18696
|
+
insertTableBottomRow() {
|
|
18697
|
+
const isReadonly = this.draw.isReadonly();
|
|
18698
|
+
if (isReadonly)
|
|
18371
18699
|
return;
|
|
18372
|
-
|
|
18373
|
-
const row = rowCol[r];
|
|
18374
|
-
for (let c = 0; c < row.length; c++) {
|
|
18375
|
-
const td = row[c];
|
|
18376
|
-
if (!td || td.verticalAlign === payload || !td.verticalAlign && payload === VerticalAlign.TOP) {
|
|
18377
|
-
continue;
|
|
18378
|
-
}
|
|
18379
|
-
td.verticalAlign = payload;
|
|
18380
|
-
}
|
|
18381
|
-
}
|
|
18382
|
-
const { endIndex } = this.range.getRange();
|
|
18383
|
-
this.draw.render({
|
|
18384
|
-
curIndex: endIndex
|
|
18385
|
-
});
|
|
18700
|
+
this.tableOperate.insertTableBottomRow();
|
|
18386
18701
|
}
|
|
18387
|
-
|
|
18702
|
+
insertTableLeftCol() {
|
|
18388
18703
|
const isReadonly = this.draw.isReadonly();
|
|
18389
18704
|
if (isReadonly)
|
|
18390
18705
|
return;
|
|
18391
|
-
|
|
18392
|
-
|
|
18706
|
+
this.tableOperate.insertTableLeftCol();
|
|
18707
|
+
}
|
|
18708
|
+
insertTableRightCol() {
|
|
18709
|
+
const isReadonly = this.draw.isReadonly();
|
|
18710
|
+
if (isReadonly)
|
|
18393
18711
|
return;
|
|
18394
|
-
|
|
18395
|
-
|
|
18396
|
-
|
|
18397
|
-
|
|
18712
|
+
this.tableOperate.insertTableRightCol();
|
|
18713
|
+
}
|
|
18714
|
+
deleteTableRow() {
|
|
18715
|
+
const isReadonly = this.draw.isReadonly();
|
|
18716
|
+
if (isReadonly)
|
|
18398
18717
|
return;
|
|
18399
|
-
|
|
18400
|
-
element.borderType = payload;
|
|
18401
|
-
const { endIndex } = this.range.getRange();
|
|
18402
|
-
this.draw.render({
|
|
18403
|
-
curIndex: endIndex
|
|
18404
|
-
});
|
|
18718
|
+
this.tableOperate.deleteTableRow();
|
|
18405
18719
|
}
|
|
18406
|
-
|
|
18720
|
+
deleteTableCol() {
|
|
18407
18721
|
const isReadonly = this.draw.isReadonly();
|
|
18408
18722
|
if (isReadonly)
|
|
18409
18723
|
return;
|
|
18410
|
-
|
|
18411
|
-
|
|
18724
|
+
this.tableOperate.deleteTableCol();
|
|
18725
|
+
}
|
|
18726
|
+
deleteTable() {
|
|
18727
|
+
const isReadonly = this.draw.isReadonly();
|
|
18728
|
+
if (isReadonly)
|
|
18412
18729
|
return;
|
|
18413
|
-
|
|
18414
|
-
const isSetBorderType = tdList.some((td) => {
|
|
18415
|
-
var _a;
|
|
18416
|
-
return !((_a = td.borderTypes) == null ? void 0 : _a.includes(payload));
|
|
18417
|
-
});
|
|
18418
|
-
tdList.forEach((td) => {
|
|
18419
|
-
if (!td.borderTypes) {
|
|
18420
|
-
td.borderTypes = [];
|
|
18421
|
-
}
|
|
18422
|
-
const borderTypeIndex = td.borderTypes.findIndex((type) => type === payload);
|
|
18423
|
-
if (isSetBorderType) {
|
|
18424
|
-
if (!~borderTypeIndex) {
|
|
18425
|
-
td.borderTypes.push(payload);
|
|
18426
|
-
}
|
|
18427
|
-
} else {
|
|
18428
|
-
if (~borderTypeIndex) {
|
|
18429
|
-
td.borderTypes.splice(borderTypeIndex, 1);
|
|
18430
|
-
}
|
|
18431
|
-
}
|
|
18432
|
-
if (!td.borderTypes.length) {
|
|
18433
|
-
delete td.borderTypes;
|
|
18434
|
-
}
|
|
18435
|
-
});
|
|
18436
|
-
const { endIndex } = this.range.getRange();
|
|
18437
|
-
this.draw.render({
|
|
18438
|
-
curIndex: endIndex
|
|
18439
|
-
});
|
|
18730
|
+
this.tableOperate.deleteTable();
|
|
18440
18731
|
}
|
|
18441
|
-
|
|
18732
|
+
mergeTableCell() {
|
|
18442
18733
|
const isReadonly = this.draw.isReadonly();
|
|
18443
18734
|
if (isReadonly)
|
|
18444
18735
|
return;
|
|
18445
|
-
|
|
18446
|
-
|
|
18736
|
+
this.tableOperate.mergeTableCell();
|
|
18737
|
+
}
|
|
18738
|
+
cancelMergeTableCell() {
|
|
18739
|
+
const isReadonly = this.draw.isReadonly();
|
|
18740
|
+
if (isReadonly)
|
|
18447
18741
|
return;
|
|
18448
|
-
|
|
18449
|
-
const isSetTdSlashType = tdList.some((td) => {
|
|
18450
|
-
var _a;
|
|
18451
|
-
return !((_a = td.slashTypes) == null ? void 0 : _a.includes(payload));
|
|
18452
|
-
});
|
|
18453
|
-
tdList.forEach((td) => {
|
|
18454
|
-
if (!td.slashTypes) {
|
|
18455
|
-
td.slashTypes = [];
|
|
18456
|
-
}
|
|
18457
|
-
const slashTypeIndex = td.slashTypes.findIndex((type) => type === payload);
|
|
18458
|
-
if (isSetTdSlashType) {
|
|
18459
|
-
if (!~slashTypeIndex) {
|
|
18460
|
-
td.slashTypes.push(payload);
|
|
18461
|
-
}
|
|
18462
|
-
} else {
|
|
18463
|
-
if (~slashTypeIndex) {
|
|
18464
|
-
td.slashTypes.splice(slashTypeIndex, 1);
|
|
18465
|
-
}
|
|
18466
|
-
}
|
|
18467
|
-
if (!td.slashTypes.length) {
|
|
18468
|
-
delete td.slashTypes;
|
|
18469
|
-
}
|
|
18470
|
-
});
|
|
18471
|
-
const { endIndex } = this.range.getRange();
|
|
18472
|
-
this.draw.render({
|
|
18473
|
-
curIndex: endIndex
|
|
18474
|
-
});
|
|
18742
|
+
this.tableOperate.cancelMergeTableCell();
|
|
18475
18743
|
}
|
|
18476
|
-
|
|
18744
|
+
tableTdVerticalAlign(payload) {
|
|
18477
18745
|
const isReadonly = this.draw.isReadonly();
|
|
18478
18746
|
if (isReadonly)
|
|
18479
18747
|
return;
|
|
18480
|
-
|
|
18481
|
-
|
|
18748
|
+
this.tableOperate.tableTdVerticalAlign(payload);
|
|
18749
|
+
}
|
|
18750
|
+
tableBorderType(payload) {
|
|
18751
|
+
const isReadonly = this.draw.isReadonly();
|
|
18752
|
+
if (isReadonly)
|
|
18482
18753
|
return;
|
|
18483
|
-
|
|
18484
|
-
const row = rowCol[r];
|
|
18485
|
-
for (let c = 0; c < row.length; c++) {
|
|
18486
|
-
const col = row[c];
|
|
18487
|
-
col.backgroundColor = payload;
|
|
18488
|
-
}
|
|
18489
|
-
}
|
|
18490
|
-
const { endIndex } = this.range.getRange();
|
|
18491
|
-
this.range.setRange(endIndex, endIndex);
|
|
18492
|
-
this.draw.render({
|
|
18493
|
-
isCompute: false
|
|
18494
|
-
});
|
|
18754
|
+
this.tableOperate.tableBorderType(payload);
|
|
18495
18755
|
}
|
|
18496
|
-
|
|
18497
|
-
const
|
|
18498
|
-
|
|
18499
|
-
if (!isTable || !tableId)
|
|
18756
|
+
tableTdBorderType(payload) {
|
|
18757
|
+
const isReadonly = this.draw.isReadonly();
|
|
18758
|
+
if (isReadonly)
|
|
18500
18759
|
return;
|
|
18501
|
-
|
|
18502
|
-
|
|
18503
|
-
|
|
18504
|
-
const
|
|
18505
|
-
|
|
18506
|
-
|
|
18507
|
-
|
|
18508
|
-
|
|
18509
|
-
|
|
18510
|
-
|
|
18511
|
-
|
|
18512
|
-
|
|
18513
|
-
|
|
18514
|
-
|
|
18515
|
-
|
|
18516
|
-
|
|
18517
|
-
isSubmitHistory: false
|
|
18518
|
-
});
|
|
18760
|
+
this.tableOperate.tableTdBorderType(payload);
|
|
18761
|
+
}
|
|
18762
|
+
tableTdSlashType(payload) {
|
|
18763
|
+
const isReadonly = this.draw.isReadonly();
|
|
18764
|
+
if (isReadonly)
|
|
18765
|
+
return;
|
|
18766
|
+
this.tableOperate.tableTdSlashType(payload);
|
|
18767
|
+
}
|
|
18768
|
+
tableTdBackgroundColor(payload) {
|
|
18769
|
+
const isReadonly = this.draw.isReadonly();
|
|
18770
|
+
if (isReadonly)
|
|
18771
|
+
return;
|
|
18772
|
+
this.tableOperate.tableTdBackgroundColor(payload);
|
|
18773
|
+
}
|
|
18774
|
+
tableSelectAll() {
|
|
18775
|
+
this.tableOperate.tableSelectAll();
|
|
18519
18776
|
}
|
|
18520
18777
|
hyperlink(payload) {
|
|
18521
18778
|
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
@@ -18917,10 +19174,11 @@ class CommandAdapt {
|
|
|
18917
19174
|
return;
|
|
18918
19175
|
element.imgDisplay = display;
|
|
18919
19176
|
const { startIndex, endIndex } = this.range.getRange();
|
|
18920
|
-
if (display === ImageDisplay.FLOAT_TOP || display === ImageDisplay.FLOAT_BOTTOM) {
|
|
19177
|
+
if (display === ImageDisplay.SURROUND || display === ImageDisplay.FLOAT_TOP || display === ImageDisplay.FLOAT_BOTTOM) {
|
|
18921
19178
|
const positionList = this.position.getPositionList();
|
|
18922
|
-
const { coordinate: { leftTop } } = positionList[startIndex];
|
|
19179
|
+
const { pageNo, coordinate: { leftTop } } = positionList[startIndex];
|
|
18923
19180
|
element.imgFloatPosition = {
|
|
19181
|
+
pageNo,
|
|
18924
19182
|
x: leftTop[0],
|
|
18925
19183
|
y: leftTop[1]
|
|
18926
19184
|
};
|
|
@@ -19040,6 +19298,19 @@ class CommandAdapt {
|
|
|
19040
19298
|
tableElement = zipElementList([originTableElement])[0];
|
|
19041
19299
|
}
|
|
19042
19300
|
}
|
|
19301
|
+
let titleId = null;
|
|
19302
|
+
let titleStartPageNo = null;
|
|
19303
|
+
let start = startIndex - 1;
|
|
19304
|
+
while (start > 0) {
|
|
19305
|
+
const curElement = elementList[start];
|
|
19306
|
+
const preElement = elementList[start - 1];
|
|
19307
|
+
if (curElement.titleId && curElement.titleId !== (preElement == null ? void 0 : preElement.titleId)) {
|
|
19308
|
+
titleId = curElement.titleId;
|
|
19309
|
+
titleStartPageNo = positionList[start].pageNo;
|
|
19310
|
+
break;
|
|
19311
|
+
}
|
|
19312
|
+
start--;
|
|
19313
|
+
}
|
|
19043
19314
|
return deepClone({
|
|
19044
19315
|
isCollapsed,
|
|
19045
19316
|
startElement,
|
|
@@ -19053,7 +19324,9 @@ class CommandAdapt {
|
|
|
19053
19324
|
tdIndex: tdIndex != null ? tdIndex : null,
|
|
19054
19325
|
tableElement,
|
|
19055
19326
|
selectionText,
|
|
19056
|
-
selectionElementList
|
|
19327
|
+
selectionElementList,
|
|
19328
|
+
titleId,
|
|
19329
|
+
titleStartPageNo
|
|
19057
19330
|
});
|
|
19058
19331
|
}
|
|
19059
19332
|
getRangeRow() {
|
|
@@ -19145,7 +19418,7 @@ class CommandAdapt {
|
|
|
19145
19418
|
const elementIndex = getElementIndexById(elementList);
|
|
19146
19419
|
if (~elementIndex) {
|
|
19147
19420
|
elementList[elementIndex] = __spreadValues(__spreadValues({}, elementList[elementIndex]), payload.properties);
|
|
19148
|
-
formatElementList([elementList[elementIndex]], {
|
|
19421
|
+
formatElementList(zipElementList([elementList[elementIndex]]), {
|
|
19149
19422
|
isHandleFirstElement: false,
|
|
19150
19423
|
editorOptions: this.options
|
|
19151
19424
|
});
|
|
@@ -19616,6 +19889,7 @@ const INTERNAL_CONTEXT_MENU_KEY = {
|
|
|
19616
19889
|
TEXT_WRAP: "imageTextWrap",
|
|
19617
19890
|
TEXT_WRAP_EMBED: "imageTextWrapEmbed",
|
|
19618
19891
|
TEXT_WRAP_UP_DOWN: "imageTextWrapUpDown",
|
|
19892
|
+
TEXT_WRAP_SURROUND: "imageTextWrapSurround",
|
|
19619
19893
|
TEXT_WRAP_FLOAT_TOP: "imageTextWrapFloatTop",
|
|
19620
19894
|
TEXT_WRAP_FLOAT_BOTTOM: "imageTextWrapFloatBottom"
|
|
19621
19895
|
},
|
|
@@ -19761,7 +20035,7 @@ const hyperlinkMenus = [
|
|
|
19761
20035
|
}
|
|
19762
20036
|
}
|
|
19763
20037
|
];
|
|
19764
|
-
const { IMAGE: { CHANGE, SAVE_AS, TEXT_WRAP, TEXT_WRAP_EMBED, TEXT_WRAP_UP_DOWN, TEXT_WRAP_FLOAT_TOP, TEXT_WRAP_FLOAT_BOTTOM } } = INTERNAL_CONTEXT_MENU_KEY;
|
|
20038
|
+
const { IMAGE: { CHANGE, SAVE_AS, TEXT_WRAP, TEXT_WRAP_EMBED, TEXT_WRAP_UP_DOWN, TEXT_WRAP_SURROUND, TEXT_WRAP_FLOAT_TOP, TEXT_WRAP_FLOAT_BOTTOM } } = INTERNAL_CONTEXT_MENU_KEY;
|
|
19765
20039
|
const imageMenus = [
|
|
19766
20040
|
{
|
|
19767
20041
|
key: CHANGE,
|
|
@@ -19823,6 +20097,14 @@ const imageMenus = [
|
|
|
19823
20097
|
command.executeChangeImageDisplay(context.startElement, ImageDisplay.INLINE);
|
|
19824
20098
|
}
|
|
19825
20099
|
},
|
|
20100
|
+
{
|
|
20101
|
+
key: TEXT_WRAP_SURROUND,
|
|
20102
|
+
i18nPath: "contextmenu.image.textWrapType.surround",
|
|
20103
|
+
when: () => true,
|
|
20104
|
+
callback: (command, context) => {
|
|
20105
|
+
command.executeChangeImageDisplay(context.startElement, ImageDisplay.SURROUND);
|
|
20106
|
+
}
|
|
20107
|
+
},
|
|
19826
20108
|
{
|
|
19827
20109
|
key: TEXT_WRAP_FLOAT_TOP,
|
|
19828
20110
|
i18nPath: "contextmenu.image.textWrapType.floatTop",
|