legalesign-document-viewer 0.8.9 → 0.9.0

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.
Files changed (54) hide show
  1. package/dist/cjs/ls-compose-loader_46.cjs.entry.js +22 -7
  2. package/dist/collection/components/ls-document-viewer/editorCalculator.js +6 -1
  3. package/dist/collection/components/ls-document-viewer/editorCalculator.js.map +1 -1
  4. package/dist/collection/components/ls-document-viewer/ls-document-viewer.css +1 -1
  5. package/dist/collection/components/ls-document-viewer/ls-document-viewer.js +15 -5
  6. package/dist/collection/components/ls-document-viewer/ls-document-viewer.js.map +1 -1
  7. package/dist/components/ls-document-viewer.js +29 -19
  8. package/dist/components/ls-document-viewer.js.map +1 -1
  9. package/dist/components/ls-editor-field.js +1 -1
  10. package/dist/components/ls-field-content.js +1 -1
  11. package/dist/components/ls-field-distribute.js +1 -1
  12. package/dist/components/ls-field-properties-date.js +1 -1
  13. package/dist/components/ls-field-properties-dropdown.js +2 -2
  14. package/dist/components/ls-field-properties-email.js +1 -1
  15. package/dist/components/ls-field-properties-file.js +1 -1
  16. package/dist/components/ls-field-properties-general.js +1 -1
  17. package/dist/components/ls-field-properties-image.js +1 -1
  18. package/dist/components/ls-field-properties-multiple.js +1 -1
  19. package/dist/components/ls-field-properties-number.js +1 -1
  20. package/dist/components/ls-field-properties-signature.js +1 -1
  21. package/dist/components/ls-field-properties-text.js +1 -1
  22. package/dist/components/ls-field-properties.js +1 -1
  23. package/dist/components/{p-DIv-TKoW.js → p-B8554gGn.js} +4 -4
  24. package/dist/components/{p-DIv-TKoW.js.map → p-B8554gGn.js.map} +1 -1
  25. package/dist/components/{p-CvIXeGbs.js → p-BMbCmc2K.js} +4 -4
  26. package/dist/components/{p-CvIXeGbs.js.map → p-BMbCmc2K.js.map} +1 -1
  27. package/dist/components/{p-DjHZ9K6_.js → p-B__FshSU.js} +4 -4
  28. package/dist/components/{p-DjHZ9K6_.js.map → p-B__FshSU.js.map} +1 -1
  29. package/dist/components/{p-BjqUJKFo.js → p-BoD-V4Fi.js} +4 -4
  30. package/dist/components/{p-BjqUJKFo.js.map → p-BoD-V4Fi.js.map} +1 -1
  31. package/dist/components/{p-DeE4p-ur.js → p-C86C90jD.js} +4 -4
  32. package/dist/components/{p-DeE4p-ur.js.map → p-C86C90jD.js.map} +1 -1
  33. package/dist/components/{p-461ICmRy.js → p-CA1JS6cZ.js} +4 -4
  34. package/dist/components/{p-461ICmRy.js.map → p-CA1JS6cZ.js.map} +1 -1
  35. package/dist/components/{p-DGD68rk3.js → p-CdoAgm8G.js} +3 -3
  36. package/dist/components/{p-DGD68rk3.js.map → p-CdoAgm8G.js.map} +1 -1
  37. package/dist/components/{p-DE5DR9VV.js → p-Cuf-AQmR.js} +8 -3
  38. package/dist/components/p-Cuf-AQmR.js.map +1 -0
  39. package/dist/components/{p-CI4VbhVw.js → p-D1dPEqzL.js} +14 -14
  40. package/dist/components/{p-CI4VbhVw.js.map → p-D1dPEqzL.js.map} +1 -1
  41. package/dist/components/{p-BdT90f2V.js → p-DGHJ47H0.js} +4 -4
  42. package/dist/components/{p-BdT90f2V.js.map → p-DGHJ47H0.js.map} +1 -1
  43. package/dist/components/{p-B02e0huA.js → p-DfDiDkjo.js} +4 -4
  44. package/dist/components/{p-B02e0huA.js.map → p-DfDiDkjo.js.map} +1 -1
  45. package/dist/components/{p-2Bb5fr50.js → p-DzXkIDXC.js} +4 -4
  46. package/dist/components/{p-2Bb5fr50.js.map → p-DzXkIDXC.js.map} +1 -1
  47. package/dist/components/{p-D_YnNReR.js → p-gbOgbKVk.js} +3 -3
  48. package/dist/components/{p-D_YnNReR.js.map → p-gbOgbKVk.js.map} +1 -1
  49. package/dist/esm/ls-compose-loader_46.entry.js +22 -7
  50. package/dist/ls-document-viewer/ls-document-viewer.esm.js +1 -1
  51. package/dist/ls-document-viewer/{p-9a4a5d2f.entry.js → p-238e6dda.entry.js} +3 -3
  52. package/dist/ls-document-viewer/{p-9a4a5d2f.entry.js.map → p-238e6dda.entry.js.map} +1 -1
  53. package/package.json +1 -1
  54. package/dist/components/p-DE5DR9VV.js.map +0 -1
@@ -35151,10 +35151,15 @@ function addField(frame, data) {
35151
35151
  const fields = this._template.elementConnection.templateElements;
35152
35152
  this._template = { ...this._template, elementConnection: { ...this._template.elementConnection, templateElements: [...fields, data] } };
35153
35153
  const assignee = this.mode === 'compose' ? this._recipients?.find(r => r.signerIndex === data.signer) : this._template.roles.find(r => r.signerIndex === data.signer);
35154
+ console.log(assignee?.previousRecipientDecides);
35154
35155
  const node = document.createElement('ls-editor-field');
35155
35156
  node.setAttribute('type', data.formElementType);
35156
35157
  node.setAttribute('id', 'ls-field-' + data.id);
35157
- node.setAttribute('assignee', this.mode === 'compose' ? `${assignee?.firstName} ${assignee?.lastName}` : assignee?.name || `Participant ${data.signer}`);
35158
+ node.setAttribute('assignee', this.mode === 'compose' && assignee?.previousRecipientDecides
35159
+ ? 'To Be Decided'
35160
+ : this.mode === 'compose'
35161
+ ? `${assignee?.firstName} ${assignee?.lastName}`
35162
+ : assignee?.name || `Participant ${data.signer}`);
35158
35163
  node.setAttribute('zoom', String(this.zoom));
35159
35164
  // node.setAttribute('selected', 'selected');
35160
35165
  node.style.zIndex = '100';
@@ -40243,7 +40248,7 @@ const getGroupData = (id) => {
40243
40248
  `;
40244
40249
  };
40245
40250
 
40246
- const lsDocumentViewerCss = () => `*,*::before,*::after{box-sizing:border-box}*{margin:0}@media (prefers-reduced-motion: no-preference){html{interpolate-size:allow-keywords}}body{line-height:1.5;-webkit-font-smoothing:antialiased}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word}p{text-wrap:pretty}h1,h2,h3,h4,h5,h6{text-wrap:balance}#root,#__next{isolation:isolate}:host{display:flex;flex-direction:row;width:100vw;height:100vh;margin:0px;padding:0px}.left-slot-wrapper{position:fixed;top:0.375rem;left:0.675rem;z-index:2000}slot{justify-content:center;align-items:center;border-radius:1rem;font-size:0.75rem;font-style:normal;font-weight:500;line-height:1.25rem;width:fit-content;background-color:var(--green-30, #9df5d4);color:var(--green-100, #125241)}.right-slot-wrapper{position:fixed;top:0.375rem;right:0.675rem;z-index:2000}.validation-tag-wrapper{position:fixed;top:0.375rem;right:0.375rem;z-index:2000}#my-field-panel{position:relative;height:calc(100% - 4.313rem)}.leftBox{position:relative;border-radius:1rem;border:1px solid var(--gray-30, #edeff2);background:var(--white, #fff);box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);width:21.25rem;margin:1rem;min-width:21.25rem;max-height:100%;z-index:1000;left:0;top:0}.left-box-inner{position:relative;display:flex;height:100%;padding:0.75rem;gap:0.75rem}.rightBox{border:1px gray solid;width:29.375rem;min-width:24.375rem;padding:0.25rem;font-family:inherit}.toolbox{display:flex;flex-direction:column;width:100%;height:100%;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--gray-10, #f7f8fa);padding:0.75rem;gap:1rem;overflow-y:auto}.compose-toolbox{display:flex;flex-direction:column;width:100%;height:100%;overflow:none;border-radius:0;border:none;background:white;padding:0.25rem}.custom-loader-slot{position:absolute;top:0;left:0;height:100%;width:100%;z-index:3999}.recipients-box{position:relative;display:flex;flex-direction:column;gap:0.75rem;overflow-y:auto;width:calc(100% + 0.25rem);padding:0.75rem 0.25rem 0.25rem 0.25rem;height:100%}.scroll-gradient-top{position:absolute;top:5.9375rem;left:0;width:100%;height:1rem;background:linear-gradient(to bottom, white, rgba(255, 255, 255, 0));pointer-events:none;z-index:100}.scroll-gradient-bottom{position:absolute;bottom:1rem;left:0.75rem;width:calc(100% - 1.5rem);height:1rem;background:linear-gradient(to top, white, rgba(255, 255, 255, 0));pointer-events:none;z-index:100}.ls-editor-infobox{padding:0.125rem 0.5rem 0.125rem 0.5rem}#pdf-canvas{top:0px;left:0px;width:6.25rem;height:6.25rem;box-shadow:0 0.5rem 2rem 0 rgba(0, 0, 0, 0.12)}#ls-mid-area{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;width:100vw;height:100%}.document-frame-wrapper{display:flex;flex-direction:column;justify-content:start;align-items:start;overflow:visible;max-height:100%;width:100vw;overflow:scroll;padding:5rem 23.75rem 2rem 23.75rem}#ls-document-frame{position:relative;height:98vh;margin-right:auto;margin-left:auto}.prevButton{position:relative;bottom:1.875rem}.nextButton{position:relative;bottom:1.875rem}.fieldBox{z-index:1000}#ls-box-selector{position:absolute;visibility:hidden;background-color:transparent;border:1px rgba(71, 71, 71, 0.716) dashed}#ls-editor-form{display:flex;width:100vw;height:calc(100vh - 2.25rem);position:relative;background:var(--gray-10, #f7f8fa);box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.04) inset, 0 10px 15px 0 rgba(0, 0, 0, 0.04) inset}.hidden{visibility:hidden;display:none;width:0px}.toolbox-section-title{color:var(--gray-100, #45484d);font-size:1.125rem;font-style:normal;font-weight:500;line-height:1.75rem;}.toolbox-section-description{color:var(--gray-80, #5e6066);font-size:0.75rem;font-style:normal;font-weight:400;line-height:1rem}.fields-box{display:flex;flex-direction:column;gap:0.75rem}.page-header{display:flex;height:2.25rem;gap:0.5rem;padding:0.25rem 0.75rem;justify-content:center;align-items:center}.header-text-1{color:var(--gray-100, #45484d);font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem}.header-text-2{color:var(--gray-100, #45484d);font-size:0.875rem;font-style:normal;font-weight:400;line-height:1.25rem}.properties-header{display:flex;padding:1rem;gap:0.75rem;align-items:center;border-bottom:1px solid var(--gray-20, #edeff2)}.properties-header-title{color:var(--gray-100, #45484d);width:100%;font-size:1.5rem;font-style:normal;font-weight:500;line-height:2rem;}.properties-header-icon{display:flex;padding:0.5rem;border-radius:0.625rem;background:var(--primary-10, #eff4ff);color:var(--primary-60, #4456f6)}.expand-fields-row{display:flex;align-items:center;gap:0.5rem;padding:0.5rem;cursor:pointer;color:var(--gray-80, #6c6e73);font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem;}.expand-fields-row p{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem;}p{color:var(--gray-80, #6c6e73);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)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:2.25rem}.input-wrapper{position:relative;width:fit-content}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}.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.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}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'].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'].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'].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}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.field-properties-outer{position:relative;height:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}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.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}`;
40251
+ const lsDocumentViewerCss = () => `*,*::before,*::after{box-sizing:border-box}*{margin:0}@media (prefers-reduced-motion: no-preference){html{interpolate-size:allow-keywords}}body{line-height:1.5;-webkit-font-smoothing:antialiased}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word}p{text-wrap:pretty}h1,h2,h3,h4,h5,h6{text-wrap:balance}#root,#__next{isolation:isolate}:host{display:flex;flex-direction:row;width:100vw;height:100vh;margin:0px;padding:0px}.left-slot-wrapper{position:fixed;top:0.375rem;left:0.675rem;z-index:2000}slot{justify-content:center;align-items:center;border-radius:1rem;font-size:0.75rem;font-style:normal;font-weight:500;line-height:1.25rem;width:fit-content;background-color:var(--green-30, #9df5d4);color:var(--green-100, #125241)}.right-slot-wrapper{position:fixed;top:0.375rem;right:0.675rem;z-index:2000}.validation-tag-wrapper{position:fixed;top:0.375rem;right:0.375rem;z-index:2000}#my-field-panel{position:relative;height:calc(100% - 4.313rem)}.leftBox{position:relative;border-radius:1rem;border:1px solid var(--gray-30, #edeff2);background:var(--white, #fff);box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);width:21.25rem;margin:1rem;min-width:21.25rem;max-height:100%;z-index:1000;left:0;top:0}.left-box-inner{position:relative;display:flex;height:100%;padding:0.75rem;gap:0.75rem}.rightBox{border:1px gray solid;width:29.375rem;min-width:24.375rem;padding:0.25rem;font-family:inherit}.toolbox{display:flex;flex-direction:column;width:100%;height:100%;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--gray-10, #f7f8fa);padding:0.75rem;gap:1rem;overflow-y:auto}.compose-toolbox{display:flex;flex-direction:column;width:100%;height:100%;overflow:none;border-radius:0;border:none;background:white;padding:0.25rem}.custom-loader-slot{position:absolute;top:0;left:0;height:100%;width:100%;z-index:3999}.recipients-box{position:relative;display:flex;flex-direction:column;gap:0.75rem;overflow-y:auto;padding:0.75rem 0.25rem 0.25rem 0.25rem;height:100%}.scroll-gradient-top{position:absolute;top:5.9375rem;left:0;width:100%;height:1rem;background:linear-gradient(to bottom, white, rgba(255, 255, 255, 0));pointer-events:none;z-index:100}.scroll-gradient-bottom{position:absolute;bottom:1rem;left:0.75rem;width:calc(100% - 1.5rem);height:1rem;background:linear-gradient(to top, white, rgba(255, 255, 255, 0));pointer-events:none;z-index:100}.ls-editor-infobox{padding:0.125rem 0.5rem 0.125rem 0.5rem}#pdf-canvas{top:0px;left:0px;width:6.25rem;height:6.25rem;box-shadow:0 0.5rem 2rem 0 rgba(0, 0, 0, 0.12)}#ls-mid-area{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;width:100vw;height:100%}.document-frame-wrapper{display:flex;flex-direction:column;justify-content:start;align-items:start;overflow:visible;max-height:100%;width:100vw;overflow:scroll;padding:5rem 23.75rem 2rem 23.75rem}#ls-document-frame{position:relative;height:98vh;margin-right:auto;margin-left:auto}.prevButton{position:relative;bottom:1.875rem}.nextButton{position:relative;bottom:1.875rem}.fieldBox{z-index:1000}#ls-box-selector{position:absolute;visibility:hidden;background-color:transparent;border:1px rgba(71, 71, 71, 0.716) dashed}#ls-editor-form{display:flex;width:100vw;height:calc(100vh - 2.25rem);position:relative;background:var(--gray-10, #f7f8fa);box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.04) inset, 0 10px 15px 0 rgba(0, 0, 0, 0.04) inset}.hidden{visibility:hidden;display:none;width:0px}.toolbox-section-title{color:var(--gray-100, #45484d);font-size:1.125rem;font-style:normal;font-weight:500;line-height:1.75rem;}.toolbox-section-description{color:var(--gray-80, #5e6066);font-size:0.75rem;font-style:normal;font-weight:400;line-height:1rem}.fields-box{display:flex;flex-direction:column;gap:0.75rem}.page-header{display:flex;height:2.25rem;gap:0.5rem;padding:0.25rem 0.75rem;justify-content:center;align-items:center}.header-text-1{color:var(--gray-100, #45484d);font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem}.header-text-2{color:var(--gray-100, #45484d);font-size:0.875rem;font-style:normal;font-weight:400;line-height:1.25rem}.properties-header{display:flex;padding:1rem;gap:0.75rem;align-items:center;border-bottom:1px solid var(--gray-20, #edeff2)}.properties-header-title{color:var(--gray-100, #45484d);width:100%;font-size:1.5rem;font-style:normal;font-weight:500;line-height:2rem;}.properties-header-icon{display:flex;padding:0.5rem;border-radius:0.625rem;background:var(--primary-10, #eff4ff);color:var(--primary-60, #4456f6)}.expand-fields-row{display:flex;align-items:center;gap:0.5rem;padding:0.5rem;cursor:pointer;color:var(--gray-80, #6c6e73);font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem;}.expand-fields-row p{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem;}p{color:var(--gray-80, #6c6e73);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)}.button-link,.button-link:hover{all:unset}select{appearance:none;height:2.25rem}.input-wrapper{position:relative;width:fit-content}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6c6e73)}.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.5rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #fff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #fff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}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'].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'].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'].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}.checkbox-container{display:flex;gap:0.5rem;width:100%}.checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.field-properties-outer{position:relative;height:100%}.loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #0c7cba)}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.tertiaryGrey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #787a80)}button.tertiaryGrey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.button-group{display:flex;border-radius:0.5rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6c6e73)}.button-group button:hover{background:var(--gray-10, #f7f8fa)}.button-group>:first-child{border-radius:0.5rem 0 0 0.5rem}.button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}`;
40247
40252
 
40248
40253
  GlobalWorkerOptions.workerSrc = `https://unpkg.com/pdfjs-dist@5.4.449/build/pdf.worker.min.mjs`;
40249
40254
  const LsDocumentViewer = class {
@@ -40750,6 +40755,14 @@ const LsDocumentViewer = class {
40750
40755
  const fields = this.component.shadowRoot.querySelectorAll('ls-editor-field');
40751
40756
  Array.from(fields).forEach(fx => {
40752
40757
  fx.className = fx.dataItem.page === page ? '' : 'hidden';
40758
+ // Find assignee for this field
40759
+ const data = fx.dataItem;
40760
+ const assignee = this.mode === 'compose' ? this._recipients?.find(r => r.signerIndex === data.signer) : this._template.roles.find(r => r.signerIndex === data.signer);
40761
+ fx.setAttribute('assignee', this.mode === 'compose' && assignee?.previousRecipientDecides === true
40762
+ ? 'To Be Decided'
40763
+ : this.mode === 'compose'
40764
+ ? `${assignee?.firstName} ${assignee?.lastName}`
40765
+ : assignee?.name || `Participant ${data.signer}`);
40753
40766
  });
40754
40767
  }
40755
40768
  async load() {
@@ -40782,9 +40795,11 @@ const LsDocumentViewer = class {
40782
40795
  this._recipients.filter(r => r.roleType === "APPROVER").forEach(rec => {
40783
40796
  const role = this._template.roles.find(ro => ro.signerIndex === rec.signerIndex);
40784
40797
  if (!role) {
40785
- this.addParticipant.emit({ signerIndex: rec?.signerIndex,
40798
+ this.addParticipant.emit({
40799
+ signerIndex: rec?.signerIndex,
40786
40800
  name: 'APPROVER' + rec?.signerIndex,
40787
- type: 'APPROVER' });
40801
+ type: 'APPROVER'
40802
+ });
40788
40803
  }
40789
40804
  else if (rec.signerIndex === 1 && rec.roleType !== role.roleType) {
40790
40805
  this.mutate.emit([{
@@ -40840,7 +40855,7 @@ const LsDocumentViewer = class {
40840
40855
  return false;
40841
40856
  }
40842
40857
  render() {
40843
- return (index.h(index.Host, { key: 'e5b0cf1ba0e6f734a51b7c1bc83439a8ad90e592' }, index.h(index.h.Fragment, null, this.isLoading && (index.h(index.h.Fragment, null, index.h("ls-page-loader", { key: 'ae184812dda575e68ea12e241cbcab26eab6d09d' }), index.h("div", { key: '374fe0b12a79cc7869b2e63dd6a84e6bf3108673', class: 'custom-loader-slot' }, index.h("slot", { key: 'bc24c6b59f435fe66f0e606122d41b955b0d1c06', name: 'custom-loader' })), this.mode === 'compose' && index.h("ls-compose-loader", { key: '2d23f479e6ad88474ca10b37699b4864a6ce4ae4' }))), index.h("div", { key: '985e37c5355b745307f651d6c7c6b41f22ff337c', class: "page-header" }, index.h("div", { key: '2180103b3737d74cf8eb7c045f833294cd17aa54', class: 'left-slot-wrapper' }, index.h("slot", { key: '79a9a71e46f356ed0aafa565b23764062110edc5', name: "left-button" })), index.h("div", { key: '887de88e7a1deec3cb1589c255a55a6fc0ffe58d', class: 'right-slot-wrapper' }, index.h("slot", { key: '858e1f501922264f68f4980f0aeed107416b0228', name: "right-button" })), this.mode === 'editor' && (index.h("div", { key: '0cb7530ed3029cd219b3fba95356971dce779e17' }, index.h("span", { key: '72a153564c8619ba01005fd8847cbc70c7bd298b', class: "header-text-1" }, "Template Creation"), index.h("span", { key: 'd072dd42be33cdabae5c58f5e443f51c23dd4f7a' }, "/"), index.h("span", { key: 'de82446816c8abd5e81ee8d539268d657f7b378f', class: "header-text-2" }, this._template?.title))), this.mode === 'compose' && (index.h("div", { key: '7abffa975ad8f0915a19a719b4d6bec9aad0cb49', style: { display: 'flex', alignItems: 'center', gap: '0.25rem' } }, index.h("slot", { key: '142bc2fc33580144aedf097c2a493aa3e6878c6c', name: "top-bar" })))), this.mode === 'editor' && (index.h("div", { key: '6ef5aa4da478b9c4e751a3695347dbc64eda8f51', class: 'validation-tag-wrapper' }, index.h("ls-validation-tag", { key: '2d12722f016490cc7abb7d4c46c77b71107b0305', validationErrors: this.validationErrors }))), index.h("form", { key: 'dbc5e2c3ff35eb381bc197da2d2de30cc9147a24', id: "ls-editor-form" }, this.mode !== 'preview' ? (index.h("div", { id: "ls-left-box", class: "leftBox", style: this.mode === 'compose' ? { borderRadius: '1.75rem' } : {} }, index.h("div", { class: !this.selected || this.selected.length === 0 ? 'left-box-inner' : 'hidden' }, this.mode === 'editor' && (index.h("ls-feature-column", { mode: this.mode, onManage: manager => {
40858
+ return (index.h(index.Host, { key: '5a7f46f97ccf2d168991777b88903add683e6156' }, index.h(index.h.Fragment, null, this.isLoading && (index.h(index.h.Fragment, null, index.h("ls-page-loader", { key: '03f44a690d1f06d7f8818f5726186cd5c36c789e' }), index.h("div", { key: '0f302567c499dba8cebf11f9cb01353c2bd86b3a', class: 'custom-loader-slot' }, index.h("slot", { key: '63cf0ef25d003b13e3604855e61d6c4fb87ea1ad', name: 'custom-loader' })), this.mode === 'compose' && index.h("ls-compose-loader", { key: '0f6fe3033d4d91795caf510fb7bab8d1a30ce489' }))), index.h("div", { key: '2a23a6c07bea2c4309b2ba2fcdd6d160352a1e95', class: "page-header" }, index.h("div", { key: '1d7b47f806a16f668f0726f38900f6b17afc08a9', class: 'left-slot-wrapper' }, index.h("slot", { key: 'e84118b669a542382a3a4e812e1fdfea30c4ebdd', name: "left-button" })), index.h("div", { key: 'c70fa424837f072583292904a31a17394ecaad29', class: 'right-slot-wrapper' }, index.h("slot", { key: '9bf959d0eabd2091e20905fa683b9d16fe3d8018', name: "right-button" })), this.mode === 'editor' && (index.h("div", { key: '8877b7eb2a2b9386c4fb7a433be59f3f946d2762' }, index.h("span", { key: 'a289a7f9a433f0873103dc6365b022a435abf300', class: "header-text-1" }, "Template Creation"), index.h("span", { key: 'd5daf8d0496965d7ee85d0523ac6f7f78e82fdc5' }, "/"), index.h("span", { key: 'b5d6359c86dc483c442e7934079c0526c2cfb0c3', class: "header-text-2" }, this._template?.title))), this.mode === 'compose' && (index.h("div", { key: 'cdc6b0e70181e1a16d4c32daad58de26f863627b', style: { display: 'flex', alignItems: 'center', gap: '0.25rem' } }, index.h("slot", { key: 'dd68d84257107959670f779fc543d92cc9fe0f54', name: "top-bar" })))), this.mode === 'editor' && (index.h("div", { key: '262a027c605a9dc4ebce40b16d1717b5d59e9d95', class: 'validation-tag-wrapper' }, index.h("ls-validation-tag", { key: 'f7efcc0edc0d4907ce679258e26d5f7470ee785f', validationErrors: this.validationErrors }))), index.h("form", { key: '22b5a8fb70ecaa74e1d7802ebe807b773a9daf84', id: "ls-editor-form" }, this.mode !== 'preview' ? (index.h("div", { id: "ls-left-box", class: "leftBox", style: this.mode === 'compose' ? { borderRadius: '1.75rem' } : {} }, index.h("div", { class: !this.selected || this.selected.length === 0 ? 'left-box-inner' : 'hidden' }, this.mode === 'editor' && (index.h("ls-feature-column", { mode: this.mode, onManage: manager => {
40844
40859
  if (manager.detail === 'document') {
40845
40860
  var documentManager = this.component.shadowRoot.getElementById('ls-document-options');
40846
40861
  documentManager.template = this._template;
@@ -40854,11 +40869,11 @@ const LsDocumentViewer = class {
40854
40869
  validationManager.validationErrors = this.validationErrors;
40855
40870
  }
40856
40871
  this.manager = manager.detail;
40857
- } })), index.h("div", { id: "ls-toolbox", class: this.manager === 'toolbox' ? 'toolbox' : 'hidden' }, index.h("div", { class: "ls-editor-infobox" }, index.h("h2", { class: "toolbox-section-title" }, "Fields"), index.h("p", { class: "toolbox-section-description" }, "Drag and drop, or select and double click, to place fields on the Document.")), index.h("div", { class: "fields-box" }, (this.signer > 0 && this.showTool('signature') && !this.checkType('APPROVER')) && (index.h("ls-toolbox-field", { elementType: "signature", formElementType: "signature", label: "Signature", defaultHeight: 25, defaultWidth: 97, validation: 0, icon: "signature", tooltip: "Use this field to collect Signatures from Participants", signer: this.signer })), this.signer === 0 && this.showTool('auto sign') && (index.h("ls-toolbox-field", { elementType: "auto sign", formElementType: "auto sign", label: "Auto Sign", defaultHeight: 25, defaultWidth: 97, validation: 3000, icon: "auto-sign", tooltip: "Auto-Sign lets Senders add a Signature to the Document that will be automatically applied upon Sending", signer: this.signer })), this.showTool('text') && (index.h("ls-toolbox-field", { elementType: "text", formElementType: "text", label: "Text", defaultHeight: 16, defaultWidth: 150, validation: 0, icon: "text", tooltip: "A field for collecting any plain text values such as: names, addresses or descriptions", signer: this.signer })), this.signer > 0 && this.showTool('signing date') && (index.h("ls-toolbox-field", { elementType: "signing date", formElementType: "signing date", label: "Signing Date", defaultHeight: 16, defaultWidth: 100, validation: 30, icon: "auto-date", tooltip: "Automatically inserts the date upon completion by the assigned Participant", signer: this.signer })), this.showTool('date') && (index.h("ls-toolbox-field", { elementType: "date", formElementType: "date", label: "Date", defaultHeight: 16, defaultWidth: 100, validation: 2, icon: "calender", tooltip: "A field for collecting dates with built-in date formatting options", signer: this.signer })), this.showTool('email') && (index.h("ls-toolbox-field", { elementType: "email", formElementType: "email", label: "Email", defaultHeight: 16, defaultWidth: 150, validation: 1, icon: "at-symbol", tooltip: "A Field to only accept entries formatted as an email address (e.g., example@example.com)", signer: this.signer })), this.showTool('initials') && (index.h("ls-toolbox-field", { elementType: "initials", formElementType: "initials", label: "Initials", defaultHeight: 25, defaultWidth: 70, validation: 2000, icon: "initials", tooltip: "Use this field anywhere Participants are required to Initial your document", signer: this.signer })), this.showTool('number') && (index.h("ls-toolbox-field", { elementType: "number", formElementType: "number", label: "Number", defaultHeight: 16, defaultWidth: 150, validation: 50, icon: "hashtag", tooltip: "A Field to only accept entries in numerical format. Additional validations include character limit (1 to 12 digits), and currency format (2 decimal places)", signer: this.signer })), this.showTool('dropdown') && (index.h("ls-toolbox-field", { elementType: "dropdown", formElementType: "dropdown", label: "Dropdown", defaultHeight: 16, defaultWidth: 100, validation: 20, icon: "dropdown", tooltip: "Use this field to create custom dropdown menus in your document, or place one of our handy presets for countries or prefixes", signer: this.signer })), this.showTool('checkbox') && (index.h("ls-toolbox-field", { elementType: "checkbox", formElementType: "checkbox", label: "Checkbox", defaultHeight: 16, defaultWidth: 16, validation: 25, icon: "check", tooltip: "Places a checkbox on your document. Handy for T&Cs or \u2714/\u2717 sections", signer: this.signer })), this.signer > 0 && this.showTool('regex') && (index.h("ls-toolbox-field", { elementType: "regex", formElementType: "regex", label: "Regex", defaultHeight: 16, defaultWidth: 150, validation: 93, icon: "code", tooltip: "Need a specific validation? Use this field to enter a custom RegEx and have Participants enter exactly what you need", signer: this.signer })), this.signer > 0 && this.showTool('image') && (index.h("ls-toolbox-field", { elementType: "image", formElementType: "image", label: "Image", defaultHeight: 16, defaultWidth: 100, validation: 90, icon: "photograph", tooltip: "Use when you need Participants to upload their own images during the signing process", signer: this.signer })), this.signer > 0 && this.showTool('file') && (index.h("ls-toolbox-field", { elementType: "file", formElementType: "file", label: "File", defaultHeight: 16, defaultWidth: 100, validation: 74, icon: "upload", tooltip: "Use when you need Participants to upload their own documents during the signing process", signer: this.signer })), this.signer > 0 && this.showTool('drawn') && (index.h("ls-toolbox-field", { elementType: "drawn", formElementType: "drawn", label: "Drawn", defaultHeight: 120, defaultWidth: 120, validation: 90, icon: "pencil", tooltip: "Allow users to draw on the document using their mouse or touchscreen", signer: this.signer })))), index.h("ls-participant-manager", { id: "ls-participant-manager", class: this.manager === 'participant' ? 'toolbox' : 'hidden', editor: this }), index.h("ls-document-options", { id: "ls-document-options", class: this.manager === 'document' ? 'toolbox' : 'hidden' }), index.h("ls-validation-manager", { id: "ls-validation-manager", class: this.manager === 'validation' ? 'toolbox' : 'hidden' }), index.h("ls-recipient-manager", { id: "ls-recipient-manager", class: this.manager === 'recipient' ? 'compose-toolbox' : 'hidden' }, index.h("div", { class: 'scroll-gradient-top' }), index.h("div", { class: 'scroll-gradient-bottom' }), index.h("ls-validation-tag", { validationErrors: this.validationErrors, style: { position: 'absolute', top: '1.125rem', right: '1rem' }, type: "compose" }), index.h("div", { class: 'recipients-box' }, this._recipients &&
40872
+ } })), index.h("div", { id: "ls-toolbox", class: this.manager === 'toolbox' ? 'toolbox' : 'hidden' }, index.h("div", { class: "ls-editor-infobox" }, index.h("h2", { class: "toolbox-section-title" }, "Fields"), index.h("p", { class: "toolbox-section-description" }, "Drag and drop, or select and double click, to place fields on the Document.")), index.h("div", { class: "fields-box" }, (this.signer > 0 && this.showTool('signature') && !this.checkType('APPROVER')) && (index.h("ls-toolbox-field", { elementType: "signature", formElementType: "signature", label: "Signature", defaultHeight: 25, defaultWidth: 97, validation: 0, icon: "signature", tooltip: "Use this field to collect Signatures from Participants", signer: this.signer })), this.signer === 0 && this.showTool('auto sign') && (index.h("ls-toolbox-field", { elementType: "admin", formElementType: "auto sign", label: "Auto Sign", defaultHeight: 25, defaultWidth: 97, validation: 3000, icon: "auto-sign", tooltip: "Auto-Sign lets Senders add a Signature to the Document that will be automatically applied upon Sending", signer: this.signer })), this.showTool('text') && (index.h("ls-toolbox-field", { elementType: "text", formElementType: "text", label: "Text", defaultHeight: 16, defaultWidth: 150, validation: 0, icon: "text", tooltip: "A field for collecting any plain text values such as: names, addresses or descriptions", signer: this.signer })), this.signer > 0 && this.showTool('signing date') && (index.h("ls-toolbox-field", { elementType: "text", formElementType: "text", label: "Signing Date", defaultHeight: 16, defaultWidth: 100, validation: 30, icon: "auto-date", tooltip: "Automatically inserts the date upon completion by the assigned Participant", signer: this.signer })), this.showTool('date') && (index.h("ls-toolbox-field", { elementType: "text", formElementType: "date", label: "Date", defaultHeight: 16, defaultWidth: 100, validation: 2, icon: "calender", tooltip: "A field for collecting dates with built-in date formatting options", signer: this.signer })), this.showTool('email') && (index.h("ls-toolbox-field", { elementType: "text", formElementType: "email", label: "Email", defaultHeight: 16, defaultWidth: 150, validation: 1, icon: "at-symbol", tooltip: "A Field to only accept entries formatted as an email address (e.g., example@example.com)", signer: this.signer })), this.showTool('initials') && (index.h("ls-toolbox-field", { elementType: "initials", formElementType: "initials", label: "Initials", defaultHeight: 25, defaultWidth: 70, validation: 2000, icon: "initials", tooltip: "Use this field anywhere Participants are required to Initial your document", signer: this.signer })), this.showTool('number') && (index.h("ls-toolbox-field", { elementType: "text", formElementType: "number", label: "Number", defaultHeight: 16, defaultWidth: 150, validation: 50, icon: "hashtag", tooltip: "A Field to only accept entries in numerical format. Additional validations include character limit (1 to 12 digits), and currency format (2 decimal places)", signer: this.signer })), this.showTool('dropdown') && (index.h("ls-toolbox-field", { elementType: "text", formElementType: "dropdown", label: "Dropdown", defaultHeight: 16, defaultWidth: 100, validation: 20, icon: "dropdown", tooltip: "Use this field to create custom dropdown menus in your document, or place one of our handy presets for countries or prefixes", signer: this.signer })), this.showTool('checkbox') && (index.h("ls-toolbox-field", { elementType: "text", formElementType: "checkbox", label: "Checkbox", defaultHeight: 16, defaultWidth: 16, validation: 25, icon: "check", tooltip: "Places a checkbox on your document. Handy for T&Cs or \u2714/\u2717 sections", signer: this.signer })), this.signer > 0 && this.showTool('regex') && (index.h("ls-toolbox-field", { elementType: "text", formElementType: "regex", label: "Regex", defaultHeight: 16, defaultWidth: 150, validation: 93, icon: "code", tooltip: "Need a specific validation? Use this field to enter a custom RegEx and have Participants enter exactly what you need", signer: this.signer })), this.signer > 0 && this.showTool('image') && (index.h("ls-toolbox-field", { elementType: "text", formElementType: "image", label: "Image", defaultHeight: 16, defaultWidth: 100, validation: 90, icon: "photograph", tooltip: "Use when you need Participants to upload their own images during the signing process", signer: this.signer })), this.signer > 0 && this.showTool('file') && (index.h("ls-toolbox-field", { elementType: "text", formElementType: "file", label: "File", defaultHeight: 16, defaultWidth: 100, validation: 74, icon: "upload", tooltip: "Use when you need Participants to upload their own documents during the signing process", signer: this.signer })), this.signer > 0 && this.showTool('drawn') && (index.h("ls-toolbox-field", { elementType: "text", formElementType: "drawn", label: "Drawn", defaultHeight: 120, defaultWidth: 120, validation: 90, icon: "pencil", tooltip: "Allow users to draw on the document using their mouse or touchscreen", signer: this.signer })))), index.h("ls-participant-manager", { id: "ls-participant-manager", class: this.manager === 'participant' ? 'toolbox' : 'hidden', editor: this }), index.h("ls-document-options", { id: "ls-document-options", class: this.manager === 'document' ? 'toolbox' : 'hidden' }), index.h("ls-validation-manager", { id: "ls-validation-manager", class: this.manager === 'validation' ? 'toolbox' : 'hidden' }), index.h("ls-recipient-manager", { id: "ls-recipient-manager", class: this.manager === 'recipient' ? 'compose-toolbox' : 'hidden' }, index.h("div", { class: 'scroll-gradient-top' }), index.h("div", { class: 'scroll-gradient-bottom' }), index.h("ls-validation-tag", { validationErrors: this.validationErrors, style: { position: 'absolute', top: '1.125rem', right: '1rem' }, type: "compose" }), index.h("div", { class: 'recipients-box' }, this._recipients &&
40858
40873
  this._recipients.map(recipient => (index.h("ls-recipient-card", { recipient: recipient, activeRecipient: this.signer, filtertoolbox: this.filtertoolbox, template: this._template, validationErrors: this.validationErrors, fieldTypeSelected: this.fieldTypeSelected, "data-signer-index": recipient.signerIndex })))), index.h("slot", { name: "recipient-panel" }))), !this.displayTable && (index.h("div", { class: this.selected.length > 0 ? 'field-properties-outer' : 'hidden' }, index.h("div", { class: 'properties-header' }, index.h("div", { class: 'properties-header-icon' }, index.h("ls-icon", { name: "pre-filled-content" })), index.h("h1", { class: 'properties-header-title' }, "Field Properties"), index.h("button", { class: 'tertiaryGrey', onClick: e => {
40859
40874
  this.selected = [];
40860
40875
  e.preventDefault();
40861
- }, "data-tooltip": "Close Properties Panel" }, index.h("ls-icon", { name: "x", size: "1.25rem" }))), index.h("ls-field-properties", { id: "my-field-panel" }))))) : (index.h(index.h.Fragment, null)), index.h("ls-toolbar", { key: 'a698773d40b37d5d5b576013f5005733a4acad8c', id: "ls-toolbar", template: this._template, editor: this, groupInfo: this.groupInfo, mode: this.mode }), index.h("div", { key: '0345f02f67b0a9c8d95f007ea7f6d3edaed526b0', id: "ls-mid-area" }, index.h("div", { key: 'db794e1a9e7a3ee74416a2ad9891e9d336043dfd', class: 'document-frame-wrapper', id: "document-frame-wrapper" }, index.h("div", { key: '1241cce8fdba6561cec037baa4587352e083f364', id: "ls-document-frame" }, index.h("canvas", { key: 'a3acba3b2a475b6d33db907c436d7e8a85a9baa0', id: "pdf-canvas", class: this.displayTable || this.isLoading ? 'hidden' : '' }), index.h("ls-editor-table", { key: '18ad8bd5c587a299ca2ea46c3ecbf1b4734b4f0c', editor: this, class: this.displayTable ? '' : 'hidden' }), index.h("div", { key: 'b3bdd192e4520962cc4e6a766233ad792650ea6f', id: "ls-box-selector" }))), index.h("ls-statusbar", { key: '47c7193cd4ad269244f6e77f817c1d6f47c21ecb', editor: this, page: this.pageNum, pageCount: this.pageCount })))), index.h("ls-tooltip", { key: '42a41d5f3edce48244af2c3c52f0ff141b346f5e', id: "ls-tooltip-master" })));
40876
+ }, "data-tooltip": "Close Properties Panel" }, index.h("ls-icon", { name: "x", size: "1.25rem" }))), index.h("ls-field-properties", { id: "my-field-panel" }))))) : (index.h(index.h.Fragment, null)), index.h("ls-toolbar", { key: '3256d6ba064a5b9d15acb0c6ac5c1c31d4017a55', id: "ls-toolbar", template: this._template, editor: this, groupInfo: this.groupInfo, mode: this.mode }), index.h("div", { key: '432d47703e6b5f8d4f05ce6a16c918456fb33deb', id: "ls-mid-area" }, index.h("div", { key: 'ec204f6b416e480a8648f90f064fc1d91180477a', class: 'document-frame-wrapper', id: "document-frame-wrapper" }, index.h("div", { key: '51b7cd971636062995f3e6c3288127fd20409561', id: "ls-document-frame" }, index.h("canvas", { key: 'b32228eb99f8a17024e2f33bfbbe7296a2327180', id: "pdf-canvas", class: this.displayTable || this.isLoading ? 'hidden' : '' }), index.h("ls-editor-table", { key: 'a83db6dc528998aff7dfc97eaec193d14da66df3', editor: this, class: this.displayTable ? '' : 'hidden' }), index.h("div", { key: '63ec7e6a855cd97b51dcbfe9af20990e5e923751', id: "ls-box-selector" }))), index.h("ls-statusbar", { key: '1ce77b06ca363b89c8e2e3975c0fced17fe2fd0b', editor: this, page: this.pageNum, pageCount: this.pageCount })))), index.h("ls-tooltip", { key: 'f6e90e6fc5678de6de24808861f7034304450b9c', id: "ls-tooltip-master" })));
40862
40877
  }
40863
40878
  static get watchers() { return {
40864
40879
  "mode": ["modeHandler"],
@@ -19,10 +19,15 @@ export function addField(frame, data) {
19
19
  const fields = this._template.elementConnection.templateElements;
20
20
  this._template = { ...this._template, elementConnection: { ...this._template.elementConnection, templateElements: [...fields, data] } };
21
21
  const assignee = this.mode === 'compose' ? this._recipients?.find(r => r.signerIndex === data.signer) : this._template.roles.find(r => r.signerIndex === data.signer);
22
+ console.log(assignee?.previousRecipientDecides);
22
23
  const node = document.createElement('ls-editor-field');
23
24
  node.setAttribute('type', data.formElementType);
24
25
  node.setAttribute('id', 'ls-field-' + data.id);
25
- node.setAttribute('assignee', this.mode === 'compose' ? `${assignee?.firstName} ${assignee?.lastName}` : assignee?.name || `Participant ${data.signer}`);
26
+ node.setAttribute('assignee', this.mode === 'compose' && assignee?.previousRecipientDecides
27
+ ? 'To Be Decided'
28
+ : this.mode === 'compose'
29
+ ? `${assignee?.firstName} ${assignee?.lastName}`
30
+ : assignee?.name || `Participant ${data.signer}`);
26
31
  node.setAttribute('zoom', String(this.zoom));
27
32
  // node.setAttribute('selected', 'selected');
28
33
  node.style.zIndex = '100';
@@ -1 +1 @@
1
- {"version":3,"file":"editorCalculator.js","sourceRoot":"","sources":["../../../src/components/ls-document-viewer/editorCalculator.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,MAA4C,EAAE,QAAqB,EA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,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC;IACvD,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC;IAExD,+FAA+F;IAC/F,OAAO;QACL,GAAG,CAAC;QACJ,EAAE;QACF,EAAE;QACF,EAAE;QACF,EAAE;KACH,CAAC;AACJ,CAAC,CAAC;AAEF,2CAA2C;AAC3C,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,CAAe,EAAW,EAAE;IAC9C,OAAO,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC;AAC5H,CAAC,CAAC","sourcesContent":["import { LSApiElement } from '../../types/LSApiElement';\n\nexport const findIn = (fields: NodeListOf<HTMLLsEditorFieldElement>, selector: HTMLElement, restyle: boolean = false, additive: boolean = false): HTMLLsEditorFieldElement[] => {\n const selected: HTMLLsEditorFieldElement[] = new Array();\n const { top, left, bottom, right } = selector.getBoundingClientRect();\n\n fields.forEach(f => {\n if (f.getBoundingClientRect().bottom <= bottom && f.getBoundingClientRect().top >= top && f.getBoundingClientRect().left >= left && f.getBoundingClientRect().right <= right) {\n if (restyle) f.selected = true;\n selected.push(f);\n } else {\n if (restyle && !additive) f.selected = false;\n }\n });\n return selected;\n};\n\n// Used to append new fields (dropped or loaded from template data)\nexport function addField(frame: HTMLElement, data): HTMLLsEditorFieldElement {\n const fields = this._template.elementConnection.templateElements;\n this._template = { ...this._template, elementConnection: { ...this._template.elementConnection, templateElements: [...fields, data] } };\n const assignee = this.mode === 'compose' ? this._recipients?.find(r => r.signerIndex === data.signer) : this._template.roles.find(r => r.signerIndex === data.signer);\n\n const node = document.createElement('ls-editor-field');\n node.setAttribute('type', data.formElementType);\n node.setAttribute('id', 'ls-field-' + data.id);\n node.setAttribute('assignee', this.mode === 'compose' ? `${assignee?.firstName} ${assignee?.lastName}` : assignee?.name || `Participant ${data.signer}`);\n node.setAttribute('zoom', String(this.zoom));\n // node.setAttribute('selected', 'selected');\n node.style.zIndex = '100';\n node.style.position = 'absolute';\n\n node.style.top = Math.floor(data.top * this.zoom) + 'px';\n node.style.left = Math.floor(data.left * this.zoom) + 'px';\n node.style.height = Math.floor(data.height * this.zoom) + 'px';\n node.style.width = Math.floor(data.width * this.zoom) + 'px';\n node.style.fontSize = Math.floor(data.fontSize * this.zoom) + 'pt';\n node.style.alignContent = data.align;\n node.style.fontFamily = data.fontName;\n node.dataItem = data;\n\n frame.appendChild(node);\n\n return node as any as HTMLLsEditorFieldElement;\n}\n\nexport function moveField(item: HTMLLsEditorFieldElement, data) {\n item.style.top = Math.floor(data.top * this.zoom) + 'px';\n item.style.left = Math.floor(data.left * this.zoom) + 'px';\n item.style.height = Math.floor(data.height * this.zoom) + 'px';\n item.style.width = Math.floor(data.width * this.zoom) + 'px';\n item.style.fontSize = Math.floor(data.fontSize * this.zoom) + 'pt';\n item.style.fontFamily = data.fontName;\n item.style.textAlign = data.align;\n item.dataItem = recalculateCoordinates(data);\n}\n\n// calculates html compatible coords at current zoom level\nexport const transformCoordinates = (\n sourceField: LSApiElement,\n inputFieldWidth: number,\n inputFieldHeight: number,\n viewerWidth: number,\n viewerHeight: number,\n left: number,\n top: number,\n fontName: string,\n fontSize: number,\n zoom: number,\n): LSApiElement => {\n // Returns X, Y coordinates\n const ax = left > 0 ? left / viewerWidth : 0;\n const ay = top > 0 ? top / viewerHeight : 0;\n const bx = (left + inputFieldWidth) / viewerWidth;\n const by = (top + inputFieldHeight) / viewerHeight;\n\n // Return with calculated styles that try to place it as it would appear on legacy signing page\n return {\n ...sourceField,\n ax,\n ay,\n bx,\n by,\n cstyle: {\n margin: 0,\n verticalAlign: 'top',\n boxSizing: 'content-box',\n fontSize: viewerWidth < 640 ? `${(fontSize / 24) * zoom}rem` : `${fontSize * zoom}px`,\n fontFamily: fontName || 'arial',\n width: `${(inputFieldWidth * bx - inputFieldWidth * ax) * zoom}px`, // app1 input has padding-x 3px\n height: `${inputFieldHeight * (by - ay) * zoom}px`, // app1 input has padding-y 2px\n // minHeight: `${inputFieldHeight * (BY - AY) * zoom - 2}px`,\n lineHeight: 'inherit',\n },\n divStyle: {\n position: 'absolute',\n top: `${inputFieldHeight * ay * zoom}px`,\n left: `${inputFieldWidth * ax * zoom}px`,\n width: `${(inputFieldWidth * bx - inputFieldWidth * ax) * zoom}px`,\n height: `${inputFieldHeight * (by - ay) * zoom}px`,\n zIndex: 1000,\n fontSize: viewerWidth < 640 ? `${(fontSize / 24) * zoom}rem` : `${fontSize * zoom}px`,\n },\n objectHeight: `${inputFieldHeight * (by - ay) * zoom}px`,\n };\n};\n\n// from a field element get all dimension data including LEGACY dimensions\nexport const findDimensions = (\n frameContainer: HTMLDivElement,\n sourceField: HTMLLsEditorFieldElement,\n pageHeight: number,\n pageWidth: number,\n zoom: number,\n): { top: number; left: number; height: number; width: number; ax: number; ay: number; bx: number; by: number } => {\n // Position of widget frame\n const frmDims = frameContainer.getBoundingClientRect();\n // dimensions relative to viewport\n const { height, width } = sourceField.getBoundingClientRect();\n const top = Math.floor((sourceField.getBoundingClientRect().top - frmDims.top) / zoom);\n const left = Math.floor((sourceField.getBoundingClientRect().left - frmDims.left) / zoom);\n\n // Returns X, Y coordinates\n const ax = left > 0 ? left / pageWidth : 0;\n const ay = top > 0 ? top / pageHeight : 0;\n const bx = (left + width / zoom) / pageWidth;\n const by = (top + height / zoom) / pageHeight;\n\n // Return with calculated styles that try to place it as it would appear on legacy signing page\n return {\n top,\n left,\n height: Math.round(height / zoom),\n width: Math.round(width / zoom),\n ax,\n ay,\n bx,\n by,\n };\n};\n\n// from a field element get all dimension data including LEGACY dimensions\nexport const recalculateCoordinates = (d: LSApiElement): LSApiElement => {\n // Returns X, Y coordinates\n const ax = d.left / d.pageDimensions.width;\n const ay = d.top / d.pageDimensions.height;\n const bx = (d.left + d.width) / d.pageDimensions.width;\n const by = (d.top + d.height) / d.pageDimensions.height;\n\n // Return with calculated styles that try to place it as it would appear on legacy signing page\n return {\n ...d,\n ax,\n ay,\n bx,\n by,\n };\n};\n\n// from a field determinse if out of bounds\nexport const oob = (d: LSApiElement): boolean => {\n return d.left < 0 || d.top < 0 || d.left + d.width > d.pageDimensions.width || d.top + d.height > d.pageDimensions.height;\n};\n"]}
1
+ {"version":3,"file":"editorCalculator.js","sourceRoot":"","sources":["../../../src/components/ls-document-viewer/editorCalculator.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,MAA4C,EAAE,QAAqB,EAAE,UAAmB,KAAK,EAAE,WAAoB,KAAK,EAA8B,EAAE;IAC7K,MAAM,QAAQ,GAA+B,IAAI,KAAK,EAAE,CAAC;IACzD,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC,qBAAqB,EAAE,CAAC;IAEtE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;QACjB,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC,MAAM,IAAI,MAAM,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC,KAAK,IAAI,KAAK,EAAE,CAAC;YAC7K,IAAI,OAAO;gBAAE,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC;YAC/B,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC;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CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC;AAC5H,CAAC,CAAC","sourcesContent":["import { LSApiElement } from '../../types/LSApiElement';\n\nexport const findIn = (fields: NodeListOf<HTMLLsEditorFieldElement>, selector: HTMLElement, restyle: boolean = false, additive: boolean = false): HTMLLsEditorFieldElement[] => {\n const selected: HTMLLsEditorFieldElement[] = new Array();\n const { top, left, bottom, right } = selector.getBoundingClientRect();\n\n fields.forEach(f => {\n if (f.getBoundingClientRect().bottom <= bottom && f.getBoundingClientRect().top >= top && f.getBoundingClientRect().left >= left && f.getBoundingClientRect().right <= right) {\n if (restyle) f.selected = true;\n selected.push(f);\n } else {\n if (restyle && !additive) f.selected = false;\n }\n });\n return selected;\n};\n\n// Used to append new fields (dropped or loaded from template data)\nexport function addField(frame: HTMLElement, data): HTMLLsEditorFieldElement {\n const fields = this._template.elementConnection.templateElements;\n this._template = { ...this._template, elementConnection: { ...this._template.elementConnection, templateElements: [...fields, data] } };\n const assignee = this.mode === 'compose' ? this._recipients?.find(r => r.signerIndex === data.signer) : this._template.roles.find(r => r.signerIndex === data.signer);\n console.log(assignee?.previousRecipientDecides);\n\n const node = document.createElement('ls-editor-field');\n node.setAttribute('type', data.formElementType);\n node.setAttribute('id', 'ls-field-' + data.id);\n node.setAttribute(\n 'assignee',\n this.mode === 'compose' && assignee?.previousRecipientDecides\n ? 'To Be Decided'\n : this.mode === 'compose'\n ? `${assignee?.firstName} ${assignee?.lastName}`\n : assignee?.name || `Participant ${data.signer}`,\n );\n node.setAttribute('zoom', String(this.zoom));\n // node.setAttribute('selected', 'selected');\n node.style.zIndex = '100';\n node.style.position = 'absolute';\n\n node.style.top = Math.floor(data.top * this.zoom) + 'px';\n node.style.left = Math.floor(data.left * this.zoom) + 'px';\n node.style.height = Math.floor(data.height * this.zoom) + 'px';\n node.style.width = Math.floor(data.width * this.zoom) + 'px';\n node.style.fontSize = Math.floor(data.fontSize * this.zoom) + 'pt';\n node.style.alignContent = data.align;\n node.style.fontFamily = data.fontName;\n node.dataItem = data;\n\n frame.appendChild(node);\n\n return node as any as HTMLLsEditorFieldElement;\n}\n\nexport function moveField(item: HTMLLsEditorFieldElement, data) {\n item.style.top = Math.floor(data.top * this.zoom) + 'px';\n item.style.left = Math.floor(data.left * this.zoom) + 'px';\n item.style.height = Math.floor(data.height * this.zoom) + 'px';\n item.style.width = Math.floor(data.width * this.zoom) + 'px';\n item.style.fontSize = Math.floor(data.fontSize * this.zoom) + 'pt';\n item.style.fontFamily = data.fontName;\n item.style.textAlign = data.align;\n item.dataItem = recalculateCoordinates(data);\n}\n\n// calculates html compatible coords at current zoom level\nexport const transformCoordinates = (\n sourceField: LSApiElement,\n inputFieldWidth: number,\n inputFieldHeight: number,\n viewerWidth: number,\n viewerHeight: number,\n left: number,\n top: number,\n fontName: string,\n fontSize: number,\n zoom: number,\n): LSApiElement => {\n // Returns X, Y coordinates\n const ax = left > 0 ? left / viewerWidth : 0;\n const ay = top > 0 ? top / viewerHeight : 0;\n const bx = (left + inputFieldWidth) / viewerWidth;\n const by = (top + inputFieldHeight) / viewerHeight;\n\n // Return with calculated styles that try to place it as it would appear on legacy signing page\n return {\n ...sourceField,\n ax,\n ay,\n bx,\n by,\n cstyle: {\n margin: 0,\n verticalAlign: 'top',\n boxSizing: 'content-box',\n fontSize: viewerWidth < 640 ? `${(fontSize / 24) * zoom}rem` : `${fontSize * zoom}px`,\n fontFamily: fontName || 'arial',\n width: `${(inputFieldWidth * bx - inputFieldWidth * ax) * zoom}px`, // app1 input has padding-x 3px\n height: `${inputFieldHeight * (by - ay) * zoom}px`, // app1 input has padding-y 2px\n // minHeight: `${inputFieldHeight * (BY - AY) * zoom - 2}px`,\n lineHeight: 'inherit',\n },\n divStyle: {\n position: 'absolute',\n top: `${inputFieldHeight * ay * zoom}px`,\n left: `${inputFieldWidth * ax * zoom}px`,\n width: `${(inputFieldWidth * bx - inputFieldWidth * ax) * zoom}px`,\n height: `${inputFieldHeight * (by - ay) * zoom}px`,\n zIndex: 1000,\n fontSize: viewerWidth < 640 ? `${(fontSize / 24) * zoom}rem` : `${fontSize * zoom}px`,\n },\n objectHeight: `${inputFieldHeight * (by - ay) * zoom}px`,\n };\n};\n\n// from a field element get all dimension data including LEGACY dimensions\nexport const findDimensions = (\n frameContainer: HTMLDivElement,\n sourceField: HTMLLsEditorFieldElement,\n pageHeight: number,\n pageWidth: number,\n zoom: number,\n): { top: number; left: number; height: number; width: number; ax: number; ay: number; bx: number; by: number } => {\n // Position of widget frame\n const frmDims = frameContainer.getBoundingClientRect();\n // dimensions relative to viewport\n const { height, width } = sourceField.getBoundingClientRect();\n const top = Math.floor((sourceField.getBoundingClientRect().top - frmDims.top) / zoom);\n const left = Math.floor((sourceField.getBoundingClientRect().left - frmDims.left) / zoom);\n\n // Returns X, Y coordinates\n const ax = left > 0 ? left / pageWidth : 0;\n const ay = top > 0 ? top / pageHeight : 0;\n const bx = (left + width / zoom) / pageWidth;\n const by = (top + height / zoom) / pageHeight;\n\n // Return with calculated styles that try to place it as it would appear on legacy signing page\n return {\n top,\n left,\n height: Math.round(height / zoom),\n width: Math.round(width / zoom),\n ax,\n ay,\n bx,\n by,\n };\n};\n\n// from a field element get all dimension data including LEGACY dimensions\nexport const recalculateCoordinates = (d: LSApiElement): LSApiElement => {\n // Returns X, Y coordinates\n const ax = d.left / d.pageDimensions.width;\n const ay = d.top / d.pageDimensions.height;\n const bx = (d.left + d.width) / d.pageDimensions.width;\n const by = (d.top + d.height) / d.pageDimensions.height;\n\n // Return with calculated styles that try to place it as it would appear on legacy signing page\n return {\n ...d,\n ax,\n ay,\n bx,\n by,\n };\n};\n\n// from a field determinse if out of bounds\nexport const oob = (d: LSApiElement): boolean => {\n return d.left < 0 || d.top < 0 || d.left + d.width > d.pageDimensions.width || d.top + d.height > d.pageDimensions.height;\n};\n"]}
@@ -197,7 +197,7 @@ slot {
197
197
  flex-direction: column;
198
198
  gap: 0.75rem;
199
199
  overflow-y: auto;
200
- width: calc(100% + 0.25rem);
200
+ /* width: calc(100% + 0.25rem); */
201
201
  padding: 0.75rem 0.25rem 0.25rem 0.25rem;
202
202
  height: 100%;
203
203
  }
@@ -517,6 +517,14 @@ export class LsDocumentViewer {
517
517
  const fields = this.component.shadowRoot.querySelectorAll('ls-editor-field');
518
518
  Array.from(fields).forEach(fx => {
519
519
  fx.className = fx.dataItem.page === page ? '' : 'hidden';
520
+ // Find assignee for this field
521
+ const data = fx.dataItem;
522
+ const assignee = this.mode === 'compose' ? this._recipients?.find(r => r.signerIndex === data.signer) : this._template.roles.find(r => r.signerIndex === data.signer);
523
+ fx.setAttribute('assignee', this.mode === 'compose' && assignee?.previousRecipientDecides === true
524
+ ? 'To Be Decided'
525
+ : this.mode === 'compose'
526
+ ? `${assignee?.firstName} ${assignee?.lastName}`
527
+ : assignee?.name || `Participant ${data.signer}`);
520
528
  });
521
529
  }
522
530
  async load() {
@@ -549,9 +557,11 @@ export class LsDocumentViewer {
549
557
  this._recipients.filter(r => r.roleType === "APPROVER").forEach(rec => {
550
558
  const role = this._template.roles.find(ro => ro.signerIndex === rec.signerIndex);
551
559
  if (!role) {
552
- this.addParticipant.emit({ signerIndex: rec?.signerIndex,
560
+ this.addParticipant.emit({
561
+ signerIndex: rec?.signerIndex,
553
562
  name: 'APPROVER' + rec?.signerIndex,
554
- type: 'APPROVER' });
563
+ type: 'APPROVER'
564
+ });
555
565
  }
556
566
  else if (rec.signerIndex === 1 && rec.roleType !== role.roleType) {
557
567
  this.mutate.emit([{
@@ -607,7 +617,7 @@ export class LsDocumentViewer {
607
617
  return false;
608
618
  }
609
619
  render() {
610
- return (h(Host, { key: 'e5b0cf1ba0e6f734a51b7c1bc83439a8ad90e592' }, h(h.Fragment, null, this.isLoading && (h(h.Fragment, null, h("ls-page-loader", { key: 'ae184812dda575e68ea12e241cbcab26eab6d09d' }), h("div", { key: '374fe0b12a79cc7869b2e63dd6a84e6bf3108673', class: 'custom-loader-slot' }, h("slot", { key: 'bc24c6b59f435fe66f0e606122d41b955b0d1c06', name: 'custom-loader' })), this.mode === 'compose' && h("ls-compose-loader", { key: '2d23f479e6ad88474ca10b37699b4864a6ce4ae4' }))), h("div", { key: '985e37c5355b745307f651d6c7c6b41f22ff337c', class: "page-header" }, h("div", { key: '2180103b3737d74cf8eb7c045f833294cd17aa54', class: 'left-slot-wrapper' }, h("slot", { key: '79a9a71e46f356ed0aafa565b23764062110edc5', name: "left-button" })), h("div", { key: '887de88e7a1deec3cb1589c255a55a6fc0ffe58d', class: 'right-slot-wrapper' }, h("slot", { key: '858e1f501922264f68f4980f0aeed107416b0228', name: "right-button" })), this.mode === 'editor' && (h("div", { key: '0cb7530ed3029cd219b3fba95356971dce779e17' }, h("span", { key: '72a153564c8619ba01005fd8847cbc70c7bd298b', class: "header-text-1" }, "Template Creation"), h("span", { key: 'd072dd42be33cdabae5c58f5e443f51c23dd4f7a' }, "/"), h("span", { key: 'de82446816c8abd5e81ee8d539268d657f7b378f', class: "header-text-2" }, this._template?.title))), this.mode === 'compose' && (h("div", { key: '7abffa975ad8f0915a19a719b4d6bec9aad0cb49', style: { display: 'flex', alignItems: 'center', gap: '0.25rem' } }, h("slot", { key: '142bc2fc33580144aedf097c2a493aa3e6878c6c', name: "top-bar" })))), this.mode === 'editor' && (h("div", { key: '6ef5aa4da478b9c4e751a3695347dbc64eda8f51', class: 'validation-tag-wrapper' }, h("ls-validation-tag", { key: '2d12722f016490cc7abb7d4c46c77b71107b0305', validationErrors: this.validationErrors }))), h("form", { key: 'dbc5e2c3ff35eb381bc197da2d2de30cc9147a24', id: "ls-editor-form" }, this.mode !== 'preview' ? (h("div", { id: "ls-left-box", class: "leftBox", style: this.mode === 'compose' ? { borderRadius: '1.75rem' } : {} }, h("div", { class: !this.selected || this.selected.length === 0 ? 'left-box-inner' : 'hidden' }, this.mode === 'editor' && (h("ls-feature-column", { mode: this.mode, onManage: manager => {
620
+ return (h(Host, { key: '5a7f46f97ccf2d168991777b88903add683e6156' }, h(h.Fragment, null, this.isLoading && (h(h.Fragment, null, h("ls-page-loader", { key: '03f44a690d1f06d7f8818f5726186cd5c36c789e' }), h("div", { key: '0f302567c499dba8cebf11f9cb01353c2bd86b3a', class: 'custom-loader-slot' }, h("slot", { key: '63cf0ef25d003b13e3604855e61d6c4fb87ea1ad', name: 'custom-loader' })), this.mode === 'compose' && h("ls-compose-loader", { key: '0f6fe3033d4d91795caf510fb7bab8d1a30ce489' }))), h("div", { key: '2a23a6c07bea2c4309b2ba2fcdd6d160352a1e95', class: "page-header" }, h("div", { key: '1d7b47f806a16f668f0726f38900f6b17afc08a9', class: 'left-slot-wrapper' }, h("slot", { key: 'e84118b669a542382a3a4e812e1fdfea30c4ebdd', name: "left-button" })), h("div", { key: 'c70fa424837f072583292904a31a17394ecaad29', class: 'right-slot-wrapper' }, h("slot", { key: '9bf959d0eabd2091e20905fa683b9d16fe3d8018', name: "right-button" })), this.mode === 'editor' && (h("div", { key: '8877b7eb2a2b9386c4fb7a433be59f3f946d2762' }, h("span", { key: 'a289a7f9a433f0873103dc6365b022a435abf300', class: "header-text-1" }, "Template Creation"), h("span", { key: 'd5daf8d0496965d7ee85d0523ac6f7f78e82fdc5' }, "/"), h("span", { key: 'b5d6359c86dc483c442e7934079c0526c2cfb0c3', class: "header-text-2" }, this._template?.title))), this.mode === 'compose' && (h("div", { key: 'cdc6b0e70181e1a16d4c32daad58de26f863627b', style: { display: 'flex', alignItems: 'center', gap: '0.25rem' } }, h("slot", { key: 'dd68d84257107959670f779fc543d92cc9fe0f54', name: "top-bar" })))), this.mode === 'editor' && (h("div", { key: '262a027c605a9dc4ebce40b16d1717b5d59e9d95', class: 'validation-tag-wrapper' }, h("ls-validation-tag", { key: 'f7efcc0edc0d4907ce679258e26d5f7470ee785f', validationErrors: this.validationErrors }))), h("form", { key: '22b5a8fb70ecaa74e1d7802ebe807b773a9daf84', id: "ls-editor-form" }, this.mode !== 'preview' ? (h("div", { id: "ls-left-box", class: "leftBox", style: this.mode === 'compose' ? { borderRadius: '1.75rem' } : {} }, h("div", { class: !this.selected || this.selected.length === 0 ? 'left-box-inner' : 'hidden' }, this.mode === 'editor' && (h("ls-feature-column", { mode: this.mode, onManage: manager => {
611
621
  if (manager.detail === 'document') {
612
622
  var documentManager = this.component.shadowRoot.getElementById('ls-document-options');
613
623
  documentManager.template = this._template;
@@ -621,11 +631,11 @@ export class LsDocumentViewer {
621
631
  validationManager.validationErrors = this.validationErrors;
622
632
  }
623
633
  this.manager = manager.detail;
624
- } })), h("div", { id: "ls-toolbox", class: this.manager === 'toolbox' ? 'toolbox' : 'hidden' }, h("div", { class: "ls-editor-infobox" }, h("h2", { class: "toolbox-section-title" }, "Fields"), h("p", { class: "toolbox-section-description" }, "Drag and drop, or select and double click, to place fields on the Document.")), h("div", { class: "fields-box" }, (this.signer > 0 && this.showTool('signature') && !this.checkType('APPROVER')) && (h("ls-toolbox-field", { elementType: "signature", formElementType: "signature", label: "Signature", defaultHeight: 25, defaultWidth: 97, validation: 0, icon: "signature", tooltip: "Use this field to collect Signatures from Participants", signer: this.signer })), this.signer === 0 && this.showTool('auto sign') && (h("ls-toolbox-field", { elementType: "auto sign", formElementType: "auto sign", label: "Auto Sign", defaultHeight: 25, defaultWidth: 97, validation: 3000, icon: "auto-sign", tooltip: "Auto-Sign lets Senders add a Signature to the Document that will be automatically applied upon Sending", signer: this.signer })), this.showTool('text') && (h("ls-toolbox-field", { elementType: "text", formElementType: "text", label: "Text", defaultHeight: 16, defaultWidth: 150, validation: 0, icon: "text", tooltip: "A field for collecting any plain text values such as: names, addresses or descriptions", signer: this.signer })), this.signer > 0 && this.showTool('signing date') && (h("ls-toolbox-field", { elementType: "signing date", formElementType: "signing date", label: "Signing Date", defaultHeight: 16, defaultWidth: 100, validation: 30, icon: "auto-date", tooltip: "Automatically inserts the date upon completion by the assigned Participant", signer: this.signer })), this.showTool('date') && (h("ls-toolbox-field", { elementType: "date", formElementType: "date", label: "Date", defaultHeight: 16, defaultWidth: 100, validation: 2, icon: "calender", tooltip: "A field for collecting dates with built-in date formatting options", signer: this.signer })), this.showTool('email') && (h("ls-toolbox-field", { elementType: "email", formElementType: "email", label: "Email", defaultHeight: 16, defaultWidth: 150, validation: 1, icon: "at-symbol", tooltip: "A Field to only accept entries formatted as an email address (e.g., example@example.com)", signer: this.signer })), this.showTool('initials') && (h("ls-toolbox-field", { elementType: "initials", formElementType: "initials", label: "Initials", defaultHeight: 25, defaultWidth: 70, validation: 2000, icon: "initials", tooltip: "Use this field anywhere Participants are required to Initial your document", signer: this.signer })), this.showTool('number') && (h("ls-toolbox-field", { elementType: "number", formElementType: "number", label: "Number", defaultHeight: 16, defaultWidth: 150, validation: 50, icon: "hashtag", tooltip: "A Field to only accept entries in numerical format. Additional validations include character limit (1 to 12 digits), and currency format (2 decimal places)", signer: this.signer })), this.showTool('dropdown') && (h("ls-toolbox-field", { elementType: "dropdown", formElementType: "dropdown", label: "Dropdown", defaultHeight: 16, defaultWidth: 100, validation: 20, icon: "dropdown", tooltip: "Use this field to create custom dropdown menus in your document, or place one of our handy presets for countries or prefixes", signer: this.signer })), this.showTool('checkbox') && (h("ls-toolbox-field", { elementType: "checkbox", formElementType: "checkbox", label: "Checkbox", defaultHeight: 16, defaultWidth: 16, validation: 25, icon: "check", tooltip: "Places a checkbox on your document. Handy for T&Cs or \u2714/\u2717 sections", signer: this.signer })), this.signer > 0 && this.showTool('regex') && (h("ls-toolbox-field", { elementType: "regex", formElementType: "regex", label: "Regex", defaultHeight: 16, defaultWidth: 150, validation: 93, icon: "code", tooltip: "Need a specific validation? Use this field to enter a custom RegEx and have Participants enter exactly what you need", signer: this.signer })), this.signer > 0 && this.showTool('image') && (h("ls-toolbox-field", { elementType: "image", formElementType: "image", label: "Image", defaultHeight: 16, defaultWidth: 100, validation: 90, icon: "photograph", tooltip: "Use when you need Participants to upload their own images during the signing process", signer: this.signer })), this.signer > 0 && this.showTool('file') && (h("ls-toolbox-field", { elementType: "file", formElementType: "file", label: "File", defaultHeight: 16, defaultWidth: 100, validation: 74, icon: "upload", tooltip: "Use when you need Participants to upload their own documents during the signing process", signer: this.signer })), this.signer > 0 && this.showTool('drawn') && (h("ls-toolbox-field", { elementType: "drawn", formElementType: "drawn", label: "Drawn", defaultHeight: 120, defaultWidth: 120, validation: 90, icon: "pencil", tooltip: "Allow users to draw on the document using their mouse or touchscreen", signer: this.signer })))), h("ls-participant-manager", { id: "ls-participant-manager", class: this.manager === 'participant' ? 'toolbox' : 'hidden', editor: this }), h("ls-document-options", { id: "ls-document-options", class: this.manager === 'document' ? 'toolbox' : 'hidden' }), h("ls-validation-manager", { id: "ls-validation-manager", class: this.manager === 'validation' ? 'toolbox' : 'hidden' }), h("ls-recipient-manager", { id: "ls-recipient-manager", class: this.manager === 'recipient' ? 'compose-toolbox' : 'hidden' }, h("div", { class: 'scroll-gradient-top' }), h("div", { class: 'scroll-gradient-bottom' }), h("ls-validation-tag", { validationErrors: this.validationErrors, style: { position: 'absolute', top: '1.125rem', right: '1rem' }, type: "compose" }), h("div", { class: 'recipients-box' }, this._recipients &&
634
+ } })), h("div", { id: "ls-toolbox", class: this.manager === 'toolbox' ? 'toolbox' : 'hidden' }, h("div", { class: "ls-editor-infobox" }, h("h2", { class: "toolbox-section-title" }, "Fields"), h("p", { class: "toolbox-section-description" }, "Drag and drop, or select and double click, to place fields on the Document.")), h("div", { class: "fields-box" }, (this.signer > 0 && this.showTool('signature') && !this.checkType('APPROVER')) && (h("ls-toolbox-field", { elementType: "signature", formElementType: "signature", label: "Signature", defaultHeight: 25, defaultWidth: 97, validation: 0, icon: "signature", tooltip: "Use this field to collect Signatures from Participants", signer: this.signer })), this.signer === 0 && this.showTool('auto sign') && (h("ls-toolbox-field", { elementType: "admin", formElementType: "auto sign", label: "Auto Sign", defaultHeight: 25, defaultWidth: 97, validation: 3000, icon: "auto-sign", tooltip: "Auto-Sign lets Senders add a Signature to the Document that will be automatically applied upon Sending", signer: this.signer })), this.showTool('text') && (h("ls-toolbox-field", { elementType: "text", formElementType: "text", label: "Text", defaultHeight: 16, defaultWidth: 150, validation: 0, icon: "text", tooltip: "A field for collecting any plain text values such as: names, addresses or descriptions", signer: this.signer })), this.signer > 0 && this.showTool('signing date') && (h("ls-toolbox-field", { elementType: "text", formElementType: "text", label: "Signing Date", defaultHeight: 16, defaultWidth: 100, validation: 30, icon: "auto-date", tooltip: "Automatically inserts the date upon completion by the assigned Participant", signer: this.signer })), this.showTool('date') && (h("ls-toolbox-field", { elementType: "text", formElementType: "date", label: "Date", defaultHeight: 16, defaultWidth: 100, validation: 2, icon: "calender", tooltip: "A field for collecting dates with built-in date formatting options", signer: this.signer })), this.showTool('email') && (h("ls-toolbox-field", { elementType: "text", formElementType: "email", label: "Email", defaultHeight: 16, defaultWidth: 150, validation: 1, icon: "at-symbol", tooltip: "A Field to only accept entries formatted as an email address (e.g., example@example.com)", signer: this.signer })), this.showTool('initials') && (h("ls-toolbox-field", { elementType: "initials", formElementType: "initials", label: "Initials", defaultHeight: 25, defaultWidth: 70, validation: 2000, icon: "initials", tooltip: "Use this field anywhere Participants are required to Initial your document", signer: this.signer })), this.showTool('number') && (h("ls-toolbox-field", { elementType: "text", formElementType: "number", label: "Number", defaultHeight: 16, defaultWidth: 150, validation: 50, icon: "hashtag", tooltip: "A Field to only accept entries in numerical format. Additional validations include character limit (1 to 12 digits), and currency format (2 decimal places)", signer: this.signer })), this.showTool('dropdown') && (h("ls-toolbox-field", { elementType: "text", formElementType: "dropdown", label: "Dropdown", defaultHeight: 16, defaultWidth: 100, validation: 20, icon: "dropdown", tooltip: "Use this field to create custom dropdown menus in your document, or place one of our handy presets for countries or prefixes", signer: this.signer })), this.showTool('checkbox') && (h("ls-toolbox-field", { elementType: "text", formElementType: "checkbox", label: "Checkbox", defaultHeight: 16, defaultWidth: 16, validation: 25, icon: "check", tooltip: "Places a checkbox on your document. Handy for T&Cs or \u2714/\u2717 sections", signer: this.signer })), this.signer > 0 && this.showTool('regex') && (h("ls-toolbox-field", { elementType: "text", formElementType: "regex", label: "Regex", defaultHeight: 16, defaultWidth: 150, validation: 93, icon: "code", tooltip: "Need a specific validation? Use this field to enter a custom RegEx and have Participants enter exactly what you need", signer: this.signer })), this.signer > 0 && this.showTool('image') && (h("ls-toolbox-field", { elementType: "text", formElementType: "image", label: "Image", defaultHeight: 16, defaultWidth: 100, validation: 90, icon: "photograph", tooltip: "Use when you need Participants to upload their own images during the signing process", signer: this.signer })), this.signer > 0 && this.showTool('file') && (h("ls-toolbox-field", { elementType: "text", formElementType: "file", label: "File", defaultHeight: 16, defaultWidth: 100, validation: 74, icon: "upload", tooltip: "Use when you need Participants to upload their own documents during the signing process", signer: this.signer })), this.signer > 0 && this.showTool('drawn') && (h("ls-toolbox-field", { elementType: "text", formElementType: "drawn", label: "Drawn", defaultHeight: 120, defaultWidth: 120, validation: 90, icon: "pencil", tooltip: "Allow users to draw on the document using their mouse or touchscreen", signer: this.signer })))), h("ls-participant-manager", { id: "ls-participant-manager", class: this.manager === 'participant' ? 'toolbox' : 'hidden', editor: this }), h("ls-document-options", { id: "ls-document-options", class: this.manager === 'document' ? 'toolbox' : 'hidden' }), h("ls-validation-manager", { id: "ls-validation-manager", class: this.manager === 'validation' ? 'toolbox' : 'hidden' }), h("ls-recipient-manager", { id: "ls-recipient-manager", class: this.manager === 'recipient' ? 'compose-toolbox' : 'hidden' }, h("div", { class: 'scroll-gradient-top' }), h("div", { class: 'scroll-gradient-bottom' }), h("ls-validation-tag", { validationErrors: this.validationErrors, style: { position: 'absolute', top: '1.125rem', right: '1rem' }, type: "compose" }), h("div", { class: 'recipients-box' }, this._recipients &&
625
635
  this._recipients.map(recipient => (h("ls-recipient-card", { recipient: recipient, activeRecipient: this.signer, filtertoolbox: this.filtertoolbox, template: this._template, validationErrors: this.validationErrors, fieldTypeSelected: this.fieldTypeSelected, "data-signer-index": recipient.signerIndex })))), h("slot", { name: "recipient-panel" }))), !this.displayTable && (h("div", { class: this.selected.length > 0 ? 'field-properties-outer' : 'hidden' }, h("div", { class: 'properties-header' }, h("div", { class: 'properties-header-icon' }, h("ls-icon", { name: "pre-filled-content" })), h("h1", { class: 'properties-header-title' }, "Field Properties"), h("button", { class: 'tertiaryGrey', onClick: e => {
626
636
  this.selected = [];
627
637
  e.preventDefault();
628
- }, "data-tooltip": "Close Properties Panel" }, h("ls-icon", { name: "x", size: "1.25rem" }))), h("ls-field-properties", { id: "my-field-panel" }))))) : (h(h.Fragment, null)), h("ls-toolbar", { key: 'a698773d40b37d5d5b576013f5005733a4acad8c', id: "ls-toolbar", template: this._template, editor: this, groupInfo: this.groupInfo, mode: this.mode }), h("div", { key: '0345f02f67b0a9c8d95f007ea7f6d3edaed526b0', id: "ls-mid-area" }, h("div", { key: 'db794e1a9e7a3ee74416a2ad9891e9d336043dfd', class: 'document-frame-wrapper', id: "document-frame-wrapper" }, h("div", { key: '1241cce8fdba6561cec037baa4587352e083f364', id: "ls-document-frame" }, h("canvas", { key: 'a3acba3b2a475b6d33db907c436d7e8a85a9baa0', id: "pdf-canvas", class: this.displayTable || this.isLoading ? 'hidden' : '' }), h("ls-editor-table", { key: '18ad8bd5c587a299ca2ea46c3ecbf1b4734b4f0c', editor: this, class: this.displayTable ? '' : 'hidden' }), h("div", { key: 'b3bdd192e4520962cc4e6a766233ad792650ea6f', id: "ls-box-selector" }))), h("ls-statusbar", { key: '47c7193cd4ad269244f6e77f817c1d6f47c21ecb', editor: this, page: this.pageNum, pageCount: this.pageCount })))), h("ls-tooltip", { key: '42a41d5f3edce48244af2c3c52f0ff141b346f5e', id: "ls-tooltip-master" })));
638
+ }, "data-tooltip": "Close Properties Panel" }, h("ls-icon", { name: "x", size: "1.25rem" }))), h("ls-field-properties", { id: "my-field-panel" }))))) : (h(h.Fragment, null)), h("ls-toolbar", { key: '3256d6ba064a5b9d15acb0c6ac5c1c31d4017a55', id: "ls-toolbar", template: this._template, editor: this, groupInfo: this.groupInfo, mode: this.mode }), h("div", { key: '432d47703e6b5f8d4f05ce6a16c918456fb33deb', id: "ls-mid-area" }, h("div", { key: 'ec204f6b416e480a8648f90f064fc1d91180477a', class: 'document-frame-wrapper', id: "document-frame-wrapper" }, h("div", { key: '51b7cd971636062995f3e6c3288127fd20409561', id: "ls-document-frame" }, h("canvas", { key: 'b32228eb99f8a17024e2f33bfbbe7296a2327180', id: "pdf-canvas", class: this.displayTable || this.isLoading ? 'hidden' : '' }), h("ls-editor-table", { key: 'a83db6dc528998aff7dfc97eaec193d14da66df3', editor: this, class: this.displayTable ? '' : 'hidden' }), h("div", { key: '63ec7e6a855cd97b51dcbfe9af20990e5e923751', id: "ls-box-selector" }))), h("ls-statusbar", { key: '1ce77b06ca363b89c8e2e3975c0fced17fe2fd0b', editor: this, page: this.pageNum, pageCount: this.pageCount })))), h("ls-tooltip", { key: 'f6e90e6fc5678de6de24808861f7034304450b9c', id: "ls-tooltip-master" })));
629
639
  }
630
640
  static get is() { return "ls-document-viewer"; }
631
641
  static get encapsulation() { return "shadow"; }