@hufe921/canvas-editor 0.9.9 → 0.9.10
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/README.md +1 -1
- package/dist/canvas-editor.es.js +272 -211
- package/dist/canvas-editor.es.js.map +1 -1
- package/dist/canvas-editor.umd.js +12 -12
- package/dist/canvas-editor.umd.js.map +1 -1
- package/dist/src/editor/core/contextmenu/ContextMenu.d.ts +2 -0
- package/dist/src/editor/core/draw/Draw.d.ts +6 -1
- package/dist/src/editor/core/event/GlobalEvent.d.ts +8 -4
- package/dist/src/editor/core/observer/ScrollObserver.d.ts +2 -0
- package/dist/src/editor/core/observer/SelectionObserver.d.ts +2 -0
- package/dist/src/editor/core/shortcut/Shortcut.d.ts +2 -0
- package/dist/src/editor/dataset/constant/Editor.d.ts +1 -0
- package/dist/src/editor/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/canvas-editor.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(()=>{(function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.appendChild(document.createTextNode('.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}.select-control-popup ul{list-style:none;padding:3px 0;margin:0;box-sizing:border-box}.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}.select-control-popup ul li:hover{background-color:#eef2fd}.select-control-popup ul li.active{color:var(--COLOR-HOVER, #5175f4);font-weight:700}.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}.date-container.active{display:block}.date-wrap{display:none}.date-wrap.active{display:block}.date-title{display:flex;justify-content:center;align-items:center;text-align:center;color:#606266;font-size:16px}.date-title>span{display:inline-block}.date-title>span:not(.date-title__now){font-family:cursive;cursor:pointer}.date-title>span:not(.date-title__now):hover{color:#5175f4}.date-title .date-title__pre-year,.date-title .date-title__pre-month{width:15%}.date-title .date-title__now{width:40%}.date-title .date-title__next-year,.date-title .date-title__next-month{width:15%}.date-week{width:100%;display:flex;justify-content:center;margin-top:15px;padding-bottom:5px;border-bottom:1px solid #e4e7ed}.date-week>span{list-style:none;width:14.28571%;text-align:center;color:#606266;font-size:14px}.date-day{width:100%;display:flex;flex-wrap:wrap;align-items:center;margin-top:5px}.date-day>div{width:14.28571%;height:40px;text-align:center;color:#606266;font-size:14px;cursor:pointer;line-height:40px;border-radius:4px}.date-day>div:hover{color:#5175f4;opacity:.8}.date-day>div.active{color:#5175f4;font-weight:700}.date-day>div.disable{color:#c0c4cc}.date-day>div.select{color:#fff;background-color:#5175f4}.time-wrap{display:none;padding:10px;height:286px}.time-wrap ::-webkit-scrollbar{width:0}.time-wrap.active{display:flex}.time-wrap li{list-style:none}.time-wrap>li{width:33.3%;height:100%;text-align:center}.time-wrap>li>span{transform:translateY(-5px);display:inline-block}.time-wrap>li>ol{height:calc(100% - 20px);overflow-y:auto;border:1px solid #e2e2e2;position:relative}.time-wrap>li:first-child>ol{border-right:0}.time-wrap>li:last-child>ol{border-left:0}.time-wrap>li>ol>li{line-height:30px;cursor:pointer;transition:all .3s}.time-wrap>li>ol>li:hover{background-color:#eaeaea}.time-wrap>li>ol>li.active{color:#fff;background:#5175F4}.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}.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}.date-menu button:hover{color:#5175f4;border-color:#5175f4}.date-menu button.date-menu__time{border:1px solid transparent;position:absolute;left:0;margin-left:0}.date-menu button.date-menu__time:hover{color:#5175f4}.block-item{position:absolute;z-index:0;overflow:hidden;border-radius:8px;background-color:#fff;border:1px solid rgb(235 236 240)}.inputarea{width:0;height:12px;min-width:0;min-height:0;margin:0;padding:0;left:0;right:0;letter-spacing:0;font-size:12px;position:absolute;outline:none;resize:none;border:none;overflow:hidden;color:transparent;user-select:none;background-color:transparent}.cursor{width:1px;height:20px;left:0;right:0;position:absolute;outline:none;background-color:#000;pointer-events:none}.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}}.resizer-selection{position:absolute;border:1px solid}.resizer-selection>div{position:absolute;width:10px;height:10px;box-shadow:0 1px 4px #0000004d;border-radius:5px;border:2px solid #ffffff;box-sizing:border-box}.resizer-selection .handle-0{cursor:nw-resize}.resizer-selection .handle-1{cursor:n-resize}.resizer-selection .handle-2{cursor:ne-resize}.resizer-selection .handle-3{cursor:e-resize}.resizer-selection .handle-4{cursor:se-resize}.resizer-selection .handle-5{cursor:s-resize}.resizer-selection .handle-6{cursor:sw-resize}.resizer-selection .handle-7{cursor:w-resize}.resizer-image{position:absolute;opacity:.5}.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}}.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%}.image-previewer .image-close:hover{background-color:#e2e6ed}.image-previewer .image-container{position:relative}.image-previewer .image-container img{cursor:move;position:relative}.image-previewer .image-menu{height:50px;position:absolute;bottom:50px;z-index:99;display:flex;align-items:center;justify-content:center}.image-previewer .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%}.image-previewer .image-menu i:hover{background-color:#e2e6ed}.image-previewer .image-menu i.zoom-in{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE0IDE0di00aDJ2NGg0djJoLTR2NGgtMnYtNGgtNHYtMmg0em04Ljc0OSAxMC4xNjNBMTEuOTUyIDExLjk1MiAwIDAxMTUgMjdDOC4zNzMgMjcgMyAyMS42MjcgMyAxNVM4LjM3MyAzIDE1IDNzMTIgNS4zNzMgMTIgMTJjMCAyLjk1NC0xLjA2NyA1LjY1OC0yLjgzNyA3Ljc0OWw0LjkwOCA0LjkwOC0xLjQxNCAxLjQxNC00LjkwOC00LjkwOHpNMTUgMjVjNS41MjMgMCAxMC00LjQ3NyAxMC0xMFMyMC41MjMgNSAxNSA1IDUgOS40NzcgNSAxNXM0LjQ3NyAxMCAxMCAxMHoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.image-previewer .image-menu i.zoom-out{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIyLjc0OSAyNC4xNjNBMTEuOTUyIDExLjk1MiAwIDAxMTUgMjdDOC4zNzMgMjcgMyAyMS42MjcgMyAxNVM4LjM3MyAzIDE1IDNzMTIgNS4zNzMgMTIgMTJjMCAyLjk1NC0xLjA2NyA1LjY1OC0yLjgzNyA3Ljc0OWw0LjkwOCA0LjkwOC0xLjQxNCAxLjQxNC00LjkwOC00LjkwOHpNMTUgMjVjNS41MjMgMCAxMC00LjQ3NyAxMC0xMFMyMC41MjMgNSAxNSA1IDUgOS40NzcgNSAxNXM0LjQ3NyAxMCAxMCAxMHptLTUtMTFoMTB2MkgxMHYtMnoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.image-previewer .image-menu i.rotate{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTYgNGM2LjYyNyAwIDEyIDUuMzczIDEyIDEyYTExLjk3IDExLjk3IDAgMDEtNCA4Ljk0NFYyM2gtLjg2QTkuOTY4IDkuOTY4IDAgMDAyNiAxNmMwLTUuNTIzLTQuNDc3LTEwLTEwLTEwUzYgMTAuNDc3IDYgMTZjMCA1LjE4NSAzLjk0NyA5LjQ0OSA5IDkuOTV2Mi4wMDlDOC44NCAyNy40NTEgNCAyMi4yOTEgNCAxNiA0IDkuMzczIDkuMzczIDQgMTYgNHoiIGZpbGwtcnVsZT0ibm9uemVybyIvPjxwYXRoIGQ9Ik0xOS44NzkgMjcuMzI4bDEuNzY3LTYuNzE3IDQuOTUgNC45NXoiLz48L2c+PC9zdmc+)}.image-previewer .image-menu i.original-size{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQgNGgyNHYyNEg0VjR6bTIgMnYyMGgyMFY2SDZ6bTQgNWgydjEwaC0yVjExem01IDJoMnYyaC0ydi0yem0wIDRoMnYyaC0ydi0yem01LTZoMnYxMGgtMlYxMXoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.image-previewer .image-menu i.image-download{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQuNSAxNXYzLjVoMTVWMTVIMjF2NUgzdi01aDEuNXptOC4yMzItMTEuMjI2djkuMTk2bDQuMDUtNC4wNSAxLjA2IDEuMDYtNS44MzQgNS44MzQtNS44MzMtNS44MzMgMS4wNi0xLjA2IDMuOTk4IDMuOTk2VjMuNzc0aDEuNXoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.table-tool__row{position:absolute;width:12px;border-radius:6.5px;overflow:hidden;background-color:#e2e6ed}.table-tool__row .table-tool__row__item{width:100%;position:relative}.table-tool__row .table-tool__row__item:after{content:"";position:absolute;bottom:0;left:2px;width:8px;height:1px;background-color:#c0c6cf}.table-tool__row .table-tool__row__item:last-child:after{display:none}.table-tool__col{position:absolute;height:12px;border-radius:6.5px;overflow:hidden;background-color:#e2e6ed;display:flex}.table-tool__col .table-tool__col__item{height:100%;position:relative}.table-tool__col .table-tool__col__item:after{content:"";position:absolute;top:2px;left:-1px;width:1px;height:8px;z-index:1;background-color:#c0c6cf}.table-tool__col .table-tool__col__item:first-child:after{display:none}.table-tool__row .table-tool__row__item.active,.table-tool__col .table-tool__col__item.active{background-color:#c4d7fa}.table-tool__col .table-tool__anchor{right:-5px;width:10px;height:12px;z-index:9;position:absolute;cursor:col-resize}.table-tool__row .table-tool__anchor{bottom:-5px;left:0;width:12px;height:10px;z-index:9;position:absolute;cursor:row-resize}.table-anchor__line{z-index:9;position:absolute;border:1px dotted #000000}.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}.contextmenu-content{display:flex;flex-direction:column}.contextmenu-content .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=)}.contextmenu-content .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}.contextmenu-content .contextmenu-item.hover{background:rgba(25,55,88,.04)}.contextmenu-content .contextmenu-item span{max-width:300px;font-size:12px;color:#3d4757;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.contextmenu-content .contextmenu-item span.shortcut{color:#767c85;height:30px;flex:1;text-align:right;line-height:30px;margin-left:20px}.contextmenu-content .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}.contextmenu-divider{background-color:#e2e6ed;margin:4px 16px;height:1px}.contextmenu-print{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjM0Q0NzU3IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0xMiA0aC0xVjJINXYySDRWMmExIDEgMCAwMTEtMWg2YTEgMSAwIDAxMSAxdjJ6bTAgNXY0YTEgMSAwIDAxLTEgMUg1YTEgMSAwIDAxLTEtMVY5aDF2NGg2VjloMXoiLz48cGF0aCBkPSJNMTIgMTJ2LTFoMlY1SDJ2NmgydjFIMmExIDEgMCAwMS0xLTFWNWExIDEgMCAwMTEtMWgxMmExIDEgMCAwMTEgMXY2YTEgMSAwIDAxLTEgMWgtMnoiLz48cGF0aCBkPSJNMyA4aDEwdjFIM3ptOC0yaDJ2MWgtMnoiLz48L2c+PC9zdmc+)}.contextmenu-image{background-image:url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSLlm77lsYJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4PSIwIiB5PSIwIiB2aWV3Qm94PSIwIDAgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxzdHlsZT4uc3Qwe2ZpbGw6IzNkNDc1N308L3N0eWxlPjxnIGlkPSJfeDMwXzAt5YWs5YWxX3gyRl8wMuW3peWFt+agj194MkZf5o+S5YWl5Zu+54mHLTE2cHgtIj48ZyBpZD0iR3JvdXAtMTkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMSkiPjxwYXRoIGlkPSJDb21iaW5lZC1TaGFwZSIgY2xhc3M9InN0MCIgZD0iTTEgMGgxMmMuNiAwIDEgLjQgMSAxdjExYzAgLjYtLjQgMS0xIDFIMWMtLjYgMC0xLS40LTEtMVYxYzAtLjYuNC0xIDEtMXptMCAxdjExaDEyVjFIMXoiLz48Y2lyY2xlIGlkPSLmpK3lnIblvaIiIGNsYXNzPSJzdDAiIGN4PSIxMCIgY3k9IjQiIHI9IjEiLz48cGF0aCBpZD0iUGF0aCIgY2xhc3M9InN0MCIgZD0iTTguNSAxMS4ybC00LTQuMUwxIDEwLjdWOS4yYzEuNy0xLjYgMi43LTIuNSAzLTIuOC40LS41LjctLjQgMSAwTDguNSAxMCAxMSA3LjNjLjQtLjUuNi0uNSAxLS4xbDIgMi44djEuNWwtMi41LTMuNC0zIDMuMXoiLz48L2c+PC9nPjwvc3ZnPg==)}.contextmenu-image-change{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyIDQpIiBmaWxsPSIjM0Q0NzU3Ij48Y2lyY2xlIGZpbGwtcnVsZT0ibm9uemVybyIgY3g9IjMiIGN5PSIxIiByPSIxIi8+PHBhdGggZD0iTTcuNDczIDguMjIzTDMuNDcgNC4xMDcgMCA3LjY2N3YtMS41QzEuNzE1IDQuNiAyLjcwNyAzLjY2NCAyLjk3NSAzLjM1OGMuNDAyLS40NTcuNjUxLS4zOSAxLjA0MiAwTDcuNDczIDcgOS45NiA0LjM0OWMuNDE0LS40NjIuNjItLjQ2MiAxLjAxMS0uMDcxTDEzIDcuMDZ2MS41bC0yLjUxLTMuNDEtMy4wMTcgMy4wNzJ6Ii8+PC9nPjxwYXRoIGQ9Ik02IDEuNUgxLjV2MTJoMTN2LTRWMTNhLjUuNSAwIDAxLS41LjVIMmEuNS41IDAgMDEtLjUtLjVWMmEuNS41IDAgMDEuNS0uNWg0em04LjUgOFY2bC0uNS41aDFsLS41LS41djMuNXpNNiAxLjVoNEw5LjUgMXYxbC41LS41SDZ6IiBzdHJva2U9IiMzRDQ3NTciLz48cGF0aCBkPSJNMTMuMDg1IDEuMzE2bC0zLjgxNCA0YTEgMSAwIDAwMS40NTggMS4zNjhsMy44MTUtNGExIDEgMCAxMC0xLjQ1OS0xLjM2OHoiIGZpbGw9IiMzRDQ3NTciIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvZz48L3N2Zz4=)}.contextmenu-insert-row-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiMzRDQ3NTciIGQ9Ik04LjUgNS41aDZ2NGgtNnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNNCA3djFoMlY3em0tMyAuNUw0IDV2NXpNMSAxaDEydjFIMXptMCAxMmgxMnYxSDF6Ii8+PC9nPjwvc3ZnPg==)}.contextmenu-insert-top-row{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNOCA1SDd2M2gxem0tLjUtM0wxMCA1SDV6Ii8+PHJlY3Qgc3Ryb2tlPSIjM0Q0NzU3IiB4PSIxLjUiIHk9IjEwLjUiIHdpZHRoPSIxMiIgaGVpZ2h0PSIzIiByeD0iMSIvPjwvZz48L3N2Zz4=)}.contextmenu-insert-bottom-row{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNNyAxMWgxVjhIN3ptLjUgM0w1IDExaDV6Ii8+PHJlY3Qgc3Ryb2tlPSIjM0Q0NzU3IiB4PSIxLjUiIHk9IjIuNSIgd2lkdGg9IjEyIiBoZWlnaHQ9IjMiIHJ4PSIxIi8+PC9nPjwvc3ZnPg==)}.contextmenu-insert-left-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMTEgN3YxaDNWN3ptLTMgLjVMMTEgNXY1eiIvPjxyZWN0IHN0cm9rZT0iIzNENDc1NyIgdHJhbnNmb3JtPSJyb3RhdGUoOTAgNCA3LjUpIiB4PSItMiIgeT0iNiIgd2lkdGg9IjEyIiBoZWlnaHQ9IjMiIHJ4PSIxIi8+PC9nPjwvc3ZnPg==)}.contextmenu-insert-right-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNNSA4VjdIMnYxem0zLS41TDUgMTBWNXoiLz48cmVjdCBzdHJva2U9IiMzRDQ3NTciIHRyYW5zZm9ybT0icm90YXRlKDkwIDEyIDcuNSkiIHg9IjYiIHk9IjYiIHdpZHRoPSIxMiIgaGVpZ2h0PSIzIiByeD0iMSIvPjwvZz48L3N2Zz4=)}.contextmenu-delete-row-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiM5MjlBQTgiIGQ9Ik04LjUgNi41aDZ2MmgtNnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMiAxMmgxMXYxSDJ6TTIgMmgxMXYxSDJ6bS42MyAzTDcgOS4zNWwtLjYzNS42NUwyIDUuNjN6Ii8+PHBhdGggZmlsbD0iIzNENDc1NyIgZD0iTTIgOS4zNjNMNi4zNTUgNSA3IDUuNzA3IDIuNjk1IDEweiIvPjwvZz48L3N2Zz4=)}.contextmenu-delete-row{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiM5MjlBQTgiIGQ9Ik04LjUgNS41aDZ2NGgtNnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMSAxM2gxMnYxSDF6TTEgMWgxMnYxSDF6bTAgNGgxdjFIMXptMSAxaDF2MUgyem0xIDFoMXYxSDN6bTEtMWgxdjFINHptMS0xaDF2MUg1ek00IDhoMXYxSDR6TTIgOGgxdjFIMnptMyAxaDF2MUg1ek0xIDloMXYxSDF6Ii8+PC9nPjwvc3ZnPg==)}.contextmenu-delete-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiM5MjlBQTgiIGQ9Ik01LjUgNy41di02aDR2NnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMTMgMTVWM2gxdjEyek0xIDE1VjNoMXYxMnptNCAwdi0xaDF2MXptMS0xdi0xaDF2MXptMS0xdi0xaDF2MXptLTEtMXYtMWgxdjF6bS0xLTF2LTFoMXYxem0zIDF2LTFoMXYxem0wIDJ2LTFoMXYxem0xLTN2LTFoMXYxem0wIDR2LTFoMXYxeiIvPjwvZz48L3N2Zz4=)}.contextmenu-delete-table{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQgMTNoLTF2LTNIMnYzSDF2LTNhMSAxIDAgMDExLTFoMTFhMSAxIDAgMDExIDF2M3oiIGZpbGwtcnVsZT0ibm9uemVybyIvPjxwYXRoIGQ9Ik01LjYyNSAyTDEwIDYuMzc1IDkuMzc1IDcgNSAyLjYyNXoiLz48cGF0aCBkPSJNNSA2LjM3NUw5LjM3NSAybC42MjUuNjI1TDUuNjI1IDd6Ii8+PC9nPjwvc3ZnPg==)}.contextmenu-merge-cell{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNiAxdjFIMnYxMWg0djFIMmExIDEgMCAwMS0xLTFWMmExIDEgMCAwMTEtMWg0em0zIDBoNGExIDEgMCAwMTEgMXYxMWExIDEgMCAwMS0xIDFIOXYtMWg0VjJIOVYxeiIvPjxwYXRoIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTYgMWgxdjRINnptMiAwaDF2NEg4eiIvPjxwYXRoIGQ9Ik04IDcuNUwxMCA2djN6bS0xIDBMNSA2djN6Ii8+PHBhdGggZD0iTTkgN2gzdjFIOXpNMyA3aDN2MUgzeiIvPjxwYXRoIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTggMTBoMXY0SDh6bS0yIDBoMXY0SDZ6Ii8+PC9nPjwvc3ZnPg==)}.contextmenu-merge-cancel-cell{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNiAxdjFIMnYxMWg0djFIMmExIDEgMCAwMS0xLTFWMmExIDEgMCAwMTEtMWg0em0zIDBoNGExIDEgMCAwMTEgMXYxMWExIDEgMCAwMS0xIDFIOXYtMWg0VjJIOVYxeiIvPjxwYXRoIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTYgMWgxdjRINnptMiAwaDF2NEg4eiIvPjxwYXRoIGQ9Ik0zIDcuNUw1IDZ2M3ptOSAwTDEwIDZ2M3oiLz48cGF0aCBkPSJNNCA3aDN2MUg0em00IDBoM3YxSDh6Ii8+PHBhdGggZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNOCAxMGgxdjRIOHptLTIgMGgxdjRINnoiLz48L2c+PC9zdmc+)}.hyperlink-popup{min-width:100px;font-size:12px;line-height:20px;background:#fff;box-shadow:0 2px 12px #626b8433;border-radius:2px;color:#3d4757;padding:16px;white-space:nowrap;position:absolute;z-index:1;text-align:center;display:none}.hyperlink-popup a{cursor:pointer;text-decoration:none;border-bottom-width:1px;border-bottom-style:solid;padding-bottom:2px;color:#00f}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();})();
|
|
1
|
+
(()=>{(function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.appendChild(document.createTextNode('.ce-select-control-popup{max-width:160px;min-width:69px;max-height:225px;position:absolute;z-index:1;border:1px solid #e4e7ed;border-radius:4px;background-color:#fff;box-shadow:0 2px 12px #0000001a;box-sizing:border-box;margin:5px 0;overflow-y:auto}.ce-select-control-popup ul{list-style:none;padding:3px 0;margin:0;box-sizing:border-box}.ce-select-control-popup ul li{font-size:13px;padding:0 20px;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#666;height:36px;line-height:36px;box-sizing:border-box;cursor:pointer}.ce-select-control-popup ul li:hover{background-color:#eef2fd}.ce-select-control-popup ul li.active{color:var(--COLOR-HOVER, #5175f4);font-weight:700}.ce-date-container{display:none;width:300px;overflow:hidden;left:0;right:0;position:absolute;z-index:1;color:#606266;background:#ffffff;border-radius:4px;padding:10px;user-select:none;border:1px solid #e4e7ed;box-shadow:0 2px 12px #0000001a}.ce-date-container.active{display:block}.ce-date-wrap{display:none}.ce-date-wrap.active{display:block}.ce-date-title{display:flex;justify-content:center;align-items:center;text-align:center;color:#606266;font-size:16px}.ce-date-title>span{display:inline-block}.ce-date-title>span:not(.ce-date-title__now){font-family:cursive;cursor:pointer}.ce-date-title>span:not(.ce-date-title__now):hover{color:#5175f4}.ce-date-title .ce-date-title__pre-year,.ce-date-title .ce-date-title__pre-month{width:15%}.ce-date-title .ce-date-title__now{width:40%}.ce-date-title .ce-date-title__next-year,.ce-date-title .ce-date-title__next-month{width:15%}.ce-date-week{width:100%;display:flex;justify-content:center;margin-top:15px;padding-bottom:5px;border-bottom:1px solid #e4e7ed}.ce-date-week>span{list-style:none;width:14.28571%;text-align:center;color:#606266;font-size:14px}.ce-date-day{width:100%;display:flex;flex-wrap:wrap;align-items:center;margin-top:5px}.ce-date-day>div{width:14.28571%;height:40px;text-align:center;color:#606266;font-size:14px;cursor:pointer;line-height:40px;border-radius:4px}.ce-date-day>div:hover{color:#5175f4;opacity:.8}.ce-date-day>div.active{color:#5175f4;font-weight:700}.ce-date-day>div.disable{color:#c0c4cc}.ce-date-day>div.select{color:#fff;background-color:#5175f4}.ce-time-wrap{display:none;padding:10px;height:286px}.ce-time-wrap ::-webkit-scrollbar{width:0}.ce-time-wrap.active{display:flex}.ce-time-wrap li{list-style:none}.ce-time-wrap>li{width:33.3%;height:100%;text-align:center}.ce-time-wrap>li>span{transform:translateY(-5px);display:inline-block}.ce-time-wrap>li>ol{height:calc(100% - 20px);overflow-y:auto;border:1px solid #e2e2e2;position:relative}.ce-time-wrap>li:first-child>ol{border-right:0}.ce-time-wrap>li:last-child>ol{border-left:0}.ce-time-wrap>li>ol>li{line-height:30px;cursor:pointer;transition:all .3s}.ce-time-wrap>li>ol>li:hover{background-color:#eaeaea}.ce-time-wrap>li>ol>li.active{color:#fff;background:#5175F4}.ce-date-menu{width:100%;height:28px;display:flex;justify-content:flex-end;align-items:center;padding-top:10px;position:relative;border-top:1px solid #e4e7ed}.ce-date-menu button{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;appearance:none;text-align:center;box-sizing:border-box;outline:none;transition:.1s;font-weight:500;user-select:none;padding:7px 15px;font-size:12px;border-radius:3px;margin:0 0 0 10px}.ce-date-menu button:hover{color:#5175f4;border-color:#5175f4}.ce-date-menu button.ce-date-menu__time{border:1px solid transparent;position:absolute;left:0;margin-left:0}.ce-date-menu button.ce-date-menu__time:hover{color:#5175f4}.ce-block-item{position:absolute;z-index:0;overflow:hidden;border-radius:8px;background-color:#fff;border:1px solid rgb(235 236 240)}.ce-table-tool__row{position:absolute;width:12px;border-radius:6.5px;overflow:hidden;background-color:#e2e6ed}.ce-table-tool__row .ce-table-tool__row__item{width:100%;position:relative}.ce-table-tool__row .ce-table-tool__row__item:after{content:"";position:absolute;bottom:0;left:2px;width:8px;height:1px;background-color:#c0c6cf}.ce-table-tool__row .ce-table-tool__row__item:last-child:after{display:none}.ce-table-tool__col{position:absolute;height:12px;border-radius:6.5px;overflow:hidden;background-color:#e2e6ed;display:flex}.ce-table-tool__col .ce-table-tool__col__item{height:100%;position:relative}.ce-table-tool__col .ce-table-tool__col__item:after{content:"";position:absolute;top:2px;left:-1px;width:1px;height:8px;z-index:1;background-color:#c0c6cf}.ce-table-tool__col .ce-table-tool__col__item:first-child:after{display:none}.ce-table-tool__row .ce-table-tool__row__item.active,.ce-table-tool__col .ce-table-tool__col__item.active{background-color:#c4d7fa}.ce-table-tool__col .ce-table-tool__anchor{right:-5px;width:10px;height:12px;z-index:9;position:absolute;cursor:col-resize}.ce-table-tool__row .ce-table-tool__anchor{bottom:-5px;left:0;width:12px;height:10px;z-index:9;position:absolute;cursor:row-resize}.ce-table-anchor__line{z-index:9;position:absolute;border:1px dotted #000000}.ce-resizer-selection{position:absolute;border:1px solid}.ce-resizer-selection>div{position:absolute;width:10px;height:10px;box-shadow:0 1px 4px #0000004d;border-radius:5px;border:2px solid #ffffff;box-sizing:border-box}.ce-resizer-selection .handle-0{cursor:nw-resize}.ce-resizer-selection .handle-1{cursor:n-resize}.ce-resizer-selection .handle-2{cursor:ne-resize}.ce-resizer-selection .handle-3{cursor:e-resize}.ce-resizer-selection .handle-4{cursor:se-resize}.ce-resizer-selection .handle-5{cursor:s-resize}.ce-resizer-selection .handle-6{cursor:sw-resize}.ce-resizer-selection .handle-7{cursor:w-resize}.ce-resizer-image{position:absolute;opacity:.5}.ce-image-previewer{position:fixed;left:0;top:0;z-index:1000;width:100%;height:100%;overflow:hidden;background:#f2f4f7;display:flex;align-items:center;justify-content:center;animation:previewerAnimation .3s}@keyframes previewerAnimation{0%{opacity:.1}to{opacity:1}}.ce-image-previewer .image-close{width:24px;height:24px;display:inline-block;position:absolute;right:50px;top:30px;z-index:99;cursor:pointer;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIzLjk3IDdsMS40MTUgMS40MTQtNy43NzkgNy43NzggNy43NzkgNy43NzktMS40MTQgMS40MTQtNy43NzktNy43NzktNy43NzggNy43NzlMNyAyMy45N2w3Ljc3OC03Ljc3OUw3IDguNDE0IDguNDE0IDdsNy43NzggNy43NzhMMjMuOTcxIDd6IiBmaWxsPSIjM0Q0NzU3IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=) no-repeat;background-size:100% 100%;transition:all .3s;border-radius:50%}.ce-image-previewer .image-close:hover{background-color:#e2e6ed}.ce-image-previewer .ce-image-container{position:relative}.ce-image-previewer .ce-image-container img{cursor:move;position:relative}.ce-image-previewer .ce-image-menu{height:50px;position:absolute;bottom:50px;z-index:99;display:flex;align-items:center;justify-content:center}.ce-image-previewer .ce-image-menu i{width:32px;height:32px;margin:0 8px;cursor:pointer;display:inline-block;background-repeat:no-repeat;background-size:100% 100%;transition:all .3s;border-radius:50%}.ce-image-previewer .ce-image-menu i:hover{background-color:#e2e6ed}.ce-image-previewer .ce-image-menu i.zoom-in{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE0IDE0di00aDJ2NGg0djJoLTR2NGgtMnYtNGgtNHYtMmg0em04Ljc0OSAxMC4xNjNBMTEuOTUyIDExLjk1MiAwIDAxMTUgMjdDOC4zNzMgMjcgMyAyMS42MjcgMyAxNVM4LjM3MyAzIDE1IDNzMTIgNS4zNzMgMTIgMTJjMCAyLjk1NC0xLjA2NyA1LjY1OC0yLjgzNyA3Ljc0OWw0LjkwOCA0LjkwOC0xLjQxNCAxLjQxNC00LjkwOC00LjkwOHpNMTUgMjVjNS41MjMgMCAxMC00LjQ3NyAxMC0xMFMyMC41MjMgNSAxNSA1IDUgOS40NzcgNSAxNXM0LjQ3NyAxMCAxMCAxMHoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-image-previewer .ce-image-menu i.zoom-out{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIyLjc0OSAyNC4xNjNBMTEuOTUyIDExLjk1MiAwIDAxMTUgMjdDOC4zNzMgMjcgMyAyMS42MjcgMyAxNVM4LjM3MyAzIDE1IDNzMTIgNS4zNzMgMTIgMTJjMCAyLjk1NC0xLjA2NyA1LjY1OC0yLjgzNyA3Ljc0OWw0LjkwOCA0LjkwOC0xLjQxNCAxLjQxNC00LjkwOC00LjkwOHpNMTUgMjVjNS41MjMgMCAxMC00LjQ3NyAxMC0xMFMyMC41MjMgNSAxNSA1IDUgOS40NzcgNSAxNXM0LjQ3NyAxMCAxMCAxMHptLTUtMTFoMTB2MkgxMHYtMnoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-image-previewer .ce-image-menu i.rotate{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTYgNGM2LjYyNyAwIDEyIDUuMzczIDEyIDEyYTExLjk3IDExLjk3IDAgMDEtNCA4Ljk0NFYyM2gtLjg2QTkuOTY4IDkuOTY4IDAgMDAyNiAxNmMwLTUuNTIzLTQuNDc3LTEwLTEwLTEwUzYgMTAuNDc3IDYgMTZjMCA1LjE4NSAzLjk0NyA5LjQ0OSA5IDkuOTV2Mi4wMDlDOC44NCAyNy40NTEgNCAyMi4yOTEgNCAxNiA0IDkuMzczIDkuMzczIDQgMTYgNHoiIGZpbGwtcnVsZT0ibm9uemVybyIvPjxwYXRoIGQ9Ik0xOS44NzkgMjcuMzI4bDEuNzY3LTYuNzE3IDQuOTUgNC45NXoiLz48L2c+PC9zdmc+)}.ce-image-previewer .ce-image-menu i.original-size{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQgNGgyNHYyNEg0VjR6bTIgMnYyMGgyMFY2SDZ6bTQgNWgydjEwaC0yVjExem01IDJoMnYyaC0ydi0yem0wIDRoMnYyaC0ydi0yem01LTZoMnYxMGgtMlYxMXoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-image-previewer .ce-image-menu i.image-download{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQuNSAxNXYzLjVoMTVWMTVIMjF2NUgzdi01aDEuNXptOC4yMzItMTEuMjI2djkuMTk2bDQuMDUtNC4wNSAxLjA2IDEuMDYtNS44MzQgNS44MzQtNS44MzMtNS44MzMgMS4wNi0xLjA2IDMuOTk4IDMuOTk2VjMuNzc0aDEuNXoiIGZpbGw9IiMzRDQ3NTciLz48L3N2Zz4=)}.ce-contextmenu-container{z-index:9;position:fixed;display:none;padding:4px;overflow-x:hidden;overflow-y:auto;background:#fff;box-shadow:0 2px 12px #38383833;border:1px solid #e2e6ed;border-radius:2px}.ce-contextmenu-content{display:flex;flex-direction:column}.ce-contextmenu-content .ce-contextmenu-sub-item:after{position:absolute;content:"";width:16px;height:16px;right:12px;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMCAwaDE2djE2SDB6Ii8+PGcgZmlsbD0iIzc2N0M4NSI+PHBhdGggZD0iTTcgMTIuMjQzbC0uNzA3LS43MDcgNC4yNDMtNC4yNDMuNzA3LjcwN3oiLz48cGF0aCBkPSJNNi4yOTMgNC40NjRMNyAzLjc1NyAxMS4yNDMgOGwtLjcwNy43MDd6Ii8+PC9nPjwvZz48L3N2Zz4=)}.ce-contextmenu-content .ce-contextmenu-item{min-width:140px;padding:0 32px 0 16px;height:30px;display:flex;align-items:center;white-space:nowrap;box-sizing:border-box;cursor:pointer}.ce-contextmenu-content .ce-contextmenu-item.hover{background:rgba(25,55,88,.04)}.ce-contextmenu-content .ce-contextmenu-item span{max-width:300px;font-size:12px;color:#3d4757;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ce-contextmenu-content .ce-contextmenu-item span.ce-shortcut{color:#767c85;height:30px;flex:1;text-align:right;line-height:30px;margin-left:20px}.ce-contextmenu-content .ce-contextmenu-item i{width:16px;height:16px;vertical-align:middle;display:inline-block;background-repeat:no-repeat;background-size:100% 100%;flex-shrink:0;margin-right:8px}.ce-contextmenu-divider{background-color:#e2e6ed;margin:4px 16px;height:1px}.ce-contextmenu-print{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjM0Q0NzU3IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0xMiA0aC0xVjJINXYySDRWMmExIDEgMCAwMTEtMWg2YTEgMSAwIDAxMSAxdjJ6bTAgNXY0YTEgMSAwIDAxLTEgMUg1YTEgMSAwIDAxLTEtMVY5aDF2NGg2VjloMXoiLz48cGF0aCBkPSJNMTIgMTJ2LTFoMlY1SDJ2NmgydjFIMmExIDEgMCAwMS0xLTFWNWExIDEgMCAwMTEtMWgxMmExIDEgMCAwMTEgMXY2YTEgMSAwIDAxLTEgMWgtMnoiLz48cGF0aCBkPSJNMyA4aDEwdjFIM3ptOC0yaDJ2MWgtMnoiLz48L2c+PC9zdmc+)}.ce-contextmenu-image{background-image:url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSLlm77lsYJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4PSIwIiB5PSIwIiB2aWV3Qm94PSIwIDAgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxzdHlsZT4uc3Qwe2ZpbGw6IzNkNDc1N308L3N0eWxlPjxnIGlkPSJfeDMwXzAt5YWs5YWxX3gyRl8wMuW3peWFt+agj194MkZf5o+S5YWl5Zu+54mHLTE2cHgtIj48ZyBpZD0iR3JvdXAtMTkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMSkiPjxwYXRoIGlkPSJDb21iaW5lZC1TaGFwZSIgY2xhc3M9InN0MCIgZD0iTTEgMGgxMmMuNiAwIDEgLjQgMSAxdjExYzAgLjYtLjQgMS0xIDFIMWMtLjYgMC0xLS40LTEtMVYxYzAtLjYuNC0xIDEtMXptMCAxdjExaDEyVjFIMXoiLz48Y2lyY2xlIGlkPSLmpK3lnIblvaIiIGNsYXNzPSJzdDAiIGN4PSIxMCIgY3k9IjQiIHI9IjEiLz48cGF0aCBpZD0iUGF0aCIgY2xhc3M9InN0MCIgZD0iTTguNSAxMS4ybC00LTQuMUwxIDEwLjdWOS4yYzEuNy0xLjYgMi43LTIuNSAzLTIuOC40LS41LjctLjQgMSAwTDguNSAxMCAxMSA3LjNjLjQtLjUuNi0uNSAxLS4xbDIgMi44djEuNWwtMi41LTMuNC0zIDMuMXoiLz48L2c+PC9nPjwvc3ZnPg==)}.ce-contextmenu-image-change{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyIDQpIiBmaWxsPSIjM0Q0NzU3Ij48Y2lyY2xlIGZpbGwtcnVsZT0ibm9uemVybyIgY3g9IjMiIGN5PSIxIiByPSIxIi8+PHBhdGggZD0iTTcuNDczIDguMjIzTDMuNDcgNC4xMDcgMCA3LjY2N3YtMS41QzEuNzE1IDQuNiAyLjcwNyAzLjY2NCAyLjk3NSAzLjM1OGMuNDAyLS40NTcuNjUxLS4zOSAxLjA0MiAwTDcuNDczIDcgOS45NiA0LjM0OWMuNDE0LS40NjIuNjItLjQ2MiAxLjAxMS0uMDcxTDEzIDcuMDZ2MS41bC0yLjUxLTMuNDEtMy4wMTcgMy4wNzJ6Ii8+PC9nPjxwYXRoIGQ9Ik02IDEuNUgxLjV2MTJoMTN2LTRWMTNhLjUuNSAwIDAxLS41LjVIMmEuNS41IDAgMDEtLjUtLjVWMmEuNS41IDAgMDEuNS0uNWg0em04LjUgOFY2bC0uNS41aDFsLS41LS41djMuNXpNNiAxLjVoNEw5LjUgMXYxbC41LS41SDZ6IiBzdHJva2U9IiMzRDQ3NTciLz48cGF0aCBkPSJNMTMuMDg1IDEuMzE2bC0zLjgxNCA0YTEgMSAwIDAwMS40NTggMS4zNjhsMy44MTUtNGExIDEgMCAxMC0xLjQ1OS0xLjM2OHoiIGZpbGw9IiMzRDQ3NTciIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-insert-row-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiMzRDQ3NTciIGQ9Ik04LjUgNS41aDZ2NGgtNnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNNCA3djFoMlY3em0tMyAuNUw0IDV2NXpNMSAxaDEydjFIMXptMCAxMmgxMnYxSDF6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-insert-top-row{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNOCA1SDd2M2gxem0tLjUtM0wxMCA1SDV6Ii8+PHJlY3Qgc3Ryb2tlPSIjM0Q0NzU3IiB4PSIxLjUiIHk9IjEwLjUiIHdpZHRoPSIxMiIgaGVpZ2h0PSIzIiByeD0iMSIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-insert-bottom-row{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNNyAxMWgxVjhIN3ptLjUgM0w1IDExaDV6Ii8+PHJlY3Qgc3Ryb2tlPSIjM0Q0NzU3IiB4PSIxLjUiIHk9IjIuNSIgd2lkdGg9IjEyIiBoZWlnaHQ9IjMiIHJ4PSIxIi8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-insert-left-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMTEgN3YxaDNWN3ptLTMgLjVMMTEgNXY1eiIvPjxyZWN0IHN0cm9rZT0iIzNENDc1NyIgdHJhbnNmb3JtPSJyb3RhdGUoOTAgNCA3LjUpIiB4PSItMiIgeT0iNiIgd2lkdGg9IjEyIiBoZWlnaHQ9IjMiIHJ4PSIxIi8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-insert-right-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNNSA4VjdIMnYxem0zLS41TDUgMTBWNXoiLz48cmVjdCBzdHJva2U9IiMzRDQ3NTciIHRyYW5zZm9ybT0icm90YXRlKDkwIDEyIDcuNSkiIHg9IjYiIHk9IjYiIHdpZHRoPSIxMiIgaGVpZ2h0PSIzIiByeD0iMSIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-delete-row-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiM5MjlBQTgiIGQ9Ik04LjUgNi41aDZ2MmgtNnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMiAxMmgxMXYxSDJ6TTIgMmgxMXYxSDJ6bS42MyAzTDcgOS4zNWwtLjYzNS42NUwyIDUuNjN6Ii8+PHBhdGggZmlsbD0iIzNENDc1NyIgZD0iTTIgOS4zNjNMNi4zNTUgNSA3IDUuNzA3IDIuNjk1IDEweiIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-delete-row{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiM5MjlBQTgiIGQ9Ik04LjUgNS41aDZ2NGgtNnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMSAxM2gxMnYxSDF6TTEgMWgxMnYxSDF6bTAgNGgxdjFIMXptMSAxaDF2MUgyem0xIDFoMXYxSDN6bTEtMWgxdjFINHptMS0xaDF2MUg1ek00IDhoMXYxSDR6TTIgOGgxdjFIMnptMyAxaDF2MUg1ek0xIDloMXYxSDF6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-delete-col{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBzdHJva2U9IiM5MjlBQTgiIGQ9Ik01LjUgNy41di02aDR2NnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNMTMgMTVWM2gxdjEyek0xIDE1VjNoMXYxMnptNCAwdi0xaDF2MXptMS0xdi0xaDF2MXptMS0xdi0xaDF2MXptLTEtMXYtMWgxdjF6bS0xLTF2LTFoMXYxem0zIDF2LTFoMXYxem0wIDJ2LTFoMXYxem0xLTN2LTFoMXYxem0wIDR2LTFoMXYxeiIvPjwvZz48L3N2Zz4=)}.ce-contextmenu-delete-table{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQgMTNoLTF2LTNIMnYzSDF2LTNhMSAxIDAgMDExLTFoMTFhMSAxIDAgMDExIDF2M3oiIGZpbGwtcnVsZT0ibm9uemVybyIvPjxwYXRoIGQ9Ik01LjYyNSAyTDEwIDYuMzc1IDkuMzc1IDcgNSAyLjYyNXoiLz48cGF0aCBkPSJNNSA2LjM3NUw5LjM3NSAybC42MjUuNjI1TDUuNjI1IDd6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-merge-cell{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNiAxdjFIMnYxMWg0djFIMmExIDEgMCAwMS0xLTFWMmExIDEgMCAwMTEtMWg0em0zIDBoNGExIDEgMCAwMTEgMXYxMWExIDEgMCAwMS0xIDFIOXYtMWg0VjJIOVYxeiIvPjxwYXRoIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTYgMWgxdjRINnptMiAwaDF2NEg4eiIvPjxwYXRoIGQ9Ik04IDcuNUwxMCA2djN6bS0xIDBMNSA2djN6Ii8+PHBhdGggZD0iTTkgN2gzdjFIOXpNMyA3aDN2MUgzeiIvPjxwYXRoIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTggMTBoMXY0SDh6bS0yIDBoMXY0SDZ6Ii8+PC9nPjwvc3ZnPg==)}.ce-contextmenu-merge-cancel-cell{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzNENDc1NyIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNiAxdjFIMnYxMWg0djFIMmExIDEgMCAwMS0xLTFWMmExIDEgMCAwMTEtMWg0em0zIDBoNGExIDEgMCAwMTEgMXYxMWExIDEgMCAwMS0xIDFIOXYtMWg0VjJIOVYxeiIvPjxwYXRoIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTYgMWgxdjRINnptMiAwaDF2NEg4eiIvPjxwYXRoIGQ9Ik0zIDcuNUw1IDZ2M3ptOSAwTDEwIDZ2M3oiLz48cGF0aCBkPSJNNCA3aDN2MUg0em00IDBoM3YxSDh6Ii8+PHBhdGggZmlsbC1ydWxlPSJub256ZXJvIiBkPSJNOCAxMGgxdjRIOHptLTIgMGgxdjRINnoiLz48L2c+PC9zdmc+)}.ce-hyperlink-popup{min-width:100px;font-size:12px;line-height:20px;background:#fff;box-shadow:0 2px 12px #626b8433;border-radius:2px;color:#3d4757;padding:16px;white-space:nowrap;position:absolute;z-index:1;text-align:center;display:none}.ce-hyperlink-popup a{cursor:pointer;text-decoration:none;border-bottom-width:1px;border-bottom-style:solid;padding-bottom:2px;color:#00f}.ce-inputarea{width:0;height:12px;min-width:0;min-height:0;margin:0;padding:0;left:0;right:0;letter-spacing:0;font-size:12px;position:absolute;outline:none;resize:none;border:none;overflow:hidden;color:transparent;user-select:none;background-color:transparent}.ce-cursor{width:1px;height:20px;left:0;right:0;position:absolute;outline:none;background-color:#000;pointer-events:none}.ce-cursor.ce-cursor--animation{animation-duration:1s;animation-iteration-count:infinite;animation-name:cursorAnimation}@keyframes cursorAnimation{0%{opacity:1}13%{opacity:0}50%{opacity:0}63%{opacity:1}to{opacity:1}}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();})();
|
|
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.10";
|
|
27
27
|
const ZERO = "\u200B";
|
|
28
28
|
const WRAP = "\n";
|
|
29
29
|
var RowFlex;
|
|
@@ -110,6 +110,8 @@ function nClickEvent(n, dom, fn) {
|
|
|
110
110
|
dom.addEventListener("click", handler);
|
|
111
111
|
}
|
|
112
112
|
const CURSOR_AGENT_HEIGHT = 12;
|
|
113
|
+
const EDITOR_COMPONENT = "editor-component";
|
|
114
|
+
const EDITOR_PREFIX = "ce";
|
|
113
115
|
var ElementType;
|
|
114
116
|
(function(ElementType2) {
|
|
115
117
|
ElementType2["TEXT"] = "text";
|
|
@@ -3719,7 +3721,7 @@ class CursorAgent {
|
|
|
3719
3721
|
this.canvasEvent = canvasEvent;
|
|
3720
3722
|
const agentCursorDom = document.createElement("textarea");
|
|
3721
3723
|
agentCursorDom.autocomplete = "off";
|
|
3722
|
-
agentCursorDom.classList.add(
|
|
3724
|
+
agentCursorDom.classList.add(`${EDITOR_PREFIX}-inputarea`);
|
|
3723
3725
|
agentCursorDom.innerText = "";
|
|
3724
3726
|
this.container.append(agentCursorDom);
|
|
3725
3727
|
this.agentCursorDom = agentCursorDom;
|
|
@@ -3811,7 +3813,7 @@ class Cursor {
|
|
|
3811
3813
|
this.position = draw.getPosition();
|
|
3812
3814
|
this.options = draw.getOptions();
|
|
3813
3815
|
this.cursorDom = document.createElement("div");
|
|
3814
|
-
this.cursorDom.classList.add(
|
|
3816
|
+
this.cursorDom.classList.add(`${EDITOR_PREFIX}-cursor`);
|
|
3815
3817
|
this.container.append(this.cursorDom);
|
|
3816
3818
|
this.cursorAgent = new CursorAgent(draw, canvasEvent);
|
|
3817
3819
|
}
|
|
@@ -3848,12 +3850,12 @@ class Cursor {
|
|
|
3848
3850
|
this.cursorDom.style.display = isReadonly ? "none" : "block";
|
|
3849
3851
|
this.cursorDom.style.height = `${cursorHeight}px`;
|
|
3850
3852
|
setTimeout(() => {
|
|
3851
|
-
this.cursorDom.classList.add(
|
|
3853
|
+
this.cursorDom.classList.add(`${EDITOR_PREFIX}-cursor--animation`);
|
|
3852
3854
|
}, 200);
|
|
3853
3855
|
}
|
|
3854
3856
|
recoveryCursor() {
|
|
3855
3857
|
this.cursorDom.style.display = "none";
|
|
3856
|
-
this.cursorDom.classList.remove(
|
|
3858
|
+
this.cursorDom.classList.remove(`${EDITOR_PREFIX}-cursor--animation`);
|
|
3857
3859
|
}
|
|
3858
3860
|
}
|
|
3859
3861
|
var MouseEventButton;
|
|
@@ -4613,7 +4615,6 @@ class CanvasEvent {
|
|
|
4613
4615
|
this.isCompositing = false;
|
|
4614
4616
|
}
|
|
4615
4617
|
}
|
|
4616
|
-
const EDITOR_COMPONENT = "editor-component";
|
|
4617
4618
|
class GlobalEvent {
|
|
4618
4619
|
constructor(draw, canvasEvent) {
|
|
4619
4620
|
__publicField(this, "draw");
|
|
@@ -4626,6 +4627,59 @@ class GlobalEvent {
|
|
|
4626
4627
|
__publicField(this, "tableTool");
|
|
4627
4628
|
__publicField(this, "hyperlinkParticle");
|
|
4628
4629
|
__publicField(this, "control");
|
|
4630
|
+
__publicField(this, "dateParticle");
|
|
4631
|
+
__publicField(this, "recoverEffect", (evt) => {
|
|
4632
|
+
if (!this.cursor)
|
|
4633
|
+
return;
|
|
4634
|
+
const cursorDom = this.cursor.getCursorDom();
|
|
4635
|
+
const agentDom = this.cursor.getAgentDom();
|
|
4636
|
+
const innerDoms = [this.canvas, cursorDom, agentDom, document.body];
|
|
4637
|
+
if (innerDoms.includes(evt.target)) {
|
|
4638
|
+
this.setRangeStyle();
|
|
4639
|
+
return;
|
|
4640
|
+
}
|
|
4641
|
+
const outerEditorDom = findParent(evt.target, (node) => !!node && node.nodeType === 1 && !!node.getAttribute(EDITOR_COMPONENT), true);
|
|
4642
|
+
if (outerEditorDom) {
|
|
4643
|
+
this.setRangeStyle();
|
|
4644
|
+
return;
|
|
4645
|
+
}
|
|
4646
|
+
this.cursor.recoveryCursor();
|
|
4647
|
+
this.range.recoveryRangeStyle();
|
|
4648
|
+
this.previewer.clearResizer();
|
|
4649
|
+
this.tableTool.dispose();
|
|
4650
|
+
this.hyperlinkParticle.clearHyperlinkPopup();
|
|
4651
|
+
this.control.destroyControl();
|
|
4652
|
+
this.dateParticle.clearDatePicker();
|
|
4653
|
+
});
|
|
4654
|
+
__publicField(this, "setDragState", () => {
|
|
4655
|
+
this.canvasEvent.setIsAllowDrag(false);
|
|
4656
|
+
});
|
|
4657
|
+
__publicField(this, "setRangeStyle", () => {
|
|
4658
|
+
this.range.setRangeStyle();
|
|
4659
|
+
});
|
|
4660
|
+
__publicField(this, "setPageScale", (evt) => {
|
|
4661
|
+
if (!evt.ctrlKey)
|
|
4662
|
+
return;
|
|
4663
|
+
evt.preventDefault();
|
|
4664
|
+
const { scale } = this.options;
|
|
4665
|
+
if (evt.deltaY < 0) {
|
|
4666
|
+
const nextScale = scale * 10 + 1;
|
|
4667
|
+
if (nextScale <= 30) {
|
|
4668
|
+
this.draw.setPageScale(nextScale / 10);
|
|
4669
|
+
}
|
|
4670
|
+
} else {
|
|
4671
|
+
const nextScale = scale * 10 - 1;
|
|
4672
|
+
if (nextScale >= 5) {
|
|
4673
|
+
this.draw.setPageScale(nextScale / 10);
|
|
4674
|
+
}
|
|
4675
|
+
}
|
|
4676
|
+
});
|
|
4677
|
+
__publicField(this, "_handleVisibilityChange", () => {
|
|
4678
|
+
var _a;
|
|
4679
|
+
if (document.visibilityState) {
|
|
4680
|
+
(_a = this.cursor) == null ? void 0 : _a.drawCursor();
|
|
4681
|
+
}
|
|
4682
|
+
});
|
|
4629
4683
|
this.draw = draw;
|
|
4630
4684
|
this.canvas = draw.getPage();
|
|
4631
4685
|
this.options = draw.getOptions();
|
|
@@ -4635,68 +4689,28 @@ class GlobalEvent {
|
|
|
4635
4689
|
this.previewer = draw.getPreviewer();
|
|
4636
4690
|
this.tableTool = draw.getTableTool();
|
|
4637
4691
|
this.hyperlinkParticle = draw.getHyperlinkParticle();
|
|
4692
|
+
this.dateParticle = draw.getDateParticle();
|
|
4638
4693
|
this.control = draw.getControl();
|
|
4639
4694
|
}
|
|
4640
4695
|
register() {
|
|
4641
4696
|
this.cursor = this.draw.getCursor();
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
document.addEventListener("mouseup",
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
const agentDom = this.cursor.getAgentDom();
|
|
4660
|
-
const innerDoms = [this.canvas, cursorDom, agentDom, document.body];
|
|
4661
|
-
if (innerDoms.includes(evt.target)) {
|
|
4662
|
-
this.setRangeStyle();
|
|
4663
|
-
return;
|
|
4664
|
-
}
|
|
4665
|
-
const outerEditorDom = findParent(evt.target, (node) => !!node && node.nodeType === 1 && !!node.getAttribute(EDITOR_COMPONENT), true);
|
|
4666
|
-
if (outerEditorDom) {
|
|
4667
|
-
this.setRangeStyle();
|
|
4668
|
-
return;
|
|
4669
|
-
}
|
|
4670
|
-
this.cursor.recoveryCursor();
|
|
4671
|
-
this.range.recoveryRangeStyle();
|
|
4672
|
-
this.range.setRange(-1, -1);
|
|
4673
|
-
this.previewer.clearResizer();
|
|
4674
|
-
this.tableTool.dispose();
|
|
4675
|
-
this.hyperlinkParticle.clearHyperlinkPopup();
|
|
4676
|
-
this.control.destroyControl();
|
|
4677
|
-
}
|
|
4678
|
-
setDragState() {
|
|
4679
|
-
this.canvasEvent.setIsAllowDrag(false);
|
|
4680
|
-
}
|
|
4681
|
-
setRangeStyle() {
|
|
4682
|
-
this.range.setRangeStyle();
|
|
4683
|
-
}
|
|
4684
|
-
setPageScale(evt) {
|
|
4685
|
-
if (!evt.ctrlKey)
|
|
4686
|
-
return;
|
|
4687
|
-
evt.preventDefault();
|
|
4688
|
-
const { scale } = this.options;
|
|
4689
|
-
if (evt.deltaY < 0) {
|
|
4690
|
-
const nextScale = scale * 10 + 1;
|
|
4691
|
-
if (nextScale <= 30) {
|
|
4692
|
-
this.draw.setPageScale(nextScale / 10);
|
|
4693
|
-
}
|
|
4694
|
-
} else {
|
|
4695
|
-
const nextScale = scale * 10 - 1;
|
|
4696
|
-
if (nextScale >= 5) {
|
|
4697
|
-
this.draw.setPageScale(nextScale / 10);
|
|
4698
|
-
}
|
|
4699
|
-
}
|
|
4697
|
+
this.addEvent();
|
|
4698
|
+
}
|
|
4699
|
+
addEvent() {
|
|
4700
|
+
window.addEventListener("blur", this.recoverEffect);
|
|
4701
|
+
document.addEventListener("keyup", this.setRangeStyle);
|
|
4702
|
+
document.addEventListener("click", this.recoverEffect);
|
|
4703
|
+
document.addEventListener("mouseup", this.setDragState);
|
|
4704
|
+
document.addEventListener("wheel", this.setPageScale, { passive: false });
|
|
4705
|
+
document.addEventListener("visibilitychange", this._handleVisibilityChange);
|
|
4706
|
+
}
|
|
4707
|
+
removeEvent() {
|
|
4708
|
+
window.removeEventListener("blur", this.recoverEffect);
|
|
4709
|
+
document.removeEventListener("keyup", this.setRangeStyle);
|
|
4710
|
+
document.removeEventListener("click", this.recoverEffect);
|
|
4711
|
+
document.removeEventListener("mouseup", this.setDragState);
|
|
4712
|
+
document.removeEventListener("wheel", this.setPageScale);
|
|
4713
|
+
document.removeEventListener("visibilitychange", this._handleVisibilityChange);
|
|
4700
4714
|
}
|
|
4701
4715
|
}
|
|
4702
4716
|
class HistoryManager {
|
|
@@ -5611,6 +5625,38 @@ class ScrollObserver {
|
|
|
5611
5625
|
__publicField(this, "options");
|
|
5612
5626
|
__publicField(this, "pageContainer");
|
|
5613
5627
|
__publicField(this, "pageHeight");
|
|
5628
|
+
__publicField(this, "_observer", debounce(() => {
|
|
5629
|
+
const rect = this.pageContainer.getBoundingClientRect();
|
|
5630
|
+
const top = Math.abs(rect.top);
|
|
5631
|
+
const bottom = top + window.innerHeight;
|
|
5632
|
+
const pageList = this.draw.getPageList();
|
|
5633
|
+
const visiblePageNoList = [];
|
|
5634
|
+
let intersectionPageNo = 0;
|
|
5635
|
+
let intersectionMaxHeight = 0;
|
|
5636
|
+
for (let i = 0; i < pageList.length; i++) {
|
|
5637
|
+
const curTop = i * this.pageHeight;
|
|
5638
|
+
const curBottom = (i + 1) * this.pageHeight;
|
|
5639
|
+
if (curTop > bottom)
|
|
5640
|
+
break;
|
|
5641
|
+
if (curBottom < top)
|
|
5642
|
+
continue;
|
|
5643
|
+
let intersectionHeight = 0;
|
|
5644
|
+
if (curTop < top && curBottom < bottom) {
|
|
5645
|
+
intersectionHeight = curBottom - top;
|
|
5646
|
+
} else if (curTop > top && curBottom > bottom) {
|
|
5647
|
+
intersectionHeight = bottom - curTop;
|
|
5648
|
+
} else {
|
|
5649
|
+
intersectionHeight = rect.height;
|
|
5650
|
+
}
|
|
5651
|
+
if (intersectionHeight > intersectionMaxHeight) {
|
|
5652
|
+
intersectionMaxHeight = intersectionHeight;
|
|
5653
|
+
intersectionPageNo = i;
|
|
5654
|
+
}
|
|
5655
|
+
visiblePageNoList.push(i);
|
|
5656
|
+
}
|
|
5657
|
+
this.draw.setIntersectionPageNo(intersectionPageNo);
|
|
5658
|
+
this.draw.setVisiblePageNoList(visiblePageNoList);
|
|
5659
|
+
}, 150));
|
|
5614
5660
|
this.draw = draw;
|
|
5615
5661
|
this.options = draw.getOptions();
|
|
5616
5662
|
this.pageContainer = draw.getPageContainer();
|
|
@@ -5621,39 +5667,13 @@ class ScrollObserver {
|
|
|
5621
5667
|
this._observer();
|
|
5622
5668
|
}
|
|
5623
5669
|
});
|
|
5624
|
-
|
|
5625
|
-
}
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
const visiblePageNoList = [];
|
|
5632
|
-
let intersectionPageNo = 0;
|
|
5633
|
-
let intersectionMaxHeight = 0;
|
|
5634
|
-
for (let i = 0; i < pageList.length; i++) {
|
|
5635
|
-
const curTop = i * this.pageHeight;
|
|
5636
|
-
const curBottom = (i + 1) * this.pageHeight;
|
|
5637
|
-
if (curTop > bottom)
|
|
5638
|
-
break;
|
|
5639
|
-
if (curBottom < top)
|
|
5640
|
-
continue;
|
|
5641
|
-
let intersectionHeight = 0;
|
|
5642
|
-
if (curTop < top && curBottom < bottom) {
|
|
5643
|
-
intersectionHeight = curBottom - top;
|
|
5644
|
-
} else if (curTop > top && curBottom > bottom) {
|
|
5645
|
-
intersectionHeight = bottom - curTop;
|
|
5646
|
-
} else {
|
|
5647
|
-
intersectionHeight = rect.height;
|
|
5648
|
-
}
|
|
5649
|
-
if (intersectionHeight > intersectionMaxHeight) {
|
|
5650
|
-
intersectionMaxHeight = intersectionHeight;
|
|
5651
|
-
intersectionPageNo = i;
|
|
5652
|
-
}
|
|
5653
|
-
visiblePageNoList.push(i);
|
|
5654
|
-
}
|
|
5655
|
-
this.draw.setIntersectionPageNo(intersectionPageNo);
|
|
5656
|
-
this.draw.setVisiblePageNoList(visiblePageNoList);
|
|
5670
|
+
this._addEvent();
|
|
5671
|
+
}
|
|
5672
|
+
_addEvent() {
|
|
5673
|
+
document.addEventListener("scroll", this._observer);
|
|
5674
|
+
}
|
|
5675
|
+
removeEvent() {
|
|
5676
|
+
document.removeEventListener("scroll", this._observer);
|
|
5657
5677
|
}
|
|
5658
5678
|
}
|
|
5659
5679
|
var MoveDirection;
|
|
@@ -5672,6 +5692,29 @@ class SelectionObserver {
|
|
|
5672
5692
|
__publicField(this, "isMoving");
|
|
5673
5693
|
__publicField(this, "clientWidth");
|
|
5674
5694
|
__publicField(this, "clientHeight");
|
|
5695
|
+
__publicField(this, "_mousedown", () => {
|
|
5696
|
+
this.isMousedown = true;
|
|
5697
|
+
});
|
|
5698
|
+
__publicField(this, "_mouseup", () => {
|
|
5699
|
+
this.isMousedown = false;
|
|
5700
|
+
this._stopMove();
|
|
5701
|
+
});
|
|
5702
|
+
__publicField(this, "_mousemove", (evt) => {
|
|
5703
|
+
if (!this.isMousedown)
|
|
5704
|
+
return;
|
|
5705
|
+
const { x, y } = evt;
|
|
5706
|
+
if (y < this.tippingPoints[0]) {
|
|
5707
|
+
this._startMove(MoveDirection.UP);
|
|
5708
|
+
} else if (this.clientHeight - y <= this.tippingPoints[1]) {
|
|
5709
|
+
this._startMove(MoveDirection.DOWN);
|
|
5710
|
+
} else if (x < this.tippingPoints[2]) {
|
|
5711
|
+
this._startMove(MoveDirection.LEFT);
|
|
5712
|
+
} else if (this.clientWidth - x < this.tippingPoints[3]) {
|
|
5713
|
+
this._startMove(MoveDirection.RIGHT);
|
|
5714
|
+
} else {
|
|
5715
|
+
this._stopMove();
|
|
5716
|
+
}
|
|
5717
|
+
});
|
|
5675
5718
|
this.threshold = 10;
|
|
5676
5719
|
this.tippingPoints = [70, 40, 10, 20];
|
|
5677
5720
|
this.requestAnimationFrameId = -1;
|
|
@@ -5679,32 +5722,17 @@ class SelectionObserver {
|
|
|
5679
5722
|
this.isMoving = false;
|
|
5680
5723
|
this.clientWidth = 0;
|
|
5681
5724
|
this.clientHeight = 0;
|
|
5682
|
-
|
|
5683
|
-
document.addEventListener("mousemove", this._mousemove.bind(this));
|
|
5684
|
-
document.addEventListener("mouseup", this._mouseup.bind(this));
|
|
5725
|
+
this._addEvent();
|
|
5685
5726
|
}
|
|
5686
|
-
|
|
5687
|
-
this.
|
|
5727
|
+
_addEvent() {
|
|
5728
|
+
document.addEventListener("mousedown", this._mousedown);
|
|
5729
|
+
document.addEventListener("mousemove", this._mousemove);
|
|
5730
|
+
document.addEventListener("mouseup", this._mouseup);
|
|
5688
5731
|
}
|
|
5689
|
-
|
|
5690
|
-
this.
|
|
5691
|
-
this.
|
|
5692
|
-
|
|
5693
|
-
_mousemove(evt) {
|
|
5694
|
-
if (!this.isMousedown)
|
|
5695
|
-
return;
|
|
5696
|
-
const { x, y } = evt;
|
|
5697
|
-
if (y < this.tippingPoints[0]) {
|
|
5698
|
-
this._startMove(MoveDirection.UP);
|
|
5699
|
-
} else if (this.clientHeight - y <= this.tippingPoints[1]) {
|
|
5700
|
-
this._startMove(MoveDirection.DOWN);
|
|
5701
|
-
} else if (x < this.tippingPoints[2]) {
|
|
5702
|
-
this._startMove(MoveDirection.LEFT);
|
|
5703
|
-
} else if (this.clientWidth - x < this.tippingPoints[3]) {
|
|
5704
|
-
this._startMove(MoveDirection.RIGHT);
|
|
5705
|
-
} else {
|
|
5706
|
-
this._stopMove();
|
|
5707
|
-
}
|
|
5732
|
+
removeEvent() {
|
|
5733
|
+
document.removeEventListener("mousedown", this._mousedown);
|
|
5734
|
+
document.removeEventListener("mousemove", this._mousemove);
|
|
5735
|
+
document.removeEventListener("mouseup", this._mouseup);
|
|
5708
5736
|
}
|
|
5709
5737
|
_move(direction) {
|
|
5710
5738
|
const x = window.screenX;
|
|
@@ -5951,17 +5979,17 @@ class TableTool {
|
|
|
5951
5979
|
const rowList = trList.map((tr) => tr.height);
|
|
5952
5980
|
const colList = colgroup.map((col) => col.width);
|
|
5953
5981
|
const rowContainer = document.createElement("div");
|
|
5954
|
-
rowContainer.classList.add(
|
|
5982
|
+
rowContainer.classList.add(`${EDITOR_PREFIX}-table-tool__row`);
|
|
5955
5983
|
rowContainer.style.transform = `translateX(-${this.translate * scale}px)`;
|
|
5956
5984
|
for (let r = 0; r < rowList.length; r++) {
|
|
5957
5985
|
const rowHeight = rowList[r] * scale;
|
|
5958
5986
|
const rowItem = document.createElement("div");
|
|
5959
|
-
rowItem.classList.add(
|
|
5987
|
+
rowItem.classList.add(`${EDITOR_PREFIX}-table-tool__row__item`);
|
|
5960
5988
|
if (r === rowIndex) {
|
|
5961
5989
|
rowItem.classList.add("active");
|
|
5962
5990
|
}
|
|
5963
5991
|
const rowItemAnchor = document.createElement("div");
|
|
5964
|
-
rowItemAnchor.classList.add(
|
|
5992
|
+
rowItemAnchor.classList.add(`${EDITOR_PREFIX}-table-tool__anchor`);
|
|
5965
5993
|
rowItemAnchor.onmousedown = (evt) => {
|
|
5966
5994
|
this._mousedown({
|
|
5967
5995
|
evt,
|
|
@@ -5980,17 +6008,17 @@ class TableTool {
|
|
|
5980
6008
|
this.container.append(rowContainer);
|
|
5981
6009
|
this.toolRowContainer = rowContainer;
|
|
5982
6010
|
const colContainer = document.createElement("div");
|
|
5983
|
-
colContainer.classList.add(
|
|
6011
|
+
colContainer.classList.add(`${EDITOR_PREFIX}-table-tool__col`);
|
|
5984
6012
|
colContainer.style.transform = `translateY(-${this.translate * scale}px)`;
|
|
5985
6013
|
for (let c = 0; c < colList.length; c++) {
|
|
5986
6014
|
const colHeight = colList[c] * scale;
|
|
5987
6015
|
const colItem = document.createElement("div");
|
|
5988
|
-
colItem.classList.add(
|
|
6016
|
+
colItem.classList.add(`${EDITOR_PREFIX}-table-tool__col__item`);
|
|
5989
6017
|
if (c === colIndex) {
|
|
5990
6018
|
colItem.classList.add("active");
|
|
5991
6019
|
}
|
|
5992
6020
|
const colItemAnchor = document.createElement("div");
|
|
5993
|
-
colItemAnchor.classList.add(
|
|
6021
|
+
colItemAnchor.classList.add(`${EDITOR_PREFIX}-table-tool__anchor`);
|
|
5994
6022
|
colItemAnchor.onmousedown = (evt) => {
|
|
5995
6023
|
this._mousedown({
|
|
5996
6024
|
evt,
|
|
@@ -6027,14 +6055,14 @@ class TableTool {
|
|
|
6027
6055
|
let startX = 0;
|
|
6028
6056
|
let startY = 0;
|
|
6029
6057
|
const anchorLine = document.createElement("div");
|
|
6030
|
-
anchorLine.classList.add(
|
|
6058
|
+
anchorLine.classList.add(`${EDITOR_PREFIX}-table-anchor__line`);
|
|
6031
6059
|
if (order === TableOrder.ROW) {
|
|
6032
|
-
anchorLine.classList.add(
|
|
6060
|
+
anchorLine.classList.add(`${EDITOR_PREFIX}-table-anchor__line__row`);
|
|
6033
6061
|
anchorLine.style.width = `${width}px`;
|
|
6034
6062
|
startX = 0;
|
|
6035
6063
|
startY = prePageHeight + this.mousedownY - canvasRect.top;
|
|
6036
6064
|
} else {
|
|
6037
|
-
anchorLine.classList.add(
|
|
6065
|
+
anchorLine.classList.add(`${EDITOR_PREFIX}-table-anchor__line__col`);
|
|
6038
6066
|
anchorLine.style.height = `${height}px`;
|
|
6039
6067
|
startX = this.mousedownX - canvasRect.left;
|
|
6040
6068
|
startY = prePageHeight;
|
|
@@ -6138,7 +6166,7 @@ class HyperlinkParticle {
|
|
|
6138
6166
|
}
|
|
6139
6167
|
_createHyperlinkPopupDom() {
|
|
6140
6168
|
const hyperlinkPopupContainer = document.createElement("div");
|
|
6141
|
-
hyperlinkPopupContainer.classList.add(
|
|
6169
|
+
hyperlinkPopupContainer.classList.add(`${EDITOR_PREFIX}-hyperlink-popup`);
|
|
6142
6170
|
const hyperlinkDom = document.createElement("a");
|
|
6143
6171
|
hyperlinkDom.target = "_blank";
|
|
6144
6172
|
hyperlinkPopupContainer.append(hyperlinkDom);
|
|
@@ -6448,7 +6476,7 @@ class SelectControl {
|
|
|
6448
6476
|
if (!position)
|
|
6449
6477
|
return;
|
|
6450
6478
|
const selectPopupContainer = document.createElement("div");
|
|
6451
|
-
selectPopupContainer.classList.add(
|
|
6479
|
+
selectPopupContainer.classList.add(`${EDITOR_PREFIX}-select-control-popup`);
|
|
6452
6480
|
selectPopupContainer.setAttribute(EDITOR_COMPONENT, EditorComponent.POPUP);
|
|
6453
6481
|
const ul = document.createElement("ul");
|
|
6454
6482
|
for (let v = 0; v < valueSets.length; v++) {
|
|
@@ -6985,7 +7013,7 @@ class Previewer {
|
|
|
6985
7013
|
}
|
|
6986
7014
|
_createResizerDom() {
|
|
6987
7015
|
const resizerSelection = document.createElement("div");
|
|
6988
|
-
resizerSelection.classList.add(
|
|
7016
|
+
resizerSelection.classList.add(`${EDITOR_PREFIX}-resizer-selection`);
|
|
6989
7017
|
resizerSelection.style.display = "none";
|
|
6990
7018
|
resizerSelection.style.borderColor = this.options.resizerColor;
|
|
6991
7019
|
const resizerHandleList = [];
|
|
@@ -7000,7 +7028,7 @@ class Previewer {
|
|
|
7000
7028
|
}
|
|
7001
7029
|
this.container.append(resizerSelection);
|
|
7002
7030
|
const resizerImageContainer = document.createElement("div");
|
|
7003
|
-
resizerImageContainer.classList.add(
|
|
7031
|
+
resizerImageContainer.classList.add(`${EDITOR_PREFIX}-resizer-image`);
|
|
7004
7032
|
resizerImageContainer.style.display = "none";
|
|
7005
7033
|
const resizerImage = document.createElement("img");
|
|
7006
7034
|
resizerImageContainer.append(resizerImage);
|
|
@@ -7095,7 +7123,7 @@ class Previewer {
|
|
|
7095
7123
|
}
|
|
7096
7124
|
_drawPreviewer() {
|
|
7097
7125
|
const previewerContainer = document.createElement("div");
|
|
7098
|
-
previewerContainer.classList.add(
|
|
7126
|
+
previewerContainer.classList.add(`${EDITOR_PREFIX}-image-previewer`);
|
|
7099
7127
|
const closeBtn = document.createElement("i");
|
|
7100
7128
|
closeBtn.classList.add("image-close");
|
|
7101
7129
|
closeBtn.onclick = () => {
|
|
@@ -7103,7 +7131,7 @@ class Previewer {
|
|
|
7103
7131
|
};
|
|
7104
7132
|
previewerContainer.append(closeBtn);
|
|
7105
7133
|
const imgContainer = document.createElement("div");
|
|
7106
|
-
imgContainer.classList.add(
|
|
7134
|
+
imgContainer.classList.add(`${EDITOR_PREFIX}-image-container`);
|
|
7107
7135
|
const img = document.createElement("img");
|
|
7108
7136
|
img.src = this.curElementSrc;
|
|
7109
7137
|
img.draggable = false;
|
|
@@ -7115,7 +7143,7 @@ class Previewer {
|
|
|
7115
7143
|
let scaleSize = 1;
|
|
7116
7144
|
let rotateSize = 0;
|
|
7117
7145
|
const menuContainer = document.createElement("div");
|
|
7118
|
-
menuContainer.classList.add(
|
|
7146
|
+
menuContainer.classList.add(`${EDITOR_PREFIX}-image-menu`);
|
|
7119
7147
|
const zoomIn = document.createElement("i");
|
|
7120
7148
|
zoomIn.classList.add("zoom-in");
|
|
7121
7149
|
zoomIn.onclick = () => {
|
|
@@ -7258,24 +7286,24 @@ class DatePicker {
|
|
|
7258
7286
|
}
|
|
7259
7287
|
_createDom() {
|
|
7260
7288
|
const datePickerContainer = document.createElement("div");
|
|
7261
|
-
datePickerContainer.classList.add(
|
|
7289
|
+
datePickerContainer.classList.add(`${EDITOR_PREFIX}-date-container`);
|
|
7262
7290
|
const dateWrap = document.createElement("div");
|
|
7263
|
-
dateWrap.classList.add(
|
|
7291
|
+
dateWrap.classList.add(`${EDITOR_PREFIX}-date-wrap`);
|
|
7264
7292
|
const datePickerTitle = document.createElement("div");
|
|
7265
|
-
datePickerTitle.classList.add(
|
|
7293
|
+
datePickerTitle.classList.add(`${EDITOR_PREFIX}-date-title`);
|
|
7266
7294
|
const preYearTitle = document.createElement("span");
|
|
7267
|
-
preYearTitle.classList.add(
|
|
7295
|
+
preYearTitle.classList.add(`${EDITOR_PREFIX}-date-title__pre-year`);
|
|
7268
7296
|
preYearTitle.innerText = `<<`;
|
|
7269
7297
|
const preMonthTitle = document.createElement("span");
|
|
7270
|
-
preMonthTitle.classList.add(
|
|
7298
|
+
preMonthTitle.classList.add(`${EDITOR_PREFIX}-date-title__pre-month`);
|
|
7271
7299
|
preMonthTitle.innerText = `<`;
|
|
7272
7300
|
const nowTitle = document.createElement("span");
|
|
7273
|
-
nowTitle.classList.add(
|
|
7301
|
+
nowTitle.classList.add(`${EDITOR_PREFIX}-date-title__now`);
|
|
7274
7302
|
const nextMonthTitle = document.createElement("span");
|
|
7275
|
-
nextMonthTitle.classList.add(
|
|
7303
|
+
nextMonthTitle.classList.add(`${EDITOR_PREFIX}-date-title__next-month`);
|
|
7276
7304
|
nextMonthTitle.innerText = `>`;
|
|
7277
7305
|
const nextYearTitle = document.createElement("span");
|
|
7278
|
-
nextYearTitle.classList.add(
|
|
7306
|
+
nextYearTitle.classList.add(`${EDITOR_PREFIX}-date-title__next-year`);
|
|
7279
7307
|
nextYearTitle.innerText = `>>`;
|
|
7280
7308
|
datePickerTitle.append(preYearTitle);
|
|
7281
7309
|
datePickerTitle.append(preMonthTitle);
|
|
@@ -7283,7 +7311,7 @@ class DatePicker {
|
|
|
7283
7311
|
datePickerTitle.append(nextMonthTitle);
|
|
7284
7312
|
datePickerTitle.append(nextYearTitle);
|
|
7285
7313
|
const datePickerWeek = document.createElement("div");
|
|
7286
|
-
datePickerWeek.classList.add(
|
|
7314
|
+
datePickerWeek.classList.add(`${EDITOR_PREFIX}-date-week`);
|
|
7287
7315
|
const weekList = ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"];
|
|
7288
7316
|
weekList.forEach((week) => {
|
|
7289
7317
|
const weekDom = document.createElement("span");
|
|
@@ -7291,12 +7319,12 @@ class DatePicker {
|
|
|
7291
7319
|
datePickerWeek.append(weekDom);
|
|
7292
7320
|
});
|
|
7293
7321
|
const datePickerDay = document.createElement("div");
|
|
7294
|
-
datePickerDay.classList.add(
|
|
7322
|
+
datePickerDay.classList.add(`${EDITOR_PREFIX}-date-day`);
|
|
7295
7323
|
dateWrap.append(datePickerTitle);
|
|
7296
7324
|
dateWrap.append(datePickerWeek);
|
|
7297
7325
|
dateWrap.append(datePickerDay);
|
|
7298
7326
|
const timeWrap = document.createElement("ul");
|
|
7299
|
-
timeWrap.classList.add(
|
|
7327
|
+
timeWrap.classList.add(`${EDITOR_PREFIX}-time-wrap`);
|
|
7300
7328
|
let hourTime;
|
|
7301
7329
|
let minuteTime;
|
|
7302
7330
|
let secondTime;
|
|
@@ -7327,15 +7355,15 @@ class DatePicker {
|
|
|
7327
7355
|
timeWrap.append(li);
|
|
7328
7356
|
});
|
|
7329
7357
|
const datePickerMenu = document.createElement("div");
|
|
7330
|
-
datePickerMenu.classList.add(
|
|
7358
|
+
datePickerMenu.classList.add(`${EDITOR_PREFIX}-date-menu`);
|
|
7331
7359
|
const timeMenu = document.createElement("button");
|
|
7332
|
-
timeMenu.classList.add(
|
|
7360
|
+
timeMenu.classList.add(`${EDITOR_PREFIX}-date-menu__time`);
|
|
7333
7361
|
timeMenu.innerText = "\u65F6\u95F4\u9009\u62E9";
|
|
7334
7362
|
const nowMenu = document.createElement("button");
|
|
7335
|
-
nowMenu.classList.add(
|
|
7363
|
+
nowMenu.classList.add(`${EDITOR_PREFIX}-date-menu__now`);
|
|
7336
7364
|
nowMenu.innerText = "\u6B64\u523B";
|
|
7337
7365
|
const submitMenu = document.createElement("button");
|
|
7338
|
-
submitMenu.classList.add(
|
|
7366
|
+
submitMenu.classList.add(`${EDITOR_PREFIX}-date-menu__submit`);
|
|
7339
7367
|
submitMenu.innerText = "\u786E\u5B9A";
|
|
7340
7368
|
datePickerMenu.append(timeMenu);
|
|
7341
7369
|
datePickerMenu.append(nowMenu);
|
|
@@ -7797,7 +7825,7 @@ class BaseBlock {
|
|
|
7797
7825
|
}
|
|
7798
7826
|
_createBlockItem() {
|
|
7799
7827
|
const blockItem = document.createElement("div");
|
|
7800
|
-
blockItem.classList.add(
|
|
7828
|
+
blockItem.classList.add(`${EDITOR_PREFIX}-block-item`);
|
|
7801
7829
|
return blockItem;
|
|
7802
7830
|
}
|
|
7803
7831
|
render() {
|
|
@@ -7838,7 +7866,7 @@ class BlockParticle {
|
|
|
7838
7866
|
}
|
|
7839
7867
|
_createBlockContainer() {
|
|
7840
7868
|
const blockContainer = document.createElement("div");
|
|
7841
|
-
blockContainer.classList.add(
|
|
7869
|
+
blockContainer.classList.add(`${EDITOR_PREFIX}-block-container`);
|
|
7842
7870
|
return blockContainer;
|
|
7843
7871
|
}
|
|
7844
7872
|
getDraw() {
|
|
@@ -7880,7 +7908,7 @@ class BlockParticle {
|
|
|
7880
7908
|
}
|
|
7881
7909
|
}
|
|
7882
7910
|
class Draw {
|
|
7883
|
-
constructor(
|
|
7911
|
+
constructor(rootContainer, options, elementList, listener) {
|
|
7884
7912
|
__publicField(this, "container");
|
|
7885
7913
|
__publicField(this, "pageContainer");
|
|
7886
7914
|
__publicField(this, "pageList");
|
|
@@ -7892,6 +7920,7 @@ class Draw {
|
|
|
7892
7920
|
__publicField(this, "elementList");
|
|
7893
7921
|
__publicField(this, "listener");
|
|
7894
7922
|
__publicField(this, "canvasEvent");
|
|
7923
|
+
__publicField(this, "globalEvent");
|
|
7895
7924
|
__publicField(this, "cursor");
|
|
7896
7925
|
__publicField(this, "range");
|
|
7897
7926
|
__publicField(this, "margin");
|
|
@@ -7920,12 +7949,14 @@ class Draw {
|
|
|
7920
7949
|
__publicField(this, "blockParticle");
|
|
7921
7950
|
__publicField(this, "control");
|
|
7922
7951
|
__publicField(this, "workerManager");
|
|
7952
|
+
__publicField(this, "scrollObserver");
|
|
7953
|
+
__publicField(this, "selectionObserver");
|
|
7923
7954
|
__publicField(this, "rowList");
|
|
7924
7955
|
__publicField(this, "painterStyle");
|
|
7925
7956
|
__publicField(this, "painterOptions");
|
|
7926
7957
|
__publicField(this, "visiblePageNoList");
|
|
7927
7958
|
__publicField(this, "intersectionPageNo");
|
|
7928
|
-
this.container =
|
|
7959
|
+
this.container = this._wrapContainer(rootContainer);
|
|
7929
7960
|
this.pageList = [];
|
|
7930
7961
|
this.ctxList = [];
|
|
7931
7962
|
this.pageNo = 0;
|
|
@@ -7963,13 +7994,13 @@ class Draw {
|
|
|
7963
7994
|
this.checkboxParticle = new CheckboxParticle(this);
|
|
7964
7995
|
this.blockParticle = new BlockParticle(this);
|
|
7965
7996
|
this.control = new Control(this);
|
|
7966
|
-
new ScrollObserver(this);
|
|
7967
|
-
new SelectionObserver();
|
|
7997
|
+
this.scrollObserver = new ScrollObserver(this);
|
|
7998
|
+
this.selectionObserver = new SelectionObserver();
|
|
7968
7999
|
this.canvasEvent = new CanvasEvent(this);
|
|
7969
8000
|
this.cursor = new Cursor(this, this.canvasEvent);
|
|
7970
8001
|
this.canvasEvent.register();
|
|
7971
|
-
|
|
7972
|
-
globalEvent.register();
|
|
8002
|
+
this.globalEvent = new GlobalEvent(this, this.canvasEvent);
|
|
8003
|
+
this.globalEvent.register();
|
|
7973
8004
|
this.workerManager = new WorkerManager(this);
|
|
7974
8005
|
this.rowList = [];
|
|
7975
8006
|
this.painterStyle = null;
|
|
@@ -8271,6 +8302,11 @@ class Draw {
|
|
|
8271
8302
|
data: data2
|
|
8272
8303
|
};
|
|
8273
8304
|
}
|
|
8305
|
+
_wrapContainer(rootContainer) {
|
|
8306
|
+
const container = document.createElement("div");
|
|
8307
|
+
rootContainer.append(container);
|
|
8308
|
+
return container;
|
|
8309
|
+
}
|
|
8274
8310
|
_formatContainer() {
|
|
8275
8311
|
this.container.style.position = "relative";
|
|
8276
8312
|
this.container.style.width = `${this.getWidth()}px`;
|
|
@@ -8278,7 +8314,7 @@ class Draw {
|
|
|
8278
8314
|
}
|
|
8279
8315
|
_createPageContainer() {
|
|
8280
8316
|
const pageContainer = document.createElement("div");
|
|
8281
|
-
pageContainer.classList.add(
|
|
8317
|
+
pageContainer.classList.add(`${EDITOR_PREFIX}-page-container`);
|
|
8282
8318
|
this.container.append(pageContainer);
|
|
8283
8319
|
return pageContainer;
|
|
8284
8320
|
}
|
|
@@ -8840,6 +8876,12 @@ class Draw {
|
|
|
8840
8876
|
}
|
|
8841
8877
|
});
|
|
8842
8878
|
}
|
|
8879
|
+
destroy() {
|
|
8880
|
+
this.container.remove();
|
|
8881
|
+
this.globalEvent.removeEvent();
|
|
8882
|
+
this.scrollObserver.removeEvent();
|
|
8883
|
+
this.selectionObserver.removeEvent();
|
|
8884
|
+
}
|
|
8843
8885
|
}
|
|
8844
8886
|
const _Command = class {
|
|
8845
8887
|
constructor(adapt) {
|
|
@@ -10925,6 +10967,41 @@ class ContextMenu {
|
|
|
10925
10967
|
__publicField(this, "contextMenuContainerList");
|
|
10926
10968
|
__publicField(this, "contextMenuRelationShip");
|
|
10927
10969
|
__publicField(this, "context");
|
|
10970
|
+
__publicField(this, "_proxyContextMenuEvent", (evt) => {
|
|
10971
|
+
var _a;
|
|
10972
|
+
this.context = this._getContext();
|
|
10973
|
+
const renderList = [];
|
|
10974
|
+
let isRegisterContextMenu = false;
|
|
10975
|
+
for (let c = 0; c < this.contextMenuList.length; c++) {
|
|
10976
|
+
const menu = this.contextMenuList[c];
|
|
10977
|
+
if (menu.isDivider) {
|
|
10978
|
+
renderList.push(menu);
|
|
10979
|
+
} else {
|
|
10980
|
+
const isMatch = (_a = menu.when) == null ? void 0 : _a.call(menu, this.context);
|
|
10981
|
+
if (isMatch) {
|
|
10982
|
+
renderList.push(menu);
|
|
10983
|
+
isRegisterContextMenu = true;
|
|
10984
|
+
}
|
|
10985
|
+
}
|
|
10986
|
+
}
|
|
10987
|
+
if (isRegisterContextMenu) {
|
|
10988
|
+
this.dispose();
|
|
10989
|
+
this._render({
|
|
10990
|
+
contextMenuList: renderList,
|
|
10991
|
+
left: evt.x,
|
|
10992
|
+
top: evt.y
|
|
10993
|
+
});
|
|
10994
|
+
}
|
|
10995
|
+
evt.preventDefault();
|
|
10996
|
+
});
|
|
10997
|
+
__publicField(this, "_handleEffect", (evt) => {
|
|
10998
|
+
if (this.contextMenuContainerList.length) {
|
|
10999
|
+
const contextMenuDom = findParent(evt.target, (node) => !!node && node.nodeType === 1 && node.getAttribute(EDITOR_COMPONENT) === EditorComponent.CONTEXTMENU, true);
|
|
11000
|
+
if (!contextMenuDom) {
|
|
11001
|
+
this.dispose();
|
|
11002
|
+
}
|
|
11003
|
+
}
|
|
11004
|
+
});
|
|
10928
11005
|
this.draw = draw;
|
|
10929
11006
|
this.command = command;
|
|
10930
11007
|
this.range = draw.getRange();
|
|
@@ -10940,43 +11017,15 @@ class ContextMenu {
|
|
|
10940
11017
|
];
|
|
10941
11018
|
this.contextMenuContainerList = [];
|
|
10942
11019
|
this.contextMenuRelationShip = new Map();
|
|
10943
|
-
|
|
10944
|
-
document.addEventListener("mousedown", this._handleEffect.bind(this));
|
|
11020
|
+
this._addEvent();
|
|
10945
11021
|
}
|
|
10946
|
-
|
|
10947
|
-
|
|
10948
|
-
|
|
10949
|
-
const renderList = [];
|
|
10950
|
-
let isRegisterContextMenu = false;
|
|
10951
|
-
for (let c = 0; c < this.contextMenuList.length; c++) {
|
|
10952
|
-
const menu = this.contextMenuList[c];
|
|
10953
|
-
if (menu.isDivider) {
|
|
10954
|
-
renderList.push(menu);
|
|
10955
|
-
} else {
|
|
10956
|
-
const isMatch = (_a = menu.when) == null ? void 0 : _a.call(menu, this.context);
|
|
10957
|
-
if (isMatch) {
|
|
10958
|
-
renderList.push(menu);
|
|
10959
|
-
isRegisterContextMenu = true;
|
|
10960
|
-
}
|
|
10961
|
-
}
|
|
10962
|
-
}
|
|
10963
|
-
if (isRegisterContextMenu) {
|
|
10964
|
-
this.dispose();
|
|
10965
|
-
this._render({
|
|
10966
|
-
contextMenuList: renderList,
|
|
10967
|
-
left: evt.x,
|
|
10968
|
-
top: evt.y
|
|
10969
|
-
});
|
|
10970
|
-
}
|
|
10971
|
-
evt.preventDefault();
|
|
11022
|
+
_addEvent() {
|
|
11023
|
+
document.addEventListener("contextmenu", this._proxyContextMenuEvent);
|
|
11024
|
+
document.addEventListener("mousedown", this._handleEffect);
|
|
10972
11025
|
}
|
|
10973
|
-
|
|
10974
|
-
|
|
10975
|
-
|
|
10976
|
-
if (!contextMenuDom) {
|
|
10977
|
-
this.dispose();
|
|
10978
|
-
}
|
|
10979
|
-
}
|
|
11026
|
+
removeEvent() {
|
|
11027
|
+
document.removeEventListener("contextmenu", this._proxyContextMenuEvent);
|
|
11028
|
+
document.removeEventListener("mousedown", this._handleEffect);
|
|
10980
11029
|
}
|
|
10981
11030
|
_getContext() {
|
|
10982
11031
|
const isReadonly = this.draw.isReadonly();
|
|
@@ -11001,7 +11050,7 @@ class ContextMenu {
|
|
|
11001
11050
|
}
|
|
11002
11051
|
_createContextMenuContainer() {
|
|
11003
11052
|
const contextMenuContainer = document.createElement("div");
|
|
11004
|
-
contextMenuContainer.classList.add(
|
|
11053
|
+
contextMenuContainer.classList.add(`${EDITOR_PREFIX}-contextmenu-container`);
|
|
11005
11054
|
contextMenuContainer.setAttribute(EDITOR_COMPONENT, EditorComponent.CONTEXTMENU);
|
|
11006
11055
|
this.container.append(contextMenuContainer);
|
|
11007
11056
|
return contextMenuContainer;
|
|
@@ -11010,7 +11059,7 @@ class ContextMenu {
|
|
|
11010
11059
|
const { contextMenuList, left, top, parentMenuContainer } = payload;
|
|
11011
11060
|
const contextMenuContainer = this._createContextMenuContainer();
|
|
11012
11061
|
const contextMenuContent = document.createElement("div");
|
|
11013
|
-
contextMenuContent.classList.add(
|
|
11062
|
+
contextMenuContent.classList.add(`${EDITOR_PREFIX}-contextmenu-content`);
|
|
11014
11063
|
let childMenuContainer = null;
|
|
11015
11064
|
if (parentMenuContainer) {
|
|
11016
11065
|
this.contextMenuRelationShip.set(parentMenuContainer, contextMenuContainer);
|
|
@@ -11020,14 +11069,14 @@ class ContextMenu {
|
|
|
11020
11069
|
if (menu.isDivider) {
|
|
11021
11070
|
if (c !== 0 && c !== contextMenuList.length - 1) {
|
|
11022
11071
|
const divider = document.createElement("div");
|
|
11023
|
-
divider.classList.add(
|
|
11072
|
+
divider.classList.add(`${EDITOR_PREFIX}-contextmenu-divider`);
|
|
11024
11073
|
contextMenuContent.append(divider);
|
|
11025
11074
|
}
|
|
11026
11075
|
} else {
|
|
11027
11076
|
const menuItem = document.createElement("div");
|
|
11028
|
-
menuItem.classList.add(
|
|
11077
|
+
menuItem.classList.add(`${EDITOR_PREFIX}-contextmenu-item`);
|
|
11029
11078
|
if (menu.childMenus) {
|
|
11030
|
-
menuItem.classList.add(
|
|
11079
|
+
menuItem.classList.add(`${EDITOR_PREFIX}-contextmenu-sub-item`);
|
|
11031
11080
|
menuItem.onmouseenter = () => {
|
|
11032
11081
|
this._setHoverStatus(menuItem, true);
|
|
11033
11082
|
this._removeSubMenu(contextMenuContainer);
|
|
@@ -11064,7 +11113,7 @@ class ContextMenu {
|
|
|
11064
11113
|
const icon = document.createElement("i");
|
|
11065
11114
|
menuItem.append(icon);
|
|
11066
11115
|
if (menu.icon) {
|
|
11067
|
-
icon.classList.add(
|
|
11116
|
+
icon.classList.add(`${EDITOR_PREFIX}-contextmenu-${menu.icon}`);
|
|
11068
11117
|
}
|
|
11069
11118
|
const span = document.createElement("span");
|
|
11070
11119
|
const name = this._formatName(menu.name);
|
|
@@ -11072,7 +11121,7 @@ class ContextMenu {
|
|
|
11072
11121
|
menuItem.append(span);
|
|
11073
11122
|
if (menu.shortCut) {
|
|
11074
11123
|
const span2 = document.createElement("span");
|
|
11075
|
-
span2.classList.add(
|
|
11124
|
+
span2.classList.add(`${EDITOR_PREFIX}-shortcut`);
|
|
11076
11125
|
span2.append(document.createTextNode(menu.shortCut));
|
|
11077
11126
|
menuItem.append(span2);
|
|
11078
11127
|
}
|
|
@@ -11100,7 +11149,7 @@ class ContextMenu {
|
|
|
11100
11149
|
_setHoverStatus(payload, status) {
|
|
11101
11150
|
var _a;
|
|
11102
11151
|
if (status) {
|
|
11103
|
-
(_a = payload.parentNode) == null ? void 0 : _a.querySelectorAll(
|
|
11152
|
+
(_a = payload.parentNode) == null ? void 0 : _a.querySelectorAll(`${EDITOR_PREFIX}-contextmenu-item`).forEach((child) => child.classList.remove("hover"));
|
|
11104
11153
|
payload.classList.add("hover");
|
|
11105
11154
|
} else {
|
|
11106
11155
|
payload.classList.remove("hover");
|
|
@@ -11228,16 +11277,27 @@ class Shortcut {
|
|
|
11228
11277
|
__publicField(this, "command");
|
|
11229
11278
|
__publicField(this, "globalShortcutList");
|
|
11230
11279
|
__publicField(this, "agentShortcutList");
|
|
11280
|
+
__publicField(this, "_globalKeydown", (evt) => {
|
|
11281
|
+
if (!this.globalShortcutList.length)
|
|
11282
|
+
return;
|
|
11283
|
+
this._execute(evt, this.globalShortcutList);
|
|
11284
|
+
});
|
|
11231
11285
|
this.command = command;
|
|
11232
11286
|
this.globalShortcutList = [];
|
|
11233
11287
|
this.agentShortcutList = [];
|
|
11234
11288
|
this._addShortcutList([
|
|
11235
11289
|
...richtextKeys
|
|
11236
11290
|
]);
|
|
11237
|
-
|
|
11291
|
+
this._addEvent();
|
|
11238
11292
|
const agentDom = draw.getCursor().getAgentDom();
|
|
11239
11293
|
agentDom.addEventListener("keydown", this._agentKeydown.bind(this));
|
|
11240
11294
|
}
|
|
11295
|
+
_addEvent() {
|
|
11296
|
+
document.addEventListener("keydown", this._globalKeydown);
|
|
11297
|
+
}
|
|
11298
|
+
removeEvent() {
|
|
11299
|
+
document.removeEventListener("keydown", this._globalKeydown);
|
|
11300
|
+
}
|
|
11241
11301
|
_addShortcutList(payload) {
|
|
11242
11302
|
for (let s = 0; s < payload.length; s++) {
|
|
11243
11303
|
const shortCut = payload[s];
|
|
@@ -11251,11 +11311,6 @@ class Shortcut {
|
|
|
11251
11311
|
registerShortcutList(payload) {
|
|
11252
11312
|
this._addShortcutList(payload);
|
|
11253
11313
|
}
|
|
11254
|
-
_globalKeydown(evt) {
|
|
11255
|
-
if (!this.globalShortcutList.length)
|
|
11256
|
-
return;
|
|
11257
|
-
this._execute(evt, this.globalShortcutList);
|
|
11258
|
-
}
|
|
11259
11314
|
_agentKeydown(evt) {
|
|
11260
11315
|
if (!this.agentShortcutList.length)
|
|
11261
11316
|
return;
|
|
@@ -11277,6 +11332,7 @@ class Editor {
|
|
|
11277
11332
|
__publicField(this, "command");
|
|
11278
11333
|
__publicField(this, "listener");
|
|
11279
11334
|
__publicField(this, "register");
|
|
11335
|
+
__publicField(this, "destroy");
|
|
11280
11336
|
const headerOptions = __spreadValues(__spreadValues({}, defaultHeaderOption), options.header);
|
|
11281
11337
|
const waterMarkOptions = __spreadValues(__spreadValues({}, defaultWatermarkOption), options.watermark);
|
|
11282
11338
|
const controlOptions = __spreadValues(__spreadValues({}, defaultControlOption), options.control);
|
|
@@ -11333,6 +11389,11 @@ class Editor {
|
|
|
11333
11389
|
contextMenu,
|
|
11334
11390
|
shortcut
|
|
11335
11391
|
});
|
|
11392
|
+
this.destroy = () => {
|
|
11393
|
+
draw.destroy();
|
|
11394
|
+
shortcut.removeEvent();
|
|
11395
|
+
contextMenu.removeEvent();
|
|
11396
|
+
};
|
|
11336
11397
|
}
|
|
11337
11398
|
}
|
|
11338
11399
|
export { BlockType, Command, ControlType, EDITOR_COMPONENT, Editor, EditorComponent, EditorMode, ElementType, ImageDisplay, KeyMap, PageMode, RowFlex, Editor as default };
|