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
@@ -1,29 +1,29 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-BvHSBTD8.js';
2
- import { a as alter, o as oob, u as updateRole, c as createRole, s as swapRoles, d as deleteRole, m as matchData, g as getApiType } from './p-Ovur85Of.js';
2
+ import { a as alter, o as oob, u as updateTemplate, m as matchData, v as validate, g as getApiType, b as getTemplate } from './p-BMpnAxqv.js';
3
3
  import { d as defineCustomElement$E } from './p-Dprl580c.js';
4
- import { d as defineCustomElement$D } from './p-CZkgAbFI.js';
4
+ import { d as defineCustomElement$D } from './p-CpYbd6qt.js';
5
5
  import { d as defineCustomElement$C } from './p-CdGtJRZm.js';
6
6
  import { d as defineCustomElement$B } from './p-BXKYpxgM.js';
7
7
  import { d as defineCustomElement$A } from './p-DxGzQ3Lc.js';
8
- import { d as defineCustomElement$z } from './p-Da83lhqi.js';
8
+ import { d as defineCustomElement$z } from './p-CktqjOO6.js';
9
9
  import { d as defineCustomElement$y } from './p-Bxutt9rC.js';
10
- import { d as defineCustomElement$x } from './p-C45TaVTh.js';
10
+ import { d as defineCustomElement$x } from './p-BOKGHQS9.js';
11
11
  import { d as defineCustomElement$w } from './p-B3lY01RV.js';
12
12
  import { d as defineCustomElement$v } from './p-9WKoGwO0.js';
13
13
  import { d as defineCustomElement$u } from './p-C6NnNmx5.js';
14
- import { d as defineCustomElement$t } from './p-B-K24bnx.js';
14
+ import { d as defineCustomElement$t } from './p-hUeqWmAs.js';
15
15
  import { d as defineCustomElement$s } from './p-CzySwvIU.js';
16
16
  import { d as defineCustomElement$r } from './p-14owczyX.js';
17
17
  import { d as defineCustomElement$q } from './p-vV0A8m2N.js';
18
- import { d as defineCustomElement$p } from './p-gEso0FtC.js';
19
- import { d as defineCustomElement$o } from './p-BKNIuWRw.js';
20
- import { d as defineCustomElement$n } from './p-DqW1sDWy.js';
21
- import { d as defineCustomElement$m } from './p-CHN41h9u.js';
22
- import { d as defineCustomElement$l } from './p-23iaNjGp.js';
23
- import { d as defineCustomElement$k } from './p-C4dJ_NrC.js';
24
- import { d as defineCustomElement$j } from './p-tfo7xItm.js';
25
- import { d as defineCustomElement$i } from './p-DY8RJZmx.js';
26
- import { d as defineCustomElement$h } from './p-DE2r5IdM.js';
18
+ import { d as defineCustomElement$p } from './p-JFkSKN19.js';
19
+ import { d as defineCustomElement$o } from './p-DDWmD8TQ.js';
20
+ import { d as defineCustomElement$n } from './p-ji6hTzlP.js';
21
+ import { d as defineCustomElement$m } from './p-bNVYQ-ag.js';
22
+ import { d as defineCustomElement$l } from './p-CvqT5MA7.js';
23
+ import { d as defineCustomElement$k } from './p-1wdCYLqw.js';
24
+ import { d as defineCustomElement$j } from './p-B0uVP8it.js';
25
+ import { d as defineCustomElement$i } from './p-C0t7MuwE.js';
26
+ import { d as defineCustomElement$h } from './p-BBuk6A32.js';
27
27
  import { d as defineCustomElement$g } from './p-6LFAGg6D.js';
28
28
  import { d as defineCustomElement$f } from './p-Co6xLkEu.js';
29
29
  import { d as defineCustomElement$e } from './p-DM3pnD5z.js';
@@ -33,7 +33,7 @@ import { d as defineCustomElement$b } from './p-o7kGA8FM.js';
33
33
  import { d as defineCustomElement$a } from './p-ozlIyuZ1.js';
34
34
  import { d as defineCustomElement$9 } from './p-Yrg6B_xb.js';
35
35
  import { d as defineCustomElement$8 } from './p-BLUUNyDx.js';
36
- import { d as defineCustomElement$7 } from './p-CCE9t160.js';
36
+ import { d as defineCustomElement$7 } from './p-BOz4DYOB.js';
37
37
  import { d as defineCustomElement$6 } from './p-BArjC51C.js';
38
38
  import { d as defineCustomElement$5 } from './p-BcfP7mSQ.js';
39
39
  import { d as defineCustomElement$4 } from './p-DUVCAq-W.js';
@@ -24196,95 +24196,55 @@ const deleteElement = obj => {
24196
24196
  };
24197
24197
 
24198
24198
  // Add a role
24199
- const updateTemplate = template => {
24199
+ const createRole = (role) => {
24200
+ const newParent = role?.signerParent ? `"${role.signerParent}"` : 'null';
24200
24201
  return `
24201
- mutation LDVupdateTemplate {
24202
- updateTemplate(input: {
24203
- templateId: "${template.id}",
24204
- title: "${template.title}",
24205
- locked: ${template.locked},
24206
- autoArchive: ${template.autoArchive},
24207
- fixSignatureScale: ${template.fixSignatureScale ? template.fixSignatureScale : false}
24208
- })
24209
- }
24210
- `;
24202
+ mutation LDVAddRole {
24203
+ createTemplateRole(input: {
24204
+ templateId: "${role.templateId}"
24205
+ signerIndex: ${role.signerIndex}
24206
+ signerParent: ${newParent}
24207
+ name: ${JSON.stringify(role.name)}
24208
+ ordinal: ${role.ordinal}
24209
+ roleType: ${role.roleType}
24210
+ experience: "${role.experience}"
24211
+ })
24212
+ }`;
24211
24213
  };
24212
- const getTemplate = (id) => {
24214
+ // Remove a role
24215
+ const deleteRole = (role) => {
24213
24216
  return `
24214
- query LDVGetTemplate {
24215
- template(id: "${id}") {
24216
- id
24217
- title
24218
- fileName
24219
- pageDimensions
24220
- pageCount
24221
- modified
24222
- link
24223
- valid
24224
- locked
24225
- autoArchive
24226
- archived
24227
- tags
24228
- created
24229
- createdBy
24230
- lastSent
24231
- fixSignatureScale
24232
- groupId
24233
- roles{
24234
- id
24235
- name
24236
- roleType
24237
- signerIndex
24238
- ordinal
24239
- signerParent
24240
- experience
24241
- }
24242
- elementConnection {
24243
- templateElements {
24244
- align
24245
- ax
24246
- ay
24247
- bx
24248
- by
24249
- elementType
24250
- formElementType
24251
- fieldOrder
24252
- fontName
24253
- fontSize
24254
- helpText
24255
- hideBorder
24256
- id
24257
- label
24258
- labelExtra
24259
- logicAction
24260
- logicGroup
24261
- mapTo
24262
- options
24263
- optional
24264
- page
24265
- role
24266
- signer
24267
- substantive
24268
- validation
24269
- value
24270
- }
24271
- totalCount
24272
- }
24273
- userSignatureConnection {
24274
- userSignatureElements {
24275
- id
24276
- userId
24277
- ax
24278
- ay
24279
- bx
24280
- by
24281
- page
24282
- link
24283
- }
24284
- }
24285
- }
24286
- }
24287
- `;
24217
+ mutation LDVremoveRole {
24218
+ deleteTemplateRole(input: {
24219
+ templateRoleId: "${role.id}"
24220
+ })
24221
+ }`;
24222
+ };
24223
+ // Save any changes to an role
24224
+ const updateRole = (role) => {
24225
+ const newParent = role?.signerParent ? `"${role.signerParent}"` : 'null';
24226
+ return `
24227
+ mutation LDVupdateRole {
24228
+ updateTemplateRole(input: {
24229
+ templateRoleId: "${role.id}"
24230
+ signerIndex: ${role.signerIndex}
24231
+ ordinal: ${role.ordinal}
24232
+ signerParent: ${newParent}
24233
+ name: ${JSON.stringify(role.name)}
24234
+ roleType: ${role.roleType}
24235
+ experience: "${role.experience}"
24236
+ })
24237
+ }`;
24238
+ };
24239
+ // swap two adjacent roles
24240
+ const swapRoles = (roleId1, roleId2) => {
24241
+ return `
24242
+ mutation LDVswapRole {
24243
+ swapRoles(input: {
24244
+ roleId1: "${roleId1.id}"
24245
+ roleId2: "${roleId2.id}"
24246
+ })
24247
+ }`;
24288
24248
  };
24289
24249
 
24290
24250
  class LsDocumentAdapter {
@@ -24465,38 +24425,6 @@ const getGroupData = (id) => {
24465
24425
  `;
24466
24426
  };
24467
24427
 
24468
- /**
24469
- * This module contains all the rules required to mark a template
24470
- * as valid.
24471
- *
24472
- */
24473
- function validate(t) {
24474
- var errors = [];
24475
- // Check for missing signatures
24476
- t.roles.forEach(tr => {
24477
- if (t.elementConnection.templateElements.filter(e => e.formElementType === 'signature' && e.signer === tr.signerIndex && tr.roleType !== 'APPROVER').length === 0) {
24478
- errors.push({
24479
- id: tr.id,
24480
- title: 'Missing signature.',
24481
- description: `{tr.name} is missing a signature.`,
24482
- role: tr,
24483
- });
24484
- }
24485
- });
24486
- // Check for missing multi-select options
24487
- t.elementConnection.templateElements.forEach(element => {
24488
- if (element.validation === 20 && (!element.options || element.options.length === 0)) {
24489
- errors.push({
24490
- id: element.id,
24491
- title: 'Missing options',
24492
- description: `Drop down field "${element.label}" is missing options.`,
24493
- element: element,
24494
- });
24495
- }
24496
- });
24497
- return errors;
24498
- }
24499
-
24500
24428
  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)}";
24501
24429
 
24502
24430
  pdfExports.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.5.207/pdf.worker.min.js';
@@ -24944,7 +24872,14 @@ const LsDocumentViewer$1 = /*@__PURE__*/ proxyCustomElement(class LsDocumentView
24944
24872
  event.preventDefault();
24945
24873
  });
24946
24874
  dropTarget.addEventListener('drop', mouseDrop.bind(this));
24947
- // Generate all the field HTML elements that are required (for every page)
24875
+ this.generateFields();
24876
+ }
24877
+ // Generate all the field HTML elements that are required (for every page)
24878
+ generateFields(clearExisting = true) {
24879
+ if (clearExisting) {
24880
+ const fields = this.component.shadowRoot.querySelectorAll('ls-editor-field');
24881
+ fields.forEach(fi => this.component.shadowRoot.getElementById('ls-document-frame').removeChild(fi));
24882
+ }
24948
24883
  this._template.elementConnection.templateElements.forEach(te => {
24949
24884
  addField.bind(this)(this.component.shadowRoot.getElementById('ls-document-frame'), this.prepareElement(te));
24950
24885
  });
@@ -24987,7 +24922,7 @@ const LsDocumentViewer$1 = /*@__PURE__*/ proxyCustomElement(class LsDocumentView
24987
24922
  });
24988
24923
  }
24989
24924
  render() {
24990
- 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 => {
24925
+ 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 => {
24991
24926
  if (manager.detail === 'document') {
24992
24927
  var documentManager = this.component.shadowRoot.getElementById('ls-document-options');
24993
24928
  documentManager.template = this._template;
@@ -25026,7 +24961,7 @@ const LsDocumentViewer$1 = /*@__PURE__*/ proxyCustomElement(class LsDocumentView
25026
24961
  } })))), 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 => {
25027
24962
  this.selected = [];
25028
24963
  e.preventDefault();
25029
- } }, 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 }))))));
24964
+ } }, 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 }))))));
25030
24965
  }
25031
24966
  static get watchers() { return {
25032
24967
  "mode": ["modeHandler"],