@hufe921/canvas-editor 0.9.91 → 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 +54 -0
- package/dist/canvas-editor.es.js +1535 -1129
- package/dist/canvas-editor.es.js.map +1 -1
- package/dist/canvas-editor.umd.js +33 -33
- package/dist/canvas-editor.umd.js.map +1 -1
- package/dist/src/editor/core/actuator/Actuator.d.ts +7 -0
- package/dist/src/editor/core/actuator/handlers/positionContextChange.d.ts +3 -0
- package/dist/src/editor/core/command/Command.d.ts +1 -0
- package/dist/src/editor/core/command/CommandAdapt.d.ts +3 -2
- package/dist/src/editor/core/draw/Draw.d.ts +6 -0
- package/dist/src/editor/core/draw/control/date/DateControl.d.ts +1 -0
- package/dist/src/editor/core/draw/control/select/SelectControl.d.ts +1 -0
- package/dist/src/editor/core/draw/control/text/TextControl.d.ts +1 -0
- package/dist/src/editor/core/draw/particle/date/DateParticle.d.ts +1 -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 +6 -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/dataset/enum/Editor.d.ts +2 -1
- package/dist/src/editor/interface/Catalog.d.ts +1 -0
- package/dist/src/editor/interface/Control.d.ts +2 -1
- package/dist/src/editor/interface/Draw.d.ts +7 -1
- package/dist/src/editor/interface/Editor.d.ts +4 -1
- package/dist/src/editor/interface/Element.d.ts +1 -0
- package/dist/src/editor/interface/EventBus.d.ts +2 -1
- package/dist/src/editor/interface/Listener.d.ts +6 -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/interface/table/Td.d.ts +4 -0
- package/dist/src/editor/interface/table/Tr.d.ts +2 -0
- package/dist/src/editor/utils/element.d.ts +4 -1
- 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,
|
|
@@ -477,6 +492,8 @@ const EDITOR_ELEMENT_ZIP_ATTR = [
|
|
|
477
492
|
];
|
|
478
493
|
const TABLE_TD_ZIP_ATTR = [
|
|
479
494
|
"conceptId",
|
|
495
|
+
"extension",
|
|
496
|
+
"externalId",
|
|
480
497
|
"verticalAlign",
|
|
481
498
|
"backgroundColor",
|
|
482
499
|
"borderTypes",
|
|
@@ -4356,10 +4373,11 @@ function formatElementContext(sourceElementList, formatElementList2, anchorIndex
|
|
|
4356
4373
|
let copyElement = getAnchorElement(sourceElementList, anchorIndex);
|
|
4357
4374
|
if (!copyElement)
|
|
4358
4375
|
return;
|
|
4359
|
-
|
|
4376
|
+
const { isBreakWhenWrap = false, editorOptions } = options || {};
|
|
4377
|
+
const { mode } = editorOptions || {};
|
|
4378
|
+
if (mode !== EditorMode.DESIGN && ((_a = copyElement.title) == null ? void 0 : _a.disabled)) {
|
|
4360
4379
|
copyElement = omitObject(copyElement, TITLE_CONTEXT_ATTR);
|
|
4361
4380
|
}
|
|
4362
|
-
const { isBreakWhenWrap = false } = options || {};
|
|
4363
4381
|
let isBreakWarped = false;
|
|
4364
4382
|
for (let e = 0; e < formatElementList2.length; e++) {
|
|
4365
4383
|
const targetElement = formatElementList2[e];
|
|
@@ -4375,7 +4393,7 @@ function formatElementContext(sourceElementList, formatElementList2, anchorIndex
|
|
|
4375
4393
|
continue;
|
|
4376
4394
|
}
|
|
4377
4395
|
if ((_c = targetElement.valueList) == null ? void 0 : _c.length) {
|
|
4378
|
-
formatElementContext(sourceElementList, targetElement.valueList, anchorIndex);
|
|
4396
|
+
formatElementContext(sourceElementList, targetElement.valueList, anchorIndex, options);
|
|
4379
4397
|
}
|
|
4380
4398
|
const cloneAttr = [...EDITOR_ELEMENT_CONTEXT_ATTR];
|
|
4381
4399
|
if (!getIsBlockElement(targetElement)) {
|
|
@@ -4931,6 +4949,25 @@ function replaceHTMLElementTag(oldDom, tagName) {
|
|
|
4931
4949
|
newDom.innerHTML = oldDom.innerHTML;
|
|
4932
4950
|
return newDom;
|
|
4933
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
|
+
}
|
|
4934
4971
|
function setClipboardData(data2) {
|
|
4935
4972
|
localStorage.setItem(EDITOR_CLIPBOARD, JSON.stringify({
|
|
4936
4973
|
text: data2.text,
|
|
@@ -5028,7 +5065,8 @@ function pasteElement(host, elementList) {
|
|
|
5028
5065
|
}
|
|
5029
5066
|
}
|
|
5030
5067
|
formatElementContext(originalElementList, elementList, startIndex, {
|
|
5031
|
-
isBreakWhenWrap: true
|
|
5068
|
+
isBreakWhenWrap: true,
|
|
5069
|
+
editorOptions: draw.getOptions()
|
|
5032
5070
|
});
|
|
5033
5071
|
}
|
|
5034
5072
|
draw.insertElementList(elementList);
|
|
@@ -5063,7 +5101,9 @@ function pasteImage(host, file) {
|
|
|
5063
5101
|
height: image.height
|
|
5064
5102
|
};
|
|
5065
5103
|
if (~startIndex) {
|
|
5066
|
-
formatElementContext(elementList, [imageElement], startIndex
|
|
5104
|
+
formatElementContext(elementList, [imageElement], startIndex, {
|
|
5105
|
+
editorOptions: draw.getOptions()
|
|
5106
|
+
});
|
|
5067
5107
|
}
|
|
5068
5108
|
draw.insertElementList([imageElement]);
|
|
5069
5109
|
};
|
|
@@ -5391,6 +5431,7 @@ var EditorMode;
|
|
|
5391
5431
|
EditorMode2["READONLY"] = "readonly";
|
|
5392
5432
|
EditorMode2["FORM"] = "form";
|
|
5393
5433
|
EditorMode2["PRINT"] = "print";
|
|
5434
|
+
EditorMode2["DESIGN"] = "design";
|
|
5394
5435
|
})(EditorMode || (EditorMode = {}));
|
|
5395
5436
|
var EditorZone;
|
|
5396
5437
|
(function(EditorZone2) {
|
|
@@ -5595,7 +5636,10 @@ class CheckboxControl {
|
|
|
5595
5636
|
nextIndex++;
|
|
5596
5637
|
}
|
|
5597
5638
|
control.code = codes.join(",");
|
|
5598
|
-
this.control.repaintControl(
|
|
5639
|
+
this.control.repaintControl({
|
|
5640
|
+
curIndex: startIndex,
|
|
5641
|
+
isSetCursor: false
|
|
5642
|
+
});
|
|
5599
5643
|
}
|
|
5600
5644
|
keydown(evt) {
|
|
5601
5645
|
if (this.control.getIsDisabledControl()) {
|
|
@@ -5647,7 +5691,10 @@ class RadioControl extends CheckboxControl {
|
|
|
5647
5691
|
nextIndex++;
|
|
5648
5692
|
}
|
|
5649
5693
|
control.code = codes.join(",");
|
|
5650
|
-
this.control.repaintControl(
|
|
5694
|
+
this.control.repaintControl({
|
|
5695
|
+
curIndex: startIndex,
|
|
5696
|
+
isSetCursor: false
|
|
5697
|
+
});
|
|
5651
5698
|
}
|
|
5652
5699
|
}
|
|
5653
5700
|
function setRangeCache(host) {
|
|
@@ -5800,7 +5847,7 @@ function mousedown(evt, host) {
|
|
|
5800
5847
|
isShow: false
|
|
5801
5848
|
});
|
|
5802
5849
|
setRangeCache(host);
|
|
5803
|
-
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) {
|
|
5804
5851
|
draw.getImageParticle().createFloatImage(curElement);
|
|
5805
5852
|
}
|
|
5806
5853
|
}
|
|
@@ -5834,13 +5881,14 @@ function getElementIndexByDragId(dragId, elementList) {
|
|
|
5834
5881
|
}
|
|
5835
5882
|
function moveImgPosition(element, evt, host) {
|
|
5836
5883
|
const draw = host.getDraw();
|
|
5837
|
-
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) {
|
|
5838
5885
|
const moveX = evt.offsetX - host.mouseDownStartPosition.x;
|
|
5839
5886
|
const moveY = evt.offsetY - host.mouseDownStartPosition.y;
|
|
5840
5887
|
const imgFloatPosition = element.imgFloatPosition;
|
|
5841
5888
|
element.imgFloatPosition = {
|
|
5842
5889
|
x: imgFloatPosition.x + moveX,
|
|
5843
|
-
y: imgFloatPosition.y + moveY
|
|
5890
|
+
y: imgFloatPosition.y + moveY,
|
|
5891
|
+
pageNo: draw.getPageNo()
|
|
5844
5892
|
};
|
|
5845
5893
|
}
|
|
5846
5894
|
draw.getImageParticle().destroyFloatImage();
|
|
@@ -5867,24 +5915,26 @@ function mouseup(evt, host) {
|
|
|
5867
5915
|
if (range.startIndex >= cacheStartIndex && range.endIndex <= cacheEndIndex && ((_a = host.cachePositionContext) == null ? void 0 : _a.tdId) === positionContext.tdId) {
|
|
5868
5916
|
draw.clearSideEffect();
|
|
5869
5917
|
let isSubmitHistory = false;
|
|
5918
|
+
let isCompute = false;
|
|
5870
5919
|
if (isCacheRangeCollapsed) {
|
|
5871
5920
|
const dragElement = cacheElementList[cacheEndIndex];
|
|
5872
5921
|
if (dragElement.type === ElementType.IMAGE || dragElement.type === ElementType.LATEX) {
|
|
5873
5922
|
moveImgPosition(dragElement, evt, host);
|
|
5874
|
-
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) {
|
|
5875
5924
|
draw.getPreviewer().drawResizer(dragElement);
|
|
5876
5925
|
isSubmitHistory = true;
|
|
5877
5926
|
} else {
|
|
5878
5927
|
const cachePosition = cachePositionList[cacheEndIndex];
|
|
5879
5928
|
draw.getPreviewer().drawResizer(dragElement, cachePosition);
|
|
5880
5929
|
}
|
|
5930
|
+
isCompute = dragElement.imgDisplay === ImageDisplay.SURROUND;
|
|
5881
5931
|
}
|
|
5882
5932
|
}
|
|
5883
5933
|
rangeManager.replaceRange(__spreadValues({}, cacheRange));
|
|
5884
5934
|
draw.render({
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5935
|
+
isCompute,
|
|
5936
|
+
isSubmitHistory,
|
|
5937
|
+
isSetCursor: false
|
|
5888
5938
|
});
|
|
5889
5939
|
return;
|
|
5890
5940
|
}
|
|
@@ -5935,7 +5985,9 @@ function mouseup(evt, host) {
|
|
|
5935
5985
|
return newElement;
|
|
5936
5986
|
}
|
|
5937
5987
|
});
|
|
5938
|
-
formatElementContext(elementList, replaceElementList, range.startIndex
|
|
5988
|
+
formatElementContext(elementList, replaceElementList, range.startIndex, {
|
|
5989
|
+
editorOptions: draw.getOptions()
|
|
5990
|
+
});
|
|
5939
5991
|
const cacheStartElement = cacheElementList[cacheStartIndex];
|
|
5940
5992
|
const cacheStartPosition = cachePositionList[cacheStartIndex];
|
|
5941
5993
|
const cacheRangeStartId = createDragId(cacheElementList[cacheStartIndex]);
|
|
@@ -6004,7 +6056,7 @@ function mouseup(evt, host) {
|
|
|
6004
6056
|
isSetCursor: false
|
|
6005
6057
|
});
|
|
6006
6058
|
if (imgElement) {
|
|
6007
|
-
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) {
|
|
6008
6060
|
draw.getPreviewer().drawResizer(imgElement);
|
|
6009
6061
|
} else {
|
|
6010
6062
|
const dragPositionList = position.getPositionList();
|
|
@@ -6042,7 +6094,7 @@ function mousemove(evt, host) {
|
|
|
6042
6094
|
const cacheStartIndex = (_a = host.cacheRange) == null ? void 0 : _a.startIndex;
|
|
6043
6095
|
if (cacheStartIndex) {
|
|
6044
6096
|
const dragElement = host.cacheElementList[cacheStartIndex];
|
|
6045
|
-
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)) {
|
|
6046
6098
|
draw.getPreviewer().clearResizer();
|
|
6047
6099
|
draw.getImageParticle().dragFloatImage(evt.movementX, evt.movementY);
|
|
6048
6100
|
}
|
|
@@ -6264,7 +6316,8 @@ function enter(evt, host) {
|
|
|
6264
6316
|
enterText.listWrap = true;
|
|
6265
6317
|
}
|
|
6266
6318
|
formatElementContext(elementList, [enterText], startIndex, {
|
|
6267
|
-
isBreakWhenWrap: true
|
|
6319
|
+
isBreakWhenWrap: true,
|
|
6320
|
+
editorOptions: draw.getOptions()
|
|
6268
6321
|
});
|
|
6269
6322
|
if (!(endElement.titleId && endElement.titleId !== ((_b = elementList[endIndex + 1]) == null ? void 0 : _b.titleId))) {
|
|
6270
6323
|
const copyElement = getAnchorElement(elementList, endIndex);
|
|
@@ -6604,7 +6657,9 @@ function tab(evt, host) {
|
|
|
6604
6657
|
const rangeManager = draw.getRange();
|
|
6605
6658
|
const { startIndex } = rangeManager.getRange();
|
|
6606
6659
|
const elementList = draw.getElementList();
|
|
6607
|
-
formatElementContext(elementList, [tabElement], startIndex
|
|
6660
|
+
formatElementContext(elementList, [tabElement], startIndex, {
|
|
6661
|
+
editorOptions: draw.getOptions()
|
|
6662
|
+
});
|
|
6608
6663
|
draw.insertElementList([tabElement]);
|
|
6609
6664
|
}
|
|
6610
6665
|
}
|
|
@@ -6980,12 +7035,13 @@ function input(data2, host) {
|
|
|
6980
7035
|
const copyElement = getAnchorElement(elementList, endIndex);
|
|
6981
7036
|
if (!copyElement)
|
|
6982
7037
|
return;
|
|
7038
|
+
const isDesignMode = draw.isDesignMode();
|
|
6983
7039
|
const inputData = splitText(text).map((value) => {
|
|
6984
7040
|
var _a2, _b;
|
|
6985
7041
|
const newElement = {
|
|
6986
7042
|
value
|
|
6987
7043
|
};
|
|
6988
|
-
if (!((_a2 = copyElement.title) == null ? void 0 : _a2.disabled) && !((_b = copyElement.control) == null ? void 0 : _b.disabled)) {
|
|
7044
|
+
if (isDesignMode || !((_a2 = copyElement.title) == null ? void 0 : _a2.disabled) && !((_b = copyElement.control) == null ? void 0 : _b.disabled)) {
|
|
6989
7045
|
const nextElement = elementList[endIndex + 1];
|
|
6990
7046
|
if (!copyElement.type || copyElement.type === TEXT || copyElement.type === HYPERLINK && (nextElement == null ? void 0 : nextElement.type) === HYPERLINK || copyElement.type === DATE && (nextElement == null ? void 0 : nextElement.type) === DATE || copyElement.type === SUBSCRIPT && (nextElement == null ? void 0 : nextElement.type) === SUBSCRIPT || copyElement.type === SUPERSCRIPT && (nextElement == null ? void 0 : nextElement.type) === SUPERSCRIPT) {
|
|
6991
7047
|
EDITOR_ELEMENT_COPY_ATTR.forEach((attr) => {
|
|
@@ -7012,7 +7068,9 @@ function input(data2, host) {
|
|
|
7012
7068
|
if (startIndex !== endIndex) {
|
|
7013
7069
|
draw.spliceElementList(elementList, start, endIndex - startIndex);
|
|
7014
7070
|
}
|
|
7015
|
-
formatElementContext(elementList, inputData, startIndex
|
|
7071
|
+
formatElementContext(elementList, inputData, startIndex, {
|
|
7072
|
+
editorOptions: draw.getOptions()
|
|
7073
|
+
});
|
|
7016
7074
|
draw.spliceElementList(elementList, start, 0, ...inputData);
|
|
7017
7075
|
curIndex = startIndex + inputData.length;
|
|
7018
7076
|
}
|
|
@@ -7546,6 +7604,7 @@ class GlobalEvent {
|
|
|
7546
7604
|
__publicField(this, "hyperlinkParticle");
|
|
7547
7605
|
__publicField(this, "control");
|
|
7548
7606
|
__publicField(this, "dateParticle");
|
|
7607
|
+
__publicField(this, "imageParticle");
|
|
7549
7608
|
__publicField(this, "dprMediaQueryList");
|
|
7550
7609
|
__publicField(this, "clearSideEffect", (evt) => {
|
|
7551
7610
|
if (!this.cursor)
|
|
@@ -7570,6 +7629,7 @@ class GlobalEvent {
|
|
|
7570
7629
|
this.hyperlinkParticle.clearHyperlinkPopup();
|
|
7571
7630
|
this.control.destroyControl();
|
|
7572
7631
|
this.dateParticle.clearDatePicker();
|
|
7632
|
+
this.imageParticle.destroyFloatImage();
|
|
7573
7633
|
});
|
|
7574
7634
|
__publicField(this, "setCanvasEventAbility", () => {
|
|
7575
7635
|
this.canvasEvent.setIsAllowDrag(false);
|
|
@@ -7620,6 +7680,7 @@ class GlobalEvent {
|
|
|
7620
7680
|
this.tableTool = draw.getTableTool();
|
|
7621
7681
|
this.hyperlinkParticle = draw.getHyperlinkParticle();
|
|
7622
7682
|
this.dateParticle = draw.getDateParticle();
|
|
7683
|
+
this.imageParticle = draw.getImageParticle();
|
|
7623
7684
|
this.control = draw.getControl();
|
|
7624
7685
|
this.dprMediaQueryList = window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);
|
|
7625
7686
|
}
|
|
@@ -7715,6 +7776,7 @@ class Position {
|
|
|
7715
7776
|
__publicField(this, "positionList");
|
|
7716
7777
|
__publicField(this, "floatPositionList");
|
|
7717
7778
|
__publicField(this, "draw");
|
|
7779
|
+
__publicField(this, "eventBus");
|
|
7718
7780
|
__publicField(this, "options");
|
|
7719
7781
|
this.positionList = [];
|
|
7720
7782
|
this.floatPositionList = [];
|
|
@@ -7724,6 +7786,7 @@ class Position {
|
|
|
7724
7786
|
isControl: false
|
|
7725
7787
|
};
|
|
7726
7788
|
this.draw = draw;
|
|
7789
|
+
this.eventBus = draw.getEventBus();
|
|
7727
7790
|
this.options = draw.getOptions();
|
|
7728
7791
|
}
|
|
7729
7792
|
getFloatPositionList() {
|
|
@@ -7775,11 +7838,13 @@ class Position {
|
|
|
7775
7838
|
let index2 = startIndex;
|
|
7776
7839
|
for (let i = 0; i < rowList.length; i++) {
|
|
7777
7840
|
const curRow = rowList[i];
|
|
7778
|
-
|
|
7779
|
-
|
|
7780
|
-
|
|
7781
|
-
|
|
7782
|
-
|
|
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
|
+
}
|
|
7783
7848
|
}
|
|
7784
7849
|
x += curRow.offsetX || 0;
|
|
7785
7850
|
const tablePreX = x;
|
|
@@ -7810,7 +7875,7 @@ class Position {
|
|
|
7810
7875
|
rightBottom: [x + metrics.width, y + curRow.height]
|
|
7811
7876
|
}
|
|
7812
7877
|
};
|
|
7813
|
-
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) {
|
|
7814
7879
|
const prePosition = positionList[positionList.length - 1];
|
|
7815
7880
|
if (prePosition) {
|
|
7816
7881
|
positionItem.metrics = prePosition.metrics;
|
|
@@ -7819,7 +7884,8 @@ class Position {
|
|
|
7819
7884
|
if (!element.imgFloatPosition) {
|
|
7820
7885
|
element.imgFloatPosition = {
|
|
7821
7886
|
x,
|
|
7822
|
-
y
|
|
7887
|
+
y,
|
|
7888
|
+
pageNo
|
|
7823
7889
|
};
|
|
7824
7890
|
}
|
|
7825
7891
|
this.floatPositionList.push({
|
|
@@ -7940,6 +8006,10 @@ class Position {
|
|
|
7940
8006
|
return this.positionContext;
|
|
7941
8007
|
}
|
|
7942
8008
|
setPositionContext(payload) {
|
|
8009
|
+
this.eventBus.emit("positionContextChange", {
|
|
8010
|
+
value: payload,
|
|
8011
|
+
oldValue: this.positionContext
|
|
8012
|
+
});
|
|
7943
8013
|
this.positionContext = payload;
|
|
7944
8014
|
}
|
|
7945
8015
|
getPositionByXY(payload) {
|
|
@@ -7958,7 +8028,7 @@ class Position {
|
|
|
7958
8028
|
const positionNo = isMainActive ? curPageNo : 0;
|
|
7959
8029
|
if (!isTable) {
|
|
7960
8030
|
const floatTopPosition = this.getFloatPositionByXY(__spreadProps(__spreadValues({}, payload), {
|
|
7961
|
-
|
|
8031
|
+
imgDisplays: [ImageDisplay.FLOAT_TOP, ImageDisplay.SURROUND]
|
|
7962
8032
|
}));
|
|
7963
8033
|
if (floatTopPosition)
|
|
7964
8034
|
return floatTopPosition;
|
|
@@ -8051,7 +8121,7 @@ class Position {
|
|
|
8051
8121
|
}
|
|
8052
8122
|
if (!isTable) {
|
|
8053
8123
|
const floatBottomPosition = this.getFloatPositionByXY(__spreadProps(__spreadValues({}, payload), {
|
|
8054
|
-
|
|
8124
|
+
imgDisplays: [ImageDisplay.FLOAT_BOTTOM]
|
|
8055
8125
|
}));
|
|
8056
8126
|
if (floatBottomPosition)
|
|
8057
8127
|
return floatBottomPosition;
|
|
@@ -8184,7 +8254,7 @@ class Position {
|
|
|
8184
8254
|
const currentZone = this.draw.getZone().getZone();
|
|
8185
8255
|
for (let f = 0; f < this.floatPositionList.length; f++) {
|
|
8186
8256
|
const { position, element, isTable, index: index2, trIndex, tdIndex, tdValueIndex, zone: floatElementZone, pageNo } = this.floatPositionList[f];
|
|
8187
|
-
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)) {
|
|
8188
8258
|
const imgFloatPosition = element.imgFloatPosition;
|
|
8189
8259
|
if (x >= imgFloatPosition.x && x <= imgFloatPosition.x + element.width && y >= imgFloatPosition.y && y <= imgFloatPosition.y + element.height) {
|
|
8190
8260
|
if (isTable) {
|
|
@@ -8247,6 +8317,38 @@ class Position {
|
|
|
8247
8317
|
});
|
|
8248
8318
|
return positionResult;
|
|
8249
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
|
+
}
|
|
8250
8352
|
}
|
|
8251
8353
|
class RangeManager {
|
|
8252
8354
|
constructor(draw) {
|
|
@@ -9984,6 +10086,9 @@ class TableTool {
|
|
|
9984
10086
|
constructor(draw) {
|
|
9985
10087
|
__publicField(this, "MIN_TD_WIDTH", 20);
|
|
9986
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);
|
|
9987
10092
|
__publicField(this, "BORDER_VALUE", 4);
|
|
9988
10093
|
__publicField(this, "draw");
|
|
9989
10094
|
__publicField(this, "canvas");
|
|
@@ -9991,6 +10096,8 @@ class TableTool {
|
|
|
9991
10096
|
__publicField(this, "position");
|
|
9992
10097
|
__publicField(this, "container");
|
|
9993
10098
|
__publicField(this, "toolRowContainer");
|
|
10099
|
+
__publicField(this, "toolRowAddBtn");
|
|
10100
|
+
__publicField(this, "toolColAddBtn");
|
|
9994
10101
|
__publicField(this, "toolColContainer");
|
|
9995
10102
|
__publicField(this, "toolBorderContainer");
|
|
9996
10103
|
__publicField(this, "anchorLine");
|
|
@@ -10002,6 +10109,8 @@ class TableTool {
|
|
|
10002
10109
|
this.position = draw.getPosition();
|
|
10003
10110
|
this.container = draw.getContainer();
|
|
10004
10111
|
this.toolRowContainer = null;
|
|
10112
|
+
this.toolRowAddBtn = null;
|
|
10113
|
+
this.toolColAddBtn = null;
|
|
10005
10114
|
this.toolColContainer = null;
|
|
10006
10115
|
this.toolBorderContainer = null;
|
|
10007
10116
|
this.anchorLine = null;
|
|
@@ -10009,11 +10118,15 @@ class TableTool {
|
|
|
10009
10118
|
this.mousedownY = 0;
|
|
10010
10119
|
}
|
|
10011
10120
|
dispose() {
|
|
10012
|
-
var _a, _b, _c;
|
|
10121
|
+
var _a, _b, _c, _d, _e;
|
|
10013
10122
|
(_a = this.toolRowContainer) == null ? void 0 : _a.remove();
|
|
10014
|
-
(_b = this.
|
|
10015
|
-
(_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();
|
|
10016
10127
|
this.toolRowContainer = null;
|
|
10128
|
+
this.toolRowAddBtn = null;
|
|
10129
|
+
this.toolColAddBtn = null;
|
|
10017
10130
|
this.toolColContainer = null;
|
|
10018
10131
|
this.toolBorderContainer = null;
|
|
10019
10132
|
}
|
|
@@ -10037,6 +10150,8 @@ class TableTool {
|
|
|
10037
10150
|
const td = element.trList[trIndex].tdList[tdIndex];
|
|
10038
10151
|
const rowIndex = td.rowIndex;
|
|
10039
10152
|
const colIndex = td.colIndex;
|
|
10153
|
+
const tableHeight = element.height * scale;
|
|
10154
|
+
const tableWidth = element.width * scale;
|
|
10040
10155
|
const rowHeightList = trList.map((tr) => tr.height);
|
|
10041
10156
|
const rowContainer = document.createElement("div");
|
|
10042
10157
|
rowContainer.classList.add(`${EDITOR_PREFIX}-table-tool__row`);
|
|
@@ -10066,6 +10181,23 @@ class TableTool {
|
|
|
10066
10181
|
rowContainer.style.top = `${tableY}px`;
|
|
10067
10182
|
this.container.append(rowContainer);
|
|
10068
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;
|
|
10069
10201
|
const colWidthList = colgroup.map((col) => col.width);
|
|
10070
10202
|
const colContainer = document.createElement("div");
|
|
10071
10203
|
colContainer.classList.add(`${EDITOR_PREFIX}-table-tool__col`);
|
|
@@ -10095,8 +10227,23 @@ class TableTool {
|
|
|
10095
10227
|
colContainer.style.top = `${tableY}px`;
|
|
10096
10228
|
this.container.append(colContainer);
|
|
10097
10229
|
this.toolColContainer = colContainer;
|
|
10098
|
-
const
|
|
10099
|
-
|
|
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;
|
|
10100
10247
|
const borderContainer = document.createElement("div");
|
|
10101
10248
|
borderContainer.classList.add(`${EDITOR_PREFIX}-table-tool__border`);
|
|
10102
10249
|
borderContainer.style.height = `${tableHeight}px`;
|
|
@@ -10366,9 +10513,14 @@ class Header {
|
|
|
10366
10513
|
}
|
|
10367
10514
|
_computeRowList() {
|
|
10368
10515
|
const innerWidth = this.draw.getInnerWidth();
|
|
10516
|
+
const margins = this.draw.getMargins();
|
|
10517
|
+
const surroundElementList = pickSurroundElementList(this.elementList);
|
|
10369
10518
|
this.rowList = this.draw.computeRowList({
|
|
10519
|
+
startX: margins[3],
|
|
10520
|
+
startY: this.getHeaderTop(),
|
|
10370
10521
|
innerWidth,
|
|
10371
|
-
elementList: this.elementList
|
|
10522
|
+
elementList: this.elementList,
|
|
10523
|
+
surroundElementList
|
|
10372
10524
|
});
|
|
10373
10525
|
}
|
|
10374
10526
|
_computePositionList() {
|
|
@@ -10701,6 +10853,8 @@ class SelectControl {
|
|
|
10701
10853
|
__publicField(this, "control");
|
|
10702
10854
|
__publicField(this, "isPopup");
|
|
10703
10855
|
__publicField(this, "selectDom");
|
|
10856
|
+
__publicField(this, "options");
|
|
10857
|
+
this.options = control.getDraw().getOptions();
|
|
10704
10858
|
this.element = element;
|
|
10705
10859
|
this.control = control;
|
|
10706
10860
|
this.isPopup = false;
|
|
@@ -10877,7 +11031,9 @@ class SelectControl {
|
|
|
10877
11031
|
value: data2[i],
|
|
10878
11032
|
controlComponent: ControlComponent.VALUE
|
|
10879
11033
|
});
|
|
10880
|
-
formatElementContext(elementList, [newElement], prefixIndex
|
|
11034
|
+
formatElementContext(elementList, [newElement], prefixIndex, {
|
|
11035
|
+
editorOptions: this.options
|
|
11036
|
+
});
|
|
10881
11037
|
draw.spliceElementList(elementList, start + i, 0, newElement);
|
|
10882
11038
|
}
|
|
10883
11039
|
control.code = code;
|
|
@@ -10947,6 +11103,8 @@ class TextControl {
|
|
|
10947
11103
|
constructor(element, control) {
|
|
10948
11104
|
__publicField(this, "element");
|
|
10949
11105
|
__publicField(this, "control");
|
|
11106
|
+
__publicField(this, "options");
|
|
11107
|
+
this.options = control.getDraw().getOptions();
|
|
10950
11108
|
this.element = element;
|
|
10951
11109
|
this.control = control;
|
|
10952
11110
|
}
|
|
@@ -11010,7 +11168,9 @@ class TextControl {
|
|
|
11010
11168
|
const newElement = __spreadProps(__spreadValues(__spreadValues({}, anchorElement), data2[i]), {
|
|
11011
11169
|
controlComponent: ControlComponent.VALUE
|
|
11012
11170
|
});
|
|
11013
|
-
formatElementContext(elementList, [newElement], startIndex
|
|
11171
|
+
formatElementContext(elementList, [newElement], startIndex, {
|
|
11172
|
+
editorOptions: this.options
|
|
11173
|
+
});
|
|
11014
11174
|
draw.spliceElementList(elementList, start + i, 0, newElement);
|
|
11015
11175
|
}
|
|
11016
11176
|
return start + data2.length - 1;
|
|
@@ -11568,8 +11728,10 @@ class DateControl {
|
|
|
11568
11728
|
__publicField(this, "control");
|
|
11569
11729
|
__publicField(this, "isPopup");
|
|
11570
11730
|
__publicField(this, "datePicker");
|
|
11731
|
+
__publicField(this, "options");
|
|
11571
11732
|
const draw = control.getDraw();
|
|
11572
11733
|
this.draw = draw;
|
|
11734
|
+
this.options = draw.getOptions();
|
|
11573
11735
|
this.element = element;
|
|
11574
11736
|
this.control = control;
|
|
11575
11737
|
this.isPopup = false;
|
|
@@ -11648,7 +11810,9 @@ class DateControl {
|
|
|
11648
11810
|
const newElement = __spreadProps(__spreadValues(__spreadValues({}, anchorElement), data2[i]), {
|
|
11649
11811
|
controlComponent: ControlComponent.VALUE
|
|
11650
11812
|
});
|
|
11651
|
-
formatElementContext(elementList, [newElement], startIndex
|
|
11813
|
+
formatElementContext(elementList, [newElement], startIndex, {
|
|
11814
|
+
editorOptions: this.options
|
|
11815
|
+
});
|
|
11652
11816
|
draw.spliceElementList(elementList, start + i, 0, newElement);
|
|
11653
11817
|
}
|
|
11654
11818
|
return start + data2.length - 1;
|
|
@@ -11694,7 +11858,9 @@ class DateControl {
|
|
|
11694
11858
|
value: date[i],
|
|
11695
11859
|
controlComponent: ControlComponent.VALUE
|
|
11696
11860
|
});
|
|
11697
|
-
formatElementContext(elementList, [newElement], prefixIndex
|
|
11861
|
+
formatElementContext(elementList, [newElement], prefixIndex, {
|
|
11862
|
+
editorOptions: this.options
|
|
11863
|
+
});
|
|
11698
11864
|
draw.spliceElementList(elementList, start + i, 0, newElement);
|
|
11699
11865
|
}
|
|
11700
11866
|
if (!context.range) {
|
|
@@ -11939,7 +12105,7 @@ class Control {
|
|
|
11939
12105
|
}
|
|
11940
12106
|
getIsDisabledControl(context = {}) {
|
|
11941
12107
|
var _a, _b;
|
|
11942
|
-
if (!this.activeControl)
|
|
12108
|
+
if (this.draw.isDesignMode() || !this.activeControl)
|
|
11943
12109
|
return false;
|
|
11944
12110
|
const { startIndex, endIndex } = context.range || this.range.getRange();
|
|
11945
12111
|
if (startIndex === endIndex && ~startIndex && ~endIndex) {
|
|
@@ -12056,7 +12222,7 @@ class Control {
|
|
|
12056
12222
|
}
|
|
12057
12223
|
}
|
|
12058
12224
|
repaintControl(options = {}) {
|
|
12059
|
-
const { curIndex, isCompute = true, isSubmitHistory = true } = options;
|
|
12225
|
+
const { curIndex, isCompute = true, isSubmitHistory = true, isSetCursor = true } = options;
|
|
12060
12226
|
if (curIndex === void 0) {
|
|
12061
12227
|
this.range.clearRange();
|
|
12062
12228
|
this.draw.render({
|
|
@@ -12069,6 +12235,7 @@ class Control {
|
|
|
12069
12235
|
this.draw.render({
|
|
12070
12236
|
curIndex,
|
|
12071
12237
|
isCompute,
|
|
12238
|
+
isSetCursor,
|
|
12072
12239
|
isSubmitHistory
|
|
12073
12240
|
});
|
|
12074
12241
|
}
|
|
@@ -12146,9 +12313,11 @@ class Control {
|
|
|
12146
12313
|
removeControl(startIndex, context = {}) {
|
|
12147
12314
|
const elementList = context.elementList || this.getElementList();
|
|
12148
12315
|
const startElement = elementList[startIndex];
|
|
12149
|
-
|
|
12150
|
-
|
|
12151
|
-
|
|
12316
|
+
if (!this.draw.isDesignMode()) {
|
|
12317
|
+
const { deletable = true } = startElement.control;
|
|
12318
|
+
if (!deletable)
|
|
12319
|
+
return null;
|
|
12320
|
+
}
|
|
12152
12321
|
let leftIndex = -1;
|
|
12153
12322
|
let rightIndex = -1;
|
|
12154
12323
|
let preIndex = startIndex;
|
|
@@ -12220,7 +12389,9 @@ class Control {
|
|
|
12220
12389
|
controlComponent: ControlComponent.PLACEHOLDER,
|
|
12221
12390
|
color: this.controlOptions.placeholderColor
|
|
12222
12391
|
});
|
|
12223
|
-
formatElementContext(elementList, [newElement], startIndex
|
|
12392
|
+
formatElementContext(elementList, [newElement], startIndex, {
|
|
12393
|
+
editorOptions: this.options
|
|
12394
|
+
});
|
|
12224
12395
|
this.draw.spliceElementList(elementList, startIndex + p + 1, 0, newElement);
|
|
12225
12396
|
}
|
|
12226
12397
|
}
|
|
@@ -12972,7 +13143,7 @@ function WorkerWrapper$2() {
|
|
|
12972
13143
|
objURL && (window.URL || window.webkitURL).revokeObjectURL(objURL);
|
|
12973
13144
|
}
|
|
12974
13145
|
}
|
|
12975
|
-
const encodedJs$1 = "
|
|
13146
|
+
const encodedJs$1 = "KCgpPT57KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBsOyhmdW5jdGlvbih0KXt0LlRFWFQ9InRleHQiLHQuSU1BR0U9ImltYWdlIix0LlRBQkxFPSJ0YWJsZSIsdC5IWVBFUkxJTks9Imh5cGVybGluayIsdC5TVVBFUlNDUklQVD0ic3VwZXJzY3JpcHQiLHQuU1VCU0NSSVBUPSJzdWJzY3JpcHQiLHQuU0VQQVJBVE9SPSJzZXBhcmF0b3IiLHQuUEFHRV9CUkVBSz0icGFnZUJyZWFrIix0LkNPTlRST0w9ImNvbnRyb2wiLHQuQ0hFQ0tCT1g9ImNoZWNrYm94Iix0LlJBRElPPSJyYWRpbyIsdC5MQVRFWD0ibGF0ZXgiLHQuVEFCPSJ0YWIiLHQuREFURT0iZGF0ZSIsdC5CTE9DSz0iYmxvY2siLHQuVElUTEU9InRpdGxlIix0LkxJU1Q9Imxpc3QifSkobHx8KGw9e30pKTt2YXIgYTsoZnVuY3Rpb24odCl7dC5GSVJTVD0iZmlyc3QiLHQuU0VDT05EPSJzZWNvbmQiLHQuVEhJUkQ9InRoaXJkIix0LkZPVVJUSD0iZm91cnRoIix0LkZJRlRIPSJmaWZ0aCIsdC5TSVhUSD0ic2l4dGgifSkoYXx8KGE9e30pKTtjb25zdCBnPXtbYS5GSVJTVF06MSxbYS5TRUNPTkRdOjIsW2EuVEhJUkRdOjMsW2EuRk9VUlRIXTo0LFthLkZJRlRIXTo1LFthLlNJWFRIXTo2fSxMPVtsLlRFWFQsbC5IWVBFUkxJTkssbC5TVUJTQ1JJUFQsbC5TVVBFUlNDUklQVCxsLkNPTlRST0wsbC5EQVRFXSxUPSJcdTIwMEIiO2Z1bmN0aW9uIGQodCl7cmV0dXJuIXQudHlwZXx8TC5pbmNsdWRlcyh0LnR5cGUpfWZ1bmN0aW9uIGYodCl7Y29uc3R7ZWxlbWVudExpc3Q6bixwb3NpdGlvbkxpc3Q6dn09dCxJPVtdO2xldCBpPTA7Zm9yKDtpPG4ubGVuZ3RoOyl7Y29uc3Qgcz1uW2ldO2lmKHMudGl0bGVJZCl7Y29uc3QgZT1zLnRpdGxlSWQsbz1zLmxldmVsLGM9e3R5cGU6bC5USVRMRSx2YWx1ZToiIixsZXZlbDpvLHRpdGxlSWQ6ZSxwYWdlTm86dltpXS5wYWdlTm99LHI9W107Zm9yKDtpPG4ubGVuZ3RoOyl7Y29uc3QgdT1uW2ldO2lmKGUhPT11LnRpdGxlSWQpe2ktLTticmVha31yLnB1c2godSksaSsrfWMudmFsdWU9ci5maWx0ZXIodT0+ZCh1KSkubWFwKHU9PnUudmFsdWUpLmpvaW4oIiIpLnJlcGxhY2UobmV3IFJlZ0V4cChULCJnIiksIiIpLEkucHVzaChjKX1pKyt9aWYoIUkubGVuZ3RoKXJldHVybiBudWxsO2NvbnN0IGg9KHMsZSk9Pntjb25zdCBvPWUuc3ViQ2F0YWxvZ1tlLnN1YkNhdGFsb2cubGVuZ3RoLTFdLGM9Z1tvPT1udWxsP3ZvaWQgMDpvLmxldmVsXSxyPWdbcy5sZXZlbF07byYmcj5jP2gocyxvKTplLnN1YkNhdGFsb2cucHVzaCh7aWQ6cy50aXRsZUlkLG5hbWU6cy52YWx1ZSxsZXZlbDpzLmxldmVsLHBhZ2VObzpzLnBhZ2VObyxzdWJDYXRhbG9nOltdfSl9LFI9W107Zm9yKGxldCBzPTA7czxJLmxlbmd0aDtzKyspe2NvbnN0IGU9SVtzXSxvPVJbUi5sZW5ndGgtMV0sYz1nW289PW51bGw/dm9pZCAwOm8ubGV2ZWxdLHI9Z1tlLmxldmVsXTtvJiZyPmM/aChlLG8pOlIucHVzaCh7aWQ6ZS50aXRsZUlkLG5hbWU6ZS52YWx1ZSxsZXZlbDplLmxldmVsLHBhZ2VObzplLnBhZ2VObyxzdWJDYXRhbG9nOltdfSl9cmV0dXJuIFJ9b25tZXNzYWdlPXQ9Pntjb25zdCBuPXQuZGF0YSx2PWYobik7cG9zdE1lc3NhZ2Uodil9fSkoKTt9KSgpOwo=";
|
|
12976
13147
|
const blob$1 = typeof window !== "undefined" && window.Blob && new Blob([atob(encodedJs$1)], { type: "text/javascript;charset=utf-8" });
|
|
12977
13148
|
function WorkerWrapper$1() {
|
|
12978
13149
|
const objURL = blob$1 && (window.URL || window.webkitURL).createObjectURL(blob$1);
|
|
@@ -13024,7 +13195,11 @@ class WorkerManager {
|
|
|
13024
13195
|
reject(evt);
|
|
13025
13196
|
};
|
|
13026
13197
|
const elementList = this.draw.getOriginalMainElementList();
|
|
13027
|
-
this.
|
|
13198
|
+
const positionList = this.draw.getPosition().getOriginalMainPositionList();
|
|
13199
|
+
this.catalogWorker.postMessage({
|
|
13200
|
+
elementList,
|
|
13201
|
+
positionList
|
|
13202
|
+
});
|
|
13028
13203
|
});
|
|
13029
13204
|
}
|
|
13030
13205
|
getGroupIds() {
|
|
@@ -13109,10 +13284,12 @@ class Previewer {
|
|
|
13109
13284
|
return { x, y };
|
|
13110
13285
|
}
|
|
13111
13286
|
_createResizerDom() {
|
|
13287
|
+
const { scale } = this.options;
|
|
13112
13288
|
const resizerSelection = document.createElement("div");
|
|
13113
13289
|
resizerSelection.classList.add(`${EDITOR_PREFIX}-resizer-selection`);
|
|
13114
13290
|
resizerSelection.style.display = "none";
|
|
13115
13291
|
resizerSelection.style.borderColor = this.options.resizerColor;
|
|
13292
|
+
resizerSelection.style.borderWidth = `${scale}px`;
|
|
13116
13293
|
const resizerHandleList = [];
|
|
13117
13294
|
for (let i = 0; i < 8; i++) {
|
|
13118
13295
|
const handleDom = document.createElement("div");
|
|
@@ -13365,12 +13542,13 @@ class Previewer {
|
|
|
13365
13542
|
document.body.style.overflow = "auto";
|
|
13366
13543
|
}
|
|
13367
13544
|
_updateResizerRect(width, height) {
|
|
13368
|
-
const handleSize = this.options
|
|
13545
|
+
const { resizerSize: handleSize, scale } = this.options;
|
|
13369
13546
|
this.resizerSelection.style.width = `${width}px`;
|
|
13370
13547
|
this.resizerSelection.style.height = `${height}px`;
|
|
13371
13548
|
for (let i = 0; i < 8; i++) {
|
|
13372
13549
|
const left2 = i === 0 || i === 6 || i === 7 ? -handleSize : i === 1 || i === 5 ? width / 2 : width - handleSize;
|
|
13373
13550
|
const top = i === 0 || i === 1 || i === 2 ? -handleSize : i === 3 || i === 7 ? height / 2 - handleSize : height - handleSize;
|
|
13551
|
+
this.resizerHandleList[i].style.transform = `scale(${scale})`;
|
|
13374
13552
|
this.resizerHandleList[i].style.left = `${left2}px`;
|
|
13375
13553
|
this.resizerHandleList[i].style.top = `${top}px`;
|
|
13376
13554
|
}
|
|
@@ -13396,6 +13574,7 @@ class Previewer {
|
|
|
13396
13574
|
const { x: resizerLeft, y: resizerTop } = this._getElementPosition(element, position);
|
|
13397
13575
|
this.resizerSelection.style.left = `${resizerLeft}px`;
|
|
13398
13576
|
this.resizerSelection.style.top = `${resizerTop}px`;
|
|
13577
|
+
this.resizerSelection.style.borderWidth = `${scale}px`;
|
|
13399
13578
|
this._updateResizerRect(elementWidth, elementHeight);
|
|
13400
13579
|
this.resizerSelection.style.display = "block";
|
|
13401
13580
|
this.curElement = element;
|
|
@@ -13413,7 +13592,9 @@ class DateParticle {
|
|
|
13413
13592
|
__publicField(this, "draw");
|
|
13414
13593
|
__publicField(this, "range");
|
|
13415
13594
|
__publicField(this, "datePicker");
|
|
13595
|
+
__publicField(this, "options");
|
|
13416
13596
|
this.draw = draw;
|
|
13597
|
+
this.options = draw.getOptions();
|
|
13417
13598
|
this.range = draw.getRange();
|
|
13418
13599
|
this.datePicker = new DatePicker(draw, {
|
|
13419
13600
|
onSubmit: this._setValue.bind(this)
|
|
@@ -13440,7 +13621,9 @@ class DateParticle {
|
|
|
13440
13621
|
}
|
|
13441
13622
|
]
|
|
13442
13623
|
};
|
|
13443
|
-
formatElementContext(elementList, [dateElement], leftIndex
|
|
13624
|
+
formatElementContext(elementList, [dateElement], leftIndex, {
|
|
13625
|
+
editorOptions: this.options
|
|
13626
|
+
});
|
|
13444
13627
|
this.draw.insertElementList([dateElement]);
|
|
13445
13628
|
}
|
|
13446
13629
|
getDateElementRange() {
|
|
@@ -13674,6 +13857,7 @@ const contextmenu$1 = {
|
|
|
13674
13857
|
textWrapType: {
|
|
13675
13858
|
embed: "\u5D4C\u5165\u578B",
|
|
13676
13859
|
upDown: "\u4E0A\u4E0B\u578B\u73AF\u7ED5",
|
|
13860
|
+
surround: "\u56DB\u5468\u578B\u73AF\u7ED5",
|
|
13677
13861
|
floatTop: "\u6D6E\u4E8E\u6587\u5B57\u4E0A\u65B9",
|
|
13678
13862
|
floatBottom: "\u886C\u4E8E\u6587\u5B57\u4E0B\u65B9"
|
|
13679
13863
|
}
|
|
@@ -13768,6 +13952,7 @@ const contextmenu = {
|
|
|
13768
13952
|
textWrapType: {
|
|
13769
13953
|
embed: "Embed",
|
|
13770
13954
|
upDown: "Up down",
|
|
13955
|
+
surround: "Surround",
|
|
13771
13956
|
floatTop: "Float above text",
|
|
13772
13957
|
floatBottom: "Float below text"
|
|
13773
13958
|
}
|
|
@@ -14764,163 +14949,890 @@ class PageBorder {
|
|
|
14764
14949
|
ctx.restore();
|
|
14765
14950
|
}
|
|
14766
14951
|
}
|
|
14767
|
-
|
|
14768
|
-
|
|
14769
|
-
|
|
14770
|
-
|
|
14771
|
-
|
|
14772
|
-
|
|
14773
|
-
|
|
14774
|
-
|
|
14775
|
-
__publicField(this, "
|
|
14776
|
-
__publicField(this, "options");
|
|
14777
|
-
__publicField(this, "position");
|
|
14778
|
-
__publicField(this, "zone");
|
|
14779
|
-
__publicField(this, "elementList");
|
|
14780
|
-
__publicField(this, "listener");
|
|
14952
|
+
function positionContextChange(draw, payload) {
|
|
14953
|
+
const { value, oldValue } = payload;
|
|
14954
|
+
if (oldValue.isTable && !value.isTable) {
|
|
14955
|
+
draw.getTableTool().dispose();
|
|
14956
|
+
}
|
|
14957
|
+
}
|
|
14958
|
+
class Actuator {
|
|
14959
|
+
constructor(draw) {
|
|
14960
|
+
__publicField(this, "draw");
|
|
14781
14961
|
__publicField(this, "eventBus");
|
|
14782
|
-
|
|
14783
|
-
|
|
14784
|
-
|
|
14785
|
-
__publicField(this, "globalEvent");
|
|
14786
|
-
__publicField(this, "cursor");
|
|
14787
|
-
__publicField(this, "range");
|
|
14788
|
-
__publicField(this, "margin");
|
|
14789
|
-
__publicField(this, "background");
|
|
14790
|
-
__publicField(this, "search");
|
|
14791
|
-
__publicField(this, "group");
|
|
14792
|
-
__publicField(this, "underline");
|
|
14793
|
-
__publicField(this, "strikeout");
|
|
14794
|
-
__publicField(this, "highlight");
|
|
14795
|
-
__publicField(this, "historyManager");
|
|
14796
|
-
__publicField(this, "previewer");
|
|
14797
|
-
__publicField(this, "imageParticle");
|
|
14798
|
-
__publicField(this, "laTexParticle");
|
|
14799
|
-
__publicField(this, "textParticle");
|
|
14800
|
-
__publicField(this, "tableParticle");
|
|
14801
|
-
__publicField(this, "tableTool");
|
|
14802
|
-
__publicField(this, "pageNumber");
|
|
14803
|
-
__publicField(this, "lineNumber");
|
|
14804
|
-
__publicField(this, "waterMark");
|
|
14805
|
-
__publicField(this, "placeholder");
|
|
14806
|
-
__publicField(this, "header");
|
|
14807
|
-
__publicField(this, "footer");
|
|
14808
|
-
__publicField(this, "hyperlinkParticle");
|
|
14809
|
-
__publicField(this, "dateParticle");
|
|
14810
|
-
__publicField(this, "separatorParticle");
|
|
14811
|
-
__publicField(this, "pageBreakParticle");
|
|
14812
|
-
__publicField(this, "superscriptParticle");
|
|
14813
|
-
__publicField(this, "subscriptParticle");
|
|
14814
|
-
__publicField(this, "checkboxParticle");
|
|
14815
|
-
__publicField(this, "radioParticle");
|
|
14816
|
-
__publicField(this, "blockParticle");
|
|
14817
|
-
__publicField(this, "listParticle");
|
|
14818
|
-
__publicField(this, "lineBreakParticle");
|
|
14819
|
-
__publicField(this, "control");
|
|
14820
|
-
__publicField(this, "pageBorder");
|
|
14821
|
-
__publicField(this, "workerManager");
|
|
14822
|
-
__publicField(this, "scrollObserver");
|
|
14823
|
-
__publicField(this, "selectionObserver");
|
|
14824
|
-
__publicField(this, "imageObserver");
|
|
14825
|
-
__publicField(this, "LETTER_REG");
|
|
14826
|
-
__publicField(this, "WORD_LIKE_REG");
|
|
14827
|
-
__publicField(this, "rowList");
|
|
14828
|
-
__publicField(this, "pageRowList");
|
|
14829
|
-
__publicField(this, "painterStyle");
|
|
14830
|
-
__publicField(this, "painterOptions");
|
|
14831
|
-
__publicField(this, "visiblePageNoList");
|
|
14832
|
-
__publicField(this, "intersectionPageNo");
|
|
14833
|
-
__publicField(this, "lazyRenderIntersectionObserver");
|
|
14834
|
-
__publicField(this, "printModeData");
|
|
14835
|
-
this.container = this._wrapContainer(rootContainer);
|
|
14836
|
-
this.pageList = [];
|
|
14837
|
-
this.ctxList = [];
|
|
14838
|
-
this.pageNo = 0;
|
|
14839
|
-
this.pagePixelRatio = null;
|
|
14840
|
-
this.mode = options.mode;
|
|
14841
|
-
this.options = options;
|
|
14842
|
-
this.elementList = data2.main;
|
|
14843
|
-
this.listener = listener;
|
|
14844
|
-
this.eventBus = eventBus;
|
|
14845
|
-
this.override = override;
|
|
14846
|
-
this._formatContainer();
|
|
14847
|
-
this.pageContainer = this._createPageContainer();
|
|
14848
|
-
this._createPage(0);
|
|
14849
|
-
this.i18n = new I18n();
|
|
14850
|
-
this.historyManager = new HistoryManager(this);
|
|
14851
|
-
this.position = new Position(this);
|
|
14852
|
-
this.zone = new Zone(this);
|
|
14853
|
-
this.range = new RangeManager(this);
|
|
14854
|
-
this.margin = new Margin(this);
|
|
14855
|
-
this.background = new Background(this);
|
|
14856
|
-
this.search = new Search(this);
|
|
14857
|
-
this.group = new Group(this);
|
|
14858
|
-
this.underline = new Underline(this);
|
|
14859
|
-
this.strikeout = new Strikeout(this);
|
|
14860
|
-
this.highlight = new Highlight(this);
|
|
14861
|
-
this.previewer = new Previewer(this);
|
|
14862
|
-
this.imageParticle = new ImageParticle(this);
|
|
14863
|
-
this.laTexParticle = new LaTexParticle(this);
|
|
14864
|
-
this.textParticle = new TextParticle(this);
|
|
14865
|
-
this.tableParticle = new TableParticle(this);
|
|
14866
|
-
this.tableTool = new TableTool(this);
|
|
14867
|
-
this.pageNumber = new PageNumber(this);
|
|
14868
|
-
this.lineNumber = new LineNumber(this);
|
|
14869
|
-
this.waterMark = new Watermark(this);
|
|
14870
|
-
this.placeholder = new Placeholder(this);
|
|
14871
|
-
this.header = new Header(this, data2.header);
|
|
14872
|
-
this.footer = new Footer(this, data2.footer);
|
|
14873
|
-
this.hyperlinkParticle = new HyperlinkParticle(this);
|
|
14874
|
-
this.dateParticle = new DateParticle(this);
|
|
14875
|
-
this.separatorParticle = new SeparatorParticle(this);
|
|
14876
|
-
this.pageBreakParticle = new PageBreakParticle(this);
|
|
14877
|
-
this.superscriptParticle = new SuperscriptParticle();
|
|
14878
|
-
this.subscriptParticle = new SubscriptParticle();
|
|
14879
|
-
this.checkboxParticle = new CheckboxParticle(this);
|
|
14880
|
-
this.radioParticle = new RadioParticle(this);
|
|
14881
|
-
this.blockParticle = new BlockParticle(this);
|
|
14882
|
-
this.listParticle = new ListParticle(this);
|
|
14883
|
-
this.lineBreakParticle = new LineBreakParticle(this);
|
|
14884
|
-
this.control = new Control(this);
|
|
14885
|
-
this.pageBorder = new PageBorder(this);
|
|
14886
|
-
this.scrollObserver = new ScrollObserver(this);
|
|
14887
|
-
this.selectionObserver = new SelectionObserver(this);
|
|
14888
|
-
this.imageObserver = new ImageObserver();
|
|
14889
|
-
new MouseObserver(this);
|
|
14890
|
-
this.canvasEvent = new CanvasEvent(this);
|
|
14891
|
-
this.cursor = new Cursor(this, this.canvasEvent);
|
|
14892
|
-
this.canvasEvent.register();
|
|
14893
|
-
this.globalEvent = new GlobalEvent(this, this.canvasEvent);
|
|
14894
|
-
this.globalEvent.register();
|
|
14895
|
-
this.workerManager = new WorkerManager(this);
|
|
14896
|
-
const { letterClass } = options;
|
|
14897
|
-
this.LETTER_REG = new RegExp(`[${letterClass.join("")}]`);
|
|
14898
|
-
this.WORD_LIKE_REG = new RegExp(`${letterClass.map((letter) => `[^${letter}][${letter}]`).join("|")}`);
|
|
14899
|
-
this.rowList = [];
|
|
14900
|
-
this.pageRowList = [];
|
|
14901
|
-
this.painterStyle = null;
|
|
14902
|
-
this.painterOptions = null;
|
|
14903
|
-
this.visiblePageNoList = [];
|
|
14904
|
-
this.intersectionPageNo = 0;
|
|
14905
|
-
this.lazyRenderIntersectionObserver = null;
|
|
14906
|
-
this.printModeData = null;
|
|
14907
|
-
this.render({
|
|
14908
|
-
isInit: true,
|
|
14909
|
-
isSetCursor: false,
|
|
14910
|
-
isFirstRender: true
|
|
14911
|
-
});
|
|
14962
|
+
this.draw = draw;
|
|
14963
|
+
this.eventBus = draw.getEventBus();
|
|
14964
|
+
this.execute();
|
|
14912
14965
|
}
|
|
14913
|
-
|
|
14914
|
-
|
|
14966
|
+
execute() {
|
|
14967
|
+
this.eventBus.on("positionContextChange", (payload) => {
|
|
14968
|
+
positionContextChange(this.draw, payload);
|
|
14969
|
+
});
|
|
14915
14970
|
}
|
|
14916
|
-
|
|
14917
|
-
|
|
14971
|
+
}
|
|
14972
|
+
class TableOperate {
|
|
14973
|
+
constructor(draw) {
|
|
14974
|
+
__publicField(this, "draw");
|
|
14975
|
+
__publicField(this, "range");
|
|
14976
|
+
__publicField(this, "position");
|
|
14977
|
+
__publicField(this, "tableTool");
|
|
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();
|
|
14918
14986
|
}
|
|
14919
|
-
|
|
14920
|
-
|
|
14921
|
-
|
|
14922
|
-
if (
|
|
14923
|
-
|
|
14987
|
+
insertTable(row, col) {
|
|
14988
|
+
var _a;
|
|
14989
|
+
const { startIndex, endIndex } = this.range.getRange();
|
|
14990
|
+
if (!~startIndex && !~endIndex)
|
|
14991
|
+
return;
|
|
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;
|
|
15001
|
+
}
|
|
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
|
+
});
|
|
15009
|
+
}
|
|
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 = {
|
|
14924
15836
|
header: this.header.getElementList(),
|
|
14925
15837
|
main: this.elementList,
|
|
14926
15838
|
footer: this.footer.getElementList()
|
|
@@ -14947,6 +15859,8 @@ class Draw {
|
|
|
14947
15859
|
}
|
|
14948
15860
|
isReadonly() {
|
|
14949
15861
|
switch (this.mode) {
|
|
15862
|
+
case EditorMode.DESIGN:
|
|
15863
|
+
return false;
|
|
14950
15864
|
case EditorMode.READONLY:
|
|
14951
15865
|
case EditorMode.PRINT:
|
|
14952
15866
|
return true;
|
|
@@ -14957,13 +15871,17 @@ class Draw {
|
|
|
14957
15871
|
}
|
|
14958
15872
|
}
|
|
14959
15873
|
isDisabled() {
|
|
14960
|
-
var _a, _b, _c, _d;
|
|
15874
|
+
var _a, _b, _c, _d, _e;
|
|
15875
|
+
if (this.mode === EditorMode.DESIGN)
|
|
15876
|
+
return false;
|
|
14961
15877
|
const { startIndex, endIndex } = this.range.getRange();
|
|
14962
15878
|
const elementList = this.getElementList();
|
|
15879
|
+
if ((_a = this.getTd()) == null ? void 0 : _a.disabled)
|
|
15880
|
+
return true;
|
|
14963
15881
|
if (startIndex === endIndex) {
|
|
14964
15882
|
const startElement = elementList[startIndex];
|
|
14965
15883
|
const nextElement = elementList[startIndex + 1];
|
|
14966
|
-
return !!(((
|
|
15884
|
+
return !!(((_b = startElement == null ? void 0 : startElement.title) == null ? void 0 : _b.disabled) && ((_c = nextElement == null ? void 0 : nextElement.title) == null ? void 0 : _c.disabled) || ((_d = startElement == null ? void 0 : startElement.control) == null ? void 0 : _d.disabled) && ((_e = nextElement == null ? void 0 : nextElement.control) == null ? void 0 : _e.disabled));
|
|
14967
15885
|
}
|
|
14968
15886
|
const selectionElementList = elementList.slice(startIndex + 1, endIndex + 1);
|
|
14969
15887
|
return selectionElementList.some((element) => {
|
|
@@ -14971,6 +15889,9 @@ class Draw {
|
|
|
14971
15889
|
return ((_a2 = element.title) == null ? void 0 : _a2.disabled) || ((_b2 = element.control) == null ? void 0 : _b2.disabled);
|
|
14972
15890
|
});
|
|
14973
15891
|
}
|
|
15892
|
+
isDesignMode() {
|
|
15893
|
+
return this.mode === EditorMode.DESIGN;
|
|
15894
|
+
}
|
|
14974
15895
|
getOriginalWidth() {
|
|
14975
15896
|
const { paperDirection, width, height } = this.options;
|
|
14976
15897
|
return paperDirection === PaperDirection.VERTICAL ? width : height;
|
|
@@ -15182,6 +16103,15 @@ class Draw {
|
|
|
15182
16103
|
getFooterElementList() {
|
|
15183
16104
|
return this.footer.getElementList();
|
|
15184
16105
|
}
|
|
16106
|
+
getTd() {
|
|
16107
|
+
const positionContext = this.position.getPositionContext();
|
|
16108
|
+
const { index: index2, trIndex, tdIndex, isTable } = positionContext;
|
|
16109
|
+
if (isTable) {
|
|
16110
|
+
const elementList = this.getOriginalElementList();
|
|
16111
|
+
return elementList[index2].trList[trIndex].tdList[tdIndex];
|
|
16112
|
+
}
|
|
16113
|
+
return null;
|
|
16114
|
+
}
|
|
15185
16115
|
insertElementList(payload) {
|
|
15186
16116
|
if (!payload.length || !this.range.getIsCanInput())
|
|
15187
16117
|
return;
|
|
@@ -15246,7 +16176,8 @@ class Draw {
|
|
|
15246
16176
|
});
|
|
15247
16177
|
}
|
|
15248
16178
|
spliceElementList(elementList, start, deleteCount, ...items) {
|
|
15249
|
-
var _a, _b, _c;
|
|
16179
|
+
var _a, _b, _c, _d;
|
|
16180
|
+
const isDesignMode = this.isDesignMode();
|
|
15250
16181
|
if (deleteCount > 0) {
|
|
15251
16182
|
const endIndex = start + deleteCount;
|
|
15252
16183
|
const endElement = elementList[endIndex];
|
|
@@ -15265,10 +16196,11 @@ class Draw {
|
|
|
15265
16196
|
}
|
|
15266
16197
|
}
|
|
15267
16198
|
if (!this.control.getActiveControl()) {
|
|
16199
|
+
const tdDeletable = (_b = this.getTd()) == null ? void 0 : _b.deletable;
|
|
15268
16200
|
let deleteIndex = endIndex - 1;
|
|
15269
16201
|
while (deleteIndex >= start) {
|
|
15270
16202
|
const deleteElement = elementList[deleteIndex];
|
|
15271
|
-
if (((
|
|
16203
|
+
if (isDesignMode || tdDeletable !== false && ((_c = deleteElement == null ? void 0 : deleteElement.control) == null ? void 0 : _c.deletable) !== false && ((_d = deleteElement == null ? void 0 : deleteElement.title) == null ? void 0 : _d.deletable) !== false) {
|
|
15272
16204
|
elementList.splice(deleteIndex, 1);
|
|
15273
16205
|
}
|
|
15274
16206
|
deleteIndex--;
|
|
@@ -15308,6 +16240,9 @@ class Draw {
|
|
|
15308
16240
|
getTableTool() {
|
|
15309
16241
|
return this.tableTool;
|
|
15310
16242
|
}
|
|
16243
|
+
getTableOperate() {
|
|
16244
|
+
return this.tableOperate;
|
|
16245
|
+
}
|
|
15311
16246
|
getTableParticle() {
|
|
15312
16247
|
return this.tableParticle;
|
|
15313
16248
|
}
|
|
@@ -15655,7 +16590,7 @@ class Draw {
|
|
|
15655
16590
|
}
|
|
15656
16591
|
computeRowList(payload) {
|
|
15657
16592
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
15658
|
-
const { innerWidth, elementList, isPagingMode = false } = payload;
|
|
16593
|
+
const { innerWidth, elementList, isPagingMode = false, isFromTable = false, startX = 0, startY = 0, pageHeight = 0, mainOuterHeight = 0, surroundElementList = [] } = payload;
|
|
15659
16594
|
const { defaultSize, defaultRowMargin, scale, table: { tdPadding }, defaultTabWidth } = this.options;
|
|
15660
16595
|
const defaultBasicRowMarginHeight = this.getDefaultBasicRowMarginHeight();
|
|
15661
16596
|
const canvas = document.createElement("canvas");
|
|
@@ -15673,6 +16608,9 @@ class Draw {
|
|
|
15673
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)
|
|
15674
16609
|
});
|
|
15675
16610
|
}
|
|
16611
|
+
let x = startX;
|
|
16612
|
+
let y = startY;
|
|
16613
|
+
let pageNo = 0;
|
|
15676
16614
|
let listId;
|
|
15677
16615
|
let listIndex = 0;
|
|
15678
16616
|
let controlRealWidth = 0;
|
|
@@ -15688,8 +16626,9 @@ class Draw {
|
|
|
15688
16626
|
};
|
|
15689
16627
|
const offsetX = curRow.offsetX || element.listId && listStyleMap.get(element.listId) || 0;
|
|
15690
16628
|
const availableWidth = innerWidth - offsetX;
|
|
16629
|
+
x += curRow.elementList.length === 1 ? offsetX : 0;
|
|
15691
16630
|
if (element.type === ElementType.IMAGE || element.type === ElementType.LATEX) {
|
|
15692
|
-
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) {
|
|
15693
16632
|
metrics.width = 0;
|
|
15694
16633
|
metrics.height = 0;
|
|
15695
16634
|
metrics.boundingBoxDescent = 0;
|
|
@@ -15742,6 +16681,7 @@ class Draw {
|
|
|
15742
16681
|
const rowList2 = this.computeRowList({
|
|
15743
16682
|
innerWidth: (td.width - tdPaddingWidth) * scale,
|
|
15744
16683
|
elementList: td.value,
|
|
16684
|
+
isFromTable: true,
|
|
15745
16685
|
isPagingMode
|
|
15746
16686
|
});
|
|
15747
16687
|
const rowHeight = rowList2.reduce((pre, cur) => pre + cur.height, 0);
|
|
@@ -15950,6 +16890,7 @@ class Draw {
|
|
|
15950
16890
|
const height = rowMargin + metrics.boundingBoxAscent + metrics.boundingBoxDescent + rowMargin;
|
|
15951
16891
|
const rowElement = Object.assign(element, {
|
|
15952
16892
|
metrics,
|
|
16893
|
+
left: 0,
|
|
15953
16894
|
style: this.getElementFont(element, scale)
|
|
15954
16895
|
});
|
|
15955
16896
|
if ((_g = rowElement.control) == null ? void 0 : _g.minWidth) {
|
|
@@ -15963,8 +16904,6 @@ class Draw {
|
|
|
15963
16904
|
const left2 = Math.min(rowRemainingWidth, extraWidth) * scale;
|
|
15964
16905
|
rowElement.left = left2;
|
|
15965
16906
|
curRow.width += left2;
|
|
15966
|
-
} else {
|
|
15967
|
-
rowElement.left = 0;
|
|
15968
16907
|
}
|
|
15969
16908
|
controlRealWidth = 0;
|
|
15970
16909
|
}
|
|
@@ -15995,9 +16934,26 @@ class Draw {
|
|
|
15995
16934
|
}
|
|
15996
16935
|
}
|
|
15997
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;
|
|
15998
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;
|
|
15999
16954
|
const isWidthNotEnough = curRowWidth > availableWidth;
|
|
16000
|
-
|
|
16955
|
+
const isWrap = isForceBreak || isWidthNotEnough;
|
|
16956
|
+
if (isWrap) {
|
|
16001
16957
|
const row = {
|
|
16002
16958
|
width: metrics.width,
|
|
16003
16959
|
height,
|
|
@@ -16038,9 +16994,9 @@ class Draw {
|
|
|
16038
16994
|
}
|
|
16039
16995
|
curRow.elementList.push(rowElement);
|
|
16040
16996
|
}
|
|
16041
|
-
if (
|
|
16997
|
+
if (isWrap || i === elementList.length - 1) {
|
|
16042
16998
|
curRow.isWidthNotEnough = isWidthNotEnough && !isForceBreak;
|
|
16043
|
-
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)) {
|
|
16044
17000
|
const rowElementList = ((_k = curRow.elementList[0]) == null ? void 0 : _k.value) === ZERO ? curRow.elementList.slice(1) : curRow.elementList;
|
|
16045
17001
|
const gap = (availableWidth - curRow.width) / (rowElementList.length - 1);
|
|
16046
17002
|
for (let e = 0; e < rowElementList.length - 1; e++) {
|
|
@@ -16050,6 +17006,32 @@ class Draw {
|
|
|
16050
17006
|
curRow.width = availableWidth;
|
|
16051
17007
|
}
|
|
16052
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
|
+
}
|
|
16053
17035
|
}
|
|
16054
17036
|
return rowList;
|
|
16055
17037
|
}
|
|
@@ -16096,18 +17078,22 @@ class Draw {
|
|
|
16096
17078
|
return pageRowList;
|
|
16097
17079
|
}
|
|
16098
17080
|
_drawHighlight(ctx, payload) {
|
|
17081
|
+
var _a;
|
|
17082
|
+
const { control: { activeBackgroundColor } } = this.options;
|
|
16099
17083
|
const { rowList, positionList } = payload;
|
|
17084
|
+
const activeControlElement = (_a = this.control.getActiveControl()) == null ? void 0 : _a.getElement();
|
|
16100
17085
|
for (let i = 0; i < rowList.length; i++) {
|
|
16101
17086
|
const curRow = rowList[i];
|
|
16102
17087
|
for (let j = 0; j < curRow.elementList.length; j++) {
|
|
16103
17088
|
const element = curRow.elementList[j];
|
|
16104
17089
|
const preElement = curRow.elementList[j - 1];
|
|
16105
|
-
if (element.highlight) {
|
|
17090
|
+
if (element.highlight || activeBackgroundColor && activeControlElement && element.controlId === activeControlElement.controlId && !this.control.getIsRangeInPostfix()) {
|
|
16106
17091
|
if (preElement && preElement.highlight && preElement.highlight !== element.highlight) {
|
|
16107
17092
|
this.highlight.render(ctx);
|
|
16108
17093
|
}
|
|
16109
17094
|
const { coordinate: { leftTop: [x, y] } } = positionList[curRow.startIndex + j];
|
|
16110
|
-
|
|
17095
|
+
const offsetX = element.left || 0;
|
|
17096
|
+
this.highlight.recordFillInfo(ctx, x - offsetX, y, element.metrics.width + offsetX, curRow.height, element.highlight || activeBackgroundColor);
|
|
16111
17097
|
} else if (preElement == null ? void 0 : preElement.highlight) {
|
|
16112
17098
|
this.highlight.render(ctx);
|
|
16113
17099
|
}
|
|
@@ -16139,7 +17125,7 @@ class Draw {
|
|
|
16139
17125
|
const preElement = curRow.elementList[j - 1];
|
|
16140
17126
|
if (element.type === ElementType.IMAGE) {
|
|
16141
17127
|
this.textParticle.complete();
|
|
16142
|
-
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) {
|
|
16143
17129
|
this.imageParticle.render(ctx, element, x, y + offsetY);
|
|
16144
17130
|
}
|
|
16145
17131
|
} else if (element.type === ElementType.LATEX) {
|
|
@@ -16329,11 +17315,11 @@ class Draw {
|
|
|
16329
17315
|
_drawFloat(ctx, payload) {
|
|
16330
17316
|
const { scale } = this.options;
|
|
16331
17317
|
const floatPositionList = this.position.getFloatPositionList();
|
|
16332
|
-
const {
|
|
17318
|
+
const { imgDisplays, pageNo } = payload;
|
|
16333
17319
|
for (let e = 0; e < floatPositionList.length; e++) {
|
|
16334
17320
|
const floatPosition = floatPositionList[e];
|
|
16335
17321
|
const element = floatPosition.element;
|
|
16336
|
-
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) {
|
|
16337
17323
|
const imgFloatPosition = element.imgFloatPosition;
|
|
16338
17324
|
this.imageParticle.render(ctx, element, imgFloatPosition.x * scale, imgFloatPosition.y * scale);
|
|
16339
17325
|
}
|
|
@@ -16359,7 +17345,7 @@ class Draw {
|
|
|
16359
17345
|
}
|
|
16360
17346
|
this._drawFloat(ctx, {
|
|
16361
17347
|
pageNo,
|
|
16362
|
-
|
|
17348
|
+
imgDisplays: [ImageDisplay.FLOAT_BOTTOM]
|
|
16363
17349
|
});
|
|
16364
17350
|
this.control.renderHighlightList(ctx, pageNo);
|
|
16365
17351
|
const index2 = (_a = rowList[0]) == null ? void 0 : _a.startIndex;
|
|
@@ -16385,7 +17371,7 @@ class Draw {
|
|
|
16385
17371
|
}
|
|
16386
17372
|
this._drawFloat(ctx, {
|
|
16387
17373
|
pageNo,
|
|
16388
|
-
|
|
17374
|
+
imgDisplays: [ImageDisplay.FLOAT_TOP, ImageDisplay.SURROUND]
|
|
16389
17375
|
});
|
|
16390
17376
|
if (this.search.getSearchKeyword()) {
|
|
16391
17377
|
this.search.render(ctx, pageNo);
|
|
@@ -16456,9 +17442,21 @@ class Draw {
|
|
|
16456
17442
|
this.footer.compute();
|
|
16457
17443
|
}
|
|
16458
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);
|
|
16459
17452
|
this.rowList = this.computeRowList({
|
|
17453
|
+
startX,
|
|
17454
|
+
startY,
|
|
17455
|
+
pageHeight,
|
|
17456
|
+
mainOuterHeight,
|
|
16460
17457
|
isPagingMode,
|
|
16461
17458
|
innerWidth,
|
|
17459
|
+
surroundElementList,
|
|
16462
17460
|
elementList: this.elementList
|
|
16463
17461
|
});
|
|
16464
17462
|
this.pageRowList = this._computePageList();
|
|
@@ -16683,6 +17681,7 @@ class Command {
|
|
|
16683
17681
|
__publicField(this, "executeInsertControl");
|
|
16684
17682
|
__publicField(this, "executeUpdateOptions");
|
|
16685
17683
|
__publicField(this, "executeInsertTitle");
|
|
17684
|
+
__publicField(this, "executeFocus");
|
|
16686
17685
|
__publicField(this, "getCatalog");
|
|
16687
17686
|
__publicField(this, "getImage");
|
|
16688
17687
|
__publicField(this, "getOptions");
|
|
@@ -16792,6 +17791,7 @@ class Command {
|
|
|
16792
17791
|
this.executeSetZone = adapt.setZone.bind(adapt);
|
|
16793
17792
|
this.executeUpdateOptions = adapt.updateOptions.bind(adapt);
|
|
16794
17793
|
this.executeInsertTitle = adapt.insertTitle.bind(adapt);
|
|
17794
|
+
this.executeFocus = adapt.focus.bind(adapt);
|
|
16795
17795
|
this.getImage = adapt.getImage.bind(adapt);
|
|
16796
17796
|
this.getOptions = adapt.getOptions.bind(adapt);
|
|
16797
17797
|
this.getValue = adapt.getValue.bind(adapt);
|
|
@@ -16851,7 +17851,8 @@ const defaultControlOption = {
|
|
|
16851
17851
|
prefix: "{",
|
|
16852
17852
|
postfix: "}",
|
|
16853
17853
|
borderWidth: 1,
|
|
16854
|
-
borderColor: "#000000"
|
|
17854
|
+
borderColor: "#000000",
|
|
17855
|
+
activeBackgroundColor: ""
|
|
16855
17856
|
};
|
|
16856
17857
|
const defaultFooterOption = {
|
|
16857
17858
|
bottom: 30,
|
|
@@ -17085,32 +18086,32 @@ class CommandAdapt {
|
|
|
17085
18086
|
__publicField(this, "position");
|
|
17086
18087
|
__publicField(this, "historyManager");
|
|
17087
18088
|
__publicField(this, "canvasEvent");
|
|
17088
|
-
__publicField(this, "tableTool");
|
|
17089
18089
|
__publicField(this, "options");
|
|
17090
18090
|
__publicField(this, "control");
|
|
17091
18091
|
__publicField(this, "workerManager");
|
|
17092
18092
|
__publicField(this, "searchManager");
|
|
17093
18093
|
__publicField(this, "i18n");
|
|
17094
18094
|
__publicField(this, "zone");
|
|
18095
|
+
__publicField(this, "tableOperate");
|
|
17095
18096
|
this.draw = draw;
|
|
17096
18097
|
this.range = draw.getRange();
|
|
17097
18098
|
this.position = draw.getPosition();
|
|
17098
18099
|
this.historyManager = draw.getHistoryManager();
|
|
17099
18100
|
this.canvasEvent = draw.getCanvasEvent();
|
|
17100
|
-
this.tableTool = draw.getTableTool();
|
|
17101
18101
|
this.options = draw.getOptions();
|
|
17102
18102
|
this.control = draw.getControl();
|
|
17103
18103
|
this.workerManager = draw.getWorkerManager();
|
|
17104
18104
|
this.searchManager = draw.getSearch();
|
|
17105
18105
|
this.i18n = draw.getI18n();
|
|
17106
18106
|
this.zone = draw.getZone();
|
|
18107
|
+
this.tableOperate = draw.getTableOperate();
|
|
17107
18108
|
}
|
|
17108
18109
|
mode(payload) {
|
|
17109
18110
|
this.draw.setMode(payload);
|
|
17110
18111
|
}
|
|
17111
18112
|
cut() {
|
|
17112
|
-
const
|
|
17113
|
-
if (
|
|
18113
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
18114
|
+
if (isDisabled)
|
|
17114
18115
|
return;
|
|
17115
18116
|
this.canvasEvent.cut();
|
|
17116
18117
|
}
|
|
@@ -17118,8 +18119,8 @@ class CommandAdapt {
|
|
|
17118
18119
|
this.canvasEvent.copy();
|
|
17119
18120
|
}
|
|
17120
18121
|
paste(payload) {
|
|
17121
|
-
const
|
|
17122
|
-
if (
|
|
18122
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
18123
|
+
if (isDisabled)
|
|
17123
18124
|
return;
|
|
17124
18125
|
pasteByApi(this.canvasEvent, payload);
|
|
17125
18126
|
}
|
|
@@ -17127,8 +18128,8 @@ class CommandAdapt {
|
|
|
17127
18128
|
this.canvasEvent.selectAll();
|
|
17128
18129
|
}
|
|
17129
18130
|
backspace() {
|
|
17130
|
-
const
|
|
17131
|
-
if (
|
|
18131
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
18132
|
+
if (isDisabled)
|
|
17132
18133
|
return;
|
|
17133
18134
|
const elementList = this.draw.getElementList();
|
|
17134
18135
|
const { startIndex, endIndex } = this.range.getRange();
|
|
@@ -17418,137 +18419,42 @@ class CommandAdapt {
|
|
|
17418
18419
|
enterElement.bold = !enterElement.bold;
|
|
17419
18420
|
this.draw.render({ curIndex: endIndex, isCompute: false });
|
|
17420
18421
|
}
|
|
17421
|
-
}
|
|
17422
|
-
}
|
|
17423
|
-
italic() {
|
|
17424
|
-
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
17425
|
-
if (isDisabled)
|
|
17426
|
-
return;
|
|
17427
|
-
const selection = this.range.getSelectionElementList();
|
|
17428
|
-
if (selection == null ? void 0 : selection.length) {
|
|
17429
|
-
const noItalicIndex = selection.findIndex((s) => !s.italic);
|
|
17430
|
-
selection.forEach((el) => {
|
|
17431
|
-
el.italic = !!~noItalicIndex;
|
|
17432
|
-
});
|
|
17433
|
-
this.draw.render({ isSetCursor: false });
|
|
17434
|
-
} else {
|
|
17435
|
-
const { endIndex } = this.range.getRange();
|
|
17436
|
-
const elementList = this.draw.getElementList();
|
|
17437
|
-
const enterElement = elementList[endIndex];
|
|
17438
|
-
if ((enterElement == null ? void 0 : enterElement.value) === ZERO) {
|
|
17439
|
-
enterElement.italic = !enterElement.italic;
|
|
17440
|
-
this.draw.render({ curIndex: endIndex, isCompute: false });
|
|
17441
|
-
}
|
|
17442
|
-
}
|
|
17443
|
-
}
|
|
17444
|
-
underline(textDecoration) {
|
|
17445
|
-
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
17446
|
-
if (isDisabled)
|
|
17447
|
-
return;
|
|
17448
|
-
const selection = this.range.getSelectionElementList();
|
|
17449
|
-
if (selection == null ? void 0 : selection.length) {
|
|
17450
|
-
const isSetUnderline = selection.some((s) => !s.underline || !textDecoration && s.textDecoration || textDecoration && !s.textDecoration || textDecoration && s.textDecoration && !isObjectEqual(s.textDecoration, textDecoration));
|
|
17451
|
-
selection.forEach((el) => {
|
|
17452
|
-
el.underline = isSetUnderline;
|
|
17453
|
-
if (isSetUnderline && textDecoration) {
|
|
17454
|
-
el.textDecoration = textDecoration;
|
|
17455
|
-
} else {
|
|
17456
|
-
delete el.textDecoration;
|
|
17457
|
-
}
|
|
17458
|
-
});
|
|
17459
|
-
this.draw.render({
|
|
17460
|
-
isSetCursor: false,
|
|
17461
|
-
isCompute: false
|
|
17462
|
-
});
|
|
17463
|
-
} else {
|
|
17464
|
-
const { endIndex } = this.range.getRange();
|
|
17465
|
-
const elementList = this.draw.getElementList();
|
|
17466
|
-
const enterElement = elementList[endIndex];
|
|
17467
|
-
if ((enterElement == null ? void 0 : enterElement.value) === ZERO) {
|
|
17468
|
-
enterElement.underline = !enterElement.underline;
|
|
17469
|
-
this.draw.render({ curIndex: endIndex, isCompute: false });
|
|
17470
|
-
}
|
|
17471
|
-
}
|
|
17472
|
-
}
|
|
17473
|
-
strikeout() {
|
|
17474
|
-
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
17475
|
-
if (isDisabled)
|
|
17476
|
-
return;
|
|
17477
|
-
const selection = this.range.getSelectionElementList();
|
|
17478
|
-
if (selection == null ? void 0 : selection.length) {
|
|
17479
|
-
const noStrikeoutIndex = selection.findIndex((s) => !s.strikeout);
|
|
17480
|
-
selection.forEach((el) => {
|
|
17481
|
-
el.strikeout = !!~noStrikeoutIndex;
|
|
17482
|
-
});
|
|
17483
|
-
this.draw.render({
|
|
17484
|
-
isSetCursor: false,
|
|
17485
|
-
isCompute: false
|
|
17486
|
-
});
|
|
17487
|
-
} else {
|
|
17488
|
-
const { endIndex } = this.range.getRange();
|
|
17489
|
-
const elementList = this.draw.getElementList();
|
|
17490
|
-
const enterElement = elementList[endIndex];
|
|
17491
|
-
if ((enterElement == null ? void 0 : enterElement.value) === ZERO) {
|
|
17492
|
-
enterElement.strikeout = !enterElement.strikeout;
|
|
17493
|
-
this.draw.render({ curIndex: endIndex, isCompute: false });
|
|
17494
|
-
}
|
|
17495
|
-
}
|
|
17496
|
-
}
|
|
17497
|
-
superscript() {
|
|
17498
|
-
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
17499
|
-
if (isDisabled)
|
|
17500
|
-
return;
|
|
17501
|
-
const selection = this.range.getSelectionElementList();
|
|
17502
|
-
if (!selection)
|
|
17503
|
-
return;
|
|
17504
|
-
const superscriptIndex = selection.findIndex((s) => s.type === ElementType.SUPERSCRIPT);
|
|
17505
|
-
selection.forEach((el) => {
|
|
17506
|
-
if (~superscriptIndex) {
|
|
17507
|
-
if (el.type === ElementType.SUPERSCRIPT) {
|
|
17508
|
-
el.type = ElementType.TEXT;
|
|
17509
|
-
delete el.actualSize;
|
|
17510
|
-
}
|
|
17511
|
-
} else {
|
|
17512
|
-
if (!el.type || el.type === ElementType.TEXT || el.type === ElementType.SUBSCRIPT) {
|
|
17513
|
-
el.type = ElementType.SUPERSCRIPT;
|
|
17514
|
-
}
|
|
17515
|
-
}
|
|
17516
|
-
});
|
|
17517
|
-
this.draw.render({ isSetCursor: false });
|
|
17518
|
-
}
|
|
17519
|
-
subscript() {
|
|
17520
|
-
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
17521
|
-
if (isDisabled)
|
|
17522
|
-
return;
|
|
17523
|
-
const selection = this.range.getSelectionElementList();
|
|
17524
|
-
if (!selection)
|
|
17525
|
-
return;
|
|
17526
|
-
const subscriptIndex = selection.findIndex((s) => s.type === ElementType.SUBSCRIPT);
|
|
17527
|
-
selection.forEach((el) => {
|
|
17528
|
-
if (~subscriptIndex) {
|
|
17529
|
-
if (el.type === ElementType.SUBSCRIPT) {
|
|
17530
|
-
el.type = ElementType.TEXT;
|
|
17531
|
-
delete el.actualSize;
|
|
17532
|
-
}
|
|
17533
|
-
} else {
|
|
17534
|
-
if (!el.type || el.type === ElementType.TEXT || el.type === ElementType.SUPERSCRIPT) {
|
|
17535
|
-
el.type = ElementType.SUBSCRIPT;
|
|
17536
|
-
}
|
|
17537
|
-
}
|
|
17538
|
-
});
|
|
17539
|
-
this.draw.render({ isSetCursor: false });
|
|
18422
|
+
}
|
|
17540
18423
|
}
|
|
17541
|
-
|
|
18424
|
+
italic() {
|
|
17542
18425
|
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
17543
18426
|
if (isDisabled)
|
|
17544
18427
|
return;
|
|
17545
18428
|
const selection = this.range.getSelectionElementList();
|
|
17546
18429
|
if (selection == null ? void 0 : selection.length) {
|
|
18430
|
+
const noItalicIndex = selection.findIndex((s) => !s.italic);
|
|
17547
18431
|
selection.forEach((el) => {
|
|
17548
|
-
|
|
17549
|
-
|
|
18432
|
+
el.italic = !!~noItalicIndex;
|
|
18433
|
+
});
|
|
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 });
|
|
18442
|
+
}
|
|
18443
|
+
}
|
|
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;
|
|
17550
18456
|
} else {
|
|
17551
|
-
delete el.
|
|
18457
|
+
delete el.textDecoration;
|
|
17552
18458
|
}
|
|
17553
18459
|
});
|
|
17554
18460
|
this.draw.render({
|
|
@@ -17560,27 +18466,20 @@ class CommandAdapt {
|
|
|
17560
18466
|
const elementList = this.draw.getElementList();
|
|
17561
18467
|
const enterElement = elementList[endIndex];
|
|
17562
18468
|
if ((enterElement == null ? void 0 : enterElement.value) === ZERO) {
|
|
17563
|
-
|
|
17564
|
-
enterElement.color = payload;
|
|
17565
|
-
} else {
|
|
17566
|
-
delete enterElement.color;
|
|
17567
|
-
}
|
|
18469
|
+
enterElement.underline = !enterElement.underline;
|
|
17568
18470
|
this.draw.render({ curIndex: endIndex, isCompute: false });
|
|
17569
18471
|
}
|
|
17570
18472
|
}
|
|
17571
18473
|
}
|
|
17572
|
-
|
|
18474
|
+
strikeout() {
|
|
17573
18475
|
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
17574
18476
|
if (isDisabled)
|
|
17575
18477
|
return;
|
|
17576
18478
|
const selection = this.range.getSelectionElementList();
|
|
17577
18479
|
if (selection == null ? void 0 : selection.length) {
|
|
18480
|
+
const noStrikeoutIndex = selection.findIndex((s) => !s.strikeout);
|
|
17578
18481
|
selection.forEach((el) => {
|
|
17579
|
-
|
|
17580
|
-
el.highlight = payload;
|
|
17581
|
-
} else {
|
|
17582
|
-
delete el.highlight;
|
|
17583
|
-
}
|
|
18482
|
+
el.strikeout = !!~noStrikeoutIndex;
|
|
17584
18483
|
});
|
|
17585
18484
|
this.draw.render({
|
|
17586
18485
|
isSetCursor: false,
|
|
@@ -17591,831 +18490,293 @@ class CommandAdapt {
|
|
|
17591
18490
|
const elementList = this.draw.getElementList();
|
|
17592
18491
|
const enterElement = elementList[endIndex];
|
|
17593
18492
|
if ((enterElement == null ? void 0 : enterElement.value) === ZERO) {
|
|
17594
|
-
|
|
17595
|
-
enterElement.highlight = payload;
|
|
17596
|
-
} else {
|
|
17597
|
-
delete enterElement.highlight;
|
|
17598
|
-
}
|
|
18493
|
+
enterElement.strikeout = !enterElement.strikeout;
|
|
17599
18494
|
this.draw.render({ curIndex: endIndex, isCompute: false });
|
|
17600
18495
|
}
|
|
17601
18496
|
}
|
|
17602
18497
|
}
|
|
17603
|
-
|
|
17604
|
-
const
|
|
17605
|
-
if (
|
|
17606
|
-
return;
|
|
17607
|
-
const { startIndex, endIndex } = this.range.getRange();
|
|
17608
|
-
if (!~startIndex && !~endIndex)
|
|
18498
|
+
superscript() {
|
|
18499
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
18500
|
+
if (isDisabled)
|
|
17609
18501
|
return;
|
|
17610
|
-
const
|
|
17611
|
-
|
|
17612
|
-
if (!changeElementList || !changeElementList.length)
|
|
18502
|
+
const selection = this.range.getSelectionElementList();
|
|
18503
|
+
if (!selection)
|
|
17613
18504
|
return;
|
|
17614
|
-
const
|
|
17615
|
-
|
|
17616
|
-
|
|
17617
|
-
|
|
17618
|
-
|
|
17619
|
-
|
|
17620
|
-
el.level = payload;
|
|
17621
|
-
el.titleId = titleId;
|
|
17622
|
-
if (isTextLikeElement(el)) {
|
|
17623
|
-
el.size = titleOptions[titleSizeMapping[payload]];
|
|
17624
|
-
el.bold = true;
|
|
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;
|
|
17625
18511
|
}
|
|
17626
18512
|
} else {
|
|
17627
|
-
if (el.
|
|
17628
|
-
|
|
17629
|
-
delete el.title;
|
|
17630
|
-
delete el.level;
|
|
17631
|
-
delete el.size;
|
|
17632
|
-
delete el.bold;
|
|
17633
|
-
}
|
|
17634
|
-
}
|
|
17635
|
-
});
|
|
17636
|
-
const isSetCursor = startIndex === endIndex;
|
|
17637
|
-
const curIndex = isSetCursor ? endIndex : startIndex;
|
|
17638
|
-
this.draw.render({ curIndex, isSetCursor });
|
|
17639
|
-
}
|
|
17640
|
-
list(listType, listStyle) {
|
|
17641
|
-
const isReadonly = this.draw.isReadonly();
|
|
17642
|
-
if (isReadonly)
|
|
17643
|
-
return;
|
|
17644
|
-
this.draw.getListParticle().setList(listType, listStyle);
|
|
17645
|
-
}
|
|
17646
|
-
rowFlex(payload) {
|
|
17647
|
-
const isReadonly = this.draw.isReadonly();
|
|
17648
|
-
if (isReadonly)
|
|
17649
|
-
return;
|
|
17650
|
-
const { startIndex, endIndex } = this.range.getRange();
|
|
17651
|
-
if (!~startIndex && !~endIndex)
|
|
17652
|
-
return;
|
|
17653
|
-
const rowElementList = this.range.getRangeRowElementList();
|
|
17654
|
-
if (!rowElementList)
|
|
17655
|
-
return;
|
|
17656
|
-
rowElementList.forEach((element) => {
|
|
17657
|
-
element.rowFlex = payload;
|
|
17658
|
-
});
|
|
17659
|
-
const isSetCursor = startIndex === endIndex;
|
|
17660
|
-
const curIndex = isSetCursor ? endIndex : startIndex;
|
|
17661
|
-
this.draw.render({ curIndex, isSetCursor });
|
|
17662
|
-
}
|
|
17663
|
-
rowMargin(payload) {
|
|
17664
|
-
const isReadonly = this.draw.isReadonly();
|
|
17665
|
-
if (isReadonly)
|
|
17666
|
-
return;
|
|
17667
|
-
const { startIndex, endIndex } = this.range.getRange();
|
|
17668
|
-
if (!~startIndex && !~endIndex)
|
|
17669
|
-
return;
|
|
17670
|
-
const rowElementList = this.range.getRangeRowElementList();
|
|
17671
|
-
if (!rowElementList)
|
|
17672
|
-
return;
|
|
17673
|
-
rowElementList.forEach((element) => {
|
|
17674
|
-
element.rowMargin = payload;
|
|
17675
|
-
});
|
|
17676
|
-
const isSetCursor = startIndex === endIndex;
|
|
17677
|
-
const curIndex = isSetCursor ? endIndex : startIndex;
|
|
17678
|
-
this.draw.render({ curIndex, isSetCursor });
|
|
17679
|
-
}
|
|
17680
|
-
insertTable(row, col) {
|
|
17681
|
-
var _a;
|
|
17682
|
-
const isReadonly = this.draw.isReadonly();
|
|
17683
|
-
if (isReadonly)
|
|
17684
|
-
return;
|
|
17685
|
-
const activeControl = this.control.getActiveControl();
|
|
17686
|
-
if (activeControl)
|
|
17687
|
-
return;
|
|
17688
|
-
const { startIndex, endIndex } = this.range.getRange();
|
|
17689
|
-
if (!~startIndex && !~endIndex)
|
|
17690
|
-
return;
|
|
17691
|
-
const { defaultTrMinHeight } = this.options.table;
|
|
17692
|
-
const elementList = this.draw.getElementList();
|
|
17693
|
-
let offsetX = 0;
|
|
17694
|
-
if ((_a = elementList[startIndex]) == null ? void 0 : _a.listId) {
|
|
17695
|
-
const positionList = this.position.getPositionList();
|
|
17696
|
-
const { rowIndex } = positionList[startIndex];
|
|
17697
|
-
const rowList = this.draw.getRowList();
|
|
17698
|
-
const row2 = rowList[rowIndex];
|
|
17699
|
-
offsetX = (row2 == null ? void 0 : row2.offsetX) || 0;
|
|
17700
|
-
}
|
|
17701
|
-
const innerWidth = this.draw.getContextInnerWidth() - offsetX;
|
|
17702
|
-
const colgroup = [];
|
|
17703
|
-
const colWidth = innerWidth / col;
|
|
17704
|
-
for (let c = 0; c < col; c++) {
|
|
17705
|
-
colgroup.push({
|
|
17706
|
-
width: colWidth
|
|
17707
|
-
});
|
|
17708
|
-
}
|
|
17709
|
-
const trList = [];
|
|
17710
|
-
for (let r = 0; r < row; r++) {
|
|
17711
|
-
const tdList = [];
|
|
17712
|
-
const tr = {
|
|
17713
|
-
height: defaultTrMinHeight,
|
|
17714
|
-
tdList
|
|
17715
|
-
};
|
|
17716
|
-
for (let c = 0; c < col; c++) {
|
|
17717
|
-
tdList.push({
|
|
17718
|
-
colspan: 1,
|
|
17719
|
-
rowspan: 1,
|
|
17720
|
-
value: []
|
|
17721
|
-
});
|
|
17722
|
-
}
|
|
17723
|
-
trList.push(tr);
|
|
17724
|
-
}
|
|
17725
|
-
const element = {
|
|
17726
|
-
type: ElementType.TABLE,
|
|
17727
|
-
value: "",
|
|
17728
|
-
colgroup,
|
|
17729
|
-
trList
|
|
17730
|
-
};
|
|
17731
|
-
formatElementList([element], {
|
|
17732
|
-
editorOptions: this.options
|
|
17733
|
-
});
|
|
17734
|
-
formatElementContext(elementList, [element], startIndex);
|
|
17735
|
-
const curIndex = startIndex + 1;
|
|
17736
|
-
this.draw.spliceElementList(elementList, curIndex, startIndex === endIndex ? 0 : endIndex - startIndex, element);
|
|
17737
|
-
this.range.setRange(curIndex, curIndex);
|
|
17738
|
-
this.draw.render({ curIndex, isSetCursor: false });
|
|
17739
|
-
}
|
|
17740
|
-
insertTableTopRow() {
|
|
17741
|
-
const isReadonly = this.draw.isReadonly();
|
|
17742
|
-
if (isReadonly)
|
|
17743
|
-
return;
|
|
17744
|
-
const positionContext = this.position.getPositionContext();
|
|
17745
|
-
if (!positionContext.isTable)
|
|
17746
|
-
return;
|
|
17747
|
-
const { index: index2, trIndex, tableId } = positionContext;
|
|
17748
|
-
const originalElementList = this.draw.getOriginalElementList();
|
|
17749
|
-
const element = originalElementList[index2];
|
|
17750
|
-
const curTrList = element.trList;
|
|
17751
|
-
const curTr = curTrList[trIndex];
|
|
17752
|
-
if (curTr.tdList.length < element.colgroup.length) {
|
|
17753
|
-
const curTrNo = curTr.tdList[0].rowIndex;
|
|
17754
|
-
for (let t = 0; t < trIndex; t++) {
|
|
17755
|
-
const tr = curTrList[t];
|
|
17756
|
-
for (let d = 0; d < tr.tdList.length; d++) {
|
|
17757
|
-
const td = tr.tdList[d];
|
|
17758
|
-
if (td.rowspan > 1 && td.rowIndex + td.rowspan >= curTrNo + 1) {
|
|
17759
|
-
td.rowspan += 1;
|
|
17760
|
-
}
|
|
18513
|
+
if (!el.type || el.type === ElementType.TEXT || el.type === ElementType.SUBSCRIPT) {
|
|
18514
|
+
el.type = ElementType.SUPERSCRIPT;
|
|
17761
18515
|
}
|
|
17762
|
-
}
|
|
17763
|
-
}
|
|
17764
|
-
const newTrId = getUUID();
|
|
17765
|
-
const newTr = {
|
|
17766
|
-
height: curTr.height,
|
|
17767
|
-
id: newTrId,
|
|
17768
|
-
tdList: []
|
|
17769
|
-
};
|
|
17770
|
-
for (let t = 0; t < curTr.tdList.length; t++) {
|
|
17771
|
-
const curTd = curTr.tdList[t];
|
|
17772
|
-
const newTdId = getUUID();
|
|
17773
|
-
newTr.tdList.push({
|
|
17774
|
-
id: newTdId,
|
|
17775
|
-
rowspan: 1,
|
|
17776
|
-
colspan: curTd.colspan,
|
|
17777
|
-
value: [
|
|
17778
|
-
{
|
|
17779
|
-
value: ZERO,
|
|
17780
|
-
size: 16,
|
|
17781
|
-
tableId,
|
|
17782
|
-
trId: newTrId,
|
|
17783
|
-
tdId: newTdId
|
|
17784
|
-
}
|
|
17785
|
-
]
|
|
17786
|
-
});
|
|
17787
|
-
}
|
|
17788
|
-
curTrList.splice(trIndex, 0, newTr);
|
|
17789
|
-
this.position.setPositionContext({
|
|
17790
|
-
isTable: true,
|
|
17791
|
-
index: index2,
|
|
17792
|
-
trIndex,
|
|
17793
|
-
tdIndex: 0,
|
|
17794
|
-
tdId: newTr.tdList[0].id,
|
|
17795
|
-
trId: newTr.id,
|
|
17796
|
-
tableId
|
|
18516
|
+
}
|
|
17797
18517
|
});
|
|
17798
|
-
this.
|
|
17799
|
-
this.draw.render({ curIndex: 0 });
|
|
17800
|
-
this.tableTool.render();
|
|
18518
|
+
this.draw.render({ isSetCursor: false });
|
|
17801
18519
|
}
|
|
17802
|
-
|
|
17803
|
-
const
|
|
17804
|
-
if (
|
|
18520
|
+
subscript() {
|
|
18521
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
18522
|
+
if (isDisabled)
|
|
17805
18523
|
return;
|
|
17806
|
-
const
|
|
17807
|
-
if (!
|
|
18524
|
+
const selection = this.range.getSelectionElementList();
|
|
18525
|
+
if (!selection)
|
|
17808
18526
|
return;
|
|
17809
|
-
const
|
|
17810
|
-
|
|
17811
|
-
|
|
17812
|
-
|
|
17813
|
-
|
|
17814
|
-
|
|
17815
|
-
|
|
17816
|
-
|
|
17817
|
-
|
|
17818
|
-
|
|
17819
|
-
for (let d = 0; d < tr.tdList.length; d++) {
|
|
17820
|
-
const td = tr.tdList[d];
|
|
17821
|
-
if (td.rowspan > 1 && td.rowIndex + td.rowspan >= curTrNo + 1) {
|
|
17822
|
-
td.rowspan += 1;
|
|
17823
|
-
}
|
|
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;
|
|
17824
18537
|
}
|
|
17825
18538
|
}
|
|
17826
|
-
}
|
|
17827
|
-
const newTrId = getUUID();
|
|
17828
|
-
const newTr = {
|
|
17829
|
-
height: anchorTr.height,
|
|
17830
|
-
id: newTrId,
|
|
17831
|
-
tdList: []
|
|
17832
|
-
};
|
|
17833
|
-
for (let t = 0; t < anchorTr.tdList.length; t++) {
|
|
17834
|
-
const curTd = anchorTr.tdList[t];
|
|
17835
|
-
const newTdId = getUUID();
|
|
17836
|
-
newTr.tdList.push({
|
|
17837
|
-
id: newTdId,
|
|
17838
|
-
rowspan: 1,
|
|
17839
|
-
colspan: curTd.colspan,
|
|
17840
|
-
value: [
|
|
17841
|
-
{
|
|
17842
|
-
value: ZERO,
|
|
17843
|
-
size: 16,
|
|
17844
|
-
tableId,
|
|
17845
|
-
trId: newTrId,
|
|
17846
|
-
tdId: newTdId
|
|
17847
|
-
}
|
|
17848
|
-
]
|
|
17849
|
-
});
|
|
17850
|
-
}
|
|
17851
|
-
curTrList.splice(trIndex + 1, 0, newTr);
|
|
17852
|
-
this.position.setPositionContext({
|
|
17853
|
-
isTable: true,
|
|
17854
|
-
index: index2,
|
|
17855
|
-
trIndex: trIndex + 1,
|
|
17856
|
-
tdIndex: 0,
|
|
17857
|
-
tdId: newTr.tdList[0].id,
|
|
17858
|
-
trId: newTr.id,
|
|
17859
|
-
tableId
|
|
17860
18539
|
});
|
|
17861
|
-
this.
|
|
17862
|
-
this.draw.render({ curIndex: 0 });
|
|
17863
|
-
this.tableTool.render();
|
|
18540
|
+
this.draw.render({ isSetCursor: false });
|
|
17864
18541
|
}
|
|
17865
|
-
|
|
17866
|
-
const
|
|
17867
|
-
if (
|
|
17868
|
-
return;
|
|
17869
|
-
const positionContext = this.position.getPositionContext();
|
|
17870
|
-
if (!positionContext.isTable)
|
|
18542
|
+
color(payload) {
|
|
18543
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
18544
|
+
if (isDisabled)
|
|
17871
18545
|
return;
|
|
17872
|
-
const
|
|
17873
|
-
|
|
17874
|
-
|
|
17875
|
-
|
|
17876
|
-
|
|
17877
|
-
|
|
17878
|
-
|
|
17879
|
-
|
|
17880
|
-
tr.tdList.splice(curTdIndex, 0, {
|
|
17881
|
-
id: tdId,
|
|
17882
|
-
rowspan: 1,
|
|
17883
|
-
colspan: 1,
|
|
17884
|
-
value: [
|
|
17885
|
-
{
|
|
17886
|
-
value: ZERO,
|
|
17887
|
-
size: 16,
|
|
17888
|
-
tableId,
|
|
17889
|
-
trId: tr.id,
|
|
17890
|
-
tdId
|
|
17891
|
-
}
|
|
17892
|
-
]
|
|
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
|
+
}
|
|
17893
18554
|
});
|
|
17894
|
-
|
|
17895
|
-
|
|
17896
|
-
|
|
17897
|
-
|
|
17898
|
-
}
|
|
17899
|
-
|
|
17900
|
-
|
|
17901
|
-
|
|
17902
|
-
|
|
17903
|
-
|
|
17904
|
-
|
|
17905
|
-
|
|
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;
|
|
18568
|
+
}
|
|
18569
|
+
this.draw.render({ curIndex: endIndex, isCompute: false });
|
|
17906
18570
|
}
|
|
17907
18571
|
}
|
|
17908
|
-
this.position.setPositionContext({
|
|
17909
|
-
isTable: true,
|
|
17910
|
-
index: index2,
|
|
17911
|
-
trIndex: 0,
|
|
17912
|
-
tdIndex: curTdIndex,
|
|
17913
|
-
tdId: curTrList[0].tdList[curTdIndex].id,
|
|
17914
|
-
trId: curTrList[0].id,
|
|
17915
|
-
tableId
|
|
17916
|
-
});
|
|
17917
|
-
this.range.setRange(0, 0);
|
|
17918
|
-
this.draw.render({ curIndex: 0 });
|
|
17919
|
-
this.tableTool.render();
|
|
17920
18572
|
}
|
|
17921
|
-
|
|
17922
|
-
const
|
|
17923
|
-
if (
|
|
17924
|
-
return;
|
|
17925
|
-
const positionContext = this.position.getPositionContext();
|
|
17926
|
-
if (!positionContext.isTable)
|
|
18573
|
+
highlight(payload) {
|
|
18574
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
18575
|
+
if (isDisabled)
|
|
17927
18576
|
return;
|
|
17928
|
-
const
|
|
17929
|
-
|
|
17930
|
-
|
|
17931
|
-
|
|
17932
|
-
|
|
17933
|
-
|
|
17934
|
-
|
|
17935
|
-
|
|
17936
|
-
tr.tdList.splice(curTdIndex, 0, {
|
|
17937
|
-
id: tdId,
|
|
17938
|
-
rowspan: 1,
|
|
17939
|
-
colspan: 1,
|
|
17940
|
-
value: [
|
|
17941
|
-
{
|
|
17942
|
-
value: ZERO,
|
|
17943
|
-
size: 16,
|
|
17944
|
-
tableId,
|
|
17945
|
-
trId: tr.id,
|
|
17946
|
-
tdId
|
|
17947
|
-
}
|
|
17948
|
-
]
|
|
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
|
+
}
|
|
17949
18585
|
});
|
|
17950
|
-
|
|
17951
|
-
|
|
17952
|
-
|
|
17953
|
-
|
|
17954
|
-
}
|
|
17955
|
-
|
|
17956
|
-
|
|
17957
|
-
|
|
17958
|
-
|
|
17959
|
-
|
|
17960
|
-
|
|
17961
|
-
|
|
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 });
|
|
17962
18601
|
}
|
|
17963
18602
|
}
|
|
17964
|
-
|
|
17965
|
-
|
|
17966
|
-
|
|
17967
|
-
|
|
17968
|
-
|
|
17969
|
-
|
|
17970
|
-
|
|
17971
|
-
|
|
18603
|
+
}
|
|
18604
|
+
title(payload) {
|
|
18605
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
18606
|
+
if (isDisabled)
|
|
18607
|
+
return;
|
|
18608
|
+
const { startIndex, endIndex } = this.range.getRange();
|
|
18609
|
+
if (!~startIndex && !~endIndex)
|
|
18610
|
+
return;
|
|
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)
|
|
18614
|
+
return;
|
|
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;
|
|
18634
|
+
}
|
|
18635
|
+
}
|
|
17972
18636
|
});
|
|
17973
|
-
|
|
17974
|
-
|
|
17975
|
-
this.
|
|
18637
|
+
const isSetCursor = startIndex === endIndex;
|
|
18638
|
+
const curIndex = isSetCursor ? endIndex : startIndex;
|
|
18639
|
+
this.draw.render({ curIndex, isSetCursor });
|
|
17976
18640
|
}
|
|
17977
|
-
|
|
18641
|
+
list(listType, listStyle) {
|
|
17978
18642
|
const isReadonly = this.draw.isReadonly();
|
|
17979
18643
|
if (isReadonly)
|
|
17980
18644
|
return;
|
|
17981
|
-
|
|
17982
|
-
|
|
18645
|
+
this.draw.getListParticle().setList(listType, listStyle);
|
|
18646
|
+
}
|
|
18647
|
+
rowFlex(payload) {
|
|
18648
|
+
const isReadonly = this.draw.isReadonly();
|
|
18649
|
+
if (isReadonly)
|
|
17983
18650
|
return;
|
|
17984
|
-
const {
|
|
17985
|
-
|
|
17986
|
-
const element = originalElementList[index2];
|
|
17987
|
-
const trList = element.trList;
|
|
17988
|
-
const curTr = trList[trIndex];
|
|
17989
|
-
const curTdRowIndex = curTr.tdList[tdIndex].rowIndex;
|
|
17990
|
-
if (trList.length <= 1) {
|
|
17991
|
-
this.deleteTable();
|
|
18651
|
+
const { startIndex, endIndex } = this.range.getRange();
|
|
18652
|
+
if (!~startIndex && !~endIndex)
|
|
17992
18653
|
return;
|
|
17993
|
-
|
|
17994
|
-
|
|
17995
|
-
|
|
17996
|
-
|
|
17997
|
-
|
|
17998
|
-
const td = tdList[d];
|
|
17999
|
-
if (td.rowIndex + td.rowspan > curTdRowIndex) {
|
|
18000
|
-
td.rowspan--;
|
|
18001
|
-
}
|
|
18002
|
-
}
|
|
18003
|
-
}
|
|
18004
|
-
for (let d = 0; d < curTr.tdList.length; d++) {
|
|
18005
|
-
const td = curTr.tdList[d];
|
|
18006
|
-
if (td.rowspan > 1) {
|
|
18007
|
-
const tdId = getUUID();
|
|
18008
|
-
const nextTr = trList[trIndex + 1];
|
|
18009
|
-
nextTr.tdList.splice(d, 0, {
|
|
18010
|
-
id: tdId,
|
|
18011
|
-
rowspan: td.rowspan - 1,
|
|
18012
|
-
colspan: td.colspan,
|
|
18013
|
-
value: [
|
|
18014
|
-
{
|
|
18015
|
-
value: ZERO,
|
|
18016
|
-
size: 16,
|
|
18017
|
-
tableId: element.id,
|
|
18018
|
-
trId: nextTr.id,
|
|
18019
|
-
tdId
|
|
18020
|
-
}
|
|
18021
|
-
]
|
|
18022
|
-
});
|
|
18023
|
-
}
|
|
18024
|
-
}
|
|
18025
|
-
trList.splice(trIndex, 1);
|
|
18026
|
-
this.position.setPositionContext({
|
|
18027
|
-
isTable: false
|
|
18028
|
-
});
|
|
18029
|
-
this.range.clearRange();
|
|
18030
|
-
this.draw.render({
|
|
18031
|
-
curIndex: positionContext.index
|
|
18654
|
+
const rowElementList = this.range.getRangeRowElementList();
|
|
18655
|
+
if (!rowElementList)
|
|
18656
|
+
return;
|
|
18657
|
+
rowElementList.forEach((element) => {
|
|
18658
|
+
element.rowFlex = payload;
|
|
18032
18659
|
});
|
|
18033
|
-
|
|
18660
|
+
const isSetCursor = startIndex === endIndex;
|
|
18661
|
+
const curIndex = isSetCursor ? endIndex : startIndex;
|
|
18662
|
+
this.draw.render({ curIndex, isSetCursor });
|
|
18034
18663
|
}
|
|
18035
|
-
|
|
18036
|
-
var _a;
|
|
18664
|
+
rowMargin(payload) {
|
|
18037
18665
|
const isReadonly = this.draw.isReadonly();
|
|
18038
18666
|
if (isReadonly)
|
|
18039
18667
|
return;
|
|
18040
|
-
const
|
|
18041
|
-
if (
|
|
18668
|
+
const { startIndex, endIndex } = this.range.getRange();
|
|
18669
|
+
if (!~startIndex && !~endIndex)
|
|
18042
18670
|
return;
|
|
18043
|
-
const
|
|
18044
|
-
|
|
18045
|
-
const element = originalElementList[index2];
|
|
18046
|
-
const curTrList = element.trList;
|
|
18047
|
-
const curTd = curTrList[trIndex].tdList[tdIndex];
|
|
18048
|
-
const curColIndex = curTd.colIndex;
|
|
18049
|
-
const moreTdTr = curTrList.find((tr) => tr.tdList.length > 1);
|
|
18050
|
-
if (!moreTdTr) {
|
|
18051
|
-
this.deleteTable();
|
|
18671
|
+
const rowElementList = this.range.getRangeRowElementList();
|
|
18672
|
+
if (!rowElementList)
|
|
18052
18673
|
return;
|
|
18053
|
-
|
|
18054
|
-
|
|
18055
|
-
const tr = curTrList[t];
|
|
18056
|
-
for (let d = 0; d < tr.tdList.length; d++) {
|
|
18057
|
-
const td = tr.tdList[d];
|
|
18058
|
-
if (td.colIndex <= curColIndex && td.colIndex + td.colspan > curColIndex) {
|
|
18059
|
-
if (td.colspan > 1) {
|
|
18060
|
-
td.colspan--;
|
|
18061
|
-
} else {
|
|
18062
|
-
tr.tdList.splice(d, 1);
|
|
18063
|
-
}
|
|
18064
|
-
}
|
|
18065
|
-
}
|
|
18066
|
-
}
|
|
18067
|
-
(_a = element.colgroup) == null ? void 0 : _a.splice(curColIndex, 1);
|
|
18068
|
-
this.position.setPositionContext({
|
|
18069
|
-
isTable: false
|
|
18070
|
-
});
|
|
18071
|
-
this.range.setRange(0, 0);
|
|
18072
|
-
this.draw.render({
|
|
18073
|
-
curIndex: positionContext.index
|
|
18674
|
+
rowElementList.forEach((element) => {
|
|
18675
|
+
element.rowMargin = payload;
|
|
18074
18676
|
});
|
|
18075
|
-
|
|
18677
|
+
const isSetCursor = startIndex === endIndex;
|
|
18678
|
+
const curIndex = isSetCursor ? endIndex : startIndex;
|
|
18679
|
+
this.draw.render({ curIndex, isSetCursor });
|
|
18076
18680
|
}
|
|
18077
|
-
|
|
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() {
|
|
18078
18691
|
const isReadonly = this.draw.isReadonly();
|
|
18079
18692
|
if (isReadonly)
|
|
18080
18693
|
return;
|
|
18081
|
-
|
|
18082
|
-
if (!positionContext.isTable)
|
|
18083
|
-
return;
|
|
18084
|
-
const originalElementList = this.draw.getOriginalElementList();
|
|
18085
|
-
originalElementList.splice(positionContext.index, 1);
|
|
18086
|
-
const curIndex = positionContext.index - 1;
|
|
18087
|
-
this.position.setPositionContext({
|
|
18088
|
-
isTable: false,
|
|
18089
|
-
index: curIndex
|
|
18090
|
-
});
|
|
18091
|
-
this.range.setRange(curIndex, curIndex);
|
|
18092
|
-
this.draw.render({ curIndex });
|
|
18093
|
-
this.tableTool.dispose();
|
|
18694
|
+
this.tableOperate.insertTableTopRow();
|
|
18094
18695
|
}
|
|
18095
|
-
|
|
18696
|
+
insertTableBottomRow() {
|
|
18096
18697
|
const isReadonly = this.draw.isReadonly();
|
|
18097
18698
|
if (isReadonly)
|
|
18098
18699
|
return;
|
|
18099
|
-
|
|
18100
|
-
|
|
18700
|
+
this.tableOperate.insertTableBottomRow();
|
|
18701
|
+
}
|
|
18702
|
+
insertTableLeftCol() {
|
|
18703
|
+
const isReadonly = this.draw.isReadonly();
|
|
18704
|
+
if (isReadonly)
|
|
18101
18705
|
return;
|
|
18102
|
-
|
|
18103
|
-
|
|
18706
|
+
this.tableOperate.insertTableLeftCol();
|
|
18707
|
+
}
|
|
18708
|
+
insertTableRightCol() {
|
|
18709
|
+
const isReadonly = this.draw.isReadonly();
|
|
18710
|
+
if (isReadonly)
|
|
18104
18711
|
return;
|
|
18105
|
-
|
|
18106
|
-
|
|
18107
|
-
|
|
18108
|
-
const
|
|
18109
|
-
|
|
18110
|
-
let endTd = curTrList[endTrIndex].tdList[endTdIndex];
|
|
18111
|
-
if (startTd.x > endTd.x || startTd.y > endTd.y) {
|
|
18112
|
-
[startTd, endTd] = [endTd, startTd];
|
|
18113
|
-
}
|
|
18114
|
-
const startColIndex = startTd.colIndex;
|
|
18115
|
-
const endColIndex = endTd.colIndex + (endTd.colspan - 1);
|
|
18116
|
-
const startRowIndex = startTd.rowIndex;
|
|
18117
|
-
const endRowIndex = endTd.rowIndex + (endTd.rowspan - 1);
|
|
18118
|
-
const rowCol = [];
|
|
18119
|
-
for (let t = 0; t < curTrList.length; t++) {
|
|
18120
|
-
const tr = curTrList[t];
|
|
18121
|
-
const tdList = [];
|
|
18122
|
-
for (let d = 0; d < tr.tdList.length; d++) {
|
|
18123
|
-
const td = tr.tdList[d];
|
|
18124
|
-
const tdColIndex = td.colIndex;
|
|
18125
|
-
const tdRowIndex = td.rowIndex;
|
|
18126
|
-
if (tdColIndex >= startColIndex && tdColIndex <= endColIndex && tdRowIndex >= startRowIndex && tdRowIndex <= endRowIndex) {
|
|
18127
|
-
tdList.push(td);
|
|
18128
|
-
}
|
|
18129
|
-
}
|
|
18130
|
-
if (tdList.length) {
|
|
18131
|
-
rowCol.push(tdList);
|
|
18132
|
-
}
|
|
18133
|
-
}
|
|
18134
|
-
if (!rowCol.length)
|
|
18712
|
+
this.tableOperate.insertTableRightCol();
|
|
18713
|
+
}
|
|
18714
|
+
deleteTableRow() {
|
|
18715
|
+
const isReadonly = this.draw.isReadonly();
|
|
18716
|
+
if (isReadonly)
|
|
18135
18717
|
return;
|
|
18136
|
-
|
|
18137
|
-
|
|
18138
|
-
|
|
18139
|
-
const
|
|
18140
|
-
|
|
18141
|
-
|
|
18142
|
-
|
|
18143
|
-
for (let t = 0; t < rowCol.length; t++) {
|
|
18144
|
-
const tr = rowCol[t];
|
|
18145
|
-
for (let d = 0; d < tr.length; d++) {
|
|
18146
|
-
const td = tr[d];
|
|
18147
|
-
const tdStartX = td.x;
|
|
18148
|
-
const tdStartY = td.y;
|
|
18149
|
-
const tdEndX = tdStartX + td.width;
|
|
18150
|
-
const tdEndY = tdStartY + td.height;
|
|
18151
|
-
if (startX > tdStartX || startY > tdStartY || endX < tdEndX || endY < tdEndY) {
|
|
18152
|
-
return;
|
|
18153
|
-
}
|
|
18154
|
-
}
|
|
18155
|
-
}
|
|
18156
|
-
const mergeTdIdList = [];
|
|
18157
|
-
const anchorTd = rowCol[0][0];
|
|
18158
|
-
for (let t = 0; t < rowCol.length; t++) {
|
|
18159
|
-
const tr = rowCol[t];
|
|
18160
|
-
for (let d = 0; d < tr.length; d++) {
|
|
18161
|
-
const td = tr[d];
|
|
18162
|
-
const isAnchorTd = t === 0 && d === 0;
|
|
18163
|
-
if (!isAnchorTd) {
|
|
18164
|
-
mergeTdIdList.push(td.id);
|
|
18165
|
-
}
|
|
18166
|
-
if (t === 0 && d !== 0) {
|
|
18167
|
-
anchorTd.colspan += td.colspan;
|
|
18168
|
-
}
|
|
18169
|
-
if (t !== 0) {
|
|
18170
|
-
if (anchorTd.colIndex === td.colIndex) {
|
|
18171
|
-
anchorTd.rowspan += td.rowspan;
|
|
18172
|
-
}
|
|
18173
|
-
}
|
|
18174
|
-
}
|
|
18175
|
-
}
|
|
18176
|
-
for (let t = 0; t < curTrList.length; t++) {
|
|
18177
|
-
const tr = curTrList[t];
|
|
18178
|
-
let d = 0;
|
|
18179
|
-
while (d < tr.tdList.length) {
|
|
18180
|
-
const td = tr.tdList[d];
|
|
18181
|
-
if (mergeTdIdList.includes(td.id)) {
|
|
18182
|
-
tr.tdList.splice(d, 1);
|
|
18183
|
-
d--;
|
|
18184
|
-
}
|
|
18185
|
-
d++;
|
|
18186
|
-
}
|
|
18187
|
-
}
|
|
18188
|
-
this.position.setPositionContext(__spreadProps(__spreadValues({}, positionContext), {
|
|
18189
|
-
trIndex: anchorTd.trIndex,
|
|
18190
|
-
tdIndex: anchorTd.tdIndex
|
|
18191
|
-
}));
|
|
18192
|
-
const curIndex = anchorTd.value.length - 1;
|
|
18193
|
-
this.range.setRange(curIndex, curIndex);
|
|
18194
|
-
this.draw.render();
|
|
18195
|
-
this.tableTool.render();
|
|
18718
|
+
this.tableOperate.deleteTableRow();
|
|
18719
|
+
}
|
|
18720
|
+
deleteTableCol() {
|
|
18721
|
+
const isReadonly = this.draw.isReadonly();
|
|
18722
|
+
if (isReadonly)
|
|
18723
|
+
return;
|
|
18724
|
+
this.tableOperate.deleteTableCol();
|
|
18196
18725
|
}
|
|
18197
|
-
|
|
18726
|
+
deleteTable() {
|
|
18198
18727
|
const isReadonly = this.draw.isReadonly();
|
|
18199
18728
|
if (isReadonly)
|
|
18200
18729
|
return;
|
|
18201
|
-
|
|
18202
|
-
|
|
18730
|
+
this.tableOperate.deleteTable();
|
|
18731
|
+
}
|
|
18732
|
+
mergeTableCell() {
|
|
18733
|
+
const isReadonly = this.draw.isReadonly();
|
|
18734
|
+
if (isReadonly)
|
|
18203
18735
|
return;
|
|
18204
|
-
|
|
18205
|
-
|
|
18206
|
-
|
|
18207
|
-
const
|
|
18208
|
-
|
|
18209
|
-
const curTd = curTr.tdList[tdIndex];
|
|
18210
|
-
if (curTd.rowspan === 1 && curTd.colspan === 1)
|
|
18736
|
+
this.tableOperate.mergeTableCell();
|
|
18737
|
+
}
|
|
18738
|
+
cancelMergeTableCell() {
|
|
18739
|
+
const isReadonly = this.draw.isReadonly();
|
|
18740
|
+
if (isReadonly)
|
|
18211
18741
|
return;
|
|
18212
|
-
|
|
18213
|
-
if (curTd.colspan > 1) {
|
|
18214
|
-
for (let c = 1; c < curTd.colspan; c++) {
|
|
18215
|
-
const tdId = getUUID();
|
|
18216
|
-
curTr.tdList.splice(tdIndex + c, 0, {
|
|
18217
|
-
id: tdId,
|
|
18218
|
-
rowspan: 1,
|
|
18219
|
-
colspan: 1,
|
|
18220
|
-
value: [
|
|
18221
|
-
{
|
|
18222
|
-
value: ZERO,
|
|
18223
|
-
size: 16,
|
|
18224
|
-
tableId: element.id,
|
|
18225
|
-
trId: curTr.id,
|
|
18226
|
-
tdId
|
|
18227
|
-
}
|
|
18228
|
-
]
|
|
18229
|
-
});
|
|
18230
|
-
}
|
|
18231
|
-
curTd.colspan = 1;
|
|
18232
|
-
}
|
|
18233
|
-
if (curTd.rowspan > 1) {
|
|
18234
|
-
for (let r = 1; r < curTd.rowspan; r++) {
|
|
18235
|
-
const tr = curTrList[trIndex + r];
|
|
18236
|
-
for (let c = 0; c < colspan; c++) {
|
|
18237
|
-
const tdId = getUUID();
|
|
18238
|
-
tr.tdList.splice(curTd.colIndex, 0, {
|
|
18239
|
-
id: tdId,
|
|
18240
|
-
rowspan: 1,
|
|
18241
|
-
colspan: 1,
|
|
18242
|
-
value: [
|
|
18243
|
-
{
|
|
18244
|
-
value: ZERO,
|
|
18245
|
-
size: 16,
|
|
18246
|
-
tableId: element.id,
|
|
18247
|
-
trId: tr.id,
|
|
18248
|
-
tdId
|
|
18249
|
-
}
|
|
18250
|
-
]
|
|
18251
|
-
});
|
|
18252
|
-
}
|
|
18253
|
-
}
|
|
18254
|
-
curTd.rowspan = 1;
|
|
18255
|
-
}
|
|
18256
|
-
const curIndex = curTd.value.length - 1;
|
|
18257
|
-
this.range.setRange(curIndex, curIndex);
|
|
18258
|
-
this.draw.render();
|
|
18259
|
-
this.tableTool.render();
|
|
18742
|
+
this.tableOperate.cancelMergeTableCell();
|
|
18260
18743
|
}
|
|
18261
18744
|
tableTdVerticalAlign(payload) {
|
|
18262
18745
|
const isReadonly = this.draw.isReadonly();
|
|
18263
18746
|
if (isReadonly)
|
|
18264
18747
|
return;
|
|
18265
|
-
|
|
18266
|
-
if (!rowCol)
|
|
18267
|
-
return;
|
|
18268
|
-
for (let r = 0; r < rowCol.length; r++) {
|
|
18269
|
-
const row = rowCol[r];
|
|
18270
|
-
for (let c = 0; c < row.length; c++) {
|
|
18271
|
-
const td = row[c];
|
|
18272
|
-
if (!td || td.verticalAlign === payload || !td.verticalAlign && payload === VerticalAlign.TOP) {
|
|
18273
|
-
continue;
|
|
18274
|
-
}
|
|
18275
|
-
td.verticalAlign = payload;
|
|
18276
|
-
}
|
|
18277
|
-
}
|
|
18278
|
-
const { endIndex } = this.range.getRange();
|
|
18279
|
-
this.draw.render({
|
|
18280
|
-
curIndex: endIndex
|
|
18281
|
-
});
|
|
18748
|
+
this.tableOperate.tableTdVerticalAlign(payload);
|
|
18282
18749
|
}
|
|
18283
18750
|
tableBorderType(payload) {
|
|
18284
18751
|
const isReadonly = this.draw.isReadonly();
|
|
18285
18752
|
if (isReadonly)
|
|
18286
18753
|
return;
|
|
18287
|
-
|
|
18288
|
-
if (!positionContext.isTable)
|
|
18289
|
-
return;
|
|
18290
|
-
const { index: index2 } = positionContext;
|
|
18291
|
-
const originalElementList = this.draw.getOriginalElementList();
|
|
18292
|
-
const element = originalElementList[index2];
|
|
18293
|
-
if (!element.borderType && payload === TableBorder.ALL || element.borderType === payload) {
|
|
18294
|
-
return;
|
|
18295
|
-
}
|
|
18296
|
-
element.borderType = payload;
|
|
18297
|
-
const { endIndex } = this.range.getRange();
|
|
18298
|
-
this.draw.render({
|
|
18299
|
-
curIndex: endIndex
|
|
18300
|
-
});
|
|
18754
|
+
this.tableOperate.tableBorderType(payload);
|
|
18301
18755
|
}
|
|
18302
18756
|
tableTdBorderType(payload) {
|
|
18303
18757
|
const isReadonly = this.draw.isReadonly();
|
|
18304
18758
|
if (isReadonly)
|
|
18305
18759
|
return;
|
|
18306
|
-
|
|
18307
|
-
if (!rowCol)
|
|
18308
|
-
return;
|
|
18309
|
-
const tdList = rowCol.flat();
|
|
18310
|
-
const isSetBorderType = tdList.some((td) => {
|
|
18311
|
-
var _a;
|
|
18312
|
-
return !((_a = td.borderTypes) == null ? void 0 : _a.includes(payload));
|
|
18313
|
-
});
|
|
18314
|
-
tdList.forEach((td) => {
|
|
18315
|
-
if (!td.borderTypes) {
|
|
18316
|
-
td.borderTypes = [];
|
|
18317
|
-
}
|
|
18318
|
-
const borderTypeIndex = td.borderTypes.findIndex((type) => type === payload);
|
|
18319
|
-
if (isSetBorderType) {
|
|
18320
|
-
if (!~borderTypeIndex) {
|
|
18321
|
-
td.borderTypes.push(payload);
|
|
18322
|
-
}
|
|
18323
|
-
} else {
|
|
18324
|
-
if (~borderTypeIndex) {
|
|
18325
|
-
td.borderTypes.splice(borderTypeIndex, 1);
|
|
18326
|
-
}
|
|
18327
|
-
}
|
|
18328
|
-
if (!td.borderTypes.length) {
|
|
18329
|
-
delete td.borderTypes;
|
|
18330
|
-
}
|
|
18331
|
-
});
|
|
18332
|
-
const { endIndex } = this.range.getRange();
|
|
18333
|
-
this.draw.render({
|
|
18334
|
-
curIndex: endIndex
|
|
18335
|
-
});
|
|
18760
|
+
this.tableOperate.tableTdBorderType(payload);
|
|
18336
18761
|
}
|
|
18337
18762
|
tableTdSlashType(payload) {
|
|
18338
18763
|
const isReadonly = this.draw.isReadonly();
|
|
18339
18764
|
if (isReadonly)
|
|
18340
18765
|
return;
|
|
18341
|
-
|
|
18342
|
-
if (!rowCol)
|
|
18343
|
-
return;
|
|
18344
|
-
const tdList = rowCol.flat();
|
|
18345
|
-
const isSetTdSlashType = tdList.some((td) => {
|
|
18346
|
-
var _a;
|
|
18347
|
-
return !((_a = td.slashTypes) == null ? void 0 : _a.includes(payload));
|
|
18348
|
-
});
|
|
18349
|
-
tdList.forEach((td) => {
|
|
18350
|
-
if (!td.slashTypes) {
|
|
18351
|
-
td.slashTypes = [];
|
|
18352
|
-
}
|
|
18353
|
-
const slashTypeIndex = td.slashTypes.findIndex((type) => type === payload);
|
|
18354
|
-
if (isSetTdSlashType) {
|
|
18355
|
-
if (!~slashTypeIndex) {
|
|
18356
|
-
td.slashTypes.push(payload);
|
|
18357
|
-
}
|
|
18358
|
-
} else {
|
|
18359
|
-
if (~slashTypeIndex) {
|
|
18360
|
-
td.slashTypes.splice(slashTypeIndex, 1);
|
|
18361
|
-
}
|
|
18362
|
-
}
|
|
18363
|
-
if (!td.slashTypes.length) {
|
|
18364
|
-
delete td.slashTypes;
|
|
18365
|
-
}
|
|
18366
|
-
});
|
|
18367
|
-
const { endIndex } = this.range.getRange();
|
|
18368
|
-
this.draw.render({
|
|
18369
|
-
curIndex: endIndex
|
|
18370
|
-
});
|
|
18766
|
+
this.tableOperate.tableTdSlashType(payload);
|
|
18371
18767
|
}
|
|
18372
18768
|
tableTdBackgroundColor(payload) {
|
|
18373
18769
|
const isReadonly = this.draw.isReadonly();
|
|
18374
18770
|
if (isReadonly)
|
|
18375
18771
|
return;
|
|
18376
|
-
|
|
18377
|
-
if (!rowCol)
|
|
18378
|
-
return;
|
|
18379
|
-
for (let r = 0; r < rowCol.length; r++) {
|
|
18380
|
-
const row = rowCol[r];
|
|
18381
|
-
for (let c = 0; c < row.length; c++) {
|
|
18382
|
-
const col = row[c];
|
|
18383
|
-
col.backgroundColor = payload;
|
|
18384
|
-
}
|
|
18385
|
-
}
|
|
18386
|
-
const { endIndex } = this.range.getRange();
|
|
18387
|
-
this.range.setRange(endIndex, endIndex);
|
|
18388
|
-
this.draw.render({
|
|
18389
|
-
isCompute: false
|
|
18390
|
-
});
|
|
18772
|
+
this.tableOperate.tableTdBackgroundColor(payload);
|
|
18391
18773
|
}
|
|
18392
18774
|
tableSelectAll() {
|
|
18393
|
-
|
|
18394
|
-
const { index: index2, tableId, isTable } = positionContext;
|
|
18395
|
-
if (!isTable || !tableId)
|
|
18396
|
-
return;
|
|
18397
|
-
const { startIndex, endIndex } = this.range.getRange();
|
|
18398
|
-
const originalElementList = this.draw.getOriginalElementList();
|
|
18399
|
-
const trList = originalElementList[index2].trList;
|
|
18400
|
-
const endTrIndex = trList.length - 1;
|
|
18401
|
-
const endTdIndex = trList[endTrIndex].tdList.length - 1;
|
|
18402
|
-
this.range.replaceRange({
|
|
18403
|
-
startIndex,
|
|
18404
|
-
endIndex,
|
|
18405
|
-
tableId,
|
|
18406
|
-
startTdIndex: 0,
|
|
18407
|
-
endTdIndex,
|
|
18408
|
-
startTrIndex: 0,
|
|
18409
|
-
endTrIndex
|
|
18410
|
-
});
|
|
18411
|
-
this.draw.render({
|
|
18412
|
-
isCompute: false,
|
|
18413
|
-
isSubmitHistory: false
|
|
18414
|
-
});
|
|
18775
|
+
this.tableOperate.tableSelectAll();
|
|
18415
18776
|
}
|
|
18416
18777
|
hyperlink(payload) {
|
|
18417
|
-
const
|
|
18418
|
-
if (
|
|
18778
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
18779
|
+
if (isDisabled)
|
|
18419
18780
|
return;
|
|
18420
18781
|
const activeControl = this.control.getActiveControl();
|
|
18421
18782
|
if (activeControl)
|
|
@@ -18435,7 +18796,9 @@ class CommandAdapt {
|
|
|
18435
18796
|
if (!newElementList)
|
|
18436
18797
|
return;
|
|
18437
18798
|
const start = startIndex + 1;
|
|
18438
|
-
formatElementContext(elementList, newElementList, startIndex
|
|
18799
|
+
formatElementContext(elementList, newElementList, startIndex, {
|
|
18800
|
+
editorOptions: this.options
|
|
18801
|
+
});
|
|
18439
18802
|
this.draw.spliceElementList(elementList, start, startIndex === endIndex ? 0 : endIndex - startIndex, ...newElementList);
|
|
18440
18803
|
const curIndex = start + newElementList.length - 1;
|
|
18441
18804
|
this.range.setRange(curIndex, curIndex);
|
|
@@ -18477,8 +18840,8 @@ class CommandAdapt {
|
|
|
18477
18840
|
return [leftIndex, rightIndex];
|
|
18478
18841
|
}
|
|
18479
18842
|
deleteHyperlink() {
|
|
18480
|
-
const
|
|
18481
|
-
if (
|
|
18843
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
18844
|
+
if (isDisabled)
|
|
18482
18845
|
return;
|
|
18483
18846
|
const hyperRange = this.getHyperlinkRange();
|
|
18484
18847
|
if (!hyperRange)
|
|
@@ -18494,8 +18857,8 @@ class CommandAdapt {
|
|
|
18494
18857
|
});
|
|
18495
18858
|
}
|
|
18496
18859
|
cancelHyperlink() {
|
|
18497
|
-
const
|
|
18498
|
-
if (
|
|
18860
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
18861
|
+
if (isDisabled)
|
|
18499
18862
|
return;
|
|
18500
18863
|
const hyperRange = this.getHyperlinkRange();
|
|
18501
18864
|
if (!hyperRange)
|
|
@@ -18517,8 +18880,8 @@ class CommandAdapt {
|
|
|
18517
18880
|
});
|
|
18518
18881
|
}
|
|
18519
18882
|
editHyperlink(payload) {
|
|
18520
|
-
const
|
|
18521
|
-
if (
|
|
18883
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
18884
|
+
if (isDisabled)
|
|
18522
18885
|
return;
|
|
18523
18886
|
const hyperRange = this.getHyperlinkRange();
|
|
18524
18887
|
if (!hyperRange)
|
|
@@ -18537,8 +18900,8 @@ class CommandAdapt {
|
|
|
18537
18900
|
});
|
|
18538
18901
|
}
|
|
18539
18902
|
separator(payload) {
|
|
18540
|
-
const
|
|
18541
|
-
if (
|
|
18903
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
18904
|
+
if (isDisabled)
|
|
18542
18905
|
return;
|
|
18543
18906
|
const activeControl = this.control.getActiveControl();
|
|
18544
18907
|
if (activeControl)
|
|
@@ -18561,7 +18924,9 @@ class CommandAdapt {
|
|
|
18561
18924
|
type: ElementType.SEPARATOR,
|
|
18562
18925
|
dashArray: payload
|
|
18563
18926
|
};
|
|
18564
|
-
formatElementContext(elementList, [newElement], startIndex
|
|
18927
|
+
formatElementContext(elementList, [newElement], startIndex, {
|
|
18928
|
+
editorOptions: this.options
|
|
18929
|
+
});
|
|
18565
18930
|
if (startIndex !== 0 && elementList[startIndex].value === ZERO) {
|
|
18566
18931
|
this.draw.spliceElementList(elementList, startIndex, 1, newElement);
|
|
18567
18932
|
curIndex = startIndex - 1;
|
|
@@ -18574,8 +18939,8 @@ class CommandAdapt {
|
|
|
18574
18939
|
this.draw.render({ curIndex });
|
|
18575
18940
|
}
|
|
18576
18941
|
pageBreak() {
|
|
18577
|
-
const
|
|
18578
|
-
if (
|
|
18942
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
18943
|
+
if (isDisabled)
|
|
18579
18944
|
return;
|
|
18580
18945
|
const activeControl = this.control.getActiveControl();
|
|
18581
18946
|
if (activeControl)
|
|
@@ -18809,10 +19174,11 @@ class CommandAdapt {
|
|
|
18809
19174
|
return;
|
|
18810
19175
|
element.imgDisplay = display;
|
|
18811
19176
|
const { startIndex, endIndex } = this.range.getRange();
|
|
18812
|
-
if (display === ImageDisplay.FLOAT_TOP || display === ImageDisplay.FLOAT_BOTTOM) {
|
|
19177
|
+
if (display === ImageDisplay.SURROUND || display === ImageDisplay.FLOAT_TOP || display === ImageDisplay.FLOAT_BOTTOM) {
|
|
18813
19178
|
const positionList = this.position.getPositionList();
|
|
18814
|
-
const { coordinate: { leftTop } } = positionList[startIndex];
|
|
19179
|
+
const { pageNo, coordinate: { leftTop } } = positionList[startIndex];
|
|
18815
19180
|
element.imgFloatPosition = {
|
|
19181
|
+
pageNo,
|
|
18816
19182
|
x: leftTop[0],
|
|
18817
19183
|
y: leftTop[1]
|
|
18818
19184
|
};
|
|
@@ -18932,6 +19298,19 @@ class CommandAdapt {
|
|
|
18932
19298
|
tableElement = zipElementList([originTableElement])[0];
|
|
18933
19299
|
}
|
|
18934
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
|
+
}
|
|
18935
19314
|
return deepClone({
|
|
18936
19315
|
isCollapsed,
|
|
18937
19316
|
startElement,
|
|
@@ -18945,7 +19324,9 @@ class CommandAdapt {
|
|
|
18945
19324
|
tdIndex: tdIndex != null ? tdIndex : null,
|
|
18946
19325
|
tableElement,
|
|
18947
19326
|
selectionText,
|
|
18948
|
-
selectionElementList
|
|
19327
|
+
selectionElementList,
|
|
19328
|
+
titleId,
|
|
19329
|
+
titleStartPageNo
|
|
18949
19330
|
});
|
|
18950
19331
|
}
|
|
18951
19332
|
getRangeRow() {
|
|
@@ -18997,14 +19378,15 @@ class CommandAdapt {
|
|
|
18997
19378
|
insertElementList(payload) {
|
|
18998
19379
|
if (!payload.length)
|
|
18999
19380
|
return;
|
|
19000
|
-
const
|
|
19001
|
-
if (
|
|
19381
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
19382
|
+
if (isDisabled)
|
|
19002
19383
|
return;
|
|
19003
19384
|
const cloneElementList = deepClone(payload);
|
|
19004
19385
|
const { startIndex } = this.range.getRange();
|
|
19005
19386
|
const elementList = this.draw.getElementList();
|
|
19006
19387
|
formatElementContext(elementList, cloneElementList, startIndex, {
|
|
19007
|
-
isBreakWhenWrap: true
|
|
19388
|
+
isBreakWhenWrap: true,
|
|
19389
|
+
editorOptions: this.options
|
|
19008
19390
|
});
|
|
19009
19391
|
this.draw.insertElementList(cloneElementList);
|
|
19010
19392
|
}
|
|
@@ -19036,7 +19418,7 @@ class CommandAdapt {
|
|
|
19036
19418
|
const elementIndex = getElementIndexById(elementList);
|
|
19037
19419
|
if (~elementIndex) {
|
|
19038
19420
|
elementList[elementIndex] = __spreadValues(__spreadValues({}, elementList[elementIndex]), payload.properties);
|
|
19039
|
-
formatElementList([elementList[elementIndex]], {
|
|
19421
|
+
formatElementList(zipElementList([elementList[elementIndex]]), {
|
|
19040
19422
|
isHandleFirstElement: false,
|
|
19041
19423
|
editorOptions: this.options
|
|
19042
19424
|
});
|
|
@@ -19284,8 +19666,8 @@ class CommandAdapt {
|
|
|
19284
19666
|
}
|
|
19285
19667
|
}
|
|
19286
19668
|
insertControl(payload) {
|
|
19287
|
-
const
|
|
19288
|
-
if (
|
|
19669
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
19670
|
+
if (isDisabled)
|
|
19289
19671
|
return;
|
|
19290
19672
|
const cloneElement = deepClone(payload);
|
|
19291
19673
|
const { startIndex } = this.range.getRange();
|
|
@@ -19410,8 +19792,8 @@ class CommandAdapt {
|
|
|
19410
19792
|
}
|
|
19411
19793
|
insertTitle(payload) {
|
|
19412
19794
|
var _a;
|
|
19413
|
-
const
|
|
19414
|
-
if (
|
|
19795
|
+
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
19796
|
+
if (isDisabled)
|
|
19415
19797
|
return;
|
|
19416
19798
|
const cloneElement = deepClone(payload);
|
|
19417
19799
|
const { startIndex } = this.range.getRange();
|
|
@@ -19429,6 +19811,21 @@ class CommandAdapt {
|
|
|
19429
19811
|
});
|
|
19430
19812
|
this.draw.insertElementList([cloneElement]);
|
|
19431
19813
|
}
|
|
19814
|
+
focus(payload) {
|
|
19815
|
+
const { position = LocationPosition.AFTER } = payload || {};
|
|
19816
|
+
const curIndex = position === LocationPosition.BEFORE ? 0 : this.draw.getOriginalMainElementList().length - 1;
|
|
19817
|
+
this.range.setRange(curIndex, curIndex);
|
|
19818
|
+
this.draw.render({
|
|
19819
|
+
curIndex,
|
|
19820
|
+
isCompute: false,
|
|
19821
|
+
isSubmitHistory: false
|
|
19822
|
+
});
|
|
19823
|
+
const positionList = this.draw.getPosition().getPositionList();
|
|
19824
|
+
this.draw.getCursor().moveCursorToVisible({
|
|
19825
|
+
cursorPosition: positionList[curIndex],
|
|
19826
|
+
direction: MoveDirection.DOWN
|
|
19827
|
+
});
|
|
19828
|
+
}
|
|
19432
19829
|
}
|
|
19433
19830
|
class Listener {
|
|
19434
19831
|
constructor() {
|
|
@@ -19492,6 +19889,7 @@ const INTERNAL_CONTEXT_MENU_KEY = {
|
|
|
19492
19889
|
TEXT_WRAP: "imageTextWrap",
|
|
19493
19890
|
TEXT_WRAP_EMBED: "imageTextWrapEmbed",
|
|
19494
19891
|
TEXT_WRAP_UP_DOWN: "imageTextWrapUpDown",
|
|
19892
|
+
TEXT_WRAP_SURROUND: "imageTextWrapSurround",
|
|
19495
19893
|
TEXT_WRAP_FLOAT_TOP: "imageTextWrapFloatTop",
|
|
19496
19894
|
TEXT_WRAP_FLOAT_BOTTOM: "imageTextWrapFloatBottom"
|
|
19497
19895
|
},
|
|
@@ -19637,7 +20035,7 @@ const hyperlinkMenus = [
|
|
|
19637
20035
|
}
|
|
19638
20036
|
}
|
|
19639
20037
|
];
|
|
19640
|
-
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;
|
|
19641
20039
|
const imageMenus = [
|
|
19642
20040
|
{
|
|
19643
20041
|
key: CHANGE,
|
|
@@ -19699,6 +20097,14 @@ const imageMenus = [
|
|
|
19699
20097
|
command.executeChangeImageDisplay(context.startElement, ImageDisplay.INLINE);
|
|
19700
20098
|
}
|
|
19701
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
|
+
},
|
|
19702
20108
|
{
|
|
19703
20109
|
key: TEXT_WRAP_FLOAT_TOP,
|
|
19704
20110
|
i18nPath: "contextmenu.image.textWrapType.floatTop",
|