@agile_jy/word-editor 0.0.1-beta.3 → 0.0.1-beta.30
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/dist/canvas-editor.es.js +2455 -233
- package/dist/canvas-editor.es.js.map +1 -1
- package/dist/canvas-editor.umd.js +45 -38
- package/dist/canvas-editor.umd.js.map +1 -1
- package/dist/src/components/dialog/Dialog.d.ts +38 -0
- package/dist/src/editor/core/command/Command.d.ts +7 -0
- package/dist/src/editor/core/command/CommandAdapt.d.ts +30 -1
- package/dist/src/editor/dataset/enum/Background.d.ts +7 -0
- package/dist/src/editor/index.d.ts +15 -6
- package/dist/src/editor/interface/Background.d.ts +12 -1
- package/dist/src/editor/interface/Editor.d.ts +31 -0
- package/dist/src/editor/interface/Element.d.ts +20 -0
- package/dist/src/editor/interface/Listener.d.ts +2 -0
- package/dist/src/editor/interface/PageBreak.d.ts +2 -0
- package/dist/src/editor/utils/docxHtml.d.ts +24 -0
- package/dist/src/editor/utils/element.d.ts +36 -6
- package/dist/src/editor/utils/rowMargin.d.ts +13 -0
- package/dist/src/plugins/docx/importDocx.d.ts +2 -0
- package/dist/src/plugins/docx/index.d.ts +8 -0
- package/dist/src/plugins/docx/utils.d.ts +1 -0
- package/package.json +77 -77
package/dist/canvas-editor.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-calculator{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;padding:8px;width:200px}.ce-calculator-display{width:100%;height:40px;line-height:40px;text-align:right;padding:0 10px;margin-bottom:8px;border:1px solid #e4e7ed;border-radius:4px;background-color:#f5f7fa;font-size:16px;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis}.ce-calculator-buttons{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}.ce-calculator-button{width:100%;height:36px;border:1px solid #e4e7ed;border-radius:4px;background-color:#fff;font-size:14px;cursor:pointer;transition:all .2s;box-sizing:border-box}.ce-calculator-button:hover{background-color:#eef2fd;border-color:#c6d1ff}.ce-calculator-button:active{background-color:#e1e8ff}.ce-calculator-button.operator{background-color:#f5f7fa}.ce-calculator-button.operator:hover{background-color:#eef2fd}.ce-calculator-button.equal{background-color:var(--COLOR-HOVER, #5175f4);color:#fff;border-color:var(--COLOR-HOVER, #5175f4)}.ce-calculator-button.equal:hover{background-color:var(--COLOR-HOVER, #6a84ff);border-color:var(--COLOR-HOVER, #6a84ff)}.ce-calculator-button.utility{background-color:#f0f2f5}.ce-calculator-button.utility:hover{background-color:#e6e8eb}.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:calc(100%/7);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:calc(100%/7);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;background-color:#fff;border:1px solid rgb(235 236 240)}.ce-block-item .ce-resizer-selection{width:100%;height:100%}.ce-block-item .ce-resizer-mask{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1;background-color:transparent}.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;cursor:pointer;transition:all .3s}.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:hover{background-color:#dadce0}.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__select{width:16px;height:18px;position:absolute;border-radius:3px;cursor:pointer}.ce-table-tool__select:hover{background-color:#e2e6ed}.ce-table-tool__select:after{content:":::";color:#aaaaab;position:absolute;top:50%;left:50%;transform:translate(-75%,-50%) rotate(-90deg)}.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;cursor:pointer;transition:all .3s}.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:hover{background-color:#dadce0}.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-image-previewer .ce-image-menu .image-navigate{display:flex;align-items:center;justify-content:center}.ce-image-previewer .ce-image-menu i.image-pre{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyLjUgNC4wNjNMNi44NzUgMTBsNS42MjUgNS45MzgiIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==)}.ce-image-previewer .ce-image-menu i.image-next{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuNSA0LjA2M0wxMy4xMjUgMTAgNy41IDE1LjkzOCIgc3Ryb2tlPSIjM0Q0NzU3IiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+)}.ce-image-previewer .ce-image-menu .image-count{color:#000;font-size:20px}.ce-image-previewer .ce-image-menu i.disabled{cursor:not-allowed;opacity:.5}.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,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSLlm77lsYJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4PSIwIiB5PSIwIiB2aWV3Qm94PSIwIDAgMTYgMTYiIHhtbDpzcGFjZT0icHJlc2VydmU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GMuNDAyLS40NTcuNjUxLS4zOSAxLjA0MiAwTDcuNDczIDcgOS45NiA0LjM0OWMuNDE0LS40NjIuNjItLjQ2MiAxLjAxMS0uMDcxTDEzIDcuMDZ2MS41bC0yLjUxLTMuNDEtMy4wMTcgMy4wNzJ6Ii8+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,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL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FINHptMS0xaDF2MUg1ek00IDhoMXYxSDR6TTIgOGgxdjFIMnptMyAxaDF2MUg1ek0xIDloMXYxSDF6Ii8+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,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIH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2c+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+PHBhdGggZD0iTTcgOWgxVjNIN3ptLjUgM0w1IDloNXpNMiAxM2gxMXYxSDJ6IiBmaWxsPSIjM0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0FBQUNCMCIvPjwvc3ZnPg==)}.ce-contextmenu-border-internal{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOSA1VjNIOHYyaDF6bTAgOXYtMkg4djJoMXpNNSA4SDN2MWgyVjh6bTkgMGgtMnYxaDJWOHpNOSA3djFoMXYxSDl2MUg4VjlIN1Y4aDFWN2gxeiIgZmlsbD0iIzNENDc1NyIvPjwvc3ZnPg==)}.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;top: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}.dialog-mask{position:fixed;left:0;top:0;width:100%;height:100%;opacity:.5;background:#000000;z-index:99}.dialog-container{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;z-index:999;margin:0;display:flex;justify-content:center;align-items:center}.dialog{position:absolute;padding:0 30px 30px;background:#ffffff;box-shadow:0 2px 12px #38383833;border:1px solid #e2e6ed;border-radius:2px}.dialog-title{position:relative;border-bottom:1px solid #e2e6ed;margin-bottom:30px;height:60px;display:flex;align-items:center;justify-content:space-between}.dialog-title i{width:16px;height:16px;cursor:pointer;display:inline-block;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOC45IDguMTkybDQuMjQyIDQuMjQzLS43MDcuNzA3TDguMTkyIDguOSAzLjk1IDEzLjE0MmwtLjcwNy0uNzA3IDQuMjQyLTQuMjQzTDMuMjQzIDMuOTVsLjcwNy0uNzA3IDQuMjQyIDQuMjQyIDQuMjQzLTQuMjQyLjcwNy43MDdMOC45IDguMTkyeiIgZmlsbD0iIzZBNkE2QSIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.dialog-option__item{margin-bottom:18px;display:flex;align-items:center;justify-content:space-between}.dialog-option__item span{margin-right:12px;font-size:14px;color:#3d4757;position:relative}.dialog-option__item input,.dialog-option__item textarea,.dialog-option__item select{width:276px;height:30px;border-radius:2px;border:1px solid #d3d3d3;min-height:30px;padding:5px;box-sizing:border-box;outline:none;appearance:none;user-select:none;font-family:inherit}.dialog-option__item input:focus,.dialog-option__item textarea:focus{border-color:#4991f2}.dialog-option__item--require:before{content:"*";color:#f56c6c;margin-right:4px;position:absolute;left:-8px}.dialog-menu{display:flex;align-items:center;justify-content:flex-end}.dialog-menu button{position:relative;display:inline-block;border:1px solid #e2e6ed;border-radius:2px;background:#ffffff;line-height:22px;padding:0 16px;white-space:nowrap;cursor:pointer}.dialog-menu button:hover{background:rgba(25,55,88,.04)}.dialog-menu__cancel{margin-right:16px}.dialog-menu button[type=submit]{color:#fff;background:#4991f2;border-color:#4991f2}.dialog-menu button[type=submit]:hover{background:#5b9cf3;border-color:#5b9cf3}')),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-calculator{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;padding:8px;width:200px}.ce-calculator-display{width:100%;height:40px;line-height:40px;text-align:right;padding:0 10px;margin-bottom:8px;border:1px solid #e4e7ed;border-radius:4px;background-color:#f5f7fa;font-size:16px;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis}.ce-calculator-buttons{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}.ce-calculator-button{width:100%;height:36px;border:1px solid #e4e7ed;border-radius:4px;background-color:#fff;font-size:14px;cursor:pointer;transition:all .2s;box-sizing:border-box}.ce-calculator-button:hover{background-color:#eef2fd;border-color:#c6d1ff}.ce-calculator-button:active{background-color:#e1e8ff}.ce-calculator-button.operator{background-color:#f5f7fa}.ce-calculator-button.operator:hover{background-color:#eef2fd}.ce-calculator-button.equal{background-color:var(--COLOR-HOVER, #5175f4);color:#fff;border-color:var(--COLOR-HOVER, #5175f4)}.ce-calculator-button.equal:hover{background-color:var(--COLOR-HOVER, #6a84ff);border-color:var(--COLOR-HOVER, #6a84ff)}.ce-calculator-button.utility{background-color:#f0f2f5}.ce-calculator-button.utility:hover{background-color:#e6e8eb}.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:calc(100%/7);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:calc(100%/7);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;background-color:#fff;border:1px solid rgb(235 236 240)}.ce-block-item .ce-resizer-selection{width:100%;height:100%}.ce-block-item .ce-resizer-mask{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1;background-color:transparent}.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;cursor:pointer;transition:all .3s}.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:hover{background-color:#dadce0}.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__select{width:16px;height:18px;position:absolute;border-radius:3px;cursor:pointer}.ce-table-tool__select:hover{background-color:#e2e6ed}.ce-table-tool__select:after{content:":::";color:#aaaaab;position:absolute;top:50%;left:50%;transform:translate(-75%,-50%) rotate(-90deg)}.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;cursor:pointer;transition:all .3s}.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:hover{background-color:#dadce0}.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-image-previewer .ce-image-menu .image-navigate{display:flex;align-items:center;justify-content:center}.ce-image-previewer .ce-image-menu i.image-pre{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyLjUgNC4wNjNMNi44NzUgMTBsNS42MjUgNS45MzgiIHN0cm9rZT0iIzNENDc1NyIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==)}.ce-image-previewer .ce-image-menu i.image-next{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuNSA0LjA2M0wxMy4xMjUgMTAgNy41IDE1LjkzOCIgc3Ryb2tlPSIjM0Q0NzU3IiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+)}.ce-image-previewer .ce-image-menu .image-count{color:#000;font-size:20px}.ce-image-previewer .ce-image-menu i.disabled{cursor:not-allowed;opacity:.5}.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,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy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NnoiLz48cGF0aCBmaWxsPSIjM0Q0NzU3IiBkPSJNNCA3djFoMlY3em0tMyAuNUw0IDV2NXpNMSAxaDEydjFIMXptMCAxMmgxMnYxSDF6Ii8+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+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMyAzaC0xVjJoMWExIDEgMCAwMTEgMXYxaC0xVjN6bS0zLTF2MUg4LjV2MmgtMVYzSDZWMmg0ek00IDJ2MUgzdjFIMlYzYTEgMSAwIDAx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S41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iIzNENDc1NyIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOSA1VjNIOHYyaDF6bTAgOXYtMkg4djJoMXpNNSA4SDN2MWgyVjh6bTkgMGgtMnYxaDJWOHpNOSA3djFoMXYxSDl2MUg4VjlIN1Y4aDFWN2gxeiIgZmlsbD0iI0FBQUNCMCIvPjwvc3ZnPg==)}.ce-contextmenu-border-internal{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIuNSAzYS41LjUgMCAwMS41LS41aDExYS41LjUgMCAwMS41LjV2MTFhLjUuNSAwIDAxLS41LjVIM2EuNS41IDAgMDEtLjUtLjVWM3oiIHN0cm9rZT0iI0FBQUNCMCIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOSA1VjNIOHYyaDF6bTAgOXYtMkg4djJoMXpNNSA4SDN2MWgyVjh6bTkgMGgtMnYxaDJWOHpNOSA3djFoMXYxSDl2MUg4VjlIN1Y4aDFWN2gxeiIgZmlsbD0iIzNENDc1NyIvPjwvc3ZnPg==)}.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;top: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}.dialog-mask{position:fixed;left:0;top:0;width:100%;height:100%;opacity:.5;background:#000000;z-index:99}.dialog-container{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;z-index:999;margin:0;display:flex;justify-content:center;align-items:center}.dialog{position:absolute;padding:0 30px 30px;background:#ffffff;box-shadow:0 2px 12px #38383833;border:1px solid #e2e6ed;border-radius:2px}.dialog-title{position:relative;border-bottom:1px solid #e2e6ed;margin-bottom:30px;height:60px;display:flex;align-items:center;justify-content:space-between}.dialog-title i{width:16px;height:16px;cursor:pointer;display:inline-block;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOC45IDguMTkybDQuMjQyIDQuMjQzLS43MDcuNzA3TDguMTkyIDguOSAzLjk1IDEzLjE0MmwtLjcwNy0uNzA3IDQuMjQyLTQuMjQzTDMuMjQzIDMuOTVsLjcwNy0uNzA3IDQuMjQyIDQuMjQyIDQuMjQzLTQuMjQyLjcwNy43MDdMOC45IDguMTkyeiIgZmlsbD0iIzZBNkE2QSIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+)}.dialog-option__item{margin-bottom:18px;display:flex;align-items:center;justify-content:space-between}.dialog-option__item span{margin-right:12px;font-size:14px;color:#3d4757;position:relative}.dialog-option__item input,.dialog-option__item select{width:276px;height:28px;border-radius:2px;border:1px solid #d3d3d3;min-height:28px;padding:5px;box-sizing:border-box;outline:none;appearance:none;user-select:none;font-family:inherit}.dialog-option__item textarea{width:276px;height:58px;border-radius:2px;border:1px solid #d3d3d3;min-height:58px;padding:5px;box-sizing:border-box;outline:none;appearance:none;user-select:none;font-family:inherit}.dialog-option__item input:focus,.dialog-option__item textarea:focus{border-color:#4991f2}.dialog-option__item--require:before{content:"*";color:#f56c6c;margin-right:4px;position:absolute;left:-8px}.dialog-menu{display:flex;align-items:center;justify-content:flex-end}.dialog-menu button{position:relative;display:inline-block;border:1px solid #e2e6ed;border-radius:2px;background:#ffffff;line-height:22px;padding:0 16px;white-space:nowrap;cursor:pointer}.dialog-menu button:hover{background:rgba(25,55,88,.04)}.dialog-menu__cancel{margin-right:16px}.dialog-menu button[type=submit]{color:#fff;background:#4991f2;border-color:#4991f2}.dialog-menu button[type=submit]:hover{background:#5b9cf3;border-color:#5b9cf3}.searchable-select{position:relative;width:276px;height:30px;box-sizing:border-box}.searchable-select__input-wrapper{position:relative;display:flex;align-items:center;width:100%;height:100%;border:1px solid #d3d3d3}.searchable-select__input-wrapper .searchable-select__input{border:none}.searchable-select__input-wrapper .searchable-select__arrow{margin-right:0;margin-top:-12px}.searchable-select__input{width:100%;height:30px;border-radius:2px;border:1px solid #d3d3d3;padding:5px 30px 5px 5px;box-sizing:border-box;outline:none;font-family:inherit;font-size:14px;cursor:pointer;background-color:#fff}.searchable-select__input:focus{border-color:#4991f2}.searchable-select__arrow{position:absolute;right:8px;top:50%;transform:translateY(-50%);font-size:10px;color:#666;cursor:pointer;user-select:none;line-height:1;z-index:1}.searchable-select__dropdown{position:absolute;top:calc(100% + 4px);left:0;width:100%;background:#ffffff;border:1px solid #d3d3d3;border-radius:2px;box-shadow:0 2px 8px #00000026;max-height:200px;overflow-y:auto;z-index:1000}.searchable-select__option{padding:8px 12px;cursor:pointer;font-size:14px;color:#3d4757;transition:background-color .2s;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.searchable-select__option:hover{background-color:#f5f7fa}.searchable-select__option--selected{background-color:#ecf5ff;color:#4991f2;font-weight:500}.searchable-select__option--empty{color:#999;cursor:not-allowed;text-align:center;padding:12px}.searchable-select__option--empty:hover{background-color:transparent}.searchable-select__dropdown::-webkit-scrollbar{width:6px}.searchable-select__dropdown::-webkit-scrollbar-thumb{background-color:#c0c4cc;border-radius:3px}.searchable-select__dropdown::-webkit-scrollbar-thumb:hover{background-color:#909399}.searchable-select__dropdown::-webkit-scrollbar-track{background-color:#f5f7fa}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
2
|
var index = "";
|
|
3
|
-
const version = "0.0.1-beta.
|
|
3
|
+
const version = "0.0.1-beta.30";
|
|
4
4
|
var MaxHeightRatio;
|
|
5
5
|
(function(MaxHeightRatio2) {
|
|
6
6
|
MaxHeightRatio2["HALF"] = "half";
|
|
@@ -507,7 +507,16 @@ const EDITOR_ELEMENT_STYLE_ATTR = [
|
|
|
507
507
|
"strikeout",
|
|
508
508
|
"textDecoration"
|
|
509
509
|
];
|
|
510
|
-
const EDITOR_ROW_ATTR = [
|
|
510
|
+
const EDITOR_ROW_ATTR = [
|
|
511
|
+
"rowFlex",
|
|
512
|
+
"rowMargin",
|
|
513
|
+
"textIndent",
|
|
514
|
+
"marginLeft",
|
|
515
|
+
"marginRight",
|
|
516
|
+
"marginTop",
|
|
517
|
+
"minHeight",
|
|
518
|
+
"whiteSpace"
|
|
519
|
+
];
|
|
511
520
|
const EDITOR_ELEMENT_COPY_ATTR = [
|
|
512
521
|
"type",
|
|
513
522
|
"font",
|
|
@@ -526,6 +535,12 @@ const EDITOR_ELEMENT_COPY_ATTR = [
|
|
|
526
535
|
"dateFormat",
|
|
527
536
|
"groupIds",
|
|
528
537
|
"rowMargin",
|
|
538
|
+
"textIndent",
|
|
539
|
+
"marginLeft",
|
|
540
|
+
"marginRight",
|
|
541
|
+
"marginTop",
|
|
542
|
+
"minHeight",
|
|
543
|
+
"whiteSpace",
|
|
529
544
|
"textDecoration"
|
|
530
545
|
];
|
|
531
546
|
const EDITOR_ELEMENT_ZIP_ATTR = [
|
|
@@ -540,6 +555,12 @@ const EDITOR_ELEMENT_ZIP_ATTR = [
|
|
|
540
555
|
"strikeout",
|
|
541
556
|
"rowFlex",
|
|
542
557
|
"rowMargin",
|
|
558
|
+
"textIndent",
|
|
559
|
+
"marginLeft",
|
|
560
|
+
"marginRight",
|
|
561
|
+
"marginTop",
|
|
562
|
+
"minHeight",
|
|
563
|
+
"whiteSpace",
|
|
543
564
|
"dashArray",
|
|
544
565
|
"trList",
|
|
545
566
|
"tableToolDisabled",
|
|
@@ -4086,6 +4107,28 @@ var TdSlash;
|
|
|
4086
4107
|
TdSlash2["FORWARD"] = "forward";
|
|
4087
4108
|
TdSlash2["BACK"] = "back";
|
|
4088
4109
|
})(TdSlash || (TdSlash = {}));
|
|
4110
|
+
function computeElementRowMarginPx(el, options) {
|
|
4111
|
+
var _a, _b, _c, _d, _e;
|
|
4112
|
+
const defaultSize = (_a = options.defaultSize) != null ? _a : 16;
|
|
4113
|
+
const defaultBasicRowMarginHeight = (_b = options.defaultBasicRowMarginHeight) != null ? _b : 8;
|
|
4114
|
+
const defaultRowMargin = (_c = options.defaultRowMargin) != null ? _c : 1;
|
|
4115
|
+
const scale = (_d = options.scale) != null ? _d : 1;
|
|
4116
|
+
const fontSize = el.size || defaultSize;
|
|
4117
|
+
let ratio = 1;
|
|
4118
|
+
if (fontSize < 12) {
|
|
4119
|
+
ratio = fontSize / 12;
|
|
4120
|
+
} else if (fontSize > 30) {
|
|
4121
|
+
ratio = 1 + (fontSize - 30) / 30;
|
|
4122
|
+
}
|
|
4123
|
+
return defaultBasicRowMarginHeight * ratio * ((_e = el.rowMargin) != null ? _e : defaultRowMargin) * scale;
|
|
4124
|
+
}
|
|
4125
|
+
function computeElementLineHeightPx(el, options) {
|
|
4126
|
+
var _a;
|
|
4127
|
+
const defaultSize = (_a = options.defaultSize) != null ? _a : 16;
|
|
4128
|
+
const fontSize = el.size || defaultSize;
|
|
4129
|
+
const side = computeElementRowMarginPx(el, options);
|
|
4130
|
+
return fontSize + 2 * side;
|
|
4131
|
+
}
|
|
4089
4132
|
var BackgroundSize;
|
|
4090
4133
|
(function(BackgroundSize2) {
|
|
4091
4134
|
BackgroundSize2["CONTAIN"] = "contain";
|
|
@@ -4098,11 +4141,19 @@ var BackgroundRepeat;
|
|
|
4098
4141
|
BackgroundRepeat2["REPEAT_X"] = "repeat-x";
|
|
4099
4142
|
BackgroundRepeat2["REPEAT_Y"] = "repeat-y";
|
|
4100
4143
|
})(BackgroundRepeat || (BackgroundRepeat = {}));
|
|
4144
|
+
var BackgroundPosition;
|
|
4145
|
+
(function(BackgroundPosition2) {
|
|
4146
|
+
BackgroundPosition2["CENTER"] = "center";
|
|
4147
|
+
BackgroundPosition2["TOP_LEFT"] = "topLeft";
|
|
4148
|
+
})(BackgroundPosition || (BackgroundPosition = {}));
|
|
4101
4149
|
const defaultBackground = {
|
|
4102
4150
|
color: "#FFFFFF",
|
|
4103
4151
|
image: "",
|
|
4104
|
-
size: BackgroundSize.
|
|
4152
|
+
size: BackgroundSize.CONTAIN,
|
|
4105
4153
|
repeat: BackgroundRepeat.NO_REPEAT,
|
|
4154
|
+
opacity: 1,
|
|
4155
|
+
position: BackgroundPosition.CENTER,
|
|
4156
|
+
adaptive: true,
|
|
4106
4157
|
applyPageNumbers: []
|
|
4107
4158
|
};
|
|
4108
4159
|
var VerticalAlign;
|
|
@@ -4162,7 +4213,7 @@ const defaultLabelOption = {
|
|
|
4162
4213
|
};
|
|
4163
4214
|
const defaultImgCaptionOption = {
|
|
4164
4215
|
color: "#666666",
|
|
4165
|
-
font: "
|
|
4216
|
+
font: "SimSun",
|
|
4166
4217
|
size: 12,
|
|
4167
4218
|
top: 5
|
|
4168
4219
|
};
|
|
@@ -4172,9 +4223,10 @@ const defaultLineBreak = {
|
|
|
4172
4223
|
lineWidth: 1.5
|
|
4173
4224
|
};
|
|
4174
4225
|
const defaultPageBreakOption = {
|
|
4175
|
-
font: "
|
|
4226
|
+
font: "SimSun",
|
|
4176
4227
|
fontSize: 12,
|
|
4177
|
-
lineDash: [3, 1]
|
|
4228
|
+
lineDash: [3, 1],
|
|
4229
|
+
visible: true
|
|
4178
4230
|
};
|
|
4179
4231
|
const FORMAT_PLACEHOLDER = {
|
|
4180
4232
|
PAGE_NO: "{pageNo}",
|
|
@@ -4183,7 +4235,7 @@ const FORMAT_PLACEHOLDER = {
|
|
|
4183
4235
|
const defaultPageNumberOption = {
|
|
4184
4236
|
bottom: 60,
|
|
4185
4237
|
size: 12,
|
|
4186
|
-
font: "
|
|
4238
|
+
font: "SimSun",
|
|
4187
4239
|
color: "#000000",
|
|
4188
4240
|
rowFlex: RowFlex.CENTER,
|
|
4189
4241
|
format: FORMAT_PLACEHOLDER.PAGE_NO,
|
|
@@ -4198,7 +4250,7 @@ const defaultPlaceholderOption = {
|
|
|
4198
4250
|
color: "#DCDFE6",
|
|
4199
4251
|
opacity: 1,
|
|
4200
4252
|
size: 16,
|
|
4201
|
-
font: "
|
|
4253
|
+
font: "SimSun"
|
|
4202
4254
|
};
|
|
4203
4255
|
const defaultRadioOption = {
|
|
4204
4256
|
width: 14,
|
|
@@ -4233,7 +4285,7 @@ const defaultWatermarkOption = {
|
|
|
4233
4285
|
color: "#AEB5C0",
|
|
4234
4286
|
opacity: 0.3,
|
|
4235
4287
|
size: 200,
|
|
4236
|
-
font: "
|
|
4288
|
+
font: "SimSun",
|
|
4237
4289
|
repeat: false,
|
|
4238
4290
|
gap: [10, 10],
|
|
4239
4291
|
numberType: NumberType.ARABIC
|
|
@@ -4248,7 +4300,7 @@ var LineNumberType;
|
|
|
4248
4300
|
})(LineNumberType || (LineNumberType = {}));
|
|
4249
4301
|
const defaultLineNumberOption = {
|
|
4250
4302
|
size: 12,
|
|
4251
|
-
font: "
|
|
4303
|
+
font: "SimSun",
|
|
4252
4304
|
color: "#000000",
|
|
4253
4305
|
disabled: true,
|
|
4254
4306
|
right: 20,
|
|
@@ -4394,7 +4446,7 @@ function mergeOption(options = {}) {
|
|
|
4394
4446
|
locale: "zhCN",
|
|
4395
4447
|
defaultType: "TEXT",
|
|
4396
4448
|
defaultColor: "#000000",
|
|
4397
|
-
defaultFont: "
|
|
4449
|
+
defaultFont: "SimSun",
|
|
4398
4450
|
defaultSize: 16,
|
|
4399
4451
|
minSize: 5,
|
|
4400
4452
|
maxSize: 72,
|
|
@@ -4419,7 +4471,7 @@ function mergeOption(options = {}) {
|
|
|
4419
4471
|
resizerSize: 5,
|
|
4420
4472
|
marginIndicatorSize: 35,
|
|
4421
4473
|
marginIndicatorColor: "#BABABA",
|
|
4422
|
-
margins: [
|
|
4474
|
+
margins: [0, 0, 0, 0],
|
|
4423
4475
|
pageMode: PageMode.PAGING,
|
|
4424
4476
|
renderMode: RenderMode.SPEED,
|
|
4425
4477
|
defaultHyperlinkColor: "#0000FF",
|
|
@@ -4865,6 +4917,7 @@ function formatElementList(elementList, options) {
|
|
|
4865
4917
|
}
|
|
4866
4918
|
if (el.type === ElementType.IMAGE || el.type === ElementType.BLOCK) {
|
|
4867
4919
|
el.id = el.id || getUUID();
|
|
4920
|
+
el.verticalAlign = "text-top";
|
|
4868
4921
|
}
|
|
4869
4922
|
if (el.type === ElementType.LATEX) {
|
|
4870
4923
|
const { svg, width, height } = LaTexParticle.convertLaTextToSVG(el.value);
|
|
@@ -5195,6 +5248,68 @@ function convertRowFlexToJustifyContent(rowFlex) {
|
|
|
5195
5248
|
return "flex-start";
|
|
5196
5249
|
}
|
|
5197
5250
|
}
|
|
5251
|
+
function isFloatOverlayImage(element) {
|
|
5252
|
+
return !!element && element.type === ElementType.IMAGE && (element.imgDisplay === ImageDisplay.SURROUND || element.imgDisplay === ImageDisplay.FLOAT_TOP || element.imgDisplay === ImageDisplay.FLOAT_BOTTOM);
|
|
5253
|
+
}
|
|
5254
|
+
function isFloatOverlayOnlyParagraph(p) {
|
|
5255
|
+
var _a, _b;
|
|
5256
|
+
let hasFloatImg = false;
|
|
5257
|
+
for (const node of Array.from(p.childNodes)) {
|
|
5258
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
5259
|
+
if ((_a = node.textContent) == null ? void 0 : _a.trim())
|
|
5260
|
+
return false;
|
|
5261
|
+
continue;
|
|
5262
|
+
}
|
|
5263
|
+
if (node.nodeType !== Node.ELEMENT_NODE)
|
|
5264
|
+
continue;
|
|
5265
|
+
const el = node;
|
|
5266
|
+
if (el.nodeName === "IMG") {
|
|
5267
|
+
const display = el.getAttribute("data-img-display");
|
|
5268
|
+
if (display === ImageDisplay.FLOAT_TOP || display === ImageDisplay.FLOAT_BOTTOM || display === ImageDisplay.SURROUND) {
|
|
5269
|
+
hasFloatImg = true;
|
|
5270
|
+
continue;
|
|
5271
|
+
}
|
|
5272
|
+
return false;
|
|
5273
|
+
}
|
|
5274
|
+
if ((_b = el.textContent) == null ? void 0 : _b.trim())
|
|
5275
|
+
return false;
|
|
5276
|
+
}
|
|
5277
|
+
return hasFloatImg;
|
|
5278
|
+
}
|
|
5279
|
+
function groupElementListByRowFlex(elementList) {
|
|
5280
|
+
var _a;
|
|
5281
|
+
const elementListGroupList = [];
|
|
5282
|
+
if (!elementList.length)
|
|
5283
|
+
return elementListGroupList;
|
|
5284
|
+
let currentRowFlex = ((_a = elementList[0]) == null ? void 0 : _a.rowFlex) || null;
|
|
5285
|
+
elementListGroupList.push({
|
|
5286
|
+
rowFlex: currentRowFlex,
|
|
5287
|
+
data: [elementList[0]]
|
|
5288
|
+
});
|
|
5289
|
+
for (let e = 1; e < elementList.length; e++) {
|
|
5290
|
+
const element = elementList[e];
|
|
5291
|
+
const prev = elementList[e - 1];
|
|
5292
|
+
const rowFlex = element.rowFlex || null;
|
|
5293
|
+
const curIsFloatOverlay = isFloatOverlayImage(element);
|
|
5294
|
+
const prevIsFloatOverlay = isFloatOverlayImage(prev);
|
|
5295
|
+
const bothImages = element.type === ElementType.IMAGE && (prev == null ? void 0 : prev.type) === ElementType.IMAGE;
|
|
5296
|
+
if (currentRowFlex === rowFlex && !getIsBlockElement(element) && !getIsBlockElement(prev) || bothImages || curIsFloatOverlay || prevIsFloatOverlay) {
|
|
5297
|
+
const lastElementListGroup = elementListGroupList[elementListGroupList.length - 1];
|
|
5298
|
+
lastElementListGroup.data.push(element);
|
|
5299
|
+
} else {
|
|
5300
|
+
elementListGroupList.push({
|
|
5301
|
+
rowFlex,
|
|
5302
|
+
data: [element]
|
|
5303
|
+
});
|
|
5304
|
+
currentRowFlex = rowFlex;
|
|
5305
|
+
}
|
|
5306
|
+
}
|
|
5307
|
+
for (let g = 0; g < elementListGroupList.length; g++) {
|
|
5308
|
+
const elementListGroup = elementListGroupList[g];
|
|
5309
|
+
elementListGroup.data = zipElementList(elementListGroup.data);
|
|
5310
|
+
}
|
|
5311
|
+
return elementListGroupList;
|
|
5312
|
+
}
|
|
5198
5313
|
function isTextLikeElement(element) {
|
|
5199
5314
|
return !element.type || TEXTLIKE_ELEMENT_TYPE.includes(element.type);
|
|
5200
5315
|
}
|
|
@@ -5251,8 +5366,14 @@ function formatElementContext(sourceElementList, formatElementList2, anchorIndex
|
|
|
5251
5366
|
cloneProperty(cloneAttr, copyElement, targetElement);
|
|
5252
5367
|
}
|
|
5253
5368
|
}
|
|
5369
|
+
function resolveExportFont(element, options) {
|
|
5370
|
+
return element.font || options.defaultFont || "SimSun";
|
|
5371
|
+
}
|
|
5372
|
+
function applyExportFontToDom(dom, element, options) {
|
|
5373
|
+
dom.style.setProperty("font-family", resolveExportFont(element, options));
|
|
5374
|
+
}
|
|
5254
5375
|
function convertElementToDom(element, options) {
|
|
5255
|
-
var _a
|
|
5376
|
+
var _a;
|
|
5256
5377
|
let tagName = "span";
|
|
5257
5378
|
if (element.type === ElementType.SUPERSCRIPT) {
|
|
5258
5379
|
tagName = "sup";
|
|
@@ -5260,7 +5381,7 @@ function convertElementToDom(element, options) {
|
|
|
5260
5381
|
tagName = "sub";
|
|
5261
5382
|
}
|
|
5262
5383
|
const dom = document.createElement(tagName);
|
|
5263
|
-
dom
|
|
5384
|
+
applyExportFontToDom(dom, element, options);
|
|
5264
5385
|
if (element.rowFlex) {
|
|
5265
5386
|
dom.style.textAlign = convertRowFlexToTextAlign(element.rowFlex);
|
|
5266
5387
|
}
|
|
@@ -5287,12 +5408,80 @@ function convertElementToDom(element, options) {
|
|
|
5287
5408
|
if (element.type) {
|
|
5288
5409
|
dom.setAttribute("data-type", element.type);
|
|
5289
5410
|
}
|
|
5290
|
-
|
|
5291
|
-
|
|
5411
|
+
applyLineHeightExportToDom(dom, element, options);
|
|
5412
|
+
if (element.textIndent) {
|
|
5413
|
+
dom.style.textIndent = `${element.textIndent}px`;
|
|
5414
|
+
}
|
|
5415
|
+
if (element.marginLeft) {
|
|
5416
|
+
dom.style.marginInlineStart = `${element.marginLeft}px`;
|
|
5417
|
+
}
|
|
5418
|
+
if (element.marginRight) {
|
|
5419
|
+
dom.style.marginInlineEnd = `${element.marginRight}px`;
|
|
5420
|
+
}
|
|
5421
|
+
if (element.marginTop) {
|
|
5422
|
+
dom.style.marginTop = `${element.marginTop}px`;
|
|
5423
|
+
}
|
|
5424
|
+
if (element.minHeight) {
|
|
5425
|
+
dom.style.minHeight = `${element.minHeight}px`;
|
|
5426
|
+
}
|
|
5427
|
+
if (element.whiteSpace) {
|
|
5428
|
+
dom.style.whiteSpace = element.whiteSpace;
|
|
5292
5429
|
}
|
|
5293
5430
|
dom.innerText = element.value.replace(new RegExp(`${ZERO}`, "g"), "\n");
|
|
5294
5431
|
return dom;
|
|
5295
5432
|
}
|
|
5433
|
+
function applyLineHeightExportToDom(dom, element, options) {
|
|
5434
|
+
var _a;
|
|
5435
|
+
const rowMargin = (_a = element.rowMargin) != null ? _a : options.defaultRowMargin;
|
|
5436
|
+
const lineHeightPx = Math.round(computeElementLineHeightPx(element, options));
|
|
5437
|
+
dom.style.lineHeight = `${lineHeightPx}px`;
|
|
5438
|
+
dom.setAttribute("data-row-margin", String(rowMargin));
|
|
5439
|
+
dom.setAttribute("data-line-height", String(lineHeightPx));
|
|
5440
|
+
}
|
|
5441
|
+
function applyParagraphStyleToDom(dom, element, options) {
|
|
5442
|
+
dom.style.margin = "0";
|
|
5443
|
+
if (element.rowFlex) {
|
|
5444
|
+
dom.style.textAlign = convertRowFlexToTextAlign(element.rowFlex);
|
|
5445
|
+
}
|
|
5446
|
+
applyLineHeightExportToDom(dom, element, options);
|
|
5447
|
+
if (element.textIndent) {
|
|
5448
|
+
dom.style.textIndent = `${element.textIndent}px`;
|
|
5449
|
+
}
|
|
5450
|
+
if (element.marginLeft) {
|
|
5451
|
+
dom.style.marginInlineStart = `${element.marginLeft}px`;
|
|
5452
|
+
}
|
|
5453
|
+
if (element.marginRight) {
|
|
5454
|
+
dom.style.marginInlineEnd = `${element.marginRight}px`;
|
|
5455
|
+
}
|
|
5456
|
+
if (element.marginTop) {
|
|
5457
|
+
dom.style.marginTop = `${element.marginTop}px`;
|
|
5458
|
+
}
|
|
5459
|
+
const minHeight = element.minHeight || element.size;
|
|
5460
|
+
if (minHeight) {
|
|
5461
|
+
dom.style.minHeight = `${minHeight}px`;
|
|
5462
|
+
}
|
|
5463
|
+
if (element.whiteSpace) {
|
|
5464
|
+
dom.style.whiteSpace = element.whiteSpace;
|
|
5465
|
+
} else {
|
|
5466
|
+
dom.style.whiteSpace = "pre-wrap";
|
|
5467
|
+
}
|
|
5468
|
+
}
|
|
5469
|
+
function convertInlineElementToDom(element, options) {
|
|
5470
|
+
const dom = convertElementToDom(element, options);
|
|
5471
|
+
dom.style.textIndent = "";
|
|
5472
|
+
dom.style.marginInlineStart = "";
|
|
5473
|
+
dom.style.marginInlineEnd = "";
|
|
5474
|
+
dom.style.marginTop = "";
|
|
5475
|
+
dom.style.textAlign = "";
|
|
5476
|
+
dom.style.minHeight = "";
|
|
5477
|
+
if (element.whiteSpace) {
|
|
5478
|
+
dom.style.whiteSpace = element.whiteSpace;
|
|
5479
|
+
} else {
|
|
5480
|
+
dom.style.whiteSpace = "pre-wrap";
|
|
5481
|
+
}
|
|
5482
|
+
applyExportFontToDom(dom, element, options);
|
|
5483
|
+
return dom;
|
|
5484
|
+
}
|
|
5296
5485
|
function splitListElement(elementList) {
|
|
5297
5486
|
let curListIndex = 0;
|
|
5298
5487
|
const listElementListMap = /* @__PURE__ */ new Map();
|
|
@@ -5325,44 +5514,415 @@ function splitListElement(elementList) {
|
|
|
5325
5514
|
}
|
|
5326
5515
|
return listElementListMap;
|
|
5327
5516
|
}
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5517
|
+
const IMAGE_DISPLAY_VALUES = Object.values(ImageDisplay);
|
|
5518
|
+
const htmlFloatOffsetMap = /* @__PURE__ */ new Map();
|
|
5519
|
+
const htmlImgRowLeftMap = /* @__PURE__ */ new Map();
|
|
5520
|
+
function getHtmlFloatOffsetKey(element) {
|
|
5521
|
+
var _a, _b, _c;
|
|
5522
|
+
const p = element.imgFloatPosition;
|
|
5523
|
+
return [
|
|
5524
|
+
element.imgDisplay || "",
|
|
5525
|
+
element.width || 0,
|
|
5526
|
+
element.height || 0,
|
|
5527
|
+
(_a = p == null ? void 0 : p.x) != null ? _a : "",
|
|
5528
|
+
(_b = p == null ? void 0 : p.y) != null ? _b : "",
|
|
5529
|
+
(_c = p == null ? void 0 : p.pageNo) != null ? _c : "",
|
|
5530
|
+
typeof element.value === "string" ? element.value.slice(0, 80) : ""
|
|
5531
|
+
].join("|");
|
|
5532
|
+
}
|
|
5533
|
+
function isParagraphBreakElement(element) {
|
|
5534
|
+
if (element.type === ElementType.PAGE_BREAK)
|
|
5535
|
+
return true;
|
|
5536
|
+
if (element.type === ElementType.TABLE)
|
|
5537
|
+
return true;
|
|
5538
|
+
if (element.type === ElementType.TITLE)
|
|
5539
|
+
return true;
|
|
5540
|
+
if (element.type === ElementType.LIST)
|
|
5541
|
+
return true;
|
|
5542
|
+
if (element.type === ElementType.SEPARATOR)
|
|
5543
|
+
return true;
|
|
5544
|
+
const value = element.value;
|
|
5545
|
+
return value === WRAP || value === "\n" || value === ZERO;
|
|
5546
|
+
}
|
|
5547
|
+
function getParagraphPageOrigin(elementList, positionList, imageIndex) {
|
|
5548
|
+
var _a, _b;
|
|
5549
|
+
let start = imageIndex;
|
|
5550
|
+
while (start > 0) {
|
|
5551
|
+
if (isParagraphBreakElement(elementList[start - 1]))
|
|
5552
|
+
break;
|
|
5553
|
+
start--;
|
|
5554
|
+
}
|
|
5555
|
+
let originX = Number.POSITIVE_INFINITY;
|
|
5556
|
+
let originY = Number.POSITIVE_INFINITY;
|
|
5557
|
+
for (let i = start; i < elementList.length; i++) {
|
|
5558
|
+
if (i > start && isParagraphBreakElement(elementList[i]))
|
|
5559
|
+
break;
|
|
5560
|
+
if (elementList[i].imgDisplay === ImageDisplay.FLOAT_TOP || elementList[i].imgDisplay === ImageDisplay.FLOAT_BOTTOM || elementList[i].imgDisplay === ImageDisplay.SURROUND) {
|
|
5561
|
+
continue;
|
|
5350
5562
|
}
|
|
5563
|
+
const pos = positionList[i];
|
|
5564
|
+
if (!((_a = pos == null ? void 0 : pos.coordinate) == null ? void 0 : _a.leftTop))
|
|
5565
|
+
continue;
|
|
5566
|
+
const [x, y] = pos.coordinate.leftTop;
|
|
5567
|
+
originX = Math.min(originX, x);
|
|
5568
|
+
originY = Math.min(originY, y);
|
|
5351
5569
|
}
|
|
5352
|
-
|
|
5353
|
-
const
|
|
5354
|
-
|
|
5570
|
+
if (!Number.isFinite(originX) || !Number.isFinite(originY)) {
|
|
5571
|
+
const flowPos = positionList[imageIndex];
|
|
5572
|
+
if ((_b = flowPos == null ? void 0 : flowPos.coordinate) == null ? void 0 : _b.leftTop) {
|
|
5573
|
+
return {
|
|
5574
|
+
x: flowPos.coordinate.leftTop[0],
|
|
5575
|
+
y: flowPos.coordinate.leftTop[1]
|
|
5576
|
+
};
|
|
5577
|
+
}
|
|
5578
|
+
return { x: 0, y: 0 };
|
|
5579
|
+
}
|
|
5580
|
+
return { x: originX, y: originY };
|
|
5581
|
+
}
|
|
5582
|
+
function attachHtmlFloatOffset(elementList, positionList, scale = 1) {
|
|
5583
|
+
const safeScale = scale || 1;
|
|
5584
|
+
for (let i = 0; i < elementList.length; i++) {
|
|
5585
|
+
const element = elementList[i];
|
|
5586
|
+
if (element.type !== ElementType.IMAGE || element.imgDisplay !== ImageDisplay.FLOAT_TOP && element.imgDisplay !== ImageDisplay.FLOAT_BOTTOM && element.imgDisplay !== ImageDisplay.SURROUND || !element.imgFloatPosition) {
|
|
5587
|
+
continue;
|
|
5588
|
+
}
|
|
5589
|
+
const origin = getParagraphPageOrigin(elementList, positionList, i);
|
|
5590
|
+
htmlFloatOffsetMap.set(getHtmlFloatOffsetKey(element), {
|
|
5591
|
+
left: (element.imgFloatPosition.x - origin.x) / safeScale,
|
|
5592
|
+
top: (element.imgFloatPosition.y - origin.y) / safeScale
|
|
5593
|
+
});
|
|
5594
|
+
}
|
|
5595
|
+
}
|
|
5596
|
+
function clearHtmlFloatOffset() {
|
|
5597
|
+
htmlFloatOffsetMap.clear();
|
|
5598
|
+
htmlImgRowLeftMap.clear();
|
|
5599
|
+
}
|
|
5600
|
+
function attachHtmlImgRowLeft(elementList, positionList, scale = 1) {
|
|
5601
|
+
var _a, _b, _c, _d, _e;
|
|
5602
|
+
const safeScale = scale || 1;
|
|
5603
|
+
const rowLeftMap = /* @__PURE__ */ new Map();
|
|
5604
|
+
for (const pos of positionList) {
|
|
5605
|
+
if (!((_a = pos == null ? void 0 : pos.coordinate) == null ? void 0 : _a.leftTop))
|
|
5606
|
+
continue;
|
|
5607
|
+
const key = `${pos.pageNo}|${pos.rowIndex}`;
|
|
5608
|
+
const x = pos.coordinate.leftTop[0];
|
|
5609
|
+
const prev = rowLeftMap.get(key);
|
|
5610
|
+
if (prev === void 0 || x < prev) {
|
|
5611
|
+
rowLeftMap.set(key, x);
|
|
5612
|
+
}
|
|
5613
|
+
}
|
|
5614
|
+
for (let i = 0; i < elementList.length; i++) {
|
|
5615
|
+
const element = elementList[i];
|
|
5616
|
+
if (element.type === ElementType.TABLE && element.trList) {
|
|
5617
|
+
for (const tr of element.trList) {
|
|
5618
|
+
for (const td of tr.tdList) {
|
|
5619
|
+
if (((_b = td.value) == null ? void 0 : _b.length) && ((_c = td.positionList) == null ? void 0 : _c.length)) {
|
|
5620
|
+
attachHtmlImgRowLeft(td.value, td.positionList, scale);
|
|
5621
|
+
}
|
|
5622
|
+
}
|
|
5623
|
+
}
|
|
5624
|
+
continue;
|
|
5625
|
+
}
|
|
5626
|
+
if (element.type !== ElementType.IMAGE)
|
|
5627
|
+
continue;
|
|
5628
|
+
const pos = positionList[i];
|
|
5629
|
+
if (!((_d = pos == null ? void 0 : pos.coordinate) == null ? void 0 : _d.leftTop))
|
|
5630
|
+
continue;
|
|
5631
|
+
const rowKey = `${pos.pageNo}|${pos.rowIndex}`;
|
|
5632
|
+
const rowLeft = (_e = rowLeftMap.get(rowKey)) != null ? _e : pos.coordinate.leftTop[0];
|
|
5633
|
+
const isFloat = element.imgDisplay === ImageDisplay.FLOAT_TOP || element.imgDisplay === ImageDisplay.FLOAT_BOTTOM || element.imgDisplay === ImageDisplay.SURROUND;
|
|
5634
|
+
const imageX = isFloat && element.imgFloatPosition ? element.imgFloatPosition.x : pos.coordinate.leftTop[0];
|
|
5635
|
+
const dist = Math.round((imageX - rowLeft) / safeScale * 100) / 100;
|
|
5636
|
+
htmlImgRowLeftMap.set(getHtmlFloatOffsetKey(element), dist);
|
|
5637
|
+
}
|
|
5638
|
+
}
|
|
5639
|
+
const HTML_FLOAT_TOP_ADJUST_PX = -2;
|
|
5640
|
+
function isFloatOverlayDisplay(display) {
|
|
5641
|
+
return display === ImageDisplay.SURROUND || display === ImageDisplay.FLOAT_TOP || display === ImageDisplay.FLOAT_BOTTOM;
|
|
5642
|
+
}
|
|
5643
|
+
function reconcileHtmlFloatPositions(elementList, positionList, scale = 1) {
|
|
5644
|
+
const safeScale = scale || 1;
|
|
5645
|
+
let changed = false;
|
|
5646
|
+
for (let i = 0; i < elementList.length; i++) {
|
|
5647
|
+
const element = elementList[i];
|
|
5648
|
+
const pos = element.imgFloatPosition;
|
|
5649
|
+
if (element.type !== ElementType.IMAGE || !isFloatOverlayDisplay(element.imgDisplay) || !pos || pos.htmlLeft === void 0 || pos.htmlTop === void 0) {
|
|
5650
|
+
continue;
|
|
5651
|
+
}
|
|
5652
|
+
const origin = getParagraphPageOrigin(elementList, positionList, i);
|
|
5653
|
+
const nextX = origin.x + pos.htmlLeft * safeScale;
|
|
5654
|
+
const nextY = origin.y + (pos.htmlTop - HTML_FLOAT_TOP_ADJUST_PX) * safeScale;
|
|
5655
|
+
if (Math.abs(nextX - pos.x) > 0.01 || Math.abs(nextY - pos.y) > 0.01) {
|
|
5656
|
+
pos.x = nextX;
|
|
5657
|
+
pos.y = nextY;
|
|
5658
|
+
changed = true;
|
|
5659
|
+
}
|
|
5660
|
+
delete pos.htmlLeft;
|
|
5661
|
+
delete pos.htmlTop;
|
|
5662
|
+
}
|
|
5663
|
+
return changed;
|
|
5664
|
+
}
|
|
5665
|
+
function buildImageWrapStyle(element) {
|
|
5666
|
+
const styles = ["vertical-align: text-top"];
|
|
5667
|
+
const { imgDisplay, imgFloatPosition } = element;
|
|
5668
|
+
const offset = htmlFloatOffsetMap.get(getHtmlFloatOffsetKey(element));
|
|
5669
|
+
const leftPx = offset ? offset.left : imgFloatPosition ? imgFloatPosition.x : void 0;
|
|
5670
|
+
const topBase = offset ? offset.top : imgFloatPosition ? imgFloatPosition.y : void 0;
|
|
5671
|
+
const topPx = topBase !== void 0 ? topBase + HTML_FLOAT_TOP_ADJUST_PX : void 0;
|
|
5672
|
+
if (imgDisplay === ImageDisplay.SURROUND) {
|
|
5673
|
+
styles.push("position: absolute", "z-index: 1");
|
|
5674
|
+
if (leftPx !== void 0) {
|
|
5675
|
+
styles.push(`left: ${leftPx}px`);
|
|
5676
|
+
}
|
|
5677
|
+
if (topPx !== void 0) {
|
|
5678
|
+
styles.push(`top: ${topPx}px`);
|
|
5679
|
+
}
|
|
5680
|
+
} else if (imgDisplay === ImageDisplay.FLOAT_TOP) {
|
|
5681
|
+
styles.push("position: absolute", "z-index: 2");
|
|
5682
|
+
if (leftPx !== void 0) {
|
|
5683
|
+
styles.push(`left: ${leftPx}px`);
|
|
5684
|
+
}
|
|
5685
|
+
if (topPx !== void 0) {
|
|
5686
|
+
styles.push(`top: ${topPx}px`);
|
|
5687
|
+
}
|
|
5688
|
+
} else if (imgDisplay === ImageDisplay.FLOAT_BOTTOM) {
|
|
5689
|
+
styles.push("position: absolute", "z-index: -1");
|
|
5690
|
+
if (leftPx !== void 0) {
|
|
5691
|
+
styles.push(`left: ${leftPx}px`);
|
|
5692
|
+
}
|
|
5693
|
+
if (topPx !== void 0) {
|
|
5694
|
+
styles.push(`top: ${topPx}px`);
|
|
5695
|
+
}
|
|
5696
|
+
} else if (imgDisplay === ImageDisplay.BLOCK) {
|
|
5697
|
+
styles.push("display: block");
|
|
5698
|
+
} else if (imgDisplay === ImageDisplay.INLINE) {
|
|
5699
|
+
styles.push("display: block", "clear: both");
|
|
5700
|
+
}
|
|
5701
|
+
return styles.join("; ");
|
|
5702
|
+
}
|
|
5703
|
+
function applyImageWrapToDom(img, element) {
|
|
5704
|
+
img.setAttribute("style", buildImageWrapStyle(element));
|
|
5705
|
+
if (element.imgDisplay) {
|
|
5706
|
+
img.setAttribute("data-img-display", element.imgDisplay);
|
|
5707
|
+
}
|
|
5708
|
+
if (element.imgFloatPosition) {
|
|
5709
|
+
const { x, y, pageNo } = element.imgFloatPosition;
|
|
5710
|
+
img.setAttribute("data-img-float-position", JSON.stringify(pageNo === void 0 ? { x, y } : { x, y, pageNo }));
|
|
5711
|
+
}
|
|
5712
|
+
const rowLeft = htmlImgRowLeftMap.get(getHtmlFloatOffsetKey(element));
|
|
5713
|
+
if (rowLeft !== void 0) {
|
|
5714
|
+
img.setAttribute("data-img-row-left", String(rowLeft));
|
|
5715
|
+
}
|
|
5716
|
+
}
|
|
5717
|
+
function relocateFloatOverlayImages(root) {
|
|
5718
|
+
const imgs = Array.from(root.querySelectorAll('img[data-img-display="float-top"], img[data-img-display="float-bottom"], img[data-img-display="surround"]'));
|
|
5719
|
+
for (const img of imgs) {
|
|
5720
|
+
const parent = img.parentElement;
|
|
5721
|
+
if (parent && (parent.nodeName === "P" || /^H[1-6]$/.test(parent.nodeName))) {
|
|
5722
|
+
parent.style.position = "relative";
|
|
5723
|
+
continue;
|
|
5724
|
+
}
|
|
5725
|
+
let target = null;
|
|
5726
|
+
let next = img.nextElementSibling;
|
|
5727
|
+
while (next) {
|
|
5728
|
+
if (next.nodeName === "P" || /^H[1-6]$/.test(next.nodeName)) {
|
|
5729
|
+
target = next;
|
|
5730
|
+
break;
|
|
5731
|
+
}
|
|
5732
|
+
if (next.nodeName === "DIV") {
|
|
5733
|
+
const innerP = next.querySelector("p,h1,h2,h3,h4,h5,h6");
|
|
5734
|
+
if (innerP) {
|
|
5735
|
+
target = innerP;
|
|
5736
|
+
break;
|
|
5737
|
+
}
|
|
5738
|
+
}
|
|
5739
|
+
if (next.getAttribute("data-type") === ElementType.PAGE_BREAK) {
|
|
5740
|
+
break;
|
|
5741
|
+
}
|
|
5742
|
+
next = next.nextElementSibling;
|
|
5743
|
+
}
|
|
5744
|
+
if (!target) {
|
|
5745
|
+
let prev = img.previousElementSibling;
|
|
5746
|
+
while (prev) {
|
|
5747
|
+
if (prev.nodeName === "P" || /^H[1-6]$/.test(prev.nodeName)) {
|
|
5748
|
+
target = prev;
|
|
5749
|
+
break;
|
|
5750
|
+
}
|
|
5751
|
+
if (prev.nodeName === "DIV") {
|
|
5752
|
+
const paras = prev.querySelectorAll("p,h1,h2,h3,h4,h5,h6");
|
|
5753
|
+
if (paras.length) {
|
|
5754
|
+
target = paras[paras.length - 1];
|
|
5755
|
+
break;
|
|
5756
|
+
}
|
|
5757
|
+
}
|
|
5758
|
+
prev = prev.previousElementSibling;
|
|
5759
|
+
}
|
|
5760
|
+
}
|
|
5761
|
+
if (target) {
|
|
5762
|
+
const targetEl = target;
|
|
5763
|
+
targetEl.style.position = "relative";
|
|
5764
|
+
targetEl.append(img);
|
|
5765
|
+
} else if (parent) {
|
|
5766
|
+
const p = document.createElement("p");
|
|
5767
|
+
p.style.position = "relative";
|
|
5768
|
+
p.style.margin = "0";
|
|
5769
|
+
parent.insertBefore(p, img);
|
|
5770
|
+
p.append(img);
|
|
5771
|
+
}
|
|
5772
|
+
}
|
|
5773
|
+
mergeFloatOnlyParagraphs(root);
|
|
5774
|
+
}
|
|
5775
|
+
function mergeFloatOnlyParagraphs(root) {
|
|
5776
|
+
let i = 0;
|
|
5777
|
+
while (i < root.children.length) {
|
|
5778
|
+
const el = root.children[i];
|
|
5779
|
+
if (el.nodeName !== "P" || !isFloatOverlayOnlyParagraph(el)) {
|
|
5780
|
+
i++;
|
|
5781
|
+
continue;
|
|
5782
|
+
}
|
|
5783
|
+
const host = el;
|
|
5784
|
+
host.style.position = "relative";
|
|
5785
|
+
const j = i + 1;
|
|
5786
|
+
while (j < root.children.length) {
|
|
5787
|
+
const next = root.children[j];
|
|
5788
|
+
if (next.nodeName === "P" && isFloatOverlayOnlyParagraph(next)) {
|
|
5789
|
+
Array.from(next.querySelectorAll("img")).forEach((img) => host.append(img));
|
|
5790
|
+
next.remove();
|
|
5791
|
+
continue;
|
|
5792
|
+
}
|
|
5793
|
+
if (next.nodeName === "P") {
|
|
5794
|
+
next.style.position = "relative";
|
|
5795
|
+
Array.from(host.querySelectorAll("img")).forEach((img) => {
|
|
5796
|
+
next.insertBefore(img, next.firstChild);
|
|
5797
|
+
});
|
|
5798
|
+
host.remove();
|
|
5799
|
+
break;
|
|
5800
|
+
}
|
|
5801
|
+
break;
|
|
5802
|
+
}
|
|
5803
|
+
i++;
|
|
5804
|
+
}
|
|
5805
|
+
}
|
|
5806
|
+
function applyImageWrapFromDom(img, element) {
|
|
5807
|
+
const displayAttr = img.getAttribute("data-img-display");
|
|
5808
|
+
if (displayAttr && IMAGE_DISPLAY_VALUES.includes(displayAttr)) {
|
|
5809
|
+
element.imgDisplay = displayAttr;
|
|
5810
|
+
} else {
|
|
5811
|
+
const { float, position, zIndex, display, clear } = img.style;
|
|
5812
|
+
if (float === "left" || float === "right") {
|
|
5813
|
+
element.imgDisplay = ImageDisplay.SURROUND;
|
|
5814
|
+
} else if (position === "absolute") {
|
|
5815
|
+
const z = Number.parseInt(zIndex || "0", 10);
|
|
5816
|
+
element.imgDisplay = z < 0 ? ImageDisplay.FLOAT_BOTTOM : ImageDisplay.FLOAT_TOP;
|
|
5817
|
+
} else if (display === "block" && clear === "both") {
|
|
5818
|
+
element.imgDisplay = ImageDisplay.INLINE;
|
|
5819
|
+
} else if (display === "block") {
|
|
5820
|
+
element.imgDisplay = ImageDisplay.BLOCK;
|
|
5821
|
+
}
|
|
5822
|
+
}
|
|
5823
|
+
const floatPosAttr = img.getAttribute("data-img-float-position");
|
|
5824
|
+
if (floatPosAttr) {
|
|
5825
|
+
try {
|
|
5826
|
+
element.imgFloatPosition = JSON.parse(floatPosAttr);
|
|
5827
|
+
} catch {
|
|
5828
|
+
}
|
|
5829
|
+
}
|
|
5830
|
+
if (isFloatOverlayDisplay(element.imgDisplay)) {
|
|
5831
|
+
const left2 = Number.parseFloat(img.style.left);
|
|
5832
|
+
const top = Number.parseFloat(img.style.top);
|
|
5833
|
+
if (!Number.isNaN(left2) && !Number.isNaN(top)) {
|
|
5834
|
+
if (!element.imgFloatPosition) {
|
|
5835
|
+
element.imgFloatPosition = { x: left2, y: top };
|
|
5836
|
+
} else if (element.imgFloatPosition.htmlLeft === void 0 || element.imgFloatPosition.htmlTop === void 0) {
|
|
5837
|
+
element.imgFloatPosition.htmlLeft = left2;
|
|
5838
|
+
element.imgFloatPosition.htmlTop = top;
|
|
5839
|
+
}
|
|
5840
|
+
}
|
|
5355
5841
|
}
|
|
5356
|
-
return elementListGroupList;
|
|
5357
5842
|
}
|
|
5358
5843
|
function createDomFromElementList(elementList, options) {
|
|
5359
5844
|
const editorOptions = mergeOption(options);
|
|
5360
5845
|
function buildDom(payload) {
|
|
5361
5846
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
5362
5847
|
const clipboardDom2 = document.createElement("div");
|
|
5848
|
+
clipboardDom2.style.position = "relative";
|
|
5849
|
+
let paragraphDom = null;
|
|
5850
|
+
const flushParagraph = () => {
|
|
5851
|
+
if (paragraphDom) {
|
|
5852
|
+
clipboardDom2.append(paragraphDom);
|
|
5853
|
+
paragraphDom = null;
|
|
5854
|
+
}
|
|
5855
|
+
};
|
|
5856
|
+
const ensureParagraph = (styleSource) => {
|
|
5857
|
+
if (!paragraphDom) {
|
|
5858
|
+
paragraphDom = document.createElement("p");
|
|
5859
|
+
applyParagraphStyleToDom(paragraphDom, styleSource, editorOptions);
|
|
5860
|
+
}
|
|
5861
|
+
};
|
|
5862
|
+
const emitEmptyParagraph = (styleSource) => {
|
|
5863
|
+
ensureParagraph(styleSource);
|
|
5864
|
+
if (!paragraphDom.childNodes.length) {
|
|
5865
|
+
const dom = convertInlineElementToDom(styleSource, editorOptions);
|
|
5866
|
+
dom.innerText = NBSP;
|
|
5867
|
+
paragraphDom.append(dom);
|
|
5868
|
+
}
|
|
5869
|
+
flushParagraph();
|
|
5870
|
+
};
|
|
5871
|
+
const appendInlineNode = (node, styleSource) => {
|
|
5872
|
+
ensureParagraph(styleSource);
|
|
5873
|
+
paragraphDom.append(node);
|
|
5874
|
+
};
|
|
5875
|
+
const shouldEmitEmptyParagraph = (next) => {
|
|
5876
|
+
if (!next)
|
|
5877
|
+
return true;
|
|
5878
|
+
if (next.listWrap)
|
|
5879
|
+
return false;
|
|
5880
|
+
if (next.value === ZERO || next.value === WRAP || next.value === "\n") {
|
|
5881
|
+
return true;
|
|
5882
|
+
}
|
|
5883
|
+
return next.type === ElementType.TABLE || next.type === ElementType.TITLE || next.type === ElementType.LIST || next.type === ElementType.PAGE_BREAK || next.type === ElementType.SEPARATOR;
|
|
5884
|
+
};
|
|
5885
|
+
const appendTextRuns = (element, rawText, index2) => {
|
|
5886
|
+
let text = rawText;
|
|
5887
|
+
if (!text)
|
|
5888
|
+
return;
|
|
5889
|
+
text = text.replace(new RegExp(`${ZERO}`, "g"), "\n");
|
|
5890
|
+
if (/^\n+$/.test(text)) {
|
|
5891
|
+
const next = payload[index2 + 1];
|
|
5892
|
+
for (let i = 0; i < text.length; i++) {
|
|
5893
|
+
if (paragraphDom && paragraphDom.childNodes.length > 0) {
|
|
5894
|
+
if (isFloatOverlayOnlyParagraph(paragraphDom)) {
|
|
5895
|
+
continue;
|
|
5896
|
+
}
|
|
5897
|
+
flushParagraph();
|
|
5898
|
+
if (shouldEmitEmptyParagraph(next)) {
|
|
5899
|
+
emitEmptyParagraph(element);
|
|
5900
|
+
}
|
|
5901
|
+
} else if (shouldEmitEmptyParagraph(next)) {
|
|
5902
|
+
emitEmptyParagraph(element);
|
|
5903
|
+
}
|
|
5904
|
+
}
|
|
5905
|
+
return;
|
|
5906
|
+
}
|
|
5907
|
+
const parts = text.split("\n");
|
|
5908
|
+
for (let i = 0; i < parts.length; i++) {
|
|
5909
|
+
if (i > 0) {
|
|
5910
|
+
flushParagraph();
|
|
5911
|
+
}
|
|
5912
|
+
const part = parts[i];
|
|
5913
|
+
if (!part) {
|
|
5914
|
+
emitEmptyParagraph(element);
|
|
5915
|
+
continue;
|
|
5916
|
+
}
|
|
5917
|
+
const dom = convertInlineElementToDom(element, editorOptions);
|
|
5918
|
+
dom.innerText = part;
|
|
5919
|
+
appendInlineNode(dom, element);
|
|
5920
|
+
}
|
|
5921
|
+
};
|
|
5363
5922
|
for (let e = 0; e < payload.length; e++) {
|
|
5364
5923
|
const element = payload[e];
|
|
5365
5924
|
if (element.type === ElementType.TABLE) {
|
|
5925
|
+
flushParagraph();
|
|
5366
5926
|
const tableDom = document.createElement("table");
|
|
5367
5927
|
tableDom.setAttribute("cellSpacing", "0");
|
|
5368
5928
|
tableDom.setAttribute("cellpadding", "0");
|
|
@@ -5425,13 +5985,17 @@ function createDomFromElementList(elementList, options) {
|
|
|
5425
5985
|
if (element.url) {
|
|
5426
5986
|
a.href = element.url;
|
|
5427
5987
|
}
|
|
5428
|
-
|
|
5988
|
+
applyExportFontToDom(a, element, editorOptions);
|
|
5989
|
+
appendInlineNode(a, element);
|
|
5429
5990
|
} else if (element.type === ElementType.TITLE) {
|
|
5991
|
+
flushParagraph();
|
|
5430
5992
|
const h = document.createElement(`h${titleOrderNumberMapping[element.level]}`);
|
|
5993
|
+
applyParagraphStyleToDom(h, element, editorOptions);
|
|
5431
5994
|
const childDom = buildDom(element.valueList);
|
|
5432
5995
|
h.innerHTML = childDom.innerHTML;
|
|
5433
5996
|
clipboardDom2.append(h);
|
|
5434
5997
|
} else if (element.type === ElementType.LIST) {
|
|
5998
|
+
flushParagraph();
|
|
5435
5999
|
const list = document.createElement(listTypeElementMapping[element.listType]);
|
|
5436
6000
|
if (element.listStyle) {
|
|
5437
6001
|
list.style.listStyleType = listStyleCSSMapping[element.listStyle];
|
|
@@ -5447,16 +6011,32 @@ function createDomFromElementList(elementList, options) {
|
|
|
5447
6011
|
clipboardDom2.append(list);
|
|
5448
6012
|
} else if (element.type === ElementType.IMAGE) {
|
|
5449
6013
|
const img = document.createElement("img");
|
|
5450
|
-
console.log(element);
|
|
5451
6014
|
if (element.value) {
|
|
5452
6015
|
img.src = element.value;
|
|
5453
6016
|
img.width = element.width;
|
|
5454
6017
|
img.height = element.height;
|
|
5455
6018
|
img.id = getUUID();
|
|
5456
|
-
|
|
6019
|
+
if (element.formInput) {
|
|
6020
|
+
img.setAttribute("data-form-input", JSON.stringify(element.formInput));
|
|
6021
|
+
}
|
|
6022
|
+
applyImageWrapToDom(img, element);
|
|
6023
|
+
}
|
|
6024
|
+
if (element.imgDisplay === ImageDisplay.SURROUND || element.imgDisplay === ImageDisplay.FLOAT_TOP || element.imgDisplay === ImageDisplay.FLOAT_BOTTOM) {
|
|
6025
|
+
ensureParagraph(element);
|
|
6026
|
+
paragraphDom.style.position = "relative";
|
|
6027
|
+
paragraphDom.append(img);
|
|
6028
|
+
} else if (element.imgDisplay === ImageDisplay.BLOCK || element.imgDisplay === ImageDisplay.INLINE) {
|
|
6029
|
+
const prev = payload[e - 1];
|
|
6030
|
+
const prevIsSameKind = (prev == null ? void 0 : prev.type) === ElementType.IMAGE && (prev.imgDisplay === ImageDisplay.BLOCK || prev.imgDisplay === ImageDisplay.INLINE);
|
|
6031
|
+
if (!prevIsSameKind) {
|
|
6032
|
+
flushParagraph();
|
|
6033
|
+
}
|
|
6034
|
+
clipboardDom2.append(img);
|
|
6035
|
+
} else {
|
|
6036
|
+
appendInlineNode(img, element);
|
|
5457
6037
|
}
|
|
5458
|
-
clipboardDom2.append(img);
|
|
5459
6038
|
} else if (element.type === ElementType.BLOCK) {
|
|
6039
|
+
flushParagraph();
|
|
5460
6040
|
if (((_e = element.block) == null ? void 0 : _e.type) === BlockType.VIDEO) {
|
|
5461
6041
|
const src = (_f = element.block.videoBlock) == null ? void 0 : _f.src;
|
|
5462
6042
|
if (src) {
|
|
@@ -5487,6 +6067,7 @@ function createDomFromElementList(elementList, options) {
|
|
|
5487
6067
|
}
|
|
5488
6068
|
}
|
|
5489
6069
|
} else if (element.type === ElementType.SEPARATOR) {
|
|
6070
|
+
flushParagraph();
|
|
5490
6071
|
const hr = document.createElement("hr");
|
|
5491
6072
|
if ((_h = element.dashArray) == null ? void 0 : _h.length) {
|
|
5492
6073
|
hr.setAttribute("data-dash-array", element.dashArray.join(","));
|
|
@@ -5498,26 +6079,31 @@ function createDomFromElementList(elementList, options) {
|
|
|
5498
6079
|
if ((_i = element.checkbox) == null ? void 0 : _i.value) {
|
|
5499
6080
|
checkbox.setAttribute("checked", "true");
|
|
5500
6081
|
}
|
|
5501
|
-
|
|
6082
|
+
appendInlineNode(checkbox, element);
|
|
5502
6083
|
} else if (element.type === ElementType.RADIO) {
|
|
5503
6084
|
const radio = document.createElement("input");
|
|
5504
6085
|
radio.type = "radio";
|
|
5505
6086
|
if ((_j = element.radio) == null ? void 0 : _j.value) {
|
|
5506
6087
|
radio.setAttribute("checked", "true");
|
|
5507
6088
|
}
|
|
5508
|
-
|
|
6089
|
+
appendInlineNode(radio, element);
|
|
5509
6090
|
} else if (element.type === ElementType.TAB) {
|
|
5510
6091
|
const tab2 = document.createElement("span");
|
|
6092
|
+
applyExportFontToDom(tab2, element, editorOptions);
|
|
6093
|
+
tab2.style.whiteSpace = "pre-wrap";
|
|
5511
6094
|
tab2.innerHTML = `${NON_BREAKING_SPACE}${NON_BREAKING_SPACE}`;
|
|
5512
|
-
|
|
6095
|
+
appendInlineNode(tab2, element);
|
|
5513
6096
|
} else if (element.type === ElementType.CONTROL) {
|
|
5514
6097
|
const controlElement = document.createElement("span");
|
|
6098
|
+
applyExportFontToDom(controlElement, element, editorOptions);
|
|
5515
6099
|
const childDom = buildDom(((_k = element.control) == null ? void 0 : _k.value) || []);
|
|
5516
6100
|
controlElement.innerHTML = childDom.innerHTML;
|
|
5517
|
-
|
|
6101
|
+
appendInlineNode(controlElement, element);
|
|
5518
6102
|
} else if (element.type === ElementType.PAGE_BREAK) {
|
|
6103
|
+
flushParagraph();
|
|
5519
6104
|
const pageBreakElement = document.createElement("div");
|
|
5520
6105
|
pageBreakElement.style.breakAfter = "page";
|
|
6106
|
+
pageBreakElement.setAttribute("data-type", ElementType.PAGE_BREAK);
|
|
5521
6107
|
clipboardDom2.append(pageBreakElement);
|
|
5522
6108
|
} else if (!element.type || element.type === ElementType.LATEX || TEXTLIKE_ELEMENT_TYPE.includes(element.type)) {
|
|
5523
6109
|
let text = "";
|
|
@@ -5528,14 +6114,13 @@ function createDomFromElementList(elementList, options) {
|
|
|
5528
6114
|
}
|
|
5529
6115
|
if (!text)
|
|
5530
6116
|
continue;
|
|
5531
|
-
const dom = convertElementToDom(element, editorOptions);
|
|
5532
6117
|
if (((_m = payload[e - 1]) == null ? void 0 : _m.type) === ElementType.TITLE) {
|
|
5533
6118
|
text = text.replace(/^\n/, "");
|
|
5534
6119
|
}
|
|
5535
|
-
|
|
5536
|
-
clipboardDom2.append(dom);
|
|
6120
|
+
appendTextRuns(element, text, e);
|
|
5537
6121
|
}
|
|
5538
6122
|
}
|
|
6123
|
+
flushParagraph();
|
|
5539
6124
|
return clipboardDom2;
|
|
5540
6125
|
}
|
|
5541
6126
|
const clipboardDom = document.createElement("div");
|
|
@@ -5565,8 +6150,19 @@ function createDomFromElementList(elementList, options) {
|
|
|
5565
6150
|
});
|
|
5566
6151
|
}
|
|
5567
6152
|
}
|
|
6153
|
+
relocateFloatOverlayImages(clipboardDom);
|
|
6154
|
+
ensureSpanExportFonts(clipboardDom, editorOptions.defaultFont || "SimSun");
|
|
5568
6155
|
return clipboardDom;
|
|
5569
6156
|
}
|
|
6157
|
+
function ensureSpanExportFonts(root, defaultFont) {
|
|
6158
|
+
const nodes = root.querySelectorAll("span, sup, sub");
|
|
6159
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
6160
|
+
const el = nodes[i];
|
|
6161
|
+
if (!el.style.getPropertyValue("font-family")) {
|
|
6162
|
+
el.style.setProperty("font-family", defaultFont);
|
|
6163
|
+
}
|
|
6164
|
+
}
|
|
6165
|
+
}
|
|
5570
6166
|
function convertTextNodeToElement(textNode) {
|
|
5571
6167
|
if (!textNode || textNode.nodeType !== 3)
|
|
5572
6168
|
return null;
|
|
@@ -5601,12 +6197,29 @@ function convertTextNodeToElement(textNode) {
|
|
|
5601
6197
|
if (style.textDecorationLine.includes("line-through")) {
|
|
5602
6198
|
element.strikeout = true;
|
|
5603
6199
|
}
|
|
6200
|
+
const letterSpacing = parseFloat(style.letterSpacing);
|
|
6201
|
+
if (letterSpacing && !isNaN(letterSpacing)) {
|
|
6202
|
+
element.letterSpacing = letterSpacing;
|
|
6203
|
+
}
|
|
6204
|
+
const wordSpacing = parseFloat(style.wordSpacing);
|
|
6205
|
+
if (wordSpacing && !isNaN(wordSpacing)) {
|
|
6206
|
+
element.wordSpacing = wordSpacing;
|
|
6207
|
+
}
|
|
5604
6208
|
return element;
|
|
5605
6209
|
}
|
|
5606
6210
|
function getElementListByHTML(htmlText, options) {
|
|
5607
6211
|
const elementList = [];
|
|
6212
|
+
const visitedNodes = options._visitedNodes || /* @__PURE__ */ new WeakSet();
|
|
6213
|
+
if (!options._visitedNodes) {
|
|
6214
|
+
options._visitedNodes = visitedNodes;
|
|
6215
|
+
}
|
|
5608
6216
|
function findTextNode(dom) {
|
|
5609
6217
|
var _a;
|
|
6218
|
+
if (visitedNodes.has(dom)) {
|
|
6219
|
+
console.warn("Circular reference detected in DOM tree. Skipping node to prevent infinite recursion.");
|
|
6220
|
+
return;
|
|
6221
|
+
}
|
|
6222
|
+
visitedNodes.add(dom);
|
|
5610
6223
|
if (dom.nodeType === 3) {
|
|
5611
6224
|
const element = convertTextNodeToElement(dom);
|
|
5612
6225
|
if (element) {
|
|
@@ -5620,6 +6233,13 @@ function getElementListByHTML(htmlText, options) {
|
|
|
5620
6233
|
elementList.push({
|
|
5621
6234
|
value: "\n"
|
|
5622
6235
|
});
|
|
6236
|
+
} else if (node.nodeName === "DIV" && node.getAttribute("data-ce-clear") === "both") {
|
|
6237
|
+
continue;
|
|
6238
|
+
} else if (node.nodeName === "DIV" && node.getAttribute("data-type") === ElementType.PAGE_BREAK) {
|
|
6239
|
+
elementList.push({
|
|
6240
|
+
type: ElementType.PAGE_BREAK,
|
|
6241
|
+
value: "\n"
|
|
6242
|
+
});
|
|
5623
6243
|
} else if (node.nodeName === "A") {
|
|
5624
6244
|
const aElement = node;
|
|
5625
6245
|
const value = aElement.innerText;
|
|
@@ -5682,17 +6302,20 @@ function getElementListByHTML(htmlText, options) {
|
|
|
5682
6302
|
});
|
|
5683
6303
|
} else if (node.nodeName === "IMG") {
|
|
5684
6304
|
const imgElement = node;
|
|
5685
|
-
const { src
|
|
6305
|
+
const { src } = imgElement;
|
|
6306
|
+
const width = imgElement.width || Number.parseFloat(imgElement.getAttribute("width") || "") || Number.parseFloat(imgElement.style.width) || 0;
|
|
6307
|
+
const height = imgElement.height || Number.parseFloat(imgElement.getAttribute("height") || "") || Number.parseFloat(imgElement.style.height) || 0;
|
|
5686
6308
|
if (src && width && height) {
|
|
5687
6309
|
const element = {
|
|
5688
6310
|
width,
|
|
5689
6311
|
height,
|
|
5690
6312
|
value: src,
|
|
5691
6313
|
type: ElementType.IMAGE,
|
|
5692
|
-
rowFlex: convertTextAlignToRowFlex(node.parentElement)
|
|
6314
|
+
rowFlex: convertTextAlignToRowFlex(node.parentElement),
|
|
6315
|
+
verticalAlign: "text-top"
|
|
5693
6316
|
};
|
|
6317
|
+
applyImageWrapFromDom(imgElement, element);
|
|
5694
6318
|
const formInputAttr = imgElement.getAttribute("data-form-input");
|
|
5695
|
-
console.log("data-form-input", formInputAttr);
|
|
5696
6319
|
if (formInputAttr) {
|
|
5697
6320
|
try {
|
|
5698
6321
|
element.formInput = JSON.parse(formInputAttr);
|
|
@@ -5753,7 +6376,16 @@ function getElementListByHTML(htmlText, options) {
|
|
|
5753
6376
|
};
|
|
5754
6377
|
trElement.querySelectorAll("th,td").forEach((tdElement) => {
|
|
5755
6378
|
const tableCell = tdElement;
|
|
6379
|
+
if (tableCell.style.display === "none" || window.getComputedStyle(tableCell).display === "none") {
|
|
6380
|
+
return;
|
|
6381
|
+
}
|
|
5756
6382
|
const valueList = getElementListByHTML(tableCell.innerHTML, options);
|
|
6383
|
+
if (valueList.length > 1 && (valueList[valueList.length - 1].value === "\n" || valueList[valueList.length - 1].value === WRAP)) {
|
|
6384
|
+
valueList.pop();
|
|
6385
|
+
}
|
|
6386
|
+
if (!valueList.length) {
|
|
6387
|
+
valueList.push({ value: "\n" });
|
|
6388
|
+
}
|
|
5757
6389
|
const td = {
|
|
5758
6390
|
colspan: tableCell.colSpan,
|
|
5759
6391
|
rowspan: tableCell.rowSpan,
|
|
@@ -5761,20 +6393,35 @@ function getElementListByHTML(htmlText, options) {
|
|
|
5761
6393
|
verticalAlign: window.getComputedStyle(tdElement).verticalAlign,
|
|
5762
6394
|
width: parseFloat(window.getComputedStyle(tdElement).width)
|
|
5763
6395
|
};
|
|
5764
|
-
|
|
6396
|
+
const bg = (tableCell.style.backgroundColor || "").trim().toLowerCase();
|
|
6397
|
+
if (bg && bg !== "inherit" && bg !== "transparent" && bg !== "initial" && bg !== "unset" && bg !== "none" && bg !== "rgba(0, 0, 0, 0)" && bg !== "rgb(0, 0, 0, 0)") {
|
|
5765
6398
|
td.backgroundColor = tableCell.style.backgroundColor;
|
|
5766
6399
|
}
|
|
5767
6400
|
tr.tdList.push(td);
|
|
5768
6401
|
});
|
|
5769
|
-
|
|
6402
|
+
if (tr.tdList.length) {
|
|
6403
|
+
element.trList.push(tr);
|
|
6404
|
+
}
|
|
5770
6405
|
});
|
|
5771
6406
|
if (element.trList.length) {
|
|
5772
6407
|
const tdCount = element.trList[0].tdList.reduce((pre, cur) => pre + cur.colspan, 0);
|
|
5773
6408
|
const width = Math.ceil(options.innerWidth / tdCount);
|
|
5774
6409
|
for (let i = 0; i < tdCount; i++) {
|
|
5775
|
-
const
|
|
6410
|
+
const colEl = colElements[i];
|
|
6411
|
+
let colWidth = width;
|
|
6412
|
+
if (colEl) {
|
|
6413
|
+
const attr = colEl.getAttribute("width");
|
|
6414
|
+
const styleW = (_a = colEl.style) == null ? void 0 : _a.width;
|
|
6415
|
+
const raw2 = attr || styleW;
|
|
6416
|
+
if (raw2) {
|
|
6417
|
+
const n2 = Number.parseFloat(raw2);
|
|
6418
|
+
if (Number.isFinite(n2) && n2 > 0) {
|
|
6419
|
+
colWidth = /pt$/i.test(raw2.trim()) ? Math.round(n2 * 96 / 72) : Math.round(n2);
|
|
6420
|
+
}
|
|
6421
|
+
}
|
|
6422
|
+
}
|
|
5776
6423
|
element.colgroup.push({
|
|
5777
|
-
width:
|
|
6424
|
+
width: colWidth
|
|
5778
6425
|
});
|
|
5779
6426
|
}
|
|
5780
6427
|
elementList.push(element);
|
|
@@ -5810,6 +6457,10 @@ function getElementListByHTML(htmlText, options) {
|
|
|
5810
6457
|
}
|
|
5811
6458
|
}
|
|
5812
6459
|
}
|
|
6460
|
+
if (options.container) {
|
|
6461
|
+
findTextNode(options.container);
|
|
6462
|
+
return elementList;
|
|
6463
|
+
}
|
|
5813
6464
|
const clipboardHost = document.createElement("div");
|
|
5814
6465
|
document.body.appendChild(clipboardHost);
|
|
5815
6466
|
const shadowRoot = clipboardHost.attachShadow({ mode: "open" });
|
|
@@ -5951,6 +6602,20 @@ function getNonHideElementIndex(elementList, index2, position = LocationPosition
|
|
|
5951
6602
|
}
|
|
5952
6603
|
return i;
|
|
5953
6604
|
}
|
|
6605
|
+
function convertToXHTML(dom, options) {
|
|
6606
|
+
var _a;
|
|
6607
|
+
if (!dom)
|
|
6608
|
+
return "";
|
|
6609
|
+
const serializer = new XMLSerializer();
|
|
6610
|
+
let xhtml = serializer.serializeToString(dom);
|
|
6611
|
+
xhtml = xhtml.replace(/\sxmlns="http:\/\/www\.w3\.org\/1999\/xhtml"/g, "");
|
|
6612
|
+
const keepRoot = (options == null ? void 0 : options.keepRoot) || ((_a = dom.classList) == null ? void 0 : _a.contains("ce-export-page"));
|
|
6613
|
+
if (keepRoot) {
|
|
6614
|
+
return xhtml;
|
|
6615
|
+
}
|
|
6616
|
+
const match = xhtml.match(/<[^>]+>([\s\S]*)<\/[^>]+>$/i);
|
|
6617
|
+
return match ? match[1] : xhtml;
|
|
6618
|
+
}
|
|
5954
6619
|
function setClipboardData(data2) {
|
|
5955
6620
|
localStorage.setItem(EDITOR_CLIPBOARD, JSON.stringify({
|
|
5956
6621
|
text: data2.text,
|
|
@@ -8452,6 +9117,22 @@ function dblclick(host, evt) {
|
|
|
8452
9117
|
editor.showFormRadioConfig(curElement);
|
|
8453
9118
|
return;
|
|
8454
9119
|
}
|
|
9120
|
+
if (curElement.formInput && curElement.formInput.type === "image") {
|
|
9121
|
+
editor.showFormImageConfig(curElement);
|
|
9122
|
+
return;
|
|
9123
|
+
}
|
|
9124
|
+
if (curElement.formInput && curElement.formInput.type === "signature") {
|
|
9125
|
+
editor.showFormSignatureConfig(curElement);
|
|
9126
|
+
return;
|
|
9127
|
+
}
|
|
9128
|
+
if (curElement.formInput && curElement.formInput.type === "seal") {
|
|
9129
|
+
editor.showFormSealConfig(curElement);
|
|
9130
|
+
return;
|
|
9131
|
+
}
|
|
9132
|
+
if (curElement.formInput && curElement.formInput.type === "riskCopy") {
|
|
9133
|
+
editor.showFormRiskCopyConfig(curElement);
|
|
9134
|
+
return;
|
|
9135
|
+
}
|
|
8455
9136
|
editor.showFormInputConfig(curElement);
|
|
8456
9137
|
return;
|
|
8457
9138
|
}
|
|
@@ -9002,7 +9683,6 @@ class Position {
|
|
|
9002
9683
|
for (let j = 0; j < curRow.elementList.length; j++) {
|
|
9003
9684
|
const element = curRow.elementList[j];
|
|
9004
9685
|
const metrics = element.metrics;
|
|
9005
|
-
const offsetY = !element.hide && (element.imgDisplay !== ImageDisplay.INLINE && element.type === ElementType.IMAGE || element.type === ElementType.LATEX) ? curRow.ascent - metrics.height : curRow.ascent;
|
|
9006
9686
|
if (element.left) {
|
|
9007
9687
|
x += element.left;
|
|
9008
9688
|
}
|
|
@@ -9017,7 +9697,7 @@ class Position {
|
|
|
9017
9697
|
rowNo: i,
|
|
9018
9698
|
metrics,
|
|
9019
9699
|
left: element.left || 0,
|
|
9020
|
-
ascent:
|
|
9700
|
+
ascent: element.type === ElementType.IMAGE ? 4 : 17,
|
|
9021
9701
|
lineHeight: curRow.height,
|
|
9022
9702
|
isFirstLetter: j === 0,
|
|
9023
9703
|
isLastLetter: j === curRow.elementList.length - 1,
|
|
@@ -9914,6 +10594,8 @@ class RangeManager {
|
|
|
9914
10594
|
const highlight = curElement.highlight || null;
|
|
9915
10595
|
const rowFlex = curElement.rowFlex || null;
|
|
9916
10596
|
const rowMargin = (_a = curElement.rowMargin) != null ? _a : this.options.defaultRowMargin;
|
|
10597
|
+
const textIndent = curElement.textIndent || 0;
|
|
10598
|
+
const marginLeft = curElement.marginLeft || 0;
|
|
9917
10599
|
const dashArray = curElement.dashArray || [];
|
|
9918
10600
|
const level = curElement.level || null;
|
|
9919
10601
|
const listType = curElement.listType || null;
|
|
@@ -9939,6 +10621,8 @@ class RangeManager {
|
|
|
9939
10621
|
highlight,
|
|
9940
10622
|
rowFlex,
|
|
9941
10623
|
rowMargin,
|
|
10624
|
+
textIndent,
|
|
10625
|
+
marginLeft,
|
|
9942
10626
|
dashArray,
|
|
9943
10627
|
level,
|
|
9944
10628
|
listType,
|
|
@@ -9980,6 +10664,8 @@ class RangeManager {
|
|
|
9980
10664
|
highlight: null,
|
|
9981
10665
|
rowFlex: null,
|
|
9982
10666
|
rowMargin,
|
|
10667
|
+
textIndent: 0,
|
|
10668
|
+
marginLeft: 0,
|
|
9983
10669
|
dashArray: [],
|
|
9984
10670
|
level: null,
|
|
9985
10671
|
listType: null,
|
|
@@ -10089,28 +10775,26 @@ class Background {
|
|
|
10089
10775
|
}
|
|
10090
10776
|
_drawImage(ctx, imageElement, width, height) {
|
|
10091
10777
|
const { background, scale } = this.options;
|
|
10092
|
-
|
|
10093
|
-
|
|
10094
|
-
|
|
10095
|
-
|
|
10096
|
-
|
|
10097
|
-
|
|
10098
|
-
|
|
10099
|
-
|
|
10100
|
-
|
|
10101
|
-
|
|
10102
|
-
|
|
10103
|
-
|
|
10104
|
-
|
|
10105
|
-
|
|
10106
|
-
|
|
10107
|
-
|
|
10108
|
-
|
|
10109
|
-
}
|
|
10110
|
-
}
|
|
10111
|
-
} else {
|
|
10112
|
-
ctx.drawImage(imageElement, 0, 0, width * scale, height * scale);
|
|
10778
|
+
const pageWidth = width * scale;
|
|
10779
|
+
const pageHeight = height * scale;
|
|
10780
|
+
const imgWidth = imageElement.width;
|
|
10781
|
+
const imgHeight = imageElement.height;
|
|
10782
|
+
if (!imgWidth || !imgHeight)
|
|
10783
|
+
return;
|
|
10784
|
+
const opacity = typeof background.opacity === "number" ? background.opacity : 1;
|
|
10785
|
+
ctx.save();
|
|
10786
|
+
ctx.globalAlpha = Math.min(1, Math.max(0, opacity));
|
|
10787
|
+
const ratio = Math.min(pageWidth / imgWidth, pageHeight / imgHeight, 1);
|
|
10788
|
+
const drawWidth = imgWidth * ratio;
|
|
10789
|
+
const drawHeight = imgHeight * ratio;
|
|
10790
|
+
let dx = 0;
|
|
10791
|
+
let dy = 0;
|
|
10792
|
+
if (background.position === BackgroundPosition.CENTER) {
|
|
10793
|
+
dx = (pageWidth - drawWidth) / 2;
|
|
10794
|
+
dy = (pageHeight - drawHeight) / 2;
|
|
10113
10795
|
}
|
|
10796
|
+
ctx.drawImage(imageElement, dx, dy, drawWidth, drawHeight);
|
|
10797
|
+
ctx.restore();
|
|
10114
10798
|
}
|
|
10115
10799
|
_renderBackgroundImage(ctx, width, height) {
|
|
10116
10800
|
const { background } = this.options;
|
|
@@ -10133,13 +10817,12 @@ class Background {
|
|
|
10133
10817
|
}
|
|
10134
10818
|
render(ctx, pageNo) {
|
|
10135
10819
|
const { background: { image, color, applyPageNumbers } } = this.options;
|
|
10820
|
+
const { width, height } = this.options;
|
|
10821
|
+
const canvasWidth = this.draw.getCanvasWidth(pageNo);
|
|
10822
|
+
const canvasHeight = this.draw.getCanvasHeight(pageNo);
|
|
10823
|
+
this._renderBackgroundColor(ctx, color, canvasWidth, canvasHeight);
|
|
10136
10824
|
if (image && (!(applyPageNumbers == null ? void 0 : applyPageNumbers.length) || applyPageNumbers.includes(pageNo))) {
|
|
10137
|
-
const { width, height } = this.options;
|
|
10138
10825
|
this._renderBackgroundImage(ctx, width, height);
|
|
10139
|
-
} else {
|
|
10140
|
-
const width = this.draw.getCanvasWidth(pageNo);
|
|
10141
|
-
const height = this.draw.getCanvasHeight(pageNo);
|
|
10142
|
-
this._renderBackgroundColor(ctx, color, width, height);
|
|
10143
10826
|
}
|
|
10144
10827
|
}
|
|
10145
10828
|
}
|
|
@@ -11275,6 +11958,10 @@ class TableParticle {
|
|
|
11275
11958
|
const td = tr.tdList[d];
|
|
11276
11959
|
if (!td.backgroundColor)
|
|
11277
11960
|
continue;
|
|
11961
|
+
const bg = td.backgroundColor.trim().toLowerCase();
|
|
11962
|
+
if (bg === "inherit" || bg === "transparent" || bg === "initial" || bg === "unset") {
|
|
11963
|
+
continue;
|
|
11964
|
+
}
|
|
11278
11965
|
ctx.save();
|
|
11279
11966
|
const width = td.width * scale;
|
|
11280
11967
|
const height = td.height * scale;
|
|
@@ -15493,7 +16180,7 @@ function WorkerWrapper$1() {
|
|
|
15493
16180
|
objURL && (window.URL || window.webkitURL).revokeObjectURL(objURL);
|
|
15494
16181
|
}
|
|
15495
16182
|
}
|
|
15496
|
-
const encodedJs = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBSPShlPT4oZS5IQUxGPSJoYWxmIixlLk9ORV9USElSRD0ib25lLXRoaXJkIixlLlFVQVJURVI9InF1YXJ0ZXIiLGUpKShSfHx7fSksZz0oZT0+
|
|
16183
|
+
const encodedJs = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBSPShlPT4oZS5IQUxGPSJoYWxmIixlLk9ORV9USElSRD0ib25lLXRoaXJkIixlLlFVQVJURVI9InF1YXJ0ZXIiLGUpKShSfHx7fSksZz0oZT0+KGUuQVJBQklDPSJhcmFiaWMiLGUuQ0hJTkVTRT0iY2hpbmVzZSIsZSkpKGd8fHt9KSxOPShlPT4oZS5JTkxJTkU9ImlubGluZSIsZS5CTE9DSz0iYmxvY2siLGUuU1VSUk9VTkQ9InN1cnJvdW5kIixlLkZMT0FUX1RPUD0iZmxvYXQtdG9wIixlLkZMT0FUX0JPVFRPTT0iZmxvYXQtYm90dG9tIixlKSkoTnx8e30pO2NvbnN0IFM9Ilx1MjAwQiI7Ui5IQUxGKyIiLDEvMixSLk9ORV9USElSRCsiIiwxLzMsUi5RVUFSVEVSKyIiLDEvNDtmdW5jdGlvbiB2KGUpe2lmKHR5cGVvZiBzdHJ1Y3R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EYocix7ZXh0cmFQaWNrQXR0cnM6ZH0pKSl7Y29uc3QgdT1yLnZhbHVlPT09Uz9gCmA6ci52YWx1ZTtILnZhbHVlKz11fWVsc2UgYnJlYWt9ZWxzZSBpKys7Ty5wdXNoKEgpfXJldHVybiBPfU9iamVjdC52YWx1ZXMoTiksb25tZXNzYWdlPWU9Pntjb25zdCBvPWUuZGF0YSx7b3B0aW9uczpkLGRhdGE6VH09byx7ZXh0cmFQaWNrQXR0cnM6Zj1bXX09ZHx8e30sbD17aGVhZGVyOkkoVC5oZWFkZXIse2V4dHJhUGlja0F0dHJzOmYsaXNDbG9uZTohMX0pLG1haW46SShULm1haW4se2V4dHJhUGlja0F0dHJzOmYsaXNDbGFzc2lmeUFyZWE6ITAsaXNDbG9uZTohMX0pLGZvb3RlcjpJKFQuZm9vdGVyLHtleHRyYVBpY2tBdHRyczpmLGlzQ2xvbmU6ITF9KX07cG9zdE1lc3NhZ2UobCl9fSkoKTsK";
|
|
15497
16184
|
const blob = typeof window !== "undefined" && window.Blob && new Blob([atob(encodedJs)], { type: "text/javascript;charset=utf-8" });
|
|
15498
16185
|
function WorkerWrapper() {
|
|
15499
16186
|
const objURL = blob && (window.URL || window.webkitURL).createObjectURL(blob);
|
|
@@ -15577,6 +16264,7 @@ class Dialog {
|
|
|
15577
16264
|
this.mask = null;
|
|
15578
16265
|
this.container = null;
|
|
15579
16266
|
this.inputList = [];
|
|
16267
|
+
this.searchDropdowns = /* @__PURE__ */ new Map();
|
|
15580
16268
|
this._render();
|
|
15581
16269
|
}
|
|
15582
16270
|
_render() {
|
|
@@ -15620,45 +16308,65 @@ class Dialog {
|
|
|
15620
16308
|
optionName.classList.add("dialog-option__item--require");
|
|
15621
16309
|
}
|
|
15622
16310
|
}
|
|
15623
|
-
let optionInput;
|
|
15624
16311
|
if (option.type === "select") {
|
|
15625
|
-
|
|
15626
|
-
|
|
15627
|
-
|
|
15628
|
-
|
|
15629
|
-
|
|
15630
|
-
|
|
15631
|
-
|
|
15632
|
-
|
|
15633
|
-
|
|
15634
|
-
|
|
15635
|
-
|
|
15636
|
-
|
|
15637
|
-
|
|
15638
|
-
|
|
15639
|
-
|
|
15640
|
-
|
|
15641
|
-
|
|
15642
|
-
|
|
15643
|
-
|
|
16312
|
+
if (option.searchable === false) {
|
|
16313
|
+
const optionInput = document.createElement("select");
|
|
16314
|
+
if (option.width) {
|
|
16315
|
+
optionInput.style.width = `${option.width}px`;
|
|
16316
|
+
}
|
|
16317
|
+
if (option.height) {
|
|
16318
|
+
optionInput.style.height = `${option.height}px`;
|
|
16319
|
+
}
|
|
16320
|
+
optionInput.name = option.name;
|
|
16321
|
+
optionInput.value = option.value || "";
|
|
16322
|
+
(_a = option.options) == null ? void 0 : _a.forEach((item) => {
|
|
16323
|
+
const optionItem = document.createElement("option");
|
|
16324
|
+
optionItem.value = item.value;
|
|
16325
|
+
optionItem.label = item.label;
|
|
16326
|
+
optionInput.append(optionItem);
|
|
16327
|
+
});
|
|
16328
|
+
optionItemContainer.append(optionInput);
|
|
16329
|
+
optionContainer.append(optionItemContainer);
|
|
16330
|
+
this.inputList.push(optionInput);
|
|
16331
|
+
} else {
|
|
16332
|
+
const searchableSelect = this._createSearchableSelect(option);
|
|
16333
|
+
optionItemContainer.append(searchableSelect);
|
|
16334
|
+
optionContainer.append(optionItemContainer);
|
|
16335
|
+
this.inputList.push(searchableSelect);
|
|
16336
|
+
}
|
|
15644
16337
|
} else {
|
|
15645
|
-
optionInput
|
|
15646
|
-
|
|
15647
|
-
|
|
15648
|
-
|
|
15649
|
-
|
|
15650
|
-
|
|
15651
|
-
|
|
15652
|
-
|
|
15653
|
-
|
|
15654
|
-
|
|
15655
|
-
|
|
15656
|
-
|
|
15657
|
-
|
|
16338
|
+
let optionInput;
|
|
16339
|
+
if (option.type === "textarea") {
|
|
16340
|
+
optionInput = document.createElement("textarea");
|
|
16341
|
+
} else if (option.type === "color") {
|
|
16342
|
+
optionInput = document.createElement("input");
|
|
16343
|
+
optionInput.type = "text";
|
|
16344
|
+
optionInput.onclick = function() {
|
|
16345
|
+
colorControlDom.click();
|
|
16346
|
+
};
|
|
16347
|
+
const colorControlDom = document.querySelector("#color");
|
|
16348
|
+
colorControlDom.oninput = function() {
|
|
16349
|
+
optionInput.value = colorControlDom.value;
|
|
16350
|
+
};
|
|
16351
|
+
} else {
|
|
16352
|
+
optionInput = document.createElement("input");
|
|
16353
|
+
optionInput.type = option.type;
|
|
16354
|
+
}
|
|
16355
|
+
if (option.width) {
|
|
16356
|
+
optionInput.style.width = `${option.width}px`;
|
|
16357
|
+
}
|
|
16358
|
+
if (option.height) {
|
|
16359
|
+
optionInput.style.height = `${option.height}px`;
|
|
16360
|
+
}
|
|
16361
|
+
optionInput.name = option.name;
|
|
16362
|
+
optionInput.value = option.value || "";
|
|
16363
|
+
if (!(optionInput instanceof HTMLSelectElement)) {
|
|
16364
|
+
optionInput.placeholder = option.placeholder || "";
|
|
16365
|
+
}
|
|
16366
|
+
optionItemContainer.append(optionInput);
|
|
16367
|
+
optionContainer.append(optionItemContainer);
|
|
16368
|
+
this.inputList.push(optionInput);
|
|
15658
16369
|
}
|
|
15659
|
-
optionItemContainer.append(optionInput);
|
|
15660
|
-
optionContainer.append(optionItemContainer);
|
|
15661
|
-
this.inputList.push(optionInput);
|
|
15662
16370
|
}
|
|
15663
16371
|
dialogContainer.append(optionContainer);
|
|
15664
16372
|
const menuContainer = document.createElement("div");
|
|
@@ -15679,10 +16387,21 @@ class Dialog {
|
|
|
15679
16387
|
confirmBtn.type = "submit";
|
|
15680
16388
|
confirmBtn.onclick = () => {
|
|
15681
16389
|
if (onConfirm) {
|
|
15682
|
-
const payload = this.inputList.map((input2) =>
|
|
15683
|
-
|
|
15684
|
-
|
|
15685
|
-
|
|
16390
|
+
const payload = this.inputList.map((input2) => {
|
|
16391
|
+
if (input2 instanceof HTMLDivElement && input2.classList.contains("searchable-select")) {
|
|
16392
|
+
const name = input2.getAttribute("data-name") || "";
|
|
16393
|
+
const dropdownInfo = this.searchDropdowns.get(name);
|
|
16394
|
+
return {
|
|
16395
|
+
name,
|
|
16396
|
+
value: (dropdownInfo == null ? void 0 : dropdownInfo.selectedValue) || ""
|
|
16397
|
+
};
|
|
16398
|
+
}
|
|
16399
|
+
const element = input2;
|
|
16400
|
+
return {
|
|
16401
|
+
name: element.name,
|
|
16402
|
+
value: element.value
|
|
16403
|
+
};
|
|
16404
|
+
});
|
|
15686
16405
|
onConfirm(payload);
|
|
15687
16406
|
}
|
|
15688
16407
|
this._dispose();
|
|
@@ -15693,6 +16412,127 @@ class Dialog {
|
|
|
15693
16412
|
this.container = container;
|
|
15694
16413
|
this.mask = mask;
|
|
15695
16414
|
}
|
|
16415
|
+
_createSearchableSelect(option) {
|
|
16416
|
+
var _a;
|
|
16417
|
+
const container = document.createElement("div");
|
|
16418
|
+
container.classList.add("searchable-select");
|
|
16419
|
+
container.setAttribute("data-name", option.name);
|
|
16420
|
+
if (option.width) {
|
|
16421
|
+
container.style.width = `${option.width}px`;
|
|
16422
|
+
}
|
|
16423
|
+
const input2 = document.createElement("input");
|
|
16424
|
+
input2.type = "text";
|
|
16425
|
+
input2.classList.add("searchable-select__input");
|
|
16426
|
+
input2.placeholder = option.placeholder || "\u8BF7\u9009\u62E9\u6216\u641C\u7D22";
|
|
16427
|
+
const dropdownInfo = this.searchDropdowns.get(option.name);
|
|
16428
|
+
const currentValue = (dropdownInfo == null ? void 0 : dropdownInfo.selectedValue) || option.value || "";
|
|
16429
|
+
if (currentValue && option.options) {
|
|
16430
|
+
const selectedOption = option.options.find((opt) => opt.value === currentValue);
|
|
16431
|
+
if (selectedOption) {
|
|
16432
|
+
input2.value = selectedOption.label;
|
|
16433
|
+
}
|
|
16434
|
+
}
|
|
16435
|
+
const arrow = document.createElement("span");
|
|
16436
|
+
arrow.classList.add("searchable-select__arrow");
|
|
16437
|
+
arrow.innerHTML = "\u25BC";
|
|
16438
|
+
const inputWrapper = document.createElement("div");
|
|
16439
|
+
inputWrapper.classList.add("searchable-select__input-wrapper");
|
|
16440
|
+
inputWrapper.append(input2);
|
|
16441
|
+
inputWrapper.append(arrow);
|
|
16442
|
+
const dropdown = document.createElement("div");
|
|
16443
|
+
dropdown.classList.add("searchable-select__dropdown");
|
|
16444
|
+
dropdown.style.display = "none";
|
|
16445
|
+
const renderOptions = (filterText = "") => {
|
|
16446
|
+
var _a2;
|
|
16447
|
+
dropdown.innerHTML = "";
|
|
16448
|
+
const filteredOptions = ((_a2 = option.options) == null ? void 0 : _a2.filter((opt) => !filterText || opt.label.toLowerCase().includes(filterText.toLowerCase()))) || [];
|
|
16449
|
+
const dropdownInfo2 = this.searchDropdowns.get(option.name);
|
|
16450
|
+
const currentValue2 = (dropdownInfo2 == null ? void 0 : dropdownInfo2.selectedValue) || option.value || "";
|
|
16451
|
+
if (filteredOptions.length === 0) {
|
|
16452
|
+
const emptyItem = document.createElement("div");
|
|
16453
|
+
emptyItem.classList.add("searchable-select__option", "searchable-select__option--empty");
|
|
16454
|
+
emptyItem.textContent = "\u65E0\u5339\u914D\u9009\u9879";
|
|
16455
|
+
dropdown.append(emptyItem);
|
|
16456
|
+
} else {
|
|
16457
|
+
filteredOptions.forEach((item) => {
|
|
16458
|
+
const optionItem = document.createElement("div");
|
|
16459
|
+
optionItem.classList.add("searchable-select__option");
|
|
16460
|
+
optionItem.textContent = item.label;
|
|
16461
|
+
optionItem.setAttribute("data-value", item.value);
|
|
16462
|
+
if (item.value === currentValue2) {
|
|
16463
|
+
optionItem.classList.add("searchable-select__option--selected");
|
|
16464
|
+
}
|
|
16465
|
+
optionItem.onclick = (e) => {
|
|
16466
|
+
e.stopPropagation();
|
|
16467
|
+
const selectedValue = optionItem.getAttribute("data-value") || "";
|
|
16468
|
+
input2.value = item.label;
|
|
16469
|
+
const allOptions = dropdown.querySelectorAll(".searchable-select__option");
|
|
16470
|
+
allOptions.forEach((opt) => {
|
|
16471
|
+
opt.classList.remove("searchable-select__option--selected");
|
|
16472
|
+
});
|
|
16473
|
+
optionItem.classList.add("searchable-select__option--selected");
|
|
16474
|
+
const dropdownInfo3 = this.searchDropdowns.get(option.name);
|
|
16475
|
+
if (dropdownInfo3) {
|
|
16476
|
+
dropdownInfo3.selectedValue = selectedValue;
|
|
16477
|
+
}
|
|
16478
|
+
dropdown.style.display = "none";
|
|
16479
|
+
};
|
|
16480
|
+
dropdown.append(optionItem);
|
|
16481
|
+
});
|
|
16482
|
+
}
|
|
16483
|
+
};
|
|
16484
|
+
renderOptions();
|
|
16485
|
+
input2.oninput = () => {
|
|
16486
|
+
renderOptions(input2.value);
|
|
16487
|
+
dropdown.style.display = "block";
|
|
16488
|
+
};
|
|
16489
|
+
input2.onclick = (e) => {
|
|
16490
|
+
e.stopPropagation();
|
|
16491
|
+
const allDropdowns = document.querySelectorAll(".searchable-select__dropdown");
|
|
16492
|
+
allDropdowns.forEach((d) => {
|
|
16493
|
+
if (d !== dropdown) {
|
|
16494
|
+
d.style.display = "none";
|
|
16495
|
+
}
|
|
16496
|
+
});
|
|
16497
|
+
dropdown.style.display = dropdown.style.display === "block" ? "none" : "block";
|
|
16498
|
+
};
|
|
16499
|
+
arrow.onclick = (e) => {
|
|
16500
|
+
e.stopPropagation();
|
|
16501
|
+
const allDropdowns = document.querySelectorAll(".searchable-select__dropdown");
|
|
16502
|
+
allDropdowns.forEach((d) => {
|
|
16503
|
+
if (d !== dropdown) {
|
|
16504
|
+
d.style.display = "none";
|
|
16505
|
+
}
|
|
16506
|
+
});
|
|
16507
|
+
dropdown.style.display = dropdown.style.display === "block" ? "none" : "block";
|
|
16508
|
+
input2.focus();
|
|
16509
|
+
};
|
|
16510
|
+
const closeDropdown = (e) => {
|
|
16511
|
+
const target = e.target;
|
|
16512
|
+
if (!container.contains(target)) {
|
|
16513
|
+
dropdown.style.display = "none";
|
|
16514
|
+
}
|
|
16515
|
+
};
|
|
16516
|
+
document.addEventListener("click", closeDropdown);
|
|
16517
|
+
const hiddenSelect = document.createElement("select");
|
|
16518
|
+
hiddenSelect.style.display = "none";
|
|
16519
|
+
hiddenSelect.name = option.name;
|
|
16520
|
+
hiddenSelect.value = option.value || "";
|
|
16521
|
+
(_a = option.options) == null ? void 0 : _a.forEach((item) => {
|
|
16522
|
+
const optionItem = document.createElement("option");
|
|
16523
|
+
optionItem.value = item.value;
|
|
16524
|
+
optionItem.label = item.label;
|
|
16525
|
+
hiddenSelect.append(optionItem);
|
|
16526
|
+
});
|
|
16527
|
+
this.searchDropdowns.set(option.name, {
|
|
16528
|
+
selectedValue: option.value || "",
|
|
16529
|
+
selectElement: hiddenSelect
|
|
16530
|
+
});
|
|
16531
|
+
container.append(inputWrapper);
|
|
16532
|
+
container.append(dropdown);
|
|
16533
|
+
container.append(hiddenSelect);
|
|
16534
|
+
return container;
|
|
16535
|
+
}
|
|
15696
16536
|
_dispose() {
|
|
15697
16537
|
var _a, _b;
|
|
15698
16538
|
(_a = this.mask) == null ? void 0 : _a.remove();
|
|
@@ -15987,7 +16827,8 @@ function formCheckboxPropertiesConfigDialog(el, editor) {
|
|
|
15987
16827
|
const fontFamily = (_h2 = payload.find((p) => p.name === "fontFamily")) == null ? void 0 : _h2.value;
|
|
15988
16828
|
const type = "checkbox";
|
|
15989
16829
|
const formInputKeys = editor.getExtensionParam("formInputKeys");
|
|
15990
|
-
formInputKeys.find((
|
|
16830
|
+
const item = formInputKeys.find((item2) => item2.value === key);
|
|
16831
|
+
const elemProp = item ? JSON.stringify(item) : "";
|
|
15991
16832
|
const formInput = {
|
|
15992
16833
|
key,
|
|
15993
16834
|
width,
|
|
@@ -15997,7 +16838,8 @@ function formCheckboxPropertiesConfigDialog(el, editor) {
|
|
|
15997
16838
|
fontSize,
|
|
15998
16839
|
fontFamily,
|
|
15999
16840
|
color,
|
|
16000
|
-
type
|
|
16841
|
+
type,
|
|
16842
|
+
elemProp
|
|
16001
16843
|
};
|
|
16002
16844
|
const imageDataUrl = generateCheckboxImage({
|
|
16003
16845
|
checked,
|
|
@@ -16127,7 +16969,8 @@ function formRadioPropertiesConfigDialog(el, editor) {
|
|
|
16127
16969
|
const fontFamily = (_h2 = payload.find((p) => p.name === "fontFamily")) == null ? void 0 : _h2.value;
|
|
16128
16970
|
const type = "radio";
|
|
16129
16971
|
const formInputKeys = editor.getExtensionParam("formInputKeys");
|
|
16130
|
-
formInputKeys.find((
|
|
16972
|
+
const item = formInputKeys.find((item2) => item2.value === key);
|
|
16973
|
+
const elemProp = item ? JSON.stringify(item) : "";
|
|
16131
16974
|
const formInput = {
|
|
16132
16975
|
key,
|
|
16133
16976
|
width,
|
|
@@ -16137,7 +16980,8 @@ function formRadioPropertiesConfigDialog(el, editor) {
|
|
|
16137
16980
|
fontSize,
|
|
16138
16981
|
fontFamily,
|
|
16139
16982
|
color,
|
|
16140
|
-
type
|
|
16983
|
+
type,
|
|
16984
|
+
elemProp
|
|
16141
16985
|
};
|
|
16142
16986
|
const imageDataUrl = generateRadioImage({
|
|
16143
16987
|
checked,
|
|
@@ -16168,7 +17012,7 @@ function formRadioPropertiesConfigDialog(el, editor) {
|
|
|
16168
17012
|
});
|
|
16169
17013
|
}
|
|
16170
17014
|
function formInputPropertiesConfigDialog(el, editor) {
|
|
16171
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
17015
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
16172
17016
|
console.log("el", el);
|
|
16173
17017
|
new Dialog({
|
|
16174
17018
|
title: "\u8868\u5355\u6587\u672C\u6846",
|
|
@@ -16198,20 +17042,28 @@ function formInputPropertiesConfigDialog(el, editor) {
|
|
|
16198
17042
|
placeholder: "\u8BF7\u8F93\u5165\u9AD8\u5EA6",
|
|
16199
17043
|
value: (_f = (_e = el == null ? void 0 : el.formInput) == null ? void 0 : _e.height) != null ? _f : "50"
|
|
16200
17044
|
},
|
|
17045
|
+
{
|
|
17046
|
+
type: "text",
|
|
17047
|
+
label: "\u884C\u9AD8",
|
|
17048
|
+
name: "lineHeight",
|
|
17049
|
+
required: false,
|
|
17050
|
+
placeholder: "\u683C\u5F0F\u5316\u6587\u672C\u4F7F\u7528",
|
|
17051
|
+
value: (_h = (_g = el == null ? void 0 : el.formInput) == null ? void 0 : _g.lineHeight) != null ? _h : ""
|
|
17052
|
+
},
|
|
16201
17053
|
{
|
|
16202
17054
|
type: "number",
|
|
16203
17055
|
label: "\u5B57\u53F7",
|
|
16204
17056
|
name: "fontSize",
|
|
16205
17057
|
required: true,
|
|
16206
17058
|
placeholder: "\u8BF7\u8F93\u5165\u5B57\u53F7",
|
|
16207
|
-
value: (
|
|
17059
|
+
value: (_j = (_i = el == null ? void 0 : el.formInput) == null ? void 0 : _i.fontSize) != null ? _j : "10"
|
|
16208
17060
|
},
|
|
16209
17061
|
{
|
|
16210
17062
|
type: "select",
|
|
16211
17063
|
label: "\u662F\u5426\u52A0\u7C97",
|
|
16212
17064
|
name: "bold",
|
|
16213
17065
|
required: true,
|
|
16214
|
-
value: ((
|
|
17066
|
+
value: ((_k = el == null ? void 0 : el.formInput) == null ? void 0 : _k.bold) ? String((_l = el == null ? void 0 : el.formInput) == null ? void 0 : _l.bold) : "false",
|
|
16215
17067
|
options: [
|
|
16216
17068
|
{
|
|
16217
17069
|
label: "\u662F",
|
|
@@ -16228,7 +17080,7 @@ function formInputPropertiesConfigDialog(el, editor) {
|
|
|
16228
17080
|
label: "\u662F\u5426\u659C\u4F53",
|
|
16229
17081
|
name: "italic",
|
|
16230
17082
|
required: true,
|
|
16231
|
-
value: ((
|
|
17083
|
+
value: ((_m = el == null ? void 0 : el.formInput) == null ? void 0 : _m.italic) ? String((_n = el == null ? void 0 : el.formInput) == null ? void 0 : _n.italic) : "false",
|
|
16232
17084
|
options: [
|
|
16233
17085
|
{
|
|
16234
17086
|
label: "\u662F",
|
|
@@ -16245,7 +17097,7 @@ function formInputPropertiesConfigDialog(el, editor) {
|
|
|
16245
17097
|
label: "\u586B\u5145\u7C7B\u578B",
|
|
16246
17098
|
name: "txtFillType",
|
|
16247
17099
|
required: true,
|
|
16248
|
-
value: ((
|
|
17100
|
+
value: ((_o = el == null ? void 0 : el.formInput) == null ? void 0 : _o.txtFillType) ? String((_p = el == null ? void 0 : el.formInput) == null ? void 0 : _p.txtFillType) : "0",
|
|
16249
17101
|
options: [
|
|
16250
17102
|
{
|
|
16251
17103
|
label: "\u6587\u672C",
|
|
@@ -16262,7 +17114,7 @@ function formInputPropertiesConfigDialog(el, editor) {
|
|
|
16262
17114
|
label: "\u662F\u5426\u81EA\u52A8\u6362\u884C",
|
|
16263
17115
|
name: "txtRowAutoFlag",
|
|
16264
17116
|
required: false,
|
|
16265
|
-
value: ((
|
|
17117
|
+
value: ((_q = el == null ? void 0 : el.formInput) == null ? void 0 : _q.txtRowAutoFlag) ? String((_r = el == null ? void 0 : el.formInput) == null ? void 0 : _r.txtRowAutoFlag) : "1",
|
|
16266
17118
|
options: [
|
|
16267
17119
|
{
|
|
16268
17120
|
label: "\u662F",
|
|
@@ -16279,7 +17131,7 @@ function formInputPropertiesConfigDialog(el, editor) {
|
|
|
16279
17131
|
label: "\u662F\u5426\u53EF\u7F16\u8F91",
|
|
16280
17132
|
name: "txtEditFlag",
|
|
16281
17133
|
required: false,
|
|
16282
|
-
value: ((
|
|
17134
|
+
value: ((_s = el == null ? void 0 : el.formInput) == null ? void 0 : _s.txtEditFlag) ? String((_t = el == null ? void 0 : el.formInput) == null ? void 0 : _t.txtEditFlag) : "1",
|
|
16283
17135
|
options: [
|
|
16284
17136
|
{
|
|
16285
17137
|
label: "\u662F",
|
|
@@ -16292,23 +17144,776 @@ function formInputPropertiesConfigDialog(el, editor) {
|
|
|
16292
17144
|
]
|
|
16293
17145
|
},
|
|
16294
17146
|
{
|
|
16295
|
-
type: "color",
|
|
16296
|
-
label: "\u5B57\u4F53\u989C\u8272",
|
|
16297
|
-
name: "color",
|
|
17147
|
+
type: "color",
|
|
17148
|
+
label: "\u5B57\u4F53\u989C\u8272",
|
|
17149
|
+
name: "color",
|
|
17150
|
+
required: true,
|
|
17151
|
+
value: (_v = (_u = el == null ? void 0 : el.formInput) == null ? void 0 : _u.color) != null ? _v : "#000000"
|
|
17152
|
+
},
|
|
17153
|
+
{
|
|
17154
|
+
type: "select",
|
|
17155
|
+
label: "\u5B57\u4F53\u6837\u5F0F",
|
|
17156
|
+
name: "fontFamily",
|
|
17157
|
+
required: true,
|
|
17158
|
+
value: (_x = (_w = el == null ? void 0 : el.formInput) == null ? void 0 : _w.fontFamily) != null ? _x : "SimSun",
|
|
17159
|
+
options: editor.getExtensionParam("fontOptions") == void 0 || editor.getExtensionParam("fontOptions") == null ? [{ label: "SimSun", value: "SimSun" }] : editor.getExtensionParam("fontOptions")
|
|
17160
|
+
}
|
|
17161
|
+
],
|
|
17162
|
+
onConfirm: (payload) => {
|
|
17163
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2;
|
|
17164
|
+
console.log("payload: ", payload);
|
|
17165
|
+
const key = (_a2 = payload.find((p) => p.name === "key")) == null ? void 0 : _a2.value;
|
|
17166
|
+
if (!key)
|
|
17167
|
+
return;
|
|
17168
|
+
const width = (_b2 = payload.find((p) => p.name === "width")) == null ? void 0 : _b2.value;
|
|
17169
|
+
if (!width)
|
|
17170
|
+
return;
|
|
17171
|
+
const height = (_c2 = payload.find((p) => p.name === "height")) == null ? void 0 : _c2.value;
|
|
17172
|
+
if (!height)
|
|
17173
|
+
return;
|
|
17174
|
+
const fontSize = (_d2 = payload.find((p) => p.name === "fontSize")) == null ? void 0 : _d2.value;
|
|
17175
|
+
const lineHeight = (_e2 = payload.find((p) => p.name === "lineHeight")) == null ? void 0 : _e2.value;
|
|
17176
|
+
const bold = ((_f2 = payload.find((p) => p.name === "bold")) == null ? void 0 : _f2.value) === "true";
|
|
17177
|
+
const italic = ((_g2 = payload.find((p) => p.name === "italic")) == null ? void 0 : _g2.value) === "true";
|
|
17178
|
+
const color = (_h2 = payload.find((p) => p.name === "color")) == null ? void 0 : _h2.value;
|
|
17179
|
+
const fontFamily = (_i2 = payload.find((p) => p.name === "fontFamily")) == null ? void 0 : _i2.value;
|
|
17180
|
+
const type = "input";
|
|
17181
|
+
const formInputKeys = editor.getExtensionParam("formInputKeys");
|
|
17182
|
+
const item = formInputKeys.find((item2) => item2.value === key);
|
|
17183
|
+
const elemProp = item ? JSON.stringify(item) : "";
|
|
17184
|
+
const txtFillType = (_j2 = payload.find((p) => p.name === "txtFillType")) == null ? void 0 : _j2.value;
|
|
17185
|
+
const txtRowAutoFlag = (_k2 = payload.find((p) => p.name === "txtRowAutoFlag")) == null ? void 0 : _k2.value;
|
|
17186
|
+
const txtEditFlag = (_l2 = payload.find((p) => p.name === "txtEditFlag")) == null ? void 0 : _l2.value;
|
|
17187
|
+
const formInput = {
|
|
17188
|
+
key,
|
|
17189
|
+
width,
|
|
17190
|
+
height,
|
|
17191
|
+
fontSize,
|
|
17192
|
+
bold,
|
|
17193
|
+
italic,
|
|
17194
|
+
color,
|
|
17195
|
+
fontFamily,
|
|
17196
|
+
type,
|
|
17197
|
+
txtFillType,
|
|
17198
|
+
txtRowAutoFlag,
|
|
17199
|
+
txtEditFlag,
|
|
17200
|
+
elemProp,
|
|
17201
|
+
lineHeight
|
|
17202
|
+
};
|
|
17203
|
+
const imageDataUrl = generateTextImage({
|
|
17204
|
+
text: key,
|
|
17205
|
+
width,
|
|
17206
|
+
height
|
|
17207
|
+
});
|
|
17208
|
+
const param = {
|
|
17209
|
+
"value": imageDataUrl,
|
|
17210
|
+
"type": ElementType.IMAGE,
|
|
17211
|
+
"formInput": formInput,
|
|
17212
|
+
"width": Number(width),
|
|
17213
|
+
"height": Number(height),
|
|
17214
|
+
"verticalAlign": "text-top"
|
|
17215
|
+
};
|
|
17216
|
+
if (el == null ? void 0 : el.id) {
|
|
17217
|
+
const deleteOpt = {
|
|
17218
|
+
id: el.id,
|
|
17219
|
+
properties: param
|
|
17220
|
+
};
|
|
17221
|
+
console.log("deleteOpt12", deleteOpt);
|
|
17222
|
+
editor.command.executeUpdateElementById(deleteOpt);
|
|
17223
|
+
return;
|
|
17224
|
+
}
|
|
17225
|
+
editor.command.executeInsertElementList([
|
|
17226
|
+
param
|
|
17227
|
+
]);
|
|
17228
|
+
}
|
|
17229
|
+
});
|
|
17230
|
+
}
|
|
17231
|
+
function generateImagePropertiesImage(options) {
|
|
17232
|
+
const config = {
|
|
17233
|
+
key: "",
|
|
17234
|
+
width: 200,
|
|
17235
|
+
height: 150,
|
|
17236
|
+
picAutoFlag: false,
|
|
17237
|
+
picFillType: "default",
|
|
17238
|
+
borderColor: "#000000",
|
|
17239
|
+
borderWidth: 1,
|
|
17240
|
+
...options
|
|
17241
|
+
};
|
|
17242
|
+
const canvas = document.createElement("canvas");
|
|
17243
|
+
const ctx = canvas.getContext("2d");
|
|
17244
|
+
canvas.width = config.width;
|
|
17245
|
+
canvas.height = config.height;
|
|
17246
|
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
17247
|
+
ctx.fillStyle = "#ffffff";
|
|
17248
|
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
17249
|
+
ctx.strokeStyle = config.borderColor;
|
|
17250
|
+
ctx.lineWidth = config.borderWidth;
|
|
17251
|
+
ctx.strokeRect(
|
|
17252
|
+
config.borderWidth / 2,
|
|
17253
|
+
config.borderWidth / 2,
|
|
17254
|
+
config.width - config.borderWidth,
|
|
17255
|
+
config.height - config.borderWidth
|
|
17256
|
+
);
|
|
17257
|
+
const iconSize = 60;
|
|
17258
|
+
const iconX = (config.width - iconSize) / 2;
|
|
17259
|
+
const iconY = config.height / 2 - iconSize / 2 - 10;
|
|
17260
|
+
ctx.strokeStyle = "#999999";
|
|
17261
|
+
ctx.lineWidth = 2;
|
|
17262
|
+
ctx.strokeRect(iconX, iconY, iconSize, iconSize);
|
|
17263
|
+
ctx.fillStyle = "#cccccc";
|
|
17264
|
+
ctx.beginPath();
|
|
17265
|
+
ctx.moveTo(iconX + 10, iconY + iconSize - 10);
|
|
17266
|
+
ctx.lineTo(iconX + iconSize / 2, iconY + 15);
|
|
17267
|
+
ctx.lineTo(iconX + iconSize - 10, iconY + iconSize - 10);
|
|
17268
|
+
ctx.closePath();
|
|
17269
|
+
ctx.fill();
|
|
17270
|
+
ctx.fillStyle = "#ffcc00";
|
|
17271
|
+
ctx.beginPath();
|
|
17272
|
+
ctx.arc(iconX + iconSize - 20, iconY + 15, 8, 0, Math.PI * 2);
|
|
17273
|
+
ctx.fill();
|
|
17274
|
+
if (config.key) {
|
|
17275
|
+
ctx.font = "14px SimSun";
|
|
17276
|
+
ctx.fillStyle = "#000000";
|
|
17277
|
+
ctx.textAlign = "center";
|
|
17278
|
+
ctx.textBaseline = "middle";
|
|
17279
|
+
ctx.fillText(config.key, config.width / 2, iconY + iconSize + 20);
|
|
17280
|
+
}
|
|
17281
|
+
if (config.picAutoFlag === "0") {
|
|
17282
|
+
ctx.font = "12px SimSun";
|
|
17283
|
+
ctx.fillStyle = "#5175f4";
|
|
17284
|
+
ctx.textAlign = "left";
|
|
17285
|
+
ctx.fillText("\u2713 \u81EA\u9002\u5E94", 10, config.height - 15);
|
|
17286
|
+
}
|
|
17287
|
+
const picFillTypeText = config.picFillType === "0" ? "\u9ED8\u8BA4\u5927\u5C0F" : config.picFillType === "1" ? "\u5206\u5272" : "\u987A\u5E8F";
|
|
17288
|
+
ctx.font = "12px SimSun";
|
|
17289
|
+
ctx.fillStyle = "#666666";
|
|
17290
|
+
ctx.textAlign = "right";
|
|
17291
|
+
ctx.fillText(`\u586B\u5145: ${picFillTypeText}`, config.width - 10, config.height - 15);
|
|
17292
|
+
return canvas.toDataURL("image/png");
|
|
17293
|
+
}
|
|
17294
|
+
function generateSignatureImage(options) {
|
|
17295
|
+
const config = {
|
|
17296
|
+
key: "",
|
|
17297
|
+
width: 200,
|
|
17298
|
+
height: 100,
|
|
17299
|
+
picAutoFlag: false,
|
|
17300
|
+
borderColor: "#000000",
|
|
17301
|
+
borderWidth: 1,
|
|
17302
|
+
...options
|
|
17303
|
+
};
|
|
17304
|
+
const canvas = document.createElement("canvas");
|
|
17305
|
+
const ctx = canvas.getContext("2d");
|
|
17306
|
+
canvas.width = config.width;
|
|
17307
|
+
canvas.height = config.height;
|
|
17308
|
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
17309
|
+
ctx.fillStyle = "#ffffff";
|
|
17310
|
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
17311
|
+
ctx.strokeStyle = config.borderColor;
|
|
17312
|
+
ctx.lineWidth = config.borderWidth;
|
|
17313
|
+
ctx.strokeRect(
|
|
17314
|
+
config.borderWidth / 2,
|
|
17315
|
+
config.borderWidth / 2,
|
|
17316
|
+
config.width - config.borderWidth,
|
|
17317
|
+
config.height - config.borderWidth
|
|
17318
|
+
);
|
|
17319
|
+
const iconSize = 50;
|
|
17320
|
+
const iconX = (config.width - iconSize) / 2;
|
|
17321
|
+
const iconY = config.height / 2 - iconSize / 2 - 5;
|
|
17322
|
+
ctx.fillStyle = "#4a90e2";
|
|
17323
|
+
ctx.beginPath();
|
|
17324
|
+
ctx.moveTo(iconX + 10, iconY + iconSize);
|
|
17325
|
+
ctx.lineTo(iconX + iconSize - 10, iconY + 10);
|
|
17326
|
+
ctx.lineTo(iconX + iconSize, iconY + 15);
|
|
17327
|
+
ctx.lineTo(iconX + 15, iconY + iconSize + 5);
|
|
17328
|
+
ctx.closePath();
|
|
17329
|
+
ctx.fill();
|
|
17330
|
+
ctx.fillStyle = "#333333";
|
|
17331
|
+
ctx.beginPath();
|
|
17332
|
+
ctx.moveTo(iconX + 10, iconY + iconSize);
|
|
17333
|
+
ctx.lineTo(iconX + 15, iconY + iconSize + 5);
|
|
17334
|
+
ctx.lineTo(iconX + 5, iconY + iconSize + 8);
|
|
17335
|
+
ctx.closePath();
|
|
17336
|
+
ctx.fill();
|
|
17337
|
+
if (config.key) {
|
|
17338
|
+
ctx.font = "14px SimSun";
|
|
17339
|
+
ctx.fillStyle = "#000000";
|
|
17340
|
+
ctx.textAlign = "center";
|
|
17341
|
+
ctx.textBaseline = "middle";
|
|
17342
|
+
ctx.fillText(config.key, config.width / 2, iconY + iconSize + 20);
|
|
17343
|
+
}
|
|
17344
|
+
if (config.picAutoFlag === "0") {
|
|
17345
|
+
ctx.font = "12px SimSun";
|
|
17346
|
+
ctx.fillStyle = "#5175f4";
|
|
17347
|
+
ctx.textAlign = "left";
|
|
17348
|
+
ctx.fillText("\u2713 \u81EA\u9002\u5E94", 10, config.height - 15);
|
|
17349
|
+
}
|
|
17350
|
+
ctx.font = "12px SimSun";
|
|
17351
|
+
ctx.fillStyle = "#666666";
|
|
17352
|
+
ctx.textAlign = "right";
|
|
17353
|
+
ctx.fillText("\u7B7E\u5B57\u6846", config.width - 10, config.height - 15);
|
|
17354
|
+
return canvas.toDataURL("image/png");
|
|
17355
|
+
}
|
|
17356
|
+
function generateSealImage(options) {
|
|
17357
|
+
const config = {
|
|
17358
|
+
key: "",
|
|
17359
|
+
width: 200,
|
|
17360
|
+
height: 100,
|
|
17361
|
+
picAutoFlag: false,
|
|
17362
|
+
borderColor: "#000000",
|
|
17363
|
+
borderWidth: 1,
|
|
17364
|
+
...options
|
|
17365
|
+
};
|
|
17366
|
+
const canvas = document.createElement("canvas");
|
|
17367
|
+
const ctx = canvas.getContext("2d");
|
|
17368
|
+
canvas.width = config.width;
|
|
17369
|
+
canvas.height = config.height;
|
|
17370
|
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
17371
|
+
ctx.fillStyle = "#ffffff";
|
|
17372
|
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
17373
|
+
ctx.strokeStyle = config.borderColor;
|
|
17374
|
+
ctx.lineWidth = config.borderWidth;
|
|
17375
|
+
ctx.strokeRect(
|
|
17376
|
+
config.borderWidth / 2,
|
|
17377
|
+
config.borderWidth / 2,
|
|
17378
|
+
config.width - config.borderWidth,
|
|
17379
|
+
config.height - config.borderWidth
|
|
17380
|
+
);
|
|
17381
|
+
const iconSize = 50;
|
|
17382
|
+
const iconX = (config.width - iconSize) / 2;
|
|
17383
|
+
const iconY = config.height / 2 - iconSize / 2 - 5;
|
|
17384
|
+
const centerX = iconX + iconSize / 2;
|
|
17385
|
+
const centerY = iconY + iconSize / 2;
|
|
17386
|
+
ctx.strokeStyle = "#e74c3c";
|
|
17387
|
+
ctx.lineWidth = 2.5;
|
|
17388
|
+
ctx.beginPath();
|
|
17389
|
+
ctx.arc(centerX, centerY, iconSize / 2 - 5, 0, Math.PI * 2);
|
|
17390
|
+
ctx.stroke();
|
|
17391
|
+
ctx.strokeStyle = "#e74c3c";
|
|
17392
|
+
ctx.lineWidth = 1.5;
|
|
17393
|
+
ctx.beginPath();
|
|
17394
|
+
ctx.arc(centerX, centerY, iconSize / 2 - 10, 0, Math.PI * 2);
|
|
17395
|
+
ctx.stroke();
|
|
17396
|
+
ctx.fillStyle = "#e74c3c";
|
|
17397
|
+
ctx.font = "bold 16px SimSun";
|
|
17398
|
+
ctx.textAlign = "center";
|
|
17399
|
+
ctx.textBaseline = "middle";
|
|
17400
|
+
ctx.fillText("\u7AE0", centerX, centerY);
|
|
17401
|
+
if (config.key) {
|
|
17402
|
+
ctx.font = "14px SimSun";
|
|
17403
|
+
ctx.fillStyle = "#000000";
|
|
17404
|
+
ctx.textAlign = "center";
|
|
17405
|
+
ctx.textBaseline = "middle";
|
|
17406
|
+
ctx.fillText(config.key, config.width / 2, iconY + iconSize + 20);
|
|
17407
|
+
}
|
|
17408
|
+
if (config.picAutoFlag === "0") {
|
|
17409
|
+
ctx.font = "12px SimSun";
|
|
17410
|
+
ctx.fillStyle = "#5175f4";
|
|
17411
|
+
ctx.textAlign = "left";
|
|
17412
|
+
ctx.fillText("\u2713 \u81EA\u9002\u5E94", 10, config.height - 15);
|
|
17413
|
+
}
|
|
17414
|
+
ctx.font = "12px SimSun";
|
|
17415
|
+
ctx.fillStyle = "#666666";
|
|
17416
|
+
ctx.textAlign = "right";
|
|
17417
|
+
ctx.fillText("\u7B7E\u7AE0\u6846", config.width - 10, config.height - 15);
|
|
17418
|
+
return canvas.toDataURL("image/png");
|
|
17419
|
+
}
|
|
17420
|
+
function generateRiskCopyImage(options) {
|
|
17421
|
+
const config = {
|
|
17422
|
+
key: "",
|
|
17423
|
+
width: 200,
|
|
17424
|
+
height: 100,
|
|
17425
|
+
riskCopyContent: "",
|
|
17426
|
+
borderColor: "#000000",
|
|
17427
|
+
borderWidth: 1,
|
|
17428
|
+
...options
|
|
17429
|
+
};
|
|
17430
|
+
const canvas = document.createElement("canvas");
|
|
17431
|
+
const ctx = canvas.getContext("2d");
|
|
17432
|
+
canvas.width = config.width;
|
|
17433
|
+
canvas.height = config.height;
|
|
17434
|
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
17435
|
+
ctx.fillStyle = "#ffffff";
|
|
17436
|
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
17437
|
+
ctx.strokeStyle = config.borderColor;
|
|
17438
|
+
ctx.lineWidth = config.borderWidth;
|
|
17439
|
+
ctx.strokeRect(
|
|
17440
|
+
config.borderWidth / 2,
|
|
17441
|
+
config.borderWidth / 2,
|
|
17442
|
+
config.width - config.borderWidth,
|
|
17443
|
+
config.height - config.borderWidth
|
|
17444
|
+
);
|
|
17445
|
+
const iconSize = 50;
|
|
17446
|
+
const iconX = (config.width - iconSize) / 2;
|
|
17447
|
+
const iconY = config.height / 2 - iconSize / 2 - 5;
|
|
17448
|
+
ctx.strokeStyle = "#f39c12";
|
|
17449
|
+
ctx.lineWidth = 2;
|
|
17450
|
+
ctx.strokeRect(iconX + 5, iconY + 5, iconSize - 10, iconSize - 10);
|
|
17451
|
+
ctx.beginPath();
|
|
17452
|
+
ctx.moveTo(iconX + 10, iconY + 15);
|
|
17453
|
+
ctx.lineTo(iconX + iconSize - 10, iconY + 15);
|
|
17454
|
+
ctx.moveTo(iconX + 10, iconY + 25);
|
|
17455
|
+
ctx.lineTo(iconX + iconSize - 10, iconY + 25);
|
|
17456
|
+
ctx.moveTo(iconX + 10, iconY + 35);
|
|
17457
|
+
ctx.lineTo(iconX + iconSize - 20, iconY + 35);
|
|
17458
|
+
ctx.stroke();
|
|
17459
|
+
ctx.fillStyle = "#e74c3c";
|
|
17460
|
+
ctx.beginPath();
|
|
17461
|
+
ctx.moveTo(iconX + iconSize - 15, iconY + 5);
|
|
17462
|
+
ctx.lineTo(iconX + iconSize - 5, iconY + 20);
|
|
17463
|
+
ctx.lineTo(iconX + iconSize - 25, iconY + 20);
|
|
17464
|
+
ctx.closePath();
|
|
17465
|
+
ctx.fill();
|
|
17466
|
+
ctx.fillStyle = "#ffffff";
|
|
17467
|
+
ctx.font = "bold 12px Arial";
|
|
17468
|
+
ctx.textAlign = "center";
|
|
17469
|
+
ctx.textBaseline = "middle";
|
|
17470
|
+
ctx.fillText("!", iconX + iconSize - 15, iconY + 14);
|
|
17471
|
+
if (config.key) {
|
|
17472
|
+
ctx.font = "14px SimSun";
|
|
17473
|
+
ctx.fillStyle = "#000000";
|
|
17474
|
+
ctx.textAlign = "center";
|
|
17475
|
+
ctx.textBaseline = "middle";
|
|
17476
|
+
ctx.fillText(config.key, config.width / 2, iconY + iconSize + 20);
|
|
17477
|
+
}
|
|
17478
|
+
if (config.riskCopyContent) {
|
|
17479
|
+
ctx.font = "11px SimSun";
|
|
17480
|
+
ctx.fillStyle = "#666666";
|
|
17481
|
+
ctx.textAlign = "left";
|
|
17482
|
+
const previewText = config.riskCopyContent.length > 20 ? config.riskCopyContent.substring(0, 20) + "..." : config.riskCopyContent;
|
|
17483
|
+
ctx.fillText(previewText, 10, config.height - 30);
|
|
17484
|
+
}
|
|
17485
|
+
ctx.font = "12px SimSun";
|
|
17486
|
+
ctx.fillStyle = "#666666";
|
|
17487
|
+
ctx.textAlign = "right";
|
|
17488
|
+
ctx.fillText("\u98CE\u9669\u6284\u5F55", config.width - 10, config.height - 15);
|
|
17489
|
+
return canvas.toDataURL("image/png");
|
|
17490
|
+
}
|
|
17491
|
+
function formImagePropertiesConfigDialog(el, editor) {
|
|
17492
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
17493
|
+
console.log("el", el);
|
|
17494
|
+
new Dialog({
|
|
17495
|
+
title: "\u56FE\u7247\u6846\u914D\u7F6E",
|
|
17496
|
+
data: [
|
|
17497
|
+
{
|
|
17498
|
+
type: "select",
|
|
17499
|
+
label: "\u5143\u7D20\u540D\u79F0",
|
|
17500
|
+
name: "key",
|
|
17501
|
+
required: true,
|
|
17502
|
+
value: (_b = (_a = el == null ? void 0 : el.formInput) == null ? void 0 : _a.key) != null ? _b : "",
|
|
17503
|
+
placeholder: "\u8BF7\u9009\u62E9\u5143\u7D20\u540D\u79F0",
|
|
17504
|
+
options: editor.getExtensionParam("picKeys") == void 0 || editor.getExtensionParam("picKeys") == null ? [] : editor.getExtensionParam("picKeys")
|
|
17505
|
+
},
|
|
17506
|
+
{
|
|
17507
|
+
type: "number",
|
|
17508
|
+
label: "\u5BBD\u5EA6 (px)",
|
|
17509
|
+
name: "width",
|
|
17510
|
+
required: true,
|
|
17511
|
+
placeholder: "\u8BF7\u8F93\u5165\u5BBD\u5EA6",
|
|
17512
|
+
value: (_d = (_c = el == null ? void 0 : el.formInput) == null ? void 0 : _c.width) != null ? _d : "200"
|
|
17513
|
+
},
|
|
17514
|
+
{
|
|
17515
|
+
type: "number",
|
|
17516
|
+
label: "\u9AD8\u5EA6 (px)",
|
|
17517
|
+
name: "height",
|
|
17518
|
+
required: true,
|
|
17519
|
+
placeholder: "\u8BF7\u8F93\u5165\u9AD8\u5EA6",
|
|
17520
|
+
value: (_f = (_e = el == null ? void 0 : el.formInput) == null ? void 0 : _e.height) != null ? _f : "150"
|
|
17521
|
+
},
|
|
17522
|
+
{
|
|
17523
|
+
type: "select",
|
|
17524
|
+
label: "\u662F\u5426\u81EA\u9002\u5E94",
|
|
17525
|
+
name: "picAutoFlag",
|
|
17526
|
+
required: false,
|
|
17527
|
+
value: (_h = (_g = el == null ? void 0 : el.formInput) == null ? void 0 : _g.picAutoFlag) != null ? _h : "1",
|
|
17528
|
+
options: [
|
|
17529
|
+
{
|
|
17530
|
+
label: "\u5426",
|
|
17531
|
+
value: "1"
|
|
17532
|
+
},
|
|
17533
|
+
{
|
|
17534
|
+
label: "\u662F",
|
|
17535
|
+
value: "0"
|
|
17536
|
+
}
|
|
17537
|
+
]
|
|
17538
|
+
},
|
|
17539
|
+
{
|
|
17540
|
+
type: "select",
|
|
17541
|
+
label: "\u662F\u5426\u7F29\u653E\u56FE\u7247",
|
|
17542
|
+
name: "reduceSizeFlag",
|
|
17543
|
+
required: false,
|
|
17544
|
+
value: (_j = (_i = el == null ? void 0 : el.formInput) == null ? void 0 : _i.reduceSizeFlag) != null ? _j : "1",
|
|
17545
|
+
options: [
|
|
17546
|
+
{
|
|
17547
|
+
label: "\u5426",
|
|
17548
|
+
value: "1"
|
|
17549
|
+
},
|
|
17550
|
+
{
|
|
17551
|
+
label: "\u662F",
|
|
17552
|
+
value: "0"
|
|
17553
|
+
}
|
|
17554
|
+
]
|
|
17555
|
+
},
|
|
17556
|
+
{
|
|
17557
|
+
type: "select",
|
|
17558
|
+
label: "\u56FE\u7247\u586B\u5145\u914D\u7F6E",
|
|
17559
|
+
name: "picFillType",
|
|
17560
|
+
required: true,
|
|
17561
|
+
value: (_l = (_k = el == null ? void 0 : el.formInput) == null ? void 0 : _k.picFillType) != null ? _l : "0",
|
|
17562
|
+
options: [
|
|
17563
|
+
{
|
|
17564
|
+
label: "\u9ED8\u8BA4\u5927\u5C0F",
|
|
17565
|
+
value: "0"
|
|
17566
|
+
},
|
|
17567
|
+
{
|
|
17568
|
+
label: "\u5206\u5272",
|
|
17569
|
+
value: "1"
|
|
17570
|
+
},
|
|
17571
|
+
{
|
|
17572
|
+
label: "\u987A\u5E8F",
|
|
17573
|
+
value: "2"
|
|
17574
|
+
}
|
|
17575
|
+
]
|
|
17576
|
+
},
|
|
17577
|
+
{
|
|
17578
|
+
type: "number",
|
|
17579
|
+
label: "\u884C\u6570",
|
|
17580
|
+
name: "rowNum",
|
|
17581
|
+
required: false,
|
|
17582
|
+
placeholder: "\u8BF7\u8F93\u5165\u884C\u6570",
|
|
17583
|
+
value: (_n = (_m = el == null ? void 0 : el.formInput) == null ? void 0 : _m.rowNum) != null ? _n : "1"
|
|
17584
|
+
},
|
|
17585
|
+
{
|
|
17586
|
+
type: "number",
|
|
17587
|
+
label: "\u5217\u6570",
|
|
17588
|
+
name: "colNum",
|
|
17589
|
+
required: false,
|
|
17590
|
+
placeholder: "\u8BF7\u8F93\u5165\u5217\u6570",
|
|
17591
|
+
value: (_p = (_o = el == null ? void 0 : el.formInput) == null ? void 0 : _o.colNum) != null ? _p : "1"
|
|
17592
|
+
}
|
|
17593
|
+
],
|
|
17594
|
+
onConfirm: (payload) => {
|
|
17595
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
17596
|
+
console.log("payload: ", payload);
|
|
17597
|
+
const key = (_a2 = payload.find((p) => p.name === "key")) == null ? void 0 : _a2.value;
|
|
17598
|
+
if (!key)
|
|
17599
|
+
return;
|
|
17600
|
+
const width = (_b2 = payload.find((p) => p.name === "width")) == null ? void 0 : _b2.value;
|
|
17601
|
+
if (!width)
|
|
17602
|
+
return;
|
|
17603
|
+
const height = (_c2 = payload.find((p) => p.name === "height")) == null ? void 0 : _c2.value;
|
|
17604
|
+
if (!height)
|
|
17605
|
+
return;
|
|
17606
|
+
const picAutoFlag = ((_d2 = payload.find((p) => p.name === "picAutoFlag")) == null ? void 0 : _d2.value) || "1";
|
|
17607
|
+
const picFillType = ((_e2 = payload.find((p) => p.name === "picFillType")) == null ? void 0 : _e2.value) || "0";
|
|
17608
|
+
const type = "image";
|
|
17609
|
+
const picKeys = editor.getExtensionParam("picKeys");
|
|
17610
|
+
if (!picKeys)
|
|
17611
|
+
return;
|
|
17612
|
+
const item = picKeys.find((item2) => item2.value === key);
|
|
17613
|
+
const elemProp = item ? JSON.stringify(item) : "";
|
|
17614
|
+
const reduceSizeFlag = ((_f2 = payload.find((p) => p.name === "reduceSizeFlag")) == null ? void 0 : _f2.value) || "1";
|
|
17615
|
+
const rowNum = ((_g2 = payload.find((p) => p.name === "rowNum")) == null ? void 0 : _g2.value) || "1";
|
|
17616
|
+
const colNum = ((_h2 = payload.find((p) => p.name === "colNum")) == null ? void 0 : _h2.value) || "1";
|
|
17617
|
+
const formInput = {
|
|
17618
|
+
key,
|
|
17619
|
+
width,
|
|
17620
|
+
height,
|
|
17621
|
+
type,
|
|
17622
|
+
picAutoFlag,
|
|
17623
|
+
picFillType,
|
|
17624
|
+
elemProp,
|
|
17625
|
+
reduceSizeFlag,
|
|
17626
|
+
rowNum,
|
|
17627
|
+
colNum
|
|
17628
|
+
};
|
|
17629
|
+
const imageDataUrl = generateImagePropertiesImage({
|
|
17630
|
+
key,
|
|
17631
|
+
width: Number(width),
|
|
17632
|
+
height: Number(height),
|
|
17633
|
+
picAutoFlag,
|
|
17634
|
+
picFillType
|
|
17635
|
+
});
|
|
17636
|
+
const param = {
|
|
17637
|
+
value: imageDataUrl,
|
|
17638
|
+
type: ElementType.IMAGE,
|
|
17639
|
+
formInput,
|
|
17640
|
+
width: Number(width),
|
|
17641
|
+
height: Number(height)
|
|
17642
|
+
};
|
|
17643
|
+
if (el == null ? void 0 : el.id) {
|
|
17644
|
+
const updateOpt = {
|
|
17645
|
+
id: el.id,
|
|
17646
|
+
properties: param
|
|
17647
|
+
};
|
|
17648
|
+
console.log("updateOpt", updateOpt);
|
|
17649
|
+
editor.command.executeUpdateElementById(updateOpt);
|
|
17650
|
+
return;
|
|
17651
|
+
}
|
|
17652
|
+
editor.command.executeInsertElementList([param]);
|
|
17653
|
+
}
|
|
17654
|
+
});
|
|
17655
|
+
}
|
|
17656
|
+
function formSignatureConfigDialog(el, editor) {
|
|
17657
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
17658
|
+
console.log("el", el);
|
|
17659
|
+
new Dialog({
|
|
17660
|
+
title: "\u7B7E\u5B57\u6846\u914D\u7F6E",
|
|
17661
|
+
data: [
|
|
17662
|
+
{
|
|
17663
|
+
type: "select",
|
|
17664
|
+
label: "\u5143\u7D20\u540D\u79F0",
|
|
17665
|
+
name: "key",
|
|
17666
|
+
required: true,
|
|
17667
|
+
value: (_b = (_a = el == null ? void 0 : el.formInput) == null ? void 0 : _a.key) != null ? _b : "",
|
|
17668
|
+
placeholder: "\u8BF7\u9009\u62E9\u5143\u7D20\u540D\u79F0",
|
|
17669
|
+
options: editor.getExtensionParam("signPicKeys") == void 0 || editor.getExtensionParam("signPicKeys") == null ? [] : editor.getExtensionParam("signPicKeys")
|
|
17670
|
+
},
|
|
17671
|
+
{
|
|
17672
|
+
type: "number",
|
|
17673
|
+
label: "\u5BBD\u5EA6 (px)",
|
|
17674
|
+
name: "width",
|
|
17675
|
+
required: true,
|
|
17676
|
+
placeholder: "\u8BF7\u8F93\u5165\u5BBD\u5EA6",
|
|
17677
|
+
value: (_d = (_c = el == null ? void 0 : el.formInput) == null ? void 0 : _c.width) != null ? _d : "200"
|
|
17678
|
+
},
|
|
17679
|
+
{
|
|
17680
|
+
type: "number",
|
|
17681
|
+
label: "\u9AD8\u5EA6 (px)",
|
|
17682
|
+
name: "height",
|
|
17683
|
+
required: true,
|
|
17684
|
+
placeholder: "\u8BF7\u8F93\u5165\u9AD8\u5EA6",
|
|
17685
|
+
value: (_f = (_e = el == null ? void 0 : el.formInput) == null ? void 0 : _e.height) != null ? _f : "100"
|
|
17686
|
+
},
|
|
17687
|
+
{
|
|
17688
|
+
type: "select",
|
|
17689
|
+
label: "\u662F\u5426\u81EA\u9002\u5E94",
|
|
17690
|
+
name: "picAutoFlag",
|
|
17691
|
+
required: false,
|
|
17692
|
+
value: (_h = (_g = el == null ? void 0 : el.formInput) == null ? void 0 : _g.picAutoFlag) != null ? _h : "1",
|
|
17693
|
+
options: [
|
|
17694
|
+
{
|
|
17695
|
+
label: "\u5426",
|
|
17696
|
+
value: "1"
|
|
17697
|
+
},
|
|
17698
|
+
{
|
|
17699
|
+
label: "\u662F",
|
|
17700
|
+
value: "0"
|
|
17701
|
+
}
|
|
17702
|
+
]
|
|
17703
|
+
},
|
|
17704
|
+
{
|
|
17705
|
+
type: "select",
|
|
17706
|
+
label: "\u662F\u5426\u7F29\u653E",
|
|
17707
|
+
name: "reduceSizeFlag",
|
|
17708
|
+
required: false,
|
|
17709
|
+
value: (_j = (_i = el == null ? void 0 : el.formInput) == null ? void 0 : _i.reduceSizeFlag) != null ? _j : "1",
|
|
17710
|
+
options: [
|
|
17711
|
+
{
|
|
17712
|
+
label: "\u5426",
|
|
17713
|
+
value: "1"
|
|
17714
|
+
},
|
|
17715
|
+
{
|
|
17716
|
+
label: "\u662F",
|
|
17717
|
+
value: "0"
|
|
17718
|
+
}
|
|
17719
|
+
]
|
|
17720
|
+
}
|
|
17721
|
+
],
|
|
17722
|
+
onConfirm: (payload) => {
|
|
17723
|
+
var _a2, _b2, _c2, _d2, _e2;
|
|
17724
|
+
console.log("payload: ", payload);
|
|
17725
|
+
const key = (_a2 = payload.find((p) => p.name === "key")) == null ? void 0 : _a2.value;
|
|
17726
|
+
if (!key)
|
|
17727
|
+
return;
|
|
17728
|
+
const width = (_b2 = payload.find((p) => p.name === "width")) == null ? void 0 : _b2.value;
|
|
17729
|
+
if (!width)
|
|
17730
|
+
return;
|
|
17731
|
+
const height = (_c2 = payload.find((p) => p.name === "height")) == null ? void 0 : _c2.value;
|
|
17732
|
+
if (!height)
|
|
17733
|
+
return;
|
|
17734
|
+
const picAutoFlag = ((_d2 = payload.find((p) => p.name === "picAutoFlag")) == null ? void 0 : _d2.value) || "1";
|
|
17735
|
+
const type = "signature";
|
|
17736
|
+
const signPicKeys = editor.getExtensionParam("signPicKeys");
|
|
17737
|
+
const item = signPicKeys.find((item2) => item2.value === key);
|
|
17738
|
+
const elemProp = item ? JSON.stringify(item) : "";
|
|
17739
|
+
const reduceSizeFlag = ((_e2 = payload.find((p) => p.name === "reduceSizeFlag")) == null ? void 0 : _e2.value) || "1";
|
|
17740
|
+
const formInput = {
|
|
17741
|
+
key,
|
|
17742
|
+
width,
|
|
17743
|
+
height,
|
|
17744
|
+
type,
|
|
17745
|
+
picAutoFlag,
|
|
17746
|
+
elemProp,
|
|
17747
|
+
reduceSizeFlag
|
|
17748
|
+
};
|
|
17749
|
+
const imageDataUrl = generateSignatureImage({
|
|
17750
|
+
key,
|
|
17751
|
+
width: Number(width),
|
|
17752
|
+
height: Number(height),
|
|
17753
|
+
picAutoFlag
|
|
17754
|
+
});
|
|
17755
|
+
const param = {
|
|
17756
|
+
value: imageDataUrl,
|
|
17757
|
+
type: ElementType.IMAGE,
|
|
17758
|
+
formInput,
|
|
17759
|
+
width: Number(width),
|
|
17760
|
+
height: Number(height)
|
|
17761
|
+
};
|
|
17762
|
+
if (el == null ? void 0 : el.id) {
|
|
17763
|
+
const updateOpt = {
|
|
17764
|
+
id: el.id,
|
|
17765
|
+
properties: param
|
|
17766
|
+
};
|
|
17767
|
+
console.log("updateOpt", updateOpt);
|
|
17768
|
+
editor.command.executeUpdateElementById(updateOpt);
|
|
17769
|
+
return;
|
|
17770
|
+
}
|
|
17771
|
+
editor.command.executeInsertElementList([param]);
|
|
17772
|
+
}
|
|
17773
|
+
});
|
|
17774
|
+
}
|
|
17775
|
+
function formSealConfigDialog(el, editor) {
|
|
17776
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
17777
|
+
console.log("el", el);
|
|
17778
|
+
new Dialog({
|
|
17779
|
+
title: "\u7B7E\u7AE0\u6846\u914D\u7F6E",
|
|
17780
|
+
data: [
|
|
17781
|
+
{
|
|
17782
|
+
type: "select",
|
|
17783
|
+
label: "\u5143\u7D20\u540D\u79F0",
|
|
17784
|
+
name: "key",
|
|
17785
|
+
required: true,
|
|
17786
|
+
value: (_b = (_a = el == null ? void 0 : el.formInput) == null ? void 0 : _a.key) != null ? _b : "",
|
|
17787
|
+
placeholder: "\u8BF7\u9009\u62E9\u5143\u7D20\u540D\u79F0",
|
|
17788
|
+
options: editor.getExtensionParam("sealPicKeys") == void 0 || editor.getExtensionParam("sealPicKeys") == null ? [] : editor.getExtensionParam("sealPicKeys")
|
|
17789
|
+
},
|
|
17790
|
+
{
|
|
17791
|
+
type: "number",
|
|
17792
|
+
label: "\u5BBD\u5EA6 (px)",
|
|
17793
|
+
name: "width",
|
|
17794
|
+
required: true,
|
|
17795
|
+
placeholder: "\u8BF7\u8F93\u5165\u5BBD\u5EA6",
|
|
17796
|
+
value: (_d = (_c = el == null ? void 0 : el.formInput) == null ? void 0 : _c.width) != null ? _d : "200"
|
|
17797
|
+
},
|
|
17798
|
+
{
|
|
17799
|
+
type: "number",
|
|
17800
|
+
label: "\u9AD8\u5EA6 (px)",
|
|
17801
|
+
name: "height",
|
|
17802
|
+
required: true,
|
|
17803
|
+
placeholder: "\u8BF7\u8F93\u5165\u9AD8\u5EA6",
|
|
17804
|
+
value: (_f = (_e = el == null ? void 0 : el.formInput) == null ? void 0 : _e.height) != null ? _f : "100"
|
|
17805
|
+
},
|
|
17806
|
+
{
|
|
17807
|
+
type: "select",
|
|
17808
|
+
label: "\u662F\u5426\u81EA\u9002\u5E94",
|
|
17809
|
+
name: "picAutoFlag",
|
|
17810
|
+
required: false,
|
|
17811
|
+
value: (_h = (_g = el == null ? void 0 : el.formInput) == null ? void 0 : _g.picAutoFlag) != null ? _h : "1",
|
|
17812
|
+
options: [
|
|
17813
|
+
{
|
|
17814
|
+
label: "\u5426",
|
|
17815
|
+
value: "1"
|
|
17816
|
+
},
|
|
17817
|
+
{
|
|
17818
|
+
label: "\u662F",
|
|
17819
|
+
value: "0"
|
|
17820
|
+
}
|
|
17821
|
+
]
|
|
17822
|
+
}
|
|
17823
|
+
],
|
|
17824
|
+
onConfirm: (payload) => {
|
|
17825
|
+
var _a2, _b2, _c2, _d2;
|
|
17826
|
+
console.log("payload: ", payload);
|
|
17827
|
+
const key = (_a2 = payload.find((p) => p.name === "key")) == null ? void 0 : _a2.value;
|
|
17828
|
+
if (!key)
|
|
17829
|
+
return;
|
|
17830
|
+
const width = (_b2 = payload.find((p) => p.name === "width")) == null ? void 0 : _b2.value;
|
|
17831
|
+
if (!width)
|
|
17832
|
+
return;
|
|
17833
|
+
const height = (_c2 = payload.find((p) => p.name === "height")) == null ? void 0 : _c2.value;
|
|
17834
|
+
if (!height)
|
|
17835
|
+
return;
|
|
17836
|
+
const picAutoFlag = ((_d2 = payload.find((p) => p.name === "picAutoFlag")) == null ? void 0 : _d2.value) || "1";
|
|
17837
|
+
const type = "seal";
|
|
17838
|
+
const sealPicKeys = editor.getExtensionParam("sealPicKeys");
|
|
17839
|
+
const item = sealPicKeys.find((item2) => item2.value === key);
|
|
17840
|
+
const elemProp = item ? JSON.stringify(item) : "";
|
|
17841
|
+
const formInput = {
|
|
17842
|
+
key,
|
|
17843
|
+
width,
|
|
17844
|
+
height,
|
|
17845
|
+
type,
|
|
17846
|
+
picAutoFlag,
|
|
17847
|
+
elemProp
|
|
17848
|
+
};
|
|
17849
|
+
const imageDataUrl = generateSealImage({
|
|
17850
|
+
key,
|
|
17851
|
+
width: Number(width),
|
|
17852
|
+
height: Number(height),
|
|
17853
|
+
picAutoFlag
|
|
17854
|
+
});
|
|
17855
|
+
const param = {
|
|
17856
|
+
value: imageDataUrl,
|
|
17857
|
+
type: ElementType.IMAGE,
|
|
17858
|
+
formInput,
|
|
17859
|
+
width: Number(width),
|
|
17860
|
+
height: Number(height)
|
|
17861
|
+
};
|
|
17862
|
+
if (el == null ? void 0 : el.id) {
|
|
17863
|
+
const updateOpt = {
|
|
17864
|
+
id: el.id,
|
|
17865
|
+
properties: param
|
|
17866
|
+
};
|
|
17867
|
+
console.log("updateOpt", updateOpt);
|
|
17868
|
+
editor.command.executeUpdateElementById(updateOpt);
|
|
17869
|
+
return;
|
|
17870
|
+
}
|
|
17871
|
+
editor.command.executeInsertElementList([param]);
|
|
17872
|
+
}
|
|
17873
|
+
});
|
|
17874
|
+
}
|
|
17875
|
+
function formRiskCopyConfigDialog(el, editor) {
|
|
17876
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
17877
|
+
console.log("el", el);
|
|
17878
|
+
new Dialog({
|
|
17879
|
+
title: "\u98CE\u9669\u6284\u5F55\u6846\u914D\u7F6E",
|
|
17880
|
+
data: [
|
|
17881
|
+
{
|
|
17882
|
+
type: "select",
|
|
17883
|
+
label: "\u5143\u7D20\u540D\u79F0",
|
|
17884
|
+
name: "key",
|
|
17885
|
+
required: true,
|
|
17886
|
+
value: (_b = (_a = el == null ? void 0 : el.formInput) == null ? void 0 : _a.key) != null ? _b : "",
|
|
17887
|
+
placeholder: "\u8BF7\u9009\u62E9\u5143\u7D20\u540D\u79F0",
|
|
17888
|
+
options: editor.getExtensionParam("riskCopyKeys") == void 0 || editor.getExtensionParam("riskCopyKeys") == null ? [] : editor.getExtensionParam("riskCopyKeys")
|
|
17889
|
+
},
|
|
17890
|
+
{
|
|
17891
|
+
type: "number",
|
|
17892
|
+
label: "\u5BBD\u5EA6 (px)",
|
|
17893
|
+
name: "width",
|
|
16298
17894
|
required: true,
|
|
16299
|
-
|
|
17895
|
+
placeholder: "\u8BF7\u8F93\u5165\u5BBD\u5EA6",
|
|
17896
|
+
value: (_d = (_c = el == null ? void 0 : el.formInput) == null ? void 0 : _c.width) != null ? _d : "200"
|
|
16300
17897
|
},
|
|
16301
17898
|
{
|
|
16302
|
-
type: "
|
|
16303
|
-
label: "\
|
|
16304
|
-
name: "
|
|
17899
|
+
type: "number",
|
|
17900
|
+
label: "\u9AD8\u5EA6 (px)",
|
|
17901
|
+
name: "height",
|
|
16305
17902
|
required: true,
|
|
16306
|
-
|
|
16307
|
-
|
|
17903
|
+
placeholder: "\u8BF7\u8F93\u5165\u9AD8\u5EA6",
|
|
17904
|
+
value: (_f = (_e = el == null ? void 0 : el.formInput) == null ? void 0 : _e.height) != null ? _f : "100"
|
|
17905
|
+
},
|
|
17906
|
+
{
|
|
17907
|
+
type: "textarea",
|
|
17908
|
+
label: "\u98CE\u9669\u6284\u5F55\u5185\u5BB9",
|
|
17909
|
+
name: "riskCopyContent",
|
|
17910
|
+
required: false,
|
|
17911
|
+
placeholder: "\u8BF7\u8F93\u5165\u98CE\u9669\u6284\u5F55\u5185\u5BB9",
|
|
17912
|
+
value: (_h = (_g = el == null ? void 0 : el.formInput) == null ? void 0 : _g.riskCopyContent) != null ? _h : ""
|
|
16308
17913
|
}
|
|
16309
17914
|
],
|
|
16310
17915
|
onConfirm: (payload) => {
|
|
16311
|
-
var _a2, _b2, _c2, _d2
|
|
17916
|
+
var _a2, _b2, _c2, _d2;
|
|
16312
17917
|
console.log("payload: ", payload);
|
|
16313
17918
|
const key = (_a2 = payload.find((p) => p.name === "key")) == null ? void 0 : _a2.value;
|
|
16314
17919
|
if (!key)
|
|
@@ -16319,56 +17924,42 @@ function formInputPropertiesConfigDialog(el, editor) {
|
|
|
16319
17924
|
const height = (_c2 = payload.find((p) => p.name === "height")) == null ? void 0 : _c2.value;
|
|
16320
17925
|
if (!height)
|
|
16321
17926
|
return;
|
|
16322
|
-
const
|
|
16323
|
-
const
|
|
16324
|
-
const
|
|
16325
|
-
const
|
|
16326
|
-
const
|
|
16327
|
-
const type = "input";
|
|
16328
|
-
const formInputKeys = editor.getExtensionParam("formInputKeys");
|
|
16329
|
-
const elemProp = formInputKeys.find((kel2) => kel2.value === key) ? JSON.parse(kel) : "";
|
|
16330
|
-
const txtFillType = (_i2 = payload.find((p) => p.name === "txtFillType")) == null ? void 0 : _i2.value;
|
|
16331
|
-
const txtRowAutoFlag = (_j2 = payload.find((p) => p.name === "txtRowAutoFlag")) == null ? void 0 : _j2.value;
|
|
16332
|
-
const txtEditFlag = (_k2 = payload.find((p) => p.name === "txtEditFlag")) == null ? void 0 : _k2.value;
|
|
17927
|
+
const riskCopyContent = ((_d2 = payload.find((p) => p.name === "riskCopyContent")) == null ? void 0 : _d2.value) || "";
|
|
17928
|
+
const type = "riskCopy";
|
|
17929
|
+
const riskCopyKeys = editor.getExtensionParam("riskCopyKeys");
|
|
17930
|
+
const item = riskCopyKeys.find((item2) => item2.value === key);
|
|
17931
|
+
const elemProp = item ? JSON.stringify(item) : "";
|
|
16333
17932
|
const formInput = {
|
|
16334
17933
|
key,
|
|
16335
17934
|
width,
|
|
16336
17935
|
height,
|
|
16337
|
-
fontSize,
|
|
16338
|
-
bold,
|
|
16339
|
-
italic,
|
|
16340
|
-
color,
|
|
16341
|
-
fontFamily,
|
|
16342
17936
|
type,
|
|
16343
|
-
|
|
16344
|
-
txtRowAutoFlag,
|
|
16345
|
-
txtEditFlag,
|
|
17937
|
+
riskCopyContent,
|
|
16346
17938
|
elemProp
|
|
16347
17939
|
};
|
|
16348
|
-
const imageDataUrl =
|
|
16349
|
-
|
|
16350
|
-
width,
|
|
16351
|
-
height
|
|
17940
|
+
const imageDataUrl = generateRiskCopyImage({
|
|
17941
|
+
key,
|
|
17942
|
+
width: Number(width),
|
|
17943
|
+
height: Number(height),
|
|
17944
|
+
riskCopyContent
|
|
16352
17945
|
});
|
|
16353
17946
|
const param = {
|
|
16354
|
-
|
|
16355
|
-
|
|
16356
|
-
|
|
16357
|
-
|
|
16358
|
-
|
|
17947
|
+
value: imageDataUrl,
|
|
17948
|
+
type: ElementType.IMAGE,
|
|
17949
|
+
formInput,
|
|
17950
|
+
width: Number(width),
|
|
17951
|
+
height: Number(height)
|
|
16359
17952
|
};
|
|
16360
17953
|
if (el == null ? void 0 : el.id) {
|
|
16361
|
-
const
|
|
17954
|
+
const updateOpt = {
|
|
16362
17955
|
id: el.id,
|
|
16363
17956
|
properties: param
|
|
16364
17957
|
};
|
|
16365
|
-
console.log("
|
|
16366
|
-
editor.command.executeUpdateElementById(
|
|
17958
|
+
console.log("updateOpt", updateOpt);
|
|
17959
|
+
editor.command.executeUpdateElementById(updateOpt);
|
|
16367
17960
|
return;
|
|
16368
17961
|
}
|
|
16369
|
-
editor.command.executeInsertElementList([
|
|
16370
|
-
param
|
|
16371
|
-
]);
|
|
17962
|
+
editor.command.executeInsertElementList([param]);
|
|
16372
17963
|
}
|
|
16373
17964
|
});
|
|
16374
17965
|
}
|
|
@@ -16477,23 +18068,6 @@ class Previewer {
|
|
|
16477
18068
|
const cursor = window.getComputedStyle(target).cursor;
|
|
16478
18069
|
document.body.style.cursor = cursor;
|
|
16479
18070
|
this.canvas.style.cursor = cursor;
|
|
16480
|
-
if (this.curElement.formInput) {
|
|
16481
|
-
console.log("this.curElement.formInput", this.curElement.formInput);
|
|
16482
|
-
console.log("this.curElement.formInput.type", this.curElement.formInput.type);
|
|
16483
|
-
this.curElement.formInput.width = `${this.curElement.width * scale}`;
|
|
16484
|
-
this.curElement.formInput.height = `${this.curElement.height * scale}`;
|
|
16485
|
-
if (this.curElement.formInput.type == "checkbox") {
|
|
16486
|
-
this.curElementSrc = generateCheckboxImage(this.curElement.formInput);
|
|
16487
|
-
} else if (this.curElement.formInput.type == "radio") {
|
|
16488
|
-
this.curElementSrc = generateRadioImage(this.curElement.formInput);
|
|
16489
|
-
} else {
|
|
16490
|
-
this.curElementSrc = generateTextImage({
|
|
16491
|
-
text: this.curElement.formInput.key,
|
|
16492
|
-
width: this.curElement.formInput.width,
|
|
16493
|
-
height: this.curElement.formInput.height
|
|
16494
|
-
});
|
|
16495
|
-
}
|
|
16496
|
-
}
|
|
16497
18071
|
console.log(this.curElement);
|
|
16498
18072
|
this.resizerImage.src = this.curElementSrc;
|
|
16499
18073
|
this.resizerImageContainer.style.display = "block";
|
|
@@ -16516,6 +18090,14 @@ class Previewer {
|
|
|
16516
18090
|
this.curElementSrc = generateCheckboxImage(this.curElement.formInput);
|
|
16517
18091
|
} else if (this.curElement.formInput.type == "radio") {
|
|
16518
18092
|
this.curElementSrc = generateRadioImage(this.curElement.formInput);
|
|
18093
|
+
} else if (this.curElement.formInput.type == "image") {
|
|
18094
|
+
this.curElementSrc = generateImagePropertiesImage(this.curElement.formInput);
|
|
18095
|
+
} else if (this.curElement.formInput.type == "signature") {
|
|
18096
|
+
this.curElementSrc = generateSignatureImage(this.curElement.formInput);
|
|
18097
|
+
} else if (this.curElement.formInput.type == "seal") {
|
|
18098
|
+
this.curElementSrc = generateSealImage(this.curElement.formInput);
|
|
18099
|
+
} else if (this.curElement.formInput.type == "riskCopy") {
|
|
18100
|
+
this.curElementSrc = generateRiskCopyImage(this.curElement.formInput);
|
|
16519
18101
|
} else {
|
|
16520
18102
|
this.curElementSrc = generateTextImage({
|
|
16521
18103
|
text: this.curElement.formInput.key,
|
|
@@ -20568,19 +22150,10 @@ class Draw {
|
|
|
20568
22150
|
return el.actualSize || el.size || this.options.defaultSize;
|
|
20569
22151
|
}
|
|
20570
22152
|
getElementRowMargin(el) {
|
|
20571
|
-
|
|
20572
|
-
const { defaultSize, defaultBasicRowMarginHeight, defaultRowMargin, scale } = this.options;
|
|
20573
|
-
const fontSize = el.size || defaultSize;
|
|
20574
|
-
let ratio = 1;
|
|
20575
|
-
if (fontSize < 12) {
|
|
20576
|
-
ratio = fontSize / 12;
|
|
20577
|
-
} else if (fontSize > 30) {
|
|
20578
|
-
ratio = 1 + (fontSize - 30) / 30;
|
|
20579
|
-
}
|
|
20580
|
-
return defaultBasicRowMarginHeight * ratio * ((_a = el.rowMargin) != null ? _a : defaultRowMargin) * scale;
|
|
22153
|
+
return computeElementRowMarginPx(el, this.options);
|
|
20581
22154
|
}
|
|
20582
22155
|
computeRowList(payload) {
|
|
20583
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
22156
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
20584
22157
|
const { innerWidth, elementList, isPagingMode = false, isFromTable = false, startX = 0, startY = 0, pageHeight = 0, mainOuterHeight = 0, surroundElementList = [] } = payload;
|
|
20585
22158
|
const { defaultSize, scale, imgCaption, table: { tdPadding, defaultTrMinHeight }, defaultTabWidth } = this.options;
|
|
20586
22159
|
const defaultBasicRowMarginHeight = this.getDefaultBasicRowMarginHeight();
|
|
@@ -20605,6 +22178,11 @@ class Draw {
|
|
|
20605
22178
|
let listId;
|
|
20606
22179
|
let listIndex = 0;
|
|
20607
22180
|
let controlRealWidth = 0;
|
|
22181
|
+
const getParagraphOffsetX = (el, isFirstLine) => {
|
|
22182
|
+
const marginLeft = el.marginLeft || 0;
|
|
22183
|
+
const textIndent = isFirstLine ? el.textIndent || 0 : 0;
|
|
22184
|
+
return (marginLeft + textIndent) * scale;
|
|
22185
|
+
};
|
|
20608
22186
|
for (let i = 0; i < elementList.length; i++) {
|
|
20609
22187
|
const curRow = rowList[rowList.length - 1];
|
|
20610
22188
|
const element = elementList[i];
|
|
@@ -20615,8 +22193,17 @@ class Draw {
|
|
|
20615
22193
|
boundingBoxAscent: 0,
|
|
20616
22194
|
boundingBoxDescent: 0
|
|
20617
22195
|
};
|
|
22196
|
+
if (curRow.offsetX === void 0 && !element.listId && (element.marginLeft || element.textIndent || element.marginRight || element.marginTop)) {
|
|
22197
|
+
const preElement2 = elementList[i - 1];
|
|
22198
|
+
const isFirstLine = i === 0 || (preElement2 == null ? void 0 : preElement2.value) === ZERO || (preElement2 == null ? void 0 : preElement2.type) === ElementType.PAGE_BREAK;
|
|
22199
|
+
curRow.offsetX = getParagraphOffsetX(element, isFirstLine);
|
|
22200
|
+
if (isFirstLine && element.marginTop) {
|
|
22201
|
+
curRow.offsetY = (curRow.offsetY || 0) + element.marginTop * scale;
|
|
22202
|
+
}
|
|
22203
|
+
}
|
|
20618
22204
|
const offsetX = curRow.offsetX || element.listId && listStyleMap.get(element.listId) || 0;
|
|
20619
|
-
const
|
|
22205
|
+
const marginRight = (element.marginRight || 0) * scale;
|
|
22206
|
+
const availableWidth = innerWidth - offsetX - marginRight;
|
|
20620
22207
|
const isStartElement = curRow.elementList.length === 1;
|
|
20621
22208
|
x += isStartElement ? offsetX : 0;
|
|
20622
22209
|
y += isStartElement ? curRow.offsetY || 0 : 0;
|
|
@@ -20859,7 +22446,7 @@ class Draw {
|
|
|
20859
22446
|
} else if (element.type === ElementType.PAGE_BREAK) {
|
|
20860
22447
|
element.width = availableWidth / scale;
|
|
20861
22448
|
metrics.width = availableWidth;
|
|
20862
|
-
metrics.height = defaultSize;
|
|
22449
|
+
metrics.height = this.options.pageBreak.visible ? defaultSize : 0;
|
|
20863
22450
|
} else if (element.type === ElementType.RADIO || element.controlComponent === ControlComponent.RADIO) {
|
|
20864
22451
|
const { width, height: height2, gap } = this.options.radio;
|
|
20865
22452
|
const elementWidth = width + gap * 2;
|
|
@@ -20907,6 +22494,9 @@ class Draw {
|
|
|
20907
22494
|
if (element.letterSpacing) {
|
|
20908
22495
|
metrics.width += element.letterSpacing * scale;
|
|
20909
22496
|
}
|
|
22497
|
+
if (element.wordSpacing) {
|
|
22498
|
+
metrics.width += element.wordSpacing * scale;
|
|
22499
|
+
}
|
|
20910
22500
|
const basisMetrics = this.textParticle.measureBasisWord(ctx, element.font);
|
|
20911
22501
|
metrics.boundingBoxAscent = basisMetrics.actualBoundingBoxAscent * scale;
|
|
20912
22502
|
metrics.boundingBoxDescent = basisMetrics.actualBoundingBoxDescent * scale;
|
|
@@ -20916,8 +22506,8 @@ class Draw {
|
|
|
20916
22506
|
metrics.boundingBoxDescent += metrics.height / 2;
|
|
20917
22507
|
}
|
|
20918
22508
|
}
|
|
20919
|
-
const ascent = !element.hide && (element.imgDisplay !== ImageDisplay.INLINE && element.type === ElementType.IMAGE || element.type === ElementType.LATEX) ? metrics.height + rowMargin : metrics.boundingBoxAscent + rowMargin;
|
|
20920
|
-
const height = rowMargin + metrics.boundingBoxAscent + metrics.boundingBoxDescent + rowMargin;
|
|
22509
|
+
const ascent = element.type === ElementType.IMAGE && (element.imgDisplay === ImageDisplay.SURROUND || element.imgDisplay === ImageDisplay.FLOAT_TOP || element.imgDisplay === ImageDisplay.FLOAT_BOTTOM) ? 0 : !element.hide && (element.imgDisplay !== ImageDisplay.INLINE && element.type === ElementType.IMAGE || element.type === ElementType.LATEX) ? metrics.height + rowMargin : metrics.boundingBoxAscent + rowMargin;
|
|
22510
|
+
const height = element.type === ElementType.IMAGE && (element.imgDisplay === ImageDisplay.SURROUND || element.imgDisplay === ImageDisplay.FLOAT_TOP || element.imgDisplay === ImageDisplay.FLOAT_BOTTOM) ? 0 : rowMargin + metrics.boundingBoxAscent + metrics.boundingBoxDescent + rowMargin;
|
|
20921
22511
|
const rowElement = Object.assign(element, {
|
|
20922
22512
|
metrics,
|
|
20923
22513
|
left: 0,
|
|
@@ -20990,10 +22580,10 @@ class Draw {
|
|
|
20990
22580
|
elementList: [rowElement],
|
|
20991
22581
|
ascent,
|
|
20992
22582
|
rowIndex: curRow.rowIndex + 1,
|
|
20993
|
-
rowFlex: ((_p = elementList[i]) == null ? void 0 : _p.rowFlex) || ((
|
|
22583
|
+
rowFlex: element.value === ZERO ? (_r = (_p = elementList[i + 1]) == null ? void 0 : _p.rowFlex) != null ? _r : (_q = elementList[i]) == null ? void 0 : _q.rowFlex : ((_s = elementList[i]) == null ? void 0 : _s.rowFlex) || ((_t = elementList[i + 1]) == null ? void 0 : _t.rowFlex),
|
|
20994
22584
|
isPageBreak: element.type === ElementType.PAGE_BREAK
|
|
20995
22585
|
};
|
|
20996
|
-
if (rowElement.controlComponent !== ControlComponent.PREFIX && ((
|
|
22586
|
+
if (rowElement.controlComponent !== ControlComponent.PREFIX && ((_u = rowElement.control) == null ? void 0 : _u.indentation) === ControlIndentation.VALUE_START) {
|
|
20997
22587
|
const preStartIndex = curRow.elementList.findIndex((el) => el.controlId === rowElement.controlId && el.controlComponent !== ControlComponent.PREFIX);
|
|
20998
22588
|
if (~preStartIndex) {
|
|
20999
22589
|
const preRowPositionList = this.position.computeRowPosition({
|
|
@@ -21010,12 +22600,17 @@ class Draw {
|
|
|
21010
22600
|
row.isList = true;
|
|
21011
22601
|
row.offsetX = listStyleMap.get(element.listId);
|
|
21012
22602
|
row.listIndex = listIndex;
|
|
22603
|
+
} else if (element.marginLeft || element.textIndent || element.marginRight) {
|
|
22604
|
+
row.offsetX = getParagraphOffsetX(element, isForceBreak);
|
|
22605
|
+
}
|
|
22606
|
+
row.offsetY = !isFromTable && ((_v = element.area) == null ? void 0 : _v.top) && element.areaId !== ((_w = elementList[i - 1]) == null ? void 0 : _w.areaId) ? element.area.top * scale : 0;
|
|
22607
|
+
if (isForceBreak && element.marginTop) {
|
|
22608
|
+
row.offsetY = (row.offsetY || 0) + element.marginTop * scale;
|
|
21013
22609
|
}
|
|
21014
|
-
row.offsetY = !isFromTable && ((_s = element.area) == null ? void 0 : _s.top) && element.areaId !== ((_t = elementList[i - 1]) == null ? void 0 : _t.areaId) ? element.area.top * scale : 0;
|
|
21015
22610
|
rowList.push(row);
|
|
21016
22611
|
} else {
|
|
21017
22612
|
curRow.width += metrics.width;
|
|
21018
|
-
if (i === 0 && (getIsBlockElement(elementList[1]) || !!((
|
|
22613
|
+
if (i === 0 && (getIsBlockElement(elementList[1]) || !!((_x = elementList[1]) == null ? void 0 : _x.areaId))) {
|
|
21019
22614
|
curRow.height = defaultBasicRowMarginHeight;
|
|
21020
22615
|
curRow.ascent = defaultBasicRowMarginHeight;
|
|
21021
22616
|
} else if (curRow.height < height) {
|
|
@@ -21026,8 +22621,18 @@ class Draw {
|
|
|
21026
22621
|
}
|
|
21027
22622
|
if (isWrap || i === elementList.length - 1) {
|
|
21028
22623
|
curRow.isWidthNotEnough = isWidthNotEnough && !isForceBreak;
|
|
22624
|
+
let rowMinHeight = 0;
|
|
22625
|
+
for (let e = 0; e < curRow.elementList.length; e++) {
|
|
22626
|
+
const el = curRow.elementList[e];
|
|
22627
|
+
const mh = (el.minHeight || 0) * scale;
|
|
22628
|
+
if (mh > rowMinHeight)
|
|
22629
|
+
rowMinHeight = mh;
|
|
22630
|
+
}
|
|
22631
|
+
if (rowMinHeight > curRow.height) {
|
|
22632
|
+
curRow.height = rowMinHeight;
|
|
22633
|
+
}
|
|
21029
22634
|
if (!curRow.isSurround && ((preElement == null ? void 0 : preElement.rowFlex) === RowFlex.JUSTIFY || (preElement == null ? void 0 : preElement.rowFlex) === RowFlex.ALIGNMENT && curRow.isWidthNotEnough)) {
|
|
21030
|
-
const rowElementList = ((
|
|
22635
|
+
const rowElementList = ((_y = curRow.elementList[0]) == null ? void 0 : _y.value) === ZERO ? curRow.elementList.slice(1) : curRow.elementList;
|
|
21031
22636
|
const gap = (availableWidth - curRow.width) / (rowElementList.length - 1);
|
|
21032
22637
|
for (let e = 0; e < rowElementList.length - 1; e++) {
|
|
21033
22638
|
const el = rowElementList[e];
|
|
@@ -21161,14 +22766,15 @@ class Draw {
|
|
|
21161
22766
|
for (let j = 0; j < curRow.elementList.length; j++) {
|
|
21162
22767
|
const element = curRow.elementList[j];
|
|
21163
22768
|
const metrics = element.metrics;
|
|
21164
|
-
const {
|
|
22769
|
+
const { coordinate: { leftTop: [x, y] } } = positionList[curRow.startIndex + j];
|
|
22770
|
+
const offsetY = 17;
|
|
21165
22771
|
const preElement = curRow.elementList[j - 1];
|
|
21166
22772
|
if ((element.hide || ((_a = element.control) == null ? void 0 : _a.hide) || ((_b = element.area) == null ? void 0 : _b.hide)) && !this.isDesignMode()) {
|
|
21167
22773
|
this.textParticle.complete();
|
|
21168
22774
|
} else if (element.type === ElementType.IMAGE) {
|
|
21169
22775
|
this.textParticle.complete();
|
|
21170
22776
|
if (element.imgDisplay !== ImageDisplay.SURROUND && element.imgDisplay !== ImageDisplay.FLOAT_TOP && element.imgDisplay !== ImageDisplay.FLOAT_BOTTOM) {
|
|
21171
|
-
this.imageParticle.render(ctx, element, x, y +
|
|
22777
|
+
this.imageParticle.render(ctx, element, x, y + 4);
|
|
21172
22778
|
}
|
|
21173
22779
|
} else if (element.type === ElementType.LATEX) {
|
|
21174
22780
|
this.textParticle.complete();
|
|
@@ -21205,7 +22811,7 @@ class Draw {
|
|
|
21205
22811
|
} else if (element.type === ElementType.SEPARATOR) {
|
|
21206
22812
|
this.separatorParticle.render(ctx, element, x, y);
|
|
21207
22813
|
} else if (element.type === ElementType.PAGE_BREAK) {
|
|
21208
|
-
if (this.mode !== EditorMode.CLEAN && !isPrintMode) {
|
|
22814
|
+
if (this.mode !== EditorMode.CLEAN && !isPrintMode && this.options.pageBreak.visible) {
|
|
21209
22815
|
this.pageBreakParticle.render(ctx, element, x, y);
|
|
21210
22816
|
}
|
|
21211
22817
|
} else if (element.type === ElementType.CHECKBOX || element.controlComponent === ControlComponent.CHECKBOX) {
|
|
@@ -21239,7 +22845,7 @@ class Draw {
|
|
|
21239
22845
|
this.textParticle.complete();
|
|
21240
22846
|
}
|
|
21241
22847
|
this.textParticle.record(ctx, element, x, y + offsetY);
|
|
21242
|
-
if (element.width || element.letterSpacing || PUNCTUATION_REG.test(element.value)) {
|
|
22848
|
+
if (element.width || element.letterSpacing || element.wordSpacing || PUNCTUATION_REG.test(element.value)) {
|
|
21243
22849
|
this.textParticle.complete();
|
|
21244
22850
|
}
|
|
21245
22851
|
}
|
|
@@ -21694,6 +23300,7 @@ class Command {
|
|
|
21694
23300
|
this.executeList = adapt.list.bind(adapt);
|
|
21695
23301
|
this.executeRowFlex = adapt.rowFlex.bind(adapt);
|
|
21696
23302
|
this.executeRowMargin = adapt.rowMargin.bind(adapt);
|
|
23303
|
+
this.executeTextIndent = adapt.textIndent.bind(adapt);
|
|
21697
23304
|
this.executeInsertTable = adapt.insertTable.bind(adapt);
|
|
21698
23305
|
this.executeInsertTableTopRow = adapt.insertTableTopRow.bind(adapt);
|
|
21699
23306
|
this.executeInsertTableBottomRow = adapt.insertTableBottomRow.bind(adapt);
|
|
@@ -21722,6 +23329,9 @@ class Command {
|
|
|
21722
23329
|
this.executePageBreak = adapt.pageBreak.bind(adapt);
|
|
21723
23330
|
this.executeAddWatermark = adapt.addWatermark.bind(adapt);
|
|
21724
23331
|
this.executeDeleteWatermark = adapt.deleteWatermark.bind(adapt);
|
|
23332
|
+
this.executeSetBackground = adapt.setBackground.bind(adapt);
|
|
23333
|
+
this.getBackground = adapt.getBackground.bind(adapt);
|
|
23334
|
+
this.executeDeleteBackground = adapt.deleteBackground.bind(adapt);
|
|
21725
23335
|
this.executeSearch = adapt.search.bind(adapt);
|
|
21726
23336
|
this.executeSearchNavigatePre = adapt.searchNavigatePre.bind(adapt);
|
|
21727
23337
|
this.executeSearchNavigateNext = adapt.searchNavigateNext.bind(adapt);
|
|
@@ -21759,6 +23369,8 @@ class Command {
|
|
|
21759
23369
|
this.executeLocationCatalog = adapt.locationCatalog.bind(adapt);
|
|
21760
23370
|
this.executeWordTool = adapt.wordTool.bind(adapt);
|
|
21761
23371
|
this.executeSetHTML = adapt.setHTML.bind(adapt);
|
|
23372
|
+
this.executeSetHtmlDocx = adapt.setHtmlDocx.bind(adapt);
|
|
23373
|
+
this.executeImportDocx = adapt.importDocx.bind(adapt);
|
|
21762
23374
|
this.executeSetGroup = adapt.setGroup.bind(adapt);
|
|
21763
23375
|
this.executeDeleteGroup = adapt.deleteGroup.bind(adapt);
|
|
21764
23376
|
this.executeLocationGroup = adapt.locationGroup.bind(adapt);
|
|
@@ -21769,6 +23381,7 @@ class Command {
|
|
|
21769
23381
|
this.executeComputeElementListHeight = adapt.computeElementListHeight.bind(adapt);
|
|
21770
23382
|
this.getImage = adapt.getImage.bind(adapt);
|
|
21771
23383
|
this.getOptions = adapt.getOptions.bind(adapt);
|
|
23384
|
+
this.getDefaultLineHeight = adapt.getDefaultLineHeight.bind(adapt);
|
|
21772
23385
|
this.getValue = adapt.getValue.bind(adapt);
|
|
21773
23386
|
this.getValueAsync = adapt.getValueAsync.bind(adapt);
|
|
21774
23387
|
this.getHTML = adapt.getHTML.bind(adapt);
|
|
@@ -21817,6 +23430,437 @@ function getParagraphNo(elementList, index2) {
|
|
|
21817
23430
|
}
|
|
21818
23431
|
return paragraphNo;
|
|
21819
23432
|
}
|
|
23433
|
+
function parsePx(value) {
|
|
23434
|
+
const n = Number.parseFloat(value);
|
|
23435
|
+
return Number.isFinite(n) ? n : 0;
|
|
23436
|
+
}
|
|
23437
|
+
function parseLengthToPx(value) {
|
|
23438
|
+
const trimmed = value.trim();
|
|
23439
|
+
if (!trimmed || /%$/.test(trimmed))
|
|
23440
|
+
return 0;
|
|
23441
|
+
const n = Number.parseFloat(trimmed);
|
|
23442
|
+
if (!Number.isFinite(n))
|
|
23443
|
+
return 0;
|
|
23444
|
+
if (/pt$/i.test(trimmed))
|
|
23445
|
+
return n * 96 / 72;
|
|
23446
|
+
if (/pc$/i.test(trimmed))
|
|
23447
|
+
return n * 16;
|
|
23448
|
+
if (/in$/i.test(trimmed))
|
|
23449
|
+
return n * 96;
|
|
23450
|
+
if (/cm$/i.test(trimmed))
|
|
23451
|
+
return n * 96 / 2.54;
|
|
23452
|
+
if (/mm$/i.test(trimmed))
|
|
23453
|
+
return n * 96 / 25.4;
|
|
23454
|
+
return n;
|
|
23455
|
+
}
|
|
23456
|
+
function parseTdBackgroundColor(td) {
|
|
23457
|
+
const raw2 = (td.style.backgroundColor || "").trim();
|
|
23458
|
+
if (!raw2)
|
|
23459
|
+
return void 0;
|
|
23460
|
+
const lower = raw2.toLowerCase();
|
|
23461
|
+
if (lower === "inherit" || lower === "transparent" || lower === "initial" || lower === "unset" || lower === "none" || lower === "rgba(0, 0, 0, 0)" || lower === "rgb(0, 0, 0, 0)") {
|
|
23462
|
+
return void 0;
|
|
23463
|
+
}
|
|
23464
|
+
return raw2;
|
|
23465
|
+
}
|
|
23466
|
+
function isHiddenTableCell(td) {
|
|
23467
|
+
if (td.style.display === "none")
|
|
23468
|
+
return true;
|
|
23469
|
+
return window.getComputedStyle(td).display === "none";
|
|
23470
|
+
}
|
|
23471
|
+
function parseColWidth(col, fallback) {
|
|
23472
|
+
var _a;
|
|
23473
|
+
const attrWidth = col.getAttribute("width");
|
|
23474
|
+
if (attrWidth) {
|
|
23475
|
+
const fromAttr = parseLengthToPx(attrWidth);
|
|
23476
|
+
if (fromAttr > 0)
|
|
23477
|
+
return Math.round(fromAttr);
|
|
23478
|
+
}
|
|
23479
|
+
const styleWidth = (_a = col.style) == null ? void 0 : _a.width;
|
|
23480
|
+
if (styleWidth) {
|
|
23481
|
+
const fromStyle = parseLengthToPx(styleWidth);
|
|
23482
|
+
if (fromStyle > 0)
|
|
23483
|
+
return Math.round(fromStyle);
|
|
23484
|
+
}
|
|
23485
|
+
return fallback;
|
|
23486
|
+
}
|
|
23487
|
+
function parseDocxPaperMeta(section) {
|
|
23488
|
+
const style = window.getComputedStyle(section);
|
|
23489
|
+
const width = Math.round(parsePx(style.width)) || Math.round(section.clientWidth);
|
|
23490
|
+
const height = Math.round(parsePx(style.minHeight || style.height)) || Math.round(section.clientHeight);
|
|
23491
|
+
const margins = [
|
|
23492
|
+
Math.round(parsePx(style.paddingTop)),
|
|
23493
|
+
Math.round(parsePx(style.paddingRight)),
|
|
23494
|
+
Math.round(parsePx(style.paddingBottom)),
|
|
23495
|
+
Math.round(parsePx(style.paddingLeft))
|
|
23496
|
+
];
|
|
23497
|
+
return {
|
|
23498
|
+
width: width || 794,
|
|
23499
|
+
height: height || 1123,
|
|
23500
|
+
margins
|
|
23501
|
+
};
|
|
23502
|
+
}
|
|
23503
|
+
function parseLineHeightAsRowMargin(lineHeight, fontSizePx) {
|
|
23504
|
+
const trimmed = lineHeight.trim();
|
|
23505
|
+
if (!trimmed || trimmed === "normal")
|
|
23506
|
+
return void 0;
|
|
23507
|
+
if (/^\d+(\.\d+)?$/.test(trimmed)) {
|
|
23508
|
+
const ratio = Number.parseFloat(trimmed);
|
|
23509
|
+
return Number.isFinite(ratio) && ratio > 0 ? ratio : void 0;
|
|
23510
|
+
}
|
|
23511
|
+
const px = parsePx(trimmed);
|
|
23512
|
+
if (px > 0 && fontSizePx > 0) {
|
|
23513
|
+
return px / fontSizePx;
|
|
23514
|
+
}
|
|
23515
|
+
return void 0;
|
|
23516
|
+
}
|
|
23517
|
+
const IDEOGRAPHIC_SPACE = "\u3000";
|
|
23518
|
+
function getParagraphStyle(p) {
|
|
23519
|
+
const style = window.getComputedStyle(p);
|
|
23520
|
+
const fontSize = parsePx(style.fontSize) || 14;
|
|
23521
|
+
const rowFlex = convertTextAlignToRowFlex(p);
|
|
23522
|
+
const dataRowMargin = p.getAttribute("data-row-margin");
|
|
23523
|
+
let rowMargin;
|
|
23524
|
+
if (dataRowMargin != null && dataRowMargin !== "") {
|
|
23525
|
+
const n = Number.parseFloat(dataRowMargin);
|
|
23526
|
+
if (Number.isFinite(n) && n > 0) {
|
|
23527
|
+
rowMargin = n;
|
|
23528
|
+
}
|
|
23529
|
+
}
|
|
23530
|
+
if (rowMargin === void 0) {
|
|
23531
|
+
rowMargin = parseLineHeightAsRowMargin(style.lineHeight, fontSize);
|
|
23532
|
+
}
|
|
23533
|
+
let minHeight = parsePx(style.minHeight);
|
|
23534
|
+
if (!minHeight && fontSize) {
|
|
23535
|
+
minHeight = fontSize;
|
|
23536
|
+
}
|
|
23537
|
+
let whiteSpace = style.whiteSpace;
|
|
23538
|
+
if (!whiteSpace || whiteSpace === "normal") {
|
|
23539
|
+
const span = p.querySelector("span");
|
|
23540
|
+
if (span) {
|
|
23541
|
+
const spanWhiteSpace = window.getComputedStyle(span).whiteSpace;
|
|
23542
|
+
if (spanWhiteSpace && spanWhiteSpace !== "normal") {
|
|
23543
|
+
whiteSpace = spanWhiteSpace;
|
|
23544
|
+
}
|
|
23545
|
+
}
|
|
23546
|
+
}
|
|
23547
|
+
if ((!whiteSpace || whiteSpace === "normal") && p.closest(".docx, .docx-wrapper")) {
|
|
23548
|
+
whiteSpace = "pre-wrap";
|
|
23549
|
+
}
|
|
23550
|
+
const result = {};
|
|
23551
|
+
result.rowFlex = rowFlex;
|
|
23552
|
+
if (rowMargin !== void 0)
|
|
23553
|
+
result.rowMargin = rowMargin;
|
|
23554
|
+
if (minHeight)
|
|
23555
|
+
result.minHeight = minHeight;
|
|
23556
|
+
if (whiteSpace && whiteSpace !== "normal") {
|
|
23557
|
+
result.whiteSpace = whiteSpace;
|
|
23558
|
+
}
|
|
23559
|
+
return result;
|
|
23560
|
+
}
|
|
23561
|
+
function getLeadingIndentSpaceCount(p) {
|
|
23562
|
+
const style = window.getComputedStyle(p);
|
|
23563
|
+
const fontSize = parsePx(style.fontSize) || 14;
|
|
23564
|
+
if (fontSize <= 0)
|
|
23565
|
+
return 0;
|
|
23566
|
+
const textIndent = Math.max(0, parsePx(style.textIndent));
|
|
23567
|
+
const marginLeft = Math.max(0, parsePx(style.marginInlineStart || style.marginLeft));
|
|
23568
|
+
const indentPx = textIndent + marginLeft;
|
|
23569
|
+
if (indentPx <= 0)
|
|
23570
|
+
return 0;
|
|
23571
|
+
return Math.max(0, Math.round(indentPx / fontSize));
|
|
23572
|
+
}
|
|
23573
|
+
function createLeadingSpaceElements(count) {
|
|
23574
|
+
if (count <= 0)
|
|
23575
|
+
return [];
|
|
23576
|
+
return splitText(IDEOGRAPHIC_SPACE.repeat(count)).map((value) => ({ value }));
|
|
23577
|
+
}
|
|
23578
|
+
function applyParagraphStyle(elements, paragraphStyle) {
|
|
23579
|
+
if (!elements.length)
|
|
23580
|
+
return;
|
|
23581
|
+
const keys = Object.keys(paragraphStyle);
|
|
23582
|
+
if (!keys.length)
|
|
23583
|
+
return;
|
|
23584
|
+
for (const el of elements) {
|
|
23585
|
+
if (el.type === ElementType.IMAGE && (el.imgDisplay === ImageDisplay.FLOAT_TOP || el.imgDisplay === ImageDisplay.FLOAT_BOTTOM || el.imgDisplay === ImageDisplay.SURROUND)) {
|
|
23586
|
+
continue;
|
|
23587
|
+
}
|
|
23588
|
+
Object.assign(el, paragraphStyle);
|
|
23589
|
+
}
|
|
23590
|
+
}
|
|
23591
|
+
function styleFromComputed(el) {
|
|
23592
|
+
var _a, _b;
|
|
23593
|
+
const style = window.getComputedStyle(el);
|
|
23594
|
+
const element = {
|
|
23595
|
+
color: style.color,
|
|
23596
|
+
bold: Number(style.fontWeight) > 500,
|
|
23597
|
+
italic: style.fontStyle.includes("italic"),
|
|
23598
|
+
size: Math.floor(parsePx(style.fontSize)) || void 0,
|
|
23599
|
+
font: (_b = (_a = style.fontFamily) == null ? void 0 : _a.split(",")[0]) == null ? void 0 : _b.replace(/['"]/g, "").trim()
|
|
23600
|
+
};
|
|
23601
|
+
if (style.backgroundColor && style.backgroundColor !== "rgba(0, 0, 0, 0)") {
|
|
23602
|
+
element.highlight = style.backgroundColor;
|
|
23603
|
+
}
|
|
23604
|
+
if (style.textDecorationLine.includes("underline")) {
|
|
23605
|
+
element.underline = true;
|
|
23606
|
+
}
|
|
23607
|
+
if (style.textDecorationLine.includes("line-through")) {
|
|
23608
|
+
element.strikeout = true;
|
|
23609
|
+
}
|
|
23610
|
+
const letterSpacing = parsePx(style.letterSpacing);
|
|
23611
|
+
if (letterSpacing)
|
|
23612
|
+
element.letterSpacing = letterSpacing;
|
|
23613
|
+
if (style.whiteSpace && style.whiteSpace !== "normal") {
|
|
23614
|
+
element.whiteSpace = style.whiteSpace;
|
|
23615
|
+
}
|
|
23616
|
+
const spanMinHeight = parsePx(style.minHeight);
|
|
23617
|
+
if (spanMinHeight)
|
|
23618
|
+
element.minHeight = spanMinHeight;
|
|
23619
|
+
return element;
|
|
23620
|
+
}
|
|
23621
|
+
function parseTextFromNode(node) {
|
|
23622
|
+
if (node.nodeType === 3) {
|
|
23623
|
+
const text = node.textContent || "";
|
|
23624
|
+
if (!text)
|
|
23625
|
+
return [];
|
|
23626
|
+
const parent = node.parentElement;
|
|
23627
|
+
const base = parent ? styleFromComputed(parent) : {};
|
|
23628
|
+
return splitText(text).map((ch) => ({
|
|
23629
|
+
value: ch,
|
|
23630
|
+
...base
|
|
23631
|
+
}));
|
|
23632
|
+
}
|
|
23633
|
+
if (node.nodeType !== 1)
|
|
23634
|
+
return [];
|
|
23635
|
+
const el = node;
|
|
23636
|
+
const name = el.nodeName;
|
|
23637
|
+
if (name === "BR") {
|
|
23638
|
+
return [{ value: WRAP }];
|
|
23639
|
+
}
|
|
23640
|
+
if (name === "IMG") {
|
|
23641
|
+
return parseImage(el);
|
|
23642
|
+
}
|
|
23643
|
+
if (name === "A") {
|
|
23644
|
+
const value = el.innerText;
|
|
23645
|
+
if (!value)
|
|
23646
|
+
return [];
|
|
23647
|
+
return [
|
|
23648
|
+
{
|
|
23649
|
+
type: ElementType.HYPERLINK,
|
|
23650
|
+
value: "",
|
|
23651
|
+
valueList: splitText(value).map((ch) => ({ value: ch })),
|
|
23652
|
+
url: el.href
|
|
23653
|
+
}
|
|
23654
|
+
];
|
|
23655
|
+
}
|
|
23656
|
+
const result = [];
|
|
23657
|
+
el.childNodes.forEach((child) => {
|
|
23658
|
+
result.push(...parseTextFromNode(child));
|
|
23659
|
+
});
|
|
23660
|
+
return result;
|
|
23661
|
+
}
|
|
23662
|
+
function parseImage(img) {
|
|
23663
|
+
const { src, width, height } = img;
|
|
23664
|
+
const w = width || parsePx(window.getComputedStyle(img).width);
|
|
23665
|
+
const h = height || parsePx(window.getComputedStyle(img).height);
|
|
23666
|
+
if (!src || !w || !h)
|
|
23667
|
+
return [];
|
|
23668
|
+
const element = {
|
|
23669
|
+
width: w,
|
|
23670
|
+
height: h,
|
|
23671
|
+
value: src,
|
|
23672
|
+
type: ElementType.IMAGE,
|
|
23673
|
+
rowFlex: convertTextAlignToRowFlex(img.parentElement || img),
|
|
23674
|
+
verticalAlign: "text-top"
|
|
23675
|
+
};
|
|
23676
|
+
applyImageWrapFromDom(img, element);
|
|
23677
|
+
const formInputAttr = img.getAttribute("data-form-input");
|
|
23678
|
+
if (formInputAttr) {
|
|
23679
|
+
try {
|
|
23680
|
+
element.formInput = JSON.parse(formInputAttr);
|
|
23681
|
+
} catch {
|
|
23682
|
+
}
|
|
23683
|
+
}
|
|
23684
|
+
return [element];
|
|
23685
|
+
}
|
|
23686
|
+
function parseParagraph(p) {
|
|
23687
|
+
const paragraphStyle = getParagraphStyle(p);
|
|
23688
|
+
const leadingSpaces = createLeadingSpaceElements(getLeadingIndentSpaceCount(p));
|
|
23689
|
+
const children = [];
|
|
23690
|
+
p.childNodes.forEach((child) => {
|
|
23691
|
+
children.push(...parseTextFromNode(child));
|
|
23692
|
+
});
|
|
23693
|
+
const body = [...leadingSpaces, ...children];
|
|
23694
|
+
if (!body.length) {
|
|
23695
|
+
return [{ value: WRAP, ...paragraphStyle }];
|
|
23696
|
+
}
|
|
23697
|
+
applyParagraphStyle(body, paragraphStyle);
|
|
23698
|
+
const wrapElement = { value: WRAP, ...paragraphStyle };
|
|
23699
|
+
delete wrapElement.rowFlex;
|
|
23700
|
+
body.push(wrapElement);
|
|
23701
|
+
return body;
|
|
23702
|
+
}
|
|
23703
|
+
function normalizeTdValueList(valueList) {
|
|
23704
|
+
const list = valueList.slice();
|
|
23705
|
+
if (list.length > 1 && (list[list.length - 1].value === WRAP || list[list.length - 1].value === "\n")) {
|
|
23706
|
+
list.pop();
|
|
23707
|
+
}
|
|
23708
|
+
if (!list.length) {
|
|
23709
|
+
list.push({ value: WRAP });
|
|
23710
|
+
}
|
|
23711
|
+
return list;
|
|
23712
|
+
}
|
|
23713
|
+
function parseTable(table, innerWidth) {
|
|
23714
|
+
const element = {
|
|
23715
|
+
type: ElementType.TABLE,
|
|
23716
|
+
value: WRAP,
|
|
23717
|
+
colgroup: [],
|
|
23718
|
+
trList: []
|
|
23719
|
+
};
|
|
23720
|
+
const colElements = table.querySelectorAll("colgroup col");
|
|
23721
|
+
table.querySelectorAll("tr").forEach((trElement) => {
|
|
23722
|
+
const trHeight = parsePx(window.getComputedStyle(trElement).height) || 0;
|
|
23723
|
+
const tr = {
|
|
23724
|
+
height: trHeight,
|
|
23725
|
+
minHeight: trHeight,
|
|
23726
|
+
tdList: []
|
|
23727
|
+
};
|
|
23728
|
+
trElement.querySelectorAll("th,td").forEach((tdElement) => {
|
|
23729
|
+
const tableCell = tdElement;
|
|
23730
|
+
if (isHiddenTableCell(tableCell))
|
|
23731
|
+
return;
|
|
23732
|
+
const valueList = normalizeTdValueList(parseBlockChildren(tableCell, innerWidth));
|
|
23733
|
+
const td = {
|
|
23734
|
+
colspan: tableCell.colSpan,
|
|
23735
|
+
rowspan: tableCell.rowSpan,
|
|
23736
|
+
value: valueList,
|
|
23737
|
+
verticalAlign: window.getComputedStyle(tdElement).verticalAlign,
|
|
23738
|
+
width: parsePx(window.getComputedStyle(tdElement).width)
|
|
23739
|
+
};
|
|
23740
|
+
const backgroundColor = parseTdBackgroundColor(tableCell);
|
|
23741
|
+
if (backgroundColor) {
|
|
23742
|
+
td.backgroundColor = backgroundColor;
|
|
23743
|
+
}
|
|
23744
|
+
tr.tdList.push(td);
|
|
23745
|
+
});
|
|
23746
|
+
if (tr.tdList.length) {
|
|
23747
|
+
element.trList.push(tr);
|
|
23748
|
+
}
|
|
23749
|
+
});
|
|
23750
|
+
if (!element.trList.length)
|
|
23751
|
+
return [];
|
|
23752
|
+
const tdCount = element.trList[0].tdList.reduce((pre, cur) => pre + cur.colspan, 0);
|
|
23753
|
+
const defaultColWidth = Math.ceil(innerWidth / Math.max(tdCount, 1));
|
|
23754
|
+
for (let i = 0; i < tdCount; i++) {
|
|
23755
|
+
const col = colElements[i];
|
|
23756
|
+
element.colgroup.push({
|
|
23757
|
+
width: col ? parseColWidth(col, defaultColWidth) : defaultColWidth
|
|
23758
|
+
});
|
|
23759
|
+
}
|
|
23760
|
+
return [element];
|
|
23761
|
+
}
|
|
23762
|
+
function parseBlockChildren(root, innerWidth) {
|
|
23763
|
+
const result = [];
|
|
23764
|
+
root.childNodes.forEach((node) => {
|
|
23765
|
+
var _a;
|
|
23766
|
+
if (node.nodeType !== 1) {
|
|
23767
|
+
if (node.nodeType === 3 && ((_a = node.textContent) == null ? void 0 : _a.trim())) {
|
|
23768
|
+
result.push(...parseTextFromNode(node));
|
|
23769
|
+
result.push({ value: WRAP });
|
|
23770
|
+
}
|
|
23771
|
+
return;
|
|
23772
|
+
}
|
|
23773
|
+
const el = node;
|
|
23774
|
+
const name = el.nodeName;
|
|
23775
|
+
if (name === "P" || /^H[1-6]$/.test(name)) {
|
|
23776
|
+
result.push(...parseParagraph(el));
|
|
23777
|
+
} else if (name === "TABLE") {
|
|
23778
|
+
result.push(...parseTable(el, innerWidth));
|
|
23779
|
+
} else if (name === "IMG") {
|
|
23780
|
+
result.push(...parseImage(el));
|
|
23781
|
+
result.push({ value: WRAP });
|
|
23782
|
+
} else if (name === "BR") {
|
|
23783
|
+
result.push({ value: WRAP });
|
|
23784
|
+
} else if (name === "DIV" && el.getAttribute("data-type") === ElementType.PAGE_BREAK) {
|
|
23785
|
+
result.push({
|
|
23786
|
+
type: ElementType.PAGE_BREAK,
|
|
23787
|
+
value: WRAP
|
|
23788
|
+
});
|
|
23789
|
+
} else if (name === "DIV" && el.getAttribute("data-ce-clear") === "both") {
|
|
23790
|
+
return;
|
|
23791
|
+
} else if (name === "ARTICLE" || name === "DIV" || name === "SECTION") {
|
|
23792
|
+
result.push(...parseBlockChildren(el, innerWidth));
|
|
23793
|
+
} else {
|
|
23794
|
+
const nested = parseBlockChildren(el, innerWidth);
|
|
23795
|
+
if (nested.length) {
|
|
23796
|
+
result.push(...nested);
|
|
23797
|
+
} else {
|
|
23798
|
+
const inline = parseTextFromNode(el);
|
|
23799
|
+
if (inline.length) {
|
|
23800
|
+
result.push(...inline);
|
|
23801
|
+
result.push({ value: WRAP });
|
|
23802
|
+
}
|
|
23803
|
+
}
|
|
23804
|
+
}
|
|
23805
|
+
});
|
|
23806
|
+
return result;
|
|
23807
|
+
}
|
|
23808
|
+
function parseSectionContent(section, innerWidth) {
|
|
23809
|
+
const article = section.querySelector("article") || section;
|
|
23810
|
+
return parseBlockChildren(article, innerWidth);
|
|
23811
|
+
}
|
|
23812
|
+
function parseDocxDom(container) {
|
|
23813
|
+
const sections = Array.from(container.querySelectorAll("section.docx"));
|
|
23814
|
+
const exportPages = Array.from(container.querySelectorAll(".ce-export-page"));
|
|
23815
|
+
const targets = sections.length ? sections : exportPages.length ? exportPages : [container];
|
|
23816
|
+
const paper = parseDocxPaperMeta(targets[0]);
|
|
23817
|
+
const contentWidth = Math.max(paper.width - paper.margins[1] - paper.margins[3], 1);
|
|
23818
|
+
const main = [];
|
|
23819
|
+
targets.forEach((section, index2) => {
|
|
23820
|
+
const sectionElements = parseSectionContent(section, contentWidth);
|
|
23821
|
+
if (sectionElements.length) {
|
|
23822
|
+
main.push(...sectionElements);
|
|
23823
|
+
}
|
|
23824
|
+
if (index2 < targets.length - 1) {
|
|
23825
|
+
main.push({
|
|
23826
|
+
type: ElementType.PAGE_BREAK,
|
|
23827
|
+
value: WRAP
|
|
23828
|
+
});
|
|
23829
|
+
}
|
|
23830
|
+
});
|
|
23831
|
+
return { paper, main };
|
|
23832
|
+
}
|
|
23833
|
+
const A4_WIDTH_PX = Math.round(595.3 * 96 / 72);
|
|
23834
|
+
const A4_HEIGHT_PX = Math.round(841.95 * 96 / 72);
|
|
23835
|
+
const DEFAULT_MARGINS = [96, 120, 96, 120];
|
|
23836
|
+
function toPadding(margins) {
|
|
23837
|
+
const [top, right2, bottom, left2] = margins;
|
|
23838
|
+
return `${top}px ${right2}px ${bottom}px ${left2}px`;
|
|
23839
|
+
}
|
|
23840
|
+
function mountHtmlForDocx(html, margins) {
|
|
23841
|
+
const tempContainer = document.querySelector("#tempDiv") || document.createElement("div");
|
|
23842
|
+
if (!tempContainer.isConnected) {
|
|
23843
|
+
tempContainer.style.cssText = "opacity:0;position:absolute;left:-9999px;top:0;pointer-events:none;";
|
|
23844
|
+
document.body.append(tempContainer);
|
|
23845
|
+
}
|
|
23846
|
+
const trimmed = html.trim();
|
|
23847
|
+
const hasDocxSection = /<section[^>]*class=["'][^"']*\bdocx\b/i.test(trimmed);
|
|
23848
|
+
const hasExportPage = /class=["'][^"']*\bce-export-page\b/i.test(trimmed);
|
|
23849
|
+
if (hasDocxSection || hasExportPage) {
|
|
23850
|
+
tempContainer.innerHTML = trimmed;
|
|
23851
|
+
if (margins) {
|
|
23852
|
+
const paperEl = tempContainer.querySelector("section.docx") || tempContainer.querySelector(".ce-export-page");
|
|
23853
|
+
if (paperEl) {
|
|
23854
|
+
paperEl.style.padding = toPadding(margins);
|
|
23855
|
+
paperEl.style.boxSizing = "border-box";
|
|
23856
|
+
}
|
|
23857
|
+
}
|
|
23858
|
+
} else {
|
|
23859
|
+
const padding = toPadding(margins != null ? margins : DEFAULT_MARGINS);
|
|
23860
|
+
tempContainer.innerHTML = `<section class="docx" style="width:${A4_WIDTH_PX}px;min-height:${A4_HEIGHT_PX}px;padding:${padding};box-sizing:border-box;background:#fff;"><article>${trimmed}</article></section>`;
|
|
23861
|
+
}
|
|
23862
|
+
return tempContainer;
|
|
23863
|
+
}
|
|
21820
23864
|
function convertPxToPaperSize(width, height) {
|
|
21821
23865
|
if (width === 1125 && height === 1593) {
|
|
21822
23866
|
return {
|
|
@@ -22598,6 +24642,30 @@ class CommandAdapt {
|
|
|
22598
24642
|
const curIndex = isSetCursor ? endIndex : startIndex;
|
|
22599
24643
|
this.draw.render({ curIndex, isSetCursor });
|
|
22600
24644
|
}
|
|
24645
|
+
textIndent(payload) {
|
|
24646
|
+
const isReadonly = this.draw.isReadonly();
|
|
24647
|
+
if (isReadonly)
|
|
24648
|
+
return;
|
|
24649
|
+
const { startIndex, endIndex } = this.range.getRange();
|
|
24650
|
+
if (!~startIndex && !~endIndex)
|
|
24651
|
+
return;
|
|
24652
|
+
const paragraphElementList = this.range.getRangeParagraphElementList();
|
|
24653
|
+
if (!paragraphElementList)
|
|
24654
|
+
return;
|
|
24655
|
+
const indent = Math.max(0, payload);
|
|
24656
|
+
paragraphElementList.forEach((element) => {
|
|
24657
|
+
if (indent) {
|
|
24658
|
+
element.textIndent = indent;
|
|
24659
|
+
delete element.marginLeft;
|
|
24660
|
+
} else {
|
|
24661
|
+
delete element.textIndent;
|
|
24662
|
+
delete element.marginLeft;
|
|
24663
|
+
}
|
|
24664
|
+
});
|
|
24665
|
+
const isSetCursor = startIndex === endIndex;
|
|
24666
|
+
const curIndex = isSetCursor ? endIndex : startIndex;
|
|
24667
|
+
this.draw.render({ curIndex, isSetCursor });
|
|
24668
|
+
}
|
|
22601
24669
|
insertTable(row, col) {
|
|
22602
24670
|
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
22603
24671
|
if (isDisabled)
|
|
@@ -22932,6 +25000,67 @@ class CommandAdapt {
|
|
|
22932
25000
|
});
|
|
22933
25001
|
}
|
|
22934
25002
|
}
|
|
25003
|
+
setBackground(payload) {
|
|
25004
|
+
const isReadonly = this.draw.isReadonly();
|
|
25005
|
+
if (isReadonly)
|
|
25006
|
+
return;
|
|
25007
|
+
const options = this.draw.getOptions();
|
|
25008
|
+
const bg = options.background;
|
|
25009
|
+
if (payload.image !== void 0) {
|
|
25010
|
+
bg.image = payload.image;
|
|
25011
|
+
}
|
|
25012
|
+
if (payload.color !== void 0) {
|
|
25013
|
+
bg.color = payload.color;
|
|
25014
|
+
}
|
|
25015
|
+
if (payload.opacity !== void 0) {
|
|
25016
|
+
bg.opacity = Math.min(1, Math.max(0, payload.opacity));
|
|
25017
|
+
}
|
|
25018
|
+
if (payload.position !== void 0) {
|
|
25019
|
+
bg.position = payload.position;
|
|
25020
|
+
}
|
|
25021
|
+
if (payload.applyPageNumbers !== void 0) {
|
|
25022
|
+
bg.applyPageNumbers = payload.applyPageNumbers;
|
|
25023
|
+
}
|
|
25024
|
+
bg.adaptive = true;
|
|
25025
|
+
bg.size = BackgroundSize.CONTAIN;
|
|
25026
|
+
bg.repeat = BackgroundRepeat.NO_REPEAT;
|
|
25027
|
+
if (payload.position === void 0 && !bg.position) {
|
|
25028
|
+
bg.position = BackgroundPosition.CENTER;
|
|
25029
|
+
}
|
|
25030
|
+
this.draw.render({
|
|
25031
|
+
isSetCursor: false,
|
|
25032
|
+
isSubmitHistory: false,
|
|
25033
|
+
isCompute: false
|
|
25034
|
+
});
|
|
25035
|
+
}
|
|
25036
|
+
getBackground() {
|
|
25037
|
+
const { background } = this.draw.getOptions();
|
|
25038
|
+
return {
|
|
25039
|
+
color: background.color,
|
|
25040
|
+
image: background.image,
|
|
25041
|
+
size: BackgroundSize.CONTAIN,
|
|
25042
|
+
repeat: BackgroundRepeat.NO_REPEAT,
|
|
25043
|
+
opacity: background.opacity,
|
|
25044
|
+
position: background.position,
|
|
25045
|
+
adaptive: true,
|
|
25046
|
+
applyPageNumbers: [...background.applyPageNumbers || []]
|
|
25047
|
+
};
|
|
25048
|
+
}
|
|
25049
|
+
deleteBackground() {
|
|
25050
|
+
const isReadonly = this.draw.isReadonly();
|
|
25051
|
+
if (isReadonly)
|
|
25052
|
+
return;
|
|
25053
|
+
const options = this.draw.getOptions();
|
|
25054
|
+
options.background = {
|
|
25055
|
+
...defaultBackground,
|
|
25056
|
+
color: options.background.color || defaultBackground.color
|
|
25057
|
+
};
|
|
25058
|
+
this.draw.render({
|
|
25059
|
+
isSetCursor: false,
|
|
25060
|
+
isSubmitHistory: false,
|
|
25061
|
+
isCompute: false
|
|
25062
|
+
});
|
|
25063
|
+
}
|
|
22935
25064
|
image(payload) {
|
|
22936
25065
|
const isDisabled = this.draw.isReadonly() || this.draw.isDisabled();
|
|
22937
25066
|
if (isDisabled)
|
|
@@ -23071,6 +25200,21 @@ class CommandAdapt {
|
|
|
23071
25200
|
getOptions() {
|
|
23072
25201
|
return this.options;
|
|
23073
25202
|
}
|
|
25203
|
+
getDefaultLineHeight(payload) {
|
|
25204
|
+
var _a, _b;
|
|
25205
|
+
const { defaultSize, defaultRowMargin } = this.options;
|
|
25206
|
+
const size = (_a = payload == null ? void 0 : payload.size) != null ? _a : defaultSize;
|
|
25207
|
+
const rowMargin = (_b = payload == null ? void 0 : payload.rowMargin) != null ? _b : defaultRowMargin;
|
|
25208
|
+
const el = { value: "", size, rowMargin };
|
|
25209
|
+
const rowMarginPx = computeElementRowMarginPx(el, this.options);
|
|
25210
|
+
const lineHeightPx = Math.round(computeElementLineHeightPx(el, this.options));
|
|
25211
|
+
return {
|
|
25212
|
+
rowMargin,
|
|
25213
|
+
rowMarginPx,
|
|
25214
|
+
lineHeightPx,
|
|
25215
|
+
size
|
|
25216
|
+
};
|
|
25217
|
+
}
|
|
23074
25218
|
getValue(options) {
|
|
23075
25219
|
return this.draw.getValue(options);
|
|
23076
25220
|
}
|
|
@@ -23085,11 +25229,40 @@ class CommandAdapt {
|
|
|
23085
25229
|
const headerElementList = this.draw.getHeaderElementList();
|
|
23086
25230
|
const mainElementList = this.draw.getOriginalMainElementList();
|
|
23087
25231
|
const footerElementList = this.draw.getFooterElementList();
|
|
23088
|
-
|
|
23089
|
-
|
|
23090
|
-
|
|
23091
|
-
|
|
25232
|
+
const headerPositionList = this.draw.getHeader().getPositionList();
|
|
25233
|
+
const mainPositionList = this.position.getOriginalMainPositionList();
|
|
25234
|
+
const footerPositionList = this.draw.getFooter().getPositionList();
|
|
25235
|
+
const { scale } = options;
|
|
25236
|
+
attachHtmlFloatOffset(headerElementList, headerPositionList, scale);
|
|
25237
|
+
attachHtmlFloatOffset(mainElementList, mainPositionList, scale);
|
|
25238
|
+
attachHtmlFloatOffset(footerElementList, footerPositionList, scale);
|
|
25239
|
+
attachHtmlImgRowLeft(headerElementList, headerPositionList, scale);
|
|
25240
|
+
attachHtmlImgRowLeft(mainElementList, mainPositionList, scale);
|
|
25241
|
+
attachHtmlImgRowLeft(footerElementList, footerPositionList, scale);
|
|
25242
|
+
const wrapPaper = (dom) => {
|
|
25243
|
+
const { width, height, margins } = options;
|
|
25244
|
+
const wrapper = document.createElement("div");
|
|
25245
|
+
wrapper.className = "ce-export-page";
|
|
25246
|
+
wrapper.style.width = `${width}px`;
|
|
25247
|
+
wrapper.style.minHeight = `${height}px`;
|
|
25248
|
+
wrapper.style.padding = `${margins[0]}px ${margins[1]}px ${margins[2]}px ${margins[3]}px`;
|
|
25249
|
+
wrapper.style.boxSizing = "border-box";
|
|
25250
|
+
wrapper.style.position = "relative";
|
|
25251
|
+
wrapper.style.background = "#fff";
|
|
25252
|
+
while (dom.firstChild) {
|
|
25253
|
+
wrapper.append(dom.firstChild);
|
|
25254
|
+
}
|
|
25255
|
+
return convertToXHTML(wrapper, { keepRoot: true });
|
|
23092
25256
|
};
|
|
25257
|
+
try {
|
|
25258
|
+
return {
|
|
25259
|
+
header: wrapPaper(createDomFromElementList(headerElementList, options)),
|
|
25260
|
+
main: wrapPaper(createDomFromElementList(mainElementList, options)),
|
|
25261
|
+
footer: wrapPaper(createDomFromElementList(footerElementList, options))
|
|
25262
|
+
};
|
|
25263
|
+
} finally {
|
|
25264
|
+
clearHtmlFloatOffset();
|
|
25265
|
+
}
|
|
23093
25266
|
}
|
|
23094
25267
|
getText() {
|
|
23095
25268
|
const headerElementList = this.draw.getHeaderElementList();
|
|
@@ -23692,16 +25865,51 @@ class CommandAdapt {
|
|
|
23692
25865
|
}
|
|
23693
25866
|
}
|
|
23694
25867
|
setHTML(payload) {
|
|
23695
|
-
const { header, main, footer } = payload;
|
|
25868
|
+
const { header, main, footer, container } = payload;
|
|
23696
25869
|
const innerWidth = this.draw.getOriginalInnerWidth();
|
|
23697
25870
|
const getElementList = (htmlText) => htmlText !== void 0 ? getElementListByHTML(htmlText, {
|
|
23698
|
-
innerWidth
|
|
25871
|
+
innerWidth,
|
|
25872
|
+
container
|
|
23699
25873
|
}) : void 0;
|
|
23700
25874
|
this.setValue({
|
|
23701
25875
|
header: getElementList(header),
|
|
23702
25876
|
main: getElementList(main),
|
|
23703
25877
|
footer: getElementList(footer)
|
|
23704
25878
|
});
|
|
25879
|
+
this.reconcileImportedFloatPositions();
|
|
25880
|
+
}
|
|
25881
|
+
setHtmlDocx(payload) {
|
|
25882
|
+
const { container, margins } = payload;
|
|
25883
|
+
if (!container)
|
|
25884
|
+
return;
|
|
25885
|
+
const { paper, main } = parseDocxDom(container);
|
|
25886
|
+
this.options.margins = margins != null ? margins : paper.margins;
|
|
25887
|
+
this.draw.setPaperSize(paper.width, paper.height);
|
|
25888
|
+
this.setValue({ main });
|
|
25889
|
+
this.reconcileImportedFloatPositions();
|
|
25890
|
+
}
|
|
25891
|
+
reconcileImportedFloatPositions() {
|
|
25892
|
+
const { scale } = this.options;
|
|
25893
|
+
const headerElementList = this.draw.getHeaderElementList();
|
|
25894
|
+
const mainElementList = this.draw.getOriginalMainElementList();
|
|
25895
|
+
const footerElementList = this.draw.getFooterElementList();
|
|
25896
|
+
const headerPositionList = this.draw.getHeader().getPositionList();
|
|
25897
|
+
const mainPositionList = this.position.getOriginalMainPositionList();
|
|
25898
|
+
const footerPositionList = this.draw.getFooter().getPositionList();
|
|
25899
|
+
const changed = reconcileHtmlFloatPositions(headerElementList, headerPositionList, scale) || reconcileHtmlFloatPositions(mainElementList, mainPositionList, scale) || reconcileHtmlFloatPositions(footerElementList, footerPositionList, scale);
|
|
25900
|
+
if (changed) {
|
|
25901
|
+
this.draw.render({
|
|
25902
|
+
isSubmitHistory: false,
|
|
25903
|
+
isSetCursor: false
|
|
25904
|
+
});
|
|
25905
|
+
}
|
|
25906
|
+
}
|
|
25907
|
+
importDocx(payload) {
|
|
25908
|
+
const { html, margins } = payload;
|
|
25909
|
+
if (!html)
|
|
25910
|
+
return;
|
|
25911
|
+
const container = mountHtmlForDocx(html, margins);
|
|
25912
|
+
this.setHtmlDocx({ container, margins });
|
|
23705
25913
|
}
|
|
23706
25914
|
setGroup() {
|
|
23707
25915
|
const isReadonly = this.draw.isReadonly();
|
|
@@ -25185,6 +27393,8 @@ class EventBus {
|
|
|
25185
27393
|
}
|
|
25186
27394
|
class Override {
|
|
25187
27395
|
}
|
|
27396
|
+
function docxPlugin(_editor) {
|
|
27397
|
+
}
|
|
25188
27398
|
class Editor {
|
|
25189
27399
|
showFormInputConfig(el) {
|
|
25190
27400
|
formInputPropertiesConfigDialog(el, this);
|
|
@@ -25195,6 +27405,18 @@ class Editor {
|
|
|
25195
27405
|
showFormRadioConfig(el) {
|
|
25196
27406
|
formRadioPropertiesConfigDialog(el, this);
|
|
25197
27407
|
}
|
|
27408
|
+
showFormImageConfig(el) {
|
|
27409
|
+
formImagePropertiesConfigDialog(el, this);
|
|
27410
|
+
}
|
|
27411
|
+
showFormSignatureConfig(el) {
|
|
27412
|
+
formSignatureConfigDialog(el, this);
|
|
27413
|
+
}
|
|
27414
|
+
showFormSealConfig(el) {
|
|
27415
|
+
formSealConfigDialog(el, this);
|
|
27416
|
+
}
|
|
27417
|
+
showFormRiskCopyConfig(el) {
|
|
27418
|
+
formRiskCopyConfigDialog(el, this);
|
|
27419
|
+
}
|
|
25198
27420
|
setExtensionParam(key, value) {
|
|
25199
27421
|
this.extensionParams.set(key, value);
|
|
25200
27422
|
}
|
|
@@ -25278,5 +27500,5 @@ class Editor {
|
|
|
25278
27500
|
Reflect.set(window, "editor", this);
|
|
25279
27501
|
}
|
|
25280
27502
|
}
|
|
25281
|
-
export { AreaMode, BackgroundRepeat, BackgroundSize, BlockType, Command, ControlComponent, ControlIndentation, ControlState, ControlType, EDITOR_CLIPBOARD, EDITOR_COMPONENT, Editor, EditorComponent, EditorMode, EditorZone, ElementType, FlexDirection, INTERNAL_CONTEXT_MENU_KEY, INTERNAL_SHORTCUT_KEY, ImageDisplay, KeyMap, LETTER_CLASS, LineNumberType, ListStyle, ListType, LocationPosition, MaxHeightRatio, NumberType, PageMode, PaperDirection, RenderMode, RowFlex, TableBorder, TdBorder, TdSlash, TextDecorationStyle, TitleLevel, VerticalAlign, WatermarkType, WordBreak, createDomFromElementList, Editor as default, formCheckboxPropertiesConfigDialog, formInputPropertiesConfigDialog, formRadioPropertiesConfigDialog, getElementListByHTML, getTextFromElementList, splitText };
|
|
27503
|
+
export { AreaMode, BackgroundPosition, BackgroundRepeat, BackgroundSize, BlockType, Command, ControlComponent, ControlIndentation, ControlState, ControlType, Dialog, EDITOR_CLIPBOARD, EDITOR_COMPONENT, Editor, EditorComponent, EditorMode, EditorZone, ElementType, FlexDirection, INTERNAL_CONTEXT_MENU_KEY, INTERNAL_SHORTCUT_KEY, ImageDisplay, KeyMap, LETTER_CLASS, LineNumberType, ListStyle, ListType, LocationPosition, MaxHeightRatio, NumberType, PageMode, PaperDirection, RenderMode, RowFlex, TableBorder, TdBorder, TdSlash, TextDecorationStyle, TitleLevel, VerticalAlign, WatermarkType, WordBreak, computeElementLineHeightPx, computeElementRowMarginPx, createDomFromElementList, Editor as default, docxPlugin, formCheckboxPropertiesConfigDialog, formImagePropertiesConfigDialog, formInputPropertiesConfigDialog, formRadioPropertiesConfigDialog, formRiskCopyConfigDialog, formSealConfigDialog, formSignatureConfigDialog, getElementListByHTML, getTextFromElementList, splitText };
|
|
25282
27504
|
//# sourceMappingURL=canvas-editor.es.js.map
|