legalesign-document-viewer 1.0.7 → 1.0.8
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/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ls-add-new-button_20.cjs.entry.js +11 -10
- package/dist/cjs/ls-assignee-select_21.cjs.entry.js +14 -13
- package/dist/cjs/ls-compose-loader_7.cjs.entry.js +2 -2
- package/dist/cjs/ls-document-viewer.cjs.entry.js +16 -5
- package/dist/cjs/ls-document-viewer.cjs.js +1 -1
- package/dist/cjs/ls-field-alignment_3.cjs.entry.js +1 -1
- package/dist/cjs/{mouseHandlers-DvI94o4n.js → mouseHandlers-Bvj_z8jR.js} +5 -2
- package/dist/cjs/mouseHandlers-Bvj_z8jR.js.map +1 -0
- package/dist/collection/components/ls-document-viewer/ls-document-viewer.css +5 -1
- package/dist/collection/components/ls-document-viewer/ls-document-viewer.js +15 -3
- package/dist/collection/components/ls-document-viewer/ls-document-viewer.js.map +1 -1
- package/dist/collection/components/ls-document-viewer/mouseHandlers.js +3 -0
- package/dist/collection/components/ls-document-viewer/mouseHandlers.js.map +1 -1
- package/dist/collection/components/ls-field-content/ls-field-content.js +10 -7
- package/dist/collection/components/ls-field-content/ls-field-content.js.map +1 -1
- package/dist/collection/components/ls-field-properties-multiple/ls-field-properties-multiple.js +10 -9
- package/dist/collection/components/ls-field-properties-multiple/ls-field-properties-multiple.js.map +1 -1
- package/dist/collection/components/ls-field-type-select/ls-field-type-select.js +4 -6
- package/dist/collection/components/ls-field-type-select/ls-field-type-select.js.map +1 -1
- package/dist/collection/components/ls-left-bar/ls-left-bar.js +1 -1
- package/dist/collection/components/ls-left-bar/ls-left-bar.js.map +1 -1
- package/dist/collection/components/ls-recipient-card/ls-recipient-card.js +1 -1
- package/dist/collection/components/ls-recipient-card/ls-recipient-card.js.map +1 -1
- package/dist/components/ls-document-viewer.js +32 -20
- package/dist/components/ls-document-viewer.js.map +1 -1
- package/dist/components/ls-field-content.js +1 -1
- package/dist/components/ls-field-distribute.js +1 -1
- package/dist/components/ls-field-properties-checkbox.js +1 -1
- package/dist/components/ls-field-properties-date.js +1 -1
- package/dist/components/ls-field-properties-dropdown.js +2 -2
- package/dist/components/ls-field-properties-email.js +1 -1
- package/dist/components/ls-field-properties-file.js +1 -1
- package/dist/components/ls-field-properties-general.js +1 -1
- package/dist/components/ls-field-properties-multiple.js +1 -1
- package/dist/components/ls-field-properties-number.js +1 -1
- package/dist/components/ls-field-properties-signature.js +1 -1
- package/dist/components/ls-field-properties-text.js +1 -1
- package/dist/components/ls-field-properties.js +1 -1
- package/dist/components/ls-field-type-select.js +1 -1
- package/dist/components/ls-left-bar.js +1 -1
- package/dist/components/ls-recipient-card.js +1 -1
- package/dist/components/ls-statusbar.js +1 -1
- package/dist/components/{p-D8SiEyxv.js → p-2HtsobiE.js} +4 -4
- package/dist/components/{p-D8SiEyxv.js.map → p-2HtsobiE.js.map} +1 -1
- package/dist/components/{p-Diybi844.js → p-BXlDP4-Y.js} +4 -4
- package/dist/components/{p-Diybi844.js.map → p-BXlDP4-Y.js.map} +1 -1
- package/dist/components/{p-Cb2OmRru.js → p-BlzW961U.js} +3 -3
- package/dist/components/{p-Cb2OmRru.js.map → p-BlzW961U.js.map} +1 -1
- package/dist/components/{p-Bi1odRMK.js → p-Brlb4nfo.js} +5 -2
- package/dist/components/p-Brlb4nfo.js.map +1 -0
- package/dist/components/{p-CJOYo3je.js → p-C5IJ94WY.js} +4 -4
- package/dist/components/{p-CJOYo3je.js.map → p-C5IJ94WY.js.map} +1 -1
- package/dist/components/{p-BOg59Hui.js → p-CHTXmZcS.js} +14 -13
- package/dist/components/p-CHTXmZcS.js.map +1 -0
- package/dist/components/{p-DsEMqzrc.js → p-CNEq_UtK.js} +4 -4
- package/dist/components/{p-DsEMqzrc.js.map → p-CNEq_UtK.js.map} +1 -1
- package/dist/components/{p-Qxe4qT6a.js → p-C_Y_lx-7.js} +3 -3
- package/dist/components/{p-Qxe4qT6a.js.map → p-C_Y_lx-7.js.map} +1 -1
- package/dist/components/{p-Dr4bZsUx.js → p-CcBEOEMO.js} +4 -4
- package/dist/components/{p-Dr4bZsUx.js.map → p-CcBEOEMO.js.map} +1 -1
- package/dist/components/{p-D25GhWKW.js → p-CoVwpMi0.js} +17 -17
- package/dist/components/p-CoVwpMi0.js.map +1 -0
- package/dist/components/{p-T0TVxf3z.js → p-Cp17g5RT.js} +4 -4
- package/dist/components/{p-T0TVxf3z.js.map → p-Cp17g5RT.js.map} +1 -1
- package/dist/components/{p-DXwZW96h.js → p-DEWq4YUk.js} +4 -4
- package/dist/components/{p-DXwZW96h.js.map → p-DEWq4YUk.js.map} +1 -1
- package/dist/components/{p-OChWH88R.js → p-DwVGD10J.js} +4 -4
- package/dist/components/{p-OChWH88R.js.map → p-DwVGD10J.js.map} +1 -1
- package/dist/components/{p-DX7Kb9cb.js → p-KqKkoW4F.js} +6 -8
- package/dist/components/p-KqKkoW4F.js.map +1 -0
- package/dist/components/{p-CxJyHyur.js → p-NIpH5Un0.js} +14 -14
- package/dist/components/{p-CxJyHyur.js.map → p-NIpH5Un0.js.map} +1 -1
- package/dist/components/{p-BJoHocUQ.js → p-iUgn2UWj.js} +13 -10
- package/dist/components/p-iUgn2UWj.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/ls-add-new-button_20.entry.js +11 -10
- package/dist/esm/ls-assignee-select_21.entry.js +14 -13
- package/dist/esm/ls-compose-loader_7.entry.js +2 -2
- package/dist/esm/ls-document-viewer.entry.js +16 -5
- package/dist/esm/ls-document-viewer.entry.js.map +1 -1
- package/dist/esm/ls-document-viewer.js +1 -1
- package/dist/esm/ls-field-alignment_3.entry.js +1 -1
- package/dist/esm/{mouseHandlers-Bwr3Oepx.js → mouseHandlers-D8J1b1SM.js} +5 -2
- package/dist/esm/mouseHandlers-D8J1b1SM.js.map +1 -0
- package/dist/ls-document-viewer/ls-document-viewer.esm.js +1 -1
- package/dist/ls-document-viewer/p-232cbd8d.entry.js +2 -0
- package/dist/ls-document-viewer/p-232cbd8d.entry.js.map +1 -0
- package/dist/ls-document-viewer/p-649b6726.entry.js +2 -0
- package/dist/ls-document-viewer/p-649b6726.entry.js.map +1 -0
- package/dist/ls-document-viewer/p-67d622c7.entry.js +2 -0
- package/dist/ls-document-viewer/p-67d622c7.entry.js.map +1 -0
- package/dist/ls-document-viewer/{p-9b6efe5e.entry.js → p-88c316be.entry.js} +3 -3
- package/dist/ls-document-viewer/p-88c316be.entry.js.map +1 -0
- package/dist/ls-document-viewer/{p-SfEjlcdN.js → p-CkHg_-KZ.js} +2 -2
- package/dist/ls-document-viewer/p-CkHg_-KZ.js.map +1 -0
- package/dist/ls-document-viewer/{p-a4a0858b.entry.js → p-e48efc3a.entry.js} +2 -2
- package/dist/types/components/ls-document-viewer/ls-document-viewer.d.ts +3 -0
- package/package.json +1 -1
- package/dist/cjs/mouseHandlers-DvI94o4n.js.map +0 -1
- package/dist/components/p-BJoHocUQ.js.map +0 -1
- package/dist/components/p-BOg59Hui.js.map +0 -1
- package/dist/components/p-Bi1odRMK.js.map +0 -1
- package/dist/components/p-D25GhWKW.js.map +0 -1
- package/dist/components/p-DX7Kb9cb.js.map +0 -1
- package/dist/esm/mouseHandlers-Bwr3Oepx.js.map +0 -1
- package/dist/ls-document-viewer/p-6f2687fc.entry.js +0 -2
- package/dist/ls-document-viewer/p-6f2687fc.entry.js.map +0 -1
- package/dist/ls-document-viewer/p-9b6efe5e.entry.js.map +0 -1
- package/dist/ls-document-viewer/p-SfEjlcdN.js.map +0 -1
- package/dist/ls-document-viewer/p-eed3e530.entry.js +0 -2
- package/dist/ls-document-viewer/p-eed3e530.entry.js.map +0 -1
- package/dist/ls-document-viewer/p-f39bf280.entry.js +0 -2
- package/dist/ls-document-viewer/p-f39bf280.entry.js.map +0 -1
- /package/dist/ls-document-viewer/{p-a4a0858b.entry.js.map → p-e48efc3a.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{f as t,r as s,a as i}from"./p-BWxpQfiq.js";import{D as e,F as n,a as h}from"./p-04cXI5GQ.js";import{s as o}from"./p-CmJjDhcp.js";import{d as l}from"./p-CwCWCxsI.js";import{d as c}from"./p-WVWIAGo_.js";const a=10;let r=[];let f=null;function d(t,s){f={x:t,y:s}}function u(){f=null}function p(){if(!this.selected||this.selected.length===0)return;r=this.selected.map((t=>({...t.dataItem})));f=null}function g(){if(!this.selected||this.selected.length===0)return;p.bind(this)();const t=Array.from(this.selected);this.mutate.emit(t.map((t=>({action:"delete",data:t.dataItem}))))}function m(){if(r.length===0)return;const t=Math.min(...r.map((t=>t.top)));const s=Math.min(...r.map((t=>t.left)));const i=r.map((i=>{const e={...i,id:btoa("ele"+crypto.randomUUID())};if(f){const n=this.component.shadowRoot.getElementById("ls-document-frame");const h=n.getBoundingClientRect();const o=Math.round((f.x-h.left)/this.zoom);const l=Math.round((f.y-h.top)/this.zoom);e.top=l+(i.top-t);e.left=o+(i.left-s)}else{e.top=i.top+a;e.left=i.left+a}const n=this.pageDimensions[this.pageNum-1];if(e.top+i.height>n.height){e.top=n.height-i.height}if(e.left+i.width>n.width){e.left=n.width-i.width}if(e.top<0)e.top=0;if(e.left<0)e.left=0;e.page=this.pageNum;e.pageDimensions=n;return e}));const e=i.length;this.mutate.emit(i.map((t=>({action:"create",data:t}))));const n=()=>{const t=Array.from(this.component.shadowRoot.querySelectorAll("ls-editor-field"));const s=t.filter((t=>t.dataItem?.page===this.pageNum));const i=s.slice(-e);if(i.length===e){t.forEach((t=>{t.selected=false;t.multiSelected=false}));i.forEach((t=>{t.selected=true;t.multiSelected=i.length>1}));this.selected=i;this.selectFields.emit(i.map((t=>t.dataItem)))}};const h=()=>{if(!this.isMutating){requestAnimationFrame(n)}else{requestAnimationFrame(h)}};requestAnimationFrame(h);r=i;f=null}const x=8;function b(t,s,i,e,n,h,o,l){const c={edges:{},guides:[]};const a=t+i;const r=s+e;const f=[];const d=[];if(n.includes("n"))f.push("n");if(n.includes("s"))f.push("s");if(n.includes("e"))d.push("e");if(n.includes("w"))d.push("w");const u={n:s,s:r,e:a,w:t};for(const t of[...d,...f]){const s=t==="e"||t==="w";const i=u[t];let e=x+1;let n=null;for(const t of h){if(t.dataItem?.page!==o)continue;if(l&&l.includes(t.dataItem?.id))continue;const h=t.offsetLeft;const c=t.offsetTop;const a=h+t.offsetWidth;const r=c+t.offsetHeight;const f=h+t.offsetWidth/2;const d=c+t.offsetHeight/2;const u=s?[h,a,f]:[c,r,d];for(const t of u){const s=Math.abs(i-t);if(s<e){e=s;n=t}}}if(n!==null&&e<=x){c.edges[t]=n;c.guides.push({orientation:s?"v":"h",position:n})}}return c}function v(t,s,i,e,n,h,o){const l={x:null,y:null,guides:[]};const c=t+i;const a=s+e;const r=t+i/2;const f=s+e/2;let d=x+1;let u=x+1;let p=t;let g=s;for(const i of n){if(i.dataItem?.page!==h)continue;if(o&&o.includes(i.dataItem?.id))continue;const e=i.offsetLeft;const n=i.offsetTop;const l=e+i.offsetWidth;const m=n+i.offsetHeight;const x=e+i.offsetWidth/2;const b=n+i.offsetHeight/2;const v=[{dragEdge:t,targetEdge:e},{dragEdge:t,targetEdge:l},{dragEdge:c,targetEdge:e},{dragEdge:c,targetEdge:l},{dragEdge:r,targetEdge:x}];for(const{dragEdge:s,targetEdge:i}of v){const e=Math.abs(s-i);if(e<d){d=e;p=t+(i-s)}}const M=[{dragEdge:s,targetEdge:n},{dragEdge:s,targetEdge:m},{dragEdge:a,targetEdge:n},{dragEdge:a,targetEdge:m},{dragEdge:f,targetEdge:b}];for(const{dragEdge:t,targetEdge:i}of M){const e=Math.abs(t-i);if(e<u){u=e;g=s+(i-t)}}}if(d>x)p=t;if(u>x)g=s;if(d<=x){l.x=p;const t=p+i;const s=p+i/2;const e=new Set;for(const i of n){if(i.dataItem?.page!==h)continue;if(o&&o.includes(i.dataItem?.id))continue;const n=i.offsetLeft;const l=n+i.offsetWidth;const c=n+i.offsetWidth/2;for(const i of[n,l,c]){if(Math.abs(p-i)<1||Math.abs(t-i)<1||Math.abs(s-i)<1){e.add(i)}}}e.forEach((t=>l.guides.push({orientation:"v",position:t})))}if(u<=x){l.y=g;const t=g+e;const s=g+e/2;const i=new Set;for(const e of n){if(e.dataItem?.page!==h)continue;if(o&&o.includes(e.dataItem?.id))continue;const n=e.offsetTop;const l=n+e.offsetHeight;const c=n+e.offsetHeight/2;for(const e of[n,l,c]){if(Math.abs(g-e)<1||Math.abs(t-e)<1||Math.abs(s-e)<1){i.add(e)}}}i.forEach((t=>l.guides.push({orientation:"h",position:t})))}return l}const M=t=>t.preventDefault();function y(t){let s=this.component.shadowRoot.getElementById("ls-move-blocked-tooltip");if(!s){s=document.createElement("div");s.id="ls-move-blocked-tooltip";s.style.position="fixed";s.style.padding="0.375rem 0.75rem";s.style.borderRadius="0.5rem";s.style.background="var(--gray-100, #45484d)";s.style.color="white";s.style.fontSize="0.75rem";s.style.fontFamily="var(--font-family, IBM Plex Sans, sans-serif)";s.style.pointerEvents="none";s.style.zIndex="10000";s.style.whiteSpace="nowrap";s.textContent=c.t("fieldproperties.cannotmovemultipage");this.component.shadowRoot.appendChild(s)}s.style.left=t.clientX+12+"px";s.style.top=t.clientY+12+"px"}function w(){const t=this.component.shadowRoot?.getElementById("ls-move-blocked-tooltip");if(t)t.remove()}function E(){document.body.style.userSelect="none";document.body.style.webkitUserSelect="none";document.addEventListener("selectstart",M)}function k(){document.body.style.userSelect="";document.body.style.webkitUserSelect="";document.removeEventListener("selectstart",M)}function A(){var t=this.component.shadowRoot.getElementById("ls-box-selector");const s=this.selected?.filter((t=>t.dataItem?.page===this.pageNum));if(!s||s.length<2){t.style.visibility="hidden";return}let i=Infinity,e=Infinity,n=-Infinity,h=-Infinity;s.forEach((t=>{const s=t.offsetLeft;const o=t.offsetTop;const l=s+t.offsetWidth;const c=o+t.offsetHeight;if(s<i)i=s;if(o<e)e=o;if(l>n)n=l;if(c>h)h=c}));t.style.left=i+"px";t.style.top=e+"px";t.style.width=n-i+"px";t.style.height=h-e+"px";t.style.visibility="visible"}let T=null;function I(t,s){if(T)clearTimeout(T);T=setTimeout((()=>{this.mutate.emit([t])}),s)}const S=5;function $(t){if(this._isToolboxDragging)return;if(this.mode==="preview"||this._template?.locked){return}const s=this.component.shadowRoot.getElementById("ls-document-frame");const i=this.component.shadowRoot.getElementById("document-frame-wrapper");if(!s)return;const e=t.target;const n=e===s||e===i||e?.id==="pdf-canvas"||e?.tagName?.toLowerCase()==="canvas";const h=e?.tagName?.toLowerCase()==="ls-editor-field";if(!n&&!h)return;this.hitField=null;const l=this.component.shadowRoot.querySelectorAll("ls-editor-field");l.forEach((s=>{const{left:i,top:e,height:n,width:h,bottom:o,right:l}=s.getBoundingClientRect();const c={left:s.offsetLeft,top:s.offsetTop,height:n,width:h,x:t.screenX,y:t.screenY};this.startMouse=c;const a=Math.min(8,h*.25);const r=Math.min(8,n*.25);const f=Math.min(16,h*.35);const d=Math.min(16,n*.35);if(Math.abs(t.clientX-l)<f&&Math.abs(t.clientY-o)<d){this.edgeSide="se";this.hitField=s}else if(Math.abs(t.clientX-i)<f&&Math.abs(t.clientY-e)<d){this.edgeSide="nw";this.hitField=s}else if(Math.abs(t.clientX-l)<f&&Math.abs(t.clientY-e)<d){this.edgeSide="ne";this.hitField=s}else if(Math.abs(t.clientX-i)<f&&Math.abs(t.clientY-o)<d){this.edgeSide="sw";this.hitField=s}else if(Math.abs(t.clientX-i)<a&&t.clientY>=e&&t.clientY<=o){this.edgeSide="w";this.hitField=s}else if(Math.abs(t.clientX-l)<a&&t.clientY>=e&&t.clientY<=o){this.edgeSide="e";this.hitField=s}else if(Math.abs(t.clientY-e)<r&&t.clientX>=i&&t.clientX<=l){this.edgeSide="n";this.hitField=s}else if(Math.abs(t.clientY-o)<r&&t.clientX>=i&&t.clientX<=l){this.edgeSide="s";this.hitField=s}else if(t.clientY<=o&&t.clientY>=e&&t.clientX>=i&&t.clientX<=l){this.edgeSide=null;this.hitField=s}}));if(this.hitField&&t.shiftKey===false&&t.altKey===false){var c=this.component.shadowRoot.getElementById("ls-box-selector");c.style.visibility="hidden";o(this.hitField.dataItem);this.selected.forEach((t=>o(t.dataItem)));if(this.hitField.selected===false){l.forEach((t=>{t.selected=false}));this.selected=[this.hitField];this.selectFields.emit([this.hitField.dataItem])}const{height:s,width:i}=this.hitField.getBoundingClientRect();const e={left:this.hitField.offsetLeft,top:this.hitField.offsetTop,height:s,width:i,x:t.screenX,y:t.screenY};this.startMouse=e;this.startLocations=this.selected.map((t=>{const{height:s,width:i}=t.getBoundingClientRect();const e=t;return{top:e.offsetTop,left:e.offsetLeft,height:s,width:i}}));this.selectionBox=null}else if(this.hitField&&t.altKey===true){if(this.hitField.selected===true){this.hitField.selected=false;this.selected=this.selected.filter((t=>t!==this.hitField));this.selectFields.emit(this.selected.map((t=>t.dataItem)))}this.hitField=null;this.startMouse=null;this.startLocations=null;this.selectionBox=null;A.bind(this)()}else if(this.hitField&&t.shiftKey===true){var c=this.component.shadowRoot.getElementById("ls-box-selector");c.style.visibility="hidden";if(this.hitField.selected===true){this.hitField.selected=false;this.selected=this.selected.filter((t=>t!==this.hitField));this.selectFields.emit(this.selected.map((t=>t.dataItem)));this.hitField=null;this.startMouse=null;this.startLocations=null;this.selectionBox=null;A.bind(this)()}else{this.hitField.selected=true;this.selected=[...this.selected,this.hitField];this.selectFields.emit(this.selected.map((t=>t.dataItem)));const{height:s,width:i}=this.hitField.getBoundingClientRect();const e={left:this.hitField.offsetLeft,top:this.hitField.offsetTop,height:s,width:i,x:t.screenX,y:t.screenY};this.startMouse=e;this.startLocations=this.selected.map((t=>{const{height:s,width:i}=t.getBoundingClientRect();const e=t;return{top:e.offsetTop,left:e.offsetLeft,height:s,width:i}}));this.selectionBox=null}}else{this.startLocations=null;this.startMouse=null;this.selectionBox=null;this._pendingSelectionBox={x:t.clientX,y:t.clientY};E();if(!t.shiftKey&&!t.altKey){this.unselect();this.selectFields.emit([]);this.selected=[];A.bind(this)()}}}function B(t){return t.height<=5||t.left<0||t.top<0||t.left+t.width>=t.pageDimensions.width||t.top+t.height>=t.pageDimensions.height}function P(t){t.preventDefault();if(this._isToolboxDragging)return;if(this.mode==="preview"||this._template?.locked){return}if(this.hitField&&this.edgeSide&&this.startMouse&&t.buttons===1){E();const e=t.screenX-this.startMouse.x;const n=t.screenY-this.startMouse.y;var i=this.hitField.dataItem.formElementType==="signature"&&this._template.fixSignatureScale;let h=this.startMouse.left;let o=this.startMouse.top;let l=this.startMouse.width;let c=this.startMouse.height;switch(this.edgeSide){case"n":if(i){c=this.startMouse.height-n;l=c*(this.startMouse.width/this.startMouse.height)}else{o=this.startMouse.top+n;c=this.startMouse.height-n}break;case"s":if(i){c=this.startMouse.height+n;l=c*(this.startMouse.width/this.startMouse.height)}else{c=this.startMouse.height+n}break;case"e":if(i){l=this.startMouse.width+e;c=l*(this.startMouse.height/this.startMouse.width)}else{l=this.startMouse.width+e}break;case"w":if(i){l=this.startMouse.width-e;c=l*(this.startMouse.height/this.startMouse.width);h=this.startMouse.left+e}else{h=this.startMouse.left+e;l=this.startMouse.width-e}break;case"se":if(i){l=this.startMouse.width+e;c=l/(this.startMouse.width/this.startMouse.height)}else{l=this.startMouse.width+e;c=this.startMouse.height+n}break;case"nw":if(i){l=this.startMouse.width-e;c=l/(this.startMouse.width/this.startMouse.height);h=this.startMouse.left+e;o=this.startMouse.top+(this.startMouse.height-c)}else{h=this.startMouse.left+e;o=this.startMouse.top+n;l=this.startMouse.width-e;c=this.startMouse.height-n}break;case"ne":if(i){l=this.startMouse.width+e;c=l/(this.startMouse.width/this.startMouse.height);o=this.startMouse.top+(this.startMouse.height-c)}else{l=this.startMouse.width+e;o=this.startMouse.top+n;c=this.startMouse.height-n}break;case"sw":if(i){l=this.startMouse.width-e;c=l/(this.startMouse.width/this.startMouse.height);h=this.startMouse.left+e}else{h=this.startMouse.left+e;l=this.startMouse.width-e;c=this.startMouse.height+n}break}const a=Array.from(this.component.shadowRoot.querySelectorAll("ls-editor-field"));const r=b(h,o,l,c,this.edgeSide,a,this.pageNum,[this.hitField.dataItem.id]);if(i){const t=this.startMouse.width/this.startMouse.height;const s=r.edges.e!==undefined||r.edges.w!==undefined;const i=r.edges.n!==undefined||r.edges.s!==undefined;let e=s;let n=i;if(s&&i&&this.edgeSide.length===2){const t=r.edges.e!==undefined?Math.abs(h+l-r.edges.e):Math.abs(h-r.edges.w);const s=r.edges.s!==undefined?Math.abs(o+c-r.edges.s):Math.abs(o-r.edges.n);if(t<=s){n=false}else{e=false}}if(n&&!e){if(r.edges.n!==undefined){c=o+c-r.edges.n;o=r.edges.n}if(r.edges.s!==undefined){c=r.edges.s-o}l=c*t}else if(e){if(r.edges.w!==undefined){l=h+l-r.edges.w;h=r.edges.w}if(r.edges.e!==undefined){l=r.edges.e-h}c=l/t}if(this.edgeSide.includes("n"))o=this.startMouse.top+this.startMouse.height-c;if(this.edgeSide.includes("w"))h=this.startMouse.left+this.startMouse.width-l;const a=r.guides.filter((t=>e&&t.orientation==="v"||n&&t.orientation==="h"));D.bind(this)(a)}else{if(r.edges.n!==undefined){c=o+c-r.edges.n;o=r.edges.n}if(r.edges.s!==undefined){c=r.edges.s-o}if(r.edges.w!==undefined){l=h+l-r.edges.w;h=r.edges.w}if(r.edges.e!==undefined){l=r.edges.e-h}D.bind(this)(r.guides)}if(!B({...this.hitField.dataItem,left:h/this.zoom,top:o/this.zoom,width:l/this.zoom,height:c/this.zoom})){this.hitField.style.left=h+"px";this.hitField.style.top=o+"px";this.hitField.style.width=l+"px";this.hitField.style.height=c+"px";this.hitField.dataItem={...this.hitField.dataItem,left:h/this.zoom,top:o/this.zoom,width:l/this.zoom,height:c/this.zoom}}I.bind(this)({action:"update",data:s(this.hitField.dataItem)},700)}else if((this.selectionBox||this._pendingSelectionBox)&&t.buttons===1){if(!this.selectionBox&&this._pendingSelectionBox){const s=t.clientX-this._pendingSelectionBox.x;const i=t.clientY-this._pendingSelectionBox.y;if(Math.abs(s)<S&&Math.abs(i)<S)return;this.selectionBox=this._pendingSelectionBox;this._pendingSelectionBox=null;this.component.style.cursor="crosshair"}this.isBoxing=true;var e=this.component.shadowRoot.getElementById("ls-drag-selector");var n=this.component.shadowRoot.getElementById("ls-document-frame");var h=n.getBoundingClientRect().left;var o=n.getBoundingClientRect().top;const s=t.clientX-this.selectionBox.x;const i=t.clientY-this.selectionBox.y;e.style.visibility="visible";e.style.left=(this.selectionBox.x>t.clientX?t.clientX:this.selectionBox.x)-h+n.scrollLeft+"px";e.style.top=(this.selectionBox.y>t.clientY?t.clientY:this.selectionBox.y)-o+n.scrollTop+"px";e.style.width=Math.abs(s)+"px";e.style.height=Math.abs(i)+"px"}else if(this.startLocations&&!this.edgeSide&&this.startMouse&&t.buttons===1){const s=new Set(this.selected?.map((t=>t.dataItem?.page)));if(s.size>1){y.bind(this)(t);return}this.isMoving=true;E();var l=this.component.shadowRoot.getElementById("ls-box-selector");l.style.visibility="hidden";if(this.selected?.length){this.selected.forEach((t=>{const s=t.shadowRoot?.getElementById("editing-input");if(s)s.blur()}))}const i=t.screenX-this.startMouse.x;const e=t.screenY-this.startMouse.y;if(this.selected?.length){const t=this.startLocations[0].left+i;const s=this.startLocations[0].top+e;const n=this.startLocations[0].width;const h=this.startLocations[0].height;const o=Array.from(this.component.shadowRoot.querySelectorAll("ls-editor-field"));const l=this.selected.map((t=>t.dataItem.id));const c=v(t,s,n,h,o,this.pageNum,l);const a=c.x!==null?c.x-t:0;const r=c.y!==null?c.y-s:0;for(let t=0;t<this.selected.length;t++){const s=this.startLocations[t].left+i+a;const n=this.startLocations[t].top+e+r;if(s>=0&&n>=0&&s<=(this.pageDimensions[this.pageNum-1].width-this.selected[t].dataItem.width)*this.zoom&&n<=(this.pageDimensions[this.pageNum-1].height-this.selected[t].dataItem.height)*this.zoom){this.selected[t].style.left=Math.round(s)+"px";this.selected[t].style.top=Math.round(n)+"px"}}D.bind(this)(c.guides);A.bind(this)()}}}function j(t){this.edgeSide=null;this.startMouse=null;this._pendingSelectionBox=null;this.component.style.cursor="auto";k();q.bind(this)();w.bind(this)();if(this.selectionBox&&this.isBoxing){this.isBoxing=false;var s=this.component.shadowRoot.getElementById("ls-drag-selector");var e=this.component.shadowRoot.querySelectorAll("ls-editor-field");const n=t.shiftKey;const h=t.altKey;this.selectionBox=null;const o=i(e,s,!h,n||h);s.style.visibility="hidden";if(h){const t=new Set(o.map((t=>t.dataItem?.id)));o.forEach((t=>{t.selected=false}));this.selected=this.selected.filter((s=>!t.has(s.dataItem?.id)))}else if(n){const t=new Set(this.selected.map((t=>t.dataItem?.id)));const s=o.filter((s=>!t.has(s.dataItem?.id)));this.selected=[...this.selected,...s]}else{this.selected=Array.from(o)}this.selectFields.emit(this.selected.map((t=>t.dataItem)));A.bind(this)()}}function W(s){if(this.mode==="preview"||this._template?.locked){return}if(this.isMoving){this.isMoving=false;const s=this.component.shadowRoot.querySelectorAll("ls-editor-field");const i=this.component.shadowRoot.getElementById("ls-document-frame");const e=Array.from(s).filter((t=>t.selected));this.mutate.emit(Array.from(s).filter((t=>t.selected)).map((s=>{const e={...s.dataItem,...t(i,s,s.dataItem.pageDimensions.height,s.dataItem.pageDimensions.width,this.zoom)};s.dataItem=e;return{action:"update",data:e}})));this.selectFields.emit(e.map((t=>t.dataItem)));A.bind(this)()}else{this.selectionBox=null;let t=false;const i=this.component.shadowRoot.querySelectorAll("ls-editor-field");i.forEach((e=>{const{left:n,top:h,bottom:o,right:l}=e.getBoundingClientRect();if(s.clientY<=o&&s.clientY>=h&&s.clientX>=n&&s.clientX<=l){this.edgeSide=null;this.hitField=e;if(!s.shiftKey&&!s.altKey){i.forEach((t=>t.selected=false));e.selected=true}t=true}}));if(t){u()}else{d(s.clientX,s.clientY)}this.selected=Array.from(i).filter((t=>t.selected));this.selectFields.emit(this.selected.map((t=>t.dataItem)));A.bind(this)()}}function D(t){const s=this.component.shadowRoot.getElementById("ls-document-frame");let i=this.component.shadowRoot.getElementById("ls-snap-guides");if(!i){i=document.createElement("div");i.id="ls-snap-guides";i.style.position="absolute";i.style.top="0";i.style.left="0";i.style.width="100%";i.style.height="100%";i.style.pointerEvents="none";i.style.zIndex="9999";s.appendChild(i)}i.innerHTML="";for(const s of t){const t=document.createElement("div");t.style.position="absolute";t.style.backgroundColor="transparent";if(s.orientation==="v"){t.style.left=s.position+"px";t.style.top="0";t.style.width="0";t.style.height="100%";t.style.borderLeft="1px dashed var(--gray-50, #c8c9cc)"}else{t.style.top=s.position+"px";t.style.left="0";t.style.width="100%";t.style.height="0";t.style.borderTop="1px dashed var(--gray-50, #c8c9cc)"}i.appendChild(t)}}function q(){const t=this.component.shadowRoot.getElementById("ls-snap-guides");if(t)t.innerHTML=""}function C(t){if(this._template?.locked){return}if(this._cancelToolboxDrag){this._cancelToolboxDrag()}const s=this.component.shadowRoot.getElementById("ls-document-frame");const i=this.zoom;this._isToolboxDragging=true;let n=false;E();this.component.shadowRoot.querySelectorAll("ls-left-bar, ls-compose-loader").forEach((t=>{t.shadowRoot?.querySelectorAll("ls-toolbox-field").forEach((t=>t.classList.add("ls-dv-dragging")))}));const h=document.createElement("div");h.id="ls-toolbox-ghost";h.style.position="fixed";h.style.width=t.defaultWidth*i+"px";h.style.height=t.defaultHeight*i+"px";h.style.border=`1px dashed ${l[this.signer%100].s60}`;const o=l[this.signer%100].s20.replace("#","");const a=parseInt(o.substring(0,2),16);const r=parseInt(o.substring(2,4),16);const f=parseInt(o.substring(4,6),16);h.style.background=`rgba(${a},${r},${f},0.5)`;h.style.boxShadow="0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06)";h.style.pointerEvents="none";h.style.zIndex="10000";h.style.visibility="hidden";h.style.boxSizing="content-box";h.style.fontFamily="var(--font-family, IBM Plex Sans, sans-serif)";h.style.fontSize=Math.round(e*i)+"px";h.style.color=l[this.signer%100].s100;h.style.overflow="visible";h.style.whiteSpace="nowrap";h.style.display="flex";h.style.alignItems="center";h.style.textTransform="capitalize";h.innerHTML=t.formElementType;const d=this.mode==="compose"?this._recipients?.find((t=>t.signerIndex===this.signer)):this._template.roles.find((t=>t.signerIndex===this.signer));const u=this.mode==="compose"&&d?.previousRecipientDecides?"To Be Decided":this.mode==="compose"?`${d?.firstName} ${d?.lastName}`:d?.name||(this.signer===0?"Sender":`Participant ${this.signer}`);const p=document.createElement("p");p.style.position="absolute";p.style.color="var(--gray-80, #3a3a3a)";p.style.bottom=`-${1*i}rem`;p.style.left="0";p.style.margin="0";p.style.padding="0";p.style.lineHeight="1";p.style.fontSize=`${.625*i}rem`;p.style.whiteSpace="nowrap";p.style.fontFamily="sans-serif";p.style.textTransform="none";p.style.pointerEvents="none";p.textContent=`${c.t("fieldproperties.assignedto")} ${u}`;h.appendChild(p);this.component.shadowRoot.appendChild(h);const g=document.createElement("div");g.id="ls-esc-chip";g.style.position="fixed";g.style.bottom="1.5rem";g.style.left="50%";g.style.transform="translateX(-50%)";g.style.padding="0.375rem 0.75rem";g.style.borderRadius="0.625rem";g.style.background="var(--gray-100, #1f2937)";g.style.color="white";g.style.fontSize="0.75rem";g.style.fontFamily="var(--font-family, IBM Plex Sans, sans-serif)";g.style.pointerEvents="none";g.style.zIndex="10000";g.style.boxShadow="0 4px 6px -1px rgba(0, 0, 0, 0.1)";g.textContent="Press Esc to cancel field placement";this.component.shadowRoot.appendChild(g);const m=e=>{e.preventDefault();n=true;const o=t.defaultWidth*i;const l=t.defaultHeight*i;const c=s.getBoundingClientRect();const a=e.clientX>=c.left&&e.clientX<=c.right&&e.clientY>=c.top&&e.clientY<=c.bottom;const r=e.buttons===1;let f=document.getElementById("ls-drag-cursor");if((a||r)&&!f){f=document.createElement("style");f.id="ls-drag-cursor";f.textContent="* { cursor: grabbing !important; }";document.head.appendChild(f)}else if(!a&&!r&&f){f.remove()}if(a){h.style.visibility="visible";h.style.opacity="1";const t=e.clientX-c.left+s.scrollLeft;const i=e.clientY-c.top+s.scrollTop;let n=t-o/2;let a=i-l/2;const r=Array.from(this.component.shadowRoot.querySelectorAll("ls-editor-field"));const f=v(n,a,o,l,r,this.pageNum);h.style.left=(f.x!==null?f.x+c.left-s.scrollLeft:e.clientX-o/2)+"px";h.style.top=(f.y!==null?f.y+c.top-s.scrollTop:e.clientY-l/2)+"px";D.bind(this)(f.guides)}else if(r){h.style.visibility="visible";h.style.opacity="0.5";h.style.left=e.clientX-o/2+"px";h.style.top=e.clientY-l/2+"px";q.bind(this)()}else{h.style.visibility="hidden";q.bind(this)()}};const x=()=>{document.removeEventListener("mousemove",m);document.removeEventListener("mouseup",b);document.removeEventListener("keydown",M);h.remove();g.remove();q.bind(this)();k();const t=document.getElementById("ls-drag-cursor");if(t)t.remove();this.component.shadowRoot.querySelectorAll("ls-left-bar, ls-compose-loader").forEach((t=>{t.shadowRoot?.querySelectorAll("ls-toolbox-field").forEach((t=>t.classList.remove("ls-dv-dragging")))}));this._isToolboxDragging=false;this._cancelToolboxDrag=null};const b=e=>{if(!n)return;const h=s.getBoundingClientRect();const o=e.clientX>=h.left&&e.clientX<=h.right&&e.clientY>=h.top&&e.clientY<=h.bottom;x();if(o){const n=t.defaultWidth*i;const o=t.defaultHeight*i;const l=e.clientX-h.left+s.scrollLeft;const c=e.clientY-h.top+s.scrollTop;let a=l-n/2;let r=c-o/2;const f=Array.from(this.component.shadowRoot.querySelectorAll("ls-editor-field"));const d=v(a,r,n,o,f,this.pageNum);if(d.x!==null)a=d.x;if(d.y!==null)r=d.y;const u=r/i;const p=a/i;const g=this.pageDimensions[this.pageNum-1].width;const m=this.pageDimensions[this.pageNum-1].height;const x=Math.max(0,Math.min(p,g-t.defaultWidth));const b=Math.max(0,Math.min(u,m-t.defaultHeight));this.component.shadowRoot.querySelectorAll("ls-editor-field").forEach((t=>t.selected=false));const M=btoa("ele"+crypto.randomUUID());const y={action:"create",data:{id:M,value:t.formElementType==="checkbox"?"false":"",formElementType:t.formElementType,elementType:t.elementType,validation:t.validation,substantive:false,top:b,left:x,hideBorder:false,height:t.defaultHeight,width:t.defaultWidth,pageDimensions:this.pageDimensions[this.pageNum-1],fontName:this.fontFamily,fontSize:this.fontSize,align:"left",signer:this.signer,page:this.pageNum,mapTo:null,label:"",helpText:null,logicGroup:null,optional:t.formElementType==="checkbox",options:null,logicAction:null,labelExtra:null,fieldOrder:null,ax:x>0?x/this.pageDimensions[this.pageNum-1].width:0,ay:b>0?b/this.pageDimensions[this.pageNum-1].height:0,bx:(x+t.defaultWidth)/this.pageDimensions[this.pageNum-1].width,by:(b+t.defaultHeight)/this.pageDimensions[this.pageNum-1].height,templateId:this._template.id}};this.mutate.emit([y])}};const M=t=>{if(t.key==="Escape"){t.preventDefault();t.stopPropagation();x()}};this._cancelToolboxDrag=x;document.addEventListener("mousemove",m);document.addEventListener("mouseup",b);document.addEventListener("keydown",M)}function F(t){if(this.mode==="preview"||this._template?.locked){return}console.log("double click",this.fieldTypeSelected,this.signer);try{let i=this.fieldTypeSelected;if(this.checkType("APPROVER")&&i.elementType==="signature"){i={label:"Text",formElementType:"text",elementType:"text",validation:0,defaultHeight:n["text"].defaultHeight,defaultWidth:n["text"].defaultWidth}}if(this.signer===0&&i.elementType==="signature"){i={label:"Auto Sign",formElementType:"auto sign",elementType:"admin",validation:3e3,defaultHeight:n["auto sign"].defaultHeight,defaultWidth:n["auto sign"].defaultWidth}}this.component.shadowRoot.querySelectorAll("ls-editor-field").forEach((t=>t.selected=false));var s=this.component.shadowRoot.getElementById("ls-document-frame");const o=btoa("ele"+crypto.randomUUID());const l=this.pageDimensions[this.pageNum-1].width;const c=this.pageDimensions[this.pageNum-1].height;const a=t.offsetY/this.zoom+s.scrollTop;const r=t.offsetX/this.zoom+s.scrollLeft;const f=Math.max(0,Math.min(a,c-i.defaultHeight));const d=Math.max(0,Math.min(r,l-i.defaultWidth));const u={action:"create",data:{id:o,value:i.formElementType==="checkbox"?"false":"",formElementType:i.formElementType,elementType:i.elementType,validation:i.validation,substantive:false,top:f,left:d,hideBorder:false,height:i.defaultHeight,width:i.defaultWidth,pageDimensions:this.pageDimensions[this.pageNum-1],fontName:h,fontSize:e,align:"left",signer:this.signer,page:this.pageNum,mapTo:null,label:"",helpText:null,logicGroup:null,optional:i.formElementType==="checkbox",options:null,logicAction:null,labelExtra:null,fieldOrder:null,ax:d>0?d/this.pageDimensions[this.pageNum-1].width:0,ay:f>0?f/this.pageDimensions[this.pageNum-1].height:0,bx:(d+i.defaultWidth)/this.pageDimensions[this.pageNum-1].width,by:(f+i.defaultHeight)/this.pageDimensions[this.pageNum-1].height,templateId:this._template.id}};this.mutate.emit([u])}catch(t){console.error(t)}}export{g as a,$ as b,p as c,P as d,j as e,F as f,W as m,B as o,m as p,C as t,A as u};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{f as t,r as s,a as i}from"./p-BWxpQfiq.js";import{D as e,F as n,a as h}from"./p-04cXI5GQ.js";import{s as o}from"./p-CmJjDhcp.js";import{d as l}from"./p-CwCWCxsI.js";import{d as c}from"./p-WVWIAGo_.js";const a=10;let r=[];let f=null;function d(t,s){f={x:t,y:s}}function u(){f=null}function p(){if(!this.selected||this.selected.length===0)return;r=this.selected.map((t=>({...t.dataItem})));f=null}function m(){if(!this.selected||this.selected.length===0)return;p.bind(this)();const t=Array.from(this.selected);this.mutate.emit(t.map((t=>({action:"delete",data:t.dataItem}))))}function g(){if(r.length===0)return;const t=Math.min(...r.map((t=>t.top)));const s=Math.min(...r.map((t=>t.left)));const i=r.map((i=>{const e={...i,id:btoa("ele"+crypto.randomUUID())};if(f){const n=this.component.shadowRoot.getElementById("ls-document-frame");const h=n.getBoundingClientRect();const o=Math.round((f.x-h.left)/this.zoom);const l=Math.round((f.y-h.top)/this.zoom);e.top=l+(i.top-t);e.left=o+(i.left-s)}else{e.top=i.top+a;e.left=i.left+a}const n=this.pageDimensions[this.pageNum-1];if(e.top+i.height>n.height){e.top=n.height-i.height}if(e.left+i.width>n.width){e.left=n.width-i.width}if(e.top<0)e.top=0;if(e.left<0)e.left=0;e.page=this.pageNum;e.pageDimensions=n;return e}));const e=i.length;this.mutate.emit(i.map((t=>({action:"create",data:t}))));const n=()=>{const t=Array.from(this.component.shadowRoot.querySelectorAll("ls-editor-field"));const s=t.filter((t=>t.dataItem?.page===this.pageNum));const i=s.slice(-e);if(i.length===e){t.forEach((t=>{t.selected=false;t.multiSelected=false}));i.forEach((t=>{t.selected=true;t.multiSelected=i.length>1}));this.selected=i;this.selectFields.emit(i.map((t=>t.dataItem)))}};const h=()=>{if(!this.isMutating){requestAnimationFrame(n)}else{requestAnimationFrame(h)}};requestAnimationFrame(h);r=i;f=null}const x=8;function b(t,s,i,e,n,h,o,l){const c={edges:{},guides:[]};const a=t+i;const r=s+e;const f=[];const d=[];if(n.includes("n"))f.push("n");if(n.includes("s"))f.push("s");if(n.includes("e"))d.push("e");if(n.includes("w"))d.push("w");const u={n:s,s:r,e:a,w:t};for(const t of[...d,...f]){const s=t==="e"||t==="w";const i=u[t];let e=x+1;let n=null;for(const t of h){if(t.dataItem?.page!==o)continue;if(l&&l.includes(t.dataItem?.id))continue;const h=t.offsetLeft;const c=t.offsetTop;const a=h+t.offsetWidth;const r=c+t.offsetHeight;const f=h+t.offsetWidth/2;const d=c+t.offsetHeight/2;const u=s?[h,a,f]:[c,r,d];for(const t of u){const s=Math.abs(i-t);if(s<e){e=s;n=t}}}if(n!==null&&e<=x){c.edges[t]=n;c.guides.push({orientation:s?"v":"h",position:n})}}return c}function v(t,s,i,e,n,h,o){const l={x:null,y:null,guides:[]};const c=t+i;const a=s+e;const r=t+i/2;const f=s+e/2;let d=x+1;let u=x+1;let p=t;let m=s;for(const i of n){if(i.dataItem?.page!==h)continue;if(o&&o.includes(i.dataItem?.id))continue;const e=i.offsetLeft;const n=i.offsetTop;const l=e+i.offsetWidth;const g=n+i.offsetHeight;const x=e+i.offsetWidth/2;const b=n+i.offsetHeight/2;const v=[{dragEdge:t,targetEdge:e},{dragEdge:t,targetEdge:l},{dragEdge:c,targetEdge:e},{dragEdge:c,targetEdge:l},{dragEdge:r,targetEdge:x}];for(const{dragEdge:s,targetEdge:i}of v){const e=Math.abs(s-i);if(e<d){d=e;p=t+(i-s)}}const M=[{dragEdge:s,targetEdge:n},{dragEdge:s,targetEdge:g},{dragEdge:a,targetEdge:n},{dragEdge:a,targetEdge:g},{dragEdge:f,targetEdge:b}];for(const{dragEdge:t,targetEdge:i}of M){const e=Math.abs(t-i);if(e<u){u=e;m=s+(i-t)}}}if(d>x)p=t;if(u>x)m=s;if(d<=x){l.x=p;const t=p+i;const s=p+i/2;const e=new Set;for(const i of n){if(i.dataItem?.page!==h)continue;if(o&&o.includes(i.dataItem?.id))continue;const n=i.offsetLeft;const l=n+i.offsetWidth;const c=n+i.offsetWidth/2;for(const i of[n,l,c]){if(Math.abs(p-i)<1||Math.abs(t-i)<1||Math.abs(s-i)<1){e.add(i)}}}e.forEach((t=>l.guides.push({orientation:"v",position:t})))}if(u<=x){l.y=m;const t=m+e;const s=m+e/2;const i=new Set;for(const e of n){if(e.dataItem?.page!==h)continue;if(o&&o.includes(e.dataItem?.id))continue;const n=e.offsetTop;const l=n+e.offsetHeight;const c=n+e.offsetHeight/2;for(const e of[n,l,c]){if(Math.abs(m-e)<1||Math.abs(t-e)<1||Math.abs(s-e)<1){i.add(e)}}}i.forEach((t=>l.guides.push({orientation:"h",position:t})))}return l}const M=t=>t.preventDefault();function y(t){let s=this.component.shadowRoot.getElementById("ls-move-blocked-tooltip");if(!s){s=document.createElement("div");s.id="ls-move-blocked-tooltip";s.style.position="fixed";s.style.padding="0.375rem 0.75rem";s.style.borderRadius="0.5rem";s.style.background="var(--gray-100, #45484d)";s.style.color="white";s.style.fontSize="0.75rem";s.style.fontFamily="var(--font-family, IBM Plex Sans, sans-serif)";s.style.pointerEvents="none";s.style.zIndex="10000";s.style.whiteSpace="nowrap";s.textContent=c.t("fieldproperties.cannotmovemultipage");this.component.shadowRoot.appendChild(s)}s.style.left=t.clientX+12+"px";s.style.top=t.clientY+12+"px"}function w(){const t=this.component.shadowRoot?.getElementById("ls-move-blocked-tooltip");if(t)t.remove()}function E(){document.body.style.userSelect="none";document.body.style.webkitUserSelect="none";document.addEventListener("selectstart",M)}function k(){document.body.style.userSelect="";document.body.style.webkitUserSelect="";document.removeEventListener("selectstart",M)}function A(){var t=this.component.shadowRoot.getElementById("ls-box-selector");const s=this.selected?.filter((t=>t.dataItem?.page===this.pageNum));if(!s||s.length<2){t.style.visibility="hidden";return}let i=Infinity,e=Infinity,n=-Infinity,h=-Infinity;s.forEach((t=>{const s=t.offsetLeft;const o=t.offsetTop;const l=s+t.offsetWidth;const c=o+t.offsetHeight;if(s<i)i=s;if(o<e)e=o;if(l>n)n=l;if(c>h)h=c}));t.style.left=i+"px";t.style.top=e+"px";t.style.width=n-i+"px";t.style.height=h-e+"px";t.style.visibility="visible"}let T=null;function I(t,s){if(T)clearTimeout(T);T=setTimeout((()=>{this.mutate.emit([t])}),s)}const S=5;function $(t){if(this._isToolboxDragging)return;if(this.mode==="preview"||this._template?.locked){return}const s=this.component.shadowRoot.getElementById("ls-document-frame");const i=this.component.shadowRoot.getElementById("document-frame-wrapper");if(!s)return;const e=t.target;const n=e===s||e===i||e?.id==="pdf-canvas"||e?.tagName?.toLowerCase()==="canvas";const h=e?.tagName?.toLowerCase()==="ls-editor-field";if(!n&&!h)return;this.hitField=null;const l=this.component.shadowRoot.querySelectorAll("ls-editor-field");l.forEach((s=>{const{left:i,top:e,height:n,width:h,bottom:o,right:l}=s.getBoundingClientRect();const c={left:s.offsetLeft,top:s.offsetTop,height:n,width:h,x:t.screenX,y:t.screenY};this.startMouse=c;const a=Math.min(8,h*.25);const r=Math.min(8,n*.25);const f=Math.min(16,h*.35);const d=Math.min(16,n*.35);if(Math.abs(t.clientX-l)<f&&Math.abs(t.clientY-o)<d){this.edgeSide="se";this.hitField=s}else if(Math.abs(t.clientX-i)<f&&Math.abs(t.clientY-e)<d){this.edgeSide="nw";this.hitField=s}else if(Math.abs(t.clientX-l)<f&&Math.abs(t.clientY-e)<d){this.edgeSide="ne";this.hitField=s}else if(Math.abs(t.clientX-i)<f&&Math.abs(t.clientY-o)<d){this.edgeSide="sw";this.hitField=s}else if(Math.abs(t.clientX-i)<a&&t.clientY>=e&&t.clientY<=o){this.edgeSide="w";this.hitField=s}else if(Math.abs(t.clientX-l)<a&&t.clientY>=e&&t.clientY<=o){this.edgeSide="e";this.hitField=s}else if(Math.abs(t.clientY-e)<r&&t.clientX>=i&&t.clientX<=l){this.edgeSide="n";this.hitField=s}else if(Math.abs(t.clientY-o)<r&&t.clientX>=i&&t.clientX<=l){this.edgeSide="s";this.hitField=s}else if(t.clientY<=o&&t.clientY>=e&&t.clientX>=i&&t.clientX<=l){this.edgeSide=null;this.hitField=s}}));if(this.hitField&&t.shiftKey===false&&t.altKey===false){var c=this.component.shadowRoot.getElementById("ls-box-selector");c.style.visibility="hidden";o(this.hitField.dataItem);this.selected.forEach((t=>o(t.dataItem)));if(this.hitField.selected===false){l.forEach((t=>{t.selected=false}));this.selected=[this.hitField];this.selectFields.emit([this.hitField.dataItem])}const{height:s,width:i}=this.hitField.getBoundingClientRect();const e={left:this.hitField.offsetLeft,top:this.hitField.offsetTop,height:s,width:i,x:t.screenX,y:t.screenY};this.startMouse=e;this.startLocations=this.selected.map((t=>{const{height:s,width:i}=t.getBoundingClientRect();const e=t;return{top:e.offsetTop,left:e.offsetLeft,height:s,width:i}}));this.selectionBox=null}else if(this.hitField&&t.altKey===true){if(this.hitField.selected===true){this.hitField.selected=false;this.selected=this.selected.filter((t=>t!==this.hitField));this.selectFields.emit(this.selected.map((t=>t.dataItem)))}this.hitField=null;this.startMouse=null;this.startLocations=null;this.selectionBox=null;A.bind(this)()}else if(this.hitField&&t.shiftKey===true){var c=this.component.shadowRoot.getElementById("ls-box-selector");c.style.visibility="hidden";if(this.hitField.selected===true){this.hitField.selected=false;this.selected=this.selected.filter((t=>t!==this.hitField));this.selectFields.emit(this.selected.map((t=>t.dataItem)));this.hitField=null;this.startMouse=null;this.startLocations=null;this.selectionBox=null;A.bind(this)()}else{this.hitField.selected=true;this.selected=[...this.selected,this.hitField];this.selectFields.emit(this.selected.map((t=>t.dataItem)));const{height:s,width:i}=this.hitField.getBoundingClientRect();const e={left:this.hitField.offsetLeft,top:this.hitField.offsetTop,height:s,width:i,x:t.screenX,y:t.screenY};this.startMouse=e;this.startLocations=this.selected.map((t=>{const{height:s,width:i}=t.getBoundingClientRect();const e=t;return{top:e.offsetTop,left:e.offsetLeft,height:s,width:i}}));this.selectionBox=null}}else{this.startLocations=null;this.startMouse=null;this.selectionBox=null;this._pendingSelectionBox={x:t.clientX,y:t.clientY};E();if(!t.shiftKey&&!t.altKey){this.unselect();this.selectFields.emit([]);this.selected=[];A.bind(this)()}}}function B(t){return t.height<=5||t.left<0||t.top<0||t.left+t.width>=t.pageDimensions.width||t.top+t.height>=t.pageDimensions.height}function P(t){t.preventDefault();if(this._isToolboxDragging)return;if(this.mode==="preview"||this._template?.locked){return}if(this.hitField&&this.edgeSide&&this.startMouse&&t.buttons===1){E();const e=t.screenX-this.startMouse.x;const n=t.screenY-this.startMouse.y;var i=this.hitField.dataItem.formElementType==="signature"&&this._template.fixSignatureScale;let h=this.startMouse.left;let o=this.startMouse.top;let l=this.startMouse.width;let c=this.startMouse.height;switch(this.edgeSide){case"n":if(i){c=this.startMouse.height-n;l=c*(this.startMouse.width/this.startMouse.height)}else{o=this.startMouse.top+n;c=this.startMouse.height-n}break;case"s":if(i){c=this.startMouse.height+n;l=c*(this.startMouse.width/this.startMouse.height)}else{c=this.startMouse.height+n}break;case"e":if(i){l=this.startMouse.width+e;c=l*(this.startMouse.height/this.startMouse.width)}else{l=this.startMouse.width+e}break;case"w":if(i){l=this.startMouse.width-e;c=l*(this.startMouse.height/this.startMouse.width);h=this.startMouse.left+e}else{h=this.startMouse.left+e;l=this.startMouse.width-e}break;case"se":if(i){l=this.startMouse.width+e;c=l/(this.startMouse.width/this.startMouse.height)}else{l=this.startMouse.width+e;c=this.startMouse.height+n}break;case"nw":if(i){l=this.startMouse.width-e;c=l/(this.startMouse.width/this.startMouse.height);h=this.startMouse.left+e;o=this.startMouse.top+(this.startMouse.height-c)}else{h=this.startMouse.left+e;o=this.startMouse.top+n;l=this.startMouse.width-e;c=this.startMouse.height-n}break;case"ne":if(i){l=this.startMouse.width+e;c=l/(this.startMouse.width/this.startMouse.height);o=this.startMouse.top+(this.startMouse.height-c)}else{l=this.startMouse.width+e;o=this.startMouse.top+n;c=this.startMouse.height-n}break;case"sw":if(i){l=this.startMouse.width-e;c=l/(this.startMouse.width/this.startMouse.height);h=this.startMouse.left+e}else{h=this.startMouse.left+e;l=this.startMouse.width-e;c=this.startMouse.height+n}break}const a=Array.from(this.component.shadowRoot.querySelectorAll("ls-editor-field"));const r=b(h,o,l,c,this.edgeSide,a,this.pageNum,[this.hitField.dataItem.id]);if(i){const t=this.startMouse.width/this.startMouse.height;const s=r.edges.e!==undefined||r.edges.w!==undefined;const i=r.edges.n!==undefined||r.edges.s!==undefined;let e=s;let n=i;if(s&&i&&this.edgeSide.length===2){const t=r.edges.e!==undefined?Math.abs(h+l-r.edges.e):Math.abs(h-r.edges.w);const s=r.edges.s!==undefined?Math.abs(o+c-r.edges.s):Math.abs(o-r.edges.n);if(t<=s){n=false}else{e=false}}if(n&&!e){if(r.edges.n!==undefined){c=o+c-r.edges.n;o=r.edges.n}if(r.edges.s!==undefined){c=r.edges.s-o}l=c*t}else if(e){if(r.edges.w!==undefined){l=h+l-r.edges.w;h=r.edges.w}if(r.edges.e!==undefined){l=r.edges.e-h}c=l/t}if(this.edgeSide.includes("n"))o=this.startMouse.top+this.startMouse.height-c;if(this.edgeSide.includes("w"))h=this.startMouse.left+this.startMouse.width-l;const a=r.guides.filter((t=>e&&t.orientation==="v"||n&&t.orientation==="h"));D.bind(this)(a)}else{if(r.edges.n!==undefined){c=o+c-r.edges.n;o=r.edges.n}if(r.edges.s!==undefined){c=r.edges.s-o}if(r.edges.w!==undefined){l=h+l-r.edges.w;h=r.edges.w}if(r.edges.e!==undefined){l=r.edges.e-h}D.bind(this)(r.guides)}if(!B({...this.hitField.dataItem,left:h/this.zoom,top:o/this.zoom,width:l/this.zoom,height:c/this.zoom})){this.hitField.style.left=h+"px";this.hitField.style.top=o+"px";this.hitField.style.width=l+"px";this.hitField.style.height=c+"px";this.hitField.dataItem={...this.hitField.dataItem,left:h/this.zoom,top:o/this.zoom,width:l/this.zoom,height:c/this.zoom}}I.bind(this)({action:"update",data:s(this.hitField.dataItem)},700)}else if((this.selectionBox||this._pendingSelectionBox)&&t.buttons===1){if(!this.selectionBox&&this._pendingSelectionBox){const s=t.clientX-this._pendingSelectionBox.x;const i=t.clientY-this._pendingSelectionBox.y;if(Math.abs(s)<S&&Math.abs(i)<S)return;this.selectionBox=this._pendingSelectionBox;this._pendingSelectionBox=null;this.component.style.cursor="crosshair"}this.isBoxing=true;var e=this.component.shadowRoot.getElementById("ls-drag-selector");var n=this.component.shadowRoot.getElementById("ls-document-frame");var h=n.getBoundingClientRect().left;var o=n.getBoundingClientRect().top;const s=t.clientX-this.selectionBox.x;const i=t.clientY-this.selectionBox.y;e.style.visibility="visible";e.style.left=(this.selectionBox.x>t.clientX?t.clientX:this.selectionBox.x)-h+n.scrollLeft+"px";e.style.top=(this.selectionBox.y>t.clientY?t.clientY:this.selectionBox.y)-o+n.scrollTop+"px";e.style.width=Math.abs(s)+"px";e.style.height=Math.abs(i)+"px"}else if(this.startLocations&&!this.edgeSide&&this.startMouse&&t.buttons===1){const s=new Set(this.selected?.map((t=>t.dataItem?.page)));if(s.size>1){y.bind(this)(t);return}this.isMoving=true;E();var l=this.component.shadowRoot.getElementById("ls-box-selector");l.style.visibility="hidden";if(this.selected?.length){this.selected.forEach((t=>{const s=t.shadowRoot?.getElementById("editing-input");if(s)s.blur()}))}const i=t.screenX-this.startMouse.x;const e=t.screenY-this.startMouse.y;if(this.selected?.length){const t=this.startLocations[0].left+i;const s=this.startLocations[0].top+e;const n=this.startLocations[0].width;const h=this.startLocations[0].height;const o=Array.from(this.component.shadowRoot.querySelectorAll("ls-editor-field"));const l=this.selected.map((t=>t.dataItem.id));const c=v(t,s,n,h,o,this.pageNum,l);const a=c.x!==null?c.x-t:0;const r=c.y!==null?c.y-s:0;for(let t=0;t<this.selected.length;t++){const s=this.startLocations[t].left+i+a;const n=this.startLocations[t].top+e+r;if(s>=0&&n>=0&&s<=(this.pageDimensions[this.pageNum-1].width-this.selected[t].dataItem.width)*this.zoom&&n<=(this.pageDimensions[this.pageNum-1].height-this.selected[t].dataItem.height)*this.zoom){this.selected[t].style.left=Math.round(s)+"px";this.selected[t].style.top=Math.round(n)+"px"}}D.bind(this)(c.guides);A.bind(this)()}}}function j(t){this.edgeSide=null;this.startMouse=null;this._pendingSelectionBox=null;this.component.style.cursor="auto";k();q.bind(this)();w.bind(this)();if(this.selectionBox&&this.isBoxing){this.isBoxing=false;var s=this.component.shadowRoot.getElementById("ls-drag-selector");var e=this.component.shadowRoot.querySelectorAll("ls-editor-field");const n=t.shiftKey;const h=t.altKey;this.selectionBox=null;const o=i(e,s,!h,n||h);s.style.visibility="hidden";if(h){const t=new Set(o.map((t=>t.dataItem?.id)));o.forEach((t=>{t.selected=false}));this.selected=this.selected.filter((s=>!t.has(s.dataItem?.id)))}else if(n){const t=new Set(this.selected.map((t=>t.dataItem?.id)));const s=o.filter((s=>!t.has(s.dataItem?.id)));this.selected=[...this.selected,...s]}else{this.selected=Array.from(o)}this.selectFields.emit(this.selected.map((t=>t.dataItem)));A.bind(this)()}}function W(s){if(this.mode==="preview"||this._template?.locked){return}if(this.isMoving){this.isMoving=false;const s=this.component.shadowRoot.querySelectorAll("ls-editor-field");const i=this.component.shadowRoot.getElementById("ls-document-frame");const e=Array.from(s).filter((t=>t.selected));this.mutate.emit(Array.from(s).filter((t=>t.selected)).map((s=>{const e={...s.dataItem,...t(i,s,s.dataItem.pageDimensions.height,s.dataItem.pageDimensions.width,this.zoom)};s.dataItem=e;return{action:"update",data:e}})));this.selectFields.emit(e.map((t=>t.dataItem)));A.bind(this)()}else{this.selectionBox=null;let t=false;const i=this.component.shadowRoot.querySelectorAll("ls-editor-field");i.forEach((e=>{const{left:n,top:h,bottom:o,right:l}=e.getBoundingClientRect();if(s.clientY<=o&&s.clientY>=h&&s.clientX>=n&&s.clientX<=l){this.edgeSide=null;this.hitField=e;if(!s.shiftKey&&!s.altKey){i.forEach((t=>t.selected=false));e.selected=true}t=true}}));if(t){u()}else{d(s.clientX,s.clientY)}this.selected=Array.from(i).filter((t=>t.selected));this.selectFields.emit(this.selected.map((t=>t.dataItem)));A.bind(this)()}}function D(t){const s=this.component.shadowRoot.getElementById("ls-document-frame");let i=this.component.shadowRoot.getElementById("ls-snap-guides");if(!i){i=document.createElement("div");i.id="ls-snap-guides";i.style.position="absolute";i.style.top="0";i.style.left="0";i.style.width="100%";i.style.height="100%";i.style.pointerEvents="none";i.style.zIndex="9999";s.appendChild(i)}i.innerHTML="";for(const s of t){const t=document.createElement("div");t.style.position="absolute";t.style.backgroundColor="transparent";if(s.orientation==="v"){t.style.left=s.position+"px";t.style.top="0";t.style.width="0";t.style.height="100%";t.style.borderLeft="1px dashed var(--gray-50, #c8c9cc)"}else{t.style.top=s.position+"px";t.style.left="0";t.style.width="100%";t.style.height="0";t.style.borderTop="1px dashed var(--gray-50, #c8c9cc)"}i.appendChild(t)}}function q(){const t=this.component.shadowRoot.getElementById("ls-snap-guides");if(t)t.innerHTML=""}function C(t){if(this._template?.locked){return}if(this._cancelToolboxDrag){this._cancelToolboxDrag()}const s=this.component.shadowRoot.getElementById("ls-document-frame");const i=this.zoom;this._isToolboxDragging=true;let n=false;E();this.component.shadowRoot.querySelectorAll("ls-left-bar, ls-compose-loader").forEach((t=>{t.shadowRoot?.querySelectorAll("ls-toolbox-field").forEach((t=>t.classList.add("ls-dv-dragging")))}));const h=document.createElement("div");h.id="ls-toolbox-ghost";h.style.position="fixed";h.style.width=t.defaultWidth*i+"px";h.style.height=t.defaultHeight*i+"px";h.style.border=`1px dashed ${l[this.signer%100].s60}`;const o=l[this.signer%100].s20.replace("#","");const a=parseInt(o.substring(0,2),16);const r=parseInt(o.substring(2,4),16);const f=parseInt(o.substring(4,6),16);h.style.background=`rgba(${a},${r},${f},0.5)`;h.style.boxShadow="0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06)";h.style.pointerEvents="none";h.style.zIndex="10000";h.style.visibility="hidden";h.style.boxSizing="content-box";h.style.fontFamily="var(--font-family, IBM Plex Sans, sans-serif)";h.style.fontSize=Math.round(e*i)+"px";h.style.color=l[this.signer%100].s100;h.style.overflow="visible";h.style.whiteSpace="nowrap";h.style.display="flex";h.style.alignItems="center";h.style.textTransform="capitalize";h.innerHTML=t.formElementType;const d=this.mode==="compose"?this._recipients?.find((t=>t.signerIndex===this.signer)):this._template.roles.find((t=>t.signerIndex===this.signer));const u=this.mode==="compose"&&d?.previousRecipientDecides?"To Be Decided":this.mode==="compose"?`${d?.firstName} ${d?.lastName}`:d?.name||(this.signer===0?"Sender":`Participant ${this.signer}`);const p=document.createElement("p");p.style.position="absolute";p.style.color="var(--gray-80, #3a3a3a)";p.style.bottom=`-${1*i}rem`;p.style.left="0";p.style.margin="0";p.style.padding="0";p.style.lineHeight="1";p.style.fontSize=`${.625*i}rem`;p.style.whiteSpace="nowrap";p.style.fontFamily="sans-serif";p.style.textTransform="none";p.style.pointerEvents="none";p.textContent=`${c.t("fieldproperties.assignedto")} ${u}`;h.appendChild(p);this.component.shadowRoot.appendChild(h);const m=document.createElement("div");m.id="ls-esc-chip";m.style.position="fixed";m.style.bottom="1.5rem";m.style.left="50%";m.style.transform="translateX(-50%)";m.style.padding="0.375rem 0.75rem";m.style.borderRadius="0.625rem";m.style.background="var(--gray-100, #1f2937)";m.style.color="white";m.style.fontSize="0.75rem";m.style.fontFamily="var(--font-family, IBM Plex Sans, sans-serif)";m.style.pointerEvents="none";m.style.zIndex="10000";m.style.boxShadow="0 4px 6px -1px rgba(0, 0, 0, 0.1)";m.textContent="Press Esc to cancel field placement";this.component.shadowRoot.appendChild(m);const g=e=>{e.preventDefault();n=true;const o=t.defaultWidth*i;const l=t.defaultHeight*i;const c=s.getBoundingClientRect();const a=e.clientX>=c.left&&e.clientX<=c.right&&e.clientY>=c.top&&e.clientY<=c.bottom;const r=e.buttons===1;let f=document.getElementById("ls-drag-cursor");if((a||r)&&!f){f=document.createElement("style");f.id="ls-drag-cursor";f.textContent="* { cursor: grabbing !important; }";document.head.appendChild(f)}else if(!a&&!r&&f){f.remove()}if(a){h.style.visibility="visible";h.style.opacity="1";const t=e.clientX-c.left+s.scrollLeft;const i=e.clientY-c.top+s.scrollTop;let n=t-o/2;let a=i-l/2;const r=Array.from(this.component.shadowRoot.querySelectorAll("ls-editor-field"));const f=v(n,a,o,l,r,this.pageNum);h.style.left=(f.x!==null?f.x+c.left-s.scrollLeft:e.clientX-o/2)+"px";h.style.top=(f.y!==null?f.y+c.top-s.scrollTop:e.clientY-l/2)+"px";D.bind(this)(f.guides)}else if(r){h.style.visibility="visible";h.style.opacity="0.5";h.style.left=e.clientX-o/2+"px";h.style.top=e.clientY-l/2+"px";q.bind(this)()}else{h.style.visibility="hidden";q.bind(this)()}};const x=()=>{document.removeEventListener("mousemove",g);document.removeEventListener("mouseup",b);document.removeEventListener("keydown",M);h.remove();m.remove();q.bind(this)();k();const t=document.getElementById("ls-drag-cursor");if(t)t.remove();this.component.shadowRoot.querySelectorAll("ls-left-bar, ls-compose-loader").forEach((t=>{t.shadowRoot?.querySelectorAll("ls-toolbox-field").forEach((t=>t.classList.remove("ls-dv-dragging")))}));this._isToolboxDragging=false;this._cancelToolboxDrag=null};const b=e=>{if(!n)return;const h=s.getBoundingClientRect();const o=e.clientX>=h.left&&e.clientX<=h.right&&e.clientY>=h.top&&e.clientY<=h.bottom;x();if(o){const n=t.defaultWidth*i;const o=t.defaultHeight*i;const l=e.clientX-h.left+s.scrollLeft;const c=e.clientY-h.top+s.scrollTop;let a=l-n/2;let r=c-o/2;const f=Array.from(this.component.shadowRoot.querySelectorAll("ls-editor-field"));const d=v(a,r,n,o,f,this.pageNum);if(d.x!==null)a=d.x;if(d.y!==null)r=d.y;const u=r/i;const p=a/i;const m=this.pageDimensions[this.pageNum-1].width;const g=this.pageDimensions[this.pageNum-1].height;const x=Math.max(0,Math.min(p,m-t.defaultWidth));const b=Math.max(0,Math.min(u,g-t.defaultHeight));this.component.shadowRoot.querySelectorAll("ls-editor-field").forEach((t=>t.selected=false));const M=btoa("ele"+crypto.randomUUID());const y={action:"create",data:{id:M,value:t.formElementType==="checkbox"?"false":"",formElementType:t.formElementType,elementType:t.elementType,validation:t.validation,substantive:false,top:b,left:x,hideBorder:false,height:t.defaultHeight,width:t.defaultWidth,pageDimensions:this.pageDimensions[this.pageNum-1],fontName:this.fontFamily,fontSize:this.fontSize,align:"left",signer:this.signer,page:this.pageNum,mapTo:null,label:"",helpText:null,logicGroup:null,optional:t.formElementType==="checkbox",options:null,logicAction:null,labelExtra:null,fieldOrder:null,ax:x>0?x/this.pageDimensions[this.pageNum-1].width:0,ay:b>0?b/this.pageDimensions[this.pageNum-1].height:0,bx:(x+t.defaultWidth)/this.pageDimensions[this.pageNum-1].width,by:(b+t.defaultHeight)/this.pageDimensions[this.pageNum-1].height,templateId:this._template.id}};this.mutate.emit([y])}};const M=t=>{if(t.key==="Escape"){t.preventDefault();t.stopPropagation();x()}};this._cancelToolboxDrag=x;document.addEventListener("mousemove",g);document.addEventListener("mouseup",b);document.addEventListener("keydown",M)}function F(t){if(this.mode==="preview"||this._template?.locked){return}console.log("double click",this.fieldTypeSelected,this.signer);try{let i=this.fieldTypeSelected;if(this.checkType("APPROVER")&&i.elementType==="signature"){i={label:"Text",formElementType:"text",elementType:"text",validation:0,defaultHeight:n["text"].defaultHeight,defaultWidth:n["text"].defaultWidth}}if(this.signer===0&&i.elementType==="signature"){i={label:"Auto Sign",formElementType:"auto sign",elementType:"admin",validation:3e3,defaultHeight:n["auto sign"].defaultHeight,defaultWidth:n["auto sign"].defaultWidth}}else if(this.signer===0&&i.elementType!=="admin"){i={...i,elementType:"admin"}}this.component.shadowRoot.querySelectorAll("ls-editor-field").forEach((t=>t.selected=false));var s=this.component.shadowRoot.getElementById("ls-document-frame");const o=btoa("ele"+crypto.randomUUID());const l=this.pageDimensions[this.pageNum-1].width;const c=this.pageDimensions[this.pageNum-1].height;const a=t.offsetY/this.zoom+s.scrollTop;const r=t.offsetX/this.zoom+s.scrollLeft;const f=Math.max(0,Math.min(a,c-i.defaultHeight));const d=Math.max(0,Math.min(r,l-i.defaultWidth));const u={action:"create",data:{id:o,value:i.formElementType==="checkbox"?"false":"",formElementType:i.formElementType,elementType:i.elementType,validation:i.validation,substantive:false,top:f,left:d,hideBorder:false,height:i.defaultHeight,width:i.defaultWidth,pageDimensions:this.pageDimensions[this.pageNum-1],fontName:h,fontSize:e,align:"left",signer:this.signer,page:this.pageNum,mapTo:null,label:"",helpText:null,logicGroup:null,optional:i.formElementType==="checkbox",options:null,logicAction:null,labelExtra:null,fieldOrder:null,ax:d>0?d/this.pageDimensions[this.pageNum-1].width:0,ay:f>0?f/this.pageDimensions[this.pageNum-1].height:0,bx:(d+i.defaultWidth)/this.pageDimensions[this.pageNum-1].width,by:(f+i.defaultHeight)/this.pageDimensions[this.pageNum-1].height,templateId:this._template.id}};this.mutate.emit([u])}catch(t){console.error(t)}}export{m as a,$ as b,p as c,P as d,j as e,F as f,W as m,B as o,g as p,C as t,A as u};
|
|
2
|
+
//# sourceMappingURL=p-CkHg_-KZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"p-CkHg_-KZ.js","sources":["src/components/ls-document-viewer/clipboard.ts","src/components/ls-document-viewer/snapHelper.ts","src/components/ls-document-viewer/mouseHandlers.ts"],"sourcesContent":["import { LSApiElement } from '../../types/LSApiElement';\n\nconst PASTE_OFFSET = 10; // px offset when pasting without a click target\n\nlet clipboard: LSApiElement[] = [];\nlet lastClickPosition: { x: number; y: number } | null = null;\n\nexport function getClipboard(): LSApiElement[] {\n return clipboard;\n}\n\nexport function setLastClickPosition(x: number, y: number) {\n lastClickPosition = { x, y };\n}\n\nexport function clearLastClickPosition() {\n lastClickPosition = null;\n}\n\nexport function copySelected() {\n if (!this.selected || this.selected.length === 0) return;\n clipboard = this.selected.map(field => ({ ...field.dataItem }));\n lastClickPosition = null;\n}\n\nexport function cutSelected() {\n if (!this.selected || this.selected.length === 0) return;\n copySelected.bind(this)();\n\n const arr = Array.from(this.selected) as HTMLLsEditorFieldElement[];\n this.mutate.emit(\n arr.map(s => ({ action: 'delete', data: s.dataItem })),\n );\n}\n\nexport function pasteClipboard() {\n if (clipboard.length === 0) return;\n\n // Calculate bounding box of clipboard items to use as offset anchor\n const minTop = Math.min(...clipboard.map(item => item.top));\n const minLeft = Math.min(...clipboard.map(item => item.left));\n\n const createdItems = clipboard.map(item => {\n const newItem = { ...item, id: btoa('ele' + crypto.randomUUID()) };\n\n if (lastClickPosition) {\n // Paste relative to click position, maintaining relative layout of multiple fields\n const frame = this.component.shadowRoot.getElementById('ls-document-frame') as HTMLElement;\n const rect = frame.getBoundingClientRect();\n const clickX = Math.round((lastClickPosition.x - rect.left) / this.zoom);\n const clickY = Math.round((lastClickPosition.y - rect.top) / this.zoom);\n\n newItem.top = clickY + (item.top - minTop);\n newItem.left = clickX + (item.left - minLeft);\n } else {\n // No click target — offset from original position\n newItem.top = item.top + PASTE_OFFSET;\n newItem.left = item.left + PASTE_OFFSET;\n }\n\n // Clamp to page bounds\n const pageDims = this.pageDimensions[this.pageNum - 1];\n if (newItem.top + item.height > pageDims.height) {\n newItem.top = pageDims.height - item.height;\n }\n if (newItem.left + item.width > pageDims.width) {\n newItem.left = pageDims.width - item.width;\n }\n if (newItem.top < 0) newItem.top = 0;\n if (newItem.left < 0) newItem.left = 0;\n\n newItem.page = this.pageNum;\n newItem.pageDimensions = pageDims;\n\n return newItem;\n });\n\n const pasteCount = createdItems.length;\n this.mutate.emit(createdItems.map(data => ({ action: 'create', data })));\n\n // Select pasted fields after mutations complete\n // Fields get new IDs from the API, so we select the last N fields added\n const waitForPaste = () => {\n const fields = Array.from(\n this.component.shadowRoot.querySelectorAll('ls-editor-field'),\n ) as HTMLLsEditorFieldElement[];\n\n const currentPage = fields.filter(f => f.dataItem?.page === this.pageNum);\n // Get the most recently added fields (they're appended to the DOM)\n const pastedFields = currentPage.slice(-pasteCount);\n\n if (pastedFields.length === pasteCount) {\n fields.forEach(f => { f.selected = false; f.multiSelected = false; });\n pastedFields.forEach(f => {\n f.selected = true;\n f.multiSelected = pastedFields.length > 1;\n });\n this.selected = pastedFields;\n this.selectFields.emit(pastedFields.map(f => f.dataItem));\n }\n };\n\n // Wait for isMutating to flip back to false\n const poll = () => {\n if (!this.isMutating) {\n requestAnimationFrame(waitForPaste);\n } else {\n requestAnimationFrame(poll);\n }\n };\n requestAnimationFrame(poll);\n\n // Update clipboard to new items so subsequent pastes keep offsetting\n clipboard = createdItems;\n lastClickPosition = null;\n}\n","export const SNAP_THRESHOLD = 8; // pixels proximity to trigger snap\n\nexport interface SnapResult {\n x: number | null; // snapped left position (null = no snap on x)\n y: number | null; // snapped top position (null = no snap on y)\n guides: { orientation: 'h' | 'v'; position: number }[];\n}\n\n/**\n * Calculate snap positions for a dragging field against existing fields.\n * Snaps edges and centers. Shows guides for ALL aligned edges at the snapped position.\n * All values are in zoomed pixel coordinates relative to the document frame.\n */\nexport interface ResizeSnapResult {\n edges: { n?: number; s?: number; e?: number; w?: number };\n guides: { orientation: 'h' | 'v'; position: number }[];\n}\n\n/**\n * Calculate snap positions for a resizing field edge against existing fields.\n * Only snaps the edges being dragged (determined by edgeSide).\n */\nexport function calculateResizeSnap(\n fieldLeft: number,\n fieldTop: number,\n fieldWidth: number,\n fieldHeight: number,\n edgeSide: string,\n fields: { offsetLeft: number; offsetTop: number; offsetWidth: number; offsetHeight: number; dataItem?: any }[],\n currentPage: number,\n excludeIds?: string[],\n): ResizeSnapResult {\n const result: ResizeSnapResult = { edges: {}, guides: [] };\n\n const fieldRight = fieldLeft + fieldWidth;\n const fieldBottom = fieldTop + fieldHeight;\n\n // Determine which edges are active based on edgeSide\n const activeH: ('n' | 's')[] = [];\n const activeV: ('e' | 'w')[] = [];\n if (edgeSide.includes('n')) activeH.push('n');\n if (edgeSide.includes('s')) activeH.push('s');\n if (edgeSide.includes('e')) activeV.push('e');\n if (edgeSide.includes('w')) activeV.push('w');\n\n // For each active edge, find closest snap target\n const edgePositions = { n: fieldTop, s: fieldBottom, e: fieldRight, w: fieldLeft };\n\n for (const edge of [...activeV, ...activeH] as ('n' | 's' | 'e' | 'w')[]) {\n const isVerticalEdge = edge === 'e' || edge === 'w';\n const pos = edgePositions[edge];\n let closest = SNAP_THRESHOLD + 1;\n let snapped: number | null = null;\n\n for (const field of fields) {\n if (field.dataItem?.page !== currentPage) continue;\n if (excludeIds && excludeIds.includes(field.dataItem?.id)) continue;\n\n const fLeft = field.offsetLeft;\n const fTop = field.offsetTop;\n const fRight = fLeft + field.offsetWidth;\n const fBottom = fTop + field.offsetHeight;\n const fCenterX = fLeft + field.offsetWidth / 2;\n const fCenterY = fTop + field.offsetHeight / 2;\n\n const targets = isVerticalEdge ? [fLeft, fRight, fCenterX] : [fTop, fBottom, fCenterY];\n for (const t of targets) {\n const dist = Math.abs(pos - t);\n if (dist < closest) {\n closest = dist;\n snapped = t;\n }\n }\n }\n\n if (snapped !== null && closest <= SNAP_THRESHOLD) {\n result.edges[edge] = snapped;\n result.guides.push({ orientation: isVerticalEdge ? 'v' : 'h', position: snapped });\n }\n }\n\n return result;\n}\n\nexport function calculateSnap(\n dragLeft: number,\n dragTop: number,\n dragWidth: number,\n dragHeight: number,\n fields: { offsetLeft: number; offsetTop: number; offsetWidth: number; offsetHeight: number; dataItem?: any }[],\n currentPage: number,\n excludeIds?: string[],\n): SnapResult {\n const result: SnapResult = { x: null, y: null, guides: [] };\n\n const dragRight = dragLeft + dragWidth;\n const dragBottom = dragTop + dragHeight;\n const dragCenterX = dragLeft + dragWidth / 2;\n const dragCenterY = dragTop + dragHeight / 2;\n\n let closestDx = SNAP_THRESHOLD + 1;\n let closestDy = SNAP_THRESHOLD + 1;\n let snappedX = dragLeft;\n let snappedY = dragTop;\n\n // First pass: find the closest snap distance per axis\n for (const field of fields) {\n if (field.dataItem?.page !== currentPage) continue;\n if (excludeIds && excludeIds.includes(field.dataItem?.id)) continue;\n\n const fLeft = field.offsetLeft;\n const fTop = field.offsetTop;\n const fRight = fLeft + field.offsetWidth;\n const fBottom = fTop + field.offsetHeight;\n const fCenterX = fLeft + field.offsetWidth / 2;\n const fCenterY = fTop + field.offsetHeight / 2;\n\n const xPairs = [\n { dragEdge: dragLeft, targetEdge: fLeft },\n { dragEdge: dragLeft, targetEdge: fRight },\n { dragEdge: dragRight, targetEdge: fLeft },\n { dragEdge: dragRight, targetEdge: fRight },\n { dragEdge: dragCenterX, targetEdge: fCenterX },\n ];\n\n for (const { dragEdge, targetEdge } of xPairs) {\n const dist = Math.abs(dragEdge - targetEdge);\n if (dist < closestDx) {\n closestDx = dist;\n snappedX = dragLeft + (targetEdge - dragEdge);\n }\n }\n\n const yPairs = [\n { dragEdge: dragTop, targetEdge: fTop },\n { dragEdge: dragTop, targetEdge: fBottom },\n { dragEdge: dragBottom, targetEdge: fTop },\n { dragEdge: dragBottom, targetEdge: fBottom },\n { dragEdge: dragCenterY, targetEdge: fCenterY },\n ];\n\n for (const { dragEdge, targetEdge } of yPairs) {\n const dist = Math.abs(dragEdge - targetEdge);\n if (dist < closestDy) {\n closestDy = dist;\n snappedY = dragTop + (targetEdge - dragEdge);\n }\n }\n }\n\n if (closestDx > SNAP_THRESHOLD) snappedX = dragLeft;\n if (closestDy > SNAP_THRESHOLD) snappedY = dragTop;\n\n // Second pass: collect ALL guides that align at the snapped position\n if (closestDx <= SNAP_THRESHOLD) {\n result.x = snappedX;\n const snappedRight = snappedX + dragWidth;\n const snappedCenterX = snappedX + dragWidth / 2;\n\n const guideSet = new Set<number>();\n for (const field of fields) {\n if (field.dataItem?.page !== currentPage) continue;\n if (excludeIds && excludeIds.includes(field.dataItem?.id)) continue;\n\n const fLeft = field.offsetLeft;\n const fRight = fLeft + field.offsetWidth;\n const fCenterX = fLeft + field.offsetWidth / 2;\n\n for (const target of [fLeft, fRight, fCenterX]) {\n if (Math.abs(snappedX - target) < 1 || Math.abs(snappedRight - target) < 1 || Math.abs(snappedCenterX - target) < 1) {\n guideSet.add(target);\n }\n }\n }\n guideSet.forEach(pos => result.guides.push({ orientation: 'v', position: pos }));\n }\n\n if (closestDy <= SNAP_THRESHOLD) {\n result.y = snappedY;\n const snappedBottom = snappedY + dragHeight;\n const snappedCenterY = snappedY + dragHeight / 2;\n\n const guideSet = new Set<number>();\n for (const field of fields) {\n if (field.dataItem?.page !== currentPage) continue;\n if (excludeIds && excludeIds.includes(field.dataItem?.id)) continue;\n\n const fTop = field.offsetTop;\n const fBottom = fTop + field.offsetHeight;\n const fCenterY = fTop + field.offsetHeight / 2;\n\n for (const target of [fTop, fBottom, fCenterY]) {\n if (Math.abs(snappedY - target) < 1 || Math.abs(snappedBottom - target) < 1 || Math.abs(snappedCenterY - target) < 1) {\n guideSet.add(target);\n }\n }\n }\n guideSet.forEach(pos => result.guides.push({ orientation: 'h', position: pos }));\n }\n\n return result;\n}\n","import { LSApiElement } from '../../types/LSApiElement';\nimport { LSMutateEvent } from '../../types/LSMutateEvent';\nimport { findDimensions, findIn, recalculateCoordinates } from './editorCalculator';\nimport { IToolboxField } from '../interfaces/IToolboxField';\nimport { FIELD_DEFAULTS, DEFAULT_FONT_SIZE, DEFAULT_FONT_NAME } from '../../constants/fieldDefaults';\nimport { setLastClickPosition, clearLastClickPosition } from './clipboard';\nimport { snapshotField } from './history';\nimport { calculateSnap, calculateResizeSnap } from './snapHelper';\nimport { defaultRolePalette } from './defaultPalette';\nimport { dvI18n } from '../../i18n/i18n';\n\nconst preventSelect = (e: Event) => e.preventDefault();\n\nfunction showMoveBlockedTooltip(event: MouseEvent) {\n let tooltip = this.component.shadowRoot.getElementById('ls-move-blocked-tooltip');\n if (!tooltip) {\n tooltip = document.createElement('div');\n tooltip.id = 'ls-move-blocked-tooltip';\n tooltip.style.position = 'fixed';\n tooltip.style.padding = '0.375rem 0.75rem';\n tooltip.style.borderRadius = '0.5rem';\n tooltip.style.background = 'var(--gray-100, #45484d)';\n tooltip.style.color = 'white';\n tooltip.style.fontSize = '0.75rem';\n tooltip.style.fontFamily = 'var(--font-family, IBM Plex Sans, sans-serif)';\n tooltip.style.pointerEvents = 'none';\n tooltip.style.zIndex = '10000';\n tooltip.style.whiteSpace = 'nowrap';\n tooltip.textContent = dvI18n.t('fieldproperties.cannotmovemultipage');\n this.component.shadowRoot.appendChild(tooltip);\n }\n tooltip.style.left = (event.clientX + 12) + 'px';\n tooltip.style.top = (event.clientY + 12) + 'px';\n}\n\nfunction hideMoveBlockedTooltip() {\n const tooltip = this.component.shadowRoot?.getElementById('ls-move-blocked-tooltip');\n if (tooltip) tooltip.remove();\n}\n\nfunction disableSelection() {\n document.body.style.userSelect = 'none';\n document.body.style.webkitUserSelect = 'none';\n document.addEventListener('selectstart', preventSelect);\n}\n\nfunction enableSelection() {\n document.body.style.userSelect = '';\n document.body.style.webkitUserSelect = '';\n document.removeEventListener('selectstart', preventSelect);\n}\n\nexport function updateSelectionBox() {\n var box = this.component.shadowRoot.getElementById('ls-box-selector') as HTMLElement;\n const pageSelected = this.selected?.filter(f => f.dataItem?.page === this.pageNum);\n if (!pageSelected || pageSelected.length < 2) {\n box.style.visibility = 'hidden';\n return;\n }\n\n let minLeft = Infinity, minTop = Infinity, maxRight = -Infinity, maxBottom = -Infinity;\n\n pageSelected.forEach(f => {\n const left = f.offsetLeft;\n const top = f.offsetTop;\n const right = left + f.offsetWidth;\n const bottom = top + f.offsetHeight;\n if (left < minLeft) minLeft = left;\n if (top < minTop) minTop = top;\n if (right > maxRight) maxRight = right;\n if (bottom > maxBottom) maxBottom = bottom;\n });\n\n box.style.left = minLeft + 'px';\n box.style.top = minTop + 'px';\n box.style.width = (maxRight - minLeft) + 'px';\n box.style.height = (maxBottom - minTop) + 'px';\n box.style.visibility = 'visible';\n}\n\nlet mousetimer = null;\n\nexport function debounce(data, delay) {\n if (mousetimer) clearTimeout(mousetimer);\n\n mousetimer = setTimeout(() => {\n this.mutate.emit([data]);\n }, delay);\n}\n\nconst MIN_DRAG_DISTANCE = 5;\n\nexport function mouseDown(e) {\n if (this._isToolboxDragging) return;\n // Disable mouse interactions in preview mode or when template is locked\n if (this.mode === 'preview' || this._template?.locked) {\n return;\n }\n // Only process if mousedown target is the frame, canvas, wrapper itself, or an editor field.\n // This prevents floating UI children (select-menu) from triggering drags.\n const frame = this.component.shadowRoot.getElementById('ls-document-frame');\n const wrapper = this.component.shadowRoot.getElementById('document-frame-wrapper');\n if (!frame) return;\n const target = e.target as HTMLElement;\n const isValidTarget = target === frame || target === wrapper || target?.id === 'pdf-canvas' || target?.tagName?.toLowerCase() === 'canvas';\n const isFieldTarget = target?.tagName?.toLowerCase() === 'ls-editor-field';\n if (!isValidTarget && !isFieldTarget) return;\n\n // Find if this was\n // - a hit on a field edge RESIZE\n // - a hit on the middle of a field MOVE\n // - a hit on the background document SELECTMULTIPLE with a box\n this.hitField = null;\n const fields = this.component.shadowRoot.querySelectorAll('ls-editor-field');\n\n fields.forEach(f => {\n const { left, top, height, width, bottom, right } = f.getBoundingClientRect();\n const fdims = { left: f.offsetLeft, top: f.offsetTop, height, width, x: e.screenX, y: e.screenY };\n this.startMouse = fdims;\n // Scale edge threshold for small fields\n const edgeX = Math.min(8, width * 0.25);\n const edgeY = Math.min(8, height * 0.25);\n const cornerX = Math.min(16, width * 0.35);\n const cornerY = Math.min(16, height * 0.35);\n // corners (check before edges)\n if (Math.abs(e.clientX - right) < cornerX && Math.abs(e.clientY - bottom) < cornerY) {\n this.edgeSide = 'se';\n this.hitField = f;\n } else if (Math.abs(e.clientX - left) < cornerX && Math.abs(e.clientY - top) < cornerY) {\n this.edgeSide = 'nw';\n this.hitField = f;\n } else if (Math.abs(e.clientX - right) < cornerX && Math.abs(e.clientY - top) < cornerY) {\n this.edgeSide = 'ne';\n this.hitField = f;\n } else if (Math.abs(e.clientX - left) < cornerX && Math.abs(e.clientY - bottom) < cornerY) {\n this.edgeSide = 'sw';\n this.hitField = f;\n // west edge\n } else if (Math.abs(e.clientX - left) < edgeX && e.clientY >= top && e.clientY <= bottom) {\n this.edgeSide = 'w';\n this.hitField = f;\n // right / east edge\n } else if (Math.abs(e.clientX - right) < edgeX && e.clientY >= top && e.clientY <= bottom) {\n this.edgeSide = 'e';\n this.hitField = f;\n // north edge\n } else if (Math.abs(e.clientY - top) < edgeY && e.clientX >= left && e.clientX <= right) {\n this.edgeSide = 'n';\n this.hitField = f;\n // south edge\n } else if (Math.abs(e.clientY - bottom) < edgeY && e.clientX >= left && e.clientX <= right) {\n this.edgeSide = 's';\n this.hitField = f;\n } else if (e.clientY <= bottom && e.clientY >= top && e.clientX >= left && e.clientX <= right) {\n this.edgeSide = null;\n this.hitField = f;\n }\n });\n\n if (this.hitField && e.shiftKey === false && e.altKey === false) {\n var box = this.component.shadowRoot.getElementById('ls-box-selector') as HTMLElement;\n box.style.visibility = 'hidden';\n\n // Snapshot field state before any resize/move begins\n snapshotField(this.hitField.dataItem);\n // Snapshot all currently selected fields (for multi-field move undo)\n this.selected.forEach(f => snapshotField(f.dataItem));\n\n // mouse down on a field, select it and note the start location\n if (this.hitField.selected === false) {\n // unselect all other fields\n fields.forEach(fu => {\n fu.selected = false;\n });\n this.selected = [this.hitField];\n this.selectFields.emit([this.hitField.dataItem]);\n }\n\n const { height, width } = this.hitField.getBoundingClientRect();\n const fdims = { left: this.hitField.offsetLeft, top: this.hitField.offsetTop, height, width, x: e.screenX, y: e.screenY };\n this.startMouse = fdims;\n\n this.startLocations = this.selected.map(f => {\n const { height, width } = f.getBoundingClientRect();\n const beHtml = f as HTMLElement;\n return { top: beHtml.offsetTop, left: beHtml.offsetLeft, height, width };\n });\n this.selectionBox = null;\n } else if (this.hitField && e.altKey === true) {\n // Alt+click: remove field from selection\n if (this.hitField.selected === true) {\n this.hitField.selected = false;\n this.selected = this.selected.filter(f => f !== this.hitField);\n this.selectFields.emit(this.selected.map(si => si.dataItem));\n }\n this.hitField = null;\n this.startMouse = null;\n this.startLocations = null;\n this.selectionBox = null;\n updateSelectionBox.bind(this)();\n } else if (this.hitField && e.shiftKey === true) {\n var box = this.component.shadowRoot.getElementById('ls-box-selector') as HTMLElement;\n box.style.visibility = 'hidden';\n\n if (this.hitField.selected === true) {\n // Toggle off: remove from selection\n this.hitField.selected = false;\n this.selected = this.selected.filter(f => f !== this.hitField);\n this.selectFields.emit(this.selected.map(si => si.dataItem));\n this.hitField = null;\n this.startMouse = null;\n this.startLocations = null;\n this.selectionBox = null;\n updateSelectionBox.bind(this)();\n } else {\n // Add to selection\n this.hitField.selected = true;\n this.selected = [...this.selected, this.hitField];\n this.selectFields.emit(this.selected.map(si => si.dataItem));\n\n const { height, width } = this.hitField.getBoundingClientRect();\n const fdims = { left: this.hitField.offsetLeft, top: this.hitField.offsetTop, height, width, x: e.screenX, y: e.screenY };\n this.startMouse = fdims;\n\n this.startLocations = this.selected.map(f => {\n const { height, width } = f.getBoundingClientRect();\n const beHtml = f as HTMLElement;\n return { top: beHtml.offsetTop, left: beHtml.offsetLeft, height, width };\n });\n this.selectionBox = null;\n }\n } else {\n // move down on empty space, store pending start for selection box\n this.startLocations = null;\n this.startMouse = null;\n this.selectionBox = null;\n this._pendingSelectionBox = { x: e.clientX, y: e.clientY };\n disableSelection();\n\n if (!e.shiftKey && !e.altKey) {\n this.unselect();\n this.selectFields.emit([]);\n this.selected = [];\n updateSelectionBox.bind(this)();\n }\n }\n}\n\nexport function outOfBounds(futureField) {\n return (\n futureField.height <= 5 ||\n futureField.left < 0 ||\n futureField.top < 0 ||\n futureField.left + futureField.width >= futureField.pageDimensions.width ||\n futureField.top + futureField.height >= futureField.pageDimensions.height\n );\n}\nexport function mouseMove(event) {\n event.preventDefault();\n if (this._isToolboxDragging) return;\n // Disable mouse move interactions in preview mode or when template is locked\n if (this.mode === 'preview' || this._template?.locked) {\n return;\n }\n\n // We have the mouse held down on a field edge to resize it.\n if (this.hitField && this.edgeSide && this.startMouse && event.buttons === 1) {\n disableSelection();\n const movedX = event.screenX - this.startMouse.x;\n const movedY = event.screenY - this.startMouse.y;\n var scale = this.hitField.dataItem.formElementType === 'signature' && this._template.fixSignatureScale;\n\n // Calculate candidate dimensions before snapping\n let candidateLeft = this.startMouse.left;\n let candidateTop = this.startMouse.top;\n let candidateWidth = this.startMouse.width;\n let candidateHeight = this.startMouse.height;\n\n switch (this.edgeSide) {\n case 'n':\n if (scale) {\n candidateHeight = this.startMouse.height - movedY;\n candidateWidth = candidateHeight * (this.startMouse.width / this.startMouse.height);\n } else {\n candidateTop = this.startMouse.top + movedY;\n candidateHeight = this.startMouse.height - movedY;\n }\n break;\n case 's':\n if (scale) {\n candidateHeight = this.startMouse.height + movedY;\n candidateWidth = candidateHeight * (this.startMouse.width / this.startMouse.height);\n } else {\n candidateHeight = this.startMouse.height + movedY;\n }\n break;\n case 'e':\n if (scale) {\n candidateWidth = this.startMouse.width + movedX;\n candidateHeight = candidateWidth * (this.startMouse.height / this.startMouse.width);\n } else {\n candidateWidth = this.startMouse.width + movedX;\n }\n break;\n case 'w':\n if (scale) {\n candidateWidth = this.startMouse.width - movedX;\n candidateHeight = candidateWidth * (this.startMouse.height / this.startMouse.width);\n candidateLeft = this.startMouse.left + movedX;\n } else {\n candidateLeft = this.startMouse.left + movedX;\n candidateWidth = this.startMouse.width - movedX;\n }\n break;\n case 'se':\n if (scale) {\n candidateWidth = this.startMouse.width + movedX;\n candidateHeight = candidateWidth / (this.startMouse.width / this.startMouse.height);\n } else {\n candidateWidth = this.startMouse.width + movedX;\n candidateHeight = this.startMouse.height + movedY;\n }\n break;\n case 'nw':\n if (scale) {\n candidateWidth = this.startMouse.width - movedX;\n candidateHeight = candidateWidth / (this.startMouse.width / this.startMouse.height);\n candidateLeft = this.startMouse.left + movedX;\n candidateTop = this.startMouse.top + (this.startMouse.height - candidateHeight);\n } else {\n candidateLeft = this.startMouse.left + movedX;\n candidateTop = this.startMouse.top + movedY;\n candidateWidth = this.startMouse.width - movedX;\n candidateHeight = this.startMouse.height - movedY;\n }\n break;\n case 'ne':\n if (scale) {\n candidateWidth = this.startMouse.width + movedX;\n candidateHeight = candidateWidth / (this.startMouse.width / this.startMouse.height);\n candidateTop = this.startMouse.top + (this.startMouse.height - candidateHeight);\n } else {\n candidateWidth = this.startMouse.width + movedX;\n candidateTop = this.startMouse.top + movedY;\n candidateHeight = this.startMouse.height - movedY;\n }\n break;\n case 'sw':\n if (scale) {\n candidateWidth = this.startMouse.width - movedX;\n candidateHeight = candidateWidth / (this.startMouse.width / this.startMouse.height);\n candidateLeft = this.startMouse.left + movedX;\n } else {\n candidateLeft = this.startMouse.left + movedX;\n candidateWidth = this.startMouse.width - movedX;\n candidateHeight = this.startMouse.height + movedY;\n }\n break;\n }\n\n // Snap active resize edges\n const allFields = Array.from(this.component.shadowRoot.querySelectorAll('ls-editor-field')) as HTMLLsEditorFieldElement[];\n const resizeSnap = calculateResizeSnap(\n candidateLeft, candidateTop, candidateWidth, candidateHeight,\n this.edgeSide, allFields, this.pageNum, [this.hitField.dataItem.id]\n );\n\n if (scale) {\n const aspect = this.startMouse.width / this.startMouse.height;\n const hasH = resizeSnap.edges.e !== undefined || resizeSnap.edges.w !== undefined;\n const hasV = resizeSnap.edges.n !== undefined || resizeSnap.edges.s !== undefined;\n\n // When both axes snap on a corner, pick the closer one\n let useH = hasH;\n let useV = hasV;\n if (hasH && hasV && this.edgeSide.length === 2) {\n const hDist = resizeSnap.edges.e !== undefined\n ? Math.abs((candidateLeft + candidateWidth) - resizeSnap.edges.e)\n : Math.abs(candidateLeft - resizeSnap.edges.w);\n const vDist = resizeSnap.edges.s !== undefined\n ? Math.abs((candidateTop + candidateHeight) - resizeSnap.edges.s)\n : Math.abs(candidateTop - resizeSnap.edges.n);\n if (hDist <= vDist) { useV = false; } else { useH = false; }\n }\n\n if (useV && !useH) {\n if (resizeSnap.edges.n !== undefined) {\n candidateHeight = (candidateTop + candidateHeight) - resizeSnap.edges.n;\n candidateTop = resizeSnap.edges.n;\n }\n if (resizeSnap.edges.s !== undefined) {\n candidateHeight = resizeSnap.edges.s - candidateTop;\n }\n candidateWidth = candidateHeight * aspect;\n } else if (useH) {\n if (resizeSnap.edges.w !== undefined) {\n candidateWidth = (candidateLeft + candidateWidth) - resizeSnap.edges.w;\n candidateLeft = resizeSnap.edges.w;\n }\n if (resizeSnap.edges.e !== undefined) {\n candidateWidth = resizeSnap.edges.e - candidateLeft;\n }\n candidateHeight = candidateWidth / aspect;\n }\n\n if (this.edgeSide.includes('n')) candidateTop = (this.startMouse.top + this.startMouse.height) - candidateHeight;\n if (this.edgeSide.includes('w')) candidateLeft = (this.startMouse.left + this.startMouse.width) - candidateWidth;\n\n // Only show guides for the axis we used\n const guides = resizeSnap.guides.filter(g =>\n (useH && g.orientation === 'v') || (useV && g.orientation === 'h')\n );\n showSnapGuides.bind(this)(guides);\n } else {\n if (resizeSnap.edges.n !== undefined) {\n candidateHeight = (candidateTop + candidateHeight) - resizeSnap.edges.n;\n candidateTop = resizeSnap.edges.n;\n }\n if (resizeSnap.edges.s !== undefined) {\n candidateHeight = resizeSnap.edges.s - candidateTop;\n }\n if (resizeSnap.edges.w !== undefined) {\n candidateWidth = (candidateLeft + candidateWidth) - resizeSnap.edges.w;\n candidateLeft = resizeSnap.edges.w;\n }\n if (resizeSnap.edges.e !== undefined) {\n candidateWidth = resizeSnap.edges.e - candidateLeft;\n }\n showSnapGuides.bind(this)(resizeSnap.guides);\n }\n\n if (!outOfBounds({ ...this.hitField.dataItem, left: candidateLeft / this.zoom, top: candidateTop / this.zoom, width: candidateWidth / this.zoom, height: candidateHeight / this.zoom })) {\n this.hitField.style.left = candidateLeft + 'px';\n this.hitField.style.top = candidateTop + 'px';\n this.hitField.style.width = candidateWidth + 'px';\n this.hitField.style.height = candidateHeight + 'px';\n this.hitField.dataItem = {\n ...this.hitField.dataItem,\n left: candidateLeft / this.zoom,\n top: candidateTop / this.zoom,\n width: candidateWidth / this.zoom,\n height: candidateHeight / this.zoom,\n };\n }\n\n debounce.bind(this)({ action: 'update', data: recalculateCoordinates(this.hitField.dataItem) }, 700);\n } else if ((this.selectionBox || this._pendingSelectionBox) && event.buttons === 1) {\n // Check minimum drag distance before activating selection box\n if (!this.selectionBox && this._pendingSelectionBox) {\n const dx = event.clientX - this._pendingSelectionBox.x;\n const dy = event.clientY - this._pendingSelectionBox.y;\n if (Math.abs(dx) < MIN_DRAG_DISTANCE && Math.abs(dy) < MIN_DRAG_DISTANCE) return;\n this.selectionBox = this._pendingSelectionBox;\n this._pendingSelectionBox = null;\n this.component.style.cursor = 'crosshair';\n }\n\n this.isBoxing = true;\n // draw the multiple selection box\n var dragBox = this.component.shadowRoot.getElementById('ls-drag-selector') as HTMLElement;\n var frame = this.component.shadowRoot.getElementById('ls-document-frame') as HTMLElement;\n var leftOffset = frame.getBoundingClientRect().left;\n var topOffset = frame.getBoundingClientRect().top;\n\n const movedX = event.clientX - this.selectionBox.x;\n const movedY = event.clientY - this.selectionBox.y;\n\n // allow for the frame to be scrolled\n dragBox.style.visibility = 'visible';\n dragBox.style.left = (this.selectionBox.x > event.clientX ? event.clientX : this.selectionBox.x) - leftOffset + frame.scrollLeft + 'px';\n dragBox.style.top = (this.selectionBox.y > event.clientY ? event.clientY : this.selectionBox.y) - topOffset + frame.scrollTop + 'px';\n dragBox.style.width = Math.abs(movedX) + 'px';\n dragBox.style.height = Math.abs(movedY) + 'px';\n\n // Move one or more selected items\n } else if (this.startLocations && !this.edgeSide && this.startMouse && event.buttons === 1) {\n // Block move if selection spans multiple pages\n const pages = new Set(this.selected?.map(f => f.dataItem?.page));\n if (pages.size > 1) {\n showMoveBlockedTooltip.bind(this)(event);\n return;\n }\n\n this.isMoving = true;\n disableSelection();\n var box = this.component.shadowRoot.getElementById('ls-box-selector') as HTMLElement;\n box.style.visibility = 'hidden';\n\n // Dismiss any open date picker when moving fields\n if (this.selected?.length) {\n this.selected.forEach(f => {\n const input = f.shadowRoot?.getElementById('editing-input') as HTMLInputElement;\n if (input) input.blur();\n });\n }\n\n // Move one or more selected items\n const movedX = event.screenX - this.startMouse.x;\n const movedY = event.screenY - this.startMouse.y;\n if (this.selected?.length) {\n // Calculate snap based on the primary (first) selected field\n const primaryLeft = this.startLocations[0].left + movedX;\n const primaryTop = this.startLocations[0].top + movedY;\n const primaryWidth = this.startLocations[0].width;\n const primaryHeight = this.startLocations[0].height;\n\n const allFields = Array.from(this.component.shadowRoot.querySelectorAll('ls-editor-field')) as HTMLLsEditorFieldElement[];\n const excludeIds = this.selected.map(s => s.dataItem.id);\n const snap = calculateSnap(primaryLeft, primaryTop, primaryWidth, primaryHeight, allFields, this.pageNum, excludeIds);\n\n // Apply snap offset to all selected fields\n const snapOffsetX = snap.x !== null ? snap.x - primaryLeft : 0;\n const snapOffsetY = snap.y !== null ? snap.y - primaryTop : 0;\n\n for (let i = 0; i < this.selected.length; i++) {\n const newLeft = this.startLocations[i].left + movedX + snapOffsetX;\n const newTop = this.startLocations[i].top + movedY + snapOffsetY;\n if (\n newLeft >= 0 &&\n newTop >= 0 &&\n newLeft <= (this.pageDimensions[this.pageNum - 1].width - this.selected[i].dataItem.width) * this.zoom &&\n newTop <= (this.pageDimensions[this.pageNum - 1].height - this.selected[i].dataItem.height) * this.zoom\n ) {\n this.selected[i].style.left = Math.round(newLeft) + 'px';\n this.selected[i].style.top = Math.round(newTop) + 'px';\n }\n }\n\n showSnapGuides.bind(this)(snap.guides);\n updateSelectionBox.bind(this)();\n }\n }\n}\n\nexport function mouseUp(event) {\n this.edgeSide = null;\n this.startMouse = null;\n this._pendingSelectionBox = null;\n this.component.style.cursor = 'auto';\n enableSelection();\n clearSnapGuides.bind(this)();\n hideMoveBlockedTooltip.bind(this)();\n\n // find what was inside the selection box emit the select event and change their style\n if (this.selectionBox && this.isBoxing) {\n this.isBoxing = false;\n var dragBox = this.component.shadowRoot.getElementById('ls-drag-selector') as HTMLElement;\n var fields = this.component.shadowRoot.querySelectorAll('ls-editor-field');\n const isShift = event.shiftKey;\n const isAlt = event.altKey;\n this.selectionBox = null;\n const found = findIn(fields, dragBox, !isAlt, isShift || isAlt);\n dragBox.style.visibility = 'hidden';\n\n if (isAlt) {\n const removeIds = new Set(found.map(f => f.dataItem?.id));\n found.forEach(f => { f.selected = false; });\n this.selected = this.selected.filter(f => !removeIds.has(f.dataItem?.id));\n } else if (isShift) {\n const existingIds = new Set(this.selected.map(f => f.dataItem?.id));\n const newFields = found.filter(f => !existingIds.has(f.dataItem?.id));\n this.selected = [...this.selected, ...newFields];\n } else {\n this.selected = Array.from(found);\n }\n\n this.selectFields.emit(this.selected.map(fx => fx.dataItem));\n updateSelectionBox.bind(this)();\n }\n}\n\nexport function mouseClick(e) {\n // Disable click interactions in preview mode or when template is locked\n if (this.mode === 'preview' || this._template?.locked) {\n return;\n }\n \n // check we're not moving fields\n if (this.isMoving) {\n // End dragging fields\n this.isMoving = false;\n const fields = this.component.shadowRoot.querySelectorAll('ls-editor-field') as HTMLLsEditorFieldElement[];\n const divFrame = this.component.shadowRoot.getElementById('ls-document-frame') as HTMLDivElement;\n const selected = Array.from(fields).filter(fx => fx.selected);\n\n this.mutate.emit(\n Array.from(fields)\n .filter(fx => fx.selected)\n .map(fx => {\n // Calculate new positions and update the dataItem on the control\n const delta = {\n ...fx.dataItem,\n ...findDimensions(divFrame, fx, fx.dataItem.pageDimensions.height, fx.dataItem.pageDimensions.width, this.zoom),\n };\n // update the data in the html element\n fx.dataItem = delta;\n // send an update event to be processed\n return { action: 'update', data: delta };\n }),\n );\n this.selectFields.emit(selected.map(fx => fx.dataItem));\n updateSelectionBox.bind(this)();\n } else {\n // reset the selection box location\n this.selectionBox = null;\n\n let hitAny = false;\n const fields = this.component.shadowRoot.querySelectorAll('ls-editor-field') as HTMLLsEditorFieldElement[];\n fields.forEach(f => {\n const { left, top, bottom, right } = f.getBoundingClientRect();\n if (e.clientY <= bottom && e.clientY >= top && e.clientX >= left && e.clientX <= right) {\n this.edgeSide = null;\n this.hitField = f;\n if (!e.shiftKey && !e.altKey) {\n fields.forEach(ft => (ft.selected = false));\n f.selected = true;\n }\n // shift/alt+click: mouseDown already toggled selected state, preserve it\n hitAny = true;\n }\n });\n\n // Track click position for paste targeting\n if (hitAny) {\n clearLastClickPosition();\n } else {\n setLastClickPosition(e.clientX, e.clientY);\n }\n\n this.selected = Array.from(fields).filter(fx => fx.selected);\n this.selectFields.emit(this.selected.map(fx => fx.dataItem));\n updateSelectionBox.bind(this)();\n }\n}\n\nexport function showSnapGuides(guides: { orientation: 'h' | 'v'; position: number }[]) {\n const frame = this.component.shadowRoot.getElementById('ls-document-frame') as HTMLElement;\n let container = this.component.shadowRoot.getElementById('ls-snap-guides');\n if (!container) {\n container = document.createElement('div');\n container.id = 'ls-snap-guides';\n container.style.position = 'absolute';\n container.style.top = '0';\n container.style.left = '0';\n container.style.width = '100%';\n container.style.height = '100%';\n container.style.pointerEvents = 'none';\n container.style.zIndex = '9999';\n frame.appendChild(container);\n }\n\n container.innerHTML = '';\n for (const guide of guides) {\n const line = document.createElement('div');\n line.style.position = 'absolute';\n line.style.backgroundColor = 'transparent';\n if (guide.orientation === 'v') {\n line.style.left = guide.position + 'px';\n line.style.top = '0';\n line.style.width = '0';\n line.style.height = '100%';\n line.style.borderLeft = '1px dashed var(--gray-50, #c8c9cc)';\n } else {\n line.style.top = guide.position + 'px';\n line.style.left = '0';\n line.style.width = '100%';\n line.style.height = '0';\n line.style.borderTop = '1px dashed var(--gray-50, #c8c9cc)';\n }\n container.appendChild(line);\n }\n}\n\nexport function clearSnapGuides() {\n const container = this.component.shadowRoot.getElementById('ls-snap-guides');\n if (container) container.innerHTML = '';\n}\n\nexport function toolboxDragStart(fieldData: IToolboxField) {\n // Disable toolbox dragging when template is locked\n if (this._template?.locked) {\n return;\n }\n // Cancel any existing toolbox drag\n if (this._cancelToolboxDrag) {\n this._cancelToolboxDrag();\n }\n\n const frame = this.component.shadowRoot.getElementById('ls-document-frame') as HTMLElement;\n const zoom = this.zoom;\n this._isToolboxDragging = true;\n let hasMoved = false;\n\n // Prevent text selection during drag\n disableSelection();\n\n // Add dragging class to toolbox fields (shadow DOM cursor override)\n this.component.shadowRoot.querySelectorAll('ls-left-bar, ls-compose-loader').forEach(bar => {\n bar.shadowRoot?.querySelectorAll('ls-toolbox-field').forEach(el => el.classList.add('ls-dv-dragging'));\n });\n\n // Create ghost preview element matching the original drag image style\n const ghost = document.createElement('div');\n ghost.id = 'ls-toolbox-ghost';\n ghost.style.position = 'fixed';\n ghost.style.width = fieldData.defaultWidth * zoom + 'px';\n ghost.style.height = fieldData.defaultHeight * zoom + 'px';\n ghost.style.border = `1px dashed ${defaultRolePalette[this.signer % 100].s60}`;\n const s20 = defaultRolePalette[this.signer % 100].s20.replace('#', '');\n const r = parseInt(s20.substring(0, 2), 16);\n const g = parseInt(s20.substring(2, 4), 16);\n const b = parseInt(s20.substring(4, 6), 16);\n ghost.style.background = `rgba(${r},${g},${b},0.5)`;\n ghost.style.boxShadow = '0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06)';\n ghost.style.pointerEvents = 'none';\n ghost.style.zIndex = '10000';\n ghost.style.visibility = 'hidden';\n ghost.style.boxSizing = 'content-box';\n ghost.style.fontFamily = 'var(--font-family, IBM Plex Sans, sans-serif)';\n ghost.style.fontSize = Math.round(DEFAULT_FONT_SIZE * zoom) + 'px';\n ghost.style.color = defaultRolePalette[this.signer % 100].s100;\n ghost.style.overflow = 'visible';\n ghost.style.whiteSpace = 'nowrap';\n ghost.style.display = 'flex';\n ghost.style.alignItems = 'center';\n ghost.style.textTransform = 'capitalize';\n ghost.innerHTML = fieldData.formElementType;\n\n // Assignee label below ghost\n const assignee = this.mode === 'compose'\n ? this._recipients?.find(r => r.signerIndex === this.signer)\n : this._template.roles.find(r => r.signerIndex === this.signer);\n const assigneeName = this.mode === 'compose' && assignee?.previousRecipientDecides\n ? 'To Be Decided'\n : this.mode === 'compose'\n ? `${assignee?.firstName} ${assignee?.lastName}`\n : assignee?.name || (this.signer === 0 ? 'Sender' : `Participant ${this.signer}`);\n const assigneeLabel = document.createElement('p');\n assigneeLabel.style.position = 'absolute';\n assigneeLabel.style.color = 'var(--gray-80, #3a3a3a)';\n assigneeLabel.style.bottom = `-${1 * zoom}rem`;\n assigneeLabel.style.left = '0';\n assigneeLabel.style.margin = '0';\n assigneeLabel.style.padding = '0';\n assigneeLabel.style.lineHeight = '1';\n assigneeLabel.style.fontSize = `${0.625 * zoom}rem`;\n assigneeLabel.style.whiteSpace = 'nowrap';\n assigneeLabel.style.fontFamily = 'sans-serif';\n assigneeLabel.style.textTransform = 'none';\n assigneeLabel.style.pointerEvents = 'none';\n assigneeLabel.textContent = `${dvI18n.t('fieldproperties.assignedto')} ${assigneeName}`;\n ghost.appendChild(assigneeLabel);\n\n this.component.shadowRoot.appendChild(ghost);\n\n // Info chip at bottom of screen\n const chip = document.createElement('div');\n chip.id = 'ls-esc-chip';\n chip.style.position = 'fixed';\n chip.style.bottom = '1.5rem';\n chip.style.left = '50%';\n chip.style.transform = 'translateX(-50%)';\n chip.style.padding = '0.375rem 0.75rem';\n chip.style.borderRadius = '0.625rem';\n chip.style.background = 'var(--gray-100, #1f2937)';\n chip.style.color = 'white';\n chip.style.fontSize = '0.75rem';\n chip.style.fontFamily = 'var(--font-family, IBM Plex Sans, sans-serif)';\n chip.style.pointerEvents = 'none';\n chip.style.zIndex = '10000';\n chip.style.boxShadow = '0 4px 6px -1px rgba(0, 0, 0, 0.1)';\n chip.textContent = 'Press Esc to cancel field placement';\n this.component.shadowRoot.appendChild(chip);\n\n const onMouseMove = (e: MouseEvent) => {\n e.preventDefault();\n hasMoved = true;\n const dragWidth = fieldData.defaultWidth * zoom;\n const dragHeight = fieldData.defaultHeight * zoom;\n\n const frameRect = frame.getBoundingClientRect();\n const isOverFrame = e.clientX >= frameRect.left && e.clientX <= frameRect.right &&\n e.clientY >= frameRect.top && e.clientY <= frameRect.bottom;\n const isDragging = e.buttons === 1;\n\n // Only show grabbing cursor when ghost is visible\n let cursorStyle = document.getElementById('ls-drag-cursor') as HTMLStyleElement;\n if ((isOverFrame || isDragging) && !cursorStyle) {\n cursorStyle = document.createElement('style');\n cursorStyle.id = 'ls-drag-cursor';\n cursorStyle.textContent = '* { cursor: grabbing !important; }';\n document.head.appendChild(cursorStyle);\n } else if (!isOverFrame && !isDragging && cursorStyle) {\n cursorStyle.remove();\n }\n\n // When dragging (mouse held): show ghost over wrapper area\n // When click-to-place (mouse not held): only show over document frame\n if (isOverFrame) {\n ghost.style.visibility = 'visible';\n ghost.style.opacity = '1';\n const x = e.clientX - frameRect.left + frame.scrollLeft;\n const y = e.clientY - frameRect.top + frame.scrollTop;\n let left = x - dragWidth / 2;\n let top = y - dragHeight / 2;\n\n const fields = Array.from(this.component.shadowRoot.querySelectorAll('ls-editor-field')) as HTMLLsEditorFieldElement[];\n const snap = calculateSnap(left, top, dragWidth, dragHeight, fields, this.pageNum);\n ghost.style.left = (snap.x !== null ? snap.x + frameRect.left - frame.scrollLeft : e.clientX - dragWidth / 2) + 'px';\n ghost.style.top = (snap.y !== null ? snap.y + frameRect.top - frame.scrollTop : e.clientY - dragHeight / 2) + 'px';\n\n showSnapGuides.bind(this)(snap.guides);\n } else if (isDragging) {\n ghost.style.visibility = 'visible';\n ghost.style.opacity = '0.5';\n ghost.style.left = (e.clientX - dragWidth / 2) + 'px';\n ghost.style.top = (e.clientY - dragHeight / 2) + 'px';\n clearSnapGuides.bind(this)();\n } else {\n ghost.style.visibility = 'hidden';\n clearSnapGuides.bind(this)();\n }\n };\n\n const cleanup = () => {\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n document.removeEventListener('keydown', onKeyDown);\n ghost.remove();\n chip.remove();\n clearSnapGuides.bind(this)();\n enableSelection();\n const cursorStyle = document.getElementById('ls-drag-cursor');\n if (cursorStyle) cursorStyle.remove();\n this.component.shadowRoot.querySelectorAll('ls-left-bar, ls-compose-loader').forEach(bar => {\n bar.shadowRoot?.querySelectorAll('ls-toolbox-field').forEach(el => el.classList.remove('ls-dv-dragging'));\n });\n this._isToolboxDragging = false;\n this._cancelToolboxDrag = null;\n };\n\n const onMouseUp = (e: MouseEvent) => {\n // Ignore mouseup if it's from the same click that started the drag (no movement yet)\n if (!hasMoved) return;\n\n const frameRect = frame.getBoundingClientRect();\n const shouldPlace = e.clientX >= frameRect.left && e.clientX <= frameRect.right &&\n e.clientY >= frameRect.top && e.clientY <= frameRect.bottom;\n\n cleanup();\n\n if (shouldPlace) {\n\n const dragWidth = fieldData.defaultWidth * zoom;\n const dragHeight = fieldData.defaultHeight * zoom;\n const x = e.clientX - frameRect.left + frame.scrollLeft;\n const y = e.clientY - frameRect.top + frame.scrollTop;\n let left = x - dragWidth / 2;\n let top = y - dragHeight / 2;\n\n const fields = Array.from(this.component.shadowRoot.querySelectorAll('ls-editor-field')) as HTMLLsEditorFieldElement[];\n const snap = calculateSnap(left, top, dragWidth, dragHeight, fields, this.pageNum);\n if (snap.x !== null) left = snap.x;\n if (snap.y !== null) top = snap.y;\n\n const finalTop = top / zoom;\n const finalLeft = left / zoom;\n\n // Check if field fits on page - constrain to page boundaries\n const pageWidth = this.pageDimensions[this.pageNum - 1].width;\n const pageHeight = this.pageDimensions[this.pageNum - 1].height;\n const constrainedLeft = Math.max(0, Math.min(finalLeft, pageWidth - fieldData.defaultWidth));\n const constrainedTop = Math.max(0, Math.min(finalTop, pageHeight - fieldData.defaultHeight));\n\n this.component.shadowRoot.querySelectorAll('ls-editor-field').forEach(f => (f.selected = false));\n\n const id = btoa('ele' + crypto.randomUUID());\n const newData: LSMutateEvent = {\n action: 'create',\n data: {\n id,\n value: fieldData.formElementType === 'checkbox' ? 'false' : '',\n formElementType: fieldData.formElementType,\n elementType: fieldData.elementType,\n validation: fieldData.validation,\n substantive: false,\n top: constrainedTop,\n left: constrainedLeft,\n hideBorder: false,\n height: fieldData.defaultHeight,\n width: fieldData.defaultWidth,\n pageDimensions: this.pageDimensions[this.pageNum - 1],\n fontName: this.fontFamily,\n fontSize: this.fontSize,\n align: 'left',\n signer: this.signer,\n page: this.pageNum,\n mapTo: null,\n label: '',\n helpText: null,\n logicGroup: null,\n optional: fieldData.formElementType === 'checkbox',\n options: null,\n logicAction: null,\n labelExtra: null,\n fieldOrder: null,\n ax: constrainedLeft > 0 ? constrainedLeft / this.pageDimensions[this.pageNum - 1].width : 0,\n ay: constrainedTop > 0 ? constrainedTop / this.pageDimensions[this.pageNum - 1].height : 0,\n bx: (constrainedLeft + fieldData.defaultWidth) / this.pageDimensions[this.pageNum - 1].width,\n by: (constrainedTop + fieldData.defaultHeight) / this.pageDimensions[this.pageNum - 1].height,\n templateId: this._template.id,\n } as LSApiElement,\n };\n\n this.mutate.emit([newData]);\n }\n };\n\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n e.stopPropagation();\n cleanup();\n }\n };\n\n this._cancelToolboxDrag = cleanup;\n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp);\n document.addEventListener('keydown', onKeyDown);\n}\n\nexport function mouseDoubleClick(event) {\n // Disable double-click field creation in preview mode or when template is locked\n if (this.mode === 'preview' || this._template?.locked) {\n return;\n }\n \n console.log('double click', this.fieldTypeSelected, this.signer);\n try {\n let data: IToolboxField = this.fieldTypeSelected as IToolboxField;\n\n if (this.checkType('APPROVER') && data.elementType === 'signature') {\n data = {\n label: 'Text',\n formElementType: 'text',\n elementType: 'text',\n validation: 0,\n defaultHeight: FIELD_DEFAULTS['text'].defaultHeight,\n defaultWidth: FIELD_DEFAULTS['text'].defaultWidth,\n };\n }\n\n if (this.signer === 0 && data.elementType === 'signature') {\n data = {\n label: 'Auto Sign',\n formElementType: 'auto sign',\n elementType: 'admin',\n validation: 3000,\n defaultHeight: FIELD_DEFAULTS['auto sign'].defaultHeight,\n defaultWidth: FIELD_DEFAULTS['auto sign'].defaultWidth,\n };\n } else if (this.signer === 0 && data.elementType !== 'admin') {\n data = { ...data, elementType: 'admin' };\n }\n // Unselect all current selected items\n this.component.shadowRoot.querySelectorAll('ls-editor-field').forEach(f => (f.selected = false));\n var frame = this.component.shadowRoot.getElementById('ls-document-frame') as HTMLElement;\n // Make a new API compatible id for a template element (prefix 'ele')\n const id = btoa('ele' + crypto.randomUUID());\n const pageWidth = this.pageDimensions[this.pageNum - 1].width;\n const pageHeight = this.pageDimensions[this.pageNum - 1].height;\n const rawTop = event.offsetY / this.zoom + frame.scrollTop;\n const rawLeft = event.offsetX / this.zoom + frame.scrollLeft;\n const top = Math.max(0, Math.min(rawTop, pageHeight - data.defaultHeight));\n const left = Math.max(0, Math.min(rawLeft, pageWidth - data.defaultWidth));\n\n // TODO: Put these defaults somewhere sensible\n const newData: LSMutateEvent = {\n action: 'create',\n data: {\n id,\n value: data.formElementType === 'checkbox' ? 'false' : '',\n formElementType: data.formElementType,\n elementType: data.elementType,\n validation: data.validation,\n substantive: false,\n top,\n left,\n hideBorder: false,\n height: data.defaultHeight,\n width: data.defaultWidth,\n pageDimensions: this.pageDimensions[this.pageNum - 1],\n fontName: DEFAULT_FONT_NAME,\n fontSize: DEFAULT_FONT_SIZE,\n align: 'left',\n signer: this.signer,\n page: this.pageNum,\n mapTo: null,\n label: '',\n helpText: null,\n logicGroup: null,\n optional: data.formElementType === 'checkbox',\n options: null,\n logicAction: null,\n labelExtra: null,\n fieldOrder: null,\n ax: left > 0 ? left / this.pageDimensions[this.pageNum - 1].width : 0,\n ay: top > 0 ? top / this.pageDimensions[this.pageNum - 1].height : 0,\n bx: (left + data.defaultWidth) / this.pageDimensions[this.pageNum - 1].width,\n by: (top + data.defaultHeight) / this.pageDimensions[this.pageNum - 1].height,\n templateId: this._template.id,\n } as LSApiElement,\n };\n this.mutate.emit([newData]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,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,MAAM;AAC7E,gBAAA,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE;AACd,aAAA;SAClB;QACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;;IAC3B,OAAO,CAAC,EAAE;AACV,QAAA,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;;AAEpB;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,c as t,a as o,h as r,H as i}from"./p-CItPoq74.js";import{d as a}from"./p-WVWIAGo_.js";import{o as n}from"./p-BWxpQfiq.js";import{o as d}from"./p-SfEjlcdN.js";import"./p-CmJjDhcp.js";import"./p-04cXI5GQ.js";import"./p-CwCWCxsI.js";const l=()=>`:host{display:flex;flex-direction:column;gap:1rem;width:100%;position:relative}*{margin:0;box-sizing:border-box}.ls-dv-field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-dv-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.ls-dv-row{flex-direction:row;align-items:center;justify-content:space-between}.ls-dv-multi-button-group-row{display:flex;gap:0.5rem}.ls-dv-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-dv-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-dv-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6f7176);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.ls-dv-input-row{display:flex;gap:0.5rem}.ls-dv-input-row .ls-dv-input-wrapper input{width:9.313rem;max-width:9.313rem}p{color:var(--gray-80, #6f7176);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.ls-dv-button-link,.ls-dv-button-link:hover{all:unset}select{appearance:none;height:2.25rem}.ls-dv-input-wrapper{position:relative;width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6f7176)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6f7176)}#selectLeadingIconDisabled{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-50, #c8c9cc)}.ls-dv-has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.625rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #ffffff)}input:focus:not(:disabled),select:focus:not(:disabled),textarea:focus:not(:disabled){outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #ffffff)}input:active:not(:disabled),select:active:not(:disabled),textarea:active:not(:disabled){border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa);color:var(--gray-50, #c8c9cc);box-shadow:none}input[type=checkbox]{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type=checkbox]:checked,input[type=checkbox].ls-dv-indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type=checkbox]:checked::after{content:"";position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type=checkbox].ls-dv-indeterminate::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type=checkbox]:checked:hover,input[type=checkbox].ls-dv-indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type=checkbox]:hover{border:1px solid #9ca3af}input[type=checkbox]:focus,input[type=checkbox]:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type=checkbox]:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type=checkbox]:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.ls-dv-checkbox-container{display:flex;gap:0.5rem;width:100%}.ls-dv-checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.ls-dv-form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.ls-dv-form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.ls-dv-loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #4456f6)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.ls-dv-tertiary-grey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #6f7176)}button.ls-dv-tertiary-grey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.ls-dv-button-group{display:flex;border-radius:0.625rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip;width:100%}.ls-dv-button-group button{display:flex;width:100%;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;color:var(--gray-80, #6f7176)}.ls-dv-button-group button:disabled{background:var(--gray-10, #f7f8fa);cursor:not-allowed;color:var(--gray-50, #c8c9cc)}.ls-dv-button-group button:hover{background:var(--gray-10, #f7f8fa)}.ls-dv-button-group>:first-child{border-radius:0.625rem 0 0 0.625rem}.ls-dv-button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.ls-dv-button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}`;const s=class{constructor(o){e(this,o);this.mutate=t(this,"mutate",7);this.update=t(this,"update",7)}get component(){return o(this)}dataItem;readonly=false;mutate;update;alter(e){console.log(e);const t=this.dataItem.map((t=>({action:"update",data:{...t,...e}})));this.dataItem=t.map((e=>e.data));this.mutate.emit(t)}left(){const e=Math.min(...this.dataItem.map((e=>e.left)));this.alter({left:e})}center(){const e=Math.min(...this.dataItem.map((e=>e.left)));const t=Math.max(...this.dataItem.map((e=>e.left+e.width)));const o=(e+t)/2;const r=this.dataItem.map((e=>{const t=Math.round(o-e.width/2);return{action:"update",data:{...e,left:t}}}));this.dataItem=r.map((e=>e.data));this.mutate.emit(r)}right(){const e=Math.max(...this.dataItem.map((e=>e.left+e.width)));const t=this.dataItem.map((t=>{const o=e-t.width;return{action:"update",data:{...t,left:o}}}));this.dataItem=t.map((e=>e.data));this.mutate.emit(t)}top(){const e=Math.min(...this.dataItem.map((e=>e.top)));this.alter({top:e})}middle(){const e=Math.min(...this.dataItem.map((e=>e.top)));const t=Math.max(...this.dataItem.map((e=>e.top+e.height)));const o=(e+t)/2;const r=this.dataItem.map((e=>{const t=Math.round(o-e.height/2);return{action:"update",data:{...e,top:t}}}));this.dataItem=r.map((e=>e.data));this.mutate.emit(r)}bottom(){const e=Math.max(...this.dataItem.map((e=>e.top+e.height)));const t=this.dataItem.map((t=>{const o=e-t.height;return{action:"update",data:{...t,top:o}}}));this.dataItem=t.map((e=>e.data));this.mutate.emit(t)}componentDidLoad(){}render(){return r(i,{key:"e447034949db9618a4c0a9bb198cba863b852ce6"},r("div",{key:"f6e25671308810b16394639c5257264f05c97068",class:"ls-dv-field-properties-section"},r("div",{key:"cc3ccb09e0edc9b3725e732fa293b86a4094fd36",class:"ls-dv-field-properties-section-text"},r("p",{key:"ff593d77ac614df8297d6e34669ea8aef91c1347",class:"ls-dv-field-properties-section-title"},a.t("placement.alignment")),r("p",{key:"930191a9f93d239803fcd91e82c159fd167a5d65",class:"ls-dv-field-properties-section-description"},a.t("placement.alignmentdescription"))),r("div",{key:"0488f080f01eb85c4e86364cec0b1f7ddf7f82d4",class:"ls-dv-multi-button-group-row"},r("div",{key:"58a64f173c8cbe2c08d11e04682e63962bdbfc9d",class:"ls-dv-button-group"},r("button",{key:"c0d961d45fc9593cf1786d9b3bf88505da9afd96",onClick:()=>this.left(),"aria-label":a.t("alignment.alignleft"),"data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("alignment.alignleft"),disabled:this.readonly},r("ls-icon",{key:"482801c81b41071b3af893ceb29daae915136053",name:"field-alignment-left-icon"})),r("button",{key:"4df6a9b584dcf7d14d78b36642f8214b7b845ef7",onClick:()=>this.center(),"aria-label":a.t("alignment.aligncenter"),"data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("alignment.aligncenter"),disabled:this.readonly},r("ls-icon",{key:"61970b5c35cd7a4fb341399626b58b82466e8a82",name:"field-alignment-centre-icon"})),r("button",{key:"a6a0fd4ad9c6dc11c0cf3a7323a08f0e6b3cb83b",onClick:()=>{this.right()},"aria-label":a.t("alignment.alignright"),"data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("alignment.alignright"),disabled:this.readonly},r("ls-icon",{key:"d8ba573f24b3e53e6f9dee18edbcba6a796d7840",name:"field-alignment-right-icon"}))),r("div",{key:"e45b18c7e0bfc3fa943c9643d6dbe2c9c9fc3688",class:"ls-dv-button-group"},r("button",{key:"3cf68e7e343edd162205a635e02747dfca8412e6",onClick:()=>this.top(),"aria-label":a.t("alignment.aligntop"),"data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("alignment.aligntop"),disabled:this.readonly},r("ls-icon",{key:"9dd606425d2b07a70cddfcd23a72238b9f84203e",name:"field-alignment-top-icon"})),r("button",{key:"4d03ef7ff4bac674dd5e76d1f2d72fee8f518b62",onClick:()=>this.middle(),"aria-label":a.t("alignment.alignmiddle"),"data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("alignment.alignmiddle"),disabled:this.readonly},r("ls-icon",{key:"31ae991a5d92a2df824a2e516ce9a2a736a04082",name:"field-alignment-middle-icon"})),r("button",{key:"8df1990e5376a0468c365e51eedfa978964255f1",onClick:()=>this.bottom(),"aria-label":a.t("alignment.alignbottom"),"data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("alignment.alignbottom"),disabled:this.readonly},r("ls-icon",{key:"bd40d79653247d4e1aab3630a4bbb19f25fc3dce",name:"field-alignment-bottom-icon"}))))),r("slot",{key:"c8370a47c81dc1cfe80c9365a091be73fc53109a"}),r("ls-tooltip",{key:"12626fd8c27ea541788ab480f12fc6e8622f646f",tooltipId:"ls-dv-tooltip"}))}};s.style=l();const c=()=>`:host{display:flex;flex-direction:column;gap:1rem;width:100%;position:relative}.ls-dv-toolbar-numeric{width:2.813rem;max-height:1.125rem;margin:0px;padding:0px}*{margin:0;box-sizing:border-box}.ls-dv-field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-dv-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.ls-dv-row{flex-direction:row;align-items:center;justify-content:space-between}.ls-dv-multi-button-group-row{display:flex;gap:0.5rem}.ls-dv-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-dv-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-dv-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6f7176);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.ls-dv-input-row{display:flex;gap:0.5rem}.ls-dv-input-row .ls-dv-input-wrapper input{width:9.313rem;max-width:9.313rem}p{color:var(--gray-80, #6f7176);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.ls-dv-button-link,.ls-dv-button-link:hover{all:unset}select{appearance:none;height:36px}.ls-dv-input-wrapper{position:relative;width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6f7176)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6f7176)}#selectLeadingIconDisabled{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-50, #c8c9cc)}.ls-dv-has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.625rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #ffffff)}input:focus:not(:disabled),select:focus:not(:disabled),textarea:focus:not(:disabled){outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #ffffff)}input:active:not(:disabled),select:active:not(:disabled),textarea:active:not(:disabled){border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa);color:var(--gray-50, #c8c9cc);box-shadow:none}input[type=checkbox]{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type=checkbox]:checked,input[type=checkbox].ls-dv-indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type=checkbox]:checked::after{content:"";position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type=checkbox].ls-dv-indeterminate::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type=checkbox]:checked:hover,input[type=checkbox].ls-dv-indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type=checkbox]:hover{border:1px solid #9ca3af}input[type=checkbox]:focus,input[type=checkbox]:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type=checkbox]:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type=checkbox]:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.ls-dv-checkbox-container{display:flex;gap:0.5rem;width:100%}.ls-dv-checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.ls-dv-form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.ls-dv-form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.ls-dv-loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #4456f6)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.ls-dv-tertiary-grey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #6f7176)}button.ls-dv-tertiary-grey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.ls-dv-button-group{display:flex;border-radius:0.625rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip;width:100%}.ls-dv-button-group button{display:flex;width:100%;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;color:var(--gray-80, #6f7176)}.ls-dv-button-group button:disabled{background:var(--gray-10, #f7f8fa);cursor:not-allowed;color:var(--gray-50, #c8c9cc)}.ls-dv-button-group button:hover{background:var(--gray-10, #f7f8fa)}.ls-dv-button-group>:first-child{border-radius:0.625rem 0 0 0.625rem}.ls-dv-button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.ls-dv-button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}`;const f=class{constructor(o){e(this,o);this.mutate=t(this,"mutate",7)}dataItem;readonly=false;mutate;get component(){return o(this)}getVerticalGap(){if(!this.dataItem||this.dataItem.length<2)return undefined;const e=[...this.dataItem].sort(((e,t)=>e.top-t.top));const t=e.slice(1).map(((t,o)=>t.top-(e[o].top+e[o].height)));const o=Math.round(t[0]);return t.every((e=>Math.round(e)===o))?o:undefined}getHorizontalGap(){if(!this.dataItem||this.dataItem.length<2)return undefined;const e=[...this.dataItem].sort(((e,t)=>e.left-t.left));const t=e.slice(1).map(((t,o)=>t.left-(e[o].left+e[o].width)));const o=Math.round(t[0]);return t.every((e=>Math.round(e)===o))?o:undefined}alter(e){console.log(e);const t=this.dataItem.map((t=>({action:"update",data:{...t,...e}})));this.dataItem=t.map((e=>e.data));this.mutate.emit(t)}distributeHorizontal(){if(!this.dataItem||this.dataItem.length<3)return;var e=this.component.shadowRoot.getElementById("ls-fix-horizontal-space");const t=this.dataItem.sort(((e,t)=>e.left-t.left));var o=0;const r=t[0].left+t[0].width/2;const i=t.reduce(((e,t)=>t.left+t.width/2>e?t.left+t.width/2:e),r);const a=i-r;if(e.value!==""){o=parseInt(e.value)}else{o=Math.floor(a/(t.length-1))}const n=t.filter(((e,i)=>d({...e,left:Math.floor(r-e.width/2+o*i)})===false&&i!==0&&i!==t.length-1));const l=n.map(((e,t)=>({action:"update",data:{...e,left:Math.floor(r-e.width/2+o*(t+1))}})));this.dataItem=l.map((e=>e.data));this.mutate.emit(l)}gapVertical(e){if(!this.dataItem||this.dataItem.length===0)return;const t=this.dataItem.sort(((e,t)=>e.top-t.top));var o=t[0].top;const r=t.map((t=>{const r=o;o=o+t.height+e;const i={...t,top:r};return{action:"update",data:n(i)?{...t,left:t.pageDimensions.height-t.height-1}:i}}));this.dataItem=r.map((e=>e.data));this.mutate.emit(r)}gapHorizontal(e){if(!this.dataItem||this.dataItem.length===0)return;const t=this.dataItem.sort(((e,t)=>e.top-t.top));var o=t[0].left;const r=t.map((t=>{const r=o;o=o+t.width+e;const i={...t,left:r};console.log(i,n(i));return{action:"update",data:n(i)?{...t,left:t.pageDimensions.width-t.width-1}:i}}));this.dataItem=r.map((e=>e.data));this.mutate.emit(r)}distributeVertical(){if(!this.dataItem||this.dataItem.length<3)return;const e=this.dataItem.sort(((e,t)=>e.top-t.top));const t=e[0].top+e[0].height;const o=e[e.length-1].top;const r=o-t;const i=e.slice(1,-1).reduce(((e,t)=>e+t.height),0);const a=e.length-1;const n=Math.max(0,(r-i)/a);let d=e[0].top+e[0].height+n;const l=e.slice(1,-1).map((e=>{const t=Math.floor(d);d+=e.height+n;return{action:"update",data:{...e,top:t}}}));this.dataItem=l.map((e=>e.data));this.mutate.emit(l)}componentDidLoad(){}render(){return r(i,{key:"fe8833a6dd41dd4513c4bf9741388c64682c62fd"},r("div",{key:"08ad4ccabe0767127c186b87f041637747077a32",class:"ls-dv-field-properties-section"},r("div",{key:"c42c32d318679fdc08936c1901b0a7cee61d449a",class:"ls-dv-field-properties-section-text"},r("p",{key:"894bdb623119609093c2070727dffb33c15110e4",class:"ls-dv-field-properties-section-title"},a.t("placement.distribution")),r("p",{key:"ce2b4e52e2be49588e24b161c40d801f3314010c",class:"ls-dv-field-properties-section-description"},a.t("placement.distributiondescription"))),r("div",{key:"b7f8950b2ac7cb9d5d537b28798d20759d6e1e91",class:"ls-dv-button-group"},r("button",{key:"5764c462f344015b6dbb46c72e444a2e58d74f8a",onClick:()=>{this.distributeVertical()},"aria-label":a.t("alignment.distributevertically"),"data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("alignment.distributevertically"),disabled:this.readonly},r("ls-icon",{key:"ce32cb64c74c6b07c799705e5a50a27f449a83fc",name:"field-distribute-vertically-icon"})),r("button",{key:"0f495f21e3aba3679f1487c594e7465a5cd851f8",onClick:()=>{this.distributeHorizontal()},"aria-label":a.t("alignment.distributehorizontally"),"data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("alignment.distributehorizontally"),disabled:this.readonly},r("ls-icon",{key:"915c6eed36825afeacba935a5733e7dbad0bc694",name:"field-distribute-horizontally-icon"})))),r("div",{key:"938f1a6b9b0aecd7e371cba4ee3911f773bb31cc",class:"ls-dv-field-properties-section"},r("div",{key:"6172fc20d68d341464162d517aca13705bce3dea",class:"ls-dv-field-properties-section-text"},r("p",{key:"0f72f15baf2f619320d167db9a9f34d1fed2bd54",class:"ls-dv-field-properties-section-title"},a.t("placement.gap")),r("p",{key:"2c7c8d5300dc920b08f649ab2c34d69433f73bd5",class:"ls-dv-field-properties-section-description"},a.t("placement.gapdescription"))),r("div",{key:"72effd253ce32437e2d96508a5f28a508aad0d7f",class:"ls-dv-input-row"},r("div",{key:"251bbc9828d2b139bc8d9cf2556718f4b67f54ef",class:"ls-dv-input-wrapper","data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("placement.setverticalgap")},r("ls-icon",{key:"0d4ba214ebb8abc7ae9cf0102c5cfd2d0ce88685",id:"selectLeadingIcon",name:"field-distribute-vertically-icon"}),r("input",{key:"6182509605e4cd99aafa2f4905d1ac75edeb9f2f",type:"number",class:"ls-dv-has-leading-icon",id:"ls-fix-vertical-space",onChange:e=>{this.gapVertical(parseInt(e.target.value))},max:9999,value:this.getVerticalGap(),placeholder:this.getVerticalGap()===undefined?a.t("fieldproperties.mixed"):undefined,size:4,disabled:this.readonly})),r("div",{key:"1fc7b7f92b04e2bab585879afc796ab401f99fca",class:"ls-dv-input-wrapper","data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("placement.sethorizontalgap")},r("ls-icon",{key:"7104a91f81b3bd0683eb1a6dae2ec9971daab5ad",id:"selectLeadingIcon",name:"field-distribute-horizontally-icon"}),r("input",{key:"8631696eb1b18b4d213b97b036139562d6854cbb",type:"number",class:"ls-dv-has-leading-icon",id:"ls-fix-horizontal-space",onChange:e=>{this.gapHorizontal(parseInt(e.target.value))},max:9999,value:this.getHorizontalGap(),placeholder:this.getHorizontalGap()===undefined?a.t("fieldproperties.mixed"):undefined,size:4,disabled:this.readonly})))),r("ls-tooltip",{key:"e512132fd066e7ff5ed8c090f26cca11c933ac12",tooltipId:"ls-dv-tooltip"}),r("slot",{key:"61325afcf7b58434c0be5cd0b415acb36f2308a7"}))}};f.style=c();const p=()=>`:host{display:flex;flex-direction:column;gap:1rem;width:100%;position:relative}.ls-dv-toolbar-numeric{width:2.813rem;max-height:1.25rem;margin:0px;padding:0px}*{margin:0;box-sizing:border-box}.ls-dv-field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-dv-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.ls-dv-row{flex-direction:row;align-items:center;justify-content:space-between}.ls-dv-multi-button-group-row{display:flex;gap:0.5rem}.ls-dv-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-dv-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-dv-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6f7176);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.ls-dv-input-row{display:flex;gap:0.5rem}.ls-dv-input-row .ls-dv-input-wrapper input{width:9.313rem;max-width:9.313rem}p{color:var(--gray-80, #6f7176);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.ls-dv-button-link,.ls-dv-button-link:hover{all:unset}select{appearance:none;height:36px}.ls-dv-input-wrapper{position:relative;width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6f7176)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6f7176)}#selectLeadingIconDisabled{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-50, #c8c9cc)}.ls-dv-has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.625rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #ffffff)}input:focus:not(:disabled),select:focus:not(:disabled),textarea:focus:not(:disabled){outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #ffffff)}input:active:not(:disabled),select:active:not(:disabled),textarea:active:not(:disabled){border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa);color:var(--gray-50, #c8c9cc);box-shadow:none}input[type=checkbox]{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type=checkbox]:checked,input[type=checkbox].ls-dv-indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type=checkbox]:checked::after{content:"";position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type=checkbox].ls-dv-indeterminate::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type=checkbox]:checked:hover,input[type=checkbox].ls-dv-indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type=checkbox]:hover{border:1px solid #9ca3af}input[type=checkbox]:focus,input[type=checkbox]:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type=checkbox]:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type=checkbox]:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.ls-dv-checkbox-container{display:flex;gap:0.5rem;width:100%}.ls-dv-checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.ls-dv-form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.ls-dv-form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.ls-dv-loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #4456f6)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.ls-dv-tertiary-grey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #6f7176)}button.ls-dv-tertiary-grey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.ls-dv-button-group{display:flex;border-radius:0.625rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip;width:100%}.ls-dv-button-group button{display:flex;width:100%;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;color:var(--gray-80, #6f7176)}.ls-dv-button-group button:disabled{background:var(--gray-10, #f7f8fa);cursor:not-allowed;color:var(--gray-50, #c8c9cc)}.ls-dv-button-group button:hover{background:var(--gray-10, #f7f8fa)}.ls-dv-button-group>:first-child{border-radius:0.625rem 0 0 0.625rem}.ls-dv-button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.ls-dv-button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}`;const b=class{constructor(o){e(this,o);this.mutate=t(this,"mutate",7)}get component(){return o(this)}dataItem;readonly=false;mutate;alter(e){const t=this.dataItem.map((t=>({action:"update",data:{...t,...e}})));this.dataItem=t.map((e=>e.data));this.mutate.emit(t)}componentDidLoad(){}render(){return r(i,{key:"20c6d8b9e60c338bb53d79d5963a4ababeaaa42d"},r("div",{key:"ad64ee5e1ba91ae6814bcdbbb8642ef8c791a77e",class:"ls-dv-field-properties-section"},r("div",{key:"c1b5b3c761eb28893c1fd12ce9d64654963f04ca",class:"ls-dv-field-properties-section-text"},r("p",{key:"a99b660bb0c9b3ee3804e9e0fd38b6f1cf4ae408",class:"ls-dv-field-properties-section-title"},a.t("dimensions.scaleandresize")),r("p",{key:"643453d23af79745ed721e33d83d80d0d64c2059",class:"ls-dv-field-properties-section-description"},a.t("dimensions.scaleandresizedescription"))),r("div",{key:"b9fa4b681736a066720fab6581bdb5e53efd6fa9",class:"ls-dv-button-group"},r("button",{key:"cb58b864ecadd336d5973755f08e2a2baae399ac",onClick:()=>this.alter({width:this.dataItem[0].width,height:this.dataItem[0].height}),"aria-label":a.t("alignment.matchsize"),"data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("alignment.matchsize"),disabled:this.readonly},r("ls-icon",{key:"2cb7fc689313423f6c98b3b21629ed03b63e64cc",name:"field-scale-icon"})),r("button",{key:"db9bbcb75109bfe701efc7c932d364db85e758cb","aria-label":a.t("alignment.matchwidth"),onClick:()=>this.alter({width:this.dataItem[0].width}),"data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("alignment.matchwidth"),disabled:this.readonly},r("ls-icon",{key:"795114748a3004deb67601053cd05149f4b3c682",name:"field-match-width-icon"})),r("button",{key:"6d79b24fd4bd31e79931632aad3841d9d772664f",onClick:()=>this.alter({height:this.dataItem[0].height}),"aria-label":a.t("alignment.matchheight"),"data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("alignment.matchheight"),disabled:this.readonly},r("ls-icon",{key:"ae2ec6876383b31d95ffba630716a523c641e91b",name:"field-match-height-icon"})))),r("slot",{key:"ccf740868f2a7561ef7088f15fcd9ae9245096d1"}),r("ls-tooltip",{key:"4b8a08963977d82fa63eac8acd52cf6c4cc474bb",tooltipId:"ls-dv-tooltip"}))}};b.style=p();export{s as ls_field_alignment,f as ls_field_distribute,b as ls_field_size};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,c as t,a as o,h as r,H as i}from"./p-CItPoq74.js";import{d as a}from"./p-WVWIAGo_.js";import{o as n}from"./p-BWxpQfiq.js";import{o as d}from"./p-CkHg_-KZ.js";import"./p-CmJjDhcp.js";import"./p-04cXI5GQ.js";import"./p-CwCWCxsI.js";const l=()=>`:host{display:flex;flex-direction:column;gap:1rem;width:100%;position:relative}*{margin:0;box-sizing:border-box}.ls-dv-field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-dv-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.ls-dv-row{flex-direction:row;align-items:center;justify-content:space-between}.ls-dv-multi-button-group-row{display:flex;gap:0.5rem}.ls-dv-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-dv-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-dv-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6f7176);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.ls-dv-input-row{display:flex;gap:0.5rem}.ls-dv-input-row .ls-dv-input-wrapper input{width:9.313rem;max-width:9.313rem}p{color:var(--gray-80, #6f7176);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.ls-dv-button-link,.ls-dv-button-link:hover{all:unset}select{appearance:none;height:2.25rem}.ls-dv-input-wrapper{position:relative;width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6f7176)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6f7176)}#selectLeadingIconDisabled{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-50, #c8c9cc)}.ls-dv-has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.625rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #ffffff)}input:focus:not(:disabled),select:focus:not(:disabled),textarea:focus:not(:disabled){outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #ffffff)}input:active:not(:disabled),select:active:not(:disabled),textarea:active:not(:disabled){border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa);color:var(--gray-50, #c8c9cc);box-shadow:none}input[type=checkbox]{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type=checkbox]:checked,input[type=checkbox].ls-dv-indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type=checkbox]:checked::after{content:"";position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type=checkbox].ls-dv-indeterminate::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type=checkbox]:checked:hover,input[type=checkbox].ls-dv-indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type=checkbox]:hover{border:1px solid #9ca3af}input[type=checkbox]:focus,input[type=checkbox]:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type=checkbox]:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type=checkbox]:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.ls-dv-checkbox-container{display:flex;gap:0.5rem;width:100%}.ls-dv-checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.ls-dv-form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.ls-dv-form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.ls-dv-loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #4456f6)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.ls-dv-tertiary-grey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #6f7176)}button.ls-dv-tertiary-grey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.ls-dv-button-group{display:flex;border-radius:0.625rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip;width:100%}.ls-dv-button-group button{display:flex;width:100%;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;color:var(--gray-80, #6f7176)}.ls-dv-button-group button:disabled{background:var(--gray-10, #f7f8fa);cursor:not-allowed;color:var(--gray-50, #c8c9cc)}.ls-dv-button-group button:hover{background:var(--gray-10, #f7f8fa)}.ls-dv-button-group>:first-child{border-radius:0.625rem 0 0 0.625rem}.ls-dv-button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.ls-dv-button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}`;const s=class{constructor(o){e(this,o);this.mutate=t(this,"mutate",7);this.update=t(this,"update",7)}get component(){return o(this)}dataItem;readonly=false;mutate;update;alter(e){console.log(e);const t=this.dataItem.map((t=>({action:"update",data:{...t,...e}})));this.dataItem=t.map((e=>e.data));this.mutate.emit(t)}left(){const e=Math.min(...this.dataItem.map((e=>e.left)));this.alter({left:e})}center(){const e=Math.min(...this.dataItem.map((e=>e.left)));const t=Math.max(...this.dataItem.map((e=>e.left+e.width)));const o=(e+t)/2;const r=this.dataItem.map((e=>{const t=Math.round(o-e.width/2);return{action:"update",data:{...e,left:t}}}));this.dataItem=r.map((e=>e.data));this.mutate.emit(r)}right(){const e=Math.max(...this.dataItem.map((e=>e.left+e.width)));const t=this.dataItem.map((t=>{const o=e-t.width;return{action:"update",data:{...t,left:o}}}));this.dataItem=t.map((e=>e.data));this.mutate.emit(t)}top(){const e=Math.min(...this.dataItem.map((e=>e.top)));this.alter({top:e})}middle(){const e=Math.min(...this.dataItem.map((e=>e.top)));const t=Math.max(...this.dataItem.map((e=>e.top+e.height)));const o=(e+t)/2;const r=this.dataItem.map((e=>{const t=Math.round(o-e.height/2);return{action:"update",data:{...e,top:t}}}));this.dataItem=r.map((e=>e.data));this.mutate.emit(r)}bottom(){const e=Math.max(...this.dataItem.map((e=>e.top+e.height)));const t=this.dataItem.map((t=>{const o=e-t.height;return{action:"update",data:{...t,top:o}}}));this.dataItem=t.map((e=>e.data));this.mutate.emit(t)}componentDidLoad(){}render(){return r(i,{key:"e447034949db9618a4c0a9bb198cba863b852ce6"},r("div",{key:"f6e25671308810b16394639c5257264f05c97068",class:"ls-dv-field-properties-section"},r("div",{key:"cc3ccb09e0edc9b3725e732fa293b86a4094fd36",class:"ls-dv-field-properties-section-text"},r("p",{key:"ff593d77ac614df8297d6e34669ea8aef91c1347",class:"ls-dv-field-properties-section-title"},a.t("placement.alignment")),r("p",{key:"930191a9f93d239803fcd91e82c159fd167a5d65",class:"ls-dv-field-properties-section-description"},a.t("placement.alignmentdescription"))),r("div",{key:"0488f080f01eb85c4e86364cec0b1f7ddf7f82d4",class:"ls-dv-multi-button-group-row"},r("div",{key:"58a64f173c8cbe2c08d11e04682e63962bdbfc9d",class:"ls-dv-button-group"},r("button",{key:"c0d961d45fc9593cf1786d9b3bf88505da9afd96",onClick:()=>this.left(),"aria-label":a.t("alignment.alignleft"),"data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("alignment.alignleft"),disabled:this.readonly},r("ls-icon",{key:"482801c81b41071b3af893ceb29daae915136053",name:"field-alignment-left-icon"})),r("button",{key:"4df6a9b584dcf7d14d78b36642f8214b7b845ef7",onClick:()=>this.center(),"aria-label":a.t("alignment.aligncenter"),"data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("alignment.aligncenter"),disabled:this.readonly},r("ls-icon",{key:"61970b5c35cd7a4fb341399626b58b82466e8a82",name:"field-alignment-centre-icon"})),r("button",{key:"a6a0fd4ad9c6dc11c0cf3a7323a08f0e6b3cb83b",onClick:()=>{this.right()},"aria-label":a.t("alignment.alignright"),"data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("alignment.alignright"),disabled:this.readonly},r("ls-icon",{key:"d8ba573f24b3e53e6f9dee18edbcba6a796d7840",name:"field-alignment-right-icon"}))),r("div",{key:"e45b18c7e0bfc3fa943c9643d6dbe2c9c9fc3688",class:"ls-dv-button-group"},r("button",{key:"3cf68e7e343edd162205a635e02747dfca8412e6",onClick:()=>this.top(),"aria-label":a.t("alignment.aligntop"),"data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("alignment.aligntop"),disabled:this.readonly},r("ls-icon",{key:"9dd606425d2b07a70cddfcd23a72238b9f84203e",name:"field-alignment-top-icon"})),r("button",{key:"4d03ef7ff4bac674dd5e76d1f2d72fee8f518b62",onClick:()=>this.middle(),"aria-label":a.t("alignment.alignmiddle"),"data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("alignment.alignmiddle"),disabled:this.readonly},r("ls-icon",{key:"31ae991a5d92a2df824a2e516ce9a2a736a04082",name:"field-alignment-middle-icon"})),r("button",{key:"8df1990e5376a0468c365e51eedfa978964255f1",onClick:()=>this.bottom(),"aria-label":a.t("alignment.alignbottom"),"data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("alignment.alignbottom"),disabled:this.readonly},r("ls-icon",{key:"bd40d79653247d4e1aab3630a4bbb19f25fc3dce",name:"field-alignment-bottom-icon"}))))),r("slot",{key:"c8370a47c81dc1cfe80c9365a091be73fc53109a"}),r("ls-tooltip",{key:"12626fd8c27ea541788ab480f12fc6e8622f646f",tooltipId:"ls-dv-tooltip"}))}};s.style=l();const c=()=>`:host{display:flex;flex-direction:column;gap:1rem;width:100%;position:relative}.ls-dv-toolbar-numeric{width:2.813rem;max-height:1.125rem;margin:0px;padding:0px}*{margin:0;box-sizing:border-box}.ls-dv-field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-dv-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.ls-dv-row{flex-direction:row;align-items:center;justify-content:space-between}.ls-dv-multi-button-group-row{display:flex;gap:0.5rem}.ls-dv-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-dv-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-dv-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6f7176);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.ls-dv-input-row{display:flex;gap:0.5rem}.ls-dv-input-row .ls-dv-input-wrapper input{width:9.313rem;max-width:9.313rem}p{color:var(--gray-80, #6f7176);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.ls-dv-button-link,.ls-dv-button-link:hover{all:unset}select{appearance:none;height:36px}.ls-dv-input-wrapper{position:relative;width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6f7176)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6f7176)}#selectLeadingIconDisabled{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-50, #c8c9cc)}.ls-dv-has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.625rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #ffffff)}input:focus:not(:disabled),select:focus:not(:disabled),textarea:focus:not(:disabled){outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #ffffff)}input:active:not(:disabled),select:active:not(:disabled),textarea:active:not(:disabled){border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa);color:var(--gray-50, #c8c9cc);box-shadow:none}input[type=checkbox]{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type=checkbox]:checked,input[type=checkbox].ls-dv-indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type=checkbox]:checked::after{content:"";position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type=checkbox].ls-dv-indeterminate::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type=checkbox]:checked:hover,input[type=checkbox].ls-dv-indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type=checkbox]:hover{border:1px solid #9ca3af}input[type=checkbox]:focus,input[type=checkbox]:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type=checkbox]:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type=checkbox]:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.ls-dv-checkbox-container{display:flex;gap:0.5rem;width:100%}.ls-dv-checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.ls-dv-form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.ls-dv-form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.ls-dv-loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #4456f6)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.ls-dv-tertiary-grey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #6f7176)}button.ls-dv-tertiary-grey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.ls-dv-button-group{display:flex;border-radius:0.625rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip;width:100%}.ls-dv-button-group button{display:flex;width:100%;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;color:var(--gray-80, #6f7176)}.ls-dv-button-group button:disabled{background:var(--gray-10, #f7f8fa);cursor:not-allowed;color:var(--gray-50, #c8c9cc)}.ls-dv-button-group button:hover{background:var(--gray-10, #f7f8fa)}.ls-dv-button-group>:first-child{border-radius:0.625rem 0 0 0.625rem}.ls-dv-button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.ls-dv-button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}`;const f=class{constructor(o){e(this,o);this.mutate=t(this,"mutate",7)}dataItem;readonly=false;mutate;get component(){return o(this)}getVerticalGap(){if(!this.dataItem||this.dataItem.length<2)return undefined;const e=[...this.dataItem].sort(((e,t)=>e.top-t.top));const t=e.slice(1).map(((t,o)=>t.top-(e[o].top+e[o].height)));const o=Math.round(t[0]);return t.every((e=>Math.round(e)===o))?o:undefined}getHorizontalGap(){if(!this.dataItem||this.dataItem.length<2)return undefined;const e=[...this.dataItem].sort(((e,t)=>e.left-t.left));const t=e.slice(1).map(((t,o)=>t.left-(e[o].left+e[o].width)));const o=Math.round(t[0]);return t.every((e=>Math.round(e)===o))?o:undefined}alter(e){console.log(e);const t=this.dataItem.map((t=>({action:"update",data:{...t,...e}})));this.dataItem=t.map((e=>e.data));this.mutate.emit(t)}distributeHorizontal(){if(!this.dataItem||this.dataItem.length<3)return;var e=this.component.shadowRoot.getElementById("ls-fix-horizontal-space");const t=this.dataItem.sort(((e,t)=>e.left-t.left));var o=0;const r=t[0].left+t[0].width/2;const i=t.reduce(((e,t)=>t.left+t.width/2>e?t.left+t.width/2:e),r);const a=i-r;if(e.value!==""){o=parseInt(e.value)}else{o=Math.floor(a/(t.length-1))}const n=t.filter(((e,i)=>d({...e,left:Math.floor(r-e.width/2+o*i)})===false&&i!==0&&i!==t.length-1));const l=n.map(((e,t)=>({action:"update",data:{...e,left:Math.floor(r-e.width/2+o*(t+1))}})));this.dataItem=l.map((e=>e.data));this.mutate.emit(l)}gapVertical(e){if(!this.dataItem||this.dataItem.length===0)return;const t=this.dataItem.sort(((e,t)=>e.top-t.top));var o=t[0].top;const r=t.map((t=>{const r=o;o=o+t.height+e;const i={...t,top:r};return{action:"update",data:n(i)?{...t,left:t.pageDimensions.height-t.height-1}:i}}));this.dataItem=r.map((e=>e.data));this.mutate.emit(r)}gapHorizontal(e){if(!this.dataItem||this.dataItem.length===0)return;const t=this.dataItem.sort(((e,t)=>e.top-t.top));var o=t[0].left;const r=t.map((t=>{const r=o;o=o+t.width+e;const i={...t,left:r};console.log(i,n(i));return{action:"update",data:n(i)?{...t,left:t.pageDimensions.width-t.width-1}:i}}));this.dataItem=r.map((e=>e.data));this.mutate.emit(r)}distributeVertical(){if(!this.dataItem||this.dataItem.length<3)return;const e=this.dataItem.sort(((e,t)=>e.top-t.top));const t=e[0].top+e[0].height;const o=e[e.length-1].top;const r=o-t;const i=e.slice(1,-1).reduce(((e,t)=>e+t.height),0);const a=e.length-1;const n=Math.max(0,(r-i)/a);let d=e[0].top+e[0].height+n;const l=e.slice(1,-1).map((e=>{const t=Math.floor(d);d+=e.height+n;return{action:"update",data:{...e,top:t}}}));this.dataItem=l.map((e=>e.data));this.mutate.emit(l)}componentDidLoad(){}render(){return r(i,{key:"fe8833a6dd41dd4513c4bf9741388c64682c62fd"},r("div",{key:"08ad4ccabe0767127c186b87f041637747077a32",class:"ls-dv-field-properties-section"},r("div",{key:"c42c32d318679fdc08936c1901b0a7cee61d449a",class:"ls-dv-field-properties-section-text"},r("p",{key:"894bdb623119609093c2070727dffb33c15110e4",class:"ls-dv-field-properties-section-title"},a.t("placement.distribution")),r("p",{key:"ce2b4e52e2be49588e24b161c40d801f3314010c",class:"ls-dv-field-properties-section-description"},a.t("placement.distributiondescription"))),r("div",{key:"b7f8950b2ac7cb9d5d537b28798d20759d6e1e91",class:"ls-dv-button-group"},r("button",{key:"5764c462f344015b6dbb46c72e444a2e58d74f8a",onClick:()=>{this.distributeVertical()},"aria-label":a.t("alignment.distributevertically"),"data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("alignment.distributevertically"),disabled:this.readonly},r("ls-icon",{key:"ce32cb64c74c6b07c799705e5a50a27f449a83fc",name:"field-distribute-vertically-icon"})),r("button",{key:"0f495f21e3aba3679f1487c594e7465a5cd851f8",onClick:()=>{this.distributeHorizontal()},"aria-label":a.t("alignment.distributehorizontally"),"data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("alignment.distributehorizontally"),disabled:this.readonly},r("ls-icon",{key:"915c6eed36825afeacba935a5733e7dbad0bc694",name:"field-distribute-horizontally-icon"})))),r("div",{key:"938f1a6b9b0aecd7e371cba4ee3911f773bb31cc",class:"ls-dv-field-properties-section"},r("div",{key:"6172fc20d68d341464162d517aca13705bce3dea",class:"ls-dv-field-properties-section-text"},r("p",{key:"0f72f15baf2f619320d167db9a9f34d1fed2bd54",class:"ls-dv-field-properties-section-title"},a.t("placement.gap")),r("p",{key:"2c7c8d5300dc920b08f649ab2c34d69433f73bd5",class:"ls-dv-field-properties-section-description"},a.t("placement.gapdescription"))),r("div",{key:"72effd253ce32437e2d96508a5f28a508aad0d7f",class:"ls-dv-input-row"},r("div",{key:"251bbc9828d2b139bc8d9cf2556718f4b67f54ef",class:"ls-dv-input-wrapper","data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("placement.setverticalgap")},r("ls-icon",{key:"0d4ba214ebb8abc7ae9cf0102c5cfd2d0ce88685",id:"selectLeadingIcon",name:"field-distribute-vertically-icon"}),r("input",{key:"6182509605e4cd99aafa2f4905d1ac75edeb9f2f",type:"number",class:"ls-dv-has-leading-icon",id:"ls-fix-vertical-space",onChange:e=>{this.gapVertical(parseInt(e.target.value))},max:9999,value:this.getVerticalGap(),placeholder:this.getVerticalGap()===undefined?a.t("fieldproperties.mixed"):undefined,size:4,disabled:this.readonly})),r("div",{key:"1fc7b7f92b04e2bab585879afc796ab401f99fca",class:"ls-dv-input-wrapper","data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("placement.sethorizontalgap")},r("ls-icon",{key:"7104a91f81b3bd0683eb1a6dae2ec9971daab5ad",id:"selectLeadingIcon",name:"field-distribute-horizontally-icon"}),r("input",{key:"8631696eb1b18b4d213b97b036139562d6854cbb",type:"number",class:"ls-dv-has-leading-icon",id:"ls-fix-horizontal-space",onChange:e=>{this.gapHorizontal(parseInt(e.target.value))},max:9999,value:this.getHorizontalGap(),placeholder:this.getHorizontalGap()===undefined?a.t("fieldproperties.mixed"):undefined,size:4,disabled:this.readonly})))),r("ls-tooltip",{key:"e512132fd066e7ff5ed8c090f26cca11c933ac12",tooltipId:"ls-dv-tooltip"}),r("slot",{key:"61325afcf7b58434c0be5cd0b415acb36f2308a7"}))}};f.style=c();const p=()=>`:host{display:flex;flex-direction:column;gap:1rem;width:100%;position:relative}.ls-dv-toolbar-numeric{width:2.813rem;max-height:1.25rem;margin:0px;padding:0px}*{margin:0;box-sizing:border-box}.ls-dv-field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-dv-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.ls-dv-row{flex-direction:row;align-items:center;justify-content:space-between}.ls-dv-multi-button-group-row{display:flex;gap:0.5rem}.ls-dv-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-dv-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-dv-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6f7176);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.ls-dv-input-row{display:flex;gap:0.5rem}.ls-dv-input-row .ls-dv-input-wrapper input{width:9.313rem;max-width:9.313rem}p{color:var(--gray-80, #6f7176);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.ls-dv-button-link,.ls-dv-button-link:hover{all:unset}select{appearance:none;height:36px}.ls-dv-input-wrapper{position:relative;width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6f7176)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6f7176)}#selectLeadingIconDisabled{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-50, #c8c9cc)}.ls-dv-has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.625rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #ffffff)}input:focus:not(:disabled),select:focus:not(:disabled),textarea:focus:not(:disabled){outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #ffffff)}input:active:not(:disabled),select:active:not(:disabled),textarea:active:not(:disabled){border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa);color:var(--gray-50, #c8c9cc);box-shadow:none}input[type=checkbox]{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type=checkbox]:checked,input[type=checkbox].ls-dv-indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type=checkbox]:checked::after{content:"";position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type=checkbox].ls-dv-indeterminate::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type=checkbox]:checked:hover,input[type=checkbox].ls-dv-indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type=checkbox]:hover{border:1px solid #9ca3af}input[type=checkbox]:focus,input[type=checkbox]:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type=checkbox]:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type=checkbox]:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.ls-dv-checkbox-container{display:flex;gap:0.5rem;width:100%}.ls-dv-checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.ls-dv-form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.ls-dv-form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.ls-dv-loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #4456f6)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.ls-dv-tertiary-grey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #6f7176)}button.ls-dv-tertiary-grey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.ls-dv-button-group{display:flex;border-radius:0.625rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip;width:100%}.ls-dv-button-group button{display:flex;width:100%;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;color:var(--gray-80, #6f7176)}.ls-dv-button-group button:disabled{background:var(--gray-10, #f7f8fa);cursor:not-allowed;color:var(--gray-50, #c8c9cc)}.ls-dv-button-group button:hover{background:var(--gray-10, #f7f8fa)}.ls-dv-button-group>:first-child{border-radius:0.625rem 0 0 0.625rem}.ls-dv-button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.ls-dv-button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}`;const b=class{constructor(o){e(this,o);this.mutate=t(this,"mutate",7)}get component(){return o(this)}dataItem;readonly=false;mutate;alter(e){const t=this.dataItem.map((t=>({action:"update",data:{...t,...e}})));this.dataItem=t.map((e=>e.data));this.mutate.emit(t)}componentDidLoad(){}render(){return r(i,{key:"20c6d8b9e60c338bb53d79d5963a4ababeaaa42d"},r("div",{key:"ad64ee5e1ba91ae6814bcdbbb8642ef8c791a77e",class:"ls-dv-field-properties-section"},r("div",{key:"c1b5b3c761eb28893c1fd12ce9d64654963f04ca",class:"ls-dv-field-properties-section-text"},r("p",{key:"a99b660bb0c9b3ee3804e9e0fd38b6f1cf4ae408",class:"ls-dv-field-properties-section-title"},a.t("dimensions.scaleandresize")),r("p",{key:"643453d23af79745ed721e33d83d80d0d64c2059",class:"ls-dv-field-properties-section-description"},a.t("dimensions.scaleandresizedescription"))),r("div",{key:"b9fa4b681736a066720fab6581bdb5e53efd6fa9",class:"ls-dv-button-group"},r("button",{key:"cb58b864ecadd336d5973755f08e2a2baae399ac",onClick:()=>this.alter({width:this.dataItem[0].width,height:this.dataItem[0].height}),"aria-label":a.t("alignment.matchsize"),"data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("alignment.matchsize"),disabled:this.readonly},r("ls-icon",{key:"2cb7fc689313423f6c98b3b21629ed03b63e64cc",name:"field-scale-icon"})),r("button",{key:"db9bbcb75109bfe701efc7c932d364db85e758cb","aria-label":a.t("alignment.matchwidth"),onClick:()=>this.alter({width:this.dataItem[0].width}),"data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("alignment.matchwidth"),disabled:this.readonly},r("ls-icon",{key:"795114748a3004deb67601053cd05149f4b3c682",name:"field-match-width-icon"})),r("button",{key:"6d79b24fd4bd31e79931632aad3841d9d772664f",onClick:()=>this.alter({height:this.dataItem[0].height}),"aria-label":a.t("alignment.matchheight"),"data-tooltip-id":"ls-dv-tooltip","data-tooltip-content":a.t("alignment.matchheight"),disabled:this.readonly},r("ls-icon",{key:"ae2ec6876383b31d95ffba630716a523c641e91b",name:"field-match-height-icon"})))),r("slot",{key:"ccf740868f2a7561ef7088f15fcd9ae9245096d1"}),r("ls-tooltip",{key:"4b8a08963977d82fa63eac8acd52cf6c4cc474bb",tooltipId:"ls-dv-tooltip"}))}};b.style=p();export{s as ls_field_alignment,f as ls_field_distribute,b as ls_field_size};
|
|
2
|
+
//# sourceMappingURL=p-e48efc3a.entry.js.map
|
|
@@ -93,6 +93,7 @@ export declare class LsDocumentViewer {
|
|
|
93
93
|
selected: HTMLLsEditorFieldElement[];
|
|
94
94
|
isLoading: boolean;
|
|
95
95
|
isMutating: boolean;
|
|
96
|
+
loaderSize: number;
|
|
96
97
|
selectedDataItems: LSApiElement[];
|
|
97
98
|
fieldTypeSelected: IToolboxField;
|
|
98
99
|
/**
|
|
@@ -229,7 +230,9 @@ export declare class LsDocumentViewer {
|
|
|
229
230
|
load(): Promise<void>;
|
|
230
231
|
reload(): Promise<void>;
|
|
231
232
|
componentWillLoad(): void;
|
|
233
|
+
private _resizeObserver;
|
|
232
234
|
componentDidLoad(): void;
|
|
235
|
+
disconnectedCallback(): void;
|
|
233
236
|
handleManagerChange(manager: string): void;
|
|
234
237
|
showTool(fieldFormType: string): boolean;
|
|
235
238
|
checkType(type: LSApiRoleType): boolean;
|