@verdocs/web-sdk 2.3.22 → 2.3.24

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 (69) hide show
  1. package/dist/cjs/{TemplateStore-6a75cdac.js → TemplateStore-079a1f85.js} +22 -0
  2. package/dist/cjs/ipc-test.cjs.entry.js +1 -1
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/verdocs-build.cjs.entry.js +7 -3
  5. package/dist/cjs/verdocs-portal_2.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-preview_8.cjs.entry.js +2 -3
  7. package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +134 -163
  8. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  9. package/dist/collection/components/embeds/verdocs-build/verdocs-build.js +29 -2
  10. package/dist/collection/components/embeds/verdocs-preview/verdocs-preview.js +2 -3
  11. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +21 -23
  12. package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.js +46 -44
  13. package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.js +78 -104
  14. package/dist/collection/utils/TemplateRoleStore.js +19 -0
  15. package/dist/collection/utils/TemplateStore.js +4 -1
  16. package/dist/components/TemplateStore.js +21 -1
  17. package/dist/components/verdocs-build.js +6 -2
  18. package/dist/components/verdocs-preview2.js +1 -2
  19. package/dist/components/verdocs-template-fields2.js +21 -24
  20. package/dist/components/verdocs-template-role-properties2.js +46 -45
  21. package/dist/components/verdocs-template-roles2.js +74 -101
  22. package/dist/docs.json +16 -7
  23. package/dist/esm/{TemplateStore-3994341c.js → TemplateStore-1ee18675.js} +21 -1
  24. package/dist/esm/ipc-test.entry.js +1 -1
  25. package/dist/esm/loader.js +1 -1
  26. package/dist/esm/verdocs-build.entry.js +7 -3
  27. package/dist/esm/verdocs-portal_2.entry.js +1 -1
  28. package/dist/esm/verdocs-preview_8.entry.js +2 -3
  29. package/dist/esm/verdocs-template-fields_4.entry.js +135 -164
  30. package/dist/esm/verdocs-web-sdk.js +1 -1
  31. package/dist/esm-es5/TemplateStore-1ee18675.js +1 -0
  32. package/dist/esm-es5/ipc-test.entry.js +1 -1
  33. package/dist/esm-es5/loader.js +1 -1
  34. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  35. package/dist/esm-es5/verdocs-portal_2.entry.js +1 -1
  36. package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
  37. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
  38. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  39. package/dist/types/components/embeds/verdocs-build/verdocs-build.d.ts +11 -1
  40. package/dist/types/components/embeds/verdocs-preview/verdocs-preview.d.ts +1 -1
  41. package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +3 -2
  42. package/dist/types/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.d.ts +7 -3
  43. package/dist/types/components/templates/verdocs-template-roles/verdocs-template-roles.d.ts +13 -10
  44. package/dist/types/components.d.ts +8 -4
  45. package/dist/types/utils/TemplateRoleStore.d.ts +6 -0
  46. package/dist/verdocs-web-sdk/p-00e49c36.entry.js +1 -0
  47. package/dist/verdocs-web-sdk/p-0bfc239a.system.js +1 -0
  48. package/dist/verdocs-web-sdk/p-2720068f.system.entry.js +1 -0
  49. package/dist/verdocs-web-sdk/p-4fc74ab1.js +1 -0
  50. package/dist/verdocs-web-sdk/{p-07f0bcae.entry.js → p-5361ee8f.entry.js} +1 -1
  51. package/dist/verdocs-web-sdk/p-6ada9427.entry.js +1 -0
  52. package/dist/verdocs-web-sdk/p-7f2f79fa.entry.js +1 -0
  53. package/dist/verdocs-web-sdk/{p-929760fd.system.entry.js → p-9f46a6a9.system.entry.js} +1 -1
  54. package/dist/verdocs-web-sdk/{p-040620ca.system.entry.js → p-b54467df.system.entry.js} +1 -1
  55. package/dist/verdocs-web-sdk/p-b86c345f.system.entry.js +1 -0
  56. package/dist/verdocs-web-sdk/{p-8f8db3aa.entry.js → p-cb429454.entry.js} +1 -1
  57. package/dist/verdocs-web-sdk/p-e080e371.system.entry.js +1 -0
  58. package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
  59. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  60. package/package.json +1 -1
  61. package/dist/esm-es5/TemplateStore-3994341c.js +0 -1
  62. package/dist/verdocs-web-sdk/p-1780a4f1.entry.js +0 -1
  63. package/dist/verdocs-web-sdk/p-66d58683.entry.js +0 -1
  64. package/dist/verdocs-web-sdk/p-79fcaf1e.system.entry.js +0 -1
  65. package/dist/verdocs-web-sdk/p-88c64957.system.entry.js +0 -1
  66. package/dist/verdocs-web-sdk/p-a98b0097.system.js +0 -1
  67. package/dist/verdocs-web-sdk/p-d1837af9.entry.js +0 -1
  68. package/dist/verdocs-web-sdk/p-d5e27c32.system.entry.js +0 -1
  69. package/dist/verdocs-web-sdk/p-fc2454b0.js +0 -1
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy(JSON.parse("[[\"verdocs-build.cjs\",[[0,\"verdocs-build\",{\"endpoint\":[16],\"templateId\":[1537,\"template-id\"],\"step\":[1537],\"store\":[32]}]]],[\"ipc-test.cjs\",[[0,\"ipc-test\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"]}]]],[\"verdocs-settings.cjs\",[[0,\"verdocs-settings\",{\"endpoint\":[16],\"tab\":[32]}]]],[\"verdocs-envelopes-list.cjs\",[[0,\"verdocs-envelopes-list\",{\"endpoint\":[16],\"view\":[1537],\"status\":[1537],\"sort\":[1537],\"match\":[1537],\"showPagination\":[4,\"show-pagination\"],\"rowsPerPage\":[2,\"rows-per-page\"],\"selectedPage\":[2,\"selected-page\"],\"count\":[32],\"initiallyLoaded\":[32],\"loading\":[32],\"selectedEnvelopes\":[32],\"envelopes\":[32]}]]],[\"verdocs-field-attachment.cjs\",[[0,\"verdocs-field-attachment\",{\"templateid\":[1],\"fieldname\":[1],\"disabled\":[4],\"editable\":[4],\"moveable\":[4],\"done\":[4],\"roleindex\":[2],\"xscale\":[2],\"yscale\":[2],\"rerender\":[2],\"showingProperties\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]}]]],[\"verdocs-field-initial.cjs\",[[0,\"verdocs-field-initial\",{\"templateid\":[1],\"fieldname\":[1],\"disabled\":[4],\"initials\":[1],\"editable\":[4],\"moveable\":[4],\"done\":[4],\"roleindex\":[2],\"rerender\":[2],\"xscale\":[2],\"yscale\":[2],\"showingProperties\":[32],\"tempInitials\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]}]]],[\"verdocs-field-signature.cjs\",[[0,\"verdocs-field-signature\",{\"templateid\":[1],\"fieldname\":[1],\"name\":[1],\"disabled\":[4],\"editable\":[4],\"moveable\":[4],\"done\":[4],\"roleindex\":[2],\"rerender\":[2],\"xscale\":[2],\"yscale\":[2],\"showingProperties\":[32],\"tempSignature\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]}]]],[\"verdocs-templates-list.cjs\",[[0,\"verdocs-templates-list\",{\"endpoint\":[16],\"sharing\":[1537],\"starred\":[1537],\"sort\":[1537],\"name\":[1537],\"allowedActions\":[1040],\"showPagination\":[4,\"show-pagination\"],\"rowsPerPage\":[2,\"rows-per-page\"],\"selectedPage\":[2,\"selected-page\"],\"count\":[32],\"initiallyLoaded\":[32],\"loading\":[32],\"confirmDelete\":[32],\"templates\":[32],\"localNameFilter\":[32]}]]],[\"verdocs-field-checkbox.cjs\",[[0,\"verdocs-field-checkbox\",{\"templateid\":[1],\"fieldname\":[1],\"option\":[2],\"disabled\":[4],\"done\":[4],\"roleindex\":[2],\"editable\":[4],\"moveable\":[4],\"rerender\":[2],\"xscale\":[2],\"yscale\":[2],\"showingProperties\":[32],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]}]]],[\"verdocs-field-date.cjs\",[[0,\"verdocs-field-date\",{\"templateid\":[1],\"fieldname\":[1],\"disabled\":[4],\"editable\":[4],\"moveable\":[4],\"done\":[4],\"roleindex\":[2],\"rerender\":[2],\"xscale\":[2],\"yscale\":[2],\"containerId\":[32],\"showingProperties\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]}]]],[\"verdocs-field-dropdown.cjs\",[[0,\"verdocs-field-dropdown\",{\"templateid\":[1],\"fieldname\":[1],\"disabled\":[4],\"editable\":[4],\"moveable\":[4],\"done\":[4],\"roleindex\":[2],\"rerender\":[2],\"xscale\":[2],\"yscale\":[2],\"showingProperties\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]}]]],[\"verdocs-field-radio-button.cjs\",[[0,\"verdocs-field-radio-button\",{\"templateid\":[1],\"fieldname\":[1],\"option\":[2],\"disabled\":[4],\"done\":[4],\"roleindex\":[2],\"editable\":[4],\"moveable\":[4],\"rerender\":[2],\"xscale\":[2],\"yscale\":[2],\"showingProperties\":[32],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]}]]],[\"verdocs-field-textarea.cjs\",[[0,\"verdocs-field-textarea\",{\"endpoint\":[16],\"templateid\":[1],\"fieldname\":[1],\"disabled\":[4],\"editable\":[4],\"moveable\":[4],\"done\":[4],\"roleindex\":[2],\"xscale\":[2],\"yscale\":[2],\"rerender\":[2],\"showingProperties\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]}]]],[\"verdocs-field-textbox.cjs\",[[0,\"verdocs-field-textbox\",{\"endpoint\":[16],\"templateid\":[1],\"fieldname\":[1],\"disabled\":[4],\"editable\":[4],\"moveable\":[4],\"done\":[4],\"roleindex\":[2],\"xscale\":[2],\"yscale\":[2],\"rerender\":[2],\"showingProperties\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]}]]],[\"verdocs-field-timestamp.cjs\",[[0,\"verdocs-field-timestamp\",{\"templateid\":[1],\"fieldname\":[1],\"disabled\":[4],\"editable\":[4],\"moveable\":[4],\"done\":[4],\"roleindex\":[2],\"rerender\":[2],\"xscale\":[2],\"yscale\":[2],\"showingProperties\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]}]]],[\"verdocs-sign.cjs\",[[0,\"verdocs-sign\",{\"envelopeId\":[1,\"envelope-id\"],\"roleId\":[1,\"role-id\"],\"inviteCode\":[1,\"invite-code\"],\"headerTargetId\":[1,\"header-target-id\"],\"envelope\":[32],\"roleNames\":[32],\"sortedRecipients\":[32],\"recipient\":[32],\"signerToken\":[32],\"hasSignature\":[32],\"nextButtonLabel\":[32],\"nextSubmits\":[32],\"errorMessage\":[32],\"focusedField\":[32],\"submitting\":[32],\"isDone\":[32],\"showDone\":[32],\"showLoadError\":[32],\"finishLater\":[32],\"showFinishLater\":[32],\"agreed\":[32],\"documentsSingularPlural\":[32]}]]],[\"verdocs-envelope-sidebar.cjs\",[[0,\"verdocs-envelope-sidebar\",{\"endpoint\":[16],\"envelopeId\":[1,\"envelope-id\"],\"activeTab\":[32],\"panelOpen\":[32],\"showManageDialog\":[32],\"showRecipientDialog\":[32],\"showCancelDialog\":[32],\"loading\":[32]}]]],[\"verdocs-auth.cjs\",[[0,\"verdocs-auth\",{\"endpoint\":[16],\"visible\":[4],\"logo\":[1],\"isAuthenticated\":[32],\"displayMode\":[32],\"orgname\":[32],\"first\":[32],\"last\":[32],\"username\":[32],\"phone\":[32],\"password\":[32],\"submitting\":[32],\"activeSession\":[32],\"accountType\":[32],\"howHear\":[32],\"industry\":[32],\"companySize\":[32],\"reason\":[32],\"signupStep\":[32],\"resendDisabled\":[32],\"checkingOrg\":[32]}]]],[\"verdocs-search.cjs\",[[0,\"verdocs-search\",{\"endpoint\":[16]}]]],[\"verdocs-activity-box.cjs\",[[0,\"verdocs-activity-box\",{\"endpoint\":[16],\"items\":[2],\"view\":[1],\"header\":[1],\"title\":[32],\"count\":[32],\"loading\":[32],\"entries\":[32]}]]],[\"verdocs-floating-menu.cjs\",[[0,\"verdocs-floating-menu\",{\"options\":[16]}]]],[\"verdocs-kba-dialog.cjs\",[[0,\"verdocs-kba-dialog\",{\"step\":[2],\"steps\":[2],\"helptitle\":[1],\"helptext\":[1],\"mode\":[1],\"label\":[1],\"placeholder\":[1],\"choices\":[16],\"response\":[32]}]]],[\"verdocs-button-panel.cjs\",[[4,\"verdocs-button-panel\",{\"icon\":[1],\"showPanel\":[64],\"hidePanel\":[64],\"toggle\":[64]}]]],[\"verdocs-field-payment.cjs\",[[0,\"verdocs-field-payment\",{\"templateid\":[1],\"fieldname\":[1],\"disabled\":[4],\"fields\":[16],\"pageNum\":[2,\"page-num\"],\"roleName\":[1,\"role-name\"],\"fieldId\":[1,\"field-id\"],\"recipients\":[8],\"selectedRoleName\":[1,\"selected-role-name\"],\"pdfPages\":[16],\"currentSignature\":[1,\"current-signature\"],\"currentSignatureId\":[1,\"current-signature-id\"],\"currentInitial\":[1,\"current-initial\"],\"currentInitialId\":[1,\"current-initial-id\"],\"focused\":[4],\"signed\":[4],\"xscale\":[2],\"yscale\":[2],\"rerender\":[2],\"roleindex\":[2],\"preparedMessage\":[32],\"signatureUrl\":[32],\"showingProperties\":[32],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]}]]],[\"verdocs-organization-card.cjs\",[[0,\"verdocs-organization-card\",{\"organization\":[16]}]]],[\"verdocs-search-tabs.cjs\",[[0,\"verdocs-search-tabs\",{\"selected\":[32]}]]],[\"verdocs-template-card.cjs\",[[0,\"verdocs-template-card\",{\"template\":[16]}]]],[\"verdocs-template-tags.cjs\",[[0,\"verdocs-template-tags\",{\"tags\":[16]}]]],[\"verdocs-toggle.cjs\",[[0,\"verdocs-toggle\",{\"options\":[16],\"theme\":[1],\"selectedOption\":[32]}]]],[\"verdocs-view.cjs\",[[0,\"verdocs-view\",{\"endpoint\":[16],\"envelopeId\":[1,\"envelope-id\"],\"headerTargetId\":[1,\"header-target-id\"],\"canceling\":[32],\"envelope\":[32],\"roleNames\":[32],\"showCancelDone\":[32]}]]],[\"verdocs-initial-dialog.cjs\",[[0,\"verdocs-initial-dialog\",{\"initials\":[1],\"fontLoaded\":[32],\"enteredInitials\":[32],\"mode\":[32]}]]],[\"verdocs-signature-dialog.cjs\",[[0,\"verdocs-signature-dialog\",{\"name\":[1],\"fontLoaded\":[32],\"enteredName\":[32],\"mode\":[32]}]]],[\"verdocs-upload-dialog.cjs\",[[0,\"verdocs-upload-dialog\",{\"draggingOver\":[32],\"decodedFiles\":[32]}]]],[\"verdocs-status-indicator.cjs\",[[0,\"verdocs-status-indicator\",{\"size\":[1],\"theme\":[1],\"status\":[1],\"envelope\":[16],\"isOpen\":[32],\"containerId\":[32]}]]],[\"verdocs-template-star.cjs\",[[0,\"verdocs-template-star\",{\"endpoint\":[16],\"template\":[1040],\"updating\":[32]}]]],[\"verdocs-envelope-recipient-link_2.cjs\",[[0,\"verdocs-envelope-recipient-link\",{\"endpoint\":[16],\"envelopeId\":[1,\"envelope-id\"],\"roleName\":[1,\"role-name\"],\"isOpen\":[32],\"loading\":[32],\"gettingLink\":[32],\"link\":[32]}],[0,\"verdocs-envelope-recipient-summary\",{\"endpoint\":[16],\"envelopeId\":[1,\"envelope-id\"],\"canSendAnother\":[4,\"can-send-another\"],\"canView\":[4,\"can-view\"],\"canDone\":[4,\"can-done\"],\"isOpen\":[32],\"loading\":[32],\"recipientStatusIcons\":[32],\"containerId\":[32],\"gettingLinks\":[32],\"links\":[32]}]]],[\"verdocs-quick-functions_2.cjs\",[[0,\"verdocs-quick-functions\",{\"endpoint\":[16]}],[0,\"verdocs-search-box\",{\"endpoint\":[16],\"placeholder\":[1],\"type\":[1],\"query\":[1],\"grabsFocus\":[4,\"grabs-focus\"],\"focusField\":[64]}]]],[\"verdocs-envelope-document-page.cjs\",[[0,\"verdocs-envelope-document-page\",{\"endpoint\":[16],\"envelopeId\":[1,\"envelope-id\"],\"documentId\":[1,\"document-id\"],\"pageNumber\":[2,\"page-number\"],\"virtualWidth\":[2,\"virtual-width\"],\"virtualHeight\":[1026,\"virtual-height\"],\"layers\":[16],\"type\":[1],\"containerId\":[32],\"renderedWidth\":[32],\"renderedHeight\":[32],\"naturalWidth\":[32],\"naturalHeight\":[32],\"aspectRatio\":[32],\"skipFirstNotification\":[32],\"pageDisplayUri\":[32]}]]],[\"verdocs-settings-api-keys_4.cjs\",[[0,\"verdocs-settings-members\",{\"endpoint\":[16],\"members\":[32],\"invited\":[32],\"roles\":[32],\"selectedTab\":[32],\"invitingMember\":[32],\"newEmailAddress\":[32],\"newRoleId\":[32],\"submitting\":[32],\"deletingInvitation\":[32],\"resendingInvitation\":[32],\"deletingMember\":[32]}],[0,\"verdocs-settings-api-keys\",{\"endpoint\":[16],\"keys\":[32],\"creatingKey\":[32],\"createdKey\":[32],\"deletingKey\":[32],\"rotatingKey\":[32],\"newApiKeyName\":[32],\"newApiKeyProfileId\":[32],\"members\":[32]}],[0,\"verdocs-settings-organization\",{\"endpoint\":[16],\"valid\":[32],\"dirty\":[32],\"submitting\":[32],\"name\":[32],\"business_name\":[32],\"contact_email\":[32],\"phone\":[32],\"address\":[32],\"address2\":[32],\"timezone\":[32],\"url\":[32]}],[0,\"verdocs-settings-profile\",{\"endpoint\":[16],\"valid\":[32],\"dirty\":[32],\"submitting\":[32],\"first_name\":[32],\"last_name\":[32],\"email\":[32],\"phone\":[32]}]]],[\"verdocs-pagination_2.cjs\",[[0,\"verdocs-pagination\",{\"selectedPage\":[1538,\"selected-page\"],\"itemCount\":[2,\"item-count\"],\"perPage\":[2,\"per-page\"]}],[0,\"verdocs-quick-filter\",{\"options\":[16],\"label\":[1],\"value\":[1537],\"placeholder\":[1],\"open\":[32]}]]],[\"verdocs-radio-button.cjs\",[[0,\"verdocs-radio-button\",{\"checked\":[4],\"name\":[1],\"value\":[1],\"disabled\":[4]}]]],[\"verdocs-spinner.cjs\",[[0,\"verdocs-spinner\",{\"size\":[2],\"mode\":[1]}]]],[\"verdocs-tabs.cjs\",[[4,\"verdocs-tabs\",{\"tabs\":[16],\"selectedTab\":[2,\"selected-tab\"]}]]],[\"verdocs-contact-picker_2.cjs\",[[0,\"verdocs-contact-picker\",{\"endpoint\":[16],\"templateRole\":[16],\"contactSuggestions\":[16],\"name\":[32],\"email\":[32],\"phone\":[32],\"message\":[32],\"showSuggestions\":[32],\"showMessage\":[32],\"delegator\":[32],\"nameFieldId\":[32],\"emailFieldId\":[32],\"phoneFieldId\":[32]}],[0,\"verdocs-toggle-button\",{\"active\":[4],\"icon\":[1],\"label\":[1],\"size\":[1],\"_active\":[32]}]]],[\"verdocs-file-chooser_2.cjs\",[[0,\"verdocs-file-chooser\",{\"endpoint\":[16],\"file\":[32]}],[0,\"verdocs-progress-bar\",{\"label\":[1],\"showPercent\":[4,\"show-percent\"],\"percent\":[2]}]]],[\"verdocs-dropdown.cjs\",[[0,\"verdocs-dropdown\",{\"options\":[16]},[[9,\"resize\",\"handleResize\"]]]]],[\"verdocs-dialog_2.cjs\",[[4,\"verdocs-dialog\"],[0,\"verdocs-table\",{\"columns\":[16],\"data\":[16]}]]],[\"verdocs-template-document-page_2.cjs\",[[0,\"verdocs-template-document-page\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"documentId\":[1,\"document-id\"],\"pageNumber\":[2,\"page-number\"],\"virtualWidth\":[2,\"virtual-width\"],\"virtualHeight\":[1026,\"virtual-height\"],\"layers\":[16],\"containerId\":[32],\"renderedWidth\":[32],\"renderedHeight\":[32],\"naturalWidth\":[32],\"naturalHeight\":[32],\"aspectRatio\":[32],\"skipFirstNotification\":[32],\"pageDisplayUri\":[32]}],[0,\"verdocs-toolbar-icon\",{\"text\":[1],\"icon\":[1],\"placement\":[1],\"containerId\":[32]}]]],[\"verdocs-button_3.cjs\",[[0,\"verdocs-text-input\",{\"value\":[1537],\"label\":[1],\"placeholder\":[1],\"autocomplete\":[1],\"helpText\":[1,\"help-text\"],\"clearable\":[4],\"copyable\":[4],\"type\":[1],\"disabled\":[4],\"required\":[4]}],[0,\"verdocs-help-icon\",{\"text\":[1],\"icon\":[1],\"containerId\":[32]}],[0,\"verdocs-button\",{\"label\":[1],\"startIcon\":[1,\"start-icon\"],\"endIcon\":[1,\"end-icon\"],\"size\":[1],\"type\":[1],\"variant\":[1],\"disabled\":[4]}]]],[\"verdocs-ok-dialog.cjs\",[[0,\"verdocs-ok-dialog\",{\"heading\":[1],\"message\":[1],\"buttonLabel\":[1,\"button-label\"],\"showCancel\":[4,\"show-cancel\"],\"closed\":[32]}]]],[\"verdocs-loader.cjs\",[[0,\"verdocs-loader\"]]],[\"verdocs-checkbox_3.cjs\",[[0,\"verdocs-checkbox\",{\"checked\":[4],\"name\":[1],\"label\":[1],\"value\":[1],\"theme\":[1],\"disabled\":[4]}],[0,\"verdocs-component-error\",{\"message\":[1]}],[0,\"verdocs-select-input\",{\"value\":[1],\"label\":[1],\"options\":[16],\"disabled\":[4]}]]],[\"verdocs-preview_8.cjs\",[[0,\"verdocs-template-attachments\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"uploading\":[32],\"progressLabel\":[32],\"progressPercent\":[32],\"showDeleteError\":[32],\"confirmDeleteDocument\":[32],\"store\":[32]}],[0,\"verdocs-template-reminders\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"showPlanBlocker\":[32],\"sendReminders\":[32],\"firstReminderDays\":[32],\"reminderDays\":[32],\"dirty\":[32]}],[0,\"verdocs-send\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"environment\":[1],\"containerId\":[32],\"rolesAtLevel\":[32],\"showPickerForId\":[32],\"sessionContacts\":[32],\"sending\":[32],\"rolesCompleted\":[32],\"reset\":[64]}],[0,\"verdocs-template-name\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"name\":[32],\"dirty\":[32]}],[0,\"verdocs-template-create\",{\"endpoint\":[16],\"file\":[32],\"creating\":[32],\"progressLabel\":[32],\"progressPercent\":[32]}],[0,\"verdocs-template-visibility\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"dirty\":[32],\"personal\":[32],\"public\":[32]}],[0,\"verdocs-preview\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"]}],[0,\"verdocs-template-build-tabs\",{\"endpoint\":[16],\"templateId\":[1537,\"template-id\"],\"step\":[1537],\"store\":[32]}]]],[\"verdocs-template-fields_4.cjs\",[[0,\"verdocs-template-roles\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"showingRoleDialog\":[32],\"showingSenderDialog\":[32],\"sender\":[32]}],[0,\"verdocs-template-fields\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"toolbarTargetId\":[1,\"toolbar-target-id\"],\"placing\":[32],\"showMustSelectRole\":[32],\"selectedRoleName\":[32],\"rerender\":[32]},[[4,\"keydown\",\"handleKeyDown\"]]],[0,\"verdocs-template-role-properties\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"roleName\":[1,\"role-name\"],\"sender\":[1],\"dirty\":[32],\"saving\":[32],\"name\":[32],\"type\":[32],\"fullName\":[32],\"email\":[32],\"phone\":[32],\"allowDelegation\":[32]}],[0,\"verdocs-template-sender\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"sender\":[1],\"saving\":[32]}]]],[\"verdocs-portal_2.cjs\",[[0,\"verdocs-template-field-properties\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"fieldName\":[1,\"field-name\"],\"helpText\":[1,\"help-text\"],\"dirty\":[32],\"loading\":[32],\"setting\":[32],\"label\":[32],\"type\":[32],\"name\":[32],\"required\":[32],\"roleName\":[32],\"group\":[32],\"fieldType\":[32],\"options\":[32],\"placeholder\":[32],\"value\":[32],\"leading\":[32],\"showingHelp\":[32]}],[4,\"verdocs-portal\",{\"anchor\":[1],\"voffset\":[2],\"align\":[1]},[[11,\"scroll\",\"handleScroll\"],[11,\"resize\",\"handleResize\"],[10,\"click\",\"handleClick\"]]]]]]"), options);
18
+ return index.bootstrapLazy(JSON.parse("[[\"verdocs-build.cjs\",[[0,\"verdocs-build\",{\"endpoint\":[16],\"templateId\":[1537,\"template-id\"],\"step\":[1537],\"store\":[32]}]]],[\"ipc-test.cjs\",[[0,\"ipc-test\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"]}]]],[\"verdocs-settings.cjs\",[[0,\"verdocs-settings\",{\"endpoint\":[16],\"tab\":[32]}]]],[\"verdocs-envelopes-list.cjs\",[[0,\"verdocs-envelopes-list\",{\"endpoint\":[16],\"view\":[1537],\"status\":[1537],\"sort\":[1537],\"match\":[1537],\"showPagination\":[4,\"show-pagination\"],\"rowsPerPage\":[2,\"rows-per-page\"],\"selectedPage\":[2,\"selected-page\"],\"count\":[32],\"initiallyLoaded\":[32],\"loading\":[32],\"selectedEnvelopes\":[32],\"envelopes\":[32]}]]],[\"verdocs-field-attachment.cjs\",[[0,\"verdocs-field-attachment\",{\"templateid\":[1],\"fieldname\":[1],\"disabled\":[4],\"editable\":[4],\"moveable\":[4],\"done\":[4],\"roleindex\":[2],\"xscale\":[2],\"yscale\":[2],\"rerender\":[2],\"showingProperties\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]}]]],[\"verdocs-field-initial.cjs\",[[0,\"verdocs-field-initial\",{\"templateid\":[1],\"fieldname\":[1],\"disabled\":[4],\"initials\":[1],\"editable\":[4],\"moveable\":[4],\"done\":[4],\"roleindex\":[2],\"rerender\":[2],\"xscale\":[2],\"yscale\":[2],\"showingProperties\":[32],\"tempInitials\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]}]]],[\"verdocs-field-signature.cjs\",[[0,\"verdocs-field-signature\",{\"templateid\":[1],\"fieldname\":[1],\"name\":[1],\"disabled\":[4],\"editable\":[4],\"moveable\":[4],\"done\":[4],\"roleindex\":[2],\"rerender\":[2],\"xscale\":[2],\"yscale\":[2],\"showingProperties\":[32],\"tempSignature\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]}]]],[\"verdocs-templates-list.cjs\",[[0,\"verdocs-templates-list\",{\"endpoint\":[16],\"sharing\":[1537],\"starred\":[1537],\"sort\":[1537],\"name\":[1537],\"allowedActions\":[1040],\"showPagination\":[4,\"show-pagination\"],\"rowsPerPage\":[2,\"rows-per-page\"],\"selectedPage\":[2,\"selected-page\"],\"count\":[32],\"initiallyLoaded\":[32],\"loading\":[32],\"confirmDelete\":[32],\"templates\":[32],\"localNameFilter\":[32]}]]],[\"verdocs-field-checkbox.cjs\",[[0,\"verdocs-field-checkbox\",{\"templateid\":[1],\"fieldname\":[1],\"option\":[2],\"disabled\":[4],\"done\":[4],\"roleindex\":[2],\"editable\":[4],\"moveable\":[4],\"rerender\":[2],\"xscale\":[2],\"yscale\":[2],\"showingProperties\":[32],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]}]]],[\"verdocs-field-date.cjs\",[[0,\"verdocs-field-date\",{\"templateid\":[1],\"fieldname\":[1],\"disabled\":[4],\"editable\":[4],\"moveable\":[4],\"done\":[4],\"roleindex\":[2],\"rerender\":[2],\"xscale\":[2],\"yscale\":[2],\"containerId\":[32],\"showingProperties\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]}]]],[\"verdocs-field-dropdown.cjs\",[[0,\"verdocs-field-dropdown\",{\"templateid\":[1],\"fieldname\":[1],\"disabled\":[4],\"editable\":[4],\"moveable\":[4],\"done\":[4],\"roleindex\":[2],\"rerender\":[2],\"xscale\":[2],\"yscale\":[2],\"showingProperties\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]}]]],[\"verdocs-field-radio-button.cjs\",[[0,\"verdocs-field-radio-button\",{\"templateid\":[1],\"fieldname\":[1],\"option\":[2],\"disabled\":[4],\"done\":[4],\"roleindex\":[2],\"editable\":[4],\"moveable\":[4],\"rerender\":[2],\"xscale\":[2],\"yscale\":[2],\"showingProperties\":[32],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]}]]],[\"verdocs-field-textarea.cjs\",[[0,\"verdocs-field-textarea\",{\"endpoint\":[16],\"templateid\":[1],\"fieldname\":[1],\"disabled\":[4],\"editable\":[4],\"moveable\":[4],\"done\":[4],\"roleindex\":[2],\"xscale\":[2],\"yscale\":[2],\"rerender\":[2],\"showingProperties\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]}]]],[\"verdocs-field-textbox.cjs\",[[0,\"verdocs-field-textbox\",{\"endpoint\":[16],\"templateid\":[1],\"fieldname\":[1],\"disabled\":[4],\"editable\":[4],\"moveable\":[4],\"done\":[4],\"roleindex\":[2],\"xscale\":[2],\"yscale\":[2],\"rerender\":[2],\"showingProperties\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]}]]],[\"verdocs-field-timestamp.cjs\",[[0,\"verdocs-field-timestamp\",{\"templateid\":[1],\"fieldname\":[1],\"disabled\":[4],\"editable\":[4],\"moveable\":[4],\"done\":[4],\"roleindex\":[2],\"rerender\":[2],\"xscale\":[2],\"yscale\":[2],\"showingProperties\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]}]]],[\"verdocs-sign.cjs\",[[0,\"verdocs-sign\",{\"envelopeId\":[1,\"envelope-id\"],\"roleId\":[1,\"role-id\"],\"inviteCode\":[1,\"invite-code\"],\"headerTargetId\":[1,\"header-target-id\"],\"envelope\":[32],\"roleNames\":[32],\"sortedRecipients\":[32],\"recipient\":[32],\"signerToken\":[32],\"hasSignature\":[32],\"nextButtonLabel\":[32],\"nextSubmits\":[32],\"errorMessage\":[32],\"focusedField\":[32],\"submitting\":[32],\"isDone\":[32],\"showDone\":[32],\"showLoadError\":[32],\"finishLater\":[32],\"showFinishLater\":[32],\"agreed\":[32],\"documentsSingularPlural\":[32]}]]],[\"verdocs-envelope-sidebar.cjs\",[[0,\"verdocs-envelope-sidebar\",{\"endpoint\":[16],\"envelopeId\":[1,\"envelope-id\"],\"activeTab\":[32],\"panelOpen\":[32],\"showManageDialog\":[32],\"showRecipientDialog\":[32],\"showCancelDialog\":[32],\"loading\":[32]}]]],[\"verdocs-auth.cjs\",[[0,\"verdocs-auth\",{\"endpoint\":[16],\"visible\":[4],\"logo\":[1],\"isAuthenticated\":[32],\"displayMode\":[32],\"orgname\":[32],\"first\":[32],\"last\":[32],\"username\":[32],\"phone\":[32],\"password\":[32],\"submitting\":[32],\"activeSession\":[32],\"accountType\":[32],\"howHear\":[32],\"industry\":[32],\"companySize\":[32],\"reason\":[32],\"signupStep\":[32],\"resendDisabled\":[32],\"checkingOrg\":[32]}]]],[\"verdocs-search.cjs\",[[0,\"verdocs-search\",{\"endpoint\":[16]}]]],[\"verdocs-activity-box.cjs\",[[0,\"verdocs-activity-box\",{\"endpoint\":[16],\"items\":[2],\"view\":[1],\"header\":[1],\"title\":[32],\"count\":[32],\"loading\":[32],\"entries\":[32]}]]],[\"verdocs-floating-menu.cjs\",[[0,\"verdocs-floating-menu\",{\"options\":[16]}]]],[\"verdocs-kba-dialog.cjs\",[[0,\"verdocs-kba-dialog\",{\"step\":[2],\"steps\":[2],\"helptitle\":[1],\"helptext\":[1],\"mode\":[1],\"label\":[1],\"placeholder\":[1],\"choices\":[16],\"response\":[32]}]]],[\"verdocs-button-panel.cjs\",[[4,\"verdocs-button-panel\",{\"icon\":[1],\"showPanel\":[64],\"hidePanel\":[64],\"toggle\":[64]}]]],[\"verdocs-field-payment.cjs\",[[0,\"verdocs-field-payment\",{\"templateid\":[1],\"fieldname\":[1],\"disabled\":[4],\"fields\":[16],\"pageNum\":[2,\"page-num\"],\"roleName\":[1,\"role-name\"],\"fieldId\":[1,\"field-id\"],\"recipients\":[8],\"selectedRoleName\":[1,\"selected-role-name\"],\"pdfPages\":[16],\"currentSignature\":[1,\"current-signature\"],\"currentSignatureId\":[1,\"current-signature-id\"],\"currentInitial\":[1,\"current-initial\"],\"currentInitialId\":[1,\"current-initial-id\"],\"focused\":[4],\"signed\":[4],\"xscale\":[2],\"yscale\":[2],\"rerender\":[2],\"roleindex\":[2],\"preparedMessage\":[32],\"signatureUrl\":[32],\"showingProperties\":[32],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]}]]],[\"verdocs-organization-card.cjs\",[[0,\"verdocs-organization-card\",{\"organization\":[16]}]]],[\"verdocs-search-tabs.cjs\",[[0,\"verdocs-search-tabs\",{\"selected\":[32]}]]],[\"verdocs-template-card.cjs\",[[0,\"verdocs-template-card\",{\"template\":[16]}]]],[\"verdocs-template-tags.cjs\",[[0,\"verdocs-template-tags\",{\"tags\":[16]}]]],[\"verdocs-toggle.cjs\",[[0,\"verdocs-toggle\",{\"options\":[16],\"theme\":[1],\"selectedOption\":[32]}]]],[\"verdocs-view.cjs\",[[0,\"verdocs-view\",{\"endpoint\":[16],\"envelopeId\":[1,\"envelope-id\"],\"headerTargetId\":[1,\"header-target-id\"],\"canceling\":[32],\"envelope\":[32],\"roleNames\":[32],\"showCancelDone\":[32]}]]],[\"verdocs-initial-dialog.cjs\",[[0,\"verdocs-initial-dialog\",{\"initials\":[1],\"fontLoaded\":[32],\"enteredInitials\":[32],\"mode\":[32]}]]],[\"verdocs-signature-dialog.cjs\",[[0,\"verdocs-signature-dialog\",{\"name\":[1],\"fontLoaded\":[32],\"enteredName\":[32],\"mode\":[32]}]]],[\"verdocs-upload-dialog.cjs\",[[0,\"verdocs-upload-dialog\",{\"draggingOver\":[32],\"decodedFiles\":[32]}]]],[\"verdocs-status-indicator.cjs\",[[0,\"verdocs-status-indicator\",{\"size\":[1],\"theme\":[1],\"status\":[1],\"envelope\":[16],\"isOpen\":[32],\"containerId\":[32]}]]],[\"verdocs-template-star.cjs\",[[0,\"verdocs-template-star\",{\"endpoint\":[16],\"template\":[1040],\"updating\":[32]}]]],[\"verdocs-envelope-recipient-link_2.cjs\",[[0,\"verdocs-envelope-recipient-link\",{\"endpoint\":[16],\"envelopeId\":[1,\"envelope-id\"],\"roleName\":[1,\"role-name\"],\"isOpen\":[32],\"loading\":[32],\"gettingLink\":[32],\"link\":[32]}],[0,\"verdocs-envelope-recipient-summary\",{\"endpoint\":[16],\"envelopeId\":[1,\"envelope-id\"],\"canSendAnother\":[4,\"can-send-another\"],\"canView\":[4,\"can-view\"],\"canDone\":[4,\"can-done\"],\"isOpen\":[32],\"loading\":[32],\"recipientStatusIcons\":[32],\"containerId\":[32],\"gettingLinks\":[32],\"links\":[32]}]]],[\"verdocs-quick-functions_2.cjs\",[[0,\"verdocs-quick-functions\",{\"endpoint\":[16]}],[0,\"verdocs-search-box\",{\"endpoint\":[16],\"placeholder\":[1],\"type\":[1],\"query\":[1],\"grabsFocus\":[4,\"grabs-focus\"],\"focusField\":[64]}]]],[\"verdocs-envelope-document-page.cjs\",[[0,\"verdocs-envelope-document-page\",{\"endpoint\":[16],\"envelopeId\":[1,\"envelope-id\"],\"documentId\":[1,\"document-id\"],\"pageNumber\":[2,\"page-number\"],\"virtualWidth\":[2,\"virtual-width\"],\"virtualHeight\":[1026,\"virtual-height\"],\"layers\":[16],\"type\":[1],\"containerId\":[32],\"renderedWidth\":[32],\"renderedHeight\":[32],\"naturalWidth\":[32],\"naturalHeight\":[32],\"aspectRatio\":[32],\"skipFirstNotification\":[32],\"pageDisplayUri\":[32]}]]],[\"verdocs-settings-api-keys_4.cjs\",[[0,\"verdocs-settings-members\",{\"endpoint\":[16],\"members\":[32],\"invited\":[32],\"roles\":[32],\"selectedTab\":[32],\"invitingMember\":[32],\"newEmailAddress\":[32],\"newRoleId\":[32],\"submitting\":[32],\"deletingInvitation\":[32],\"resendingInvitation\":[32],\"deletingMember\":[32]}],[0,\"verdocs-settings-api-keys\",{\"endpoint\":[16],\"keys\":[32],\"creatingKey\":[32],\"createdKey\":[32],\"deletingKey\":[32],\"rotatingKey\":[32],\"newApiKeyName\":[32],\"newApiKeyProfileId\":[32],\"members\":[32]}],[0,\"verdocs-settings-organization\",{\"endpoint\":[16],\"valid\":[32],\"dirty\":[32],\"submitting\":[32],\"name\":[32],\"business_name\":[32],\"contact_email\":[32],\"phone\":[32],\"address\":[32],\"address2\":[32],\"timezone\":[32],\"url\":[32]}],[0,\"verdocs-settings-profile\",{\"endpoint\":[16],\"valid\":[32],\"dirty\":[32],\"submitting\":[32],\"first_name\":[32],\"last_name\":[32],\"email\":[32],\"phone\":[32]}]]],[\"verdocs-pagination_2.cjs\",[[0,\"verdocs-pagination\",{\"selectedPage\":[1538,\"selected-page\"],\"itemCount\":[2,\"item-count\"],\"perPage\":[2,\"per-page\"]}],[0,\"verdocs-quick-filter\",{\"options\":[16],\"label\":[1],\"value\":[1537],\"placeholder\":[1],\"open\":[32]}]]],[\"verdocs-radio-button.cjs\",[[0,\"verdocs-radio-button\",{\"checked\":[4],\"name\":[1],\"value\":[1],\"disabled\":[4]}]]],[\"verdocs-spinner.cjs\",[[0,\"verdocs-spinner\",{\"size\":[2],\"mode\":[1]}]]],[\"verdocs-tabs.cjs\",[[4,\"verdocs-tabs\",{\"tabs\":[16],\"selectedTab\":[2,\"selected-tab\"]}]]],[\"verdocs-contact-picker_2.cjs\",[[0,\"verdocs-contact-picker\",{\"endpoint\":[16],\"templateRole\":[16],\"contactSuggestions\":[16],\"name\":[32],\"email\":[32],\"phone\":[32],\"message\":[32],\"showSuggestions\":[32],\"showMessage\":[32],\"delegator\":[32],\"nameFieldId\":[32],\"emailFieldId\":[32],\"phoneFieldId\":[32]}],[0,\"verdocs-toggle-button\",{\"active\":[4],\"icon\":[1],\"label\":[1],\"size\":[1],\"_active\":[32]}]]],[\"verdocs-file-chooser_2.cjs\",[[0,\"verdocs-file-chooser\",{\"endpoint\":[16],\"file\":[32]}],[0,\"verdocs-progress-bar\",{\"label\":[1],\"showPercent\":[4,\"show-percent\"],\"percent\":[2]}]]],[\"verdocs-dropdown.cjs\",[[0,\"verdocs-dropdown\",{\"options\":[16]},[[9,\"resize\",\"handleResize\"]]]]],[\"verdocs-dialog_2.cjs\",[[4,\"verdocs-dialog\"],[0,\"verdocs-table\",{\"columns\":[16],\"data\":[16]}]]],[\"verdocs-template-document-page_2.cjs\",[[0,\"verdocs-template-document-page\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"documentId\":[1,\"document-id\"],\"pageNumber\":[2,\"page-number\"],\"virtualWidth\":[2,\"virtual-width\"],\"virtualHeight\":[1026,\"virtual-height\"],\"layers\":[16],\"containerId\":[32],\"renderedWidth\":[32],\"renderedHeight\":[32],\"naturalWidth\":[32],\"naturalHeight\":[32],\"aspectRatio\":[32],\"skipFirstNotification\":[32],\"pageDisplayUri\":[32]}],[0,\"verdocs-toolbar-icon\",{\"text\":[1],\"icon\":[1],\"placement\":[1],\"containerId\":[32]}]]],[\"verdocs-button_3.cjs\",[[0,\"verdocs-text-input\",{\"value\":[1537],\"label\":[1],\"placeholder\":[1],\"autocomplete\":[1],\"helpText\":[1,\"help-text\"],\"clearable\":[4],\"copyable\":[4],\"type\":[1],\"disabled\":[4],\"required\":[4]}],[0,\"verdocs-help-icon\",{\"text\":[1],\"icon\":[1],\"containerId\":[32]}],[0,\"verdocs-button\",{\"label\":[1],\"startIcon\":[1,\"start-icon\"],\"endIcon\":[1,\"end-icon\"],\"size\":[1],\"type\":[1],\"variant\":[1],\"disabled\":[4]}]]],[\"verdocs-ok-dialog.cjs\",[[0,\"verdocs-ok-dialog\",{\"heading\":[1],\"message\":[1],\"buttonLabel\":[1,\"button-label\"],\"showCancel\":[4,\"show-cancel\"],\"closed\":[32]}]]],[\"verdocs-loader.cjs\",[[0,\"verdocs-loader\"]]],[\"verdocs-checkbox_3.cjs\",[[0,\"verdocs-checkbox\",{\"checked\":[4],\"name\":[1],\"label\":[1],\"value\":[1],\"theme\":[1],\"disabled\":[4]}],[0,\"verdocs-component-error\",{\"message\":[1]}],[0,\"verdocs-select-input\",{\"value\":[1],\"label\":[1],\"options\":[16],\"disabled\":[4]}]]],[\"verdocs-preview_8.cjs\",[[0,\"verdocs-template-attachments\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"uploading\":[32],\"progressLabel\":[32],\"progressPercent\":[32],\"showDeleteError\":[32],\"confirmDeleteDocument\":[32],\"store\":[32]}],[0,\"verdocs-template-reminders\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"showPlanBlocker\":[32],\"sendReminders\":[32],\"firstReminderDays\":[32],\"reminderDays\":[32],\"dirty\":[32]}],[0,\"verdocs-send\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"environment\":[1],\"containerId\":[32],\"rolesAtLevel\":[32],\"showPickerForId\":[32],\"sessionContacts\":[32],\"sending\":[32],\"rolesCompleted\":[32],\"reset\":[64]}],[0,\"verdocs-template-name\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"name\":[32],\"dirty\":[32]}],[0,\"verdocs-template-create\",{\"endpoint\":[16],\"file\":[32],\"creating\":[32],\"progressLabel\":[32],\"progressPercent\":[32]}],[0,\"verdocs-template-visibility\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"dirty\":[32],\"personal\":[32],\"public\":[32]}],[0,\"verdocs-preview\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"]}],[0,\"verdocs-template-build-tabs\",{\"endpoint\":[16],\"templateId\":[1537,\"template-id\"],\"step\":[1537],\"store\":[32]}]]],[\"verdocs-template-fields_4.cjs\",[[0,\"verdocs-template-roles\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"showingRoleDialog\":[32],\"showingSenderDialog\":[32],\"sender\":[32]}],[0,\"verdocs-template-fields\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"toolbarTargetId\":[1,\"toolbar-target-id\"],\"placing\":[32],\"showMustSelectRole\":[32],\"selectedRoleName\":[32]},[[4,\"keydown\",\"handleKeyDown\"]]],[0,\"verdocs-template-role-properties\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"roleName\":[1,\"role-name\"],\"sender\":[1],\"dirty\":[32],\"saving\":[32],\"name\":[32],\"type\":[32],\"full_name\":[32],\"email\":[32],\"phone\":[32],\"delegator\":[32]}],[0,\"verdocs-template-sender\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"sender\":[1],\"saving\":[32]}]]],[\"verdocs-portal_2.cjs\",[[0,\"verdocs-template-field-properties\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"fieldName\":[1,\"field-name\"],\"helpText\":[1,\"help-text\"],\"dirty\":[32],\"loading\":[32],\"setting\":[32],\"label\":[32],\"type\":[32],\"name\":[32],\"required\":[32],\"roleName\":[32],\"group\":[32],\"fieldType\":[32],\"options\":[32],\"placeholder\":[32],\"value\":[32],\"leading\":[32],\"showingHelp\":[32]}],[4,\"verdocs-portal\",{\"anchor\":[1],\"voffset\":[2],\"align\":[1]},[[11,\"scroll\",\"handleScroll\"],[11,\"resize\",\"handleResize\"],[10,\"click\",\"handleClick\"]]]]]]"), options);
19
19
  });
@@ -58,9 +58,12 @@ export class VerdocsBuild {
58
58
  this.step = 'roles';
59
59
  (_a = this.stepChanged) === null || _a === void 0 ? void 0 : _a.emit('roles');
60
60
  }
61
+ async handleRolesUpdated(e) {
62
+ var _a;
63
+ (_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
64
+ }
61
65
  async handleTemplateUpdated(e) {
62
66
  var _a;
63
- console.log('tup');
64
67
  (_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
65
68
  }
66
69
  handleAttachmentsNext() {
@@ -88,7 +91,7 @@ export class VerdocsBuild {
88
91
  return (h(Host, null, h("div", { class: "content" }, h("verdocs-template-build-tabs", { endpoint: this.endpoint, templateId: this.templateId, step: "attachments", onSdkError: e => { var _a; return (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(e.detail); }, onStepChanged: e => this.handleStepChanged(e.detail) }), h("verdocs-template-create", { endpoint: this.endpoint, onExit: e => this.handleCancel(e), onNext: () => this.handleAttachmentsNext(), onTemplateCreated: e => this.handleTemplateCreated(e.detail.templateId) }))));
89
92
  }
90
93
  console.log('[BUILD] Rendering build view', this.templateId, this.step, ['attachments', 'roles', 'settings', 'fields', 'preview'].indexOf(this.step));
91
- return (h(Host, null, h("div", { class: "content" }, h("verdocs-template-build-tabs", { endpoint: this.endpoint, templateId: this.templateId, step: this.step, onSdkError: e => { var _a; return (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(e.detail); }, onStepChanged: e => this.handleStepChanged(e.detail) }), this.step === 'attachments' && (h("verdocs-template-attachments", { templateId: this.templateId, endpoint: this.endpoint, onExit: e => this.handleCancel(e), onNext: () => this.handleAttachmentsNext(), onTemplateUpdated: e => this.handleTemplateUpdated(e) })), this.step === 'roles' && (h("verdocs-template-roles", { templateId: this.templateId, endpoint: this.endpoint, onExit: e => this.handleCancel(e), onNext: () => this.handleRolesNext(), onTemplateUpdated: e => this.handleTemplateUpdated(e) })), this.step === 'settings' && (h("div", { style: { flexDirection: 'column', gap: '20px', display: 'flex', maxWidth: '400px', margin: '20px' } }, h("verdocs-template-name", { templateId: this.templateId, endpoint: this.endpoint, style: { backgroundColor: '#ffffff', padding: '20px' }, onTemplateUpdated: e => this.handleTemplateUpdated(e) }), h("verdocs-template-reminders", { templateId: this.templateId, endpoint: this.endpoint, style: { backgroundColor: '#ffffff', padding: '20px' }, onTemplateUpdated: e => this.handleTemplateUpdated(e) }), h("verdocs-template-visibility", { templateId: this.templateId, endpoint: this.endpoint, style: { backgroundColor: '#ffffff', padding: '20px' }, onTemplateUpdated: e => this.handleTemplateUpdated(e) }))), this.step === 'fields' && h("verdocs-template-fields", { templateId: this.templateId, endpoint: this.endpoint, onTemplateUpdated: e => this.handleTemplateUpdated(e) }), this.step === 'preview' && (h("div", { class: "preview-container" }, h("div", { class: "preview-send-wrapper" }, h("verdocs-send", { templateId: this.templateId, endpoint: this.endpoint, onSend: e => { var _a; return (_a = this.send) === null || _a === void 0 ? void 0 : _a.emit(e.detail); }, style: { width: '100%' } })), h("div", { class: "preview-preview-wrapper" }, h("verdocs-preview", { templateId: this.templateId, endpoint: this.endpoint, style: { display: 'flex', flex: '1', maxWidth: '1000px' } })))))));
94
+ return (h(Host, null, h("div", { class: "content" }, h("verdocs-template-build-tabs", { endpoint: this.endpoint, templateId: this.templateId, step: this.step, onSdkError: e => { var _a; return (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(e.detail); }, onStepChanged: e => this.handleStepChanged(e.detail) }), this.step === 'attachments' && (h("verdocs-template-attachments", { templateId: this.templateId, endpoint: this.endpoint, onExit: e => this.handleCancel(e), onNext: () => this.handleAttachmentsNext(), onTemplateUpdated: e => this.handleTemplateUpdated(e) })), this.step === 'roles' && (h("verdocs-template-roles", { templateId: this.templateId, endpoint: this.endpoint, onExit: e => this.handleCancel(e), onNext: () => this.handleRolesNext(), onRolesUpdated: e => this.handleRolesUpdated(e) })), this.step === 'settings' && (h("div", { style: { flexDirection: 'column', gap: '20px', display: 'flex', maxWidth: '400px', margin: '20px' } }, h("verdocs-template-name", { templateId: this.templateId, endpoint: this.endpoint, style: { backgroundColor: '#ffffff', padding: '20px' }, onTemplateUpdated: e => this.handleTemplateUpdated(e) }), h("verdocs-template-reminders", { templateId: this.templateId, endpoint: this.endpoint, style: { backgroundColor: '#ffffff', padding: '20px' }, onTemplateUpdated: e => this.handleTemplateUpdated(e) }), h("verdocs-template-visibility", { templateId: this.templateId, endpoint: this.endpoint, style: { backgroundColor: '#ffffff', padding: '20px' }, onTemplateUpdated: e => this.handleTemplateUpdated(e) }))), this.step === 'fields' && h("verdocs-template-fields", { templateId: this.templateId, endpoint: this.endpoint, onTemplateUpdated: e => this.handleTemplateUpdated(e) }), this.step === 'preview' && (h("div", { class: "preview-container" }, h("div", { class: "preview-send-wrapper" }, h("verdocs-send", { templateId: this.templateId, endpoint: this.endpoint, onSend: e => { var _a; return (_a = this.send) === null || _a === void 0 ? void 0 : _a.emit(e.detail); }, style: { width: '100%' } })), h("div", { class: "preview-preview-wrapper" }, h("verdocs-preview", { templateId: this.templateId, endpoint: this.endpoint, style: { display: 'flex', flex: '1', maxWidth: '1000px' } })))))));
92
95
  }
93
96
  static get is() { return "verdocs-build"; }
94
97
  static get originalStyleUrls() {
@@ -279,6 +282,30 @@ export class VerdocsBuild {
279
282
  }
280
283
  }
281
284
  }
285
+ }, {
286
+ "method": "rolesUpdated",
287
+ "name": "rolesUpdated",
288
+ "bubbles": true,
289
+ "cancelable": true,
290
+ "composed": true,
291
+ "docs": {
292
+ "tags": [],
293
+ "text": "Event fired when roles are updated in the roles step."
294
+ },
295
+ "complexType": {
296
+ "original": "{endpoint: VerdocsEndpoint; templateId: string; event: 'added' | 'deleted' | 'updated'; roles: IRole[]}",
297
+ "resolved": "{ endpoint: VerdocsEndpoint; templateId: string; event: \"added\" | \"deleted\" | \"updated\"; roles: IRole[]; }",
298
+ "references": {
299
+ "VerdocsEndpoint": {
300
+ "location": "import",
301
+ "path": "@verdocs/js-sdk"
302
+ },
303
+ "IRole": {
304
+ "location": "import",
305
+ "path": "@verdocs/js-sdk/Templates/Types"
306
+ }
307
+ }
308
+ }
282
309
  }];
283
310
  }
284
311
  static get elementRef() { return "el"; }
@@ -2,7 +2,7 @@ import { VerdocsEndpoint } from '@verdocs/js-sdk';
2
2
  import { h } from '@stencil/core';
3
3
  import { Host } from '@stencil/core';
4
4
  import { getRoleIndex, renderDocumentField } from '../../../utils/utils';
5
- import { getRoleNames, getTemplateStore } from "../../../utils/TemplateStore";
5
+ import { getRoleNames, getTemplateStore } from '../../../utils/TemplateStore';
6
6
  import { SDKError } from '../../../utils/errors';
7
7
  /**
8
8
  * Display a template preview experience. This will display the template's attached
@@ -38,9 +38,8 @@ export class VerdocsPreview {
38
38
  handlePageRendered(e) {
39
39
  var _a, _b;
40
40
  const pageInfo = e.detail;
41
- // console.log('[PREVIEW] Page rendered', pageInfo);
42
41
  const fields = (_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.fields.filter(field => field.page_sequence === pageInfo.pageNumber);
43
- // console.log('[PREVIEW] Fields on page', fields);
42
+ console.log('[PREVIEW] Page rendered', pageInfo, fields);
44
43
  fields.forEach(field => renderDocumentField(field, pageInfo, getRoleIndex(getRoleNames(this.store), field.role_name), { disabled: true, editable: false, draggable: false }));
45
44
  }
46
45
  render() {
@@ -4,8 +4,9 @@ import { integerSequence } from '@verdocs/js-sdk/Utils/Primitives';
4
4
  import { createField, updateField } from '@verdocs/js-sdk/Templates/Fields';
5
5
  import { h, Host } from '@stencil/core';
6
6
  import { defaultHeight, defaultWidth, getRoleIndex, renderDocumentField, updateCssTransform } from '../../../utils/utils';
7
- import { createTemplateFieldStore } from '../../../utils/TemplateFieldStore';
8
7
  import { getRoleNames, getTemplateStore } from '../../../utils/TemplateStore';
8
+ import { getTemplateFieldStore } from '../../../utils/TemplateFieldStore';
9
+ import { getTemplateRoleStore } from '../../../utils/TemplateRoleStore';
9
10
  import { SDKError } from '../../../utils/errors';
10
11
  const iconTextbox = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>';
11
12
  const iconTextarea = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z"/></svg>';
@@ -42,6 +43,7 @@ export class VerdocsTemplateFields {
42
43
  this.pageHeights = {};
43
44
  this.templateStore = null;
44
45
  this.fieldStore = null;
46
+ this.roleStore = null;
45
47
  this.cachedPageInfo = {};
46
48
  this.endpoint = VerdocsEndpoint.getDefault();
47
49
  this.templateId = null;
@@ -49,7 +51,6 @@ export class VerdocsTemplateFields {
49
51
  this.placing = null;
50
52
  this.showMustSelectRole = false;
51
53
  this.selectedRoleName = '';
52
- this.rerender = 1;
53
54
  }
54
55
  async componentWillLoad() {
55
56
  var _a, _b, _c, _d, _e, _f, _g;
@@ -64,7 +65,8 @@ export class VerdocsTemplateFields {
64
65
  return;
65
66
  }
66
67
  this.templateStore = await getTemplateStore(this.endpoint, this.templateId, false);
67
- this.fieldStore = createTemplateFieldStore(this.templateStore.state);
68
+ this.fieldStore = getTemplateFieldStore(this.templateId);
69
+ this.roleStore = getTemplateRoleStore(this.templateId);
68
70
  this.selectedRoleName = ((_d = (_c = (_b = (_a = this.templateStore) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.roles) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.name) || '';
69
71
  }
70
72
  catch (e) {
@@ -83,10 +85,10 @@ export class VerdocsTemplateFields {
83
85
  }
84
86
  }
85
87
  componentWillUpdate() {
86
- var _a, _b, _c, _d, _e, _f;
88
+ var _a, _b, _c, _d;
87
89
  // If a new role was added and there were none yet so far, or the "selected" role was deleted, reset our selection
88
- if (!this.selectedRoleName || !(((_b = (_a = this.templateStore) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.roles) || []).find(role => role.name === this.selectedRoleName)) {
89
- this.selectedRoleName = ((_f = (_e = (_d = (_c = this.templateStore) === null || _c === void 0 ? void 0 : _c.state) === null || _d === void 0 ? void 0 : _d.roles) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.name) || '';
90
+ if (!this.selectedRoleName || !Object.values(this.roleStore).find(role => role && role.name === this.selectedRoleName)) {
91
+ this.selectedRoleName = ((_d = (_c = (_b = (_a = this.templateStore) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.roles) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.name) || '';
90
92
  console.log('[FIELDS] Selected new role', this.selectedRoleName);
91
93
  }
92
94
  }
@@ -98,7 +100,6 @@ export class VerdocsTemplateFields {
98
100
  }
99
101
  async handleFieldChange(field, e, optionId) {
100
102
  console.log('[FIELDS] handleFieldChange', field, e, optionId);
101
- this.rerender++;
102
103
  }
103
104
  handleFieldSettingsChange(pageInfo, field, el, newFieldData, oldName) {
104
105
  var _a, _b;
@@ -109,8 +110,6 @@ export class VerdocsTemplateFields {
109
110
  this.selectedRoleName = field.role_name;
110
111
  el.setAttribute('roleindex', getRoleIndex(getRoleNames(this.templateStore), field.role_name));
111
112
  el.field = this.fieldStore.get(field.name);
112
- this.rerender++;
113
- el.setAttribute('rerender', this.rerender);
114
113
  (_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: (_b = this.templateStore) === null || _b === void 0 ? void 0 : _b.state, event: 'updated-field' });
115
114
  // We do this to avoid dupes if the field gets renamed.
116
115
  if (field.name !== oldName) {
@@ -127,15 +126,12 @@ export class VerdocsTemplateFields {
127
126
  this.reRenderField(field, pageInfo.pageNumber);
128
127
  }
129
128
  attachFieldAttributes(pageInfo, field, roleIndex, el) {
130
- // console.log('afa', field);
131
129
  el.addEventListener('input', e => this.handleFieldChange(field, e));
132
130
  el.addEventListener('settingsChanged', e => this.handleFieldSettingsChange(pageInfo, field, el, e.detail.field, e.detail.fieldName));
133
- // el.addEventListener('settingsChanged', e => this.handleFieldSettingsChange(pageInfo, field, roleIndex, el, e.detail.field));
134
131
  el.addEventListener('deleted', () => {
135
132
  var _a, _b;
136
133
  console.log('[FIELDS] Deleted', this, field);
137
134
  el.remove();
138
- this.rerender++;
139
135
  (_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: (_b = this.templateStore) === null || _b === void 0 ? void 0 : _b.state, event: 'updated-field' });
140
136
  });
141
137
  el.setAttribute('templateid', this.templateId);
@@ -151,7 +147,10 @@ export class VerdocsTemplateFields {
151
147
  // console.log('[FIELDS] Page rendered', pageInfo.pageNumber, pageInfo);
152
148
  this.cachedPageInfo[pageInfo.pageNumber] = pageInfo;
153
149
  this.pageHeights[pageInfo.pageNumber] = pageInfo.naturalHeight;
154
- const fields = Object.values(this.fieldStore.state).filter((field) => field.page_sequence === pageInfo.pageNumber);
150
+ // Entries can be undefined when deleted because Stencil has no remove() operator yet for stores.
151
+ // See https://github.com/ionic-team/stencil-store/issues/23
152
+ const fields = Object.values(this.fieldStore.state).filter((field) => field && field.page_sequence === pageInfo.pageNumber);
153
+ console.log('[FIELDS] Page rendered', pageInfo, fields);
155
154
  fields.forEach((field) => this.reRenderField(field, pageInfo.pageNumber));
156
155
  }
157
156
  reRenderField(field, pageNumber) {
@@ -248,7 +247,7 @@ export class VerdocsTemplateFields {
248
247
  do {
249
248
  fieldName = `${type}P${pageNumber}-${i}`;
250
249
  i++;
251
- } while (Object.values(this.fieldStore.state).some(field => field.name === fieldName));
250
+ } while (Object.values(this.fieldStore.state).some(field => field && field.name === fieldName));
252
251
  return fieldName;
253
252
  }
254
253
  // Scale the X,Y clicks to the virtual page dimensions. Also ensure the field doesn't go off the page.
@@ -360,7 +359,7 @@ export class VerdocsTemplateFields {
360
359
  }
361
360
  }
362
361
  render() {
363
- var _a, _b, _c, _d, _e, _f, _g, _h;
362
+ var _a, _b, _c;
364
363
  if (!this.endpoint.session) {
365
364
  return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
366
365
  }
@@ -368,10 +367,10 @@ export class VerdocsTemplateFields {
368
367
  if (!((_a = this.templateStore) === null || _a === void 0 ? void 0 : _a.state.isLoaded)) {
369
368
  return (h(Host, null, h("verdocs-loader", null)));
370
369
  }
371
- const selectableRoles = (_c = (_b = this.templateStore) === null || _b === void 0 ? void 0 : _b.state) === null || _c === void 0 ? void 0 : _c.roles.map(role => ({ value: role.name, label: role.name }));
372
- return (h(Host, { class: this.placing ? { [`placing-${this.placing}`]: true } : {}, "data-r": this.rerender, onSubmit: () => {
373
- // console.log('onSubmit');
374
- } }, h("div", { id: "verdocs-template-fields-toolbar" }, h("div", { class: "add-for" }, "Add field:"), h("verdocs-select-input", { value: this.selectedRoleName, options: selectableRoles, onInput: (e) => (this.selectedRoleName = e.target.value) }), menuOptions.map(option => (h("verdocs-toolbar-icon", { text: option.tooltip, icon: option.icon, onClick: () => {
370
+ const selectableRoles = Object.values(this.roleStore)
371
+ .filter(role => role !== undefined)
372
+ .map(role => ({ value: role.name, label: role.name }));
373
+ return (h(Host, { class: this.placing ? { [`placing-${this.placing}`]: true } : {}, onSubmit: () => { } }, h("div", { id: "verdocs-template-fields-toolbar" }, h("div", { class: "add-for" }, "Add field:"), h("verdocs-select-input", { value: this.selectedRoleName, options: selectableRoles, onInput: (e) => (this.selectedRoleName = e.target.value) }), menuOptions.map(option => (h("verdocs-toolbar-icon", { text: option.tooltip, icon: option.icon, onClick: () => {
375
374
  // We ignore empty-tooltip entries because they're separators
376
375
  if (option.tooltip) {
377
376
  // We require a role to be selected first
@@ -382,13 +381,13 @@ export class VerdocsTemplateFields {
382
381
  this.showMustSelectRole = true;
383
382
  }
384
383
  }
385
- } })))), h("div", { class: "pages" }, (((_e = (_d = this.templateStore) === null || _d === void 0 ? void 0 : _d.state) === null || _e === void 0 ? void 0 : _e.template_documents) || []).map(document => {
384
+ } })))), h("div", { class: "pages" }, (((_c = (_b = this.templateStore) === null || _b === void 0 ? void 0 : _b.state) === null || _c === void 0 ? void 0 : _c.template_documents) || []).map(document => {
386
385
  const pageNumbers = integerSequence(1, document.page_numbers);
387
386
  return pageNumbers.map(page => (h("verdocs-template-document-page", { templateId: this.templateId, documentId: document.id, pageNumber: page, virtualWidth: 612, virtualHeight: 792, onClick: (e) => this.handleClickPage(e, page), onPageRendered: e => this.handlePageRendered(e), layers: [
388
387
  { name: 'page', type: 'canvas' },
389
388
  { name: 'controls', type: 'div' },
390
389
  ] })));
391
- })), this.showMustSelectRole && (h("verdocs-ok-dialog", { heading: "Unable to add field", message: ((_h = (_g = (_f = this.templateStore) === null || _f === void 0 ? void 0 : _f.state) === null || _g === void 0 ? void 0 : _g.roles) === null || _h === void 0 ? void 0 : _h.length) > 0 ? 'Please select a role before adding fields.' : 'Please add at least one role before adding fields.', onNext: () => (this.showMustSelectRole = false) }))));
390
+ })), this.showMustSelectRole && (h("verdocs-ok-dialog", { heading: "Unable to add field", message: Object.keys(this.roleStore).length > 0 ? 'Please select a role before adding fields.' : 'Please add at least one role before adding fields.', onNext: () => (this.showMustSelectRole = false) }))));
392
391
  }
393
392
  static get is() { return "verdocs-template-fields"; }
394
393
  static get originalStyleUrls() {
@@ -466,8 +465,7 @@ export class VerdocsTemplateFields {
466
465
  return {
467
466
  "placing": {},
468
467
  "showMustSelectRole": {},
469
- "selectedRoleName": {},
470
- "rerender": {}
468
+ "selectedRoleName": {}
471
469
  };
472
470
  }
473
471
  static get events() {
@@ -2,6 +2,8 @@ import { VerdocsEndpoint } from '@verdocs/js-sdk';
2
2
  import { deleteRole, updateRole } from '@verdocs/js-sdk/Templates/Roles';
3
3
  import { h, Host } from '@stencil/core';
4
4
  import { TemplateSenderTypes } from '@verdocs/js-sdk/Templates/Types';
5
+ import { createTemplateRoleStore } from '../../../utils/TemplateRoleStore';
6
+ import { getTemplateFieldStore } from '../../../utils/TemplateFieldStore';
5
7
  import { getTemplateStore } from '../../../utils/TemplateStore';
6
8
  import { SDKError } from '../../../utils/errors';
7
9
  const TrashIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>`;
@@ -10,7 +12,9 @@ const TrashIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="
10
12
  */
11
13
  export class VerdocsTemplateRoleProperties {
12
14
  constructor() {
13
- this.store = null;
15
+ this.templateStore = null;
16
+ this.fieldStore = null;
17
+ this.roleStore = null;
14
18
  this.endpoint = VerdocsEndpoint.getDefault();
15
19
  this.templateId = '';
16
20
  this.roleName = '';
@@ -19,13 +23,13 @@ export class VerdocsTemplateRoleProperties {
19
23
  this.saving = false;
20
24
  this.name = '';
21
25
  this.type = 'signer';
22
- this.fullName = '';
26
+ this.full_name = '';
23
27
  this.email = '';
24
28
  this.phone = '';
25
- this.allowDelegation = false;
29
+ this.delegator = false;
26
30
  }
27
31
  async componentWillLoad() {
28
- var _a, _b, _c, _d, _e;
32
+ var _a, _b, _c;
29
33
  try {
30
34
  this.endpoint.loadSession();
31
35
  if (!this.templateId) {
@@ -36,29 +40,39 @@ export class VerdocsTemplateRoleProperties {
36
40
  console.log('[ROLE_PROPERTIES] Unable to start builder session, must be authenticated');
37
41
  return;
38
42
  }
39
- this.store = await getTemplateStore(this.endpoint, this.templateId, false);
40
- const editingRole = (_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.roles.find(role => role.name === this.roleName);
43
+ this.templateStore = await getTemplateStore(this.endpoint, this.templateId, false);
44
+ this.fieldStore = getTemplateFieldStore(this.templateId);
45
+ this.roleStore = createTemplateRoleStore(this.templateStore.state);
46
+ const editingRole = this.roleStore.get(this.roleName);
41
47
  if (editingRole) {
42
48
  this.name = editingRole.name;
43
49
  this.type = editingRole.type;
44
- this.fullName = editingRole.full_name;
50
+ this.full_name = editingRole.full_name;
45
51
  this.email = editingRole.email;
46
52
  this.phone = editingRole.phone;
47
- this.allowDelegation = editingRole.delegator;
48
- console.log('[ROLES] Editing role', editingRole);
53
+ this.delegator = editingRole.delegator;
54
+ console.log('[ROLE_PROPERTIES] Editing role', editingRole);
49
55
  }
50
56
  }
51
57
  catch (e) {
52
- console.log('[TEMPLATE ROLE PROPERTIES] Error with preview session', e);
53
- (_c = this.sdkError) === null || _c === void 0 ? void 0 : _c.emit(new SDKError(e.message, (_d = e.response) === null || _d === void 0 ? void 0 : _d.status, (_e = e.response) === null || _e === void 0 ? void 0 : _e.data));
58
+ console.log('[ROLE_PROPERTIES Error with preview session', e);
59
+ (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(new SDKError(e.message, (_b = e.response) === null || _b === void 0 ? void 0 : _b.status, (_c = e.response) === null || _c === void 0 ? void 0 : _c.data));
54
60
  }
55
61
  }
56
62
  handleCancel(e) {
57
- var _a, _b, _c;
63
+ var _a;
58
64
  e.stopPropagation();
59
- this.name = (_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.name;
65
+ const editingRole = this.roleStore.get(this.roleName);
66
+ if (editingRole) {
67
+ this.name = editingRole.name;
68
+ this.type = editingRole.type;
69
+ this.full_name = editingRole.full_name;
70
+ this.email = editingRole.email;
71
+ this.phone = editingRole.phone;
72
+ this.delegator = editingRole.delegator;
73
+ }
60
74
  this.dirty = false;
61
- (_c = this.close) === null || _c === void 0 ? void 0 : _c.emit();
75
+ (_a = this.close) === null || _a === void 0 ? void 0 : _a.emit();
62
76
  }
63
77
  async handleSave(e) {
64
78
  e.stopPropagation();
@@ -66,35 +80,24 @@ export class VerdocsTemplateRoleProperties {
66
80
  updateRole(this.endpoint, this.templateId, this.roleName, {
67
81
  name: this.name,
68
82
  type: this.type,
69
- full_name: this.fullName,
83
+ full_name: this.full_name,
70
84
  email: this.email,
71
85
  phone: this.phone,
72
- delegator: this.allowDelegation,
86
+ delegator: this.delegator,
73
87
  })
74
88
  .then(async (r) => {
75
89
  var _a;
76
90
  console.log('[ROLE_PROPERTIES] Update result', r);
77
91
  this.saving = false;
78
92
  this.dirty = false;
79
- this.store = await getTemplateStore(this.endpoint, this.templateId, false);
80
- // this.sortTemplateRoles();
81
- // this.renumberTemplateRoles();
82
- // const newRoles = [...this.store.state.roles];
83
- // newRoles.forEach(role => {
84
- // if (role.name === this.roleName) {
85
- // role.name = this.name;
86
- // role.type = this.type;
87
- // role.full_name = this.fullName;
88
- // role.email = this.email;
89
- // role.phone = this.phone;
90
- // role.delegator = this.allowDelegation;
91
- // }
92
- // });
93
- // this.store.state.roles = newRoles;
93
+ this.roleStore.set(r.name, r);
94
+ if (this.roleName !== r.name) {
95
+ this.roleStore.set(this.roleName, undefined);
96
+ }
94
97
  (_a = this.close) === null || _a === void 0 ? void 0 : _a.emit();
95
98
  })
96
99
  .catch(e => {
97
- console.log('Update error', e);
100
+ console.log('[ROLE_PROPERTIES Update error', e);
98
101
  this.saving = false;
99
102
  });
100
103
  }
@@ -104,20 +107,19 @@ export class VerdocsTemplateRoleProperties {
104
107
  deleteRole(this.endpoint, this.templateId, this.roleName)
105
108
  .then(r => {
106
109
  var _a;
107
- console.log('Role deleted', r);
108
- this.store.state.roles = [...this.store.state.roles.filter(role => role.name !== this.roleName)];
110
+ delete this.roleStore.state[r.name];
109
111
  (_a = this.delete) === null || _a === void 0 ? void 0 : _a.emit({ templateId: this.templateId, roleName: this.roleName });
110
112
  })
111
113
  .catch(e => {
112
- console.log('Deletion error', e);
114
+ console.log('[ROLE_PROPERTIES Deletion error', e);
113
115
  });
114
116
  }
115
117
  }
116
118
  render() {
117
- const hasFields = (this.store.state.fields || []).findIndex(field => field.role_name === this.roleName) !== -1;
118
- return (h(Host, null, h("div", { class: "background-overlay", onClick: e => this.handleCancel(e) }, h("div", { class: "dialog" }, h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("verdocs-text-input", { id: "verdocs-recipient-name", label: "Role Name", value: this.name, autocomplete: "off", disabled: hasFields, helpText: hasFields
119
+ const hasFields = Object.values(this.fieldStore).findIndex(field => field.role_name === this.roleName) !== -1;
120
+ return (h(Host, null, h("div", { class: "background-overlay", onClick: e => this.handleCancel(e) }, h("div", { class: "dialog" }, h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("verdocs-text-input", { id: "verdocs-role-name", label: "Role Name", value: this.name, autocomplete: "off", disabled: hasFields, helpText: hasFields
119
121
  ? 'This role has fields assigned and can no longer be renamed.'
120
- : 'A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.', placeholder: "Template Name...", onInput: (e) => {
122
+ : 'A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.', placeholder: "Role Name...", onInput: (e) => {
121
123
  this.name = e.target.value;
122
124
  this.dirty = true;
123
125
  } }), h("div", { class: "row" }, h("div", { class: "input-label" }, "Type:"), h("verdocs-select-input", { value: this.type, options: [
@@ -127,8 +129,8 @@ export class VerdocsTemplateRoleProperties {
127
129
  ], onInput: (e) => {
128
130
  this.type = e.target.value;
129
131
  this.dirty = true;
130
- } }), h("verdocs-help-icon", { text: "Most participants are Signers. CC roles are notified when documents are signed, but have no other actions. Approvers get notified when signing is completed to perform a final review." })), h("verdocs-text-input", { id: "verdocs-recipient-email", label: "Full Name", value: this.fullName, autocomplete: "off", helpText: "The recipient's full name, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.", placeholder: "Full Name...", onInput: (e) => {
131
- this.fullName = e.target.value;
132
+ } }), h("verdocs-help-icon", { text: "Most participants are Signers. CC roles are notified when documents are signed, but have no other actions. Approvers get notified when signing is completed to perform a final review." })), h("verdocs-text-input", { id: "verdocs-recipient-email", label: "Full Name", value: this.full_name, autocomplete: "off", helpText: "The recipient's full name, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.", placeholder: "Full Name...", onInput: (e) => {
133
+ this.full_name = e.target.value;
132
134
  this.dirty = true;
133
135
  } }), h("verdocs-text-input", { id: "verdocs-recipient-email", label: "Email", value: this.email, autocomplete: "off", helpText: "The recipient's email address, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.", placeholder: "Email Address...", onInput: (e) => {
134
136
  this.email = e.target.value;
@@ -136,8 +138,8 @@ export class VerdocsTemplateRoleProperties {
136
138
  } }), h("verdocs-text-input", { id: "verdocs-recipient-phone", label: "Phone", value: this.phone, autocomplete: "off", helpText: "The recipient's phone number, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.", placeholder: "Phone Number...", onInput: (e) => {
137
139
  this.phone = e.target.value;
138
140
  this.dirty = true;
139
- } }), h("div", { class: "row" }, h("div", { class: "input-label" }, "May Delegate:"), h("div", { class: "checkbox-wrapper" }, h("verdocs-checkbox", { checked: this.allowDelegation, onInput: (e) => {
140
- this.allowDelegation = e.target.checked;
141
+ } }), h("div", { class: "row" }, h("div", { class: "input-label" }, "May Delegate:"), h("div", { class: "checkbox-wrapper" }, h("verdocs-checkbox", { checked: this.delegator, onInput: (e) => {
142
+ this.delegator = e.target.checked;
141
143
  this.dirty = true;
142
144
  } })), h("verdocs-help-icon", { text: "If enabled, this recipient may delegate their actions to another individual." })), h("div", { class: "buttons" }, h("button", { class: "delete-button", disabled: this.dirty, onClick: e => this.handleDelete(e), innerHTML: TrashIcon }), h("div", { style: { flex: '1' } }), h("verdocs-button", { size: "small", variant: "outline", label: "Cancel", disabled: !this.dirty, onClick: e => this.handleCancel(e) }), h("verdocs-button", { size: "small", label: "Save", disabled: !this.dirty, onClick: e => this.handleSave(e) })))))));
143
145
  }
@@ -242,10 +244,10 @@ export class VerdocsTemplateRoleProperties {
242
244
  "saving": {},
243
245
  "name": {},
244
246
  "type": {},
245
- "fullName": {},
247
+ "full_name": {},
246
248
  "email": {},
247
249
  "phone": {},
248
- "allowDelegation": {}
250
+ "delegator": {}
249
251
  };
250
252
  }
251
253
  static get events() {