ht-emr 0.7.28 → 0.7.29
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.js +792 -834
- package/dist/canvas-editor.umd.cjs +34 -33
- package/package.json +1 -1
package/dist/canvas-editor.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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:#fff;border-radius:4px;padding:10px;-webkit-user-select:none;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;-webkit-user-select:none;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;inset: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,%3csvg%20width='32'%20height='32'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M23.97%207l1.415%201.414-7.779%207.778%207.779%207.779-1.414%201.414-7.779-7.779-7.778%207.779L7%2023.97l7.778-7.779L7%208.414%208.414%207l7.778%207.778L23.971%207z'%20fill='%233D4757'%20fill-rule='evenodd'/%3e%3c/svg%3e") 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,%3csvg%20width='32'%20height='32'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14%2014v-4h2v4h4v2h-4v4h-2v-4h-4v-2h4zm8.749%2010.163A11.952%2011.952%200%200115%2027C8.373%2027%203%2021.627%203%2015S8.373%203%2015%203s12%205.373%2012%2012c0%202.954-1.067%205.658-2.837%207.749l4.908%204.908-1.414%201.414-4.908-4.908zM15%2025c5.523%200%2010-4.477%2010-10S20.523%205%2015%205%205%209.477%205%2015s4.477%2010%2010%2010z'%20fill='%233D4757'/%3e%3c/svg%3e")}.ce-image-previewer .ce-image-menu i.zoom-out{background-image:url("data:image/svg+xml,%3csvg%20width='32'%20height='32'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M22.749%2024.163A11.952%2011.952%200%200115%2027C8.373%2027%203%2021.627%203%2015S8.373%203%2015%203s12%205.373%2012%2012c0%202.954-1.067%205.658-2.837%207.749l4.908%204.908-1.414%201.414-4.908-4.908zM15%2025c5.523%200%2010-4.477%2010-10S20.523%205%2015%205%205%209.477%205%2015s4.477%2010%2010%2010zm-5-11h10v2H10v-2z'%20fill='%233D4757'/%3e%3c/svg%3e")}.ce-image-previewer .ce-image-menu i.rotate{background-image:url("data:image/svg+xml,%3csvg%20width='32'%20height='32'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M16%204c6.627%200%2012%205.373%2012%2012a11.97%2011.97%200%2001-4%208.944V23h-.86A9.968%209.968%200%200026%2016c0-5.523-4.477-10-10-10S6%2010.477%206%2016c0%205.185%203.947%209.449%209%209.95v2.009C8.84%2027.451%204%2022.291%204%2016%204%209.373%209.373%204%2016%204z'%20fill-rule='nonzero'/%3e%3cpath%20d='M19.879%2027.328l1.767-6.717%204.95%204.95z'/%3e%3c/g%3e%3c/svg%3e")}.ce-image-previewer .ce-image-menu i.original-size{background-image:url("data:image/svg+xml,%3csvg%20width='32'%20height='32'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%204h24v24H4V4zm2%202v20h20V6H6zm4%205h2v10h-2V11zm5%202h2v2h-2v-2zm0%204h2v2h-2v-2zm5-6h2v10h-2V11z'%20fill='%233D4757'/%3e%3c/svg%3e")}.ce-image-previewer .ce-image-menu i.image-download{background-image:url("data:image/svg+xml,%3csvg%20width='24'%20height='24'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.5%2015v3.5h15V15H21v5H3v-5h1.5zm8.232-11.226v9.196l4.05-4.05%201.06%201.06-5.834%205.834-5.833-5.833%201.06-1.06%203.998%203.996V3.774h1.5z'%20fill='%233D4757'/%3e%3c/svg%3e")}.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,%3csvg%20width='20'%20height='20'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.5%204.063L6.875%2010l5.625%205.938'%20stroke='%233D4757'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e")}.ce-image-previewer .ce-image-menu i.image-next{background-image:url("data:image/svg+xml,%3csvg%20width='20'%20height='20'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.5%204.063L13.125%2010%207.5%2015.938'%20stroke='%233D4757'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e")}.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,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M0%200h16v16H0z'/%3e%3cg%20fill='%23767C85'%3e%3cpath%20d='M7%2012.243l-.707-.707%204.243-4.243.707.707z'/%3e%3cpath%20d='M6.293%204.464L7%203.757%2011.243%208l-.707.707z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.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:#1937580a}.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,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M12%204h-1V2H5v2H4V2a1%201%200%20011-1h6a1%201%200%20011%201v2zm0%205v4a1%201%200%2001-1%201H5a1%201%200%2001-1-1V9h1v4h6V9h1z'/%3e%3cpath%20d='M12%2012v-1h2V5H2v6h2v1H2a1%201%200%2001-1-1V5a1%201%200%20011-1h12a1%201%200%20011%201v6a1%201%200%2001-1%201h-2z'/%3e%3cpath%20d='M3%208h10v1H3zm8-2h2v1h-2z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-image{background-image:url("data:image/svg+xml,%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20x='0'%20y='0'%20viewBox='0%200%2016%2016'%20xml:space='preserve'%3e%3cstyle%3e.st0{fill:%233d4757}%3c/style%3e%3cg%20id='_x30_0-公共_x2F_02工具栏_x2F_插入图片-16px-'%3e%3cg%20id='Group-19'%20transform='translate(1%201)'%3e%3cpath%20id='Combined-Shape'%20class='st0'%20d='M1%200h12c.6%200%201%20.4%201%201v11c0%20.6-.4%201-1%201H1c-.6%200-1-.4-1-1V1c0-.6.4-1%201-1zm0%201v11h12V1H1z'/%3e%3ccircle%20id='椭圆形'%20class='st0'%20cx='10'%20cy='4'%20r='1'/%3e%3cpath%20id='Path'%20class='st0'%20d='M8.5%2011.2l-4-4.1L1%2010.7V9.2c1.7-1.6%202.7-2.5%203-2.8.4-.5.7-.4%201%200L8.5%2010%2011%207.3c.4-.5.6-.5%201-.1l2%202.8v1.5l-2.5-3.4-3%203.1z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-image-change{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cg%20transform='translate(2%204)'%20fill='%233D4757'%3e%3ccircle%20fill-rule='nonzero'%20cx='3'%20cy='1'%20r='1'/%3e%3cpath%20d='M7.473%208.223L3.47%204.107%200%207.667v-1.5C1.715%204.6%202.707%203.664%202.975%203.358c.402-.457.651-.39%201.042%200L7.473%207%209.96%204.349c.414-.462.62-.462%201.011-.071L13%207.06v1.5l-2.51-3.41-3.017%203.072z'/%3e%3c/g%3e%3cpath%20d='M6%201.5H1.5v12h13v-4V13a.5.5%200%2001-.5.5H2a.5.5%200%2001-.5-.5V2a.5.5%200%2001.5-.5h4zm8.5%208V6l-.5.5h1l-.5-.5v3.5zM6%201.5h4L9.5%201v1l.5-.5H6z'%20stroke='%233D4757'/%3e%3cpath%20d='M13.085%201.316l-3.814%204a1%201%200%20001.458%201.368l3.815-4a1%201%200%2010-1.459-1.368z'%20fill='%233D4757'%20fill-rule='nonzero'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-insert-row-col{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20stroke='%233D4757'%20d='M8.5%205.5h6v4h-6z'/%3e%3cpath%20fill='%233D4757'%20d='M4%207v1h2V7zm-3%20.5L4%205v5zM1%201h12v1H1zm0%2012h12v1H1z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-insert-top-row{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20fill='%233D4757'%20d='M8%205H7v3h1zm-.5-3L10%205H5z'/%3e%3crect%20stroke='%233D4757'%20x='1.5'%20y='10.5'%20width='12'%20height='3'%20rx='1'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-insert-bottom-row{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20fill='%233D4757'%20d='M7%2011h1V8H7zm.5%203L5%2011h5z'/%3e%3crect%20stroke='%233D4757'%20x='1.5'%20y='2.5'%20width='12'%20height='3'%20rx='1'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-insert-left-col{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20fill='%233D4757'%20d='M11%207v1h3V7zm-3%20.5L11%205v5z'/%3e%3crect%20stroke='%233D4757'%20transform='rotate(90%204%207.5)'%20x='-2'%20y='6'%20width='12'%20height='3'%20rx='1'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-insert-right-col{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20fill='%233D4757'%20d='M5%208V7H2v1zm3-.5L5%2010V5z'/%3e%3crect%20stroke='%233D4757'%20transform='rotate(90%2012%207.5)'%20x='6'%20y='6'%20width='12'%20height='3'%20rx='1'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-delete-row-col{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20stroke='%23929AA8'%20d='M8.5%206.5h6v2h-6z'/%3e%3cpath%20fill='%233D4757'%20d='M2%2012h11v1H2zM2%202h11v1H2zm.63%203L7%209.35l-.635.65L2%205.63z'/%3e%3cpath%20fill='%233D4757'%20d='M2%209.363L6.355%205%207%205.707%202.695%2010z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-delete-row{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20stroke='%23929AA8'%20d='M8.5%205.5h6v4h-6z'/%3e%3cpath%20fill='%233D4757'%20d='M1%2013h12v1H1zM1%201h12v1H1zm0%204h1v1H1zm1%201h1v1H2zm1%201h1v1H3zm1-1h1v1H4zm1-1h1v1H5zM4%208h1v1H4zM2%208h1v1H2zm3%201h1v1H5zM1%209h1v1H1z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-delete-col{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20stroke='%23929AA8'%20d='M5.5%207.5v-6h4v6z'/%3e%3cpath%20fill='%233D4757'%20d='M13%2015V3h1v12zM1%2015V3h1v12zm4%200v-1h1v1zm1-1v-1h1v1zm1-1v-1h1v1zm-1-1v-1h1v1zm-1-1v-1h1v1zm3%201v-1h1v1zm0%202v-1h1v1zm1-3v-1h1v1zm0%204v-1h1v1z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-delete-table{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M14%2013h-1v-3H2v3H1v-3a1%201%200%20011-1h11a1%201%200%20011%201v3z'%20fill-rule='nonzero'/%3e%3cpath%20d='M5.625%202L10%206.375%209.375%207%205%202.625z'/%3e%3cpath%20d='M5%206.375L9.375%202l.625.625L5.625%207z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-merge-cell{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M6%201v1H2v11h4v1H2a1%201%200%2001-1-1V2a1%201%200%20011-1h4zm3%200h4a1%201%200%20011%201v11a1%201%200%2001-1%201H9v-1h4V2H9V1z'/%3e%3cpath%20fill-rule='nonzero'%20d='M6%201h1v4H6zm2%200h1v4H8z'/%3e%3cpath%20d='M8%207.5L10%206v3zm-1%200L5%206v3z'/%3e%3cpath%20d='M9%207h3v1H9zM3%207h3v1H3z'/%3e%3cpath%20fill-rule='nonzero'%20d='M8%2010h1v4H8zm-2%200h1v4H6z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-merge-cancel-cell{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M6%201v1H2v11h4v1H2a1%201%200%2001-1-1V2a1%201%200%20011-1h4zm3%200h4a1%201%200%20011%201v11a1%201%200%2001-1%201H9v-1h4V2H9V1z'/%3e%3cpath%20fill-rule='nonzero'%20d='M6%201h1v4H6zm2%200h1v4H8z'/%3e%3cpath%20d='M3%207.5L5%206v3zm9%200L10%206v3z'/%3e%3cpath%20d='M4%207h3v1H4zm4%200h3v1H8z'/%3e%3cpath%20fill-rule='nonzero'%20d='M8%2010h1v4H8zm-2%200h1v4H6z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-vertical-align{background-image:url("data:image/svg+xml,%3csvg%20height='16'%20viewBox='0%200%2016%2016'%20width='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%2013h12v1H2zm0-3h8v1H2zm0-3h12v1H2zm0-6h12v1H2zm0%203h8v1H2z'%20fill='%233d4757'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.ce-contextmenu-vertical-align-top{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%208H7v6h1zm-.5-3L10%208H5zM2%203h11v1H2z'%20fill='%233D4757'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.ce-contextmenu-vertical-align-middle{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%2012H7v3h1zm-.5-3l2.5%203H5zM7%203h1V0H7zm.5%203L5%203h5zM2%207h11v1H2z'%20fill='%233D4757'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.ce-contextmenu-vertical-align-bottom{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7%209h1V3H7zm.5%203L5%209h5zM2%2013h11v1H2z'%20fill='%233D4757'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.ce-contextmenu-border-all{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%233D4757'/%3e%3cpath%20fill='%233D4757'%20d='M3%208h11v1H3z'/%3e%3cpath%20fill='%233D4757'%20d='M9%203v11H8V3z'/%3e%3c/svg%3e")}.ce-contextmenu-border-empty{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13%203h-1V2h1a1%201%200%20011%201v1h-1V3zm-3-1v1H8.5v2h-1V3H6V2h4zM4%202v1H3v1H2V3a1%201%200%20011-1h1zM2%206h1v1.5h2v1H3V10H2V6zm0%206h1v1h1v1H3a1%201%200%2001-1-1v-1zm4%202v-1h1.5v-2h1v2H10v1H6zm6%200v-1h1v-1h1v1a1%201%200%2001-1%201h-1zm2-4h-1V8.5h-2v-1h2V6h1v4zM8.5%207.5v-1h-1v1h-1v1h1v1h1v-1h1v-1h-1z'%20fill='%23AAACB0'/%3e%3c/svg%3e")}.ce-contextmenu-border-dash{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13%203h-1V2h1a1%201%200%20011%201v1h-1V3zm-3-1v1H8.5v2h-1V3H6V2h4zM4%202v1H3v1H2V3a1%201%200%20011-1h1zM2%206h1v1.5h2v1H3V10H2V6zm0%206h1v1h1v1H3a1%201%200%2001-1-1v-1zm4%202v-1h1.5v-2h1v2H10v1H6zm6%200v-1h1v-1h1v1a1%201%200%2001-1%201h-1zm2-4h-1V8.5h-2v-1h2V6h1v4zM8.5%207.5v-1h-1v1h-1v1h1v1h1v-1h1v-1h-1z'%20fill='%23000000'/%3e%3c/svg%3e")}.ce-contextmenu-border-external{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%233D4757'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9%205V3H8v2h1zm0%209v-2H8v2h1zM5%208H3v1h2V8zm9%200h-2v1h2V8zM9%207v1h1v1H9v1H8V9H7V8h1V7h1z'%20fill='%23AAACB0'/%3e%3c/svg%3e")}.ce-contextmenu-border-internal{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9%205V3H8v2h1zm0%209v-2H8v2h1zM5%208H3v1h2V8zm9%200h-2v1h2V8zM9%207v1h1v1H9v1H8V9H7V8h1V7h1z'%20fill='%233D4757'/%3e%3c/svg%3e")}.ce-contextmenu-border-td{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'/%3e%3cpath%20stroke='%233D4757'%20d='M8.5%202.5%20v6%20h-6'/%3e%3c/svg%3e")}.ce-contextmenu-border-td-top{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'/%3e%3cpath%20stroke='%233D4757'%20stroke-width='2'%20d='M2.5%203%20h12'/%3e%3c/svg%3e")}.ce-contextmenu-border-td-left{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'/%3e%3cpath%20stroke='%233D4757'%20stroke-width='2'%20d='M3%203%20v11'/%3e%3c/svg%3e")}.ce-contextmenu-border-td-bottom{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'/%3e%3cpath%20stroke='%233D4757'%20stroke-width='2'%20d='M2.5%2014%20h12'/%3e%3c/svg%3e")}.ce-contextmenu-border-td-right{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'/%3e%3cpath%20stroke='%233D4757'%20stroke-width='2'%20d='M14%203%20v11'/%3e%3c/svg%3e")}.ce-contextmenu-border-td-forward{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'%20/%3e%3cpath%20stroke='%233D4757'%20d='M14%203%20l-11%2011'%20/%3e%3c/svg%3e")}.ce-contextmenu-border-td-back{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'%20/%3e%3cpath%20stroke='%233D4757'%20d='M3%203%20l11%2011'%20/%3e%3c/svg%3e")}.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:#dae7fc;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;-webkit-user-select: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{min-width:60px!important;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;-webkit-user-select:none;user-select:none;caret-color:transparent;background-color:transparent;white-space:pre}.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}.ce-button-input-modal{position:fixed;top:0;left:0;width:100%;height:100%;background:transparent;display:flex;justify-content:center;align-items:center;z-index:2000}.ce-button-input-modal__content{background:#fff;border-radius:8px;padding:20px;min-width:320px;max-width:480px;box-shadow:0 4px 20px #00000026}.ce-button-input-modal__title{font-size:14px;font-weight:500;color:#333;margin-bottom:12px}.ce-button-input-modal__textarea{width:100%;min-height:100px;padding:10px 12px;border:1px solid #dcdfe6;border-radius:4px;font-size:13px;line-height:1.5;resize:vertical;outline:none;box-sizing:border-box;font-family:inherit}.ce-button-input-modal__textarea:focus{border-color:#5175f4}.ce-button-input-modal__textarea::placeholder{color:#c0c4cc}.ce-button-input-modal__buttons{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}.ce-button-input-modal__cancel,.ce-button-input-modal__confirm{padding:8px 16px;font-size:13px;border-radius:4px;cursor:pointer;border:1px solid #dcdfe6;background:#fff;color:#606266;transition:all .2s}.ce-button-input-modal__cancel:hover{color:#5175f4;border-color:#5175f4}.ce-button-input-modal__confirm{background:#5175f4;border-color:#5175f4;color:#fff}.ce-button-input-modal__confirm:hover{background:#409eff;border-color:#409eff}.ce-button-edit-modal{position:fixed;top:0;left:0;width:100%;height:100%;background:transparent;display:flex;justify-content:center;align-items:center;z-index:1000}.ce-button-edit-modal__content{background:#fff;border-radius:8px;padding:20px;min-width:320px;max-width:480px;box-shadow:0 4px 20px #00000026}.ce-button-edit-modal__title{font-size:14px;font-weight:500;color:#333;margin-bottom:16px}.ce-button-edit-modal__form{display:flex;flex-direction:column;gap:12px}.ce-button-edit-modal__field{display:flex;align-items:center;gap:8px}.ce-button-edit-modal__field label{min-width:80px;font-size:13px;color:#606266}.ce-button-edit-modal__field input{flex:1;padding:8px 12px;border:1px solid #dcdfe6;border-radius:4px;font-size:13px;outline:none;box-sizing:border-box}.ce-button-edit-modal__field input:focus{border-color:#5175f4}.ce-button-edit-modal__field input::placeholder{color:#c0c4cc}.ce-button-edit-modal__buttons{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}.ce-button-edit-modal__cancel,.ce-button-edit-modal__confirm{padding:8px 16px;font-size:13px;border-radius:4px;cursor:pointer;border:1px solid #dcdfe6;background:#fff;color:#606266;transition:all .2s}.ce-button-edit-modal__cancel:hover{color:#5175f4;border-color:#5175f4}.ce-button-edit-modal__confirm{background:#5175f4;border-color:#5175f4;color:#fff}.ce-button-edit-modal__confirm:hover{background:#409eff;border-color:#409eff}.ce-number-input-modal{position:fixed;top:0;left:0;width:100%;height:100%;background:transparent;display:flex;justify-content:center;align-items:center;z-index:2000}.ce-number-input-modal__content{background:#fff;border-radius:8px;padding:20px;min-width:300px;max-width:400px;box-shadow:0 4px 20px #00000026}.ce-number-input-modal__title{font-size:14px;font-weight:500;color:#333;margin-bottom:12px}.ce-number-input-modal__hint{font-size:12px;color:#909399;margin-bottom:12px}.ce-number-input-modal__input{width:100%;padding:10px 12px;border:1px solid #dcdfe6;border-radius:4px;font-size:13px;outline:none;box-sizing:border-box}.ce-number-input-modal__input:focus{border-color:#5175f4}.ce-number-input-modal__input::placeholder{color:#c0c4cc}.ce-number-input-modal__error{font-size:12px;color:#f56c6c;margin-top:8px}.ce-number-input-modal__buttons{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}.ce-number-input-modal__cancel,.ce-number-input-modal__confirm{padding:8px 16px;font-size:13px;border-radius:4px;cursor:pointer;border:1px solid #dcdfe6;background:#fff;color:#606266;transition:all .2s}.ce-number-input-modal__cancel:hover{color:#5175f4;border-color:#5175f4}.ce-number-input-modal__confirm{background:#5175f4;border-color:#5175f4;color:#fff}.ce-number-input-modal__confirm:hover{background:#409eff;border-color:#409eff}.tooth-position-edit-modal,.tooth-position-create-modal{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1000}.tooth-position-modal__container{position:relative;top:auto;left:auto;transform:none;background:#fff;border-radius:8px;box-shadow:0 4px 12px #00000026;min-width:400px;max-width:90vw;max-height:calc(100vh - 48px);display:flex;flex-direction:column;pointer-events:auto}.tooth-position-modal__header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #e8e8e8}.tooth-position-modal__header span{font-size:16px;font-weight:500;color:#333}.tooth-position-modal__close{font-size:20px;cursor:pointer;color:#999;line-height:1}.tooth-position-modal__close:hover{color:#333}.tooth-position-modal__content{padding:20px;max-height:60vh;overflow-y:auto}.tooth-section{margin-bottom:20px}.tooth-section:last-child{margin-bottom:0}.tooth-section-title{font-size:14px;font-weight:500;color:#333;margin-bottom:12px;padding-left:8px;border-left:3px solid #1890ff}.tooth-row{display:flex;align-items:center;margin-bottom:8px}.tooth-row:last-child{margin-bottom:0}.tooth-row-label{width:30px;font-size:13px;color:#666}.tooth-buttons{display:flex;gap:8px;flex-wrap:wrap}.letter-buttons{margin-left:30px}.tooth-checkbox{display:flex;align-items:center;cursor:pointer}.tooth-checkbox input{display:none}.tooth-checkbox span{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid #d9d9d9;border-radius:4px;background:#f5f5f5;font-size:14px;color:#333;transition:all .2s}.tooth-checkbox input:checked+span{background:#1890ff;border-color:#1890ff;color:#fff}.tooth-checkbox:hover span{border-color:#1890ff}.tooth-position-modal__footer{display:flex;justify-content:flex-end;gap:10px;padding:16px 20px;border-top:1px solid #e8e8e8}.tooth-position-modal__footer .btn-cancel,.tooth-position-modal__footer .btn-confirm{padding:8px 20px;font-size:14px;border-radius:4px;cursor:pointer;border:1px solid #dcdfe6;background:#fff;color:#606266;transition:all .2s}.tooth-position-modal__footer .btn-cancel:hover{color:#1890ff;border-color:#1890ff}.tooth-position-modal__footer .btn-confirm{background:#1890ff;border-color:#1890ff;color:#fff}.tooth-position-modal__footer .btn-confirm:hover{background:#40a9ff;border-color:#40a9ff}.tooth-grid-container{display:flex;flex-direction:column;align-items:center;padding:15px 20px;background:#fafafa;border-radius:8px;margin-bottom:15px;position:relative}.tooth-quick-buttons{display:flex;gap:6px;margin-bottom:16px}.tooth-quick-buttons-left{display:flex;flex-direction:column;gap:6px;flex:1}.tooth-quick-buttons-row{display:flex;gap:6px}.tooth-quick-btn{padding:6px 12px;font-size:12px;border:1px solid #d9d9d9;border-radius:4px;cursor:pointer;background:#fff;color:#333;transition:all .2s;white-space:nowrap}.tooth-quick-btn:hover{border-color:#1890ff;color:#1890ff}.tooth-quick-btn.selected{background:#0ff;border-color:#0ff;color:#fff}.tooth-quick-btn--clear{background:#ff6b6b;border-color:#ff6b6b;color:#fff}.tooth-quick-btn--clear:hover{background:#ff5252;border-color:#ff5252;color:#fff}.tooth-grid-container:before{content:"";position:absolute;left:50%;top:20px;bottom:20px;width:2px;background:#000;transform:translate(-50%);z-index:1}.tooth-grid-container:after{content:"";position:absolute;left:20px;right:20px;top:50%;height:2px;background:#000;transform:translateY(-50%);z-index:1}.tooth-grid-letter-row,.tooth-grid-number-row{display:flex;align-items:center;justify-content:center;position:relative;z-index:2}.tooth-grid-half{display:flex;align-items:center;justify-content:center;gap:4px}.tooth-grid-half.left{justify-content:flex-end;padding-right:15px}.tooth-grid-half.right{justify-content:flex-start;padding-left:15px}.tooth-grid-divider-v,.tooth-grid-divider-h{display:none}.tooth-grid-number-item{width:34px;height:32px;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:500;color:#333;cursor:pointer;background:#fff;transition:all .2s;box-sizing:border-box;border:1px solid #d9d9d9;border-radius:12px}.upper-number-row .tooth-grid-number-item{border-top:none;border-radius:0 0 12px 12px}.lower-number-row .tooth-grid-number-item{border-bottom:none;border-radius:12px 12px 0 0}.tooth-grid-number-item[data-value="1"],.tooth-grid-number-item[data-value="2"],.tooth-grid-number-item[data-value="3"]{border-radius:50px}.upper-number-row .tooth-grid-number-item[data-value="1"],.upper-number-row .tooth-grid-number-item[data-value="2"],.upper-number-row .tooth-grid-number-item[data-value="3"]{border-top:none!important;border-radius:0 0 50px 50px!important}.lower-number-row .tooth-grid-number-item[data-value="1"],.lower-number-row .tooth-grid-number-item[data-value="2"],.lower-number-row .tooth-grid-number-item[data-value="3"]{border-bottom:none!important;border-radius:50px 50px 0 0!important}.tooth-grid-number-item:hover{border-color:#1890ff;color:#1890ff}.tooth-grid-number-item.selected{background:#1890ff;border-color:#1890ff;color:#fff}.tooth-grid-letter-item{width:34px;height:32px;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:500;color:#333;cursor:pointer;background:#fff;border:1px solid #d9d9d9;transition:all .2s;box-sizing:border-box;border-radius:12px}.upper-letter-row .tooth-grid-letter-item{border-top:none;border-radius:0 0 12px 12px}.lower-letter-row .tooth-grid-letter-item{border-bottom:none;border-radius:12px 12px 0 0}.tooth-grid-letter-item[data-value=A],.tooth-grid-letter-item[data-value=B],.tooth-grid-letter-item[data-value=C]{border-radius:50px}.upper-letter-row .tooth-grid-letter-item[data-value=A],.upper-letter-row .tooth-grid-letter-item[data-value=B],.upper-letter-row .tooth-grid-letter-item[data-value=C]{border-top:none!important;border-radius:0 0 50px 50px!important}.lower-letter-row .tooth-grid-letter-item[data-value=A],.lower-letter-row .tooth-grid-letter-item[data-value=B],.lower-letter-row .tooth-grid-letter-item[data-value=C]{border-bottom:none!important;border-radius:50px 50px 0 0!important}.tooth-grid-letter-item:hover{border-color:#1890ff;color:#1890ff}.tooth-grid-letter-item.selected{background:#1890ff;border-color:#1890ff;color:#fff}.tooth-grid-letter-row.hidden,.tooth-grid-number-row.hidden{display:none}.tooth-grid-letter-row{margin-bottom:8px}.tooth-grid-number-row.upper-number-row{margin-bottom:15px}.tooth-grid-number-row.lower-number-row{margin-top:15px}.tooth-grid-letter-row.lower-letter-row{margin-top:8px}.tooth-preview-section{padding-top:10px;border-top:1px solid #e8e8e8}.tooth-preview-title{font-size:14px;font-weight:500;color:#333;margin-bottom:12px}.tooth-preview-wrapper{display:flex;gap:15px}.tooth-preview-container{display:flex;justify-content:center;align-items:center;padding:10px;background:#fafafa;border-radius:8px;flex:1;min-height:60px}.tooth-preview-grid{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:0;width:100%;min-height:70px;position:relative}.tooth-preview-grid:before{content:"";position:absolute;left:50%;top:0;bottom:0;width:1px;background:#000;transform:translate(-50%)}.tooth-preview-grid:after{content:"";position:absolute;top:50%;left:0;right:0;height:1px;background:#000;transform:translateY(-50%)}.tooth-preview-quadrant{display:flex;align-items:center;padding:5px 10px;font-size:12px;flex-wrap:wrap;gap:4px;justify-content:center}.tooth-preview-upper-left{justify-content:flex-end}.tooth-preview-upper-right{justify-content:flex-start}.tooth-preview-lower-left{justify-content:flex-end}.tooth-preview-lower-right{justify-content:flex-start}.tooth-preview-tooth{position:relative;display:inline;margin:0 4px}.tooth-preview-tooth-value{font-size:12px}.tooth-preview-tooth-value--deciduous{font-size:10px}.tooth-preview-tooth-bracket{font-size:12px}.tooth-preview-supernumerary{font-size:9px;vertical-align:super;margin:0 1px}.tooth-preview-surface{font-size:9px;vertical-align:super;margin-left:1px}.tooth-extra-panel{width:100px;display:flex;flex-direction:column;gap:10px}.tooth-surface-panel{background:#fafafa;border-radius:8px;padding:10px 20px}.tooth-surface-title{font-size:12px;font-weight:500;color:#333;margin-bottom:8px;text-align:center}.tooth-surface-grid{display:flex;flex-direction:column;gap:4px;align-items:center}.tooth-surface-row{display:flex;gap:4px;justify-content:center}.tooth-surface-item{width:30px;height:30px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:500;color:#333;cursor:pointer;background:#fff;border:1px dashed #d9d9d9;border-radius:5px;transition:all .2s;box-sizing:border-box}.tooth-surface-item--indent{margin-left:17px}.tooth-surface-item:hover{border-color:#1890ff;color:#1890ff}.tooth-surface-item.selected{background:#1890ff;border-color:#1890ff;border-style:solid;color:#fff}.tooth-supernumerary-panel{background:#fafafa;border-radius:8px;padding:10px 20px}.tooth-supernumerary-title{font-size:12px;font-weight:500;color:#333;margin-bottom:4px;text-align:center}.tooth-supernumerary-hint{font-size:10px;color:#999;font-weight:400}.tooth-supernumerary-grid{display:flex;gap:8px;justify-content:center;margin-top:8px}.tooth-supernumerary-item{width:30px;height:35px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:500;color:#333;cursor:pointer;background:#fff;border:1px solid #d9d9d9;border-bottom:none;border-radius:50px;transition:all .2s;box-sizing:border-box}.tooth-supernumerary-item:hover{border-color:#1890ff;color:#1890ff}.tooth-supernumerary-item.selected{background:#1890ff;border-color:#1890ff;color:#fff}.ce-button-input-modal,.ce-button-edit-modal,.ce-number-input-modal,.tooth-position-edit-modal,.tooth-position-create-modal{inset:0;display:flex;align-items:center;justify-content:center;padding:24px;box-sizing:border-box;overflow:auto;background:transparent;pointer-events:none}.ce-button-input-modal__content,.ce-button-edit-modal__content,.ce-number-input-modal__content,.tooth-position-modal__container{pointer-events:auto}.ce-button-input-modal__content,.ce-button-edit-modal__content,.ce-number-input-modal__content{max-height:calc(100vh - 48px);overflow:auto}.tooth-position-modal__mask{display:none}.tooth-position-modal__container{position:relative;top:auto;left:auto;transform:none;display:flex;flex-direction:column;max-height:calc(100vh - 48px)}.ant-modal-mask{display:none!important}.ant-modal-wrap{position:fixed!important;inset:0!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:24px!important;box-sizing:border-box!important;overflow:auto!important;pointer-events:none!important}.ant-modal{top:auto!important;margin:0!important;padding-bottom:0!important;max-width:calc(100vw - 48px)!important;max-height:calc(100vh - 48px)!important;pointer-events:auto!important}.ant-modal-content{max-height:calc(100vh - 48px)!important;overflow:auto!important}.dialog-mask{display:none}.dialog-container{position:fixed;inset:0;overflow:auto;z-index:999;margin:0;padding:24px;box-sizing:border-box;display:flex;justify-content:center;align-items:center;pointer-events:none}.dialog{position:relative;padding:0 30px 30px;background:#fff;box-shadow:0 2px 12px #38383833;border:1px solid #e2e6ed;border-radius:2px;max-height:calc(100vh - 48px);overflow:auto;pointer-events:auto}.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,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.9%208.192l4.242%204.243-.707.707L8.192%208.9%203.95%2013.142l-.707-.707%204.242-4.243L3.243%203.95l.707-.707%204.242%204.242%204.243-4.242.707.707L8.9%208.192z'%20fill='%236A6A6A'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.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;-webkit-user-select: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:#fff;line-height:22px;padding:0 16px;white-space:nowrap;cursor:pointer}.dialog-menu button:hover{background:#1937580a}.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}.dialog-radio-group{display:flex;flex-direction:column;gap:8px}.dialog-radio-group--horizontal{flex-direction:row;gap:16px}.dialog-radio-item{display:flex;align-items:center;cursor:pointer;font-size:14px;color:#3d4757}.dialog-radio-item input[type=radio]{width:16px;height:16px;margin:0 6px 0 0;cursor:pointer;appearance:auto}.dialog-radio-item span{margin:0}`)),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
const Ps = "0.7.
|
|
2
|
+
const Ps = "0.7.29";
|
|
3
3
|
var Hn;
|
|
4
4
|
(function(o) {
|
|
5
5
|
o.HALF = "half", o.ONE_THIRD = "one-third", o.QUARTER = "quarter";
|
|
@@ -646,23 +646,23 @@ class il {
|
|
|
646
646
|
const { scale: l, imgCaption: a } = this.options;
|
|
647
647
|
let c = e.imgCaption.value;
|
|
648
648
|
if (c.includes("{imageNo}")) {
|
|
649
|
-
const L = this.draw.getOriginalMainElementList(),
|
|
650
|
-
c = c.replace(/\{imageNo\}/g, String(
|
|
649
|
+
const L = this.draw.getOriginalMainElementList(), I = this._countImagesBeforeTarget(L, e) + 1;
|
|
650
|
+
c = c.replace(/\{imageNo\}/g, String(I));
|
|
651
651
|
}
|
|
652
652
|
const d = (e.imgCaption.size || a.size) * l, u = e.imgCaption.font || a.font, R = e.imgCaption.color || a.color;
|
|
653
653
|
t.save(), t.font = `${d}px ${u}`, t.fillStyle = R, t.textAlign = "center";
|
|
654
654
|
let g = c;
|
|
655
655
|
const f = t.measureText(c);
|
|
656
656
|
if (f.width > r) {
|
|
657
|
-
let L = 0,
|
|
658
|
-
for (; L <
|
|
659
|
-
const O = Math.ceil((L +
|
|
660
|
-
t.measureText(S + "...").width <= r ? L = O :
|
|
657
|
+
let L = 0, I = c.length;
|
|
658
|
+
for (; L < I; ) {
|
|
659
|
+
const O = Math.ceil((L + I) / 2), S = c.substring(0, O);
|
|
660
|
+
t.measureText(S + "...").width <= r ? L = O : I = O - 1;
|
|
661
661
|
}
|
|
662
662
|
g = c.substring(0, L) + "...";
|
|
663
663
|
}
|
|
664
|
-
const T = (e.imgCaption.top ?? a.top) * l, p = i + s + T + f.actualBoundingBoxAscent,
|
|
665
|
-
t.fillText(g,
|
|
664
|
+
const T = (e.imgCaption.top ?? a.top) * l, p = i + s + T + f.actualBoundingBoxAscent, m = n + r / 2;
|
|
665
|
+
t.fillText(g, m, p), t.restore();
|
|
666
666
|
}
|
|
667
667
|
render(t, e, n, i) {
|
|
668
668
|
const { scale: r } = this.options, s = e.width * r, l = e.height * r;
|
|
@@ -2684,17 +2684,17 @@ function dc(o, t = "center") {
|
|
|
2684
2684
|
d = o[u].bbox.y + o[u].bbox.h, Fe(o[c], Ye.SUB_SUP_SCALE, null, 0, 0), Ut[o[u].text] && Ut[o[u].text].flags.big ? o[c].bbox.y = d : o[u].text == "\\int" ? o[c].bbox.y = d - o[c].bbox.h : o[c].bbox.y = d - o[c].bbox.h / 2;
|
|
2685
2685
|
}
|
|
2686
2686
|
function e(c, d, u, R, g) {
|
|
2687
|
-
let f = c, T = g, p = 1 / 0,
|
|
2687
|
+
let f = c, T = g, p = 1 / 0, m = -1 / 0;
|
|
2688
2688
|
for (; R > 0 ? f < o.length : f >= 0; ) {
|
|
2689
2689
|
if (o[f].text == d)
|
|
2690
2690
|
T++;
|
|
2691
2691
|
else if (o[f].text == u) {
|
|
2692
2692
|
if (T--, T == 0)
|
|
2693
2693
|
break;
|
|
2694
|
-
} else o[f].text == "^" || o[f].text == "_" || o[f].bbox && (p = Math.min(p, o[f].bbox.y),
|
|
2694
|
+
} else o[f].text == "^" || o[f].text == "_" || o[f].bbox && (p = Math.min(p, o[f].bbox.y), m = Math.max(m, o[f].bbox.y + o[f].bbox.h));
|
|
2695
2695
|
f += R;
|
|
2696
2696
|
}
|
|
2697
|
-
return [p,
|
|
2697
|
+
return [p, m];
|
|
2698
2698
|
}
|
|
2699
2699
|
for (let c = 0; c < o.length; c++)
|
|
2700
2700
|
if (o[c].text == "\\left") {
|
|
@@ -2864,10 +2864,10 @@ function je(o, t = "math") {
|
|
|
2864
2864
|
f--;
|
|
2865
2865
|
const T = Ut[o.chld[f].text] && Ut[o.chld[f].text].flags.big;
|
|
2866
2866
|
if (R.text == "'") {
|
|
2867
|
-
let p = f + 1,
|
|
2867
|
+
let p = f + 1, m = 0;
|
|
2868
2868
|
for (; p < u; )
|
|
2869
|
-
o.chld[p].text == "'" &&
|
|
2870
|
-
R.bbox.x = o.chld[f].bbox.x + o.chld[f].bbox.w + R.bbox.w *
|
|
2869
|
+
o.chld[p].text == "'" && m++, p++;
|
|
2870
|
+
R.bbox.x = o.chld[f].bbox.x + o.chld[f].bbox.w + R.bbox.w * m, n = Math.max(n, R.bbox.x + R.bbox.w);
|
|
2871
2871
|
} else if (T) {
|
|
2872
2872
|
const p = o.chld[f].bbox.x + (o.chld[f].bbox.w - R.bbox.w * Ye.SUB_SUP_SCALE) / 2;
|
|
2873
2873
|
R.bbox.x = p, n = Math.max(n, o.chld[f].bbox.x + o.chld[f].bbox.w + (R.bbox.w * Ye.SUB_SUP_SCALE - o.chld[f].bbox.w) / 2);
|
|
@@ -3630,13 +3630,13 @@ function mi(o = {}) {
|
|
|
3630
3630
|
}, p = {
|
|
3631
3631
|
...Cc,
|
|
3632
3632
|
...o.lineBreak
|
|
3633
|
-
},
|
|
3633
|
+
}, m = {
|
|
3634
3634
|
...wc,
|
|
3635
3635
|
...o.whiteSpace
|
|
3636
3636
|
}, L = {
|
|
3637
3637
|
...xc,
|
|
3638
3638
|
...o.separator
|
|
3639
|
-
},
|
|
3639
|
+
}, I = {
|
|
3640
3640
|
...Wc,
|
|
3641
3641
|
...o.lineNumber
|
|
3642
3642
|
}, O = {
|
|
@@ -3737,9 +3737,9 @@ function mi(o = {}) {
|
|
|
3737
3737
|
zone: f,
|
|
3738
3738
|
background: T,
|
|
3739
3739
|
lineBreak: p,
|
|
3740
|
-
whiteSpace:
|
|
3740
|
+
whiteSpace: m,
|
|
3741
3741
|
separator: L,
|
|
3742
|
-
lineNumber:
|
|
3742
|
+
lineNumber: I,
|
|
3743
3743
|
pageBorder: O,
|
|
3744
3744
|
badge: S,
|
|
3745
3745
|
modeRule: D,
|
|
@@ -4033,10 +4033,10 @@ function ae(o, t) {
|
|
|
4033
4033
|
for (let g = 0; g < R.length; g++) {
|
|
4034
4034
|
const f = R[g];
|
|
4035
4035
|
for (let T = 0; T < f.tdList.length; T++) {
|
|
4036
|
-
const
|
|
4037
|
-
for (let L = 0; L <
|
|
4038
|
-
const
|
|
4039
|
-
|
|
4036
|
+
const m = f.tdList[T].value;
|
|
4037
|
+
for (let L = 0; L < m.length; L++) {
|
|
4038
|
+
const I = m[L];
|
|
4039
|
+
I.areaId = l.areaId || c, I.area = l.area;
|
|
4040
4040
|
}
|
|
4041
4041
|
}
|
|
4042
4042
|
}
|
|
@@ -4060,8 +4060,8 @@ function ae(o, t) {
|
|
|
4060
4060
|
isForceCompensation: !0
|
|
4061
4061
|
}), !f.value[0].size && f.value[1]?.size && di(f.value[1]) && (f.value[0].size = f.value[1].size);
|
|
4062
4062
|
for (let p = 0; p < f.value.length; p++) {
|
|
4063
|
-
const
|
|
4064
|
-
|
|
4063
|
+
const m = f.value[p];
|
|
4064
|
+
m.tdId = T, m.trId = R, m.tableId = a;
|
|
4065
4065
|
}
|
|
4066
4066
|
}
|
|
4067
4067
|
}
|
|
@@ -4109,7 +4109,7 @@ function ae(o, t) {
|
|
|
4109
4109
|
code: f,
|
|
4110
4110
|
type: T,
|
|
4111
4111
|
valueSets: p
|
|
4112
|
-
} = l.control,
|
|
4112
|
+
} = l.control, m = T, { editorOptions: { control: L, checkbox: I, radio: O } } = t, S = l.controlId || mt();
|
|
4113
4113
|
o.splice(s, 1);
|
|
4114
4114
|
const X = Re(l, [
|
|
4115
4115
|
...qi,
|
|
@@ -4149,9 +4149,9 @@ function ae(o, t) {
|
|
|
4149
4149
|
}), s++;
|
|
4150
4150
|
}
|
|
4151
4151
|
}
|
|
4152
|
-
if (R && R.length ||
|
|
4152
|
+
if (R && R.length || m === V.CHECKBOX || m === V.RADIO || m === V.SELECT && f && (!R || !R.length)) {
|
|
4153
4153
|
let x = R ? ht(R) : [];
|
|
4154
|
-
if (
|
|
4154
|
+
if (m === V.CHECKBOX) {
|
|
4155
4155
|
const b = f ? f.split(",") : [];
|
|
4156
4156
|
if (Array.isArray(p) && p.length) {
|
|
4157
4157
|
const C = x.reduce((M, U) => M.concat(U.value.split("").map((N) => ({ ...U, value: N }))), []);
|
|
@@ -4181,14 +4181,14 @@ function ae(o, t) {
|
|
|
4181
4181
|
controlId: S,
|
|
4182
4182
|
value: K === `
|
|
4183
4183
|
` ? _ : K,
|
|
4184
|
-
letterSpacing: H ?
|
|
4184
|
+
letterSpacing: H ? I.gap : 0,
|
|
4185
4185
|
control: l.control,
|
|
4186
4186
|
controlComponent: h.VALUE
|
|
4187
4187
|
}), F++, s++;
|
|
4188
4188
|
}
|
|
4189
4189
|
}
|
|
4190
4190
|
}
|
|
4191
|
-
} else if (
|
|
4191
|
+
} else if (m === V.RADIO) {
|
|
4192
4192
|
if (Array.isArray(p) && p.length) {
|
|
4193
4193
|
const b = x.reduce((F, M) => F.concat(M.value.split("").map((U) => ({ ...M, value: U }))), []);
|
|
4194
4194
|
let C = 0;
|
|
@@ -4299,7 +4299,7 @@ function ae(o, t) {
|
|
|
4299
4299
|
originControlId: S,
|
|
4300
4300
|
value: Ct === `
|
|
4301
4301
|
` ? _ : Ct,
|
|
4302
|
-
letterSpacing: Kt ?
|
|
4302
|
+
letterSpacing: Kt ? I.gap : 0,
|
|
4303
4303
|
controlComponent: h.VALUE
|
|
4304
4304
|
}), s++;
|
|
4305
4305
|
}
|
|
@@ -4484,12 +4484,12 @@ function ae(o, t) {
|
|
|
4484
4484
|
o.splice(s, 0, {
|
|
4485
4485
|
...X,
|
|
4486
4486
|
...Y,
|
|
4487
|
-
...
|
|
4487
|
+
...m === V.BUTTON ? Ho(i.defaultColor) : {},
|
|
4488
4488
|
...C,
|
|
4489
4489
|
controlId: S,
|
|
4490
4490
|
value: U === `
|
|
4491
4491
|
` ? _ : U,
|
|
4492
|
-
type:
|
|
4492
|
+
type: m === V.BUTTON ? P.CONTROL : C.type || P.TEXT,
|
|
4493
4493
|
control: l.control,
|
|
4494
4494
|
controlComponent: h.VALUE
|
|
4495
4495
|
}), s++;
|
|
@@ -4546,7 +4546,7 @@ function ae(o, t) {
|
|
|
4546
4546
|
}
|
|
4547
4547
|
s--;
|
|
4548
4548
|
} else {
|
|
4549
|
-
const { prefix: a, postfix: c, preText: d, postText: u, value: R, placeholder: g, code: f, type: T, valueSets: p } = l.control, { editorOptions: { control:
|
|
4549
|
+
const { prefix: a, postfix: c, preText: d, postText: u, value: R, placeholder: g, code: f, type: T, valueSets: p } = l.control, { editorOptions: { control: m, checkbox: L, radio: I } } = t, O = l.controlId || mt();
|
|
4550
4550
|
o.splice(s, 1);
|
|
4551
4551
|
const S = Re(l, [
|
|
4552
4552
|
...qi,
|
|
@@ -4558,7 +4558,7 @@ function ae(o, t) {
|
|
|
4558
4558
|
}, W = {
|
|
4559
4559
|
...X,
|
|
4560
4560
|
color: void 0
|
|
4561
|
-
}, Y = ze(T, a ||
|
|
4561
|
+
}, Y = ze(T, a || m.prefix);
|
|
4562
4562
|
for (let E = 0; E < Y.length; E++) {
|
|
4563
4563
|
const x = Y[E];
|
|
4564
4564
|
o.splice(s, 0, {
|
|
@@ -4655,7 +4655,7 @@ function ae(o, t) {
|
|
|
4655
4655
|
controlId: O,
|
|
4656
4656
|
value: N === `
|
|
4657
4657
|
` ? _ : N,
|
|
4658
|
-
letterSpacing: w ?
|
|
4658
|
+
letterSpacing: w ? I.gap : 0,
|
|
4659
4659
|
control: l.control,
|
|
4660
4660
|
controlComponent: h.VALUE
|
|
4661
4661
|
}), b++, s++;
|
|
@@ -4691,7 +4691,7 @@ function ae(o, t) {
|
|
|
4691
4691
|
controlId: F,
|
|
4692
4692
|
type: P.CONTROL,
|
|
4693
4693
|
control: C.control
|
|
4694
|
-
}, B = w ? i.control.textFixColor : K ? "#87d068" : et ? Bn().color : i.control.bracketColor, ut = et ? Bn().highlight : void 0, Wt = w ? C.control?.preTextFix ||
|
|
4694
|
+
}, B = w ? i.control.textFixColor : K ? "#87d068" : et ? Bn().color : i.control.bracketColor, ut = et ? Bn().highlight : void 0, Wt = w ? C.control?.preTextFix || m.preTextFix : C.control?.prefix || m.prefix, kt = ze(N, Wt);
|
|
4695
4695
|
for (let A = 0; A < kt.length; A++)
|
|
4696
4696
|
o.splice(s, 0, {
|
|
4697
4697
|
...$,
|
|
@@ -4767,7 +4767,7 @@ function ae(o, t) {
|
|
|
4767
4767
|
originControlId: O,
|
|
4768
4768
|
value: ft === `
|
|
4769
4769
|
` ? _ : ft,
|
|
4770
|
-
letterSpacing: Ot ?
|
|
4770
|
+
letterSpacing: Ot ? I.gap : 0,
|
|
4771
4771
|
controlComponent: h.VALUE
|
|
4772
4772
|
}), s++;
|
|
4773
4773
|
}
|
|
@@ -4780,7 +4780,7 @@ function ae(o, t) {
|
|
|
4780
4780
|
...$,
|
|
4781
4781
|
controlId: lt,
|
|
4782
4782
|
control: k.control
|
|
4783
|
-
}, Kt = ft ? i.control.textFixColor : Ot ? "#87d068" : i.control.bracketColor, jt = ft ? k.control?.preTextFix ||
|
|
4783
|
+
}, Kt = ft ? i.control.textFixColor : Ot ? "#87d068" : i.control.bracketColor, jt = ft ? k.control?.preTextFix || m.preTextFix : k.control?.prefix || m.prefix, bt = ze(ot, jt);
|
|
4784
4784
|
for (let Dt = 0; Dt < bt.length; Dt++)
|
|
4785
4785
|
o.splice(s, 0, {
|
|
4786
4786
|
...Ct,
|
|
@@ -4815,7 +4815,7 @@ function ae(o, t) {
|
|
|
4815
4815
|
}), s++;
|
|
4816
4816
|
}
|
|
4817
4817
|
}
|
|
4818
|
-
const $t = ft ? k.control?.postTextFix ||
|
|
4818
|
+
const $t = ft ? k.control?.postTextFix || m.postTextFix : k.control?.postfix || m.postfix, oe = ze(ot, $t);
|
|
4819
4819
|
for (let Dt = 0; Dt < oe.length; Dt++)
|
|
4820
4820
|
o.splice(s, 0, {
|
|
4821
4821
|
...Ct,
|
|
@@ -4856,7 +4856,7 @@ function ae(o, t) {
|
|
|
4856
4856
|
controlComponent: h.PLACEHOLDER
|
|
4857
4857
|
}), s++;
|
|
4858
4858
|
}
|
|
4859
|
-
const Se = w ? C.control?.postTextFix ||
|
|
4859
|
+
const Se = w ? C.control?.postTextFix || m.postTextFix : C.control?.postfix || m.postfix, re = ze(N, Se);
|
|
4860
4860
|
for (let A = 0; A < re.length; A++)
|
|
4861
4861
|
o.splice(s, 0, {
|
|
4862
4862
|
...$,
|
|
@@ -4942,7 +4942,7 @@ function ae(o, t) {
|
|
|
4942
4942
|
}), s++;
|
|
4943
4943
|
}
|
|
4944
4944
|
}
|
|
4945
|
-
const D = ze(T, c ||
|
|
4945
|
+
const D = ze(T, c || m.postfix);
|
|
4946
4946
|
for (let E = 0; E < D.length; E++) {
|
|
4947
4947
|
const x = D[E];
|
|
4948
4948
|
o.splice(s, 0, {
|
|
@@ -5061,12 +5061,12 @@ function vt(o, t = {}) {
|
|
|
5061
5061
|
listStyle: g
|
|
5062
5062
|
}, p = [];
|
|
5063
5063
|
for (; a < s.length; ) {
|
|
5064
|
-
const
|
|
5065
|
-
if (u !==
|
|
5064
|
+
const m = s[a];
|
|
5065
|
+
if (u !== m.listId) {
|
|
5066
5066
|
a--;
|
|
5067
5067
|
break;
|
|
5068
5068
|
}
|
|
5069
|
-
delete
|
|
5069
|
+
delete m.listType, delete m.listStyle, p.push(m), a++;
|
|
5070
5070
|
}
|
|
5071
5071
|
T.valueList = vt(p, t), c = T;
|
|
5072
5072
|
}
|
|
@@ -5079,10 +5079,10 @@ function vt(o, t = {}) {
|
|
|
5079
5079
|
c.height += g.height;
|
|
5080
5080
|
const f = g.trList.filter((T) => !T.pagingRepeat).filter((T) => (T.tdList = T.tdList.filter((p) => {
|
|
5081
5081
|
if (p.originalId) {
|
|
5082
|
-
for (let
|
|
5083
|
-
const
|
|
5084
|
-
if (
|
|
5085
|
-
p.value[0]?.type === P.SPLIT_TAG && p.value.splice(0, 1),
|
|
5082
|
+
for (let m = 0; m < c.trList.length; m++) {
|
|
5083
|
+
const I = c.trList[m].tdList.find(({ id: O }) => O === p.originalId);
|
|
5084
|
+
if (I) {
|
|
5085
|
+
p.value[0]?.type === P.SPLIT_TAG && p.value.splice(0, 1), I.value.push(...p.value), I.rowspan = I.originalRowspan ?? I.rowspan;
|
|
5086
5086
|
break;
|
|
5087
5087
|
}
|
|
5088
5088
|
}
|
|
@@ -5110,8 +5110,8 @@ function vt(o, t = {}) {
|
|
|
5110
5110
|
})
|
|
5111
5111
|
};
|
|
5112
5112
|
tc.forEach((p) => {
|
|
5113
|
-
const
|
|
5114
|
-
|
|
5113
|
+
const m = f[p];
|
|
5114
|
+
m !== void 0 && (T[p] = m);
|
|
5115
5115
|
}), R.tdList[g] = T;
|
|
5116
5116
|
}
|
|
5117
5117
|
}
|
|
@@ -5157,9 +5157,9 @@ function vt(o, t = {}) {
|
|
|
5157
5157
|
if (!(c.controlComponent === h.PREFIX || c.controlComponent === h.PRETEXTFIX || c.controlComponent === h.PRETEXTFIX_TEXT) && c.controlComponent === h.VALUE) {
|
|
5158
5158
|
if (c.type === P.MENSTRUAL_HISTORY || c.type === P.FETAL_HEART_POSITION || c.type === P.TOOTH_POSITION || c.type === P.MACRO || c.type === P.CUSTOM_MACRO || c.type === P.REUSABLE_ITEM || c.type === P.LIST || c.type === P.SPECIAL_SYMBOLS) {
|
|
5159
5159
|
let p = !1;
|
|
5160
|
-
for (let
|
|
5161
|
-
const L = s[
|
|
5162
|
-
if (L.controlId === u &&
|
|
5160
|
+
for (let m = a - 1; m >= 0; m--) {
|
|
5161
|
+
const L = s[m], I = L.controlComponent === h.PREFIX || L.controlComponent === h.PRETEXTFIX || L.controlComponent === h.PRETEXTFIX_TEXT;
|
|
5162
|
+
if (L.controlId === u && I) {
|
|
5163
5163
|
p = !0;
|
|
5164
5164
|
break;
|
|
5165
5165
|
}
|
|
@@ -5167,8 +5167,8 @@ function vt(o, t = {}) {
|
|
|
5167
5167
|
break;
|
|
5168
5168
|
}
|
|
5169
5169
|
if (!p) {
|
|
5170
|
-
const
|
|
5171
|
-
delete
|
|
5170
|
+
const m = ht(c);
|
|
5171
|
+
delete m.controlId, delete m.control, delete m.controlComponent, delete m.originControlId, l.push(m), a++;
|
|
5172
5172
|
continue;
|
|
5173
5173
|
}
|
|
5174
5174
|
}
|
|
@@ -5179,59 +5179,59 @@ function vt(o, t = {}) {
|
|
|
5179
5179
|
a++;
|
|
5180
5180
|
continue;
|
|
5181
5181
|
}
|
|
5182
|
-
const g = (T, p,
|
|
5182
|
+
const g = (T, p, m, L) => {
|
|
5183
5183
|
if (L === V.CHECKBOX || L === V.RADIO) {
|
|
5184
5184
|
let O = -1;
|
|
5185
5185
|
for (let S = T; S < s.length && s[S].controlId === p; S++)
|
|
5186
5186
|
O = S;
|
|
5187
5187
|
return O;
|
|
5188
5188
|
}
|
|
5189
|
-
const
|
|
5189
|
+
const I = m ? [h.POSTTEXTFIX, h.POSTTEXTFIX_TEXT] : [h.POSTFIX];
|
|
5190
5190
|
for (let O = T; O < s.length; O++) {
|
|
5191
5191
|
const S = s[O];
|
|
5192
|
-
if (S.controlId === p &&
|
|
5192
|
+
if (S.controlId === p && I.includes(S.controlComponent))
|
|
5193
5193
|
return O;
|
|
5194
5194
|
}
|
|
5195
5195
|
return -1;
|
|
5196
|
-
}, f = (T, p,
|
|
5196
|
+
}, f = (T, p, m) => {
|
|
5197
5197
|
const L = [];
|
|
5198
|
-
let
|
|
5199
|
-
for (;
|
|
5200
|
-
const O = s[
|
|
5201
|
-
if (O.controlId && O.controlId !==
|
|
5198
|
+
let I = T;
|
|
5199
|
+
for (; I <= p; ) {
|
|
5200
|
+
const O = s[I];
|
|
5201
|
+
if (O.controlId && O.controlId !== m && O.control) {
|
|
5202
5202
|
const Y = O.control?.type, D = Y === V.TEXTFIELD, E = D ? h.PRETEXTFIX : h.PREFIX, x = O.controlComponent === E, b = Y === V.CHECKBOX || Y === V.RADIO;
|
|
5203
5203
|
if (x || b && (O.controlComponent === h.CHECKBOX || O.controlComponent === h.RADIO)) {
|
|
5204
|
-
const C = g(
|
|
5204
|
+
const C = g(I + 1, O.controlId, D, Y);
|
|
5205
5205
|
if (C !== -1) {
|
|
5206
|
-
const F = s.slice(
|
|
5206
|
+
const F = s.slice(I, C + 1).map((U) => {
|
|
5207
5207
|
const N = ht(U);
|
|
5208
5208
|
return delete N.originControlId, N;
|
|
5209
5209
|
}), M = vt(F, t);
|
|
5210
|
-
M.length > 0 && L.push(M[0]),
|
|
5210
|
+
M.length > 0 && L.push(M[0]), I = C + 1;
|
|
5211
5211
|
continue;
|
|
5212
5212
|
}
|
|
5213
5213
|
}
|
|
5214
5214
|
}
|
|
5215
|
-
if (!(O.controlId ===
|
|
5216
|
-
O.controlId ===
|
|
5217
|
-
|
|
5215
|
+
if (!(O.controlId === m && (O.controlComponent === h.VALUE || !O.controlComponent) && (!O.originControlId || O.originControlId === m) || O.originControlId === m && O.controlComponent === h.VALUE || // checkbox/radio 元素也在当前控件范围内
|
|
5216
|
+
O.controlId === m && (O.controlComponent === h.CHECKBOX || O.controlComponent === h.RADIO) && !O.originControlId)) {
|
|
5217
|
+
I++;
|
|
5218
5218
|
continue;
|
|
5219
5219
|
}
|
|
5220
5220
|
if (O.type === P.MENSTRUAL_HISTORY || O.type === P.FETAL_HEART_POSITION || O.type === P.TOOTH_POSITION || O.type === P.MACRO || O.type === P.CUSTOM_MACRO || O.type === P.REUSABLE_ITEM || O.type === P.LIST || O.type === P.SPECIAL_SYMBOLS) {
|
|
5221
5221
|
const Y = ht(O);
|
|
5222
|
-
delete Y.controlId, delete Y.control, delete Y.controlComponent, delete Y.originControlId, L.push(Y),
|
|
5222
|
+
delete Y.controlId, delete Y.control, delete Y.controlComponent, delete Y.originControlId, L.push(Y), I++;
|
|
5223
5223
|
continue;
|
|
5224
5224
|
}
|
|
5225
5225
|
if (O.controlComponent === h.CHECKBOX || O.controlComponent === h.RADIO) {
|
|
5226
|
-
L.push(ht(O)),
|
|
5226
|
+
L.push(ht(O)), I++;
|
|
5227
5227
|
continue;
|
|
5228
5228
|
}
|
|
5229
5229
|
const y = c.control?.type;
|
|
5230
5230
|
if (y === V.CHECKBOX || y === V.RADIO) {
|
|
5231
|
-
let Y =
|
|
5231
|
+
let Y = I - 1, D = !1;
|
|
5232
5232
|
for (; Y >= T - 1; ) {
|
|
5233
5233
|
const E = s[Y];
|
|
5234
|
-
if (E.controlId ===
|
|
5234
|
+
if (E.controlId === m && !E.originControlId)
|
|
5235
5235
|
if (E.controlComponent === h.CHECKBOX) {
|
|
5236
5236
|
D = E.checkbox?.value === !0;
|
|
5237
5237
|
break;
|
|
@@ -5297,14 +5297,14 @@ function vt(o, t = {}) {
|
|
|
5297
5297
|
}
|
|
5298
5298
|
L.push(Y);
|
|
5299
5299
|
}
|
|
5300
|
-
|
|
5300
|
+
I++;
|
|
5301
5301
|
}
|
|
5302
5302
|
return L;
|
|
5303
5303
|
};
|
|
5304
5304
|
if (c.controlComponent === h.PREFIX) {
|
|
5305
5305
|
const T = c.control?.type === V.TEXTFIELD, p = g(a + 1, u, T);
|
|
5306
5306
|
if (p !== -1) {
|
|
5307
|
-
const
|
|
5307
|
+
const m = f(a + 1, p - 1, u), L = Re(c, Pe), O = c.control?.type === V.BUTTON && !c.control?.buttonText ? m.length ? m : null : m, S = {
|
|
5308
5308
|
...c.control,
|
|
5309
5309
|
...L,
|
|
5310
5310
|
value: O
|
|
@@ -5321,35 +5321,35 @@ function vt(o, t = {}) {
|
|
|
5321
5321
|
if (c.controlComponent === h.PRETEXTFIX) {
|
|
5322
5322
|
const T = g(a + 1, u, !0);
|
|
5323
5323
|
if (T !== -1) {
|
|
5324
|
-
const p = f(a + 1, T - 1, u),
|
|
5324
|
+
const p = f(a + 1, T - 1, u), m = Re(c, Pe), L = {
|
|
5325
5325
|
...c.control,
|
|
5326
|
-
...
|
|
5326
|
+
...m,
|
|
5327
5327
|
value: p
|
|
5328
|
-
},
|
|
5328
|
+
}, I = {
|
|
5329
5329
|
...Re(c, Oe),
|
|
5330
5330
|
type: P.CONTROL,
|
|
5331
5331
|
value: "",
|
|
5332
5332
|
control: L,
|
|
5333
5333
|
controlId: u
|
|
5334
5334
|
};
|
|
5335
|
-
c = Nn(
|
|
5335
|
+
c = Nn(I, { extraPickAttrs: e }), a = T;
|
|
5336
5336
|
}
|
|
5337
5337
|
}
|
|
5338
5338
|
if (c.controlComponent === h.PRETEXTFIX_TEXT) {
|
|
5339
5339
|
const T = g(a + 1, u, !0);
|
|
5340
5340
|
if (T !== -1) {
|
|
5341
|
-
const p = f(a + 1, T - 1, u),
|
|
5341
|
+
const p = f(a + 1, T - 1, u), m = Re(c, Pe), L = {
|
|
5342
5342
|
...c.control,
|
|
5343
|
-
...
|
|
5343
|
+
...m,
|
|
5344
5344
|
value: p
|
|
5345
|
-
},
|
|
5345
|
+
}, I = {
|
|
5346
5346
|
...Re(c, Oe),
|
|
5347
5347
|
type: P.CONTROL,
|
|
5348
5348
|
value: "",
|
|
5349
5349
|
control: L,
|
|
5350
5350
|
controlId: u
|
|
5351
5351
|
};
|
|
5352
|
-
c = Nn(
|
|
5352
|
+
c = Nn(I, { extraPickAttrs: e }), a = T;
|
|
5353
5353
|
}
|
|
5354
5354
|
}
|
|
5355
5355
|
}
|
|
@@ -5518,21 +5518,21 @@ function Oo(o, t) {
|
|
|
5518
5518
|
!d.borderType || d.borderType === Xe.ALL ? (u.style.borderTop = R, u.style.borderLeft = R) : d.borderType === Xe.EXTERNAL && (u.style.border = R), u.style.width = `${d.width}px`;
|
|
5519
5519
|
const g = document.createElement("colgroup");
|
|
5520
5520
|
for (let T = 0; T < d.colgroup.length; T++) {
|
|
5521
|
-
const p = d.colgroup[T],
|
|
5522
|
-
|
|
5521
|
+
const p = d.colgroup[T], m = document.createElement("col");
|
|
5522
|
+
m.setAttribute("width", `${p.width}`), g.append(m);
|
|
5523
5523
|
}
|
|
5524
5524
|
u.append(g);
|
|
5525
5525
|
const f = d.trList;
|
|
5526
5526
|
for (let T = 0; T < f.length; T++) {
|
|
5527
|
-
const p = document.createElement("tr"),
|
|
5528
|
-
p.style.height = `${
|
|
5529
|
-
for (let L = 0; L <
|
|
5530
|
-
const
|
|
5531
|
-
(!d.borderType || d.borderType === Xe.ALL) && (
|
|
5532
|
-
const O =
|
|
5533
|
-
|
|
5527
|
+
const p = document.createElement("tr"), m = f[T];
|
|
5528
|
+
p.style.height = `${m.height}px`;
|
|
5529
|
+
for (let L = 0; L < m.tdList.length; L++) {
|
|
5530
|
+
const I = document.createElement("td");
|
|
5531
|
+
(!d.borderType || d.borderType === Xe.ALL) && (I.style.borderBottom = I.style.borderRight = "1px solid");
|
|
5532
|
+
const O = m.tdList[L];
|
|
5533
|
+
I.colSpan = O.colspan, I.rowSpan = O.rowspan, I.style.verticalAlign = O.verticalAlign || "top", O.borderTypes?.includes(be.TOP) && (I.style.borderTop = R), O.borderTypes?.includes(be.RIGHT) && (I.style.borderRight = R), O.borderTypes?.includes(be.BOTTOM) && (I.style.borderBottom = R), O.borderTypes?.includes(be.LEFT) && (I.style.borderLeft = R);
|
|
5534
5534
|
const S = Oo(O.value, t);
|
|
5535
|
-
|
|
5535
|
+
I.innerHTML = S.innerHTML, O.backgroundColor && (I.style.backgroundColor = O.backgroundColor), p.append(I);
|
|
5536
5536
|
}
|
|
5537
5537
|
u.append(p);
|
|
5538
5538
|
}
|
|
@@ -5732,25 +5732,25 @@ function Mo(o, t) {
|
|
|
5732
5732
|
trList: []
|
|
5733
5733
|
}, f = R.querySelectorAll("colgroup col");
|
|
5734
5734
|
if (R.querySelectorAll("tr").forEach((T) => {
|
|
5735
|
-
const p = Number(window.getComputedStyle(T).height.replace("px", "")),
|
|
5735
|
+
const p = Number(window.getComputedStyle(T).height.replace("px", "")), m = {
|
|
5736
5736
|
height: p,
|
|
5737
5737
|
minHeight: p,
|
|
5738
5738
|
tdList: []
|
|
5739
5739
|
};
|
|
5740
5740
|
T.querySelectorAll("th,td").forEach((L) => {
|
|
5741
|
-
const
|
|
5742
|
-
colspan:
|
|
5743
|
-
rowspan:
|
|
5741
|
+
const I = L, O = Mo(I.innerHTML, t), S = {
|
|
5742
|
+
colspan: I.colSpan,
|
|
5743
|
+
rowspan: I.rowSpan,
|
|
5744
5744
|
value: O,
|
|
5745
5745
|
verticalAlign: window.getComputedStyle(L).verticalAlign,
|
|
5746
5746
|
width: parseFloat(window.getComputedStyle(L).width)
|
|
5747
5747
|
};
|
|
5748
|
-
|
|
5749
|
-
}), g.trList.push(
|
|
5748
|
+
I.style.backgroundColor && (S.backgroundColor = I.style.backgroundColor), m.tdList.push(S);
|
|
5749
|
+
}), g.trList.push(m);
|
|
5750
5750
|
}), g.trList.length) {
|
|
5751
|
-
const T = g.trList[0].tdList.reduce((
|
|
5752
|
-
for (let
|
|
5753
|
-
const L = f[
|
|
5751
|
+
const T = g.trList[0].tdList.reduce((m, L) => m + L.colspan, 0), p = Math.ceil(t.innerWidth / T);
|
|
5752
|
+
for (let m = 0; m < T; m++) {
|
|
5753
|
+
const L = f[m]?.getAttribute("width");
|
|
5754
5754
|
g.colgroup.push({
|
|
5755
5755
|
width: L ? parseFloat(L) : p
|
|
5756
5756
|
});
|
|
@@ -6354,7 +6354,7 @@ class cd {
|
|
|
6354
6354
|
return;
|
|
6355
6355
|
const { scale: n, cursor: i } = this.options, { color: r, width: s, isShow: l = !0, isBlink: a = !0, isFocus: c = !0, hitLineStartIndex: d } = { ...i, ...t }, u = this.draw.getHeight(), R = this.draw.getPageGap();
|
|
6356
6356
|
this.hitLineStartIndex = d, d && (e = this.position.getPositionList()[d]);
|
|
6357
|
-
const { metrics: g, coordinate: { leftTop: f, rightTop: T }, ascent: p, pageNo:
|
|
6357
|
+
const { metrics: g, coordinate: { leftTop: f, rightTop: T }, ascent: p, pageNo: m } = e, O = (this.draw.getZone().isMainActive() ? m : this.draw.getPageNo()) * (u + R), S = ka * n, X = Math.min(g.height / 4, S), y = g.height + X * 2, W = this.cursorAgent.getAgentCursorDom();
|
|
6358
6358
|
c && setTimeout(() => {
|
|
6359
6359
|
this.focus();
|
|
6360
6360
|
});
|
|
@@ -6400,8 +6400,8 @@ class cd {
|
|
|
6400
6400
|
if (c)
|
|
6401
6401
|
a.right = window.innerWidth, a.bottom = window.innerHeight;
|
|
6402
6402
|
else {
|
|
6403
|
-
const { left: T, right: p, top:
|
|
6404
|
-
a.left = T, a.right = p, a.top =
|
|
6403
|
+
const { left: T, right: p, top: m, bottom: L } = l.getBoundingClientRect();
|
|
6404
|
+
a.left = T, a.right = p, a.top = m, a.bottom = L;
|
|
6405
6405
|
}
|
|
6406
6406
|
const d = i * (this.draw.getHeight() + this.draw.getPageGap()) + this.container.getBoundingClientRect().top, u = n === ne.UP, R = s[0] + (c ? 0 : a.left), g = u ? r[1] + d : s[1] + d, { maskMargin: f } = this.options;
|
|
6407
6407
|
if (a.top += f[0], a.bottom -= f[2], !(R >= a.left && R <= a.right && g >= a.top && g <= a.bottom)) {
|
|
@@ -6591,7 +6591,7 @@ function dd(o, t) {
|
|
|
6591
6591
|
});
|
|
6592
6592
|
if (!R)
|
|
6593
6593
|
return;
|
|
6594
|
-
const { index: g, isDirectHit: f, isCheckbox: T, isRadio: p, isControl:
|
|
6594
|
+
const { index: g, isDirectHit: f, isCheckbox: T, isRadio: p, isControl: m, isImage: L, isLabel: I, isMacro: O, isTable: S, tdValueIndex: X, hitLineStartIndex: y } = R;
|
|
6595
6595
|
t.mouseDownStartPosition = {
|
|
6596
6596
|
...R,
|
|
6597
6597
|
index: S ? X : g,
|
|
@@ -6602,7 +6602,7 @@ function dd(o, t) {
|
|
|
6602
6602
|
const W = e.getElementList(), Y = s.getPositionList(), D = S ? X : g;
|
|
6603
6603
|
let E;
|
|
6604
6604
|
S ? E = e.getTd().value[X] : E = W[D];
|
|
6605
|
-
const x = S && e.getTd()?.value || W, b = S && e.getTd()?.positionList || Y, C = !!(f && L), F = !!(f && T), M = !!(f && p), U = !!(f &&
|
|
6605
|
+
const x = S && e.getTd()?.value || W, b = S && e.getTd()?.positionList || Y, C = !!(f && L), F = !!(f && T), M = !!(f && p), U = !!(f && I), N = !!(f && O), w = (Q) => Q && (Q.type === P.MACRO || Q.type === P.CUSTOM_MACRO || Q.type === P.REUSABLE_ITEM || Q.type === P.SUB_TEMPLATE || Q.type === P.MENSTRUAL_HISTORY || Q.type === P.FETAL_HEART_POSITION || Q.type === P.TOOTH_POSITION || Q.type === P.LIST || Q.type === P.SPECIAL_SYMBOLS), K = (Q) => Q && !!Q.originControlId && !!Q.controlId, H = (Q) => !!(Q && Q.originControlId && Q.controlId && (Q.controlComponent === h.POSTFIX || Q.controlComponent === h.POSTTEXTFIX || Q.controlComponent === h.POST_TEXT || Q.controlComponent === h.PLACEHOLDER)), Z = (Q) => !!(Q && Q.originControlId && Q.controlId && (Q.controlComponent === h.PREFIX || Q.controlComponent === h.PRE_TEXT || Q.controlComponent === h.PRETEXTFIX || Q.controlComponent === h.PRETEXTFIX_TEXT || Q.controlComponent === h.PLACEHOLDER)), et = (Q) => {
|
|
6606
6606
|
if (!Q)
|
|
6607
6607
|
return null;
|
|
6608
6608
|
const J = /* @__PURE__ */ new Set();
|
|
@@ -6741,7 +6741,7 @@ function dd(o, t) {
|
|
|
6741
6741
|
for (let pt = Q + 1; pt < x.length && at(J, x[pt]); pt++)
|
|
6742
6742
|
nt = pt;
|
|
6743
6743
|
return nt;
|
|
6744
|
-
}, Ht = Dt().some((Q) => ft(x[Q], Q)), yt = xt(), Et = Nt(), Ft = (Q) => (Q?.control?.type === V.TEXTFIELD || Q?.control?.type === V.TEXT) && (Q.controlComponent === h.POSTFIX || Q.controlComponent === h.POST_TEXT || Q.controlComponent === h.POSTTEXTFIX || Q.controlComponent === h.POSTTEXTFIX_TEXT), Yt = (Q) => Q?.type === P.CONTROL && (Q.controlComponent === h.POSTFIX || Q.controlComponent === h.POST_TEXT || Q.controlComponent === h.POSTTEXTFIX || Q.controlComponent === h.POSTTEXTFIX_TEXT), Ce = (Q) => Q?.type === P.CONTROL && (Q.controlComponent === h.PREFIX || Q.controlComponent === h.PRE_TEXT || Q.controlComponent === h.PRETEXTFIX || Q.controlComponent === h.PRETEXTFIX_TEXT), Xt = (Q, J) => !!(e.getMode() === v.EDIT && Q?.originControlId && Ft(Q) && J?.controlId === Q.originControlId && !J.originControlId && J.control?.type === V.TEXTFIELD && Ft(J)), it = (Q, J) => !!(e.getMode() === v.EDIT && Q?.originControlId && Ft(Q) && J?.controlId === Q.originControlId && !J.originControlId && J.control?.type === V.TEXTFIELD && J.controlComponent === h.VALUE), wt = (Q, J, nt) => !!(e.getMode() === v.EDIT && Q?.originControlId && nt?.originControlId === Q.originControlId && Q.controlId && nt.controlId && Q.controlId !== nt.controlId && Yt(Q) && Ce(nt) && Wt(x, J, Q.originControlId) === V.TEXTFIELD), Rt = Xt(E, q), qt = it(E, q), z = wt(E, D, q), st = wt(A, D - 1, E), Mt = !!(e.getMode() === v.EDIT &&
|
|
6744
|
+
}, Ht = Dt().some((Q) => ft(x[Q], Q)), yt = xt(), Et = Nt(), Ft = (Q) => (Q?.control?.type === V.TEXTFIELD || Q?.control?.type === V.TEXT) && (Q.controlComponent === h.POSTFIX || Q.controlComponent === h.POST_TEXT || Q.controlComponent === h.POSTTEXTFIX || Q.controlComponent === h.POSTTEXTFIX_TEXT), Yt = (Q) => Q?.type === P.CONTROL && (Q.controlComponent === h.POSTFIX || Q.controlComponent === h.POST_TEXT || Q.controlComponent === h.POSTTEXTFIX || Q.controlComponent === h.POSTTEXTFIX_TEXT), Ce = (Q) => Q?.type === P.CONTROL && (Q.controlComponent === h.PREFIX || Q.controlComponent === h.PRE_TEXT || Q.controlComponent === h.PRETEXTFIX || Q.controlComponent === h.PRETEXTFIX_TEXT), Xt = (Q, J) => !!(e.getMode() === v.EDIT && Q?.originControlId && Ft(Q) && J?.controlId === Q.originControlId && !J.originControlId && J.control?.type === V.TEXTFIELD && Ft(J)), it = (Q, J) => !!(e.getMode() === v.EDIT && Q?.originControlId && Ft(Q) && J?.controlId === Q.originControlId && !J.originControlId && J.control?.type === V.TEXTFIELD && J.controlComponent === h.VALUE), wt = (Q, J, nt) => !!(e.getMode() === v.EDIT && Q?.originControlId && nt?.originControlId === Q.originControlId && Q.controlId && nt.controlId && Q.controlId !== nt.controlId && Yt(Q) && Ce(nt) && Wt(x, J, Q.originControlId) === V.TEXTFIELD), Rt = Xt(E, q), qt = it(E, q), z = wt(E, D, q), st = wt(A, D - 1, E), Mt = !!(e.getMode() === v.EDIT && m && f && Ft(E) && !Rt && !qt && !z && A?.controlId === E.controlId && (A.originControlId || null) === (E.originControlId || null) && (A.controlComponent === h.VALUE || A.controlComponent === h.PLACEHOLDER)), rt = (Q, J, nt) => !!(j && H(Q) && Wt(x, J, Q?.originControlId) === nt && (nt === V.TEXTFIELD ? kt(x[J + 1], J + 1) : Se(x[J + 1], J + 1))), pe = (Q, J, nt) => !!(j && Z(Q) && Wt(x, J, Q?.originControlId) === nt && (nt === V.TEXTFIELD ? kt(x[J - 1], J - 1) : Se(x[J - 1], J - 1))), zt = rt(E, D, V.TEXTFIELD), ie = !!(j && re && kt(E, D) && rt(A, D - 1, V.TEXTFIELD) && o.offsetX <= re.coordinate.leftTop[0] + k), kn = !!(j && re && kt(E, D) && pe(q, D + 1, V.TEXTFIELD) && o.offsetX >= re.coordinate.rightTop[0] - k), Sn = !!(j && re && zt && o.offsetX > re.coordinate.rightTop[0]), xe = !!(j && re && Z(E) && Wt(x, D, E.originControlId) === V.TEXTFIELD && kt(A, D - 1) && o.offsetX < re.coordinate.leftTop[0]), Qe = kt(E, D) || zt || ie || kn || Sn || xe, Ea = rt(E, D, V.TEXT), qs = (Q) => {
|
|
6745
6745
|
const J = x[Q], nt = Y[Q];
|
|
6746
6746
|
if (!nt || !Se(J, Q))
|
|
6747
6747
|
return -1;
|
|
@@ -7039,18 +7039,18 @@ function ud(o, t) {
|
|
|
7039
7039
|
return;
|
|
7040
7040
|
}
|
|
7041
7041
|
}
|
|
7042
|
-
const
|
|
7042
|
+
const m = e.getControl(), L = e.getElementList(), I = !p || !!L[u.startIndex].controlId || !m.getIsElementListContainFullControl(T), O = e.getOptions(), S = T.map((G) => {
|
|
7043
7043
|
if (!G.type || G.type === P.TEXT) {
|
|
7044
7044
|
const $ = {
|
|
7045
7045
|
value: G.value
|
|
7046
7046
|
}, B = _e;
|
|
7047
|
-
return
|
|
7047
|
+
return I || B.push(...ji), B.forEach((ut) => {
|
|
7048
7048
|
const Wt = G[ut];
|
|
7049
7049
|
Wt !== void 0 && ($[ut] = Wt);
|
|
7050
7050
|
}), $;
|
|
7051
7051
|
} else {
|
|
7052
7052
|
let $ = ht(G);
|
|
7053
|
-
return
|
|
7053
|
+
return I && ($ = Ve($, ji)), ae([$], {
|
|
7054
7054
|
isHandleFirstElement: !1,
|
|
7055
7055
|
editorOptions: O
|
|
7056
7056
|
}), $;
|
|
@@ -7061,7 +7061,7 @@ function ud(o, t) {
|
|
|
7061
7061
|
});
|
|
7062
7062
|
const X = a[g], y = c[g], W = _o(a[g]), Y = _o(a[f]), D = S.length;
|
|
7063
7063
|
let E = u.startIndex, x = E + D;
|
|
7064
|
-
const b =
|
|
7064
|
+
const b = m.getActiveControl();
|
|
7065
7065
|
if (b && a[E].controlComponent !== h.POSTFIX ? (x = b.setValue(S), E = x - D) : e.spliceElementList(L, E + 1, 0, S), !~x) {
|
|
7066
7066
|
e.render({
|
|
7067
7067
|
isSetCursor: !1
|
|
@@ -7074,7 +7074,7 @@ function ud(o, t) {
|
|
|
7074
7074
|
...l,
|
|
7075
7075
|
startIndex: M,
|
|
7076
7076
|
endIndex: U
|
|
7077
|
-
}),
|
|
7077
|
+
}), m.getActiveControl()?.cut();
|
|
7078
7078
|
else {
|
|
7079
7079
|
let G = !0;
|
|
7080
7080
|
if (d?.isTable) {
|
|
@@ -7098,7 +7098,7 @@ function ud(o, t) {
|
|
|
7098
7098
|
}
|
|
7099
7099
|
if (e.render({
|
|
7100
7100
|
isSetCursor: !1
|
|
7101
|
-
}), b ?
|
|
7101
|
+
}), b ? m.emitControlContentChange() : X.controlId && m.emitControlContentChange({
|
|
7102
7102
|
context: {
|
|
7103
7103
|
range: l,
|
|
7104
7104
|
elementList: a
|
|
@@ -7181,13 +7181,13 @@ function hd(o, t) {
|
|
|
7181
7181
|
});
|
|
7182
7182
|
if (!~R.index)
|
|
7183
7183
|
return;
|
|
7184
|
-
const { index: g, isTable: f, tdValueIndex: T, tdIndex: p, trIndex:
|
|
7184
|
+
const { index: g, isTable: f, tdValueIndex: T, tdIndex: p, trIndex: m, tableId: L, trId: I, tdId: O } = R;
|
|
7185
7185
|
let S = f ? T : g;
|
|
7186
7186
|
if (R.isControl && e.getMode() !== v.READONLY) {
|
|
7187
7187
|
const { newIndex: F } = n.moveCursor({
|
|
7188
7188
|
index: g,
|
|
7189
7189
|
isTable: f,
|
|
7190
|
-
trIndex:
|
|
7190
|
+
trIndex: m,
|
|
7191
7191
|
tdIndex: p,
|
|
7192
7192
|
tdValueIndex: T
|
|
7193
7193
|
});
|
|
@@ -7228,14 +7228,14 @@ function hd(o, t) {
|
|
|
7228
7228
|
}
|
|
7229
7229
|
}
|
|
7230
7230
|
if (f && y && O !== Y && !C)
|
|
7231
|
-
b.setRange(x, x, L, W, p, D,
|
|
7231
|
+
b.setRange(x, x, L, W, p, D, m), u.setPositionContext({
|
|
7232
7232
|
// isTable,
|
|
7233
7233
|
isTable: !!f,
|
|
7234
7234
|
index: g,
|
|
7235
|
-
trIndex:
|
|
7235
|
+
trIndex: m,
|
|
7236
7236
|
tdIndex: p,
|
|
7237
7237
|
tdId: O,
|
|
7238
|
-
trId:
|
|
7238
|
+
trId: I,
|
|
7239
7239
|
tableId: L
|
|
7240
7240
|
});
|
|
7241
7241
|
else {
|
|
@@ -7245,10 +7245,10 @@ function hd(o, t) {
|
|
|
7245
7245
|
u.setPositionContext({
|
|
7246
7246
|
isTable: !!f,
|
|
7247
7247
|
index: g,
|
|
7248
|
-
trIndex:
|
|
7248
|
+
trIndex: m,
|
|
7249
7249
|
tdIndex: p,
|
|
7250
7250
|
tdId: O,
|
|
7251
|
-
trId:
|
|
7251
|
+
trId: I,
|
|
7252
7252
|
tableId: L
|
|
7253
7253
|
});
|
|
7254
7254
|
let M = X, U, N;
|
|
@@ -7442,8 +7442,8 @@ function pd(o, t) {
|
|
|
7442
7442
|
return;
|
|
7443
7443
|
}
|
|
7444
7444
|
}
|
|
7445
|
-
const T = e.getPosition().getPositionList(), p = T[r],
|
|
7446
|
-
if (X &&
|
|
7445
|
+
const T = e.getPosition().getPositionList(), p = T[r], m = T[r - 1], L = p && m && p.rowIndex === m.rowIndex, I = u?.controlComponent === h.PREFIX || u?.controlComponent === h.PRETEXTFIX || u?.controlComponent === h.PRE_TEXT || u?.controlComponent === h.PRETEXTFIX_TEXT, O = u?.controlComponent === h.POSTFIX || u?.controlComponent === h.POSTTEXTFIX || u?.controlComponent === h.POSTTEXTFIX_TEXT || u?.controlComponent === h.POST_TEXT, S = !!u?.controlId, X = R?.controlComponent === h.PLACEHOLDER, y = R?.controlComponent === h.POSTFIX || R?.controlComponent === h.POSTTEXTFIX || R?.controlComponent === h.POSTTEXTFIX_TEXT || R?.controlComponent === h.POST_TEXT, W = R?.control?.type === V.TEXT && (R.controlComponent === h.PREFIX || R.controlComponent === h.PRE_TEXT), Y = y && u?.controlId === R?.controlId && u?.originControlId === R?.originControlId && u?.controlComponent === h.VALUE, D = !!R && !R.controlId && !R.control;
|
|
7446
|
+
if (X && I && S && L)
|
|
7447
7447
|
return;
|
|
7448
7448
|
const { isInParent: E, parentControlId: x } = Td(c, r, u);
|
|
7449
7449
|
if (O && S && L && E && !(R?.controlId === x && !R?.originControlId && (R?.controlComponent === h.VALUE || R?.controlComponent === h.PLACEHOLDER))) {
|
|
@@ -7578,17 +7578,17 @@ function pd(o, t) {
|
|
|
7578
7578
|
if (g && T.rowFlex && T.value === _) {
|
|
7579
7579
|
const L = n.getRangeRowElementList();
|
|
7580
7580
|
if (L) {
|
|
7581
|
-
const
|
|
7581
|
+
const I = f[r - 1];
|
|
7582
7582
|
L.forEach((O) => {
|
|
7583
|
-
O.rowFlex =
|
|
7583
|
+
O.rowFlex = I?.rowFlex;
|
|
7584
7584
|
});
|
|
7585
7585
|
}
|
|
7586
7586
|
}
|
|
7587
|
-
const p = T.value === _ ? f[r - 1] : T,
|
|
7588
|
-
if (p?.titleId &&
|
|
7589
|
-
const L = p.titleId,
|
|
7587
|
+
const p = T.value === _ ? f[r - 1] : T, m = f[s + 1];
|
|
7588
|
+
if (p?.titleId && m?.titleId && p.level === m.level && p.titleId !== m.titleId) {
|
|
7589
|
+
const L = p.titleId, I = m.titleId;
|
|
7590
7590
|
let O = s + 1;
|
|
7591
|
-
for (; O < f.length && f[O]?.titleId ===
|
|
7591
|
+
for (; O < f.length && f[O]?.titleId === I; )
|
|
7592
7592
|
f[O].titleId = L, O++;
|
|
7593
7593
|
}
|
|
7594
7594
|
g ? e.spliceElementList(f, R, 1) : e.spliceElementList(f, r + 1, s - r), a = g ? R - 1 : r;
|
|
@@ -7682,9 +7682,9 @@ function md(o, t) {
|
|
|
7682
7682
|
else {
|
|
7683
7683
|
let p = !0;
|
|
7684
7684
|
if (f.isTable) {
|
|
7685
|
-
const
|
|
7686
|
-
if (
|
|
7687
|
-
const L = e.getTdById(
|
|
7685
|
+
const m = e.getTd();
|
|
7686
|
+
if (m?.linkTdNextId) {
|
|
7687
|
+
const L = e.getTdById(m.linkTdNextId);
|
|
7688
7688
|
L && (p = !1, e.spliceElementList(L.value, 1, 1));
|
|
7689
7689
|
}
|
|
7690
7690
|
}
|
|
@@ -7722,8 +7722,8 @@ function Ld(o, t) {
|
|
|
7722
7722
|
}), o.shiftKey && c.areaId && c.areaId !== l[r + 1]?.areaId && (d = Ve(d, Xn)), !(l[i + 1]?.titleId && (!a.titleId || a.titleId !== l[i + 1]?.titleId)) && !(c.titleId && c.titleId !== l[r + 1]?.titleId)) {
|
|
7723
7723
|
const p = n.getRangeAnchorStyle(l, r);
|
|
7724
7724
|
if (p) {
|
|
7725
|
-
const
|
|
7726
|
-
!L && !
|
|
7725
|
+
const m = [...Oe], L = p.controlComponent === h.POSTFIX || p.controlComponent === h.POSTTEXTFIX || p.controlComponent === h.POSTTEXTFIX_TEXT || p.controlComponent === h.POST_TEXT, I = p.control?.type === V.BUTTON && !p.control?.buttonText;
|
|
7726
|
+
!L && !I && m.push(..._e), m.forEach((O) => {
|
|
7727
7727
|
const S = p[O];
|
|
7728
7728
|
S !== void 0 && (d[O] = S);
|
|
7729
7729
|
});
|
|
@@ -7734,23 +7734,23 @@ function Ld(o, t) {
|
|
|
7734
7734
|
const f = R?.getElement();
|
|
7735
7735
|
if (f?.control?.type === V.BUTTON && !f.control?.buttonText && f?.controlId) {
|
|
7736
7736
|
const p = f.controlId;
|
|
7737
|
-
let
|
|
7738
|
-
for (;
|
|
7739
|
-
|
|
7740
|
-
e.spliceElementList(l,
|
|
7737
|
+
let m = r;
|
|
7738
|
+
for (; m + 1 < l.length && l[m + 1]?.controlId === p; )
|
|
7739
|
+
m++;
|
|
7740
|
+
e.spliceElementList(l, m + 1, 0, [d]), g = m + 1;
|
|
7741
7741
|
} else if (R && u.getIsRangeWithinControl())
|
|
7742
7742
|
g = u.setValue([d]), u.emitControlContentChange();
|
|
7743
7743
|
else {
|
|
7744
|
-
const
|
|
7745
|
-
if (!
|
|
7744
|
+
const m = e.getPosition().getCursorPosition();
|
|
7745
|
+
if (!m)
|
|
7746
7746
|
return;
|
|
7747
|
-
const { index: L } =
|
|
7747
|
+
const { index: L } = m;
|
|
7748
7748
|
if (s) {
|
|
7749
7749
|
if (e.spliceElementList(l, L + 1, 0, [d]), c.titleId && l[L + 2]?.titleId === c.titleId) {
|
|
7750
|
-
const
|
|
7750
|
+
const I = mt();
|
|
7751
7751
|
let O = L + 2;
|
|
7752
7752
|
for (; O < l.length && l[O]?.titleId === c.titleId; )
|
|
7753
|
-
l[O].titleId =
|
|
7753
|
+
l[O].titleId = I, O++;
|
|
7754
7754
|
}
|
|
7755
7755
|
} else
|
|
7756
7756
|
e.spliceElementList(l, i + 1, r - i, [d]);
|
|
@@ -7771,9 +7771,9 @@ function Pd(o, t) {
|
|
|
7771
7771
|
const s = i.getPositionContext(), { index: l } = r;
|
|
7772
7772
|
if (l <= 0 && !s.isTable)
|
|
7773
7773
|
return;
|
|
7774
|
-
const a = e.getRange(), { startIndex: c, endIndex: d } = a.getRange(), u = a.getIsCollapsed(), R = e.getElementList(), g = e.getControl(), f = e.getMode() === v.FORM, T = g.getActiveControl()?.getElement()?.control?.type, p = f && T === V.TEXT,
|
|
7774
|
+
const a = e.getRange(), { startIndex: c, endIndex: d } = a.getRange(), u = a.getIsCollapsed(), R = e.getElementList(), g = e.getControl(), f = e.getMode() === v.FORM, T = g.getActiveControl()?.getElement()?.control?.type, p = f && T === V.TEXT, m = f && !p ? g.getActiveTextControlLimit() : null, L = R[l], I = L?.controlComponent === h.PREFIX || L?.controlComponent === h.PRETEXTFIX || L?.controlComponent === h.PRE_TEXT;
|
|
7775
7775
|
let O = !1;
|
|
7776
|
-
if (
|
|
7776
|
+
if (I && L?.originControlId) {
|
|
7777
7777
|
const E = L.originControlId;
|
|
7778
7778
|
for (let x = l - 1; x >= 0; x--) {
|
|
7779
7779
|
const b = R[x];
|
|
@@ -7785,7 +7785,7 @@ function Pd(o, t) {
|
|
|
7785
7785
|
break;
|
|
7786
7786
|
}
|
|
7787
7787
|
}
|
|
7788
|
-
if (f && !p && g.getActiveControl() &&
|
|
7788
|
+
if (f && !p && g.getActiveControl() && I && !m && !O) {
|
|
7789
7789
|
g.initNextControl({
|
|
7790
7790
|
direction: ne.UP
|
|
7791
7791
|
});
|
|
@@ -7829,7 +7829,7 @@ function Pd(o, t) {
|
|
|
7829
7829
|
}
|
|
7830
7830
|
}
|
|
7831
7831
|
}
|
|
7832
|
-
const X =
|
|
7832
|
+
const X = m ? Math.max(c - S, m.startIndex) : c - S;
|
|
7833
7833
|
let y = X, W = X;
|
|
7834
7834
|
if (o.shiftKey && r && (c !== d ? c === r.index ? (y = c, W = d - S) : (y = X, W = d) : W = d), !o.shiftKey) {
|
|
7835
7835
|
const E = R[c];
|
|
@@ -7917,10 +7917,10 @@ function Od(o, t) {
|
|
|
7917
7917
|
return;
|
|
7918
7918
|
const c = e.getRange(), { startIndex: d, endIndex: u } = c.getRange(), R = c.getIsCollapsed();
|
|
7919
7919
|
let g = e.getElementList();
|
|
7920
|
-
const f = e.getControl(), T = e.getMode() === v.FORM, p = f.getActiveControl()?.getElement()?.control?.type,
|
|
7920
|
+
const f = e.getControl(), T = e.getMode() === v.FORM, p = f.getActiveControl()?.getElement()?.control?.type, m = T && p === V.TEXT, L = T && !m ? f.getActiveTextControlLimit() : null, I = g[s], O = I?.controlComponent === h.POSTFIX || I?.controlComponent === h.POSTTEXTFIX || I?.controlComponent === h.POST_TEXT;
|
|
7921
7921
|
let S = !1;
|
|
7922
|
-
if (O &&
|
|
7923
|
-
const b =
|
|
7922
|
+
if (O && I?.originControlId) {
|
|
7923
|
+
const b = I.originControlId;
|
|
7924
7924
|
for (let C = s + 1; C < g.length; C++) {
|
|
7925
7925
|
const F = g[C];
|
|
7926
7926
|
if (F.controlId === b && !F.originControlId) {
|
|
@@ -7931,7 +7931,7 @@ function Od(o, t) {
|
|
|
7931
7931
|
break;
|
|
7932
7932
|
}
|
|
7933
7933
|
}
|
|
7934
|
-
if (T && !
|
|
7934
|
+
if (T && !m && f.getActiveControl() && O && !L && !S) {
|
|
7935
7935
|
f.initNextControl({
|
|
7936
7936
|
direction: ne.DOWN
|
|
7937
7937
|
});
|
|
@@ -7950,7 +7950,7 @@ function Od(o, t) {
|
|
|
7950
7950
|
}
|
|
7951
7951
|
}
|
|
7952
7952
|
}
|
|
7953
|
-
if (T && !
|
|
7953
|
+
if (T && !m) {
|
|
7954
7954
|
const b = g[u], C = b?.controlId;
|
|
7955
7955
|
if (C && b?.controlComponent === h.VALUE) {
|
|
7956
7956
|
let F = !1;
|
|
@@ -8064,14 +8064,14 @@ function Md(o, t) {
|
|
|
8064
8064
|
});
|
|
8065
8065
|
else {
|
|
8066
8066
|
o.preventDefault();
|
|
8067
|
-
const T = s.getRangeAnchorStyle(l, c),
|
|
8067
|
+
const T = s.getRangeAnchorStyle(l, c), m = {
|
|
8068
8068
|
...T ? Re(T, _e) : null,
|
|
8069
8069
|
type: P.TAB,
|
|
8070
8070
|
value: ""
|
|
8071
8071
|
};
|
|
8072
|
-
ge(l, [
|
|
8072
|
+
ge(l, [m], a, {
|
|
8073
8073
|
editorOptions: e.getOptions()
|
|
8074
|
-
}), e.insertElementList([
|
|
8074
|
+
}), e.insertElementList([m]);
|
|
8075
8075
|
}
|
|
8076
8076
|
}
|
|
8077
8077
|
function wi(o) {
|
|
@@ -8121,21 +8121,21 @@ function Sd(o, t) {
|
|
|
8121
8121
|
let u = -1, R = -1;
|
|
8122
8122
|
const g = i.getPositionContext();
|
|
8123
8123
|
if (!o.shiftKey && g.isTable && (d && r.rowIndex === 0 || !d && r.rowIndex === e.getRowCount() - 1)) {
|
|
8124
|
-
const { index: T, trIndex: p, tdIndex:
|
|
8124
|
+
const { index: T, trIndex: p, tdIndex: m, tableId: L } = g;
|
|
8125
8125
|
if (d) {
|
|
8126
|
-
const
|
|
8126
|
+
const I = e.getOriginalElementList();
|
|
8127
8127
|
if (p === 0)
|
|
8128
|
-
if (
|
|
8129
|
-
const S = T - 1, X =
|
|
8128
|
+
if (I[T].originalId) {
|
|
8129
|
+
const S = T - 1, X = I[S];
|
|
8130
8130
|
for (let y = X.trList.length - 1; y >= 0; y--) {
|
|
8131
|
-
const W = X.trList[y].tdList.find((Y) => Y.tdIndex ===
|
|
8131
|
+
const W = X.trList[y].tdList.find((Y) => Y.tdIndex === m);
|
|
8132
8132
|
if (W?.value.length) {
|
|
8133
8133
|
i.setPositionContext({
|
|
8134
8134
|
isTable: !0,
|
|
8135
8135
|
tableId: X.id,
|
|
8136
8136
|
index: S,
|
|
8137
8137
|
trIndex: y,
|
|
8138
|
-
tdIndex:
|
|
8138
|
+
tdIndex: m
|
|
8139
8139
|
}), u = W.value.length - 1, R = W.value.length - 1;
|
|
8140
8140
|
break;
|
|
8141
8141
|
}
|
|
@@ -8146,7 +8146,7 @@ function Sd(o, t) {
|
|
|
8146
8146
|
}), u = T - 1, R = u, e.getTableTool().dispose();
|
|
8147
8147
|
else {
|
|
8148
8148
|
let O = -1, S = -1;
|
|
8149
|
-
const X =
|
|
8149
|
+
const X = I[T].trList, y = X[p].tdList[m].colIndex;
|
|
8150
8150
|
t: for (let D = p - 1; D >= 0; D--) {
|
|
8151
8151
|
const x = X[D].tdList;
|
|
8152
8152
|
for (let b = 0; b < x.length; b++) {
|
|
@@ -8171,11 +8171,11 @@ function Sd(o, t) {
|
|
|
8171
8171
|
}), u = Y.value.length - 1, R = u;
|
|
8172
8172
|
}
|
|
8173
8173
|
} else {
|
|
8174
|
-
const
|
|
8174
|
+
const I = e.getOriginalElementList(), O = I[T], S = O.trList;
|
|
8175
8175
|
if (p === S.length - 1) {
|
|
8176
|
-
const X = T + 1, y =
|
|
8176
|
+
const X = T + 1, y = I[X];
|
|
8177
8177
|
if (y && [O.id, O.originalId].includes(y.originalId)) {
|
|
8178
|
-
for (let Y =
|
|
8178
|
+
for (let Y = m; Y >= 0; Y--)
|
|
8179
8179
|
if (y.trList[0].tdList[Y].value.length) {
|
|
8180
8180
|
i.setPositionContext({
|
|
8181
8181
|
isTable: !0,
|
|
@@ -8192,7 +8192,7 @@ function Sd(o, t) {
|
|
|
8192
8192
|
}), u = T, R = u, e.getTableTool().dispose();
|
|
8193
8193
|
} else {
|
|
8194
8194
|
let X = -1, y = -1;
|
|
8195
|
-
const W = S[p].tdList[
|
|
8195
|
+
const W = S[p].tdList[m].colIndex;
|
|
8196
8196
|
t: for (let E = p + 1; E < S.length; E++) {
|
|
8197
8197
|
const b = S[E].tdList;
|
|
8198
8198
|
for (let C = 0; C < b.length; C++) {
|
|
@@ -8220,15 +8220,15 @@ function Sd(o, t) {
|
|
|
8220
8220
|
} else {
|
|
8221
8221
|
let T = r;
|
|
8222
8222
|
o.shiftKey && (l === r.index ? T = c[a] : T = c[l]);
|
|
8223
|
-
const { index: p, rowNo:
|
|
8223
|
+
const { index: p, rowNo: m, rowIndex: L, coordinate: { rightTop: [I] } } = T;
|
|
8224
8224
|
if (d && L === 0 || !d && L === e.getRowCount() - 1)
|
|
8225
8225
|
return;
|
|
8226
8226
|
const O = wi({
|
|
8227
8227
|
positionList: c,
|
|
8228
8228
|
index: p,
|
|
8229
|
-
rowNo:
|
|
8229
|
+
rowNo: m,
|
|
8230
8230
|
isUp: d,
|
|
8231
|
-
cursorX:
|
|
8231
|
+
cursorX: I
|
|
8232
8232
|
});
|
|
8233
8233
|
if (O < 0)
|
|
8234
8234
|
return;
|
|
@@ -8242,13 +8242,13 @@ function Sd(o, t) {
|
|
|
8242
8242
|
const F = Y[b].tdList;
|
|
8243
8243
|
for (let M = 0; M < F.length; M++) {
|
|
8244
8244
|
const U = F[M], N = U.x * y + W[3], w = U.width * y;
|
|
8245
|
-
if (
|
|
8245
|
+
if (I >= N && I <= N + w) {
|
|
8246
8246
|
const K = U.positionList, H = K[K.length - 1], Z = wi({
|
|
8247
8247
|
positionList: K,
|
|
8248
8248
|
index: H.index + 1,
|
|
8249
8249
|
rowNo: H.rowNo - 1,
|
|
8250
8250
|
isUp: d,
|
|
8251
|
-
cursorX:
|
|
8251
|
+
cursorX: I
|
|
8252
8252
|
}) || H.index;
|
|
8253
8253
|
D = b, E = M, x = Z;
|
|
8254
8254
|
break t;
|
|
@@ -8260,13 +8260,13 @@ function Sd(o, t) {
|
|
|
8260
8260
|
const F = Y[b].tdList;
|
|
8261
8261
|
for (let M = 0; M < F.length; M++) {
|
|
8262
8262
|
const U = F[M], N = U.x * y + W[3], w = U.width * y;
|
|
8263
|
-
if (
|
|
8263
|
+
if (I >= N && I <= N + w) {
|
|
8264
8264
|
const K = U.positionList, H = wi({
|
|
8265
8265
|
positionList: K,
|
|
8266
8266
|
index: -1,
|
|
8267
8267
|
rowNo: -1,
|
|
8268
8268
|
isUp: d,
|
|
8269
|
-
cursorX:
|
|
8269
|
+
cursorX: I
|
|
8270
8270
|
}) || 0;
|
|
8271
8271
|
D = b, E = M, x = H;
|
|
8272
8272
|
break t;
|
|
@@ -8323,7 +8323,7 @@ function Xd(o, t) {
|
|
|
8323
8323
|
const r = i.getActiveControl();
|
|
8324
8324
|
if (r?.getElement()?.control?.type !== V.DATE || !i.getIsRangeWithinControl())
|
|
8325
8325
|
return !1;
|
|
8326
|
-
const { startIndex: s, endIndex: l } = n.getRange(), a = e.getElementList(), c = a[s], d = a[l], u = r.getElement(), R = (
|
|
8326
|
+
const { startIndex: s, endIndex: l } = n.getRange(), a = e.getElementList(), c = a[s], d = a[l], u = r.getElement(), R = (m) => !!m?.controlId && m.controlId === u.controlId && (m.originControlId || null) === (u.originControlId || null), g = d?.controlComponent === h.POSTFIX || d?.controlComponent === h.POST_TEXT || d?.controlComponent === h.POSTTEXTFIX || d?.controlComponent === h.POSTTEXTFIX_TEXT, f = a[l + 1], T = !!(d?.originControlId && d.controlComponent === h.VALUE && R(f) && (f.controlComponent === h.POSTFIX || f.controlComponent === h.POST_TEXT || f.controlComponent === h.POSTTEXTFIX || f.controlComponent === h.POSTTEXTFIX_TEXT));
|
|
8327
8327
|
return !R(c) || !R(d) || g || T ? !1 : (o.preventDefault(), r.awake?.(), !0);
|
|
8328
8328
|
}
|
|
8329
8329
|
function Cd(o, t) {
|
|
@@ -8459,13 +8459,13 @@ function us(o, t, e = "input") {
|
|
|
8459
8459
|
}
|
|
8460
8460
|
}, p = () => {
|
|
8461
8461
|
T(() => r.initControl());
|
|
8462
|
-
},
|
|
8462
|
+
}, m = (Xt, it) => {
|
|
8463
8463
|
T(() => {
|
|
8464
8464
|
f.setRange(Xt, it);
|
|
8465
8465
|
});
|
|
8466
8466
|
};
|
|
8467
8467
|
let L = r.getActiveControl();
|
|
8468
|
-
const
|
|
8468
|
+
const I = i.getElementList()[f.getRange().endIndex], O = I?.control?.type === V.TEXT && !!I?.originControlId && (I.controlComponent === h.PREFIX || I.controlComponent === h.PRE_TEXT || I.controlComponent === h.PRETEXTFIX || I.controlComponent === h.PRETEXTFIX_TEXT || I.controlComponent === h.POSTFIX || I.controlComponent === h.POST_TEXT || I.controlComponent === h.POSTTEXTFIX || I.controlComponent === h.POSTTEXTFIX_TEXT || I.controlComponent === h.PLACEHOLDER);
|
|
8469
8469
|
if (!L && (r.getIsRangeWithinControl() || O) && (p(), L = r.getActiveControl()), L) {
|
|
8470
8470
|
const Xt = L.getElement(), it = i.getElementList()[f.getRange().endIndex], wt = Xt?.controlId === it?.controlId && (Xt?.originControlId || null) === (it?.originControlId || null), Rt = !!it && it.controlComponent === h.VALUE && !!it.controlId && !it.originControlId && f.getRange().endIndex > 0 && i.getElementList()[f.getRange().endIndex - 1]?.originControlId === it.controlId;
|
|
8471
8471
|
(!wt || Rt) && (p(), L = r.getActiveControl());
|
|
@@ -8741,7 +8741,7 @@ function us(o, t, e = "input") {
|
|
|
8741
8741
|
}), i.spliceElementList(x, z + 1, 0, yt), Et = z + yt.length;
|
|
8742
8742
|
} else if (qt) {
|
|
8743
8743
|
const { parentControlId: z, activationIndex: st, boundaryRange: Mt } = qt;
|
|
8744
|
-
|
|
8744
|
+
m(st, st), p();
|
|
8745
8745
|
const rt = r.getActiveControl(), pe = Yt?.controlId === z && !Yt?.originControlId && Yt?.controlComponent === h.VALUE ? d + 1 : -1, zt = !!(Ft?.originControlId && To(Ft) && pe !== -1), ie = Mt || (zt ? {
|
|
8746
8746
|
startIndex: d,
|
|
8747
8747
|
endIndex: d
|
|
@@ -8752,12 +8752,12 @@ function us(o, t, e = "input") {
|
|
|
8752
8752
|
startIndex: K,
|
|
8753
8753
|
endIndex: H
|
|
8754
8754
|
});
|
|
8755
|
-
|
|
8755
|
+
m(ie.startIndex, ie.endIndex), rt && rt.getElement()?.controlId === z && (rt.getElement()?.control?.type === V.TEXT || rt.getElement()?.control?.type === V.TEXTFIELD) ? (yt.forEach((kn) => {
|
|
8756
8756
|
Qi(kn, z, rt.getElement().control, s.defaultColor);
|
|
8757
8757
|
}), Et = rt.setValue(yt, {
|
|
8758
8758
|
range: ie,
|
|
8759
8759
|
elementList: x
|
|
8760
|
-
}), r.emitControlContentChange(),
|
|
8760
|
+
}), r.emitControlContentChange(), m(Et, Et), p()) : Nt ? Et = Xt(wt) : (Et = r.setValue(yt), r.emitControlContentChange());
|
|
8761
8761
|
} else if (Nt)
|
|
8762
8762
|
Et = Xt(wt);
|
|
8763
8763
|
else if (Ft?.originControlId && (Ft.controlComponent === h.POSTFIX || Ft.controlComponent === h.POST_TEXT || Ft.controlComponent === h.POSTTEXTFIX || Ft.controlComponent === h.POSTTEXTFIX_TEXT))
|
|
@@ -8803,14 +8803,14 @@ function us(o, t, e = "input") {
|
|
|
8803
8803
|
startIndex: d,
|
|
8804
8804
|
endIndex: d
|
|
8805
8805
|
}, kn = pe();
|
|
8806
|
-
|
|
8806
|
+
m(kn, kn), p();
|
|
8807
8807
|
const Sn = r.getActiveControl();
|
|
8808
|
-
|
|
8808
|
+
m(ie.startIndex, ie.endIndex), Sn && Sn.getElement()?.controlId === st && (Sn.getElement()?.control?.type === V.TEXT || Sn.getElement()?.control?.type === V.TEXTFIELD) ? (yt.forEach((xe) => {
|
|
8809
8809
|
Qi(xe, st, Sn.getElement().control, s.defaultColor);
|
|
8810
8810
|
}), Et = Sn.setValue(yt, {
|
|
8811
8811
|
range: ie,
|
|
8812
8812
|
elementList: x
|
|
8813
|
-
}), r.emitControlContentChange(),
|
|
8813
|
+
}), r.emitControlContentChange(), m(Et, Et), p()) : Et = Xt(it);
|
|
8814
8814
|
} else
|
|
8815
8815
|
Et = Xt(it);
|
|
8816
8816
|
}
|
|
@@ -8876,13 +8876,13 @@ async function Wd(o) {
|
|
|
8876
8876
|
if (n === i) {
|
|
8877
8877
|
const R = t.getPosition().getPositionList(), g = R[n], f = g.rowNo, T = g.pageNo, p = [];
|
|
8878
8878
|
for (let L = 0; L < R.length; L++) {
|
|
8879
|
-
const
|
|
8880
|
-
if (
|
|
8879
|
+
const I = R[L];
|
|
8880
|
+
if (I.pageNo > T)
|
|
8881
8881
|
break;
|
|
8882
|
-
|
|
8882
|
+
I.pageNo === T && I.rowNo === f && p.push(L);
|
|
8883
8883
|
}
|
|
8884
|
-
const
|
|
8885
|
-
s =
|
|
8884
|
+
const m = p[0] - 1;
|
|
8885
|
+
s = m < 0 ? 0 : m, l = p[p.length - 1];
|
|
8886
8886
|
}
|
|
8887
8887
|
const a = t.getOptions();
|
|
8888
8888
|
await Ol(r.slice(s + 1, l + 1), a);
|
|
@@ -8915,14 +8915,14 @@ async function Yd(o, t) {
|
|
|
8915
8915
|
for (let p = g; p <= T; p++)
|
|
8916
8916
|
u.colgroup.push(c.colgroup[p]);
|
|
8917
8917
|
for (let p = 0; p < d.length; p++) {
|
|
8918
|
-
const
|
|
8918
|
+
const m = d[p], L = c.trList[m[0].rowIndex], I = {
|
|
8919
8919
|
tdList: [],
|
|
8920
8920
|
height: L.height,
|
|
8921
8921
|
minHeight: L.minHeight
|
|
8922
8922
|
};
|
|
8923
|
-
for (let O = 0; O <
|
|
8924
|
-
|
|
8925
|
-
u.trList.push(
|
|
8923
|
+
for (let O = 0; O < m.length; O++)
|
|
8924
|
+
I.tdList.push(m[O]);
|
|
8925
|
+
u.trList.push(I);
|
|
8926
8926
|
}
|
|
8927
8927
|
l = n ? [u] : vt([u]);
|
|
8928
8928
|
} else
|
|
@@ -9152,7 +9152,7 @@ function Ad(o, t) {
|
|
|
9152
9152
|
return;
|
|
9153
9153
|
o.preventDefault();
|
|
9154
9154
|
const i = e.getPageContainer();
|
|
9155
|
-
if (!jr(o.target, (
|
|
9155
|
+
if (!jr(o.target, (I) => I === i))
|
|
9156
9156
|
return;
|
|
9157
9157
|
const l = o.target.dataset.index;
|
|
9158
9158
|
l && e.setPageNo(Number(l));
|
|
@@ -9164,14 +9164,14 @@ function Ad(o, t) {
|
|
|
9164
9164
|
return;
|
|
9165
9165
|
const { isTable: d, tdValueIndex: u, index: R } = c, g = a.getPositionList(), f = d ? u : R;
|
|
9166
9166
|
~R && (e.getRange().setRange(f, f), a.setCursorPosition(g[f]));
|
|
9167
|
-
const T = e.getCursor(), { cursor: { dragColor: p, dragWidth:
|
|
9167
|
+
const T = e.getCursor(), { cursor: { dragColor: p, dragWidth: m, dragFloatImageDisabled: L } } = e.getOptions();
|
|
9168
9168
|
if (L) {
|
|
9169
|
-
const
|
|
9170
|
-
if (
|
|
9169
|
+
const I = t.cacheElementList?.[t.cacheRange.startIndex];
|
|
9170
|
+
if (I?.type === P.IMAGE && (I.imgDisplay === Pt.FLOAT_TOP || I.imgDisplay === Pt.FLOAT_BOTTOM || I.imgDisplay === Pt.SURROUND))
|
|
9171
9171
|
return;
|
|
9172
9172
|
}
|
|
9173
9173
|
T.drawCursor({
|
|
9174
|
-
width:
|
|
9174
|
+
width: m,
|
|
9175
9175
|
color: p,
|
|
9176
9176
|
isBlink: !1,
|
|
9177
9177
|
isFocus: !1
|
|
@@ -9643,15 +9643,15 @@ class zd {
|
|
|
9643
9643
|
const { positionList: e, rowList: n, pageNo: i, startX: r, startY: s, startRowIndex: l, startIndex: a, innerWidth: c, zone: d } = t, { scale: u, table: { tdPadding: R } } = this.options;
|
|
9644
9644
|
let g = r, f = s, T = a;
|
|
9645
9645
|
for (let p = 0; p < n.length; p++) {
|
|
9646
|
-
const
|
|
9647
|
-
if (!
|
|
9648
|
-
const O =
|
|
9649
|
-
|
|
9650
|
-
}
|
|
9651
|
-
g +=
|
|
9652
|
-
const L = g,
|
|
9653
|
-
for (let O = 0; O <
|
|
9654
|
-
const S =
|
|
9646
|
+
const m = n[p];
|
|
9647
|
+
if (!m.isSurround) {
|
|
9648
|
+
const O = m.width + (m.offsetX || 0);
|
|
9649
|
+
m.rowFlex === At.CENTER ? g += (c - O) / 2 : m.rowFlex === At.RIGHT && (g += c - O);
|
|
9650
|
+
}
|
|
9651
|
+
g += m.offsetX || 0, f += m.offsetY || 0;
|
|
9652
|
+
const L = g, I = f;
|
|
9653
|
+
for (let O = 0; O < m.elementList.length; O++) {
|
|
9654
|
+
const S = m.elementList[O], X = S.metrics, y = !Ie(S) && (S.imgDisplay !== Pt.INLINE && S.type === P.IMAGE || S.type === P.LATEX) ? m.ascent - X.height : m.ascent;
|
|
9655
9655
|
S.left && (g += S.left), S.translateX && (g += S.translateX * u);
|
|
9656
9656
|
const W = {
|
|
9657
9657
|
pageNo: i,
|
|
@@ -9662,14 +9662,14 @@ class zd {
|
|
|
9662
9662
|
metrics: X,
|
|
9663
9663
|
left: S.left || 0,
|
|
9664
9664
|
ascent: y,
|
|
9665
|
-
lineHeight:
|
|
9665
|
+
lineHeight: m.height,
|
|
9666
9666
|
isFirstLetter: O === 0,
|
|
9667
|
-
isLastLetter: O ===
|
|
9667
|
+
isLastLetter: O === m.elementList.length - 1,
|
|
9668
9668
|
coordinate: {
|
|
9669
9669
|
leftTop: [g, f],
|
|
9670
|
-
leftBottom: [g, f +
|
|
9670
|
+
leftBottom: [g, f + m.height],
|
|
9671
9671
|
rightTop: [g + X.width, f],
|
|
9672
|
-
rightBottom: [g + X.width, f +
|
|
9672
|
+
rightBottom: [g + X.width, f + m.height]
|
|
9673
9673
|
}
|
|
9674
9674
|
};
|
|
9675
9675
|
if (S.imgDisplay === Pt.SURROUND || S.imgDisplay === Pt.FLOAT_TOP || S.imgDisplay === Pt.FLOAT_BOTTOM) {
|
|
@@ -9704,7 +9704,7 @@ class zd {
|
|
|
9704
9704
|
startRowIndex: 0,
|
|
9705
9705
|
startIndex: 0,
|
|
9706
9706
|
startX: (F.x + Y[3]) * u + L + (S.translateX || 0) * u,
|
|
9707
|
-
startY: (F.y + Y[0]) * u +
|
|
9707
|
+
startY: (F.y + Y[0]) * u + I,
|
|
9708
9708
|
innerWidth: (F.width - D) * u,
|
|
9709
9709
|
isTable: !0,
|
|
9710
9710
|
index: T - 1,
|
|
@@ -9722,10 +9722,10 @@ class zd {
|
|
|
9722
9722
|
g = U.x, f = U.y;
|
|
9723
9723
|
}
|
|
9724
9724
|
}
|
|
9725
|
-
g = L, f =
|
|
9725
|
+
g = L, f = I;
|
|
9726
9726
|
}
|
|
9727
9727
|
}
|
|
9728
|
-
g = r, f +=
|
|
9728
|
+
g = r, f += m.height;
|
|
9729
9729
|
}
|
|
9730
9730
|
return { x: g, y: f, index: T };
|
|
9731
9731
|
}
|
|
@@ -9830,9 +9830,9 @@ class zd {
|
|
|
9830
9830
|
return T;
|
|
9831
9831
|
}
|
|
9832
9832
|
for (let T = 0; T < s.length; T++) {
|
|
9833
|
-
const { index: p, pageNo:
|
|
9834
|
-
if (d ===
|
|
9835
|
-
if (
|
|
9833
|
+
const { index: p, pageNo: m, left: L, isFirstLetter: I, coordinate: { leftTop: O, rightTop: S, leftBottom: X } } = s[T];
|
|
9834
|
+
if (d === m) {
|
|
9835
|
+
if (m > d)
|
|
9836
9836
|
break;
|
|
9837
9837
|
if (O[0] - L <= e && S[0] >= e && O[1] <= n && X[1] >= n) {
|
|
9838
9838
|
let y = T;
|
|
@@ -9940,7 +9940,7 @@ class zd {
|
|
|
9940
9940
|
let Y;
|
|
9941
9941
|
if (r[p].value !== _) {
|
|
9942
9942
|
const D = S[0] - O[0];
|
|
9943
|
-
e < O[0] + D / 2 && (y = T - 1,
|
|
9943
|
+
e < O[0] + D / 2 && (y = T - 1, I && (Y = T));
|
|
9944
9944
|
}
|
|
9945
9945
|
return {
|
|
9946
9946
|
isDirectHit: !0,
|
|
@@ -9961,10 +9961,10 @@ class zd {
|
|
|
9961
9961
|
}
|
|
9962
9962
|
let u = !1, R = -1, g;
|
|
9963
9963
|
if (i) {
|
|
9964
|
-
const { scale: T } = this.options, { td: p, tablePosition:
|
|
9965
|
-
if (p &&
|
|
9966
|
-
const { leftTop: L } =
|
|
9967
|
-
if (!(
|
|
9964
|
+
const { scale: T } = this.options, { td: p, tablePosition: m } = t;
|
|
9965
|
+
if (p && m) {
|
|
9966
|
+
const { leftTop: L } = m.coordinate, I = p.x * T + L[0], O = p.y * T + L[1], S = p.width * T, X = p.height * T;
|
|
9967
|
+
if (!(I < e && e < I + S && O < n && n < O + X))
|
|
9968
9968
|
return {
|
|
9969
9969
|
index: R
|
|
9970
9970
|
};
|
|
@@ -9972,9 +9972,9 @@ class zd {
|
|
|
9972
9972
|
}
|
|
9973
9973
|
const f = s.filter((T) => T.isLastLetter && T.pageNo === d);
|
|
9974
9974
|
for (let T = 0; T < f.length; T++) {
|
|
9975
|
-
const { index: p, rowNo:
|
|
9976
|
-
if (n > L[1] && n <=
|
|
9977
|
-
const O = s.findIndex((W) => W.pageNo === d && W.rowNo ===
|
|
9975
|
+
const { index: p, rowNo: m, coordinate: { leftTop: L, leftBottom: I } } = f[T];
|
|
9976
|
+
if (n > L[1] && n <= I[1]) {
|
|
9977
|
+
const O = s.findIndex((W) => W.pageNo === d && W.rowNo === m), S = r[O], X = s[O], y = S.listStyle === Ee.CHECKBOX ? this.draw.getMargins()[3] : X.coordinate.leftTop[0];
|
|
9978
9978
|
if (e < y)
|
|
9979
9979
|
~O ? X.value === _ ? R = O : (R = O - 1, g = O) : R = p;
|
|
9980
9980
|
else {
|
|
@@ -9992,7 +9992,7 @@ class zd {
|
|
|
9992
9992
|
}
|
|
9993
9993
|
if (!u) {
|
|
9994
9994
|
if (this.draw.getIsPagingMode()) {
|
|
9995
|
-
const p = this.draw.getHeader(),
|
|
9995
|
+
const p = this.draw.getHeader(), m = p.getHeight(), L = p.getHeaderTop() + m, I = this.draw.getFooter(), S = this.draw.getHeight() - (I.getFooterBottom() + I.getHeight());
|
|
9996
9996
|
if (c) {
|
|
9997
9997
|
if (n < L)
|
|
9998
9998
|
return {
|
|
@@ -10013,27 +10013,27 @@ class zd {
|
|
|
10013
10013
|
const T = this.draw.getMargins();
|
|
10014
10014
|
if (n <= T[0])
|
|
10015
10015
|
for (let p = 0; p < s.length; p++) {
|
|
10016
|
-
const
|
|
10017
|
-
if (
|
|
10016
|
+
const m = s[p];
|
|
10017
|
+
if (m.pageNo !== d || m.rowNo !== 0)
|
|
10018
10018
|
continue;
|
|
10019
|
-
const { leftTop: L, rightTop:
|
|
10020
|
-
if (e <= T[3] || e >= L[0] && e <=
|
|
10019
|
+
const { leftTop: L, rightTop: I } = m.coordinate;
|
|
10020
|
+
if (e <= T[3] || e >= L[0] && e <= I[0] || s[p + 1]?.rowNo !== 0)
|
|
10021
10021
|
return {
|
|
10022
|
-
index:
|
|
10022
|
+
index: m.index
|
|
10023
10023
|
};
|
|
10024
10024
|
}
|
|
10025
10025
|
else {
|
|
10026
10026
|
const p = f[f.length - 1];
|
|
10027
10027
|
if (p) {
|
|
10028
|
-
const
|
|
10028
|
+
const m = p.rowNo;
|
|
10029
10029
|
for (let L = 0; L < s.length; L++) {
|
|
10030
|
-
const
|
|
10031
|
-
if (
|
|
10030
|
+
const I = s[L];
|
|
10031
|
+
if (I.pageNo !== d || I.rowNo !== m)
|
|
10032
10032
|
continue;
|
|
10033
|
-
const { leftTop: O, rightTop: S } =
|
|
10034
|
-
if (e <= T[3] || e >= O[0] && e <= S[0] || s[L + 1]?.rowNo !==
|
|
10033
|
+
const { leftTop: O, rightTop: S } = I.coordinate;
|
|
10034
|
+
if (e <= T[3] || e >= O[0] && e <= S[0] || s[L + 1]?.rowNo !== m)
|
|
10035
10035
|
return {
|
|
10036
|
-
index:
|
|
10036
|
+
index: I.index
|
|
10037
10037
|
};
|
|
10038
10038
|
}
|
|
10039
10039
|
}
|
|
@@ -10061,8 +10061,8 @@ class zd {
|
|
|
10061
10061
|
for (let l = 0; l < this.floatPositionList.length; l++) {
|
|
10062
10062
|
const { position: a, element: c, isTable: d, index: u, trIndex: R, tdIndex: g, tdValueIndex: f, zone: T, pageNo: p } = this.floatPositionList[l];
|
|
10063
10063
|
if (i === p && c.type === P.IMAGE && c.imgDisplay && t.imgDisplays.includes(c.imgDisplay) && (!T || T === r)) {
|
|
10064
|
-
const
|
|
10065
|
-
if (e >= L && e <= L + O && n >=
|
|
10064
|
+
const m = c.imgFloatPosition, L = m.x * s, I = m.y * s, O = c.width * s, S = c.height * s;
|
|
10065
|
+
if (e >= L && e <= L + O && n >= I && n <= I + S)
|
|
10066
10066
|
return d ? {
|
|
10067
10067
|
index: u,
|
|
10068
10068
|
isDirectHit: !0,
|
|
@@ -10096,14 +10096,14 @@ class zd {
|
|
|
10096
10096
|
if (!~e.index)
|
|
10097
10097
|
return null;
|
|
10098
10098
|
if (e.isControl && this.draw.getMode() !== v.READONLY) {
|
|
10099
|
-
const { index: p, isTable:
|
|
10099
|
+
const { index: p, isTable: m, trIndex: L, tdIndex: I, tdValueIndex: O } = e, S = this.draw.getControl(), { newIndex: X } = S.moveCursor({
|
|
10100
10100
|
index: p,
|
|
10101
|
-
isTable:
|
|
10101
|
+
isTable: m,
|
|
10102
10102
|
trIndex: L,
|
|
10103
|
-
tdIndex:
|
|
10103
|
+
tdIndex: I,
|
|
10104
10104
|
tdValueIndex: O
|
|
10105
10105
|
});
|
|
10106
|
-
|
|
10106
|
+
m ? e.tdValueIndex = X : e.index = X;
|
|
10107
10107
|
}
|
|
10108
10108
|
const { index: n, isCheckbox: i, isRadio: r, isControl: s, isImage: l, isLabel: a, isDirectHit: c, isTable: d, trIndex: u, tdIndex: R, tdId: g, trId: f, tableId: T } = e;
|
|
10109
10109
|
return this.setPositionContext({
|
|
@@ -10673,7 +10673,7 @@ class jd {
|
|
|
10673
10673
|
}
|
|
10674
10674
|
if (!s)
|
|
10675
10675
|
return;
|
|
10676
|
-
const l = this.getSelection() || [s], a = s.type || P.TEXT, c = s.font || this.options.defaultFont, d = s.size || this.options.defaultSize, u = !~l.findIndex((M) => !M.bold), R = !~l.findIndex((M) => !M.italic), g = !~l.findIndex((M) => !M.underline && !M.control?.underline), f = !~l.findIndex((M) => !M.strikeout), T = s.color || null, p = s.highlight || null,
|
|
10676
|
+
const l = this.getSelection() || [s], a = s.type || P.TEXT, c = s.font || this.options.defaultFont, d = s.size || this.options.defaultSize, u = !~l.findIndex((M) => !M.bold), R = !~l.findIndex((M) => !M.italic), g = !~l.findIndex((M) => !M.underline && !M.control?.underline), f = !~l.findIndex((M) => !M.strikeout), T = s.color || null, p = s.highlight || null, m = s.rowFlex || null, L = s.vertical || null, I = s.rowMargin ?? this.options.defaultRowMargin, O = s.dashArray || [], S = s.level || null, X = s.listType || null, y = s.listStyle || null, W = g && s.textDecoration || null, Y = !!this.draw.getPainterStyle(), D = this.historyManager.isCanUndo(), E = this.historyManager.isCanRedo(), x = s.groupIds || null, b = s.extension ?? null, C = s.deletePerson ?? "", F = {
|
|
10677
10677
|
type: a,
|
|
10678
10678
|
undo: D,
|
|
10679
10679
|
redo: E,
|
|
@@ -10687,9 +10687,9 @@ class jd {
|
|
|
10687
10687
|
deletePerson: C,
|
|
10688
10688
|
color: T,
|
|
10689
10689
|
highlight: p,
|
|
10690
|
-
rowFlex:
|
|
10690
|
+
rowFlex: m,
|
|
10691
10691
|
vertical: L,
|
|
10692
|
-
rowMargin:
|
|
10692
|
+
rowMargin: I,
|
|
10693
10693
|
dashArray: O,
|
|
10694
10694
|
level: S,
|
|
10695
10695
|
listType: X,
|
|
@@ -11081,16 +11081,16 @@ class nu {
|
|
|
11081
11081
|
function R(g, f, T, p) {
|
|
11082
11082
|
if (!g)
|
|
11083
11083
|
return;
|
|
11084
|
-
let
|
|
11085
|
-
i && (
|
|
11086
|
-
const L = [],
|
|
11087
|
-
let { index: O, length: S } = fr(
|
|
11084
|
+
let m = T.map((X) => !X.type || We.includes(X.type) && X.controlComponent !== h.CHECKBOX && X.controlComponent !== h.RADIO && !X.hide && !X.control?.hide && !X.area?.hide ? X.value : _).filter(Boolean).join("");
|
|
11085
|
+
i && (m = m.toLocaleLowerCase());
|
|
11086
|
+
const L = [], I = n ? new RegExp(g) : g;
|
|
11087
|
+
let { index: O, length: S } = fr(m, I);
|
|
11088
11088
|
for (; O !== -1 && S !== 0; ) {
|
|
11089
11089
|
L.push({
|
|
11090
11090
|
index: O,
|
|
11091
11091
|
length: S
|
|
11092
11092
|
});
|
|
11093
|
-
const X = fr(
|
|
11093
|
+
const X = fr(m, I, O + S);
|
|
11094
11094
|
O = X.index, S = X.length;
|
|
11095
11095
|
}
|
|
11096
11096
|
for (let X = 0; X < L.length; X++) {
|
|
@@ -11111,16 +11111,16 @@ class nu {
|
|
|
11111
11111
|
if (f.type === tn.TABLE) {
|
|
11112
11112
|
const T = f.elementList[0];
|
|
11113
11113
|
for (let p = 0; p < T.trList.length; p++) {
|
|
11114
|
-
const
|
|
11115
|
-
for (let L = 0; L <
|
|
11116
|
-
const
|
|
11114
|
+
const m = T.trList[p];
|
|
11115
|
+
for (let L = 0; L < m.tdList.length; L++) {
|
|
11116
|
+
const I = m.tdList[L], O = {
|
|
11117
11117
|
tableId: T.id,
|
|
11118
11118
|
tableIndex: f.index,
|
|
11119
11119
|
trIndex: p,
|
|
11120
11120
|
tdIndex: L,
|
|
11121
|
-
tdId:
|
|
11121
|
+
tdId: I.id
|
|
11122
11122
|
};
|
|
11123
|
-
R(r, f.type,
|
|
11123
|
+
R(r, f.type, I.value, O);
|
|
11124
11124
|
}
|
|
11125
11125
|
}
|
|
11126
11126
|
} else
|
|
@@ -11162,8 +11162,8 @@ class nu {
|
|
|
11162
11162
|
(!O || O.groupId !== c.groupId) && this.searchNavigateScrollIntoView(d);
|
|
11163
11163
|
} else
|
|
11164
11164
|
t.fillStyle = i;
|
|
11165
|
-
const p = u[0],
|
|
11166
|
-
t.fillRect(p,
|
|
11165
|
+
const p = u[0], m = u[1], L = g[0] - u[0], I = R[1] - u[1];
|
|
11166
|
+
t.fillRect(p, m, L, I);
|
|
11167
11167
|
}
|
|
11168
11168
|
t.restore();
|
|
11169
11169
|
}
|
|
@@ -11175,8 +11175,8 @@ class nu {
|
|
|
11175
11175
|
if (zi(r)) {
|
|
11176
11176
|
const T = [];
|
|
11177
11177
|
i.forEach((p) => {
|
|
11178
|
-
const
|
|
11179
|
-
!
|
|
11178
|
+
const m = T[T.length - 1];
|
|
11179
|
+
!m || m[0].groupId !== p.groupId ? T.push([p]) : m.push(p);
|
|
11180
11180
|
}), i = T[r];
|
|
11181
11181
|
}
|
|
11182
11182
|
if (!i?.length)
|
|
@@ -11187,9 +11187,9 @@ class nu {
|
|
|
11187
11187
|
for (let T = 0; T < i.length; T++) {
|
|
11188
11188
|
const p = i[T];
|
|
11189
11189
|
if (p.type === tn.TABLE) {
|
|
11190
|
-
const { tableIndex:
|
|
11190
|
+
const { tableIndex: m, trIndex: L, tdIndex: I, index: O, tdId: S } = p;
|
|
11191
11191
|
d && S !== d && (a = 0), d = S;
|
|
11192
|
-
const X =
|
|
11192
|
+
const X = m + l, y = R[X].trList[L].tdList[I].value, W = O + a, Y = y[W];
|
|
11193
11193
|
if (!s && (Y?.control?.deletable === !1 || Y?.title?.deletable === !1))
|
|
11194
11194
|
continue;
|
|
11195
11195
|
if (t === "") {
|
|
@@ -11211,20 +11211,20 @@ class nu {
|
|
|
11211
11211
|
]), a++);
|
|
11212
11212
|
}
|
|
11213
11213
|
} else {
|
|
11214
|
-
const
|
|
11214
|
+
const m = p.index + l, L = R[m];
|
|
11215
11215
|
if (!s && (L?.control?.deletable === !1 || L?.title?.deletable === !1) || L.type === P.CONTROL && L.controlComponent !== h.VALUE)
|
|
11216
11216
|
continue;
|
|
11217
11217
|
if (t === "") {
|
|
11218
|
-
this.draw.spliceElementList(R,
|
|
11218
|
+
this.draw.spliceElementList(R, m, 1), l--, ~u || (u = T);
|
|
11219
11219
|
continue;
|
|
11220
11220
|
}
|
|
11221
11221
|
if (~u || (u = T), c === p.groupId) {
|
|
11222
|
-
this.draw.spliceElementList(R,
|
|
11222
|
+
this.draw.spliceElementList(R, m, 1), l--;
|
|
11223
11223
|
continue;
|
|
11224
11224
|
}
|
|
11225
|
-
for (let
|
|
11226
|
-
const O = t[
|
|
11227
|
-
|
|
11225
|
+
for (let I = 0; I < t.length; I++) {
|
|
11226
|
+
const O = t[I];
|
|
11227
|
+
I === 0 ? L.value = O : (this.draw.spliceElementList(R, m + I, 0, [
|
|
11228
11228
|
{
|
|
11229
11229
|
...L,
|
|
11230
11230
|
value: O
|
|
@@ -11238,15 +11238,15 @@ class nu {
|
|
|
11238
11238
|
return;
|
|
11239
11239
|
const g = i[u], f = g.index + (t.length - 1);
|
|
11240
11240
|
if (g.type === tn.TABLE) {
|
|
11241
|
-
const { tableIndex: T, trIndex: p, tdIndex:
|
|
11241
|
+
const { tableIndex: T, trIndex: p, tdIndex: m, index: L } = g, I = R[T].trList[p].tdList[m].value[L];
|
|
11242
11242
|
this.position.setPositionContext({
|
|
11243
11243
|
isTable: !0,
|
|
11244
11244
|
index: T,
|
|
11245
11245
|
trIndex: p,
|
|
11246
|
-
tdIndex:
|
|
11247
|
-
tdId:
|
|
11248
|
-
trId:
|
|
11249
|
-
tableId:
|
|
11246
|
+
tdIndex: m,
|
|
11247
|
+
tdId: I.tdId,
|
|
11248
|
+
trId: I.trId,
|
|
11249
|
+
tableId: I.tableId
|
|
11250
11250
|
});
|
|
11251
11251
|
} else
|
|
11252
11252
|
this.position.setPositionContext({
|
|
@@ -11451,11 +11451,11 @@ class Ro {
|
|
|
11451
11451
|
g.test(R) && (R = Ro.formatNumberPlaceholder(R, e + d - u, g, a));
|
|
11452
11452
|
const f = new RegExp(Co.PAGE_COUNT);
|
|
11453
11453
|
f.test(R) && (R = Ro.formatNumberPlaceholder(R, this.draw.getPageCount() - u, f, a));
|
|
11454
|
-
const T = this.draw.getWidth(), p = this.draw.getHeight(),
|
|
11454
|
+
const T = this.draw.getWidth(), p = this.draw.getHeight(), m = this.draw.getPageNumberBottom(), L = p - m;
|
|
11455
11455
|
t.save(), t.fillStyle = s, t.font = `${i * n}px ${r}`;
|
|
11456
|
-
let
|
|
11456
|
+
let I = 0;
|
|
11457
11457
|
const O = this.draw.getMargins(), { width: S } = t.measureText(R);
|
|
11458
|
-
l === At.CENTER ?
|
|
11458
|
+
l === At.CENTER ? I = (T - S) / 2 : l === At.RIGHT ? I = T - S - O[1] : I = O[3], t.fillText(R, I, L), t.restore();
|
|
11459
11459
|
}
|
|
11460
11460
|
}
|
|
11461
11461
|
class ru {
|
|
@@ -11592,16 +11592,16 @@ class au {
|
|
|
11592
11592
|
return [[R[n].tdList[i]]];
|
|
11593
11593
|
let g = R[a].tdList[s], f = R[c].tdList[l];
|
|
11594
11594
|
(g.x > f.x || g.y > f.y) && ([g, f] = [f, g]);
|
|
11595
|
-
const T = g.colIndex, p = f.colIndex + (f.colspan - 1),
|
|
11595
|
+
const T = g.colIndex, p = f.colIndex + (f.colspan - 1), m = g.rowIndex, L = f.rowIndex + (f.rowspan - 1), I = [];
|
|
11596
11596
|
for (let O = 0; O < R.length; O++) {
|
|
11597
11597
|
const S = R[O], X = [];
|
|
11598
11598
|
for (let y = 0; y < S.tdList.length; y++) {
|
|
11599
11599
|
const W = S.tdList[y], Y = W.colIndex, D = W.rowIndex;
|
|
11600
|
-
Y >= T && Y <= p && D >=
|
|
11600
|
+
Y >= T && Y <= p && D >= m && D <= L && X.push(W);
|
|
11601
11601
|
}
|
|
11602
|
-
X.length &&
|
|
11602
|
+
X.length && I.push(X);
|
|
11603
11603
|
}
|
|
11604
|
-
return
|
|
11604
|
+
return I.length ? I : null;
|
|
11605
11605
|
}
|
|
11606
11606
|
_drawOuterBorder(t) {
|
|
11607
11607
|
const { ctx: e, startX: n, startY: i, width: r, height: s, isDrawFullBorder: l, borderExternalWidth: a, skipTopBorderRanges: c = [] } = t, { scale: d } = this.options, u = this._mergeHorizontalBorderRanges(c, r), R = e.lineWidth;
|
|
@@ -11649,7 +11649,7 @@ class au {
|
|
|
11649
11649
|
const { colgroup: r, trList: s, borderType: l, borderColor: a, borderWidth: c = 1, borderExternalWidth: d } = e;
|
|
11650
11650
|
if (!r || !s)
|
|
11651
11651
|
return;
|
|
11652
|
-
const { scale: u, table: { defaultBorderColor: R } } = this.options, g = e.width * u, f = e.height * u, T = this._getPagingContinuationTopBorderRanges(s, g), p = l === Xe.EMPTY,
|
|
11652
|
+
const { scale: u, table: { defaultBorderColor: R } } = this.options, g = e.width * u, f = e.height * u, T = this._getPagingContinuationTopBorderRanges(s, g), p = l === Xe.EMPTY, m = l === Xe.EXTERNAL, L = l === Xe.INTERNAL;
|
|
11653
11653
|
t.save(), l === Xe.DASH && t.setLineDash([3, 3]), t.lineWidth = c * u, t.strokeStyle = a || R, !p && !L && this._drawOuterBorder({
|
|
11654
11654
|
ctx: t,
|
|
11655
11655
|
startX: n,
|
|
@@ -11657,17 +11657,17 @@ class au {
|
|
|
11657
11657
|
width: g,
|
|
11658
11658
|
height: f,
|
|
11659
11659
|
borderExternalWidth: d,
|
|
11660
|
-
isDrawFullBorder:
|
|
11660
|
+
isDrawFullBorder: m,
|
|
11661
11661
|
skipTopBorderRanges: T
|
|
11662
11662
|
});
|
|
11663
|
-
for (let
|
|
11664
|
-
const O = s[
|
|
11663
|
+
for (let I = 0; I < s.length; I++) {
|
|
11664
|
+
const O = s[I];
|
|
11665
11665
|
for (let S = 0; S < O.tdList.length; S++) {
|
|
11666
11666
|
const X = O.tdList[S];
|
|
11667
|
-
if (X.slashTypes?.length && this._drawSlash(t, X, n, i), !X.borderTypes?.length && (p ||
|
|
11667
|
+
if (X.slashTypes?.length && this._drawSlash(t, X, n, i), !X.borderTypes?.length && (p || m))
|
|
11668
11668
|
continue;
|
|
11669
11669
|
const y = X.width * u, W = X.height * u, Y = Math.round(X.x * u + n + y), D = Math.round(X.y * u + i), E = !!X.linkTdPrevId, x = !!X.linkTdNextId;
|
|
11670
|
-
if (t.translate(0.5, 0.5), t.beginPath(), !E && X.borderTypes?.includes(be.TOP) && (t.moveTo(Y - y, D), t.lineTo(Y, D), t.stroke()), X.borderTypes?.includes(be.RIGHT) && (t.moveTo(Y, D), t.lineTo(Y, D + W), t.stroke()), X.borderTypes?.includes(be.BOTTOM) && (t.moveTo(Y, D + W), t.lineTo(Y - y, D + W), t.stroke()), X.borderTypes?.includes(be.LEFT) && (t.moveTo(Y - y, D), t.lineTo(Y - y, D + W), t.stroke()), !p && !
|
|
11670
|
+
if (t.translate(0.5, 0.5), t.beginPath(), !E && X.borderTypes?.includes(be.TOP) && (t.moveTo(Y - y, D), t.lineTo(Y, D), t.stroke()), X.borderTypes?.includes(be.RIGHT) && (t.moveTo(Y, D), t.lineTo(Y, D + W), t.stroke()), X.borderTypes?.includes(be.BOTTOM) && (t.moveTo(Y, D + W), t.lineTo(Y - y, D + W), t.stroke()), X.borderTypes?.includes(be.LEFT) && (t.moveTo(Y - y, D), t.lineTo(Y - y, D + W), t.stroke()), !p && !m) {
|
|
11671
11671
|
if ((!L || X.colIndex + X.colspan < r.length) && (t.moveTo(Y, D), t.lineTo(Y, D + W), d && d !== c && X.colIndex + X.colspan === r.length)) {
|
|
11672
11672
|
const b = t.lineWidth;
|
|
11673
11673
|
t.lineWidth = d * u, t.stroke(), t.beginPath(), t.lineWidth = b;
|
|
@@ -11746,41 +11746,41 @@ class au {
|
|
|
11746
11746
|
const c = s.tdList[a];
|
|
11747
11747
|
let d = 0;
|
|
11748
11748
|
if (n.length > 1 && r !== 0) {
|
|
11749
|
-
const
|
|
11750
|
-
for (let
|
|
11751
|
-
if (this.getRowCountByColIndex(n.slice(0, r),
|
|
11752
|
-
d =
|
|
11749
|
+
const m = s.tdList[a - 1], L = m ? m.colIndex + m.colspan : a;
|
|
11750
|
+
for (let I = L; I < e.length; I++)
|
|
11751
|
+
if (this.getRowCountByColIndex(n.slice(0, r), I) === r) {
|
|
11752
|
+
d = I;
|
|
11753
11753
|
let S = 0;
|
|
11754
|
-
for (let X = 0; X <
|
|
11754
|
+
for (let X = 0; X < I; X++)
|
|
11755
11755
|
S += e[X].width;
|
|
11756
11756
|
i = S;
|
|
11757
11757
|
break;
|
|
11758
11758
|
}
|
|
11759
11759
|
} else {
|
|
11760
|
-
const
|
|
11761
|
-
|
|
11760
|
+
const m = s.tdList[a - 1];
|
|
11761
|
+
m && (d = m.colIndex + m.colspan);
|
|
11762
11762
|
}
|
|
11763
11763
|
let u = 0;
|
|
11764
|
-
for (let
|
|
11765
|
-
u += e[
|
|
11764
|
+
for (let m = 0; m < c.colspan; m++)
|
|
11765
|
+
u += e[m + d].width;
|
|
11766
11766
|
let R = 0;
|
|
11767
|
-
for (let
|
|
11768
|
-
const L = n[
|
|
11767
|
+
for (let m = 0; m < c.rowspan; m++) {
|
|
11768
|
+
const L = n[m + r] || n[r];
|
|
11769
11769
|
R += L.height;
|
|
11770
11770
|
}
|
|
11771
11771
|
const g = s.tdList.length - 1 === a;
|
|
11772
11772
|
let f = l;
|
|
11773
11773
|
if (!f && c.rowspan > 1) {
|
|
11774
|
-
const
|
|
11775
|
-
f = c.rowspan - 1 ===
|
|
11774
|
+
const m = n.length - 1 - r;
|
|
11775
|
+
f = c.rowspan - 1 === m;
|
|
11776
11776
|
}
|
|
11777
11777
|
const T = l && g;
|
|
11778
11778
|
c.isLastRowTd = g, c.isLastColTd = f, c.isLastTd = T, c.x = i;
|
|
11779
11779
|
let p = 0;
|
|
11780
|
-
for (let
|
|
11781
|
-
const L = n[
|
|
11782
|
-
for (let
|
|
11783
|
-
const O = L[
|
|
11780
|
+
for (let m = 0; m < r; m++) {
|
|
11781
|
+
const L = n[m].tdList;
|
|
11782
|
+
for (let I = 0; I < L.length; I++) {
|
|
11783
|
+
const O = L[I];
|
|
11784
11784
|
if (d >= O.colIndex && d < O.colIndex + O.colspan) {
|
|
11785
11785
|
p += O.height;
|
|
11786
11786
|
break;
|
|
@@ -11800,13 +11800,13 @@ class au {
|
|
|
11800
11800
|
return;
|
|
11801
11801
|
let T = c[g].tdList[u], p = c[f].tdList[R];
|
|
11802
11802
|
(T.x > p.x || T.y > p.y) && ([T, p] = [p, T]);
|
|
11803
|
-
const
|
|
11803
|
+
const m = T.colIndex, L = p.colIndex + (p.colspan - 1), I = T.rowIndex, O = p.rowIndex + (p.rowspan - 1);
|
|
11804
11804
|
t.save();
|
|
11805
11805
|
for (let S = 0; S < c.length; S++) {
|
|
11806
11806
|
const X = c[S];
|
|
11807
11807
|
for (let y = 0; y < X.tdList.length; y++) {
|
|
11808
11808
|
const W = X.tdList[y], Y = W.colIndex, D = W.rowIndex;
|
|
11809
|
-
if (Y >=
|
|
11809
|
+
if (Y >= m && Y <= L && D >= I && D <= O) {
|
|
11810
11810
|
const E = W.x * r, x = W.y * r, b = W.width * r, C = W.height * r;
|
|
11811
11811
|
t.globalAlpha = s, t.fillStyle = l, t.fillRect(E + n, x + i, b, C);
|
|
11812
11812
|
}
|
|
@@ -11841,18 +11841,18 @@ class au {
|
|
|
11841
11841
|
}
|
|
11842
11842
|
const g = [], f = [];
|
|
11843
11843
|
for (let p = 0; p < t.colgroup.length; p++) {
|
|
11844
|
-
const
|
|
11845
|
-
if (
|
|
11846
|
-
const L = e ? e(
|
|
11847
|
-
|
|
11848
|
-
const O =
|
|
11849
|
-
|
|
11850
|
-
td:
|
|
11851
|
-
rowSpan: [u, u +
|
|
11844
|
+
const m = R.tdList.find((L) => L.colIndex === p);
|
|
11845
|
+
if (m) {
|
|
11846
|
+
const L = e ? e(m) : m.rowList, I = L.reduce((S, X) => S + X.height, 0);
|
|
11847
|
+
m.rowList = L;
|
|
11848
|
+
const O = I / n + l;
|
|
11849
|
+
m.mainHeight = O, m.rowspan > 1 ? (d[m.colIndex] = m.id, c[m.id] = {
|
|
11850
|
+
td: m,
|
|
11851
|
+
rowSpan: [u, u + m.rowspan - 1],
|
|
11852
11852
|
preHeight: 0,
|
|
11853
11853
|
preMinHeight: 0,
|
|
11854
11854
|
extraHeight: O
|
|
11855
|
-
}, f.push(O)) :
|
|
11855
|
+
}, f.push(O)) : m.height < O ? (m.height = O, m.realHeight = O, g.push(O)) : g.push(m.height);
|
|
11856
11856
|
} else {
|
|
11857
11857
|
const L = c[d[p]];
|
|
11858
11858
|
L?.rowSpan[1] == u && g.push(L.extraHeight);
|
|
@@ -11863,10 +11863,10 @@ class au {
|
|
|
11863
11863
|
p.rowSpan[0] <= u && p.rowSpan[1] >= u && (p.extraHeight -= T, p.preHeight += T, p.preMinHeight += R.minHeight);
|
|
11864
11864
|
}), R.height = T;
|
|
11865
11865
|
for (let p = 0; p < t.colgroup.length; p++) {
|
|
11866
|
-
const
|
|
11867
|
-
if (
|
|
11868
|
-
const L = c[
|
|
11869
|
-
|
|
11866
|
+
const m = R.tdList.find((L) => L.colIndex === p) ?? this.findPreRowSpanTd(a, u, p);
|
|
11867
|
+
if (m) {
|
|
11868
|
+
const L = c[m.id]?.preHeight ?? 0, I = c[m.id]?.preMinHeight ?? R.minHeight;
|
|
11869
|
+
m.height = T + L, m.realHeight = T + L, m.realMinHeight = I;
|
|
11870
11870
|
}
|
|
11871
11871
|
}
|
|
11872
11872
|
}
|
|
@@ -11925,8 +11925,8 @@ class cu {
|
|
|
11925
11925
|
const r = this.draw.getOriginalElementList(), s = this.position.getOriginalPositionList(), l = r[e];
|
|
11926
11926
|
if (l.tableToolDisabled && !this.draw.isDesignMode())
|
|
11927
11927
|
return;
|
|
11928
|
-
const { scale: a, table: { overflow: c } } = this.options, d = s[e], { colgroup: u, trList: R } = l, { coordinate: { leftTop: g } } = d, f = this.draw.getHeight(), T = this.draw.getPageGap(), p = this.draw.getPageNo() * (f + T),
|
|
11929
|
-
W.classList.add(`${dt}-table-tool__select`), W.style.height = `${X * a}`, W.style.left = `${
|
|
11928
|
+
const { scale: a, table: { overflow: c } } = this.options, d = s[e], { colgroup: u, trList: R } = l, { coordinate: { leftTop: g } } = d, f = this.draw.getHeight(), T = this.draw.getPageGap(), p = this.draw.getPageNo() * (f + T), m = g[0], L = g[1] + p, I = l.trList[n].tdList[i], O = I.rowIndex, S = I.colIndex, X = l.height * a, y = l.width * a, W = document.createElement("div");
|
|
11929
|
+
W.classList.add(`${dt}-table-tool__select`), W.style.height = `${X * a}`, W.style.left = `${m}px`, W.style.top = `${L}px`, W.style.transform = `translate(-${this.TABLE_SELECT_OFFSET * a}px, ${-this.TABLE_SELECT_OFFSET * a}px)`, W.onclick = () => {
|
|
11930
11930
|
this.draw.getTableOperate().tableSelectAll();
|
|
11931
11931
|
}, this.container.append(W), this.toolTableSelectBtn = W;
|
|
11932
11932
|
const Y = R.map((M) => M.height), D = document.createElement("div");
|
|
@@ -11957,9 +11957,9 @@ class cu {
|
|
|
11957
11957
|
});
|
|
11958
11958
|
}, N.append(w), N.style.height = `${U}px`, D.append(N);
|
|
11959
11959
|
}
|
|
11960
|
-
D.style.left = `${
|
|
11960
|
+
D.style.left = `${m}px`, D.style.top = `${L}px`, this.container.append(D), this.toolRowContainer = D;
|
|
11961
11961
|
const E = document.createElement("div");
|
|
11962
|
-
E.classList.add(`${dt}-table-tool__quick__add`), E.style.height = `${X * a}`, E.style.left = `${
|
|
11962
|
+
E.classList.add(`${dt}-table-tool__quick__add`), E.style.height = `${X * a}`, E.style.left = `${m}px`, E.style.top = `${L + X}px`, E.style.transform = `translate(-${this.ROW_COL_QUICK_POSITION * a}px, ${this.ROW_COL_QUICK_OFFSET * a}px)`, E.onclick = () => {
|
|
11963
11963
|
this.position.setPositionContext({
|
|
11964
11964
|
index: e,
|
|
11965
11965
|
isTable: !0,
|
|
@@ -11996,9 +11996,9 @@ class cu {
|
|
|
11996
11996
|
});
|
|
11997
11997
|
}, N.append(w), N.style.width = `${U}px`, b.append(N);
|
|
11998
11998
|
}
|
|
11999
|
-
b.style.left = `${
|
|
11999
|
+
b.style.left = `${m}px`, b.style.top = `${L}px`, this.container.append(b), this.toolColContainer = b;
|
|
12000
12000
|
const C = document.createElement("div");
|
|
12001
|
-
C.classList.add(`${dt}-table-tool__quick__add`), C.style.height = `${X * a}`, C.style.left = `${
|
|
12001
|
+
C.classList.add(`${dt}-table-tool__quick__add`), C.style.height = `${X * a}`, C.style.left = `${m + y}px`, C.style.top = `${L}px`, C.style.transform = `translate(${this.ROW_COL_QUICK_OFFSET * a}px, -${this.ROW_COL_QUICK_POSITION * a}px)`, C.onclick = () => {
|
|
12002
12002
|
this.position.setPositionContext({
|
|
12003
12003
|
index: e,
|
|
12004
12004
|
isTable: !0,
|
|
@@ -12008,7 +12008,7 @@ class cu {
|
|
|
12008
12008
|
}), this.draw.getTableOperate().insertTableRightCol();
|
|
12009
12009
|
}, this.container.append(C), this.toolColAddBtn = C;
|
|
12010
12010
|
const F = document.createElement("div");
|
|
12011
|
-
F.classList.add(`${dt}-table-tool__border`), F.style.height = `${X}px`, F.style.width = `${y}px`, F.style.left = `${
|
|
12011
|
+
F.classList.add(`${dt}-table-tool__border`), F.style.height = `${X}px`, F.style.width = `${y}px`, F.style.left = `${m}px`, F.style.top = `${L}px`;
|
|
12012
12012
|
for (let M = 0; M < R.length; M++) {
|
|
12013
12013
|
const U = R[M];
|
|
12014
12014
|
for (let N = 0; N < U.tdList.length; N++) {
|
|
@@ -12055,7 +12055,7 @@ class cu {
|
|
|
12055
12055
|
_mousedown(t) {
|
|
12056
12056
|
const { evt: e, index: n, order: i, element: r, isLeftStartBorder: s } = t;
|
|
12057
12057
|
this.canvas = this.draw.getPage();
|
|
12058
|
-
const { scale: l, table: { overflow: a } } = this.options, c = this.draw.getWidth(), d = this.draw.getHeight(), u = this.draw.getPageGap(), R = this.draw.getPageNo() * (d + u), g = this.position.getPositionContext(), p = (this.position.getOriginalPositionList()[g.index]?.coordinate?.leftTop?.[0] || 0) * l,
|
|
12058
|
+
const { scale: l, table: { overflow: a } } = this.options, c = this.draw.getWidth(), d = this.draw.getHeight(), u = this.draw.getPageGap(), R = this.draw.getPageNo() * (d + u), g = this.position.getPositionContext(), p = (this.position.getOriginalPositionList()[g.index]?.coordinate?.leftTop?.[0] || 0) * l, m = this.draw.getMargins(), L = m[0], I = m[1], O = L, S = c - I;
|
|
12059
12059
|
this.mousedownX = e.x, this.mousedownY = e.y;
|
|
12060
12060
|
const X = e.target, y = this.canvas.getBoundingClientRect(), W = window.getComputedStyle(X).cursor;
|
|
12061
12061
|
document.body.style.cursor = W, this.canvas.style.cursor = W;
|
|
@@ -12279,8 +12279,8 @@ class Ru {
|
|
|
12279
12279
|
const { scale: s } = this.options, l = e.type === "customMacro", a = e.type === "reusableItem", c = e.type === "subTemplate";
|
|
12280
12280
|
let d, u;
|
|
12281
12281
|
c ? (d = "#722ed1", u = "#f9f0ff") : a ? (d = "#52c41a", u = "#f6ffed") : l ? (d = "#fa8c16", u = "#fff7e6") : (d = "#1677ff", u = "#e6f4ff"), t.save(), t.font = e.style;
|
|
12282
|
-
const R = t.measureText(r), g = R.actualBoundingBoxAscent + R.actualBoundingBoxDescent, f = 8 * s, T = 4 * s, p = 4 * s,
|
|
12283
|
-
t.fillStyle = u, this._drawRoundedRect(t, O, S,
|
|
12282
|
+
const R = t.measureText(r), g = R.actualBoundingBoxAscent + R.actualBoundingBoxDescent, f = 8 * s, T = 4 * s, p = 4 * s, m = R.width + f * 2, L = g + T * 2, I = e.metrics, O = n, S = i - I.boundingBoxAscent + (I.boundingBoxAscent + I.boundingBoxDescent - L) / 2;
|
|
12283
|
+
t.fillStyle = u, this._drawRoundedRect(t, O, S, m, L, p), t.fill(), t.fillStyle = d, t.textBaseline = "middle", t.fillText(r, n + f, S + L / 2), t.restore();
|
|
12284
12284
|
}
|
|
12285
12285
|
/**
|
|
12286
12286
|
* 表单模式下渲染文本控件样式(type=text)
|
|
@@ -12294,15 +12294,15 @@ class Ru {
|
|
|
12294
12294
|
t.fillStyle = d, t.textBaseline = "alphabetic", t.fillText("[", n, i);
|
|
12295
12295
|
const p = n + t.measureText("[").width;
|
|
12296
12296
|
t.fillStyle = r ? e.color || "#000000" : c, t.fillText(g, p, i);
|
|
12297
|
-
const
|
|
12298
|
-
if (t.fillStyle = d, t.fillText("]",
|
|
12297
|
+
const m = p + T;
|
|
12298
|
+
if (t.fillStyle = d, t.fillText("]", m, i), e.type === "reusableItem") {
|
|
12299
12299
|
const L = t.measureText("[").width + T + t.measureText("]").width;
|
|
12300
12300
|
if (t.lineWidth = s, this.draw.isPrintLikeMode() ? t.strokeStyle = "transparent" : t.strokeStyle = a || "red", e.strikeout) {
|
|
12301
|
-
const
|
|
12302
|
-
t.beginPath(), t.moveTo(n,
|
|
12301
|
+
const I = i - 3 * s, O = i + 3.5 * s;
|
|
12302
|
+
t.beginPath(), t.moveTo(n, I), t.lineTo(n + L, I), t.stroke(), t.beginPath(), t.moveTo(n, O), t.lineTo(n + L, O), t.stroke();
|
|
12303
12303
|
} else if (e.underline && e.textDecoration?.style === "double") {
|
|
12304
|
-
const
|
|
12305
|
-
t.beginPath(), t.moveTo(n,
|
|
12304
|
+
const I = Math.floor(i + 2 * s) + 0.5, O = 3 * s;
|
|
12305
|
+
t.beginPath(), t.moveTo(n, I), t.lineTo(n + L, I), t.stroke(), t.beginPath(), t.moveTo(n, I + O), t.lineTo(n + L, I + O), t.stroke();
|
|
12306
12306
|
}
|
|
12307
12307
|
}
|
|
12308
12308
|
t.restore();
|
|
@@ -12319,8 +12319,8 @@ class Ru {
|
|
|
12319
12319
|
t.fillStyle = c, t.textBaseline = "alphabetic", t.fillText("[", n, i);
|
|
12320
12320
|
const T = n + t.measureText("[").width;
|
|
12321
12321
|
t.fillStyle = r ? e.color || "#000000" : a, t.fillText(R, T, i);
|
|
12322
|
-
const p = T + g.width + 2 * s,
|
|
12323
|
-
t.beginPath(), t.moveTo(p,
|
|
12322
|
+
const p = T + g.width + 2 * s, m = i - f / 2;
|
|
12323
|
+
t.beginPath(), t.moveTo(p, m - 2 * s), t.lineTo(p + 5 * s, m - 2 * s), t.lineTo(p + 2.5 * s, m + 2 * s), t.closePath(), t.fillStyle = "#666666", t.fill();
|
|
12324
12324
|
const L = p + 6 * s;
|
|
12325
12325
|
t.fillStyle = c, t.fillText("]", L, i), t.restore();
|
|
12326
12326
|
}
|
|
@@ -12553,15 +12553,15 @@ class Iu {
|
|
|
12553
12553
|
T.test(f) && (f = Ro.formatNumberPlaceholder(f, e + 1, T, d));
|
|
12554
12554
|
const p = new RegExp(Co.PAGE_COUNT);
|
|
12555
12555
|
p.test(f) && (f = Ro.formatNumberPlaceholder(f, this.draw.getPageCount(), p, d));
|
|
12556
|
-
const
|
|
12556
|
+
const m = t.measureText(f);
|
|
12557
12557
|
if (a) {
|
|
12558
|
-
const L = this.draw.getPagePixelRatio(),
|
|
12559
|
-
|
|
12560
|
-
const D = t.createPattern(
|
|
12558
|
+
const L = this.draw.getPagePixelRatio(), I = document.createElement("canvas"), O = I.getContext("2d"), S = m.width, X = m.actualBoundingBoxAscent + m.actualBoundingBoxDescent, y = Math.sqrt(Math.pow(S, 2) + Math.pow(X, 2)), W = y + 2 * c[0] * u, Y = y + 2 * c[1] * u;
|
|
12559
|
+
I.width = W, I.height = Y, I.style.width = `${W * L}px`, I.style.height = `${Y * L}px`, O.translate(W / 2, Y / 2), O.rotate(-45 * Math.PI / 180), O.translate(-W / 2, -Y / 2), O.font = `${s * u}px ${r}`, O.fillStyle = l, O.fillText(f, (W - S) / 2, (Y - X) / 2 + m.actualBoundingBoxAscent);
|
|
12560
|
+
const D = t.createPattern(I, "repeat");
|
|
12561
12561
|
D && (t.fillStyle = D, t.fillRect(0, 0, R, g));
|
|
12562
12562
|
} else {
|
|
12563
|
-
const L = R / 2,
|
|
12564
|
-
t.fillStyle = l, t.translate(L,
|
|
12563
|
+
const L = R / 2, I = g / 2;
|
|
12564
|
+
t.fillStyle = l, t.translate(L, I), t.rotate(-45 * Math.PI / 180), t.fillText(f, -m.width / 2, m.actualBoundingBoxAscent - s * u / 2);
|
|
12565
12565
|
}
|
|
12566
12566
|
t.restore();
|
|
12567
12567
|
}
|
|
@@ -12579,10 +12579,10 @@ class Iu {
|
|
|
12579
12579
|
}
|
|
12580
12580
|
const c = this.draw.getWidth(), d = this.draw.getHeight(), u = e * a, R = n * a;
|
|
12581
12581
|
if (t.save(), t.globalAlpha = r, s) {
|
|
12582
|
-
const g = this.draw.getPagePixelRatio(), f = document.createElement("canvas"), T = f.getContext("2d"), p = Math.sqrt(Math.pow(u, 2) + Math.pow(R, 2)),
|
|
12583
|
-
f.width =
|
|
12584
|
-
const
|
|
12585
|
-
|
|
12582
|
+
const g = this.draw.getPagePixelRatio(), f = document.createElement("canvas"), T = f.getContext("2d"), p = Math.sqrt(Math.pow(u, 2) + Math.pow(R, 2)), m = p + 2 * l[0] * a, L = p + 2 * l[1] * a;
|
|
12583
|
+
f.width = m, f.height = L, f.style.width = `${m * g}px`, f.style.height = `${L * g}px`, T.translate(m / 2, L / 2), T.rotate(-45 * Math.PI / 180), T.translate(-m / 2, -L / 2), T.drawImage(this.imageCache.get(i), (m - u) / 2, (L - R) / 2, u, R);
|
|
12584
|
+
const I = t.createPattern(f, "repeat");
|
|
12585
|
+
I && (t.fillStyle = I, t.fillRect(0, 0, c, d));
|
|
12586
12586
|
} else {
|
|
12587
12587
|
const g = c / 2, f = d / 2;
|
|
12588
12588
|
t.translate(g, f), t.rotate(-45 * Math.PI / 180), t.drawImage(this.imageCache.get(i), -u / 2, -R / 2, u, R);
|
|
@@ -12605,10 +12605,10 @@ class mu {
|
|
|
12605
12605
|
// 获取控件设置高亮信息
|
|
12606
12606
|
getControlHighlight(t, e) {
|
|
12607
12607
|
const { control: { activeBackgroundColor: n, disabledBackgroundColor: i, existValueBackgroundColor: r, noValueBackgroundColor: s, inlineControlBackgroundColor: l } } = this.options, a = t[e], c = this.draw.isPrintLikeMode(), d = this.draw.getMode(), u = d === v.EDIT || d === v.FORM, R = this.control.getActiveControl()?.getElement(), g = this._getControlType(t, e);
|
|
12608
|
-
let f = !1, T = !1, p = !1,
|
|
12609
|
-
a.highlight || (f = !c && !!n && !!R && a.controlId === R.controlId && !this.control.getIsRangeInPostfix()), f || (T = !c && !!i && !!a.control?.disabled), T || (p = !c && !!r && !!a.controlId && this.control.getIsExistValueByElementListIndex(t, e)), p || (
|
|
12608
|
+
let f = !1, T = !1, p = !1, m = !1;
|
|
12609
|
+
a.highlight || (f = !c && !!n && !!R && a.controlId === R.controlId && !this.control.getIsRangeInPostfix()), f || (T = !c && !!i && !!a.control?.disabled), T || (p = !c && !!r && !!a.controlId && this.control.getIsExistValueByElementListIndex(t, e)), p || (m = !c && !!s && !!a.controlId && !this.control.getIsExistValueByElementListIndex(t, e));
|
|
12610
12610
|
const L = u && !!l && (g === V.NUMBER || g === V.SELECT || g === V.DATE);
|
|
12611
|
-
return (f ? n : "") || (T ? i : "") || (p ? r : "") || (
|
|
12611
|
+
return (f ? n : "") || (T ? i : "") || (p ? r : "") || (m ? s : "") || (L ? l : "");
|
|
12612
12612
|
}
|
|
12613
12613
|
getIsInlineControlBackground(t, e) {
|
|
12614
12614
|
const n = this.draw.getMode(), i = this._getControlType(t, e);
|
|
@@ -12653,15 +12653,15 @@ class mu {
|
|
|
12653
12653
|
const f = s.trList;
|
|
12654
12654
|
for (let T = 0; T < f.length; T++) {
|
|
12655
12655
|
const p = f[T];
|
|
12656
|
-
for (let
|
|
12657
|
-
const L = p.tdList[
|
|
12656
|
+
for (let m = 0; m < p.tdList.length; m++) {
|
|
12657
|
+
const L = p.tdList[m], I = {
|
|
12658
12658
|
tableId: s.id,
|
|
12659
12659
|
tableIndex: r - 1,
|
|
12660
12660
|
trIndex: T,
|
|
12661
|
-
tdIndex:
|
|
12661
|
+
tdIndex: m,
|
|
12662
12662
|
tdId: L.id
|
|
12663
12663
|
};
|
|
12664
|
-
e(L.value,
|
|
12664
|
+
e(L.value, I);
|
|
12665
12665
|
}
|
|
12666
12666
|
}
|
|
12667
12667
|
}
|
|
@@ -12679,11 +12679,11 @@ class mu {
|
|
|
12679
12679
|
const u = n.slice(c, d).map((f) => f.controlComponent === h.VALUE ? f : { value: _ }), R = this.highlightList[a], { ruleList: g } = R;
|
|
12680
12680
|
for (let f = 0; f < g.length; f++) {
|
|
12681
12681
|
const T = g[f], p = t.getMatchList(T.keyword, u);
|
|
12682
|
-
this.highlightMatchResult.push(...p.map((
|
|
12683
|
-
...
|
|
12682
|
+
this.highlightMatchResult.push(...p.map((m) => ({
|
|
12683
|
+
...m,
|
|
12684
12684
|
...T,
|
|
12685
12685
|
...i,
|
|
12686
|
-
index:
|
|
12686
|
+
index: m.index + c
|
|
12687
12687
|
// 实际索引
|
|
12688
12688
|
})));
|
|
12689
12689
|
}
|
|
@@ -12700,8 +12700,8 @@ class mu {
|
|
|
12700
12700
|
const a = this.highlightMatchResult[l];
|
|
12701
12701
|
let c = null;
|
|
12702
12702
|
if (a.tableId) {
|
|
12703
|
-
const { tableIndex: L, trIndex:
|
|
12704
|
-
c = s[L]?.trList[
|
|
12703
|
+
const { tableIndex: L, trIndex: I, tdIndex: O, index: S } = a;
|
|
12704
|
+
c = s[L]?.trList[I].tdList[O]?.positionList[S];
|
|
12705
12705
|
} else
|
|
12706
12706
|
c = r[a.index];
|
|
12707
12707
|
if (!c)
|
|
@@ -12710,8 +12710,8 @@ class mu {
|
|
|
12710
12710
|
if (g !== e)
|
|
12711
12711
|
continue;
|
|
12712
12712
|
t.fillStyle = a.backgroundColor || i, t.globalAlpha = a.alpha || n;
|
|
12713
|
-
const f = d[0], T = d[1], p = R[0] - d[0],
|
|
12714
|
-
t.fillRect(f, T, p,
|
|
12713
|
+
const f = d[0], T = d[1], p = R[0] - d[0], m = u[1] - d[1];
|
|
12714
|
+
t.fillRect(f, T, p, m);
|
|
12715
12715
|
}
|
|
12716
12716
|
t.restore();
|
|
12717
12717
|
}
|
|
@@ -12761,15 +12761,15 @@ class Ou {
|
|
|
12761
12761
|
if (a.length) {
|
|
12762
12762
|
t.save();
|
|
12763
12763
|
for (let c = 0; c < a.length; c++) {
|
|
12764
|
-
const d = a[c], u = this._getStyle(d.mark), R = Math.max(1, this.options.scale), g = d.x - R, f = d.y - R, T = Math.max(1, d.width + R * 2), p = Math.max(1, d.height + R * 2),
|
|
12765
|
-
if (this.underlineVisible && u.borderColor && d.hasUnderline && (t.lineWidth =
|
|
12764
|
+
const d = a[c], u = this._getStyle(d.mark), R = Math.max(1, this.options.scale), g = d.x - R, f = d.y - R, T = Math.max(1, d.width + R * 2), p = Math.max(1, d.height + R * 2), m = Math.max(2, this.options.scale * 2);
|
|
12765
|
+
if (this.underlineVisible && u.borderColor && d.hasUnderline && (t.lineWidth = m, t.strokeStyle = u.borderColor, t.beginPath(), t.moveTo(d.underlineX, d.underlineY), t.lineTo(d.underlineRight, d.underlineY), t.stroke()), d.drawRequired) {
|
|
12766
12766
|
this._renderRequiredMark(t, d, g);
|
|
12767
12767
|
continue;
|
|
12768
12768
|
}
|
|
12769
12769
|
if (u.borderColor) {
|
|
12770
|
-
t.lineWidth =
|
|
12771
|
-
const L = Math.min(Math.max(8 * this.options.scale, p * 0.3), p / 2),
|
|
12772
|
-
t.beginPath(), d.drawLeft && (t.moveTo(g + L, f), t.lineTo(g, f), t.lineTo(g, O)), d.drawRight && (t.moveTo(
|
|
12770
|
+
t.lineWidth = m;
|
|
12771
|
+
const L = Math.min(Math.max(8 * this.options.scale, p * 0.3), p / 2), I = g + T, O = f + p;
|
|
12772
|
+
t.beginPath(), d.drawLeft && (t.moveTo(g + L, f), t.lineTo(g, f), t.lineTo(g, O)), d.drawRight && (t.moveTo(I - L, O), t.lineTo(I, O), t.lineTo(I, f)), t.stroke();
|
|
12773
12773
|
}
|
|
12774
12774
|
}
|
|
12775
12775
|
t.restore();
|
|
@@ -12778,12 +12778,12 @@ class Ou {
|
|
|
12778
12778
|
_getRegions(t, e, n, i, r, s) {
|
|
12779
12779
|
const l = this._getParentMap(t), a = this.marks.map((R) => this._getTargetControlIds(t, R)), c = a.map((R) => this._getTitleTargets(t, R)), d = [];
|
|
12780
12780
|
for (let R = 0; R < n.length; R++) {
|
|
12781
|
-
const g = n[R], f = /* @__PURE__ */ new Map(), T = e[g.startIndex], p = T ? Math.min(T.coordinate.leftTop[0], T.coordinate.leftBottom[0]) - (g.offsetX || 0) : 0,
|
|
12781
|
+
const g = n[R], f = /* @__PURE__ */ new Map(), T = e[g.startIndex], p = T ? Math.min(T.coordinate.leftTop[0], T.coordinate.leftBottom[0]) - (g.offsetX || 0) : 0, m = T ? p + (s || this.draw.getInnerWidth()) : 0;
|
|
12782
12782
|
for (let L = 0; L < g.elementList.length; L++) {
|
|
12783
|
-
const
|
|
12783
|
+
const I = g.elementList[L], O = g.startIndex + L, S = e[O];
|
|
12784
12784
|
if (!S || r === Lt.MAIN && S.pageNo !== i)
|
|
12785
12785
|
continue;
|
|
12786
|
-
const X = this._getTargetIdsForElement(this._getQualityTargetId(
|
|
12786
|
+
const X = this._getTargetIdsForElement(this._getQualityTargetId(I), a, l);
|
|
12787
12787
|
for (let H = 0; H < c.length; H++) {
|
|
12788
12788
|
const Z = c[H].get(O);
|
|
12789
12789
|
Z && Z.forEach((et) => {
|
|
@@ -12792,7 +12792,7 @@ class Ou {
|
|
|
12792
12792
|
}
|
|
12793
12793
|
if (!X.length)
|
|
12794
12794
|
continue;
|
|
12795
|
-
const y = S.coordinate.leftTop, W = S.coordinate.rightTop, Y = S.coordinate.leftBottom, D = S.coordinate.rightBottom, E = Math.min(y[0], Y[0]), x = Math.max(W[0], D[0]), b = Math.min(y[1], W[1]), C = Math.max(Y[1], D[1]), F = S.metrics.boundingBoxAscent + S.metrics.boundingBoxDescent, M = b + S.ascent - S.metrics.boundingBoxAscent, U = F > 0 ? M : b, N = F > 0 ? M + F : C, w = this._isButtonElement(
|
|
12795
|
+
const y = S.coordinate.leftTop, W = S.coordinate.rightTop, Y = S.coordinate.leftBottom, D = S.coordinate.rightBottom, E = Math.min(y[0], Y[0]), x = Math.max(W[0], D[0]), b = Math.min(y[1], W[1]), C = Math.max(Y[1], D[1]), F = S.metrics.boundingBoxAscent + S.metrics.boundingBoxDescent, M = b + S.ascent - S.metrics.boundingBoxAscent, U = F > 0 ? M : b, N = F > 0 ? M + F : C, w = this._isButtonElement(I), K = T ? Math.max(E, Math.min(x, m)) : x;
|
|
12796
12796
|
for (let H = 0; H < X.length; H++) {
|
|
12797
12797
|
const { markIndex: Z, controlId: et } = X[H], j = `${Z}:${et}:${g.startIndex}`, G = f.get(j), $ = { x: E, y: U, right: x, bottom: N };
|
|
12798
12798
|
if (G) {
|
|
@@ -12807,7 +12807,7 @@ class Ou {
|
|
|
12807
12807
|
width: Math.max(1, x - E),
|
|
12808
12808
|
height: Math.max(1, N - U),
|
|
12809
12809
|
baseline: b + S.ascent,
|
|
12810
|
-
font:
|
|
12810
|
+
font: I.style || this.draw.getElementFont(I, this.options.scale),
|
|
12811
12811
|
underlineX: E,
|
|
12812
12812
|
underlineY: N + Ki,
|
|
12813
12813
|
underlineRight: K,
|
|
@@ -13146,7 +13146,7 @@ class po {
|
|
|
13146
13146
|
if (!~T)
|
|
13147
13147
|
return;
|
|
13148
13148
|
a || this.control.removePlaceholder(T, e);
|
|
13149
|
-
const p = Ve(i[T], _e),
|
|
13149
|
+
const p = Ve(i[T], _e), m = T + 1, L = Qt(R), I = this.control.getDraw();
|
|
13150
13150
|
for (let O = 0; O < L.length; O++) {
|
|
13151
13151
|
const S = {
|
|
13152
13152
|
...f,
|
|
@@ -13157,7 +13157,7 @@ class po {
|
|
|
13157
13157
|
};
|
|
13158
13158
|
(S.color === this.options.control.bracketColor || S.color === this.options.control.placeholderColor) && (S.color = this.options.defaultColor), ge(i, [S], T, {
|
|
13159
13159
|
editorOptions: this.options
|
|
13160
|
-
}),
|
|
13160
|
+
}), I.spliceElementList(i, m + O, 0, [S]);
|
|
13161
13161
|
}
|
|
13162
13162
|
if (this.control.setControlProperties({
|
|
13163
13163
|
code: t
|
|
@@ -13165,7 +13165,7 @@ class po {
|
|
|
13165
13165
|
elementList: i,
|
|
13166
13166
|
range: { startIndex: T, endIndex: T }
|
|
13167
13167
|
}), !e.range) {
|
|
13168
|
-
const O =
|
|
13168
|
+
const O = m + L.length - 1;
|
|
13169
13169
|
this.control.repaintControl({
|
|
13170
13170
|
curIndex: O
|
|
13171
13171
|
}), this.control.emitControlContentChange({
|
|
@@ -13188,7 +13188,7 @@ class po {
|
|
|
13188
13188
|
const g = e[R], f = document.createElement("li");
|
|
13189
13189
|
let T = this.getCodes();
|
|
13190
13190
|
T.includes(g.code) && (f.classList.add("active"), s = f), f.onclick = () => {
|
|
13191
|
-
const p = T.findIndex((
|
|
13191
|
+
const p = T.findIndex((m) => m === g.code);
|
|
13192
13192
|
t.isMultiSelect ? ~p ? T.splice(p, 1) : T.push(g.code) : ~p ? T = [] : T = [g.code], this.setSelect(T.join(this.VALUE_DELIMITER));
|
|
13193
13193
|
}, f.append(document.createTextNode(g.value)), r.append(f);
|
|
13194
13194
|
}
|
|
@@ -15861,13 +15861,13 @@ class ms {
|
|
|
15861
15861
|
c ? (d = s.originControlId, u = void 0, R = l.control) : g && (d = s.controlId, u = void 0, R = s.control);
|
|
15862
15862
|
const f = !!d && s?.controlId !== d && this._findNearestTextAncestorId(r, s?.originControlId) === d;
|
|
15863
15863
|
!f && !c && !g && (this.control.mergeControl(e), this.control.shrinkBoundary(e));
|
|
15864
|
-
const { startIndex: T, endIndex: p } = i,
|
|
15865
|
-
T !== p ?
|
|
15864
|
+
const { startIndex: T, endIndex: p } = i, m = this.control.getDraw();
|
|
15865
|
+
T !== p ? m.spliceElementList(r, T + 1, p - T, [], {
|
|
15866
15866
|
isIgnoreDeletedRule: n.isIgnoreDeletedRule
|
|
15867
15867
|
}) : f || c || g ? this._removePlaceholdersByControl(r, d, u || null) : this.control.removePlaceholder(T, { elementList: r });
|
|
15868
15868
|
const L = r[T];
|
|
15869
15869
|
f || c || g ? this._removePlaceholdersByControl(r, d, u || null) : this._removeControlPlaceholders(r, T);
|
|
15870
|
-
const
|
|
15870
|
+
const I = L.type && !We.includes(L.type) || L.controlComponent === h.PREFIX || L.controlComponent === h.PRE_TEXT ? Re(L, [
|
|
15871
15871
|
"control",
|
|
15872
15872
|
"controlId",
|
|
15873
15873
|
"originControlId",
|
|
@@ -15879,7 +15879,7 @@ class ms {
|
|
|
15879
15879
|
x !== void 0 && (D[E] = x);
|
|
15880
15880
|
}), delete D.underline, delete D.textDecoration, R?.type === V.TEXT && D.color?.toLowerCase() === "#87d068" ? D.color = this.options.defaultColor : D.color || (D.color = this.options.defaultColor);
|
|
15881
15881
|
};
|
|
15882
|
-
O && S(
|
|
15882
|
+
O && S(I), I.controlId = d, R && (I.control = R), u ? I.originControlId = u : delete I.originControlId;
|
|
15883
15883
|
const X = this.options.mode === v.FORM && this.options.modeRule.form.inputTraceEnabled, y = i.startIndex + 1, W = [], Y = (D) => {
|
|
15884
15884
|
const E = W.length ? W : r, x = W.length ? W.length - 1 : c ? i.startIndex + 1 : i.startIndex;
|
|
15885
15885
|
ge(E, [D], x, {
|
|
@@ -15890,7 +15890,7 @@ class ms {
|
|
|
15890
15890
|
const E = t[D];
|
|
15891
15891
|
if (E.type === P.CONTROL && E.control) {
|
|
15892
15892
|
const x = E, b = x.controlId || mt(), C = x.control?.value || [], F = x.control?.type === V.TEXTFIELD, U = {
|
|
15893
|
-
...Ve(
|
|
15893
|
+
...Ve(I, ["underline", "textDecoration"]),
|
|
15894
15894
|
controlId: b,
|
|
15895
15895
|
type: P.CONTROL,
|
|
15896
15896
|
control: x.control,
|
|
@@ -15934,21 +15934,21 @@ class ms {
|
|
|
15934
15934
|
Y(et);
|
|
15935
15935
|
}
|
|
15936
15936
|
} else if (E.type || E.value) {
|
|
15937
|
-
(L.controlComponent === h.PRE_TEXT || L.controlComponent === h.POST_TEXT || L.controlComponent === h.PREFIX || L.controlComponent === h.POSTFIX) && (
|
|
15937
|
+
(L.controlComponent === h.PRE_TEXT || L.controlComponent === h.POST_TEXT || L.controlComponent === h.PREFIX || L.controlComponent === h.POSTFIX) && (I.color = this.options.defaultColor);
|
|
15938
15938
|
const b = Ve(E, [
|
|
15939
15939
|
"control",
|
|
15940
15940
|
"controlId",
|
|
15941
15941
|
"controlComponent",
|
|
15942
15942
|
"originControlId"
|
|
15943
15943
|
]), C = {
|
|
15944
|
-
...
|
|
15944
|
+
...I,
|
|
15945
15945
|
...b,
|
|
15946
15946
|
controlComponent: h.VALUE
|
|
15947
15947
|
};
|
|
15948
15948
|
O && S(C), (C.color === this.options.control.bracketColor || C.color === this.options.control.placeholderColor || C.color === this.options.control.textFixColor) && (C.color = this.options.defaultColor), C.strikeout && delete C.strikeout, X && (C.textDecoration = { style: xn.DOUBLE }, C.underline = !0), Y(C);
|
|
15949
15949
|
}
|
|
15950
15950
|
}
|
|
15951
|
-
return W.length &&
|
|
15951
|
+
return W.length && m.spliceElementList(r, y, 0, W), i.startIndex + W.length;
|
|
15952
15952
|
}
|
|
15953
15953
|
_removeControlPlaceholders(t, e) {
|
|
15954
15954
|
const n = t[e];
|
|
@@ -16023,7 +16023,7 @@ class ms {
|
|
|
16023
16023
|
(K.control?.type === V.TEXT || this.options.mode === v.EDIT && K.control?.type === V.TEXTFIELD) && (w = N), N = K.originControlId || null;
|
|
16024
16024
|
}
|
|
16025
16025
|
return w;
|
|
16026
|
-
}, g = R(u), f = !!g, T = s.controlId === d && (s.originControlId || null) === u, p = s.controlComponent === h.VALUE,
|
|
16026
|
+
}, g = R(u), f = !!g, T = s.controlId === d && (s.originControlId || null) === u, p = s.controlComponent === h.VALUE, m = (M) => {
|
|
16027
16027
|
for (let U = i - 1; U >= 0; U--) {
|
|
16028
16028
|
const N = e[U];
|
|
16029
16029
|
if (N.controlId === M && !N.originControlId) {
|
|
@@ -16104,7 +16104,7 @@ class ms {
|
|
|
16104
16104
|
if (i === r && C && (s.controlComponent === h.PLACEHOLDER || s.controlComponent === h.POSTFIX || s.controlComponent === h.POST_TEXT || s.controlComponent === h.POSTTEXTFIX || s.controlComponent === h.POSTTEXTFIX_TEXT))
|
|
16105
16105
|
return i;
|
|
16106
16106
|
if (c && i === r && g && !T && (s.controlComponent === h.POSTFIX || s.controlComponent === h.POST_TEXT || s.controlComponent === h.POSTTEXTFIX || s.controlComponent === h.POSTTEXTFIX_TEXT)) {
|
|
16107
|
-
const U =
|
|
16107
|
+
const U = m(g);
|
|
16108
16108
|
return U >= 0 ? U : i;
|
|
16109
16109
|
}
|
|
16110
16110
|
if (i === r && O && !(c && s.controlComponent === h.VALUE && !s.originControlId))
|
|
@@ -16176,26 +16176,26 @@ class ms {
|
|
|
16176
16176
|
});
|
|
16177
16177
|
}, d = (R) => {
|
|
16178
16178
|
const g = this.control.getElementList(), f = g[R], T = f?.controlId, p = f?.originControlId || null;
|
|
16179
|
-
let
|
|
16179
|
+
let m = -1;
|
|
16180
16180
|
for (let L = R - 1; L >= 0; L--) {
|
|
16181
|
-
const
|
|
16182
|
-
if (
|
|
16181
|
+
const I = g[L];
|
|
16182
|
+
if (I.controlId === T && (I.originControlId || null) === p && I.controlComponent === h.VALUE)
|
|
16183
16183
|
return this.options.mode === v.FORM && console.log("[text-prev-trace-index]", {
|
|
16184
16184
|
from: R,
|
|
16185
16185
|
to: L,
|
|
16186
16186
|
reason: "prev-value"
|
|
16187
16187
|
}), L;
|
|
16188
16188
|
if (p) {
|
|
16189
|
-
if (
|
|
16189
|
+
if (I.controlId && I.controlId !== T && I.originControlId !== p)
|
|
16190
16190
|
break;
|
|
16191
16191
|
} else {
|
|
16192
|
-
if (
|
|
16193
|
-
|
|
16192
|
+
if (I.controlId === T && (I.controlComponent === h.PREFIX || I.controlComponent === h.PRE_TEXT || I.controlComponent === h.PRETEXTFIX || I.controlComponent === h.PRETEXTFIX_TEXT)) {
|
|
16193
|
+
m = L;
|
|
16194
16194
|
break;
|
|
16195
16195
|
}
|
|
16196
|
-
if (
|
|
16196
|
+
if (I.controlId && I.controlId !== T && !I.originControlId)
|
|
16197
16197
|
break;
|
|
16198
|
-
if (
|
|
16198
|
+
if (I.originControlId === T && (I.controlComponent === h.POSTFIX || I.controlComponent === h.POST_TEXT || I.controlComponent === h.POSTTEXTFIX || I.controlComponent === h.POSTTEXTFIX_TEXT))
|
|
16199
16199
|
return this.options.mode === v.FORM && console.log("[text-prev-trace-index]", {
|
|
16200
16200
|
from: R,
|
|
16201
16201
|
to: L,
|
|
@@ -16203,17 +16203,17 @@ class ms {
|
|
|
16203
16203
|
}), L;
|
|
16204
16204
|
}
|
|
16205
16205
|
}
|
|
16206
|
-
if (
|
|
16207
|
-
const L =
|
|
16208
|
-
return
|
|
16206
|
+
if (m >= 0) {
|
|
16207
|
+
const L = m + 1, I = g[L];
|
|
16208
|
+
return I?.controlId === T && (I.controlComponent === h.PLACEHOLDER || I.controlComponent === h.VALUE) ? (this.options.mode === v.FORM && console.log("[text-prev-trace-index]", {
|
|
16209
16209
|
from: R,
|
|
16210
16210
|
to: L,
|
|
16211
16211
|
reason: "prefix-next-editable"
|
|
16212
16212
|
}), L) : (this.options.mode === v.FORM && console.log("[text-prev-trace-index]", {
|
|
16213
16213
|
from: R,
|
|
16214
|
-
to:
|
|
16214
|
+
to: m,
|
|
16215
16215
|
reason: "prefix"
|
|
16216
|
-
}),
|
|
16216
|
+
}), m);
|
|
16217
16217
|
}
|
|
16218
16218
|
return this.options.mode === v.FORM && console.log("[text-prev-trace-index]", {
|
|
16219
16219
|
from: R,
|
|
@@ -16344,8 +16344,8 @@ class ma {
|
|
|
16344
16344
|
});
|
|
16345
16345
|
const L = document.createElement("div");
|
|
16346
16346
|
L.classList.add(`${dt}-date-day`), e.append(n), e.append(c), e.append(L);
|
|
16347
|
-
const
|
|
16348
|
-
|
|
16347
|
+
const I = document.createElement("ul");
|
|
16348
|
+
I.classList.add(`${dt}-time-wrap`);
|
|
16349
16349
|
let O, S, X;
|
|
16350
16350
|
[this.lang.hour, this.lang.minute, this.lang.second].forEach((x, b) => {
|
|
16351
16351
|
const C = document.createElement("li"), F = document.createElement("span");
|
|
@@ -16355,7 +16355,7 @@ class ma {
|
|
|
16355
16355
|
const H = document.createElement("li");
|
|
16356
16356
|
H.innerText = `${String(K).padStart(2, "0")}`, H.setAttribute("data-id", `${K}`), M.append(H);
|
|
16357
16357
|
}
|
|
16358
|
-
U ? O = M : N ? S = M : X = M, C.append(M),
|
|
16358
|
+
U ? O = M : N ? S = M : X = M, C.append(M), I.append(C);
|
|
16359
16359
|
});
|
|
16360
16360
|
const W = document.createElement("div");
|
|
16361
16361
|
W.classList.add(`${dt}-date-menu`);
|
|
@@ -16364,11 +16364,11 @@ class ma {
|
|
|
16364
16364
|
const D = document.createElement("button");
|
|
16365
16365
|
D.classList.add(`${dt}-date-menu__now`), D.innerText = this.lang.now;
|
|
16366
16366
|
const E = document.createElement("button");
|
|
16367
|
-
return E.classList.add(`${dt}-date-menu__submit`), E.innerText = this.lang.confirm, W.append(Y), W.append(D), W.append(E), t.append(e), t.append(
|
|
16367
|
+
return E.classList.add(`${dt}-date-menu__submit`), E.innerText = this.lang.confirm, W.append(Y), W.append(D), W.append(E), t.append(e), t.append(I), t.append(W), this.draw.getContainer().append(t), {
|
|
16368
16368
|
container: t,
|
|
16369
16369
|
dateWrap: e,
|
|
16370
16370
|
datePickerWeek: c,
|
|
16371
|
-
timeWrap:
|
|
16371
|
+
timeWrap: I,
|
|
16372
16372
|
title: {
|
|
16373
16373
|
preYear: i,
|
|
16374
16374
|
preMonth: r,
|
|
@@ -16489,25 +16489,25 @@ class ma {
|
|
|
16489
16489
|
this.dom.day.innerHTML = "";
|
|
16490
16490
|
const f = g - R + 1;
|
|
16491
16491
|
for (let p = f; p <= g; p++) {
|
|
16492
|
-
const
|
|
16493
|
-
|
|
16492
|
+
const m = document.createElement("div");
|
|
16493
|
+
m.classList.add("disable"), m.innerText = `${p}`, m.onclick = () => {
|
|
16494
16494
|
const L = c - 2;
|
|
16495
16495
|
this.now = new Date(a, L, p), this._setDatePick(a, L, p);
|
|
16496
|
-
}, this.dom.day.append(
|
|
16496
|
+
}, this.dom.day.append(m);
|
|
16497
16497
|
}
|
|
16498
16498
|
for (let p = 1; p <= u; p++) {
|
|
16499
|
-
const
|
|
16500
|
-
e === a && n === c && i === p &&
|
|
16501
|
-
const
|
|
16502
|
-
this.now = new Date(a,
|
|
16503
|
-
}, this.dom.day.append(
|
|
16499
|
+
const m = document.createElement("div");
|
|
16500
|
+
e === a && n === c && i === p && m.classList.add("active"), this.pickDate && r === a && s === c && l === p && m.classList.add("select"), m.innerText = `${p}`, m.onclick = (L) => {
|
|
16501
|
+
const I = c - 1;
|
|
16502
|
+
this.now = new Date(a, I, p), this._setDatePick(a, I, p), L.stopPropagation();
|
|
16503
|
+
}, this.dom.day.append(m);
|
|
16504
16504
|
}
|
|
16505
16505
|
const T = 42 - R - u;
|
|
16506
16506
|
for (let p = 1; p <= T; p++) {
|
|
16507
|
-
const
|
|
16508
|
-
|
|
16507
|
+
const m = document.createElement("div");
|
|
16508
|
+
m.classList.add("disable"), m.innerText = `${p}`, m.onclick = () => {
|
|
16509
16509
|
this.now = new Date(a, c, p), this._setDatePick(a, c, p);
|
|
16510
|
-
}, this.dom.day.append(
|
|
16510
|
+
}, this.dom.day.append(m);
|
|
16511
16511
|
}
|
|
16512
16512
|
}
|
|
16513
16513
|
_toggleDateTimePicker() {
|
|
@@ -16782,8 +16782,8 @@ class Po extends ms {
|
|
|
16782
16782
|
const g = u?.numberExclusiveOptions, f = g?.maxLength ?? null, T = g?.decimalPlaces ?? null, p = R.replace(/[.-]/g, "").length;
|
|
16783
16783
|
if (f != null && p > f || T != null && (R.split(".")[1] || "").length > T)
|
|
16784
16784
|
return -1;
|
|
16785
|
-
const
|
|
16786
|
-
return L != null &&
|
|
16785
|
+
const m = Number(R), L = g?.minValue, I = g?.maxValue;
|
|
16786
|
+
return L != null && m < L || I != null && m > I ? -1 : super.setValue(t, e, n);
|
|
16787
16787
|
}
|
|
16788
16788
|
/**
|
|
16789
16789
|
* 设置数值(供弹窗调用,带校验)
|
|
@@ -16811,8 +16811,8 @@ class Po extends ms {
|
|
|
16811
16811
|
p = y;
|
|
16812
16812
|
break;
|
|
16813
16813
|
}
|
|
16814
|
-
const
|
|
16815
|
-
if (
|
|
16814
|
+
const m = this.options.mode === v.FORM, L = m && this.options.modeRule.form.inputTraceEnabled, I = m && this.options.modeRule.form.deleteTraceEnabled, O = ct(/* @__PURE__ */ new Date()).format("YYYY-MM-DD HH:mm:ss");
|
|
16815
|
+
if (I)
|
|
16816
16816
|
for (let y = T + 1; y < p; y++) {
|
|
16817
16817
|
const W = e[y];
|
|
16818
16818
|
W.controlComponent === h.VALUE && !W.strikeout && W.value && (W.strikeout = !0, W.deletePerson = "SYSTEM", W.deleteTime = O), W.controlComponent === h.PLACEHOLDER && (this.control.getDraw().spliceElementList(e, y, 1), p--, y--);
|
|
@@ -16932,22 +16932,22 @@ class Ef {
|
|
|
16932
16932
|
create() {
|
|
16933
16933
|
const { currentValue: t, minValue: e, maxValue: n, decimalPlaces: i, onConfirm: r, onTab: s, onClose: l } = this.options, a = document.createElement("div");
|
|
16934
16934
|
a.classList.add(`${dt}-number-input-modal`), a.setAttribute(Dn, Ln.POPUP);
|
|
16935
|
-
const c = (
|
|
16936
|
-
if (
|
|
16935
|
+
const c = (I) => {
|
|
16936
|
+
if (I.type === "mouseup") {
|
|
16937
16937
|
const O = this.options.control.getDraw().getCanvasEvent();
|
|
16938
16938
|
O.setIsAllowDrag(!1), O.setIsAllowSelection(!1);
|
|
16939
16939
|
}
|
|
16940
|
-
|
|
16940
|
+
I.stopPropagation();
|
|
16941
16941
|
};
|
|
16942
16942
|
a.addEventListener("mousedown", c), a.addEventListener("mouseup", c), a.addEventListener("click", c), a.addEventListener("keydown", c), a.addEventListener("input", c);
|
|
16943
16943
|
const d = document.createElement("div");
|
|
16944
16944
|
d.classList.add(`${dt}-number-input-modal__content`);
|
|
16945
16945
|
const u = document.createElement("div");
|
|
16946
16946
|
if (u.classList.add(`${dt}-number-input-modal__title`), u.textContent = "请输入数值", d.appendChild(u), e !== void 0 || n !== void 0) {
|
|
16947
|
-
const
|
|
16948
|
-
|
|
16947
|
+
const I = document.createElement("div");
|
|
16948
|
+
I.classList.add(`${dt}-number-input-modal__hint`);
|
|
16949
16949
|
let O = "有效范围:";
|
|
16950
|
-
e !== void 0 && n !== void 0 ? O += `${e} ~ ${n}` : e !== void 0 ? O += `≥ ${e}` : O += `≤ ${n}`, i != null && (O += `,保留${i}位小数`),
|
|
16950
|
+
e !== void 0 && n !== void 0 ? O += `${e} ~ ${n}` : e !== void 0 ? O += `≥ ${e}` : O += `≤ ${n}`, i != null && (O += `,保留${i}位小数`), I.textContent = O, d.appendChild(I);
|
|
16951
16951
|
}
|
|
16952
16952
|
const R = document.createElement("input");
|
|
16953
16953
|
R.classList.add(`${dt}-number-input-modal__input`), R.type = "number", R.value = t, R.placeholder = "请输入数值", e !== void 0 && (R.min = String(e)), n !== void 0 && (R.max = String(n)), i != null && (R.step = (1 / Math.pow(10, i)).toString()), setTimeout(() => {
|
|
@@ -16963,17 +16963,17 @@ class Ef {
|
|
|
16963
16963
|
}, f.appendChild(T);
|
|
16964
16964
|
const p = document.createElement("button");
|
|
16965
16965
|
p.classList.add(`${dt}-number-input-modal__confirm`), p.textContent = "确定";
|
|
16966
|
-
const
|
|
16967
|
-
const
|
|
16968
|
-
if (!
|
|
16966
|
+
const m = () => {
|
|
16967
|
+
const I = R.value.trim();
|
|
16968
|
+
if (!I)
|
|
16969
16969
|
return r("");
|
|
16970
|
-
const O = parseFloat(
|
|
16971
|
-
return Number.isNaN(O) || !Number.isFinite(O) ? (g.textContent = "请输入有效的数值", g.style.display = "block", !1) : i != null && (
|
|
16970
|
+
const O = parseFloat(I);
|
|
16971
|
+
return Number.isNaN(O) || !Number.isFinite(O) ? (g.textContent = "请输入有效的数值", g.style.display = "block", !1) : i != null && (I.split(".")[1] || "").length > i ? (g.textContent = `小数位数不能超过${i}位`, g.style.display = "block", !1) : e !== void 0 && O < e ? (g.textContent = `数值不能小于 ${e}`, g.style.display = "block", !1) : n !== void 0 && O > n ? (g.textContent = `数值不能大于 ${n}`, g.style.display = "block", !1) : (g.style.display = "none", r(I));
|
|
16972
16972
|
};
|
|
16973
16973
|
p.onclick = () => {
|
|
16974
|
-
|
|
16975
|
-
}, f.appendChild(p), d.appendChild(f), a.appendChild(d), R.onkeydown = (
|
|
16976
|
-
|
|
16974
|
+
m() && l();
|
|
16975
|
+
}, f.appendChild(p), d.appendChild(f), a.appendChild(d), R.onkeydown = (I) => {
|
|
16976
|
+
I.key === "Enter" ? p.click() : I.key === "Tab" ? (I.preventDefault(), m() && (l(), s(I.shiftKey ? ne.UP : ne.DOWN))) : I.key === "Escape" && l();
|
|
16977
16977
|
}, this.options.control.getContainer().appendChild(a), this.popupDom = a;
|
|
16978
16978
|
}
|
|
16979
16979
|
destroy() {
|
|
@@ -17030,39 +17030,39 @@ class Xf {
|
|
|
17030
17030
|
const u = document.createElement("div");
|
|
17031
17031
|
u.classList.add("dialog-option");
|
|
17032
17032
|
for (let T = 0; T < this.data.length; T++) {
|
|
17033
|
-
const p = this.data[T],
|
|
17034
|
-
if (
|
|
17033
|
+
const p = this.data[T], m = document.createElement("div");
|
|
17034
|
+
if (m.classList.add("dialog-option__item"), p.visible === !1 && (m.style.display = "none"), p.label) {
|
|
17035
17035
|
const L = document.createElement("span");
|
|
17036
|
-
L.append(document.createTextNode(p.label)),
|
|
17036
|
+
L.append(document.createTextNode(p.label)), m.append(L), p.required && L.classList.add("dialog-option__item--require");
|
|
17037
17037
|
}
|
|
17038
17038
|
if (p.type === "radio") {
|
|
17039
17039
|
const L = document.createElement("div");
|
|
17040
|
-
L.classList.add("dialog-radio-group"), p.horizontal && L.classList.add("dialog-radio-group--horizontal"), p.options?.forEach((
|
|
17040
|
+
L.classList.add("dialog-radio-group"), p.horizontal && L.classList.add("dialog-radio-group--horizontal"), p.options?.forEach((I) => {
|
|
17041
17041
|
const O = document.createElement("label");
|
|
17042
17042
|
O.classList.add("dialog-radio-item");
|
|
17043
17043
|
const S = document.createElement("input");
|
|
17044
|
-
S.type = "radio", S.name = p.name, S.value =
|
|
17044
|
+
S.type = "radio", S.name = p.name, S.value = I.value, I.value === (p.value || "") && (S.checked = !0);
|
|
17045
17045
|
const X = document.createElement("span");
|
|
17046
|
-
X.textContent =
|
|
17046
|
+
X.textContent = I.label, O.append(S), O.append(X), L.append(O), S.addEventListener("change", () => {
|
|
17047
17047
|
this._updateFieldVisibility();
|
|
17048
17048
|
}), this.inputList.push(S);
|
|
17049
|
-
}),
|
|
17049
|
+
}), m.append(L);
|
|
17050
17050
|
} else if (p.type === "select") {
|
|
17051
|
-
const L = document.createElement("select"),
|
|
17051
|
+
const L = document.createElement("select"), I = p.value || "";
|
|
17052
17052
|
p.options?.forEach((O) => {
|
|
17053
17053
|
const S = document.createElement("option");
|
|
17054
|
-
S.value = O.value, S.label = O.label, O.value ===
|
|
17055
|
-
}), L.name = p.name, L.value =
|
|
17054
|
+
S.value = O.value, S.label = O.label, O.value === I && (S.selected = !0), L.append(S);
|
|
17055
|
+
}), L.name = p.name, L.value = I, L.addEventListener("change", () => {
|
|
17056
17056
|
this._updateFieldVisibility();
|
|
17057
|
-
}), p.width && (L.style.width = `${p.width}px`),
|
|
17057
|
+
}), p.width && (L.style.width = `${p.width}px`), m.append(L), this.inputList.push(L);
|
|
17058
17058
|
} else if (p.type === "textarea") {
|
|
17059
17059
|
const L = document.createElement("textarea");
|
|
17060
|
-
L.name = p.name, L.value = p.value || "", L.placeholder = p.placeholder || "", p.width && (L.style.width = `${p.width}px`), p.height && (L.style.height = `${p.height}px`),
|
|
17060
|
+
L.name = p.name, L.value = p.value || "", L.placeholder = p.placeholder || "", p.width && (L.style.width = `${p.width}px`), p.height && (L.style.height = `${p.height}px`), m.append(L), this.inputList.push(L);
|
|
17061
17061
|
} else {
|
|
17062
17062
|
const L = document.createElement("input");
|
|
17063
|
-
L.type = p.type, L.name = p.name, L.value = p.value || "", L.placeholder = p.placeholder || "", p.width && (L.style.width = `${p.width}px`), p.height && (L.style.height = `${p.height}px`),
|
|
17063
|
+
L.type = p.type, L.name = p.name, L.value = p.value || "", L.placeholder = p.placeholder || "", p.width && (L.style.width = `${p.width}px`), p.height && (L.style.height = `${p.height}px`), m.append(L), this.inputList.push(L);
|
|
17064
17064
|
}
|
|
17065
|
-
u.append(
|
|
17065
|
+
u.append(m), this.optionItemContainers.push(m);
|
|
17066
17066
|
}
|
|
17067
17067
|
l.append(u);
|
|
17068
17068
|
const R = document.createElement("div");
|
|
@@ -17075,15 +17075,15 @@ class Xf {
|
|
|
17075
17075
|
f.append(document.createTextNode("确定")), f.type = "submit", f.onclick = () => {
|
|
17076
17076
|
if (i) {
|
|
17077
17077
|
const T = /* @__PURE__ */ new Set(), p = [];
|
|
17078
|
-
for (const
|
|
17079
|
-
if (!T.has(
|
|
17080
|
-
if (
|
|
17078
|
+
for (const m of this.inputList)
|
|
17079
|
+
if (!T.has(m.name))
|
|
17080
|
+
if (m instanceof HTMLInputElement && m.type === "radio") {
|
|
17081
17081
|
const L = this.inputList.find(
|
|
17082
|
-
(
|
|
17082
|
+
(I) => I.name === m.name && I instanceof HTMLInputElement && I.checked
|
|
17083
17083
|
);
|
|
17084
|
-
L && (p.push({ name:
|
|
17084
|
+
L && (p.push({ name: m.name, value: L.value }), T.add(m.name));
|
|
17085
17085
|
} else
|
|
17086
|
-
p.push({ name:
|
|
17086
|
+
p.push({ name: m.name, value: m.value }), T.add(m.name);
|
|
17087
17087
|
i(p);
|
|
17088
17088
|
}
|
|
17089
17089
|
this._dispose();
|
|
@@ -17156,28 +17156,28 @@ class An {
|
|
|
17156
17156
|
for (; f < i.length && R(i[f]) && i[f].controlComponent !== h.POSTFIX; )
|
|
17157
17157
|
f++;
|
|
17158
17158
|
f >= i.length && (f = l);
|
|
17159
|
-
let T = l + 1, p = a - l,
|
|
17160
|
-
l === a && (p = 0, c.controlComponent === h.PREFIX ?
|
|
17161
|
-
const L = i[Math.max(
|
|
17159
|
+
let T = l + 1, p = a - l, m = c.controlComponent === h.POSTFIX ? l : l + 1;
|
|
17160
|
+
l === a && (p = 0, c.controlComponent === h.PREFIX ? m = g + 1 : c.controlComponent === h.POSTFIX && (m = f), T = m), p > 0 && (s.spliceElementList(i, T, p), m = T);
|
|
17161
|
+
const L = i[Math.max(m - 1, g)] || i[g] || c, I = Re(L, [
|
|
17162
17162
|
"control",
|
|
17163
17163
|
"controlId",
|
|
17164
17164
|
"originControlId",
|
|
17165
17165
|
...Pe
|
|
17166
17166
|
]);
|
|
17167
|
-
|
|
17167
|
+
I.control = this.element.control || c.control, I.controlId = d, u ? I.originControlId = u : delete I.originControlId;
|
|
17168
17168
|
const O = [];
|
|
17169
17169
|
for (let S = 0; S < t.length; S++) {
|
|
17170
17170
|
const X = {
|
|
17171
|
-
...
|
|
17171
|
+
...I,
|
|
17172
17172
|
...t[S],
|
|
17173
17173
|
type: P.CONTROL,
|
|
17174
17174
|
controlComponent: h.VALUE
|
|
17175
17175
|
};
|
|
17176
|
-
X.color = this.options.defaultColor, X.highlight = void 0, ge(i, [X],
|
|
17176
|
+
X.color = this.options.defaultColor, X.highlight = void 0, ge(i, [X], m + S - 1, {
|
|
17177
17177
|
editorOptions: this.options
|
|
17178
17178
|
}), O.push(X);
|
|
17179
17179
|
}
|
|
17180
|
-
return O.length && s.spliceElementList(i,
|
|
17180
|
+
return O.length && s.spliceElementList(i, m, 0, O), this.syncControlValue(i, d, u), m + t.length - 1;
|
|
17181
17181
|
}
|
|
17182
17182
|
syncControlValue(t, e, n) {
|
|
17183
17183
|
const i = t.filter((s) => s.controlId === e && (s.originControlId || null) === n && s.controlComponent === h.VALUE).map((s) => {
|
|
@@ -17516,11 +17516,11 @@ class Yr {
|
|
|
17516
17516
|
let u = c.originControlId || c.controlId, R = c.originControlId && (c.controlComponent === h.POSTFIX || c.controlComponent === h.POSTTEXTFIX || c.controlComponent === h.POSTTEXTFIX_TEXT || c.controlComponent === h.POST_TEXT);
|
|
17517
17517
|
if (!R && c.controlId && (c.controlComponent === h.POSTFIX || c.controlComponent === h.POSTTEXTFIX || c.controlComponent === h.POSTTEXTFIX_TEXT || c.controlComponent === h.POST_TEXT) && d?.controlId && d.controlId !== c.controlId)
|
|
17518
17518
|
if (d.controlComponent === h.PREFIX || d.controlComponent === h.PRETEXTFIX)
|
|
17519
|
-
for (let
|
|
17520
|
-
const L = i[
|
|
17519
|
+
for (let m = s; m >= 0; m--) {
|
|
17520
|
+
const L = i[m];
|
|
17521
17521
|
if (L.controlId === c.controlId && (L.controlComponent === h.PREFIX || L.controlComponent === h.PRETEXTFIX)) {
|
|
17522
|
-
for (let
|
|
17523
|
-
const O = i[
|
|
17522
|
+
for (let I = m - 1; I >= 0; I--) {
|
|
17523
|
+
const O = i[I];
|
|
17524
17524
|
if (O.controlId && O.controlId !== c.controlId && (O.controlComponent === h.PRETEXTFIX || O.controlComponent === h.PRETEXTFIX_TEXT || O.controlComponent === h.PREFIX || O.controlComponent === h.PRE_TEXT)) {
|
|
17525
17525
|
u = O.controlId, R = !0;
|
|
17526
17526
|
break;
|
|
@@ -17533,11 +17533,11 @@ class Yr {
|
|
|
17533
17533
|
}
|
|
17534
17534
|
else (d.controlComponent === h.POSTFIX || d.controlComponent === h.POSTTEXTFIX) && (u = d.controlId, R = !0);
|
|
17535
17535
|
if (!R && c.controlId && (c.controlComponent === h.POSTFIX || c.controlComponent === h.POSTTEXTFIX || c.controlComponent === h.POSTTEXTFIX_TEXT || c.controlComponent === h.POST_TEXT))
|
|
17536
|
-
for (let
|
|
17537
|
-
const L = i[
|
|
17536
|
+
for (let m = s; m >= 0; m--) {
|
|
17537
|
+
const L = i[m];
|
|
17538
17538
|
if (L.controlId === c.controlId && (L.controlComponent === h.PREFIX || L.controlComponent === h.PRETEXTFIX)) {
|
|
17539
|
-
for (let
|
|
17540
|
-
const O = i[
|
|
17539
|
+
for (let I = m - 1; I >= 0; I--) {
|
|
17540
|
+
const O = i[I];
|
|
17541
17541
|
if (O.controlId && O.controlId !== c.controlId && (O.controlComponent === h.PRETEXTFIX || O.controlComponent === h.PRETEXTFIX_TEXT || O.controlComponent === h.PREFIX || O.controlComponent === h.PRE_TEXT)) {
|
|
17542
17542
|
u = O.controlId, R = !0;
|
|
17543
17543
|
break;
|
|
@@ -17554,22 +17554,22 @@ class Yr {
|
|
|
17554
17554
|
...Pe
|
|
17555
17555
|
]) : Ve(c, ["type"]);
|
|
17556
17556
|
R && (g.controlId = u, delete g.originControlId);
|
|
17557
|
-
const f = r.startIndex + 1, T = [], p = (
|
|
17558
|
-
const L = T.length ? T : i,
|
|
17559
|
-
ge(L, [
|
|
17557
|
+
const f = r.startIndex + 1, T = [], p = (m) => {
|
|
17558
|
+
const L = T.length ? T : i, I = T.length ? T.length - 1 : r.startIndex;
|
|
17559
|
+
ge(L, [m], I, {
|
|
17560
17560
|
editorOptions: this.options
|
|
17561
|
-
}), T.push(
|
|
17561
|
+
}), T.push(m);
|
|
17562
17562
|
};
|
|
17563
|
-
for (let
|
|
17564
|
-
const L = t[
|
|
17563
|
+
for (let m = 0; m < t.length; m++) {
|
|
17564
|
+
const L = t[m];
|
|
17565
17565
|
if (L.type === P.CONTROL && L.control) {
|
|
17566
|
-
const
|
|
17566
|
+
const I = L, O = I.controlId || mt(), S = I.control?.value || [], X = I.control?.type === V.TEXTFIELD, y = {
|
|
17567
17567
|
...g,
|
|
17568
17568
|
controlId: O,
|
|
17569
17569
|
type: P.CONTROL,
|
|
17570
|
-
control:
|
|
17570
|
+
control: I.control,
|
|
17571
17571
|
originControlId: u
|
|
17572
|
-
}, W = X ? h.PRETEXTFIX : h.PREFIX, Y = X ? h.POSTTEXTFIX : h.POSTFIX, D = X ?
|
|
17572
|
+
}, W = X ? h.PRETEXTFIX : h.PREFIX, Y = X ? h.POSTTEXTFIX : h.POSTFIX, D = X ? I.control?.preTextFix || this.options.control.preTextFix : I.control?.prefix || this.options.control.prefix;
|
|
17573
17573
|
for (let x = 0; x < D.length; x++) {
|
|
17574
17574
|
const b = {
|
|
17575
17575
|
...y,
|
|
@@ -17590,7 +17590,7 @@ class Yr {
|
|
|
17590
17590
|
(C.color === this.options.control.textFixColor || C.color === this.options.control.placeholderColor) && (C.color = this.options.defaultColor), p(C);
|
|
17591
17591
|
}
|
|
17592
17592
|
if (S.length === 0) {
|
|
17593
|
-
const x =
|
|
17593
|
+
const x = I.control?.placeholder || "";
|
|
17594
17594
|
for (let b = 0; b < x.length; b++) {
|
|
17595
17595
|
const C = {
|
|
17596
17596
|
...y,
|
|
@@ -17601,7 +17601,7 @@ class Yr {
|
|
|
17601
17601
|
p(C);
|
|
17602
17602
|
}
|
|
17603
17603
|
}
|
|
17604
|
-
const E = X ?
|
|
17604
|
+
const E = X ? I.control?.postTextFix || this.options.control.postTextFix : I.control?.postfix || this.options.control.postfix;
|
|
17605
17605
|
for (let x = 0; x < E.length; x++) {
|
|
17606
17606
|
const b = {
|
|
17607
17607
|
...y,
|
|
@@ -17612,12 +17612,12 @@ class Yr {
|
|
|
17612
17612
|
}
|
|
17613
17613
|
} else if (L.type || L.value) {
|
|
17614
17614
|
g.color = this.options.defaultColor;
|
|
17615
|
-
const
|
|
17615
|
+
const I = {
|
|
17616
17616
|
...g,
|
|
17617
17617
|
...L,
|
|
17618
17618
|
controlComponent: h.VALUE
|
|
17619
17619
|
};
|
|
17620
|
-
R && (
|
|
17620
|
+
R && (I.color = this.element.control?.color ?? this.options.defaultColor, this.element.control?.highlight ? I.highlight = this.element.control.highlight : delete I.highlight), (I.color === this.options.control.textFixColor || I.color === this.options.control.placeholderColor) && (I.color = this.options.defaultColor), p(I);
|
|
17621
17621
|
}
|
|
17622
17622
|
}
|
|
17623
17623
|
return T.length && a.spliceElementList(i, f, 0, T), r.startIndex + T.length;
|
|
@@ -17637,8 +17637,8 @@ class Yr {
|
|
|
17637
17637
|
return null;
|
|
17638
17638
|
const e = this.control.getElementList(), n = this.control.getRange(), i = n.startIndex, r = n.endIndex;
|
|
17639
17639
|
if (t.key === Tt.Backspace && i === r && i > 0) {
|
|
17640
|
-
const p = e[i - 1],
|
|
17641
|
-
if ((
|
|
17640
|
+
const p = e[i - 1], m = p?.controlComponent === h.POSTFIX || p?.controlComponent === h.POSTTEXTFIX, L = p?.controlComponent === h.PLACEHOLDER, I = !!p?.controlId, S = this.draws.getPosition().getPositionList(), X = S[i], y = S[i - 1], W = X && y && X.rowIndex === y.rowIndex;
|
|
17641
|
+
if ((m || L) && I && W)
|
|
17642
17642
|
return this.control.removeControl(i - 1);
|
|
17643
17643
|
}
|
|
17644
17644
|
this.control.shrinkBoundary();
|
|
@@ -17775,24 +17775,24 @@ class Ur {
|
|
|
17775
17775
|
return -1;
|
|
17776
17776
|
const { elementList: i, range: r } = this.control.mergeControl(e), s = this.control.getDraw(), { startIndex: l } = r, c = i[l].controlId;
|
|
17777
17777
|
let d = l;
|
|
17778
|
-
for (let
|
|
17779
|
-
const L = i[
|
|
17778
|
+
for (let m = l; m >= 0; m--) {
|
|
17779
|
+
const L = i[m];
|
|
17780
17780
|
if (L.controlId !== c)
|
|
17781
17781
|
break;
|
|
17782
17782
|
if (L.controlComponent === h.PREFIX) {
|
|
17783
|
-
d =
|
|
17783
|
+
d = m;
|
|
17784
17784
|
break;
|
|
17785
17785
|
}
|
|
17786
17786
|
}
|
|
17787
17787
|
let u = l;
|
|
17788
|
-
for (let
|
|
17789
|
-
const L = i[
|
|
17788
|
+
for (let m = l; m < i.length; m++) {
|
|
17789
|
+
const L = i[m];
|
|
17790
17790
|
if (L.controlId !== c) {
|
|
17791
|
-
u =
|
|
17791
|
+
u = m;
|
|
17792
17792
|
break;
|
|
17793
17793
|
}
|
|
17794
17794
|
if (L.controlComponent === h.POSTFIX) {
|
|
17795
|
-
u =
|
|
17795
|
+
u = m;
|
|
17796
17796
|
break;
|
|
17797
17797
|
}
|
|
17798
17798
|
}
|
|
@@ -17803,18 +17803,18 @@ class Ur {
|
|
|
17803
17803
|
"controlId",
|
|
17804
17804
|
...Pe
|
|
17805
17805
|
]), p = d + 1;
|
|
17806
|
-
for (let
|
|
17806
|
+
for (let m = 0; m < t.length; m++) {
|
|
17807
17807
|
const L = {
|
|
17808
17808
|
...T,
|
|
17809
|
-
...t[
|
|
17809
|
+
...t[m],
|
|
17810
17810
|
// 将换行符转换为ZERO,与formatElementList保持一致
|
|
17811
|
-
value: t[
|
|
17812
|
-
` ? _ : t[
|
|
17811
|
+
value: t[m].value === `
|
|
17812
|
+
` ? _ : t[m].value,
|
|
17813
17813
|
controlComponent: h.VALUE
|
|
17814
17814
|
};
|
|
17815
17815
|
(L.color === this.options.control.bracketColor || L.color === this.options.control.placeholderColor) && (L.color = this.options.defaultColor), ge(i, [L], d, {
|
|
17816
17816
|
editorOptions: this.options
|
|
17817
|
-
}), s.spliceElementList(i, p +
|
|
17817
|
+
}), s.spliceElementList(i, p + m, 0, [L]);
|
|
17818
17818
|
}
|
|
17819
17819
|
return p + t.length - 1;
|
|
17820
17820
|
}
|
|
@@ -18004,11 +18004,11 @@ ${u} `;
|
|
|
18004
18004
|
const S = T[O];
|
|
18005
18005
|
S.controlId === p && S.control && (S.control.menstrualData = f);
|
|
18006
18006
|
}
|
|
18007
|
-
const
|
|
18007
|
+
const m = this.generateDisplayText(f), L = this.textToElements(m);
|
|
18008
18008
|
this.closeModal();
|
|
18009
|
-
const
|
|
18010
|
-
|
|
18011
|
-
curIndex:
|
|
18009
|
+
const I = this.setValue(L);
|
|
18010
|
+
I !== -1 && (this.control.repaintControl({
|
|
18011
|
+
curIndex: I
|
|
18012
18012
|
}), this.control.emitControlContentChange({}));
|
|
18013
18013
|
});
|
|
18014
18014
|
}
|
|
@@ -18163,14 +18163,14 @@ class bf {
|
|
|
18163
18163
|
const s = n[t - 1], l = s?.controlComponent === h.POSTFIX || s?.controlComponent === h.POSTTEXTFIX, a = s?.controlComponent === h.PLACEHOLDER, c = !!s?.controlId, d = !!s?.originControlId;
|
|
18164
18164
|
let u = !1;
|
|
18165
18165
|
if (d) {
|
|
18166
|
-
const
|
|
18166
|
+
const m = s.originControlId;
|
|
18167
18167
|
for (let L = t; L < n.length; L++) {
|
|
18168
|
-
const
|
|
18169
|
-
if (
|
|
18168
|
+
const I = n[L];
|
|
18169
|
+
if (I.controlId === m && !I.originControlId) {
|
|
18170
18170
|
u = !0;
|
|
18171
18171
|
break;
|
|
18172
18172
|
}
|
|
18173
|
-
if (
|
|
18173
|
+
if (I.controlId && I.controlId !== m && I.originControlId !== m)
|
|
18174
18174
|
break;
|
|
18175
18175
|
}
|
|
18176
18176
|
}
|
|
@@ -18491,10 +18491,10 @@ class bf {
|
|
|
18491
18491
|
return;
|
|
18492
18492
|
}
|
|
18493
18493
|
if (!u) {
|
|
18494
|
-
const T = this.getElementList(), p = this.getRange(), { startIndex:
|
|
18494
|
+
const T = this.getElementList(), p = this.getRange(), { startIndex: m } = p;
|
|
18495
18495
|
let L = null;
|
|
18496
|
-
for (let
|
|
18497
|
-
const O = T[
|
|
18496
|
+
for (let I = m; I >= 0; I--) {
|
|
18497
|
+
const O = T[I];
|
|
18498
18498
|
if (O.controlComponent === h.PRETEXTFIX || O.controlComponent === h.PRETEXTFIX_TEXT || O.controlComponent === h.PREFIX || O.controlComponent === h.PRE_TEXT) {
|
|
18499
18499
|
L = O.controlId || null;
|
|
18500
18500
|
break;
|
|
@@ -18774,8 +18774,8 @@ class bf {
|
|
|
18774
18774
|
removeControl(t, e = {}) {
|
|
18775
18775
|
const n = e.elementList || this.getElementList(), i = n[t];
|
|
18776
18776
|
if (!this.draw.isDesignMode() && !i?.control?.hide && !i?.area?.hide) {
|
|
18777
|
-
const { deletable:
|
|
18778
|
-
if (!
|
|
18777
|
+
const { deletable: I = !0 } = i.control;
|
|
18778
|
+
if (!I)
|
|
18779
18779
|
return null;
|
|
18780
18780
|
const O = this.draw.getMode();
|
|
18781
18781
|
if (O === v.FORM && this.options.modeRule[O].controlDeletableDisabled)
|
|
@@ -18785,9 +18785,9 @@ class bf {
|
|
|
18785
18785
|
const l = !!i.originControlId, a = i.controlId, c = i.originControlId, d = i.control?.type === V.BUTTON && !i.control?.buttonText ? `${a}_text` : "";
|
|
18786
18786
|
let u = t;
|
|
18787
18787
|
for (; u >= 0; ) {
|
|
18788
|
-
const
|
|
18788
|
+
const I = n[u];
|
|
18789
18789
|
let O = !1;
|
|
18790
|
-
if (l ? O =
|
|
18790
|
+
if (l ? O = I.controlId === a && I.originControlId === c : O = I.controlId === a && !I.originControlId, !O) {
|
|
18791
18791
|
r = u;
|
|
18792
18792
|
break;
|
|
18793
18793
|
}
|
|
@@ -18795,9 +18795,9 @@ class bf {
|
|
|
18795
18795
|
}
|
|
18796
18796
|
let R = t;
|
|
18797
18797
|
for (; R < n.length; ) {
|
|
18798
|
-
const
|
|
18798
|
+
const I = n[R];
|
|
18799
18799
|
let O = !1;
|
|
18800
|
-
if (l ? O =
|
|
18800
|
+
if (l ? O = I.controlId === a && I.originControlId === c : O = I.controlId === a && !I.originControlId, !O) {
|
|
18801
18801
|
s = R - 1;
|
|
18802
18802
|
break;
|
|
18803
18803
|
}
|
|
@@ -18819,36 +18819,36 @@ class bf {
|
|
|
18819
18819
|
if (e.removePrev)
|
|
18820
18820
|
e.removePrev();
|
|
18821
18821
|
else {
|
|
18822
|
-
const
|
|
18823
|
-
|
|
18822
|
+
const I = this.draw.getTd();
|
|
18823
|
+
I && this.createRemoveControlHandler(I, i.controlId, !0);
|
|
18824
18824
|
}
|
|
18825
18825
|
if (!e.removeNext && T && !l && g.controlComponent !== h.PRETEXTFIX && g.type !== P.SPLIT_TAG)
|
|
18826
18826
|
if (e.removePrev)
|
|
18827
18827
|
e.removePrev();
|
|
18828
18828
|
else {
|
|
18829
|
-
const
|
|
18830
|
-
|
|
18829
|
+
const I = this.draw.getTd();
|
|
18830
|
+
I && this.createRemoveControlHandler(I, i.controlId, !0);
|
|
18831
18831
|
}
|
|
18832
18832
|
if (!e.removePrev && T && !l && n[s].controlComponent !== h.POSTFIX)
|
|
18833
18833
|
if (e.removeNext)
|
|
18834
18834
|
e.removeNext();
|
|
18835
18835
|
else {
|
|
18836
|
-
const
|
|
18837
|
-
p = !!
|
|
18836
|
+
const I = this.draw.getTd();
|
|
18837
|
+
p = !!I?.linkTdNextId, I && this.createRemoveControlHandler(I, i.controlId, !1);
|
|
18838
18838
|
}
|
|
18839
18839
|
if (!e.removePrev && T && !l && n[s].controlComponent !== h.POSTTEXTFIX)
|
|
18840
18840
|
if (e.removeNext)
|
|
18841
18841
|
e.removeNext();
|
|
18842
18842
|
else {
|
|
18843
|
-
const
|
|
18844
|
-
p = !!
|
|
18843
|
+
const I = this.draw.getTd();
|
|
18844
|
+
p = !!I?.linkTdNextId, I && this.createRemoveControlHandler(I, i.controlId, !1);
|
|
18845
18845
|
}
|
|
18846
18846
|
this.draw.spliceElementList(n, r + 1, s - r);
|
|
18847
|
-
let
|
|
18847
|
+
let m = 0;
|
|
18848
18848
|
if (d)
|
|
18849
|
-
for (let
|
|
18850
|
-
n[
|
|
18851
|
-
const L = r -
|
|
18849
|
+
for (let I = n.length - 1; I >= 0; I--)
|
|
18850
|
+
n[I].controlId === d && (I <= r && m++, n.splice(I, 1));
|
|
18851
|
+
const L = r - m;
|
|
18852
18852
|
return !e.elementList && p && r === 0 ? this.draw.fixPosition(!0) ?? L : L;
|
|
18853
18853
|
}
|
|
18854
18854
|
createRemoveControlHandler(t, e, n) {
|
|
@@ -18996,13 +18996,13 @@ class bf {
|
|
|
18996
18996
|
if (!g.control || n && g.control.groupId !== n || e && g.controlId !== e || i && g.control.conceptId !== i || r && g.areaId !== r)
|
|
18997
18997
|
continue;
|
|
18998
18998
|
const { type: f, code: T, valueSets: p } = g.control;
|
|
18999
|
-
let
|
|
19000
|
-
const
|
|
19001
|
-
for (;
|
|
19002
|
-
const O = d[
|
|
18999
|
+
let m = R, L = "";
|
|
19000
|
+
const I = [];
|
|
19001
|
+
for (; m < d.length; ) {
|
|
19002
|
+
const O = d[m];
|
|
19003
19003
|
if (O.controlId !== g.controlId)
|
|
19004
19004
|
break;
|
|
19005
|
-
(f === V.TEXT || f === V.TEXTFIELD || f === V.DATE || f === V.NUMBER) && O.controlComponent === h.VALUE && (L += O.value,
|
|
19005
|
+
(f === V.TEXT || f === V.TEXTFIELD || f === V.DATE || f === V.NUMBER) && O.controlComponent === h.VALUE && (L += O.value, I.push(Ve(O, ji))), m++;
|
|
19006
19006
|
}
|
|
19007
19007
|
if (f === V.TEXT || f === V.TEXTFIELD || f === V.DATE || f === V.NUMBER)
|
|
19008
19008
|
s.push({
|
|
@@ -19010,7 +19010,7 @@ class bf {
|
|
|
19010
19010
|
zone: u,
|
|
19011
19011
|
value: L || null,
|
|
19012
19012
|
innerText: L || null,
|
|
19013
|
-
elementList: vt(
|
|
19013
|
+
elementList: vt(I)
|
|
19014
19014
|
});
|
|
19015
19015
|
else if (f === V.SELECT || f === V.CHECKBOX || f === V.RADIO) {
|
|
19016
19016
|
const O = T?.split(",").map((S) => p?.find((X) => X.code === S)?.value).filter(Boolean).join("");
|
|
@@ -19021,7 +19021,7 @@ class bf {
|
|
|
19021
19021
|
innerText: O || null
|
|
19022
19022
|
});
|
|
19023
19023
|
}
|
|
19024
|
-
R =
|
|
19024
|
+
R = m;
|
|
19025
19025
|
}
|
|
19026
19026
|
}, c = [
|
|
19027
19027
|
{
|
|
@@ -19050,9 +19050,9 @@ class bf {
|
|
|
19050
19050
|
for (; a < s.length; ) {
|
|
19051
19051
|
const c = s[a];
|
|
19052
19052
|
if (a++, c.type === P.TABLE) {
|
|
19053
|
-
const
|
|
19054
|
-
for (let O = 0; O <
|
|
19055
|
-
const S =
|
|
19053
|
+
const I = c.trList;
|
|
19054
|
+
for (let O = 0; O < I.length; O++) {
|
|
19055
|
+
const S = I[O];
|
|
19056
19056
|
for (let X = 0; X < S.tdList.length; X++) {
|
|
19057
19057
|
const y = S.tdList[X];
|
|
19058
19058
|
i(y.value, y.id);
|
|
@@ -19061,7 +19061,7 @@ class bf {
|
|
|
19061
19061
|
}
|
|
19062
19062
|
if (!c.control || c.type === P.SPLIT_TAG)
|
|
19063
19063
|
continue;
|
|
19064
|
-
const d = t.find((
|
|
19064
|
+
const d = t.find((I) => (!I.groupId || I.groupId === c.control?.groupId) && (I.id && c.controlId === I.id || I.conceptId && c.control.conceptId === I.conceptId || I.areaId && c.areaId === I.areaId));
|
|
19065
19065
|
if (!d)
|
|
19066
19066
|
continue;
|
|
19067
19067
|
const { value: u, isSubmitHistory: R = !0 } = d;
|
|
@@ -19077,67 +19077,67 @@ class bf {
|
|
|
19077
19077
|
range: T ?? f,
|
|
19078
19078
|
elementList: s,
|
|
19079
19079
|
tdId: l
|
|
19080
|
-
},
|
|
19080
|
+
}, m = {
|
|
19081
19081
|
isIgnoreDisabledRule: !0,
|
|
19082
19082
|
isIgnoreDeletedRule: !0
|
|
19083
19083
|
};
|
|
19084
19084
|
if (g === V.TEXTFIELD) {
|
|
19085
|
-
const
|
|
19086
|
-
|
|
19085
|
+
const I = Array.isArray(u) ? u : u ? [{ value: u }] : [];
|
|
19086
|
+
I.length && ae(I, {
|
|
19087
19087
|
isHandleFirstElement: !1,
|
|
19088
19088
|
editorOptions: this.options
|
|
19089
19089
|
});
|
|
19090
19090
|
const O = new Yr(c, this);
|
|
19091
|
-
this.activeControl = O,
|
|
19091
|
+
this.activeControl = O, I.length ? O.setValue(I, p, m) : O.clearValue(p, m);
|
|
19092
19092
|
} else if (g === V.TEXT) {
|
|
19093
|
-
const
|
|
19094
|
-
|
|
19093
|
+
const I = Array.isArray(u) ? u : u ? [{ value: u }] : [];
|
|
19094
|
+
I.length && ae(I, {
|
|
19095
19095
|
isHandleFirstElement: !1,
|
|
19096
19096
|
editorOptions: this.options
|
|
19097
19097
|
});
|
|
19098
19098
|
const O = new ms(c, this);
|
|
19099
|
-
this.activeControl = O,
|
|
19099
|
+
this.activeControl = O, I.length ? O.setValue(I, p, m) : O.clearValue(p, m);
|
|
19100
19100
|
} else if (g === V.SELECT) {
|
|
19101
19101
|
if (Array.isArray(u))
|
|
19102
19102
|
continue;
|
|
19103
|
-
const
|
|
19104
|
-
this.activeControl =
|
|
19103
|
+
const I = new po(c, this);
|
|
19104
|
+
this.activeControl = I, u ? I.setSelect(u, p, m) : I.clearSelect(p, m);
|
|
19105
19105
|
} else if (g === V.CHECKBOX) {
|
|
19106
19106
|
if (Array.isArray(u))
|
|
19107
19107
|
continue;
|
|
19108
|
-
const
|
|
19109
|
-
this.activeControl =
|
|
19108
|
+
const I = new ui(c, this);
|
|
19109
|
+
this.activeControl = I;
|
|
19110
19110
|
const O = u ? u.split(",") : [];
|
|
19111
|
-
|
|
19111
|
+
I.setSelect(O, p, m);
|
|
19112
19112
|
} else if (g === V.RADIO) {
|
|
19113
19113
|
if (Array.isArray(u))
|
|
19114
19114
|
continue;
|
|
19115
|
-
const
|
|
19116
|
-
this.activeControl =
|
|
19115
|
+
const I = new cs(c, this);
|
|
19116
|
+
this.activeControl = I;
|
|
19117
19117
|
const O = u ? [u] : [];
|
|
19118
|
-
|
|
19118
|
+
I.setSelect(O, p, m);
|
|
19119
19119
|
} else if (g === V.DATE) {
|
|
19120
|
-
const
|
|
19121
|
-
this.activeControl =
|
|
19120
|
+
const I = new Lo(c, this);
|
|
19121
|
+
this.activeControl = I, $i(u) ? (u.length && ae(u, {
|
|
19122
19122
|
isHandleFirstElement: !1,
|
|
19123
19123
|
editorOptions: this.options
|
|
19124
|
-
}),
|
|
19124
|
+
}), I.setValue(u, p, m)) : Qa(u) ? I.setSelect(u, p, m) : I.clearSelect(p, m);
|
|
19125
19125
|
} else if (g === V.NUMBER) {
|
|
19126
|
-
const
|
|
19127
|
-
|
|
19126
|
+
const I = Array.isArray(u) ? u : u ? [{ value: u }] : [];
|
|
19127
|
+
I.length && ae(I, {
|
|
19128
19128
|
isHandleFirstElement: !1,
|
|
19129
19129
|
editorOptions: this.options
|
|
19130
19130
|
});
|
|
19131
19131
|
const O = new Po(c, this);
|
|
19132
|
-
this.activeControl = O,
|
|
19132
|
+
this.activeControl = O, I.length ? O.setValue(I, p, m) : O.clearValue(p, m);
|
|
19133
19133
|
} else if (g === V.BUTTON) {
|
|
19134
|
-
const
|
|
19135
|
-
|
|
19134
|
+
const I = Array.isArray(u) ? u : u ? [{ value: u }] : [];
|
|
19135
|
+
I.length && ae(I, {
|
|
19136
19136
|
isHandleFirstElement: !1,
|
|
19137
19137
|
editorOptions: this.options
|
|
19138
19138
|
});
|
|
19139
19139
|
const O = new An(c, this);
|
|
19140
|
-
this.activeControl = O,
|
|
19140
|
+
this.activeControl = O, I.length ? O.setValue(I, p, m) : O.clearSelect(p, m);
|
|
19141
19141
|
}
|
|
19142
19142
|
this.emitControlContentChange({
|
|
19143
19143
|
context: p
|
|
@@ -19218,8 +19218,8 @@ class bf {
|
|
|
19218
19218
|
for (let f = 0; f < g.length; f++) {
|
|
19219
19219
|
const T = g[f];
|
|
19220
19220
|
for (let p = 0; p < T.tdList.length; p++) {
|
|
19221
|
-
const
|
|
19222
|
-
i(
|
|
19221
|
+
const m = T.tdList[p];
|
|
19222
|
+
i(m.value);
|
|
19223
19223
|
}
|
|
19224
19224
|
}
|
|
19225
19225
|
}
|
|
@@ -19243,13 +19243,13 @@ class bf {
|
|
|
19243
19243
|
const g = {
|
|
19244
19244
|
...a.control.numberExclusiveOptions,
|
|
19245
19245
|
...d.numberExclusiveOptions
|
|
19246
|
-
}, f = g?.minValue, T = g?.maxValue, p = new Po(a, this),
|
|
19246
|
+
}, f = g?.minValue, T = g?.maxValue, p = new Po(a, this), m = p.getValue({
|
|
19247
19247
|
elementList: s,
|
|
19248
19248
|
range: { startIndex: l - 1, endIndex: l - 1 }
|
|
19249
19249
|
});
|
|
19250
|
-
if (
|
|
19251
|
-
const L =
|
|
19252
|
-
!Number.isNaN(
|
|
19250
|
+
if (m.length > 0) {
|
|
19251
|
+
const L = m.map((O) => O.value).join(""), I = Number(L);
|
|
19252
|
+
!Number.isNaN(I) && Number.isFinite(I) && (f != null && I < f || T != null && I > T) && p.clearValue({
|
|
19253
19253
|
elementList: s,
|
|
19254
19254
|
range: { startIndex: l - 1, endIndex: l - 1 }
|
|
19255
19255
|
}, { isAddPlaceholder: !0 });
|
|
@@ -19405,20 +19405,20 @@ class bf {
|
|
|
19405
19405
|
const g = R.trList || [];
|
|
19406
19406
|
for (let f = g.length - 1; f >= 0; f--) {
|
|
19407
19407
|
const T = g[f], p = T.tdList;
|
|
19408
|
-
for (let
|
|
19409
|
-
const L = p[
|
|
19410
|
-
if (
|
|
19408
|
+
for (let m = p.length - 1; m >= 0; m--) {
|
|
19409
|
+
const L = p[m], I = l(L.value, L.value.length - 1);
|
|
19410
|
+
if (I)
|
|
19411
19411
|
return {
|
|
19412
19412
|
positionContext: {
|
|
19413
19413
|
isTable: !0,
|
|
19414
19414
|
index: u,
|
|
19415
19415
|
trIndex: f,
|
|
19416
|
-
tdIndex:
|
|
19416
|
+
tdIndex: m,
|
|
19417
19417
|
tdId: L.id,
|
|
19418
19418
|
trId: T.id,
|
|
19419
19419
|
tableId: R.id
|
|
19420
19420
|
},
|
|
19421
|
-
nextIndex:
|
|
19421
|
+
nextIndex: I.nextIndex
|
|
19422
19422
|
};
|
|
19423
19423
|
}
|
|
19424
19424
|
}
|
|
@@ -19441,11 +19441,11 @@ class bf {
|
|
|
19441
19441
|
if (r.tableId) {
|
|
19442
19442
|
const c = this.draw.getOriginalElementList(), { index: d, trIndex: u, tdIndex: R } = e, g = c[d].trList;
|
|
19443
19443
|
for (let T = u; T >= 0; T--) {
|
|
19444
|
-
const p = g[T],
|
|
19445
|
-
for (let L =
|
|
19444
|
+
const p = g[T], m = p.tdList;
|
|
19445
|
+
for (let L = m.length - 1; L >= 0; L--) {
|
|
19446
19446
|
if (u === T && L >= R)
|
|
19447
19447
|
continue;
|
|
19448
|
-
const
|
|
19448
|
+
const I = m[L], O = l(I.value, I.value.length - 1);
|
|
19449
19449
|
if (O)
|
|
19450
19450
|
return {
|
|
19451
19451
|
positionContext: {
|
|
@@ -19453,7 +19453,7 @@ class bf {
|
|
|
19453
19453
|
index: e.index,
|
|
19454
19454
|
trIndex: T,
|
|
19455
19455
|
tdIndex: L,
|
|
19456
|
-
tdId:
|
|
19456
|
+
tdId: I.id,
|
|
19457
19457
|
trId: p.id,
|
|
19458
19458
|
tableId: r.tableId
|
|
19459
19459
|
},
|
|
@@ -19483,20 +19483,20 @@ class bf {
|
|
|
19483
19483
|
const g = R.trList || [];
|
|
19484
19484
|
for (let f = 0; f < g.length; f++) {
|
|
19485
19485
|
const T = g[f], p = T.tdList;
|
|
19486
|
-
for (let
|
|
19487
|
-
const L = p[
|
|
19488
|
-
if (
|
|
19486
|
+
for (let m = 0; m < p.length; m++) {
|
|
19487
|
+
const L = p[m], I = l(L.value, 0);
|
|
19488
|
+
if (I)
|
|
19489
19489
|
return {
|
|
19490
19490
|
positionContext: {
|
|
19491
19491
|
isTable: !0,
|
|
19492
19492
|
index: u,
|
|
19493
19493
|
trIndex: f,
|
|
19494
|
-
tdIndex:
|
|
19494
|
+
tdIndex: m,
|
|
19495
19495
|
tdId: L.id,
|
|
19496
19496
|
trId: T.id,
|
|
19497
19497
|
tableId: R.id
|
|
19498
19498
|
},
|
|
19499
|
-
nextIndex:
|
|
19499
|
+
nextIndex: I.nextIndex
|
|
19500
19500
|
};
|
|
19501
19501
|
}
|
|
19502
19502
|
}
|
|
@@ -19519,11 +19519,11 @@ class bf {
|
|
|
19519
19519
|
if (r.tableId) {
|
|
19520
19520
|
const c = this.draw.getOriginalElementList(), { index: d, trIndex: u, tdIndex: R } = e, g = c[d].trList;
|
|
19521
19521
|
for (let T = u; T < g.length; T++) {
|
|
19522
|
-
const p = g[T],
|
|
19523
|
-
for (let L = 0; L <
|
|
19522
|
+
const p = g[T], m = p.tdList;
|
|
19523
|
+
for (let L = 0; L < m.length; L++) {
|
|
19524
19524
|
if (u === T && L <= R)
|
|
19525
19525
|
continue;
|
|
19526
|
-
const
|
|
19526
|
+
const I = m[L], O = l(I.value, 0);
|
|
19527
19527
|
if (O)
|
|
19528
19528
|
return {
|
|
19529
19529
|
positionContext: {
|
|
@@ -19531,7 +19531,7 @@ class bf {
|
|
|
19531
19531
|
index: e.index,
|
|
19532
19532
|
trIndex: T,
|
|
19533
19533
|
tdIndex: L,
|
|
19534
|
-
tdId:
|
|
19534
|
+
tdId: I.id,
|
|
19535
19535
|
trId: p.id,
|
|
19536
19536
|
tableId: r.tableId
|
|
19537
19537
|
},
|
|
@@ -19606,14 +19606,14 @@ class bf {
|
|
|
19606
19606
|
const a = { startIndex: i, endIndex: i }, c = [];
|
|
19607
19607
|
let d = !1, u = i, R = s, g = e;
|
|
19608
19608
|
for (; u >= 0; ) {
|
|
19609
|
-
const
|
|
19610
|
-
if (
|
|
19609
|
+
const m = g[u];
|
|
19610
|
+
if (m.controlId !== l.controlId)
|
|
19611
19611
|
break;
|
|
19612
|
-
if (
|
|
19612
|
+
if (m.type !== P.SPLIT_TAG && (c.unshift(m), d && (g.splice(u, 1), e[0].type === P.SPLIT_TAG ? e.splice(0, 1) : (n.startIndex++, n.endIndex++), e.unshift(m)), a.startIndex = u), u === 0 && m.controlComponent !== h.PREFIX && R?.linkTdPrevId && (R = this.draw.getTdById(R.linkTdPrevId), R)) {
|
|
19613
19613
|
g = R.value, u = R.value.length - 1, d = !0;
|
|
19614
19614
|
continue;
|
|
19615
19615
|
}
|
|
19616
|
-
if (u === 0 &&
|
|
19616
|
+
if (u === 0 && m.controlComponent !== h.PRETEXTFIX && R?.linkTdPrevId && (R = this.draw.getTdById(R.linkTdPrevId), R)) {
|
|
19617
19617
|
g = R.value, u = R.value.length - 1, d = !0;
|
|
19618
19618
|
continue;
|
|
19619
19619
|
}
|
|
@@ -19622,14 +19622,14 @@ class bf {
|
|
|
19622
19622
|
d = !1;
|
|
19623
19623
|
let f = i + 1, T = s, p = e;
|
|
19624
19624
|
for (; f < p.length; ) {
|
|
19625
|
-
const
|
|
19626
|
-
if (
|
|
19625
|
+
const m = p[f];
|
|
19626
|
+
if (m.controlId !== l.controlId)
|
|
19627
19627
|
break;
|
|
19628
|
-
if (
|
|
19628
|
+
if (m.type !== P.SPLIT_TAG && (c.push(m), d && (p.splice(f, 1), e.push(m), f--)), f === p.length - 1 && m.controlComponent !== h.POSTFIX && T?.linkTdNextId && (T = this.draw.getTdById(T.linkTdNextId), T)) {
|
|
19629
19629
|
p = T.value, f = 0, d = !0;
|
|
19630
19630
|
continue;
|
|
19631
19631
|
}
|
|
19632
|
-
if (f === p.length - 1 &&
|
|
19632
|
+
if (f === p.length - 1 && m.controlComponent !== h.POSTTEXTFIX && T?.linkTdNextId && (T = this.draw.getTdById(T.linkTdNextId), T)) {
|
|
19633
19633
|
p = T.value, f = 0, d = !0;
|
|
19634
19634
|
continue;
|
|
19635
19635
|
}
|
|
@@ -19768,8 +19768,8 @@ class Df {
|
|
|
19768
19768
|
Y > f.height && (u === me.TOP ? s -= y - f.height : u === me.MIDDLE && (s -= (Y - f.height) / 2));
|
|
19769
19769
|
}
|
|
19770
19770
|
}
|
|
19771
|
-
const
|
|
19772
|
-
e.save(), e.beginPath(), e.translate(0.5, 0.5), T?.value ? (e.lineWidth = a, e.strokeStyle = c, e.rect(
|
|
19771
|
+
const m = Math.round(n + p * R), L = Math.round(s - f.height + a), I = f.width - (p + l) * R, O = f.height;
|
|
19772
|
+
e.save(), e.beginPath(), e.translate(0.5, 0.5), T?.value ? (e.lineWidth = a, e.strokeStyle = c, e.rect(m, L, I, O), e.stroke(), e.beginPath(), e.fillStyle = c, e.fillRect(m, L, I, O), e.beginPath(), e.strokeStyle = d, e.lineWidth = a * 2 * R, e.moveTo(m + 2 * R, L + O / 2), e.lineTo(m + I / 2, L + O - 3 * R), e.lineTo(m + I - 2 * R, L + 3 * R), e.stroke()) : (e.lineWidth = a, e.rect(m, L, I, O), e.stroke()), e.closePath(), e.restore();
|
|
19773
19773
|
}
|
|
19774
19774
|
}
|
|
19775
19775
|
class Yf {
|
|
@@ -19800,8 +19800,8 @@ class Yf {
|
|
|
19800
19800
|
Y > f.height && (u === me.TOP ? s -= y - f.height : u === me.MIDDLE && (s -= (Y - f.height) / 2));
|
|
19801
19801
|
}
|
|
19802
19802
|
}
|
|
19803
|
-
const
|
|
19804
|
-
e.save(), e.beginPath(), e.translate(0.5, 0.5), e.strokeStyle = T?.value ? c : d, e.lineWidth = a, e.arc(
|
|
19803
|
+
const m = Math.round(n + p * R), L = Math.round(s - f.height + a), I = f.width - (p + l) * R, O = f.height;
|
|
19804
|
+
e.save(), e.beginPath(), e.translate(0.5, 0.5), e.strokeStyle = T?.value ? c : d, e.lineWidth = a, e.arc(m + I / 2, L + O / 2, I / 2, 0, Math.PI * 2), e.stroke(), T?.value && (e.beginPath(), e.fillStyle = c, e.arc(m + I / 2, L + O / 2, I / 3, 0, Math.PI * 2), e.fill()), e.closePath(), e.restore();
|
|
19805
19805
|
}
|
|
19806
19806
|
}
|
|
19807
19807
|
const Bo = {
|
|
@@ -19847,14 +19847,14 @@ class Uf {
|
|
|
19847
19847
|
O && (T = O);
|
|
19848
19848
|
}
|
|
19849
19849
|
T && (u += c.measureText(T).width + s), c.font = `${r}px "Microsoft YaHei", sans-serif`;
|
|
19850
|
-
const p = this.getValue(d.periodMin),
|
|
19851
|
-
if (p ||
|
|
19852
|
-
const O = `${p || ""}~${
|
|
19850
|
+
const p = this.getValue(d.periodMin), m = this.getValue(d.periodMax);
|
|
19851
|
+
if (p || m) {
|
|
19852
|
+
const O = `${p || ""}~${m || ""}`;
|
|
19853
19853
|
R = Math.max(R, c.measureText(O).width);
|
|
19854
19854
|
}
|
|
19855
|
-
const L = this.getValue(d.cycleMin),
|
|
19856
|
-
if (L ||
|
|
19857
|
-
const O = `${L || ""}~${
|
|
19855
|
+
const L = this.getValue(d.cycleMin), I = this.getValue(d.cycleMax);
|
|
19856
|
+
if (L || I) {
|
|
19857
|
+
const O = `${L || ""}~${I || ""}`;
|
|
19858
19858
|
R = Math.max(R, c.measureText(O).width);
|
|
19859
19859
|
}
|
|
19860
19860
|
} else
|
|
@@ -19900,13 +19900,13 @@ class Uf {
|
|
|
19900
19900
|
const C = `${f}岁`;
|
|
19901
19901
|
t.fillText(C, e, g), T = e + t.measureText(C).width + d;
|
|
19902
19902
|
}
|
|
19903
|
-
const p = T + u / 2,
|
|
19903
|
+
const p = T + u / 2, m = R + c;
|
|
19904
19904
|
t.font = `${a}px "Microsoft YaHei", sans-serif`;
|
|
19905
|
-
const L = this.getValue(i.periodMin),
|
|
19905
|
+
const L = this.getValue(i.periodMin), I = this.getValue(i.periodMax);
|
|
19906
19906
|
let O = "";
|
|
19907
|
-
L ||
|
|
19907
|
+
L || I ? O = `${L || ""}~${I || ""}` : (t.font = `${l}px "Microsoft YaHei", sans-serif`, O = "~");
|
|
19908
19908
|
const S = t.measureText(O).width, X = p - S / 2;
|
|
19909
|
-
t.fillText(O, X,
|
|
19909
|
+
t.fillText(O, X, m), this.drawDivider(t, T, g - l / 2, u, r), t.font = `${l}px "Microsoft YaHei", sans-serif`;
|
|
19910
19910
|
let y = "";
|
|
19911
19911
|
if (i.isMenopause) {
|
|
19912
19912
|
const C = this.getValue(i.menopauseAge);
|
|
@@ -20055,14 +20055,14 @@ class Uf {
|
|
|
20055
20055
|
cycleMin: f.querySelector("#mh-edit-cycleMin")?.value || "",
|
|
20056
20056
|
cycleMax: f.querySelector("#mh-edit-cycleMax")?.value || ""
|
|
20057
20057
|
}, this.clearMenstrualHistoryEditor();
|
|
20058
|
-
const
|
|
20059
|
-
this.draw.spliceElementList(
|
|
20060
|
-
const
|
|
20058
|
+
const m = this.draw.getElementList(), L = e.index;
|
|
20059
|
+
this.draw.spliceElementList(m, L, 1);
|
|
20060
|
+
const I = {
|
|
20061
20061
|
type: "menstrualHistory",
|
|
20062
20062
|
value: "",
|
|
20063
20063
|
menstrualData: p
|
|
20064
20064
|
};
|
|
20065
|
-
this.draw.spliceElementList(
|
|
20065
|
+
this.draw.spliceElementList(m, L, 0, [I]), this.draw.getControl().destroyControl(), this.draw.getRange().clearRange(), this.draw.render({
|
|
20066
20066
|
isSetCursor: !1,
|
|
20067
20067
|
isCompute: !0
|
|
20068
20068
|
});
|
|
@@ -20116,12 +20116,12 @@ class wf {
|
|
|
20116
20116
|
e.save();
|
|
20117
20117
|
const a = Zr, c = a.fontSize * l, d = a.symbolGap * l, u = a.lineGap * l, R = a.totalHeight * l, g = n + a.totalWidth * l / 2, T = i - R / 2;
|
|
20118
20118
|
e.font = `${c}px "Microsoft YaHei", sans-serif`, e.fillStyle = this.options.defaultColor, e.textBaseline = "middle", e.textAlign = "center";
|
|
20119
|
-
const p = R / 4,
|
|
20119
|
+
const p = R / 4, m = T + p * 0.7, L = T + p * 1.7, I = T + p * 2.7, O = T + R - p * 0.3;
|
|
20120
20120
|
this.drawVerticalLine(e, g, T, O - T, l);
|
|
20121
20121
|
const S = g - d, X = g + d;
|
|
20122
|
-
this.drawSymbol(e, S,
|
|
20122
|
+
this.drawSymbol(e, S, m, s?.a), this.drawSymbol(e, X, m, s?.b);
|
|
20123
20123
|
const y = S - u, W = X + u;
|
|
20124
|
-
e.fillText("-", y, L), this.drawSymbol(e, S, L, s?.c), this.drawSymbol(e, X, L, s?.d), e.fillText("-", W, L), this.drawSymbol(e, S,
|
|
20124
|
+
e.fillText("-", y, L), this.drawSymbol(e, S, L, s?.c), this.drawSymbol(e, X, L, s?.d), e.fillText("-", W, L), this.drawSymbol(e, S, I, s?.e), this.drawSymbol(e, X, I, s?.f), e.restore();
|
|
20125
20125
|
}
|
|
20126
20126
|
/**
|
|
20127
20127
|
* 绘制符号 (+ 或 -)
|
|
@@ -20276,14 +20276,14 @@ class Zf {
|
|
|
20276
20276
|
* 计算横线半宽(根据内容动态计算,最小50px,最大80px)
|
|
20277
20277
|
*/
|
|
20278
20278
|
calculateLineHalfWidth(t, e) {
|
|
20279
|
-
const { minLineHalfWidth: n, maxLineHalfWidth: i, fontSize: r, deciduousFontSize: s, smallFontSize: l, toothGap: a } = hn, c = (T, p,
|
|
20279
|
+
const { minLineHalfWidth: n, maxLineHalfWidth: i, fontSize: r, deciduousFontSize: s, smallFontSize: l, toothGap: a } = hn, c = (T, p, m) => {
|
|
20280
20280
|
let L = 0;
|
|
20281
|
-
const
|
|
20281
|
+
const I = (O, S) => `${O}-${S}`;
|
|
20282
20282
|
return p.forEach((O) => {
|
|
20283
|
-
const S = m
|
|
20283
|
+
const S = I(m, O), X = t?.toothSurfaceMap?.[S] || [], y = t?.supernumeraryToothMap?.[S];
|
|
20284
20284
|
L += s * e * 0.6, X.length > 0 && (L += l * e * X.length * 0.5), y && (L += s * e * 0.4), L += a * e;
|
|
20285
20285
|
}), T.forEach((O) => {
|
|
20286
|
-
const S = m
|
|
20286
|
+
const S = I(m, O), X = t?.toothSurfaceMap?.[S] || [], y = t?.supernumeraryToothMap?.[S];
|
|
20287
20287
|
L += r * e * 0.6, X.length > 0 && (L += l * e * X.length * 0.5), y && (L += r * e * 0.4), L += a * e;
|
|
20288
20288
|
}), L;
|
|
20289
20289
|
}, d = Math.max(c(t?.upperLeft || [], t?.upperLeftLetter || [], "upperLeft"), c(t?.lowerLeft || [], t?.lowerLeftLetter || [], "lowerLeft")), u = Math.max(c(t?.upperRight || [], t?.upperRightLetter || [], "upperRight"), c(t?.lowerRight || [], t?.lowerRightLetter || [], "lowerRight")), g = Math.max(d, u) / e + hn.halfGap;
|
|
@@ -20295,8 +20295,8 @@ class Zf {
|
|
|
20295
20295
|
render(t) {
|
|
20296
20296
|
const { ctx: e, x: n, y: i, element: r } = t, s = r.toothPositionData, l = this.options.scale;
|
|
20297
20297
|
e.save();
|
|
20298
|
-
const a = hn.fontSize * l, c = hn.deciduousFontSize * l, d = hn.smallFontSize * l, u = hn.toothGap * l, R = hn.totalHeight * l, g = hn.halfGap * l, f = 2 * l, T = (X, y) => `${X}-${y}`, p = this.calculateLineHalfWidth(s, l),
|
|
20299
|
-
e.beginPath(), e.rect(L - p,
|
|
20298
|
+
const a = hn.fontSize * l, c = hn.deciduousFontSize * l, d = hn.smallFontSize * l, u = hn.toothGap * l, R = hn.totalHeight * l, g = hn.halfGap * l, f = 2 * l, T = (X, y) => `${X}-${y}`, p = this.calculateLineHalfWidth(s, l), m = p * 2, L = n + p, I = i;
|
|
20299
|
+
e.beginPath(), e.rect(L - p, I - R / 2, m, R), e.clip(), e.beginPath(), e.strokeStyle = this.options.defaultColor, e.lineWidth = 1 * l, e.moveTo(L, I - R / 2 + 10 * l), e.lineTo(L, I + R / 2 - 10 * l), e.stroke(), e.beginPath(), e.moveTo(L - p, I), e.lineTo(L + p, I), e.stroke();
|
|
20300
20300
|
const O = (X, y, W, Y, D) => {
|
|
20301
20301
|
const E = T(X, y), x = s?.toothSurfaceMap?.[E] || [], b = Qr.filter((w) => x.includes(w)), C = s?.supernumeraryToothMap?.[E], F = y.toString(), U = typeof y == "string" ? c : a;
|
|
20302
20302
|
e.font = `${U}px "Microsoft YaHei", sans-serif`, e.textBaseline = "middle";
|
|
@@ -20328,7 +20328,7 @@ class Zf {
|
|
|
20328
20328
|
x = O(W, b, x, D, E);
|
|
20329
20329
|
}));
|
|
20330
20330
|
};
|
|
20331
|
-
S(s?.upperLeft || [], s?.upperLeftLetter || [], "upperLeft", L - g,
|
|
20331
|
+
S(s?.upperLeft || [], s?.upperLeftLetter || [], "upperLeft", L - g, I - R / 4, "right"), S(s?.upperRight || [], s?.upperRightLetter || [], "upperRight", L + g, I - R / 4, "left"), S(s?.lowerLeft || [], s?.lowerLeftLetter || [], "lowerLeft", L - g, I + R / 4, "right"), S(s?.lowerRight || [], s?.lowerRightLetter || [], "lowerRight", L + g, I + R / 4, "left"), e.restore();
|
|
20332
20332
|
}
|
|
20333
20333
|
/**
|
|
20334
20334
|
* 清除编辑弹窗
|
|
@@ -20862,7 +20862,7 @@ class Zf {
|
|
|
20862
20862
|
if (!e)
|
|
20863
20863
|
return;
|
|
20864
20864
|
const n = (d, u) => `${d}-${u}`, i = (d, u) => {
|
|
20865
|
-
const R = n(d, u), g = this.toothSurfaceMap[R] || [], f = Qr.filter((O) => g.includes(O)), T = this.supernumeraryToothMap[R], p = u.toString(), L = typeof u == "string" ? "tooth-preview-tooth-value tooth-preview-tooth-value--deciduous" : "tooth-preview-tooth-value",
|
|
20865
|
+
const R = n(d, u), g = this.toothSurfaceMap[R] || [], f = Qr.filter((O) => g.includes(O)), T = this.supernumeraryToothMap[R], p = u.toString(), L = typeof u == "string" ? "tooth-preview-tooth-value tooth-preview-tooth-value--deciduous" : "tooth-preview-tooth-value", I = f.length > 0 ? `<sup class="tooth-preview-surface">${f.join(",")}</sup>` : "";
|
|
20866
20866
|
if (T) {
|
|
20867
20867
|
const O = '<sup class="tooth-preview-supernumerary">S</sup>';
|
|
20868
20868
|
return T === "Si" ? `<span class="tooth-preview-tooth">
|
|
@@ -20870,18 +20870,18 @@ class Zf {
|
|
|
20870
20870
|
${O}
|
|
20871
20871
|
<span class="${L}">${p}</span>
|
|
20872
20872
|
<span class="tooth-preview-tooth-bracket">)</span>
|
|
20873
|
-
${
|
|
20873
|
+
${I}
|
|
20874
20874
|
</span>` : `<span class="tooth-preview-tooth">
|
|
20875
20875
|
<span class="tooth-preview-tooth-bracket">(</span>
|
|
20876
20876
|
<span class="${L}">${p}</span>
|
|
20877
20877
|
${O}
|
|
20878
20878
|
<span class="tooth-preview-tooth-bracket">)</span>
|
|
20879
|
-
${
|
|
20879
|
+
${I}
|
|
20880
20880
|
</span>`;
|
|
20881
20881
|
} else
|
|
20882
20882
|
return `<span class="tooth-preview-tooth">
|
|
20883
20883
|
<span class="${L}">${p}</span>
|
|
20884
|
-
${
|
|
20884
|
+
${I}
|
|
20885
20885
|
</span>`;
|
|
20886
20886
|
}, r = (d, u, R) => {
|
|
20887
20887
|
const g = [];
|
|
@@ -21273,20 +21273,20 @@ class Af {
|
|
|
21273
21273
|
p.classList.add("rotate"), p.onclick = () => {
|
|
21274
21274
|
a += 1, this._setPreviewerTransform(l, a, r, s);
|
|
21275
21275
|
}, c.append(p);
|
|
21276
|
-
const
|
|
21277
|
-
|
|
21276
|
+
const m = document.createElement("i");
|
|
21277
|
+
m.classList.add("original-size"), m.onclick = () => {
|
|
21278
21278
|
r = 0, s = 0, l = 1, a = 0, this._setPreviewerTransform(l, a, r, s);
|
|
21279
|
-
}, c.append(
|
|
21279
|
+
}, c.append(m);
|
|
21280
21280
|
const L = document.createElement("i");
|
|
21281
21281
|
L.classList.add("image-download"), L.onclick = () => {
|
|
21282
21282
|
const { mime: X } = this.previewerDrawOption;
|
|
21283
21283
|
qr(i.src, `${this.curElement?.id}.${X || "png"}`);
|
|
21284
21284
|
}, c.append(L), t.append(c), this.previewerContainer = t, document.body.append(t);
|
|
21285
|
-
let
|
|
21285
|
+
let I = 0, O = 0, S = !1;
|
|
21286
21286
|
i.onmousedown = (X) => {
|
|
21287
|
-
S = !0,
|
|
21287
|
+
S = !0, I = X.x, O = X.y, t.style.cursor = "move";
|
|
21288
21288
|
}, t.onmousemove = (X) => {
|
|
21289
|
-
S && (r += X.x -
|
|
21289
|
+
S && (r += X.x - I, s += X.y - O, I = X.x, O = X.y, this._setPreviewerTransform(l, a, r, s));
|
|
21290
21290
|
}, t.onmouseup = () => {
|
|
21291
21291
|
S = !1, t.style.cursor = "auto";
|
|
21292
21292
|
}, t.onwheel = (X) => {
|
|
@@ -21788,12 +21788,12 @@ class cT {
|
|
|
21788
21788
|
this.indicatorContainer = document.createElement("div"), this.indicatorContainer.classList.add(`${dt}-zone-indicator`);
|
|
21789
21789
|
const u = this.draw.getHeader(), R = this.draw.getFooter(), g = e ? u.getHeight() : R.getHeight(), f = e ? u.getHeaderTop() : a - R.getFooterBottom() - g;
|
|
21790
21790
|
for (let T = 0; T < r.length; T++) {
|
|
21791
|
-
const p = d * T + f,
|
|
21791
|
+
const p = d * T + f, m = s[3] - this.INDICATOR_PADDING, L = s[3] + l + this.INDICATOR_PADDING, I = e ? p - this.INDICATOR_PADDING : p + g + this.INDICATOR_PADDING, O = e ? p + g + this.INDICATOR_PADDING : p - this.INDICATOR_PADDING, S = document.createElement("div");
|
|
21792
21792
|
S.innerText = this.i18n.t(`frame.${e ? "header" : "footer"}`), S.style.top = `${O}px`, S.style.transform = `translate(${n * t}px, ${i * t}px) scale(${t})`, this.indicatorContainer.append(S);
|
|
21793
21793
|
const X = document.createElement("span");
|
|
21794
|
-
X.classList.add(`${dt}-zone-indicator-border__top`), X.style.top = `${
|
|
21794
|
+
X.classList.add(`${dt}-zone-indicator-border__top`), X.style.top = `${I}px`, X.style.width = `${l}px`, X.style.marginLeft = `${s[3]}px`, this.indicatorContainer.append(X);
|
|
21795
21795
|
const y = document.createElement("span");
|
|
21796
|
-
y.classList.add(`${dt}-zone-indicator-border__left`), y.style.top = `${p}px`, y.style.height = `${g}px`, y.style.left = `${
|
|
21796
|
+
y.classList.add(`${dt}-zone-indicator-border__left`), y.style.top = `${p}px`, y.style.height = `${g}px`, y.style.left = `${m}px`, this.indicatorContainer.append(y);
|
|
21797
21797
|
const W = document.createElement("span");
|
|
21798
21798
|
W.classList.add(`${dt}-zone-indicator-border__bottom`), W.style.top = `${O}px`, this.indicatorContainer.append(W);
|
|
21799
21799
|
const Y = document.createElement("span");
|
|
@@ -22025,7 +22025,7 @@ class uT {
|
|
|
22025
22025
|
c += d * u;
|
|
22026
22026
|
const { coordinate: { leftTop: [R, g] } } = n, f = R - r + c, T = g + l;
|
|
22027
22027
|
if (a.listStyle === Ee.CHECKBOX) {
|
|
22028
|
-
const { width: p, height:
|
|
22028
|
+
const { width: p, height: m, gap: L } = this.options.checkbox, I = {
|
|
22029
22029
|
...a,
|
|
22030
22030
|
checkbox: {
|
|
22031
22031
|
value: !!a.checkbox?.value
|
|
@@ -22033,7 +22033,7 @@ class uT {
|
|
|
22033
22033
|
metrics: {
|
|
22034
22034
|
...a.metrics,
|
|
22035
22035
|
width: (p + L * 2) * u,
|
|
22036
|
-
height:
|
|
22036
|
+
height: m * u
|
|
22037
22037
|
}
|
|
22038
22038
|
};
|
|
22039
22039
|
this.draw.getCheckboxParticle().render({
|
|
@@ -22043,7 +22043,7 @@ class uT {
|
|
|
22043
22043
|
index: 0,
|
|
22044
22044
|
row: {
|
|
22045
22045
|
...e,
|
|
22046
|
-
elementList: [
|
|
22046
|
+
elementList: [I, ...e.elementList]
|
|
22047
22047
|
}
|
|
22048
22048
|
});
|
|
22049
22049
|
} else {
|
|
@@ -22296,10 +22296,10 @@ class fT {
|
|
|
22296
22296
|
const { scale: n, lineNumber: { color: i, size: r, font: s, right: l, type: a } } = this.options, c = this.draw.getTextParticle(), d = this.draw.getMargins(), u = this.draw.getPosition().getOriginalMainPositionList(), g = this.draw.getPageRowList()[e];
|
|
22297
22297
|
t.save(), t.fillStyle = i, t.font = `${r * n}px ${s}`;
|
|
22298
22298
|
for (let f = 0; f < g.length; f++) {
|
|
22299
|
-
const T = g[f], { coordinate: { leftBottom: p } } = u[T.startIndex],
|
|
22300
|
-
value: `${
|
|
22301
|
-
}),
|
|
22302
|
-
t.fillText(`${
|
|
22299
|
+
const T = g[f], { coordinate: { leftBottom: p } } = u[T.startIndex], m = a === li.PAGE ? f + 1 : T.rowIndex + 1, L = c.measureText(t, {
|
|
22300
|
+
value: `${m}`
|
|
22301
|
+
}), I = d[3] - (L.width + l) * n, O = p[1] - L.actualBoundingBoxAscent * n;
|
|
22302
|
+
t.fillText(`${m}`, I, O);
|
|
22303
22303
|
}
|
|
22304
22304
|
t.restore();
|
|
22305
22305
|
}
|
|
@@ -22366,7 +22366,7 @@ class mT {
|
|
|
22366
22366
|
height: r,
|
|
22367
22367
|
tdList: T
|
|
22368
22368
|
};
|
|
22369
|
-
for (let
|
|
22369
|
+
for (let m = 0; m < e; m++)
|
|
22370
22370
|
T.push({
|
|
22371
22371
|
colspan: 1,
|
|
22372
22372
|
rowspan: 1,
|
|
@@ -22656,29 +22656,29 @@ class mT {
|
|
|
22656
22656
|
const { index: l } = t, d = this.draw.getOriginalElementList()[l].trList;
|
|
22657
22657
|
let u = d[r].tdList[n], R = d[s].tdList[i];
|
|
22658
22658
|
(u.x > R.x || u.y > R.y) && ([u, R] = [R, u]);
|
|
22659
|
-
const g = u.colIndex, f = R.colIndex + (R.colspan - 1), T = u.rowIndex, p = R.rowIndex + (R.rowspan - 1),
|
|
22659
|
+
const g = u.colIndex, f = R.colIndex + (R.colspan - 1), T = u.rowIndex, p = R.rowIndex + (R.rowspan - 1), m = [];
|
|
22660
22660
|
for (let b = 0; b < d.length; b++) {
|
|
22661
22661
|
const C = d[b], F = [];
|
|
22662
22662
|
for (let M = 0; M < C.tdList.length; M++) {
|
|
22663
22663
|
const U = C.tdList[M], N = U.colIndex, w = U.rowIndex;
|
|
22664
22664
|
N >= g && N <= f && w >= T && w <= p && F.push(U);
|
|
22665
22665
|
}
|
|
22666
|
-
F.length &&
|
|
22666
|
+
F.length && m.push(F);
|
|
22667
22667
|
}
|
|
22668
|
-
if (!
|
|
22668
|
+
if (!m.length)
|
|
22669
22669
|
return;
|
|
22670
|
-
const L =
|
|
22671
|
-
for (let b = 0; b <
|
|
22672
|
-
const C =
|
|
22670
|
+
const L = m[m.length - 1], I = m[0][0], O = L[L.length - 1], S = I.x, X = I.y, y = O.x + O.width, W = O.y + O.height;
|
|
22671
|
+
for (let b = 0; b < m.length; b++) {
|
|
22672
|
+
const C = m[b];
|
|
22673
22673
|
for (let F = 0; F < C.length; F++) {
|
|
22674
22674
|
const M = C[F], U = M.x, N = M.y, w = U + M.width, K = N + M.height;
|
|
22675
22675
|
if (S > U || X > N || y < w || W < K)
|
|
22676
22676
|
return;
|
|
22677
22677
|
}
|
|
22678
22678
|
}
|
|
22679
|
-
const Y = [], D =
|
|
22680
|
-
for (let b = 0; b <
|
|
22681
|
-
const C =
|
|
22679
|
+
const Y = [], D = m[0][0], E = D.value[0];
|
|
22680
|
+
for (let b = 0; b < m.length; b++) {
|
|
22681
|
+
const C = m[b];
|
|
22682
22682
|
for (let F = 0; F < C.length; F++) {
|
|
22683
22683
|
const M = C[F];
|
|
22684
22684
|
if (!(b === 0 && F === 0)) {
|
|
@@ -22815,13 +22815,13 @@ class mT {
|
|
|
22815
22815
|
for (; f < g.tdList.length; ) {
|
|
22816
22816
|
const T = g.tdList[f];
|
|
22817
22817
|
if (T.id === d.id) {
|
|
22818
|
-
const p = mt(),
|
|
22818
|
+
const p = mt(), m = mt();
|
|
22819
22819
|
a.splice(R + d.rowspan, 0, {
|
|
22820
22820
|
id: p,
|
|
22821
22821
|
height: this.options.table.defaultTrMinHeight,
|
|
22822
22822
|
tdList: [
|
|
22823
22823
|
{
|
|
22824
|
-
id:
|
|
22824
|
+
id: m,
|
|
22825
22825
|
rowspan: 1,
|
|
22826
22826
|
colspan: d.colspan,
|
|
22827
22827
|
value: [
|
|
@@ -22830,7 +22830,7 @@ class mT {
|
|
|
22830
22830
|
size: 16,
|
|
22831
22831
|
tableId: l.id,
|
|
22832
22832
|
trId: p,
|
|
22833
|
-
tdId:
|
|
22833
|
+
tdId: m
|
|
22834
22834
|
}
|
|
22835
22835
|
]
|
|
22836
22836
|
}
|
|
@@ -22993,9 +22993,9 @@ class mT {
|
|
|
22993
22993
|
a.addEventListener("click", R), c.addEventListener("click", R), d.addEventListener("click", R), u.addEventListener("click", () => {
|
|
22994
22994
|
const g = parseInt(l.querySelector("#tdPaddingTop").value) || 0, f = parseInt(l.querySelector("#tdPaddingRight").value) || 0, T = parseInt(l.querySelector("#tdPaddingBottom").value) || 0, p = parseInt(l.querySelector("#tdPaddingLeft").value) || 0;
|
|
22995
22995
|
i.tdPadding = [g, f, T, p], R();
|
|
22996
|
-
const { endIndex:
|
|
22996
|
+
const { endIndex: m } = this.range.getRange();
|
|
22997
22997
|
this.draw.render({
|
|
22998
|
-
curIndex:
|
|
22998
|
+
curIndex: m,
|
|
22999
22999
|
isCompute: !0
|
|
23000
23000
|
});
|
|
23001
23001
|
});
|
|
@@ -23835,11 +23835,11 @@ class ST {
|
|
|
23835
23835
|
const c = a.controlId, d = a.control.type;
|
|
23836
23836
|
let u = !1, R = !1, g = !1;
|
|
23837
23837
|
const f = [], T = [], p = [];
|
|
23838
|
-
let
|
|
23838
|
+
let m = -1, L = l;
|
|
23839
23839
|
for (; L < s.length; ) {
|
|
23840
|
-
const
|
|
23841
|
-
if (
|
|
23842
|
-
const O =
|
|
23840
|
+
const I = s[L];
|
|
23841
|
+
if (I.controlId !== c) {
|
|
23842
|
+
const O = I.controlId;
|
|
23843
23843
|
let S = d === V.TEXT, X = L;
|
|
23844
23844
|
if (S)
|
|
23845
23845
|
for (; X < s.length && s[X].controlId === O; )
|
|
@@ -23854,42 +23854,42 @@ class ST {
|
|
|
23854
23854
|
S && (R = !0), L = X;
|
|
23855
23855
|
continue;
|
|
23856
23856
|
}
|
|
23857
|
-
if ((
|
|
23858
|
-
p.push(L),
|
|
23857
|
+
if ((I.controlComponent === h.PREFIX || I.controlComponent === h.PRETEXTFIX || I.controlComponent === h.PRETEXTFIX_TEXT) && T.push(L), I.controlComponent === h.VALUE && I.value && I.value.trim() && (u = !0), I.controlComponent === h.VALUE && (I.type === P.MENSTRUAL_HISTORY || I.type === P.FETAL_HEART_POSITION || I.type === P.TOOTH_POSITION || I.type === P.MACRO || I.type === P.CUSTOM_MACRO) && (u = !0), I.controlComponent === h.VALUE && I.control && I.control.type !== d && (R = !0), I.controlComponent === h.PLACEHOLDER && (g = !0, f.push(L)), I.controlComponent === h.POSTFIX || I.controlComponent === h.POSTTEXTFIX || I.controlComponent === h.POSTTEXTFIX_TEXT) {
|
|
23858
|
+
p.push(L), m = L;
|
|
23859
23859
|
break;
|
|
23860
23860
|
}
|
|
23861
23861
|
L++;
|
|
23862
23862
|
}
|
|
23863
23863
|
if (u || R) {
|
|
23864
23864
|
if (g && f.length > 0)
|
|
23865
|
-
for (const
|
|
23866
|
-
s[
|
|
23865
|
+
for (const I of f)
|
|
23866
|
+
s[I].hide = !0;
|
|
23867
23867
|
} else if (g && f.length > 0)
|
|
23868
|
-
for (const
|
|
23869
|
-
s[
|
|
23870
|
-
else e && a.control?.placeholder && (
|
|
23868
|
+
for (const I of f)
|
|
23869
|
+
s[I].hide = !e;
|
|
23870
|
+
else e && a.control?.placeholder && (m > 0 ? this.control.addPlaceholder(m - 1) : this.control.addPlaceholder(l));
|
|
23871
23871
|
if (n)
|
|
23872
23872
|
if (e && (u || R)) {
|
|
23873
|
-
for (const
|
|
23874
|
-
s[
|
|
23875
|
-
for (const
|
|
23876
|
-
s[
|
|
23873
|
+
for (const I of T)
|
|
23874
|
+
s[I].hide = !0;
|
|
23875
|
+
for (const I of p)
|
|
23876
|
+
s[I].hide = !0;
|
|
23877
23877
|
} else if (e) {
|
|
23878
|
-
for (const
|
|
23879
|
-
s[
|
|
23880
|
-
for (const
|
|
23881
|
-
s[
|
|
23878
|
+
for (const I of T)
|
|
23879
|
+
s[I].hide = !1;
|
|
23880
|
+
for (const I of p)
|
|
23881
|
+
s[I].hide = !1;
|
|
23882
23882
|
} else {
|
|
23883
|
-
for (const
|
|
23884
|
-
s[
|
|
23885
|
-
for (const
|
|
23886
|
-
s[
|
|
23883
|
+
for (const I of T)
|
|
23884
|
+
s[I].hide = !0;
|
|
23885
|
+
for (const I of p)
|
|
23886
|
+
s[I].hide = !0;
|
|
23887
23887
|
}
|
|
23888
23888
|
else {
|
|
23889
|
-
for (const
|
|
23890
|
-
s[
|
|
23891
|
-
for (const
|
|
23892
|
-
s[
|
|
23889
|
+
for (const I of T)
|
|
23890
|
+
s[I].hide = !1;
|
|
23891
|
+
for (const I of p)
|
|
23892
|
+
s[I].hide = !1;
|
|
23893
23893
|
}
|
|
23894
23894
|
l = L;
|
|
23895
23895
|
}
|
|
@@ -24538,14 +24538,14 @@ class ST {
|
|
|
24538
24538
|
const a = this.getElementList(), c = n === i, d = n + 1, u = a[n], R = a[d], g = (X) => !!(X && (X.controlComponent === h.POSTFIX || X.controlComponent === h.POST_TEXT || X.controlComponent === h.POSTTEXTFIX || X.controlComponent === h.POSTTEXTFIX_TEXT)), f = (X) => !!(X && (X.controlComponent === h.PREFIX || X.controlComponent === h.PRE_TEXT || X.controlComponent === h.PRETEXTFIX || X.controlComponent === h.PRETEXTFIX_TEXT)), T = (X) => {
|
|
24539
24539
|
if (X)
|
|
24540
24540
|
return a.find((y) => y.controlId === X && !y.originControlId && !!y.control?.type);
|
|
24541
|
-
}, p = u?.originControlId && R?.originControlId === u.originControlId && u.controlId && R.controlId && u.controlId !== R.controlId && g(u) && f(R) ? T(u.originControlId) : void 0,
|
|
24541
|
+
}, p = u?.originControlId && R?.originControlId === u.originControlId && u.controlId && R.controlId && u.controlId !== R.controlId && g(u) && f(R) ? T(u.originControlId) : void 0, m = p?.control?.type === V.TEXTFIELD, L = !!(u?.originControlId && g(u) && R?.controlId === u.originControlId && !R.originControlId && R.control?.type === V.TEXTFIELD && g(R)), I = !!(u?.originControlId && g(u) && R?.controlId === u.originControlId && !R.originControlId && R.control?.type === V.TEXTFIELD && R.controlComponent === h.VALUE);
|
|
24542
24542
|
if (u?.controlComponent === h.PRE_TEXT || u?.controlComponent === h.POST_TEXT || u?.controlComponent === h.PREFIX || u?.controlComponent === h.POSTFIX)
|
|
24543
24543
|
for (let X = 0; X < t.length; X++)
|
|
24544
24544
|
t[X].control || (t[X].color = this.options.defaultColor);
|
|
24545
|
-
c && !L && !
|
|
24546
|
-
const S = L ||
|
|
24545
|
+
c && !L && !I && (a[n]?.control?.type === V.TEXTFIELD || a[n]?.control?.type === V.TEXT) && this.control.removePlaceholder(n), c || this.newSpliceElementList(a, d, i - n);
|
|
24546
|
+
const S = L || I || m ? u.originControlId : a[n]?.controlId || a[n - 1]?.controlId || a[n + 1]?.controlId;
|
|
24547
24547
|
for (let X = 0; X < t.length; X++) {
|
|
24548
|
-
if ((L ||
|
|
24548
|
+
if ((L || I || m) && !t[X].control && (t[X].controlId = S, t[X].control = m ? p?.control : R.control, t[X].controlComponent = h.VALUE, delete t[X].originControlId), t[X]?.control?.type == "button" && !t[X]?.control?.buttonText && (t[X]?.controlComponent === "prefix" || t[X]?.controlComponent === "postfix" ? (t[X].color = "#1677FF", t[X].highlight = "transparent") : (t[X].color = this.options.defaultColor, t[X].highlight = "transparent")), t[X]?.type === P.MENSTRUAL_HISTORY || t[X]?.type === P.FETAL_HEART_POSITION || t[X]?.type === P.TOOTH_POSITION || t[X]?.type === P.MACRO || t[X]?.type === P.CUSTOM_MACRO || t[X]?.type === P.REUSABLE_ITEM || t[X]?.type === P.SUB_TEMPLATE || t[X]?.type === P.SPECIAL_SYMBOLS) {
|
|
24549
24549
|
t[X].controlComponent = h.VALUE;
|
|
24550
24550
|
let y = a[n]?.controlId;
|
|
24551
24551
|
y || (y = a[n - 1]?.controlId), y || (y = a[n + 1]?.controlId), !t[X].controlId && y && (t[X].controlId = y);
|
|
@@ -24946,7 +24946,7 @@ class ST {
|
|
|
24946
24946
|
return s < 12 ? l = s / 12 : s > 30 && (l = 1 + (s - 30) / 30), n * l * (t.rowMargin ?? i) * r;
|
|
24947
24947
|
}
|
|
24948
24948
|
computeRowList(t) {
|
|
24949
|
-
const { innerWidth: e, elementList: n, isPagingMode: i = !1, isFromTable: r = !1, startX: s = 0, startY: l = 0, pageHeight: a = 0, mainOuterHeight: c = 0, surroundElementList: d = [] } = t, { defaultSize: u, scale: R, imgCaption: g, table: { tdPadding: f, defaultTrMinHeight: T }, defaultTabWidth: p } = this.options,
|
|
24949
|
+
const { innerWidth: e, elementList: n, isPagingMode: i = !1, isFromTable: r = !1, startX: s = 0, startY: l = 0, pageHeight: a = 0, mainOuterHeight: c = 0, surroundElementList: d = [] } = t, { defaultSize: u, scale: R, imgCaption: g, table: { tdPadding: f, defaultTrMinHeight: T }, defaultTabWidth: p } = this.options, m = this.getDefaultBasicRowMarginHeight(), I = document.createElement("canvas").getContext("2d"), O = this.listParticle.computeListStyle(I, n), S = [], X = this._collectTextControlValueSet(n), y = this._collectTextControlHasContentSet(n);
|
|
24950
24950
|
n.length && S.push({
|
|
24951
24951
|
width: 0,
|
|
24952
24952
|
height: 0,
|
|
@@ -25194,7 +25194,7 @@ class ST {
|
|
|
25194
25194
|
const A = this.toothPositionParticle.computeSize(M);
|
|
25195
25195
|
M.width = A.width / R, N.width = A.width, N.height = A.height, N.boundingBoxAscent = A.height / 2, N.boundingBoxDescent = A.height / 2;
|
|
25196
25196
|
} else if (M.type === P.TAB)
|
|
25197
|
-
N.width = p * R, N.height = u * R, N.boundingBoxDescent = 0, N.boundingBoxAscent = this.textParticle.getBasisWordBoundingBoxAscent(
|
|
25197
|
+
N.width = p * R, N.height = u * R, N.boundingBoxDescent = 0, N.boundingBoxAscent = this.textParticle.getBasisWordBoundingBoxAscent(I, I.font);
|
|
25198
25198
|
else if (M.type === P.BLOCK) {
|
|
25199
25199
|
if (!M.width)
|
|
25200
25200
|
N.width = K;
|
|
@@ -25205,71 +25205,71 @@ class ST {
|
|
|
25205
25205
|
N.height = M.height * R, N.boundingBoxDescent = N.height, N.boundingBoxAscent = 0;
|
|
25206
25206
|
} else if (M.type === P.LABEL) {
|
|
25207
25207
|
const { defaultSize: A, label: { defaultPadding: q } } = this.options;
|
|
25208
|
-
|
|
25209
|
-
const k = this.textParticle.measureText(
|
|
25208
|
+
I.font = this.getElementFont(M);
|
|
25209
|
+
const k = this.textParticle.measureText(I, M);
|
|
25210
25210
|
N.width = (k.width + q[1] + q[3]) * R, N.height = (M.size || A) * R, N.boundingBoxDescent = 0, N.boundingBoxAscent = (q[0] + k.actualBoundingBoxAscent) * R;
|
|
25211
25211
|
} else if (M.type === P.MACRO || M.type === P.CUSTOM_MACRO || M.type === P.REUSABLE_ITEM || M.type === P.SUB_TEMPLATE) {
|
|
25212
25212
|
const { defaultSize: A } = this.options;
|
|
25213
|
-
|
|
25213
|
+
I.font = this.getElementFont(M);
|
|
25214
25214
|
const q = this.getMode(), k = q === v.EDIT, lt = q === v.FORM;
|
|
25215
25215
|
if (q === v.READONLY && M.type !== P.SUB_TEMPLATE) {
|
|
25216
|
-
const at = Li(M), ot =
|
|
25216
|
+
const at = Li(M), ot = I.measureText(at);
|
|
25217
25217
|
N.width = ot.width, N.height = (M.size || A) * R, N.boundingBoxDescent = ot.actualBoundingBoxDescent, N.boundingBoxAscent = ot.actualBoundingBoxAscent;
|
|
25218
25218
|
} else if (k) {
|
|
25219
25219
|
const at = M.label || M.value || "";
|
|
25220
|
-
|
|
25221
|
-
const ot =
|
|
25220
|
+
I.font = this.getElementFont(M);
|
|
25221
|
+
const ot = I.measureText(at), ft = 8 * R, Ot = 4 * R;
|
|
25222
25222
|
N.width = ot.width + ft * 2;
|
|
25223
25223
|
const Ct = ot.actualBoundingBoxAscent + ot.actualBoundingBoxDescent;
|
|
25224
25224
|
N.height = Ct + Ot * 2;
|
|
25225
|
-
const Kt = this.textParticle.measureBasisWord(
|
|
25225
|
+
const Kt = this.textParticle.measureBasisWord(I, this.getElementFont(M));
|
|
25226
25226
|
N.boundingBoxAscent = Kt.actualBoundingBoxAscent * R, N.boundingBoxDescent = Kt.actualBoundingBoxDescent * R;
|
|
25227
25227
|
} else if (M.type === P.CUSTOM_MACRO) {
|
|
25228
25228
|
const at = M.macroConfig, ot = at?.value || "";
|
|
25229
25229
|
if (lt) {
|
|
25230
|
-
const ft = at?.type || "text", Ot = this.textParticle.measureText(
|
|
25230
|
+
const ft = at?.type || "text", Ot = this.textParticle.measureText(I, M), Ct = M.label || "";
|
|
25231
25231
|
if (ft === "select") {
|
|
25232
|
-
const Kt = ot || `请选择${Ct}`, jt =
|
|
25232
|
+
const Kt = ot || `请选择${Ct}`, jt = I.measureText(Kt), bt = I.measureText("[").width, $t = 6 * R + 2 * R;
|
|
25233
25233
|
N.width = bt + jt.width + $t + bt;
|
|
25234
25234
|
} else {
|
|
25235
|
-
const Kt = ot || `请输入${Ct}`, jt =
|
|
25235
|
+
const Kt = ot || `请输入${Ct}`, jt = I.measureText(Kt), bt = I.measureText("[").width;
|
|
25236
25236
|
N.width = bt + jt.width + bt;
|
|
25237
25237
|
}
|
|
25238
25238
|
N.height = (M.size || A) * R, N.boundingBoxDescent = Ot.actualBoundingBoxDescent * R, N.boundingBoxAscent = Ot.actualBoundingBoxAscent * R;
|
|
25239
25239
|
} else {
|
|
25240
|
-
const ft = M.label || "", Ot = ot || `请输入${ft}`, Ct =
|
|
25240
|
+
const ft = M.label || "", Ot = ot || `请输入${ft}`, Ct = I.measureText(Ot);
|
|
25241
25241
|
N.width = Ct.width, N.height = (M.size || A) * R, N.boundingBoxDescent = Ct.actualBoundingBoxDescent, N.boundingBoxAscent = Ct.actualBoundingBoxAscent;
|
|
25242
25242
|
}
|
|
25243
25243
|
} else if (M.type === P.REUSABLE_ITEM) {
|
|
25244
25244
|
const ot = M.reusableItemConfig?.value || "", ft = M.label || "";
|
|
25245
25245
|
if (lt) {
|
|
25246
|
-
const Ot = this.textParticle.measureText(
|
|
25246
|
+
const Ot = this.textParticle.measureText(I, M), Ct = ot || `获取 ${ft}`, Kt = I.measureText(Ct), jt = I.measureText("[").width;
|
|
25247
25247
|
N.width = jt + Kt.width + jt, N.height = (M.size || A) * R, N.boundingBoxDescent = Ot.actualBoundingBoxDescent * R, N.boundingBoxAscent = Ot.actualBoundingBoxAscent * R;
|
|
25248
25248
|
} else {
|
|
25249
|
-
const Ot = ot || `获取 ${ft}`, Ct =
|
|
25249
|
+
const Ot = ot || `获取 ${ft}`, Ct = I.measureText(Ot);
|
|
25250
25250
|
N.width = Ct.width, N.height = (M.size || A) * R, N.boundingBoxDescent = Ct.actualBoundingBoxDescent, N.boundingBoxAscent = Ct.actualBoundingBoxAscent;
|
|
25251
25251
|
}
|
|
25252
25252
|
} else if (M.type === P.SUB_TEMPLATE) {
|
|
25253
25253
|
const at = M.label || "子模板";
|
|
25254
25254
|
if (lt) {
|
|
25255
|
-
const ot =
|
|
25255
|
+
const ot = I.measureText(at), ft = 8 * R, Ot = 4 * R, Ct = ot.actualBoundingBoxAscent + ot.actualBoundingBoxDescent;
|
|
25256
25256
|
N.width = ot.width + ft * 2, N.height = Ct + Ot * 2;
|
|
25257
|
-
const Kt = this.textParticle.measureBasisWord(
|
|
25257
|
+
const Kt = this.textParticle.measureBasisWord(I, this.getElementFont(M));
|
|
25258
25258
|
N.boundingBoxAscent = Kt.actualBoundingBoxAscent * R, N.boundingBoxDescent = Kt.actualBoundingBoxDescent * R;
|
|
25259
25259
|
} else {
|
|
25260
|
-
const ot =
|
|
25260
|
+
const ot = I.measureText(at);
|
|
25261
25261
|
N.width = ot.width, N.height = (M.size || A) * R, N.boundingBoxDescent = ot.actualBoundingBoxDescent, N.boundingBoxAscent = ot.actualBoundingBoxAscent;
|
|
25262
25262
|
}
|
|
25263
25263
|
} else {
|
|
25264
|
-
const at = M.label || "", ot = M.value || `获取 ${at}`, ft =
|
|
25264
|
+
const at = M.label || "", ot = M.value || `获取 ${at}`, ft = I.measureText(ot);
|
|
25265
25265
|
N.width = ft.width, N.height = (M.size || A) * R, N.boundingBoxDescent = ft.actualBoundingBoxDescent, N.boundingBoxAscent = ft.actualBoundingBoxAscent;
|
|
25266
25266
|
}
|
|
25267
25267
|
} else {
|
|
25268
25268
|
const A = M.size || u;
|
|
25269
|
-
(M.type === P.SUPERSCRIPT || M.type === P.SUBSCRIPT) && (M.actualSize = Math.ceil(A * 0.6)), N.height = (M.actualSize || A) * R,
|
|
25270
|
-
const q = this.textParticle.measureText(
|
|
25269
|
+
(M.type === P.SUPERSCRIPT || M.type === P.SUBSCRIPT) && (M.actualSize = Math.ceil(A * 0.6)), N.height = (M.actualSize || A) * R, I.font = this.getElementFont(M);
|
|
25270
|
+
const q = this.textParticle.measureText(I, M);
|
|
25271
25271
|
N.width = q.width * R, M.letterSpacing && (N.width += M.letterSpacing * R);
|
|
25272
|
-
const k = this.textParticle.measureBasisWord(
|
|
25272
|
+
const k = this.textParticle.measureBasisWord(I, M.font);
|
|
25273
25273
|
N.boundingBoxAscent = k.actualBoundingBoxAscent * R, N.boundingBoxDescent = k.actualBoundingBoxDescent * R, M.type === P.SUPERSCRIPT ? N.boundingBoxAscent += N.height / 2 : M.type === P.SUBSCRIPT && (N.boundingBoxDescent += N.height / 2);
|
|
25274
25274
|
}
|
|
25275
25275
|
const Z = !Ie(M) && (M.imgDisplay !== Pt.INLINE && M.type === P.IMAGE || M.type === P.LATEX) ? N.height + U : N.boundingBoxAscent + U, et = U + N.boundingBoxAscent + N.boundingBoxDescent + U, j = Object.assign(M, {
|
|
@@ -25288,10 +25288,10 @@ class ST {
|
|
|
25288
25288
|
if (this.options.wordBreak === ii.BREAK_WORD && (!G?.type || G?.type === P.TEXT) && (!M.type || M.type === P.TEXT)) {
|
|
25289
25289
|
const A = `${G?.value || ""}${M.value}`;
|
|
25290
25290
|
if (this.WORD_LIKE_REG.test(A)) {
|
|
25291
|
-
const { width: k, endElement: lt } = this.textParticle.measureWord(
|
|
25291
|
+
const { width: k, endElement: lt } = this.textParticle.measureWord(I, n, C), at = k * R;
|
|
25292
25292
|
lt && at <= K ? (B += at, $ = lt) : G && (B += at);
|
|
25293
25293
|
}
|
|
25294
|
-
const q = this.textParticle.measurePunctuationWidth(
|
|
25294
|
+
const q = this.textParticle.measurePunctuationWidth(I, $);
|
|
25295
25295
|
B += q * R;
|
|
25296
25296
|
}
|
|
25297
25297
|
M.listId && (M.listId !== E ? x = 0 : M.value === _ && !M.listWrap && x++), E = M.listId;
|
|
@@ -25318,16 +25318,16 @@ class ST {
|
|
|
25318
25318
|
const at = n[lt];
|
|
25319
25319
|
if (at.controlId !== A)
|
|
25320
25320
|
break;
|
|
25321
|
-
|
|
25322
|
-
const ot = this.textParticle.measureText(
|
|
25321
|
+
I.font = this.getElementFont(at);
|
|
25322
|
+
const ot = this.textParticle.measureText(I, at);
|
|
25323
25323
|
if (k += ot.width * R, at.controlComponent === h.POSTFIX)
|
|
25324
25324
|
break;
|
|
25325
25325
|
}
|
|
25326
25326
|
for (let lt = 0; lt < n.length; lt++) {
|
|
25327
25327
|
const at = n[lt];
|
|
25328
25328
|
if (at.controlId === `${A}_text`) {
|
|
25329
|
-
|
|
25330
|
-
const ot = this.textParticle.measureText(
|
|
25329
|
+
I.font = this.getElementFont(at);
|
|
25330
|
+
const ot = this.textParticle.measureText(I, at);
|
|
25331
25331
|
k += ot.width * R;
|
|
25332
25332
|
}
|
|
25333
25333
|
}
|
|
@@ -25358,7 +25358,7 @@ class ST {
|
|
|
25358
25358
|
}
|
|
25359
25359
|
M.listId && (A.isList = !0, A.offsetX = O.get(M.listId), A.listIndex = x), A.offsetY = !r && M.area?.top && M.areaId !== n[C - 1]?.areaId ? M.area.top * R : 0, S.push(A);
|
|
25360
25360
|
} else
|
|
25361
|
-
F.width += N.width, C === 0 && (co(n[1]) || n[1]?.areaId) ? (F.height =
|
|
25361
|
+
F.width += N.width, C === 0 && (co(n[1]) || n[1]?.areaId) ? (F.height = m, F.ascent = m) : F.height < et && (F.height = et, F.ascent = Z), F.elementList.push(j);
|
|
25362
25362
|
if ((re || C === n.length - 1) && (F.isWidthNotEnough = Se && !kt, !F.isSurround && (G?.rowFlex === At.JUSTIFY || G?.rowFlex === At.ALIGNMENT && F.isWidthNotEnough))) {
|
|
25363
25363
|
const A = F.elementList[0]?.value === _ ? F.elementList.slice(1) : F.elementList, q = (K - F.width) / (A.length - 1);
|
|
25364
25364
|
for (let k = 0; k < A.length - 1; k++) {
|
|
@@ -25468,13 +25468,13 @@ class ST {
|
|
|
25468
25468
|
const c = n[a];
|
|
25469
25469
|
let d = "";
|
|
25470
25470
|
for (let u = 0; u < c.elementList.length; u++) {
|
|
25471
|
-
const R = c.elementList[u], g = c.startIndex + u, f = r[g] === R ? g : r.indexOf(R), T = ~f ? f : g, p = this.control.getControlHighlight(r, T),
|
|
25472
|
-
if (
|
|
25473
|
-
d && d !==
|
|
25474
|
-
const L = i[T], { coordinate: { leftTop: [
|
|
25475
|
-
this.highlight.recordFillInfo(t,
|
|
25471
|
+
const R = c.elementList[u], g = c.startIndex + u, f = r[g] === R ? g : r.indexOf(R), T = ~f ? f : g, p = this.control.getControlHighlight(r, T), m = R.highlight || p;
|
|
25472
|
+
if (m) {
|
|
25473
|
+
d && d !== m && this.highlight.render(t);
|
|
25474
|
+
const L = i[T], { coordinate: { leftTop: [I, O] } } = L, S = R.left || 0, X = !R.highlight && !!p && this.control.getIsInlineControlBackground(r, T), y = X ? O + L.ascent - R.metrics.boundingBoxAscent - l : O + s - l, W = X ? R.metrics.boundingBoxAscent + R.metrics.boundingBoxDescent + 2 * l : c.height - 2 * s + 2 * l;
|
|
25475
|
+
this.highlight.recordFillInfo(t, I - S, y, R.metrics.width + S, W, m);
|
|
25476
25476
|
} else d && this.highlight.render(t);
|
|
25477
|
-
d =
|
|
25477
|
+
d = m;
|
|
25478
25478
|
}
|
|
25479
25479
|
this.highlight.render(t);
|
|
25480
25480
|
}
|
|
@@ -25495,7 +25495,7 @@ class ST {
|
|
|
25495
25495
|
isDrawLineBreak: f = !s.disabled,
|
|
25496
25496
|
td: T,
|
|
25497
25497
|
isDrawWhiteSpace: p = !l.disabled
|
|
25498
|
-
} = e,
|
|
25498
|
+
} = e, m = this.isPrintLikeMode(), L = this.isSelectionDisabled(), { isCrossRowCol: I, tableId: O } = this.range.getRange();
|
|
25499
25499
|
let S = R;
|
|
25500
25500
|
for (let X = 0; X < a.length; X++) {
|
|
25501
25501
|
const y = a[X], W = {
|
|
@@ -25514,7 +25514,7 @@ class ST {
|
|
|
25514
25514
|
else if (E.type === P.LATEX)
|
|
25515
25515
|
this.textParticle.complete(), this.laTexParticle.render(t, E, C, F + b);
|
|
25516
25516
|
else if (E.type === P.TABLE)
|
|
25517
|
-
|
|
25517
|
+
I && (W.x = C, W.y = F, Y = E), this.tableParticle.render(t, E, C, F);
|
|
25518
25518
|
else if (E.type === P.HYPERLINK)
|
|
25519
25519
|
this.textParticle.complete(), this.hyperlinkParticle.render(t, E, C, F + b);
|
|
25520
25520
|
else if (E.type === P.LABEL)
|
|
@@ -25524,7 +25524,7 @@ class ST {
|
|
|
25524
25524
|
else if (E.type === P.DATE) {
|
|
25525
25525
|
const Z = y.elementList[D + 1];
|
|
25526
25526
|
(!M || M.dateId !== E.dateId) && this.textParticle.complete(), this.textParticle.record(t, E, C, F + b), (!Z || Z.dateId !== E.dateId) && this.textParticle.complete();
|
|
25527
|
-
} else E.type === P.SUPERSCRIPT ? (this.textParticle.complete(), this.superscriptParticle.render(t, E, C, F + b)) : E.type === P.SUBSCRIPT ? (this.underline.render(t), this.textParticle.complete(), this.subscriptParticle.render(t, E, C, F + b)) : E.type === P.SEPARATOR ? this.separatorParticle.render(t, E, C, F) : E.type === P.PAGE_BREAK ? this.mode !== v.CLEAN && !
|
|
25527
|
+
} else E.type === P.SUPERSCRIPT ? (this.textParticle.complete(), this.superscriptParticle.render(t, E, C, F + b)) : E.type === P.SUBSCRIPT ? (this.underline.render(t), this.textParticle.complete(), this.subscriptParticle.render(t, E, C, F + b)) : E.type === P.SEPARATOR ? this.separatorParticle.render(t, E, C, F) : E.type === P.PAGE_BREAK ? this.mode !== v.CLEAN && !m && this.pageBreakParticle.render(t, E, C, F) : E.type === P.CHECKBOX || E.controlComponent === h.CHECKBOX ? (this.textParticle.complete(), this.checkboxParticle.render({
|
|
25528
25528
|
ctx: t,
|
|
25529
25529
|
x: C,
|
|
25530
25530
|
y: F + b,
|
|
@@ -25558,7 +25558,7 @@ class ST {
|
|
|
25558
25558
|
row: y,
|
|
25559
25559
|
element: E
|
|
25560
25560
|
})) : E.type === P.TAB ? this.textParticle.complete() : E.rowFlex === At.ALIGNMENT || E.rowFlex === At.JUSTIFY ? (this.textParticle.record(t, E, C, F + b), this.textParticle.complete()) : E.type === P.BLOCK ? (this.textParticle.complete(), this.blockParticle.render(t, c, E, C, F + b)) : (E.left && this.textParticle.complete(), this.textParticle.record(t, E, C, F + b), (E.width || E.letterSpacing || Va.test(E.value)) && this.textParticle.complete());
|
|
25561
|
-
if (f && !
|
|
25561
|
+
if (f && !m && this.mode !== v.CLEAN && !y.isWidthNotEnough && D === y.elementList.length - 1 && this.lineBreakParticle.render(t, E, C, F + y.height / 2), p && Da.test(E.value) && this.whiteSpaceParticle.render(t, E, C, F + y.height / 2), E.control?.border) {
|
|
25562
25562
|
M?.control?.border && M.controlId !== E.controlId && this.control.drawBorder(t);
|
|
25563
25563
|
const Z = this.getElementRowMargin(E);
|
|
25564
25564
|
this.control.recordBorderInfo(C, F + Z, E.metrics.width, y.height - 2 * Z);
|
|
@@ -25624,7 +25624,7 @@ class ST {
|
|
|
25624
25624
|
const { x: D, y: E, width: x, height: b } = W;
|
|
25625
25625
|
this.range.render(t, D, E, x, b);
|
|
25626
25626
|
}
|
|
25627
|
-
if (
|
|
25627
|
+
if (I && Y && Y.id === O) {
|
|
25628
25628
|
const { coordinate: { leftTop: [D, E] } } = u[y.startIndex];
|
|
25629
25629
|
this.tableParticle.drawRange(t, Y, D, E);
|
|
25630
25630
|
}
|
|
@@ -25652,13 +25652,13 @@ class ST {
|
|
|
25652
25652
|
pageNo: r,
|
|
25653
25653
|
imgDisplays: [Pt.FLOAT_BOTTOM]
|
|
25654
25654
|
}), g || this.control.renderHighlightList(p, r);
|
|
25655
|
-
const
|
|
25655
|
+
const m = i[0]?.startIndex;
|
|
25656
25656
|
this.drawRow(p, {
|
|
25657
25657
|
elementList: e,
|
|
25658
25658
|
positionList: n,
|
|
25659
25659
|
rowList: i,
|
|
25660
25660
|
pageNo: r,
|
|
25661
|
-
startIndex:
|
|
25661
|
+
startIndex: m,
|
|
25662
25662
|
innerWidth: T,
|
|
25663
25663
|
zone: Lt.MAIN
|
|
25664
25664
|
}), this.getIsPagingMode() && (a.disabled || this.header.render(p, r), d.disabled || this.pageNumber.render(p, r), c.disabled || this.footer.render(p, r)), this._drawFloat(p, {
|
|
@@ -25741,7 +25741,7 @@ class ST {
|
|
|
25741
25741
|
const C = ~l ? l : 0, F = this.getElementList();
|
|
25742
25742
|
c = no(F, C);
|
|
25743
25743
|
}
|
|
25744
|
-
const { header: u, footer: R } = this.options, { isSubmitHistory: g = !0, isSetCursor: f = !0, isLazy: T = !0, isInit: p = !1, isSourceHistory:
|
|
25744
|
+
const { header: u, footer: R } = this.options, { isSubmitHistory: g = !0, isSetCursor: f = !0, isLazy: T = !0, isInit: p = !1, isSourceHistory: m = !1, isFirstRender: L = !1, isDel: I = !1 } = t || {};
|
|
25745
25745
|
let { isCompute: O = !0 } = t || {};
|
|
25746
25746
|
s && (O = !0);
|
|
25747
25747
|
let { curIndex: S } = t || {};
|
|
@@ -25808,7 +25808,7 @@ class ST {
|
|
|
25808
25808
|
}
|
|
25809
25809
|
S = this.setCursor(S);
|
|
25810
25810
|
} else this.range.getIsSelection() && this.cursor.focus();
|
|
25811
|
-
if (
|
|
25811
|
+
if (I) {
|
|
25812
25812
|
let C;
|
|
25813
25813
|
const F = this.position.getPositionContext();
|
|
25814
25814
|
C = this.range.getRange().startIndex - 1, F.index = C;
|
|
@@ -25817,7 +25817,7 @@ class ST {
|
|
|
25817
25817
|
const b = he();
|
|
25818
25818
|
Ss(() => {
|
|
25819
25819
|
const C = he();
|
|
25820
|
-
this.range.setRangeStyle(), O && this.control.getActiveControl() && this.control.reAwakeControl(), O && !this.isReadonly() && this.getMode() !== v.FORM && d.isTable && this.getOriginalElementList()[d.index].type === P.TABLE && this.tableTool.render(), O && !this.zone.isMainActive() && this.zone.drawZoneIndicator(), Y !== this.pageRowList.length && (this.listener.pageSizeChange && this.listener.pageSizeChange(this.pageRowList.length), this.eventBus.isSubscribe("pageSizeChange") && this.eventBus.emit("pageSizeChange", this.pageRowList.length)), (g ||
|
|
25820
|
+
this.range.setRangeStyle(), O && this.control.getActiveControl() && this.control.reAwakeControl(), O && !this.isReadonly() && this.getMode() !== v.FORM && d.isTable && this.getOriginalElementList()[d.index].type === P.TABLE && this.tableTool.render(), O && !this.zone.isMainActive() && this.zone.drawZoneIndicator(), Y !== this.pageRowList.length && (this.listener.pageSizeChange && this.listener.pageSizeChange(this.pageRowList.length), this.eventBus.isSubscribe("pageSizeChange") && this.eventBus.emit("pageSizeChange", this.pageRowList.length)), (g || m) && !p && (this.listener.contentChange && this.listener.contentChange(), this.eventBus.isSubscribe("contentChange") && this.eventBus.emit("contentChange"));
|
|
25821
25821
|
const F = he();
|
|
25822
25822
|
Es(this.options, X || "render", F - e, [
|
|
25823
25823
|
...n,
|
|
@@ -26617,20 +26617,20 @@ class xT {
|
|
|
26617
26617
|
const p = T?.getElement();
|
|
26618
26618
|
if (p?.control?.type && NT.includes(p.control.type) && this.control.getIsRangeWithinControl()) {
|
|
26619
26619
|
R = !0, g = p.controlId;
|
|
26620
|
-
const
|
|
26621
|
-
f && (
|
|
26620
|
+
const I = r[n];
|
|
26621
|
+
f && (I?.control?.type === V.TEXTFIELD || I?.control?.type === V.TEXT) && this.control.removePlaceholder(n);
|
|
26622
26622
|
} else if (p?.controlId) {
|
|
26623
|
-
const
|
|
26624
|
-
~
|
|
26623
|
+
const I = bT(r, p.controlId, p.originControlId);
|
|
26624
|
+
~I && (c = I, d = I, u = I);
|
|
26625
26625
|
}
|
|
26626
26626
|
ge(r, a, c, {
|
|
26627
26627
|
isBreakWhenWrap: !0,
|
|
26628
26628
|
editorOptions: this.options
|
|
26629
|
-
}), g && a.forEach((
|
|
26630
|
-
|
|
26629
|
+
}), g && a.forEach((I) => {
|
|
26630
|
+
I.controlId === l && !I.originControlId && (I.originControlId = g);
|
|
26631
26631
|
});
|
|
26632
|
-
const
|
|
26633
|
-
d !== u && this.draw.spliceElementList(r, d + 1, u - d), this.draw.spliceElementList(r,
|
|
26632
|
+
const m = c + 1;
|
|
26633
|
+
d !== u && this.draw.spliceElementList(r, d + 1, u - d), this.draw.spliceElementList(r, m, 0, a);
|
|
26634
26634
|
const L = c + a.length;
|
|
26635
26635
|
this.range.setRange(L, L), this.draw.render({ curIndex: L }), R && this.control.emitControlContentChange();
|
|
26636
26636
|
}
|
|
@@ -26779,67 +26779,25 @@ class xT {
|
|
|
26779
26779
|
editElementAttribute(t) {
|
|
26780
26780
|
const e = this.draw.getElementList();
|
|
26781
26781
|
if (t.controlId && t.type === "button") {
|
|
26782
|
-
const n = [];
|
|
26783
|
-
|
|
26784
|
-
|
|
26785
|
-
|
|
26786
|
-
|
|
26787
|
-
|
|
26788
|
-
|
|
26789
|
-
const
|
|
26790
|
-
|
|
26791
|
-
|
|
26792
|
-
e.splice(p, 1);
|
|
26782
|
+
const n = Object.prototype.hasOwnProperty.call(t, "action"), i = [];
|
|
26783
|
+
let r = "", s = "", l = !1, a = !1;
|
|
26784
|
+
e.forEach((f, T) => {
|
|
26785
|
+
if (f.controlId !== t.controlId || f.control?.type !== V.BUTTON)
|
|
26786
|
+
return;
|
|
26787
|
+
const p = f.control.buttonLabel || f.control.label || "";
|
|
26788
|
+
!r && p && (r = p);
|
|
26789
|
+
const m = f.control.value || [], L = this.getButtonContentText(m);
|
|
26790
|
+
L.trim() && L !== p && (l = !0), L.trim() && L === p && (a = !0), f.controlComponent === h.VALUE && (i.push(T), s += f.value === _ ? `
|
|
26791
|
+
` : f.value || "");
|
|
26793
26792
|
});
|
|
26794
|
-
|
|
26795
|
-
|
|
26796
|
-
|
|
26797
|
-
|
|
26798
|
-
|
|
26799
|
-
l = p + 1;
|
|
26800
|
-
break;
|
|
26801
|
-
}
|
|
26802
|
-
l === -1 && (l = p + 1);
|
|
26803
|
-
}
|
|
26804
|
-
}
|
|
26805
|
-
if (l === -1 && n.length > 0) {
|
|
26806
|
-
const p = [];
|
|
26807
|
-
e.forEach((I, L) => {
|
|
26808
|
-
I.controlId === t.controlId && I.control?.type === "button" && p.push(L);
|
|
26809
|
-
}), p.length > 0 && (l = p[0] + 1);
|
|
26810
|
-
}
|
|
26811
|
-
const a = t.label || "", c = s?.value || null, d = Object.prototype.hasOwnProperty.call(t, "action"), u = d ? t.action || void 0 : s?.action;
|
|
26812
|
-
for (let p = 0; p < a.length; p++) {
|
|
26813
|
-
const I = {
|
|
26814
|
-
...s,
|
|
26815
|
-
type: "button",
|
|
26816
|
-
buttonLabel: a,
|
|
26817
|
-
code: t.code,
|
|
26818
|
-
value: c,
|
|
26819
|
-
label: a,
|
|
26820
|
-
hide: !1
|
|
26821
|
-
};
|
|
26822
|
-
u ? I.action = u : delete I.action;
|
|
26823
|
-
const L = {
|
|
26824
|
-
value: a[p],
|
|
26825
|
-
controlId: t.controlId,
|
|
26826
|
-
originControlId: r?.originControlId,
|
|
26827
|
-
type: P.CONTROL,
|
|
26828
|
-
control: I,
|
|
26829
|
-
controlComponent: h.VALUE,
|
|
26830
|
-
// 继承第一个 VALUE 元素的样式
|
|
26831
|
-
color: r?.color || "#fff",
|
|
26832
|
-
highlight: r?.highlight || "#1677FF",
|
|
26833
|
-
style: r?.style || "16px Microsoft YaHei",
|
|
26834
|
-
hide: !1
|
|
26835
|
-
};
|
|
26836
|
-
e.splice(l + p, 0, L);
|
|
26837
|
-
}
|
|
26838
|
-
e.filter((p) => p.controlId === t.controlId && p.control?.type === "button").forEach((p) => {
|
|
26839
|
-
p.control && (p.control.buttonLabel = t.label, p.control.label = t.label, p.control.code = t.code, p.control.hide = !1, p.control.value = c, d && (t.action ? p.control.action = t.action : delete p.control.action)), p.hide = !1;
|
|
26793
|
+
const c = !!(!l && r && (s === r || a));
|
|
26794
|
+
c && i.sort((f, T) => T - f).forEach((f) => {
|
|
26795
|
+
e.splice(f, 1);
|
|
26796
|
+
}), e.forEach((f) => {
|
|
26797
|
+
f.controlId === t.controlId && f.control?.type === V.BUTTON && (t.label !== void 0 && (f.control.buttonLabel = t.label, f.control.label = t.label), t.code !== void 0 && (f.control.code = t.code), c && (f.control.value = null), f.control.hide = !1, n && (t.action ? f.control.action = t.action : delete f.control.action), f.hide = !1);
|
|
26840
26798
|
});
|
|
26841
|
-
const { startIndex:
|
|
26842
|
-
this.draw.render({ curIndex:
|
|
26799
|
+
const { startIndex: d, endIndex: u } = this.range.getRange(), R = !0, g = u;
|
|
26800
|
+
this.draw.render({ curIndex: g, isSetCursor: R });
|
|
26843
26801
|
} else if (t.controlId) {
|
|
26844
26802
|
const n = t.controlId;
|
|
26845
26803
|
if (e.forEach((r) => {
|
|
@@ -26946,10 +26904,10 @@ class xT {
|
|
|
26946
26904
|
return;
|
|
26947
26905
|
const d = n + "_text", u = [];
|
|
26948
26906
|
for (let L = 0; L < s.length; L++) {
|
|
26949
|
-
const
|
|
26907
|
+
const I = s[L];
|
|
26950
26908
|
u.push({
|
|
26951
|
-
value:
|
|
26952
|
-
code:
|
|
26909
|
+
value: I.value,
|
|
26910
|
+
code: I.code
|
|
26953
26911
|
});
|
|
26954
26912
|
}
|
|
26955
26913
|
const R = {
|
|
@@ -26971,7 +26929,7 @@ class xT {
|
|
|
26971
26929
|
hide: !1
|
|
26972
26930
|
});
|
|
26973
26931
|
for (let L = 0; L < s.length; L++) {
|
|
26974
|
-
const
|
|
26932
|
+
const I = s[L], O = s.length > 1 ? `${L + 1}.${I.value}` : I.value, S = Qt(O);
|
|
26975
26933
|
for (let X = 0; X < S.length; X++)
|
|
26976
26934
|
g.push({
|
|
26977
26935
|
value: S[X],
|
|
@@ -27003,8 +26961,8 @@ class xT {
|
|
|
27003
26961
|
});
|
|
27004
26962
|
for (let L = 0; L < g.length; L++)
|
|
27005
26963
|
e.splice(c + L, 0, g[L]);
|
|
27006
|
-
const { startIndex: f, endIndex: T } = this.range.getRange(), p = !0,
|
|
27007
|
-
this.draw.render({ curIndex:
|
|
26964
|
+
const { startIndex: f, endIndex: T } = this.range.getRange(), p = !0, m = T;
|
|
26965
|
+
this.draw.render({ curIndex: m, isSetCursor: p });
|
|
27008
26966
|
}
|
|
27009
26967
|
font(t, e) {
|
|
27010
26968
|
const { isIgnoreDisabledRule: n = !1 } = e || {};
|
|
@@ -27721,9 +27679,9 @@ class xT {
|
|
|
27721
27679
|
extraPickAttrs: ["id", "controlComponent"]
|
|
27722
27680
|
}), c = Nn(l[n], {
|
|
27723
27681
|
extraPickAttrs: ["id", "controlComponent"]
|
|
27724
|
-
}), d = this.draw.getRowList(), u = this.position.getPositionList(), R = u[e], g = u[n], f = R?.pageNo, T = g?.pageNo, p = R?.rowIndex,
|
|
27682
|
+
}), d = this.draw.getRowList(), u = this.position.getPositionList(), R = u[e], g = u[n], f = R?.pageNo, T = g?.pageNo, p = R?.rowIndex, m = g?.rowIndex, L = d[p], I = d[m];
|
|
27725
27683
|
let O = 0, S = 0;
|
|
27726
|
-
this.draw.getCursor().getHitLineStartIndex() || (O = L?.elementList[0]?.value === _ ? R?.index - L?.startIndex : R?.index - L?.startIndex + 1), R === g ? S = O : S =
|
|
27684
|
+
this.draw.getCursor().getHitLineStartIndex() || (O = L?.elementList[0]?.value === _ ? R?.index - L?.startIndex : R?.index - L?.startIndex + 1), R === g ? S = O : S = I.elementList[0]?.value === _ ? g.index - I.startIndex : g.index - I.startIndex + 1;
|
|
27727
27685
|
const X = [], y = this.draw.getOriginalHeight(), W = this.draw.getOriginalPageGap(), Y = this.position.getSelectionPositionList();
|
|
27728
27686
|
if (Y) {
|
|
27729
27687
|
let w = null, K = 0, H = null;
|
|
@@ -27767,7 +27725,7 @@ class xT {
|
|
|
27767
27725
|
startPageNo: f,
|
|
27768
27726
|
endPageNo: T,
|
|
27769
27727
|
startRowNo: p,
|
|
27770
|
-
endRowNo:
|
|
27728
|
+
endRowNo: m,
|
|
27771
27729
|
startColNo: O,
|
|
27772
27730
|
endColNo: S,
|
|
27773
27731
|
rangeRects: X,
|
|
@@ -27802,7 +27760,7 @@ class xT {
|
|
|
27802
27760
|
const l = e[s], { startIndex: a, endIndex: c, tableId: d, startTrIndex: u, startTdIndex: R } = l;
|
|
27803
27761
|
let g = i;
|
|
27804
27762
|
if (l.tableId) {
|
|
27805
|
-
const p = r.find((
|
|
27763
|
+
const p = r.find((m) => m.id === d);
|
|
27806
27764
|
p && (g = p.trList?.[u]?.tdList?.[R]?.positionList || []);
|
|
27807
27765
|
}
|
|
27808
27766
|
const f = ht(g[a]), T = ht(g[c]);
|
|
@@ -28057,9 +28015,9 @@ class xT {
|
|
|
28057
28015
|
}
|
|
28058
28016
|
locationCatalog(t) {
|
|
28059
28017
|
const e = this.draw.getOriginalElementList();
|
|
28060
|
-
function n(
|
|
28061
|
-
for (let
|
|
28062
|
-
const O = I
|
|
28018
|
+
function n(m, L) {
|
|
28019
|
+
for (let I = 0; I < m.length; I++) {
|
|
28020
|
+
const O = m[I];
|
|
28063
28021
|
if (O.type === P.TABLE) {
|
|
28064
28022
|
const S = O.trList;
|
|
28065
28023
|
for (let X = 0; X < S.length; X++) {
|
|
@@ -28070,7 +28028,7 @@ class xT {
|
|
|
28070
28028
|
return {
|
|
28071
28029
|
...D,
|
|
28072
28030
|
isTable: !0,
|
|
28073
|
-
index:
|
|
28031
|
+
index: I,
|
|
28074
28032
|
trIndex: X,
|
|
28075
28033
|
tdIndex: W,
|
|
28076
28034
|
tdId: Y.id,
|
|
@@ -28081,9 +28039,9 @@ class xT {
|
|
|
28081
28039
|
}
|
|
28082
28040
|
}
|
|
28083
28041
|
if (O.titleId === L) {
|
|
28084
|
-
let S =
|
|
28085
|
-
for (; S <
|
|
28086
|
-
if (
|
|
28042
|
+
let S = I;
|
|
28043
|
+
for (; S < m.length; ) {
|
|
28044
|
+
if (m[S + 1]?.titleId !== L)
|
|
28087
28045
|
return {
|
|
28088
28046
|
isTable: !1,
|
|
28089
28047
|
startIndex: S,
|
|
@@ -28260,10 +28218,10 @@ class xT {
|
|
|
28260
28218
|
for (let g = 0; g < R.length; g++) {
|
|
28261
28219
|
const f = R[g];
|
|
28262
28220
|
for (let T = 0; T < f.tdList.length; T++) {
|
|
28263
|
-
const p = f.tdList[T],
|
|
28264
|
-
if (
|
|
28221
|
+
const p = f.tdList[T], m = n(p.value, l, a);
|
|
28222
|
+
if (m)
|
|
28265
28223
|
return {
|
|
28266
|
-
...
|
|
28224
|
+
...m,
|
|
28267
28225
|
positionContext: {
|
|
28268
28226
|
isTable: !0,
|
|
28269
28227
|
index: c - 1,
|
|
@@ -28463,21 +28421,21 @@ class xT {
|
|
|
28463
28421
|
return null;
|
|
28464
28422
|
let f = null, T = null;
|
|
28465
28423
|
const p = this.draw.getOriginalElementList();
|
|
28466
|
-
let
|
|
28424
|
+
let m = null;
|
|
28467
28425
|
const L = this.position.getOriginalPositionList();
|
|
28468
28426
|
if (a) {
|
|
28469
28427
|
const O = p[c].trList?.[d].tdList[u];
|
|
28470
|
-
T = O?.value[R] || null,
|
|
28428
|
+
T = O?.value[R] || null, m = O?.positionList?.[R] || null, f = {
|
|
28471
28429
|
element: p[c],
|
|
28472
28430
|
trIndex: d,
|
|
28473
28431
|
tdIndex: u
|
|
28474
28432
|
};
|
|
28475
28433
|
} else
|
|
28476
|
-
T = p[c] || null,
|
|
28477
|
-
let
|
|
28478
|
-
if (
|
|
28479
|
-
const { pageNo: O, coordinate: { leftTop: S, rightTop: X }, lineHeight: y } =
|
|
28480
|
-
|
|
28434
|
+
T = p[c] || null, m = L[c] || null;
|
|
28435
|
+
let I = null;
|
|
28436
|
+
if (m) {
|
|
28437
|
+
const { pageNo: O, coordinate: { leftTop: S, rightTop: X }, lineHeight: y } = m, W = this.draw.getOriginalHeight(), Y = this.draw.getOriginalPageGap();
|
|
28438
|
+
I = {
|
|
28481
28439
|
x: S[0],
|
|
28482
28440
|
y: S[1] + O * (W + Y),
|
|
28483
28441
|
width: X[0] - S[0],
|
|
@@ -28487,7 +28445,7 @@ class xT {
|
|
|
28487
28445
|
return {
|
|
28488
28446
|
pageNo: r,
|
|
28489
28447
|
element: T,
|
|
28490
|
-
rangeRect:
|
|
28448
|
+
rangeRect: I,
|
|
28491
28449
|
tableInfo: f
|
|
28492
28450
|
};
|
|
28493
28451
|
}
|
|
@@ -28649,8 +28607,8 @@ class xT {
|
|
|
28649
28607
|
if (f.type === P.TABLE) {
|
|
28650
28608
|
const T = f.trList;
|
|
28651
28609
|
for (const p of T)
|
|
28652
|
-
for (const
|
|
28653
|
-
d(
|
|
28610
|
+
for (const m of p.tdList)
|
|
28611
|
+
d(m.value);
|
|
28654
28612
|
continue;
|
|
28655
28613
|
}
|
|
28656
28614
|
f.type !== P.MACRO && f.type !== P.CUSTOM_MACRO && f.type !== P.REUSABLE_ITEM || e && f.id !== e || n && f.dictCode !== n || i && f.label !== i || r && f.areaId !== r || (c = !0, f.type === P.MACRO ? f.value = s : f.type === P.CUSTOM_MACRO ? f.macroConfig ? (f.macroConfig.value = s, l !== void 0 && (f.macroConfig.code = l)) : f.macroConfig = { type: "text", value: s } : f.type === P.REUSABLE_ITEM && (f.reusableItemConfig ? f.reusableItemConfig.value = s : f.reusableItemConfig = { value: s }));
|
|
@@ -28749,10 +28707,10 @@ class xT {
|
|
|
28749
28707
|
for (let g = 0; g < R.length; g++) {
|
|
28750
28708
|
const f = R[g];
|
|
28751
28709
|
for (let T = 0; T < f.tdList.length; T++) {
|
|
28752
|
-
const p = f.tdList[T],
|
|
28753
|
-
if (
|
|
28710
|
+
const p = f.tdList[T], m = s(p.value, c);
|
|
28711
|
+
if (m)
|
|
28754
28712
|
return {
|
|
28755
|
-
...
|
|
28713
|
+
...m,
|
|
28756
28714
|
isTable: !0,
|
|
28757
28715
|
index: d,
|
|
28758
28716
|
trIndex: g,
|
|
@@ -29540,16 +29498,16 @@ class Wp {
|
|
|
29540
29498
|
})[0]);
|
|
29541
29499
|
}
|
|
29542
29500
|
const f = a && !!n, T = this.draw.getElementList();
|
|
29543
|
-
let p = T[i] || null,
|
|
29544
|
-
R?.element && (p = R.element,
|
|
29545
|
-
const L = R?.element || null,
|
|
29501
|
+
let p = T[i] || null, m = T[r] || null;
|
|
29502
|
+
R?.element && (p = R.element, m = R.element);
|
|
29503
|
+
const L = R?.element || null, I = R?.tableInfo?.element || null;
|
|
29546
29504
|
R?.tableInfo?.element && (g = R.tableInfo.element);
|
|
29547
29505
|
const O = this.draw.getZone().getZone();
|
|
29548
29506
|
return {
|
|
29549
29507
|
startElement: p,
|
|
29550
|
-
endElement:
|
|
29508
|
+
endElement: m,
|
|
29551
29509
|
hitElement: L,
|
|
29552
|
-
hitTableElement:
|
|
29510
|
+
hitTableElement: I,
|
|
29553
29511
|
isReadonly: e,
|
|
29554
29512
|
editorHasSelection: l,
|
|
29555
29513
|
editorTextFocus: s,
|
|
@@ -29628,8 +29586,8 @@ class Wp {
|
|
|
29628
29586
|
R.append(document.createTextNode(this.i18n.t("contextmenu.global.cancel"))), d.append(R), l.append(d), s.append(l), s.style.display = "block";
|
|
29629
29587
|
const g = window.innerWidth, f = s.getBoundingClientRect(), T = f.width, p = n + T > g ? n - T : n;
|
|
29630
29588
|
s.style.left = `${p}px`;
|
|
29631
|
-
const
|
|
29632
|
-
return s.style.top = `${
|
|
29589
|
+
const m = window.innerHeight, L = f.height, I = i + L > m ? i - L : i;
|
|
29590
|
+
return s.style.top = `${I}px`, this.contextMenuContainerList.push(s), s;
|
|
29633
29591
|
}
|
|
29634
29592
|
_removeSubMenu(t) {
|
|
29635
29593
|
const e = this.contextMenuRelationShip.get(t);
|