legalesign-document-viewer 0.3.3 → 0.3.4

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 (62) hide show
  1. package/dist/cjs/ls-document-options_40.cjs.entry.js +167 -173
  2. package/dist/cjs/ls-document-options_40.cjs.entry.js.map +1 -1
  3. package/dist/collection/components/ls-document-viewer/editorUtils.js +8 -3
  4. package/dist/collection/components/ls-document-viewer/editorUtils.js.map +1 -1
  5. package/dist/collection/components/ls-document-viewer/ls-document-viewer.js +10 -3
  6. package/dist/collection/components/ls-document-viewer/ls-document-viewer.js.map +1 -1
  7. package/dist/components/ls-document-viewer.js +71 -136
  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 +1 -1
  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/ls-statusbar.js +1 -1
  24. package/dist/components/{p-C4dJ_NrC.js → p-1wdCYLqw.js} +3 -3
  25. package/dist/components/{p-C4dJ_NrC.js.map → p-1wdCYLqw.js.map} +1 -1
  26. package/dist/components/{p-tfo7xItm.js → p-B0uVP8it.js} +3 -3
  27. package/dist/components/{p-tfo7xItm.js.map → p-B0uVP8it.js.map} +1 -1
  28. package/dist/components/{p-DE2r5IdM.js → p-BBuk6A32.js} +3 -3
  29. package/dist/components/{p-DE2r5IdM.js.map → p-BBuk6A32.js.map} +1 -1
  30. package/dist/components/{p-Ovur85Of.js → p-BMpnAxqv.js} +114 -55
  31. package/dist/components/p-BMpnAxqv.js.map +1 -0
  32. package/dist/components/{p-C45TaVTh.js → p-BOKGHQS9.js} +3 -3
  33. package/dist/components/{p-C45TaVTh.js.map → p-BOKGHQS9.js.map} +1 -1
  34. package/dist/components/{p-CCE9t160.js → p-BOz4DYOB.js} +3 -3
  35. package/dist/components/{p-CCE9t160.js.map → p-BOz4DYOB.js.map} +1 -1
  36. package/dist/components/{p-DY8RJZmx.js → p-C0t7MuwE.js} +3 -3
  37. package/dist/components/{p-DY8RJZmx.js.map → p-C0t7MuwE.js.map} +1 -1
  38. package/dist/components/{p-Da83lhqi.js → p-CktqjOO6.js} +3 -3
  39. package/dist/components/{p-Da83lhqi.js.map → p-CktqjOO6.js.map} +1 -1
  40. package/dist/components/{p-CZkgAbFI.js → p-CpYbd6qt.js} +3 -3
  41. package/dist/components/{p-CZkgAbFI.js.map → p-CpYbd6qt.js.map} +1 -1
  42. package/dist/components/{p-23iaNjGp.js → p-CvqT5MA7.js} +3 -3
  43. package/dist/components/{p-23iaNjGp.js.map → p-CvqT5MA7.js.map} +1 -1
  44. package/dist/components/{p-BKNIuWRw.js → p-DDWmD8TQ.js} +3 -3
  45. package/dist/components/{p-BKNIuWRw.js.map → p-DDWmD8TQ.js.map} +1 -1
  46. package/dist/components/{p-gEso0FtC.js → p-JFkSKN19.js} +3 -3
  47. package/dist/components/{p-gEso0FtC.js.map → p-JFkSKN19.js.map} +1 -1
  48. package/dist/components/{p-CHN41h9u.js → p-bNVYQ-ag.js} +3 -3
  49. package/dist/components/{p-CHN41h9u.js.map → p-bNVYQ-ag.js.map} +1 -1
  50. package/dist/components/{p-B-K24bnx.js → p-hUeqWmAs.js} +13 -13
  51. package/dist/components/{p-B-K24bnx.js.map → p-hUeqWmAs.js.map} +1 -1
  52. package/dist/components/{p-DqW1sDWy.js → p-ji6hTzlP.js} +3 -3
  53. package/dist/components/{p-DqW1sDWy.js.map → p-ji6hTzlP.js.map} +1 -1
  54. package/dist/esm/ls-document-options_40.entry.js +167 -173
  55. package/dist/esm/ls-document-options_40.entry.js.map +1 -1
  56. package/dist/ls-document-viewer/ls-document-viewer.esm.js +1 -1
  57. package/dist/ls-document-viewer/{p-e45016a5.entry.js → p-5c27684b.entry.js} +3 -3
  58. package/dist/ls-document-viewer/p-5c27684b.entry.js.map +1 -0
  59. package/dist/types/components/ls-document-viewer/ls-document-viewer.d.ts +1 -0
  60. package/package.json +1 -1
  61. package/dist/components/p-Ovur85Of.js.map +0 -1
  62. package/dist/ls-document-viewer/p-e45016a5.entry.js.map +0 -1
@@ -19958,60 +19958,40 @@ const recalculateCoordinates = (d) => {
19958
19958
  };
19959
19959
 
19960
19960
  // Add a role
19961
- const createRole = (role) => {
19962
- const newParent = role?.signerParent ? `"${role.signerParent}"` : 'null';
19963
- return `
19964
- mutation LDVAddRole {
19965
- createTemplateRole(input: {
19966
- templateId: "${role.templateId}"
19967
- signerIndex: ${role.signerIndex}
19968
- signerParent: ${newParent}
19969
- name: ${JSON.stringify(role.name)}
19970
- ordinal: ${role.ordinal}
19971
- roleType: ${role.roleType}
19972
- experience: "${role.experience}"
19973
- })
19974
- }`;
19975
- };
19976
- // Remove a role
19977
- const deleteRole = (role) => {
19978
- return `
19979
- mutation LDVremoveRole {
19980
- deleteTemplateRole(input: {
19981
- templateRoleId: "${role.id}"
19982
- })
19983
- }`;
19984
- };
19985
- // Save any changes to an role
19986
- const updateRole = (role) => {
19987
- const newParent = role?.signerParent ? `"${role.signerParent}"` : 'null';
19988
- return `
19989
- mutation LDVupdateRole {
19990
- updateTemplateRole(input: {
19991
- templateRoleId: "${role.id}"
19992
- signerIndex: ${role.signerIndex}
19993
- ordinal: ${role.ordinal}
19994
- signerParent: ${newParent}
19995
- name: ${JSON.stringify(role.name)}
19996
- roleType: ${role.roleType}
19997
- experience: "${role.experience}"
19998
- })
19999
- }`;
20000
- };
20001
- // swap two adjacent roles
20002
- const swapRoles = (roleId1, roleId2) => {
19961
+ const updateTemplate = template => {
20003
19962
  return `
20004
- mutation LDVswapRole {
20005
- swapRoles(input: {
20006
- roleId1: "${roleId1.id}"
20007
- roleId2: "${roleId2.id}"
20008
- })
20009
- }`;
19963
+ mutation LDVupdateTemplate {
19964
+ updateTemplate(input: {
19965
+ templateId: "${template.id}",
19966
+ title: "${template.title}",
19967
+ locked: ${template.locked},
19968
+ autoArchive: ${template.autoArchive},
19969
+ fixSignatureScale: ${template.fixSignatureScale ? template.fixSignatureScale : false}
19970
+ })
19971
+ }
19972
+ `;
20010
19973
  };
20011
- const getTemplateRoles = (id) => {
19974
+ const getTemplate = (id) => {
20012
19975
  return `
20013
19976
  query LDVGetTemplate {
20014
- template(id: "${id}") {
19977
+ template(id: "${id}") {
19978
+ id
19979
+ title
19980
+ fileName
19981
+ pageDimensions
19982
+ pageCount
19983
+ modified
19984
+ link
19985
+ valid
19986
+ locked
19987
+ autoArchive
19988
+ archived
19989
+ tags
19990
+ created
19991
+ createdBy
19992
+ lastSent
19993
+ fixSignatureScale
19994
+ groupId
20015
19995
  roles{
20016
19996
  id
20017
19997
  name
@@ -20021,11 +20001,86 @@ const getTemplateRoles = (id) => {
20021
20001
  signerParent
20022
20002
  experience
20023
20003
  }
20004
+ elementConnection {
20005
+ templateElements {
20006
+ align
20007
+ ax
20008
+ ay
20009
+ bx
20010
+ by
20011
+ elementType
20012
+ formElementType
20013
+ fieldOrder
20014
+ fontName
20015
+ fontSize
20016
+ helpText
20017
+ hideBorder
20018
+ id
20019
+ label
20020
+ labelExtra
20021
+ logicAction
20022
+ logicGroup
20023
+ mapTo
20024
+ options
20025
+ optional
20026
+ page
20027
+ role
20028
+ signer
20029
+ substantive
20030
+ validation
20031
+ value
20032
+ }
20033
+ totalCount
20034
+ }
20035
+ userSignatureConnection {
20036
+ userSignatureElements {
20037
+ id
20038
+ userId
20039
+ ax
20040
+ ay
20041
+ bx
20042
+ by
20043
+ page
20044
+ link
20045
+ }
20046
+ }
20024
20047
  }
20025
20048
  }
20026
20049
  `;
20027
20050
  };
20028
20051
 
20052
+ /**
20053
+ * This module contains all the rules required to mark a template
20054
+ * as valid.
20055
+ *
20056
+ */
20057
+ function validate(t) {
20058
+ var errors = [];
20059
+ // Check for missing signatures
20060
+ t.roles.forEach(tr => {
20061
+ if (t.elementConnection.templateElements.filter(e => e.formElementType === 'signature' && e.signer === tr.signerIndex && tr.roleType !== 'APPROVER').length === 0) {
20062
+ errors.push({
20063
+ id: tr.id,
20064
+ title: 'Missing signature.',
20065
+ description: `{tr.name} is missing a signature.`,
20066
+ role: tr,
20067
+ });
20068
+ }
20069
+ });
20070
+ // Check for missing multi-select options
20071
+ t.elementConnection.templateElements.forEach(element => {
20072
+ if (element.validation === 20 && (!element.options || element.options.length === 0)) {
20073
+ errors.push({
20074
+ id: element.id,
20075
+ title: 'Missing options',
20076
+ description: `Drop down field "${element.label}" is missing options.`,
20077
+ element: element,
20078
+ });
20079
+ }
20080
+ });
20081
+ return errors;
20082
+ }
20083
+
20029
20084
  /**
20030
20085
  * These utils are used to make document-viewer more readable
20031
20086
  * but they must be called using the bind() function so that
@@ -20071,19 +20126,23 @@ function matchData(data) {
20071
20126
  fi.setAttribute('id', 'ls-field-' + id);
20072
20127
  fi.dataItem = { ...data.obj, id };
20073
20128
  }
20129
+ this.validationErrors = validate.bind(this)(this._template);
20074
20130
  }
20075
20131
  if (prefix === 'rol') {
20076
20132
  syncRoles.bind(this)();
20077
20133
  }
20078
20134
  if (prefix === 'tpl') {
20079
20135
  this._template = { ...this._template, ...data.obj };
20136
+ this.validationErrors = validate.bind(this)(this._template);
20080
20137
  }
20081
20138
  }
20082
20139
  async function syncRoles() {
20083
20140
  var participantManager = this.component.shadowRoot.getElementById('ls-participant-manager');
20084
- const result = await this.adapter.execute(this.token, getTemplateRoles(this._template.id));
20085
- this._template = { ...this._template, roles: result.template.roles };
20141
+ const tresult = (await this.adapter.execute(this.token, getTemplate(this.templateid)));
20142
+ this.parseTemplate(JSON.stringify(tresult.template));
20086
20143
  participantManager.template = this._template;
20144
+ this.generateFields();
20145
+ this.validationErrors = validate.bind(this)(this._template);
20087
20146
  }
20088
20147
  // Utility function which extracts the type from any API id
20089
20148
  function getApiType(obj) {
@@ -24484,95 +24543,55 @@ const deleteElement = obj => {
24484
24543
  };
24485
24544
 
24486
24545
  // Add a role
24487
- const updateTemplate = template => {
24546
+ const createRole = (role) => {
24547
+ const newParent = role?.signerParent ? `"${role.signerParent}"` : 'null';
24488
24548
  return `
24489
- mutation LDVupdateTemplate {
24490
- updateTemplate(input: {
24491
- templateId: "${template.id}",
24492
- title: "${template.title}",
24493
- locked: ${template.locked},
24494
- autoArchive: ${template.autoArchive},
24495
- fixSignatureScale: ${template.fixSignatureScale ? template.fixSignatureScale : false}
24496
- })
24497
- }
24498
- `;
24549
+ mutation LDVAddRole {
24550
+ createTemplateRole(input: {
24551
+ templateId: "${role.templateId}"
24552
+ signerIndex: ${role.signerIndex}
24553
+ signerParent: ${newParent}
24554
+ name: ${JSON.stringify(role.name)}
24555
+ ordinal: ${role.ordinal}
24556
+ roleType: ${role.roleType}
24557
+ experience: "${role.experience}"
24558
+ })
24559
+ }`;
24499
24560
  };
24500
- const getTemplate = (id) => {
24561
+ // Remove a role
24562
+ const deleteRole = (role) => {
24501
24563
  return `
24502
- query LDVGetTemplate {
24503
- template(id: "${id}") {
24504
- id
24505
- title
24506
- fileName
24507
- pageDimensions
24508
- pageCount
24509
- modified
24510
- link
24511
- valid
24512
- locked
24513
- autoArchive
24514
- archived
24515
- tags
24516
- created
24517
- createdBy
24518
- lastSent
24519
- fixSignatureScale
24520
- groupId
24521
- roles{
24522
- id
24523
- name
24524
- roleType
24525
- signerIndex
24526
- ordinal
24527
- signerParent
24528
- experience
24529
- }
24530
- elementConnection {
24531
- templateElements {
24532
- align
24533
- ax
24534
- ay
24535
- bx
24536
- by
24537
- elementType
24538
- formElementType
24539
- fieldOrder
24540
- fontName
24541
- fontSize
24542
- helpText
24543
- hideBorder
24544
- id
24545
- label
24546
- labelExtra
24547
- logicAction
24548
- logicGroup
24549
- mapTo
24550
- options
24551
- optional
24552
- page
24553
- role
24554
- signer
24555
- substantive
24556
- validation
24557
- value
24558
- }
24559
- totalCount
24560
- }
24561
- userSignatureConnection {
24562
- userSignatureElements {
24563
- id
24564
- userId
24565
- ax
24566
- ay
24567
- bx
24568
- by
24569
- page
24570
- link
24571
- }
24572
- }
24573
- }
24574
- }
24575
- `;
24564
+ mutation LDVremoveRole {
24565
+ deleteTemplateRole(input: {
24566
+ templateRoleId: "${role.id}"
24567
+ })
24568
+ }`;
24569
+ };
24570
+ // Save any changes to an role
24571
+ const updateRole = (role) => {
24572
+ const newParent = role?.signerParent ? `"${role.signerParent}"` : 'null';
24573
+ return `
24574
+ mutation LDVupdateRole {
24575
+ updateTemplateRole(input: {
24576
+ templateRoleId: "${role.id}"
24577
+ signerIndex: ${role.signerIndex}
24578
+ ordinal: ${role.ordinal}
24579
+ signerParent: ${newParent}
24580
+ name: ${JSON.stringify(role.name)}
24581
+ roleType: ${role.roleType}
24582
+ experience: "${role.experience}"
24583
+ })
24584
+ }`;
24585
+ };
24586
+ // swap two adjacent roles
24587
+ const swapRoles = (roleId1, roleId2) => {
24588
+ return `
24589
+ mutation LDVswapRole {
24590
+ swapRoles(input: {
24591
+ roleId1: "${roleId1.id}"
24592
+ roleId2: "${roleId2.id}"
24593
+ })
24594
+ }`;
24576
24595
  };
24577
24596
 
24578
24597
  class LsDocumentAdapter {
@@ -24753,38 +24772,6 @@ const getGroupData = (id) => {
24753
24772
  `;
24754
24773
  };
24755
24774
 
24756
- /**
24757
- * This module contains all the rules required to mark a template
24758
- * as valid.
24759
- *
24760
- */
24761
- function validate(t) {
24762
- var errors = [];
24763
- // Check for missing signatures
24764
- t.roles.forEach(tr => {
24765
- if (t.elementConnection.templateElements.filter(e => e.formElementType === 'signature' && e.signer === tr.signerIndex && tr.roleType !== 'APPROVER').length === 0) {
24766
- errors.push({
24767
- id: tr.id,
24768
- title: 'Missing signature.',
24769
- description: `{tr.name} is missing a signature.`,
24770
- role: tr,
24771
- });
24772
- }
24773
- });
24774
- // Check for missing multi-select options
24775
- t.elementConnection.templateElements.forEach(element => {
24776
- if (element.validation === 20 && (!element.options || element.options.length === 0)) {
24777
- errors.push({
24778
- id: element.id,
24779
- title: 'Missing options',
24780
- description: `Drop down field "${element.label}" is missing options.`,
24781
- element: element,
24782
- });
24783
- }
24784
- });
24785
- return errors;
24786
- }
24787
-
24788
24775
  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}.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:16px;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{width:200px;border:1px gray solid;width:470px;min-width:390px;padding:4px;font-family:inherit}.toolbox{display:flex;flex-direction:column;width:100%;height:100%;border-radius:8px;border:1px solid var(--gray-30, #e0e2e5);background:var(--gray-10, #f7f8fa);padding:0.75rem;gap:1rem;overflow-y:auto}.ls-editor-infobox{padding:2px 8px 2px 8px}#pdf-canvas{top:0px;left:0px;width:100px;height:100px;box-shadow:0 8px 32px 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 380px 2rem 380px}#ls-document-frame{position:relative;height:98vh;margin-right:auto;margin-left:auto}.prevButton{position:relative;bottom:30px}.nextButton{position:relative;bottom:30px}.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:36px}.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)}";
24789
24776
 
24790
24777
  pdfExports.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.5.207/pdf.worker.min.js';
@@ -25230,7 +25217,14 @@ const LsDocumentViewer = class {
25230
25217
  event.preventDefault();
25231
25218
  });
25232
25219
  dropTarget.addEventListener('drop', mouseDrop.bind(this));
25233
- // Generate all the field HTML elements that are required (for every page)
25220
+ this.generateFields();
25221
+ }
25222
+ // Generate all the field HTML elements that are required (for every page)
25223
+ generateFields(clearExisting = true) {
25224
+ if (clearExisting) {
25225
+ const fields = this.component.shadowRoot.querySelectorAll('ls-editor-field');
25226
+ fields.forEach(fi => this.component.shadowRoot.getElementById('ls-document-frame').removeChild(fi));
25227
+ }
25234
25228
  this._template.elementConnection.templateElements.forEach(te => {
25235
25229
  addField.bind(this)(this.component.shadowRoot.getElementById('ls-document-frame'), this.prepareElement(te));
25236
25230
  });
@@ -25273,7 +25267,7 @@ const LsDocumentViewer = class {
25273
25267
  });
25274
25268
  }
25275
25269
  render() {
25276
- return (h(Host, { key: '331bbb6ee8979812cac17c61037085c18ffe3ea4' }, h(h.Fragment, null, this.isLoading && h("ls-page-loader", { key: '2fdab395bd9707041e35176bdbcc898e61dcf640' }), h("div", { key: '676168eb9b02205325cb53c68bda22783669380c', class: 'validation-tag-wrapper' }, h("ls-validation-tag", { key: '62867096f5fda376314bb7915b81e7006d95c492', validationErrors: this.validationErrors })), h("div", { key: '898f1dcc9a33dc8fa3181e409364b575bb923904', class: "page-header" }, h("p", { key: 'd5d0041f19aa10609d02a81412a46cf0c45376bb', class: "header-text-1" }, "Template Creation"), h("p", { key: '08f9eb736cd04e1c4cd867f4882f03d3d1899e39' }, "/"), h("p", { key: '039a5d1475d4ee606b8f11cc1f49fcdcfe309d30', class: "header-text-2" }, this._template?.title)), h("form", { key: 'c4455c35ff74b2ea43adc7e298c46d7db22dc964', id: "ls-editor-form" }, this.showtoolbox === true ? (h("div", { id: "ls-left-box", class: "leftBox" }, h("div", { class: !this.selected || this.selected.length === 0 ? 'left-box-inner' : 'hidden' }, h("ls-feature-column", { onManage: manager => {
25270
+ return (h(Host, { key: '81fb162f62eee08b7e9608ab01a662b8692ced19' }, h(h.Fragment, null, this.isLoading && h("ls-page-loader", { key: '8d72275abac9bf7b7c60dc0f3bf359b61da2bfa8' }), h("div", { key: '9403504084bfeee0569896524971a8b0b1e7a227', class: 'validation-tag-wrapper' }, h("ls-validation-tag", { key: '989610b8316de91ccbde6ad01c13e8159edc584c', validationErrors: this.validationErrors })), h("div", { key: 'f22196cecc91276d4df7c632b5c4a9412f2a53eb', class: "page-header" }, h("p", { key: '5bda0c223072135232f648d28e59bd79145fe349', class: "header-text-1" }, "Template Creation"), h("p", { key: '129f5a82ea8e5afb4a992687e121bde326908b97' }, "/"), h("p", { key: 'e1f00b84543a3e8a9baee098742c6519d7d2bcde', class: "header-text-2" }, this._template?.title)), h("form", { key: '38f0cbd650c8f45a4b415ee20b5fc2dd73345442', id: "ls-editor-form" }, this.showtoolbox === true ? (h("div", { id: "ls-left-box", class: "leftBox" }, h("div", { class: !this.selected || this.selected.length === 0 ? 'left-box-inner' : 'hidden' }, h("ls-feature-column", { onManage: manager => {
25277
25271
  if (manager.detail === 'document') {
25278
25272
  var documentManager = this.component.shadowRoot.getElementById('ls-document-options');
25279
25273
  documentManager.template = this._template;
@@ -25312,7 +25306,7 @@ const LsDocumentViewer = class {
25312
25306
  } })))), 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' })), !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 => {
25313
25307
  this.selected = [];
25314
25308
  e.preventDefault();
25315
- } }, h("ls-icon", { name: "x", size: "20" }))), h("ls-field-properties", { id: "my-field-panel" }), h("slot", null))))) : (h(h.Fragment, null)), h("ls-toolbar", { key: '8c4b8034e7ffed516af95db5f10cf4ada95dcbdb', id: "ls-toolbar", template: this._template, editor: this, groupInfo: this.groupInfo }), h("div", { key: 'f387d5bc8389c756ed527b5a3b90f4622b3cc97c', id: "ls-mid-area" }, h("div", { key: '670fef66b54c73e52b707fc27e6cd058765c2dd2', class: 'document-frame-wrapper', id: "document-frame-wrapper" }, h("div", { key: '2321a7a20cbd67b5e55607bd54b0bfb8fb5c2dc8', id: "ls-document-frame" }, h("canvas", { key: '76ec82c4ae65781013f12fa382affd327c1271f2', id: "pdf-canvas", class: this.displayTable || this.isLoading ? 'hidden' : '' }), h("ls-editor-table", { key: 'a8ec99154542ae3d0290eb3c33d88e5c96cff78e', editor: this, class: this.displayTable ? '' : 'hidden' }), h("div", { key: '74d7d28664675bfe3c0b178f783fcfe155ac4544', id: "ls-box-selector" }))), h("ls-statusbar", { key: '44c7a537634f5ea25028942223a850804d0f9639', editor: this }))))));
25309
+ } }, h("ls-icon", { name: "x", size: "20" }))), h("ls-field-properties", { id: "my-field-panel" }), h("slot", null))))) : (h(h.Fragment, null)), h("ls-toolbar", { key: 'f64bad623489b4f7b56c08d7c1e1fbd2264df854', id: "ls-toolbar", template: this._template, editor: this, groupInfo: this.groupInfo }), h("div", { key: 'b1d691f755d4ea7a913ab5bf3b6d22bcc02e9464', id: "ls-mid-area" }, h("div", { key: '985b96b3b721d206a0e099ffef062f502d633b32', class: 'document-frame-wrapper', id: "document-frame-wrapper" }, h("div", { key: '85db5a30105e084d55e962c1a9d74b267d2a332f', id: "ls-document-frame" }, h("canvas", { key: '39041d335b556218f7fb2718e26d018ec596afe7', id: "pdf-canvas", class: this.displayTable || this.isLoading ? 'hidden' : '' }), h("ls-editor-table", { key: '1580ed3da6d3fd5a5ca81b0da0fb733e6a6ced1f', editor: this, class: this.displayTable ? '' : 'hidden' }), h("div", { key: '6282c570b3d0051adcf46642999516694f3f7996', id: "ls-box-selector" }))), h("ls-statusbar", { key: '236c388bea733eb6eef71e3ae0f8e97e20822261', editor: this }))))));
25316
25310
  }
25317
25311
  static get watchers() { return {
25318
25312
  "mode": ["modeHandler"],