@verdocs/web-sdk 6.8.6 → 6.8.7

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 (132) hide show
  1. package/dist/cjs/index-CQ5bTnED.js +14 -6
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/verdocs-build.cjs.entry.js +4 -2
  4. package/dist/cjs/verdocs-build.entry.cjs.js.map +1 -1
  5. package/dist/cjs/{verdocs-button-panel_2.cjs.entry.js → verdocs-button-panel.cjs.entry.js} +1 -27
  6. package/dist/cjs/verdocs-button-panel.entry.cjs.js.map +1 -0
  7. package/dist/cjs/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.entry.cjs.js.map +1 -0
  8. package/dist/cjs/{verdocs-preview_7.cjs.entry.js → verdocs-preview_6.cjs.entry.js} +35 -194
  9. package/dist/cjs/verdocs-tabs.cjs.entry.js +31 -0
  10. package/dist/cjs/verdocs-tabs.entry.cjs.js.map +1 -0
  11. package/dist/cjs/verdocs-template-settings.cjs.entry.js +150 -0
  12. package/dist/cjs/verdocs-template-settings.entry.cjs.js.map +1 -0
  13. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  14. package/dist/collection/components/embeds/verdocs-build/verdocs-build.css +4 -0
  15. package/dist/collection/components/embeds/verdocs-build/verdocs-build.js +5 -3
  16. package/dist/collection/components/embeds/verdocs-build/verdocs-build.js.map +1 -1
  17. package/dist/collection/components/templates/verdocs-template-build-tabs/verdocs-template-build-tabs.css +41 -49
  18. package/dist/collection/components/templates/verdocs-template-build-tabs/verdocs-template-build-tabs.js +25 -45
  19. package/dist/collection/components/templates/verdocs-template-build-tabs/verdocs-template-build-tabs.js.map +1 -1
  20. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +11 -36
  21. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js.map +1 -1
  22. package/dist/components/{p-BYDdRCru.js → p-_cxVjdiK.js} +11 -11
  23. package/dist/components/p-_cxVjdiK.js.map +1 -0
  24. package/dist/components/p-eZKhg-2i.js +156 -0
  25. package/dist/components/p-eZKhg-2i.js.map +1 -0
  26. package/dist/components/verdocs-build.js +72 -94
  27. package/dist/components/verdocs-build.js.map +1 -1
  28. package/dist/components/verdocs-button-panel.js +98 -1
  29. package/dist/components/verdocs-button-panel.js.map +1 -1
  30. package/dist/components/verdocs-tabs.js +45 -1
  31. package/dist/components/verdocs-tabs.js.map +1 -1
  32. package/dist/components/verdocs-template-build-tabs.js +1 -1
  33. package/dist/components/verdocs-template-fields.js +1 -1
  34. package/dist/components/verdocs-template-settings.js +215 -1
  35. package/dist/components/verdocs-template-settings.js.map +1 -1
  36. package/dist/custom-elements.json +0 -6
  37. package/dist/esm/index-BIRwgFLv.js +14 -6
  38. package/dist/esm/loader.js +1 -1
  39. package/dist/esm/verdocs-build.entry.js +4 -2
  40. package/dist/esm/verdocs-build.entry.js.map +1 -1
  41. package/dist/{components/p-rboJNAPD.js → esm/verdocs-button-panel.entry.js} +9 -32
  42. package/dist/esm/verdocs-button-panel.entry.js.map +1 -0
  43. package/dist/esm/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.entry.js.map +1 -0
  44. package/dist/esm/{verdocs-preview_7.entry.js → verdocs-preview_6.entry.js} +37 -195
  45. package/dist/{components/p-e7e4Os6T.js → esm/verdocs-tabs.entry.js} +8 -29
  46. package/dist/esm/verdocs-tabs.entry.js.map +1 -0
  47. package/dist/{components/p-Cp7g7TMK.js → esm/verdocs-template-settings.entry.js} +12 -84
  48. package/dist/esm/verdocs-template-settings.entry.js.map +1 -0
  49. package/dist/esm/verdocs-web-sdk.js +1 -1
  50. package/dist/esm-es5/index-BIRwgFLv.js +1 -1
  51. package/dist/esm-es5/loader.js +1 -1
  52. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  53. package/dist/esm-es5/verdocs-build.entry.js.map +1 -1
  54. package/dist/esm-es5/verdocs-button-panel.entry.js +2 -0
  55. package/dist/esm-es5/verdocs-button-panel.entry.js.map +1 -0
  56. package/dist/esm-es5/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.entry.js.map +1 -0
  57. package/dist/esm-es5/verdocs-preview_6.entry.js +8 -0
  58. package/dist/esm-es5/verdocs-preview_6.entry.js.map +1 -0
  59. package/dist/esm-es5/verdocs-tabs.entry.js +2 -0
  60. package/dist/esm-es5/verdocs-tabs.entry.js.map +1 -0
  61. package/dist/esm-es5/verdocs-template-settings.entry.js +2 -0
  62. package/dist/esm-es5/verdocs-template-settings.entry.js.map +1 -0
  63. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  64. package/dist/types/components/embeds/verdocs-build/verdocs-build.d.ts +1 -1
  65. package/dist/types/components/templates/verdocs-template-build-tabs/verdocs-template-build-tabs.d.ts +8 -3
  66. package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +2 -8
  67. package/dist/types/components.d.ts +2 -4
  68. package/dist/verdocs-web-sdk/p-0fcfde01.entry.js +8 -0
  69. package/dist/verdocs-web-sdk/p-0fcfde01.entry.js.map +1 -0
  70. package/dist/verdocs-web-sdk/p-267c890e.entry.js +2 -0
  71. package/dist/verdocs-web-sdk/p-267c890e.entry.js.map +1 -0
  72. package/dist/verdocs-web-sdk/p-2e4d6431.system.entry.js +8 -0
  73. package/dist/verdocs-web-sdk/p-2e4d6431.system.entry.js.map +1 -0
  74. package/dist/verdocs-web-sdk/p-39b03469.entry.js +2 -0
  75. package/dist/verdocs-web-sdk/p-39b03469.entry.js.map +1 -0
  76. package/dist/verdocs-web-sdk/p-5ee3ef82.entry.js +2 -0
  77. package/dist/verdocs-web-sdk/{p-da28bd7d.entry.js.map → p-5ee3ef82.entry.js.map} +1 -1
  78. package/dist/verdocs-web-sdk/p-8229308e.system.entry.js +2 -0
  79. package/dist/verdocs-web-sdk/{p-e65af831.system.entry.js.map → p-8229308e.system.entry.js.map} +1 -1
  80. package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
  81. package/dist/verdocs-web-sdk/p-Bb7iRsoQ.system.js.map +1 -0
  82. package/dist/verdocs-web-sdk/p-CCv1s4sj.system.js.map +1 -0
  83. package/dist/verdocs-web-sdk/p-DFNdvv2j.system.js.map +1 -0
  84. package/dist/verdocs-web-sdk/p-DrBEr1CO.system.js.map +1 -0
  85. package/dist/verdocs-web-sdk/p-a06b40a9.system.entry.js +2 -0
  86. package/dist/verdocs-web-sdk/p-a06b40a9.system.entry.js.map +1 -0
  87. package/dist/verdocs-web-sdk/p-b04c507f.system.entry.js +2 -0
  88. package/dist/verdocs-web-sdk/p-b04c507f.system.entry.js.map +1 -0
  89. package/dist/verdocs-web-sdk/p-dde291ad.system.entry.js +2 -0
  90. package/dist/verdocs-web-sdk/p-dde291ad.system.entry.js.map +1 -0
  91. package/dist/verdocs-web-sdk/p-fd923850.entry.js +2 -0
  92. package/dist/verdocs-web-sdk/p-fd923850.entry.js.map +1 -0
  93. package/dist/verdocs-web-sdk/p-wKFmf5bX.system.js.map +1 -0
  94. package/dist/verdocs-web-sdk/verdocs-build.entry.esm.js.map +1 -1
  95. package/dist/verdocs-web-sdk/verdocs-button-panel.entry.esm.js.map +1 -0
  96. package/dist/verdocs-web-sdk/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.entry.esm.js.map +1 -0
  97. package/dist/verdocs-web-sdk/verdocs-tabs.entry.esm.js.map +1 -0
  98. package/dist/verdocs-web-sdk/verdocs-template-settings.entry.esm.js.map +1 -0
  99. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  100. package/package.json +1 -1
  101. package/dist/cjs/verdocs-button-panel.verdocs-tabs.entry.cjs.js.map +0 -1
  102. package/dist/cjs/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.verdocs-template-settings.entry.cjs.js.map +0 -1
  103. package/dist/components/p-BYDdRCru.js.map +0 -1
  104. package/dist/components/p-Cp7g7TMK.js.map +0 -1
  105. package/dist/components/p-e7e4Os6T.js.map +0 -1
  106. package/dist/components/p-hDK3S4nn.js +0 -188
  107. package/dist/components/p-hDK3S4nn.js.map +0 -1
  108. package/dist/components/p-rboJNAPD.js.map +0 -1
  109. package/dist/esm/verdocs-button-panel.verdocs-tabs.entry.js.map +0 -1
  110. package/dist/esm/verdocs-button-panel_2.entry.js +0 -105
  111. package/dist/esm/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.verdocs-template-settings.entry.js.map +0 -1
  112. package/dist/esm-es5/verdocs-button-panel.verdocs-tabs.entry.js.map +0 -1
  113. package/dist/esm-es5/verdocs-button-panel_2.entry.js +0 -2
  114. package/dist/esm-es5/verdocs-button-panel_2.entry.js.map +0 -1
  115. package/dist/esm-es5/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.verdocs-template-settings.entry.js.map +0 -1
  116. package/dist/esm-es5/verdocs-preview_7.entry.js +0 -8
  117. package/dist/esm-es5/verdocs-preview_7.entry.js.map +0 -1
  118. package/dist/verdocs-web-sdk/p-07bd9f14.entry.js +0 -2
  119. package/dist/verdocs-web-sdk/p-07bd9f14.entry.js.map +0 -1
  120. package/dist/verdocs-web-sdk/p-5bc00fc6.entry.js +0 -8
  121. package/dist/verdocs-web-sdk/p-5bc00fc6.entry.js.map +0 -1
  122. package/dist/verdocs-web-sdk/p-BZv_Bu9M.system.js.map +0 -1
  123. package/dist/verdocs-web-sdk/p-DEv3ZZhp.system.js.map +0 -1
  124. package/dist/verdocs-web-sdk/p-DGOssAS4.system.js.map +0 -1
  125. package/dist/verdocs-web-sdk/p-acf58947.system.entry.js +0 -8
  126. package/dist/verdocs-web-sdk/p-acf58947.system.entry.js.map +0 -1
  127. package/dist/verdocs-web-sdk/p-da28bd7d.entry.js +0 -2
  128. package/dist/verdocs-web-sdk/p-e3075674.system.entry.js +0 -2
  129. package/dist/verdocs-web-sdk/p-e3075674.system.entry.js.map +0 -1
  130. package/dist/verdocs-web-sdk/p-e65af831.system.entry.js +0 -2
  131. package/dist/verdocs-web-sdk/verdocs-button-panel.verdocs-tabs.entry.esm.js.map +0 -1
  132. package/dist/verdocs-web-sdk/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.verdocs-template-settings.entry.esm.js.map +0 -1
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy(JSON.parse("[[\"verdocs-build.cjs\",[[256,\"verdocs-build\",{\"endpoint\":[16],\"templateId\":[1537,\"template-id\"],\"step\":[1537],\"loading\":[32],\"template\":[32]},null,{\"templateId\":[\"onTemplateIdChanged\"],\"step\":[\"onStepChanged\"]}]]],[\"verdocs-sign.cjs\",[[256,\"verdocs-sign\",{\"endpoint\":[1040],\"envelopeId\":[513,\"envelope-id\"],\"roleId\":[513,\"role-id\"],\"inviteCode\":[513,\"invite-code\"],\"headerTargetId\":[1,\"header-target-id\"],\"toolbarStyle\":[1,\"toolbar-style\"],\"recipient\":[32],\"hasSignature\":[32],\"nextButtonLabel\":[32],\"nextSubmits\":[32],\"fatalErrorHeader\":[32],\"fatalErrorMessage\":[32],\"focusedField\":[32],\"disclosures\":[32],\"fieldUpdateCounter\":[32],\"submitting\":[32],\"submitted\":[32],\"isDone\":[32],\"showDone\":[32],\"adoptingSignature\":[32],\"showLoadError\":[32],\"finishLater\":[32],\"showFinishLater\":[32],\"agreed\":[32],\"signatureId\":[32],\"initialId\":[32],\"documentsSingularPlural\":[32],\"authStep\":[32],\"authMethodStates\":[32],\"pageNumber\":[32],\"kbaQuestions\":[32],\"showSpinner\":[32],\"declining\":[32],\"delegating\":[32],\"delegated\":[32],\"kbaChoices\":[32],\"showDownloadDialog\":[32],\"loading\":[32],\"envelope\":[32],\"zoomLevel\":[32],\"signingProgressMode\":[32],\"polling\":[32]}]]],[\"verdocs-envelopes-list.cjs\",[[256,\"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]},null,{\"view\":[\"handleViewUpdated\"],\"status\":[\"handleStatusUpdated\"],\"sort\":[\"handleSortUpdated\"],\"match\":[\"handleMatchUpdated\"],\"selectedPage\":[\"handlePageUpdated\"]}]]],[\"verdocs-templates-list.cjs\",[[256,\"verdocs-templates-list\",{\"endpoint\":[16],\"visibility\":[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]},null,{\"sharing\":[\"handleSharingUpdated\"],\"starred\":[\"handleStarredUpdated\"],\"sort\":[\"handleSortUpdated\"],\"name\":[\"handleNameUpdated\"],\"selectedPage\":[\"handlePageUpdated\"]}]]],[\"verdocs-envelope-sidebar.cjs\",[[256,\"verdocs-envelope-sidebar\",{\"endpoint\":[16],\"envelopeId\":[1,\"envelope-id\"],\"activeTab\":[32],\"panelOpen\":[32],\"showRecipientDialog\":[32],\"showCancelDialog\":[32],\"showReinviteDialog\":[32],\"showUpdateDialog\":[32],\"remindersEnabled\":[32],\"updatingReminders\":[32],\"initialReminder\":[32],\"followupReminders\":[32],\"loading\":[32],\"envelope\":[32]}]]],[\"verdocs-field-payment.cjs\",[[256,\"verdocs-field-payment\",{\"source\":[513],\"sourceid\":[513],\"fieldname\":[513],\"field\":[16],\"isPreview\":[516,\"is-preview\"],\"disabled\":[516],\"done\":[516],\"editable\":[516],\"moveable\":[516],\"xscale\":[514],\"yscale\":[514],\"pagenumber\":[514],\"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\"],\"signed\":[4],\"roleindex\":[2],\"showingProperties\":[32],\"focused\":[32],\"preparedMessage\":[32],\"signatureUrl\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]},[[0,\"blur\",\"handleBlur\"]]]]],[\"verdocs-template-create.cjs\",[[256,\"verdocs-template-create\",{\"endpoint\":[16],\"maxSize\":[1026,\"max-size\"],\"file\":[32],\"creating\":[32],\"progressLabel\":[32],\"progressPercent\":[32],\"errorMessage\":[32]}]]],[\"verdocs-auth.cjs\",[[256,\"verdocs-auth\",{\"endpoint\":[16],\"visible\":[4],\"logo\":[1],\"displayMode\":[1025,\"display-mode\"],\"org_name\":[32],\"first_name\":[32],\"last_name\":[32],\"email\":[32],\"verificationCode\":[32],\"newPassword\":[32],\"password\":[32],\"confirmpass\":[32],\"submitting\":[32],\"resendDisabled\":[32],\"session\":[32],\"profile\":[32]}]]],[\"verdocs-initial-dialog.cjs\",[[256,\"verdocs-initial-dialog\",{\"initials\":[1],\"fontLoaded\":[32],\"enteredInitials\":[32],\"mode\":[32]}]]],[\"verdocs-signature-dialog.cjs\",[[256,\"verdocs-signature-dialog\",{\"name\":[1],\"fontLoaded\":[32],\"enteredName\":[32],\"mode\":[32],\"isDrawing\":[32],\"hasDrawnSignature\":[32],\"hasUploadedImage\":[32],\"uploadedFileName\":[32]}]]],[\"verdocs-date-input.cjs\",[[256,\"verdocs-date-input\",{\"value\":[1537],\"label\":[1],\"placeholder\":[1],\"helpText\":[1,\"help-text\"],\"disabled\":[4],\"required\":[4],\"showingPw\":[32],\"focused\":[32],\"containerId\":[32],\"focusField\":[64]}]]],[\"verdocs-envelope-recipient-summary.cjs\",[[256,\"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],\"recipientStatusIcons\":[32],\"containerId\":[32],\"gettingLinks\":[32],\"links\":[32],\"loading\":[32],\"envelope\":[32]}]]],[\"verdocs-multiselect.cjs\",[[256,\"verdocs-multiselect\",{\"label\":[1],\"placeholder\":[1],\"options\":[16],\"selectedOptions\":[16],\"showPicker\":[32]}]]],[\"verdocs-signing-progress.cjs\",[[256,\"verdocs-signing-progress\",{\"mode\":[1],\"focusedField\":[1,\"focused-field\"],\"fields\":[16],\"recipientFields\":[16]}]]],[\"verdocs-quick-functions.cjs\",[[256,\"verdocs-quick-functions\",{\"endpoint\":[16]}]]],[\"verdocs-search-box.cjs\",[[256,\"verdocs-search-box\",{\"endpoint\":[16],\"placeholder\":[1],\"type\":[1],\"query\":[1],\"grabsFocus\":[4,\"grabs-focus\"],\"focusField\":[64]}]]],[\"verdocs-search-tabs.cjs\",[[256,\"verdocs-search-tabs\",{\"selected\":[32]}]]],[\"verdocs-table.cjs\",[[256,\"verdocs-table\",{\"columns\":[16],\"data\":[16]}]]],[\"verdocs-template-card.cjs\",[[256,\"verdocs-template-card\",{\"template\":[16]}]]],[\"verdocs-template-tags.cjs\",[[256,\"verdocs-template-tags\",{\"tags\":[16]}]]],[\"verdocs-toggle.cjs\",[[256,\"verdocs-toggle\",{\"options\":[16],\"theme\":[1],\"selectedOption\":[32]}]]],[\"verdocs-toggle-button.cjs\",[[256,\"verdocs-toggle-button\",{\"active\":[4],\"icon\":[1],\"label\":[1],\"size\":[1],\"_active\":[32]}]]],[\"verdocs-status-indicator.cjs\",[[256,\"verdocs-status-indicator\",{\"size\":[1],\"theme\":[1],\"status\":[1],\"envelope\":[16],\"isOpen\":[32],\"containerId\":[32]}]]],[\"verdocs-template-star.cjs\",[[256,\"verdocs-template-star\",{\"endpoint\":[16],\"template\":[1040],\"updating\":[32]}]]],[\"verdocs-envelope-recipient-link_2.cjs\",[[256,\"verdocs-envelope-update-recipient\",{\"endpoint\":[16],\"envelopeId\":[1,\"envelope-id\"],\"roleName\":[1,\"role-name\"],\"isOpen\":[32],\"gettingLink\":[32],\"link\":[32],\"loading\":[32],\"envelope\":[32],\"originalRecipient\":[32],\"updatedRecipient\":[32]}],[256,\"verdocs-envelope-recipient-link\",{\"endpoint\":[16],\"envelopeId\":[1,\"envelope-id\"],\"roleName\":[1,\"role-name\"],\"isOpen\":[32],\"gettingLink\":[32],\"link\":[32],\"loading\":[32],\"envelope\":[32],\"recipient\":[32]}]]],[\"verdocs-contact-picker.cjs\",[[256,\"verdocs-contact-picker\",{\"endpoint\":[16],\"templateRole\":[16],\"contactSuggestions\":[16],\"first_name\":[32],\"last_name\":[32],\"email\":[32],\"phone\":[32],\"zip\":[32],\"address\":[32],\"message\":[32],\"showSuggestions\":[32],\"showMessage\":[32],\"delegator\":[32],\"name_locked\":[32],\"auth_methods\":[32],\"passcode\":[32],\"firstNameFieldId\":[32],\"lastNameFieldId\":[32],\"emailFieldId\":[32],\"phoneFieldId\":[32],\"featureFlags\":[32],\"activeEntitlements\":[32]}]]],[\"verdocs-radio-button.cjs\",[[256,\"verdocs-radio-button\",{\"checked\":[4],\"name\":[1],\"value\":[1],\"disabled\":[4]}]]],[\"verdocs-switch.cjs\",[[256,\"verdocs-switch\",{\"checked\":[1028],\"theme\":[1],\"disabled\":[4]}]]],[\"verdocs-menu-panel_2.cjs\",[[256,\"verdocs-template-role-properties\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"roleName\":[1,\"role-name\"],\"dirty\":[32],\"saving\":[32],\"name\":[32],\"type\":[32],\"first_name\":[32],\"last_name\":[32],\"email\":[32],\"phone\":[32],\"delegator\":[32],\"loading\":[32],\"template\":[32]}],[260,\"verdocs-menu-panel\",{\"side\":[1],\"overlay\":[4],\"width\":[2]},[[4,\"click\",\"handleClick\"]]]]],[\"verdocs-pagination_2.cjs\",[[256,\"verdocs-quick-filter\",{\"options\":[16],\"label\":[1],\"value\":[1537],\"placeholder\":[1],\"open\":[32]}],[256,\"verdocs-pagination\",{\"selectedPage\":[1538,\"selected-page\"],\"itemCount\":[2,\"item-count\"],\"perPage\":[2,\"per-page\"]}]]],[\"verdocs-dropdown.cjs\",[[256,\"verdocs-dropdown\",{\"options\":[16],\"containerId\":[32],\"showPicker\":[32]}]]],[\"verdocs-button-panel_2.cjs\",[[260,\"verdocs-button-panel\",{\"icon\":[1],\"showPanel\":[64],\"hidePanel\":[64],\"toggle\":[64]}],[260,\"verdocs-tabs\",{\"tabs\":[16],\"selectedTab\":[2,\"selected-tab\"]}]]],[\"verdocs-file-chooser_2.cjs\",[[256,\"verdocs-file-chooser\",{\"endpoint\":[16],\"file\":[32]}],[256,\"verdocs-progress-bar\",{\"label\":[1],\"showPercent\":[4,\"show-percent\"],\"percent\":[2]}]]],[\"verdocs-spinner.cjs\",[[256,\"verdocs-spinner\",{\"size\":[2],\"mode\":[1]}]]],[\"verdocs-ok-dialog.cjs\",[[256,\"verdocs-ok-dialog\",{\"heading\":[1],\"message\":[1],\"buttonLabel\":[1,\"button-label\"],\"showCancel\":[4,\"show-cancel\"],\"closed\":[32]}]]],[\"verdocs-flag.cjs\",[[256,\"verdocs-flag\",{\"variant\":[1],\"label\":[1],\"showSkip\":[4,\"show-skip\"]}]]],[\"verdocs-dialog.cjs\",[[260,\"verdocs-dialog\",{\"persistent\":[4]}]]],[\"verdocs-preview_7.cjs\",[[256,\"verdocs-template-fields\",{\"endpoint\":[16],\"templateId\":[1537,\"template-id\"],\"toolbarTargetId\":[1,\"toolbar-target-id\"],\"placing\":[32],\"showMustSelectRole\":[32],\"selectedRoleName\":[32],\"loading\":[32],\"template\":[32]},[[4,\"keydown\",\"handleKeyDown\"]],{\"templateId\":[\"onTemplateIdChanged\"]}],[256,\"verdocs-preview\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"loading\":[32],\"template\":[32]},null,{\"templateId\":[\"onTemplateIdChanged\"]}],[256,\"verdocs-send\",{\"endpoint\":[16],\"templateId\":[513,\"template-id\"],\"environment\":[1],\"showCancel\":[4,\"show-cancel\"],\"containerId\":[32],\"showPickerForId\":[32],\"sessionContacts\":[32],\"sending\":[32],\"rolesCompleted\":[32],\"loading\":[32],\"template\":[32],\"reset\":[64]},null,{\"templateId\":[\"onTemplateIdChanged\"]}],[256,\"verdocs-template-roles\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"showingRoleDialog\":[32],\"sender\":[32],\"dragging\":[32],\"loading\":[32],\"template\":[32]}],[256,\"verdocs-template-attachments\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"uploading\":[32],\"progressLabel\":[32],\"progressPercent\":[32],\"showDeleteError\":[32],\"confirmDeleteDocument\":[32],\"loading\":[32],\"template\":[32]}],[256,\"verdocs-template-settings\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"name\":[32],\"visibility\":[32],\"sender\":[32],\"sendReminders\":[32],\"initialReminder\":[32],\"followupReminders\":[32],\"dirty\":[32],\"loading\":[32],\"template\":[32]}],[256,\"verdocs-template-build-tabs\",{\"endpoint\":[16],\"templateId\":[1537,\"template-id\"],\"step\":[1537],\"loading\":[32],\"template\":[32]},null,{\"templateId\":[\"onTemplateIdChanged\"],\"step\":[\"onStepChanged\"]}]]],[\"verdocs-download-dialog_4.cjs\",[[256,\"verdocs-sign-footer\",{\"endpoint\":[16],\"envelopeId\":[1,\"envelope-id\"],\"isDone\":[4,\"is-done\"],\"askingQuestion\":[32],\"declinine\":[32],\"envelope\":[32]}],[256,\"verdocs-download-dialog\",{\"signed\":[4],\"polling\":[4],\"documents\":[16],\"hasCertificate\":[4,\"has-certificate\"]}],[256,\"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]}],[256,\"verdocs-question-dialog\",{\"question\":[1025],\"closed\":[32]}]]],[\"verdocs-adopt-signature-dialog_7.cjs\",[[256,\"verdocs-view\",{\"endpoint\":[16],\"envelopeId\":[1,\"envelope-id\"],\"headerTargetId\":[1,\"header-target-id\"],\"canceling\":[32],\"showCancelDone\":[32],\"showLoadError\":[32],\"loading\":[32],\"envelope\":[32],\"zoomLevel\":[32],\"showDownloadDialog\":[32],\"polling\":[32]}],[256,\"verdocs-kba-dialog\",{\"step\":[2],\"steps\":[2],\"helptitle\":[1],\"helptext\":[1],\"mode\":[1],\"label\":[1],\"placeholder\":[1],\"recipient\":[16],\"choices\":[16],\"agreed\":[32],\"response\":[32],\"updatedRecipient\":[32],\"dobContainerId\":[32]}],[256,\"verdocs-adopt-signature-dialog\",{\"name\":[1],\"nameLocked\":[4,\"name-locked\"],\"fontLoaded\":[32],\"enteredName\":[32],\"enteredInitials\":[32],\"mode\":[32],\"isDrawing\":[32],\"hasDrawnSignature\":[32],\"hasDrawnInitials\":[32]}],[256,\"verdocs-otp-dialog\",{\"endpoint\":[1040],\"method\":[1],\"resendDisabled\":[32],\"response\":[32]}],[256,\"verdocs-passcode-dialog\",{\"endpoint\":[1040],\"response\":[32]}],[256,\"verdocs-disclosure-dialog\",{\"disclosures\":[1],\"delegator\":[4],\"accepted\":[32]}],[256,\"verdocs-delegate-dialog\",{\"endpoint\":[1040],\"envelope\":[16],\"first_name\":[32],\"last_name\":[32],\"email\":[32],\"phone\":[32],\"message\":[32]}]]],[\"verdocs-organization-card_2.cjs\",[[256,\"verdocs-organization-card\",{\"organization\":[16],\"hovered\":[32]},[[1,\"mouseover\",\"onMouseOver\"],[1,\"mouseout\",\"onMouseOut\"]]],[260,\"verdocs-portal\",{\"anchor\":[1],\"voffset\":[2]},[[11,\"scroll\",\"handleScroll\"],[9,\"resize\",\"handleResize\"],[4,\"click\",\"handleClick\"]]]]],[\"verdocs-button_3.cjs\",[[256,\"verdocs-text-input\",{\"value\":[1537],\"label\":[1],\"placeholder\":[1],\"description\":[1],\"autocomplete\":[1],\"helpText\":[1,\"help-text\"],\"clearable\":[4],\"copyable\":[4],\"type\":[1],\"disabled\":[4],\"required\":[4],\"showingPw\":[32]}],[256,\"verdocs-help-icon\",{\"text\":[1],\"icon\":[1],\"containerId\":[32]}],[256,\"verdocs-button\",{\"label\":[1],\"startIcon\":[1,\"start-icon\"],\"endIcon\":[1,\"end-icon\"],\"size\":[1],\"type\":[1],\"variant\":[1],\"disabled\":[4]}]]],[\"verdocs-checkbox_5.cjs\",[[256,\"verdocs-template-field-properties\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"fieldName\":[1025,\"field-name\"],\"helpText\":[1,\"help-text\"],\"dirty\":[32],\"label\":[32],\"type\":[32],\"name\":[32],\"required\":[32],\"readonly\":[32],\"roleName\":[32],\"group\":[32],\"fieldType\":[32],\"options\":[32],\"placeholder\":[32],\"defaultValue\":[32],\"showingHelp\":[32],\"loading\":[32],\"template\":[32]}],[256,\"verdocs-select-input\",{\"value\":[1],\"label\":[1],\"options\":[16],\"disabled\":[4]}],[256,\"verdocs-component-error\",{\"message\":[1]}],[256,\"verdocs-checkbox\",{\"checked\":[4],\"name\":[1],\"label\":[1],\"value\":[1],\"theme\":[1],\"size\":[1],\"disabled\":[4]}],[256,\"verdocs-loader\"]]],[\"verdocs-field-attachment_11.cjs\",[[256,\"verdocs-field-attachment\",{\"source\":[513],\"sourceid\":[513],\"fieldname\":[513],\"field\":[16],\"isPreview\":[516,\"is-preview\"],\"disabled\":[516],\"editable\":[516],\"moveable\":[516],\"done\":[516],\"xscale\":[514],\"yscale\":[514],\"pagenumber\":[514],\"showingProperties\":[32],\"dialogOpen\":[32],\"selectedFile\":[32],\"focused\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]},[[0,\"blur\",\"handleBlur\"]]],[256,\"verdocs-field-checkbox\",{\"source\":[513],\"sourceid\":[513],\"fieldname\":[513],\"field\":[16],\"isPreview\":[516,\"is-preview\"],\"disabled\":[516],\"done\":[516],\"editable\":[516],\"moveable\":[516],\"xscale\":[514],\"yscale\":[514],\"pagenumber\":[514],\"showingProperties\":[32],\"focused\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]},[[0,\"blur\",\"handleBlur\"]]],[256,\"verdocs-field-date\",{\"source\":[513],\"sourceid\":[513],\"fieldname\":[513],\"disabled\":[516],\"editable\":[516],\"moveable\":[516],\"done\":[516],\"xscale\":[514],\"yscale\":[514],\"pagenumber\":[514],\"field\":[16],\"isPreview\":[516,\"is-preview\"],\"containerId\":[32],\"showingProperties\":[32],\"focused\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]},[[2,\"blur\",\"handleBlur\"]]],[256,\"verdocs-field-dropdown\",{\"source\":[513],\"sourceid\":[513],\"fieldname\":[513],\"field\":[16],\"isPreview\":[516,\"is-preview\"],\"disabled\":[516],\"editable\":[516],\"moveable\":[516],\"done\":[516],\"xscale\":[514],\"yscale\":[514],\"pagenumber\":[514],\"showingProperties\":[32],\"focused\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]},[[2,\"blur\",\"handleBlur\"]]],[256,\"verdocs-field-initial\",{\"source\":[513],\"sourceid\":[513],\"fieldname\":[513],\"field\":[16],\"disabled\":[516],\"initials\":[513],\"editable\":[516],\"moveable\":[516],\"done\":[516],\"xscale\":[514],\"yscale\":[514],\"pagenumber\":[514],\"initialid\":[513],\"isPreview\":[516,\"is-preview\"],\"showingProperties\":[32],\"focused\":[32],\"menuOpen\":[32],\"tempInitials\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]},[[0,\"blur\",\"handleBlur\"]]],[256,\"verdocs-field-radio\",{\"source\":[513],\"sourceid\":[513],\"fieldname\":[513],\"field\":[16],\"isPreview\":[516,\"is-preview\"],\"disabled\":[516],\"required\":[516],\"done\":[516],\"editable\":[516],\"moveable\":[516],\"xscale\":[514],\"yscale\":[514],\"pagenumber\":[514],\"showingProperties\":[32],\"focused\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]},[[0,\"blur\",\"handleBlur\"]]],[256,\"verdocs-field-signature\",{\"source\":[513],\"sourceid\":[513],\"fieldname\":[513],\"field\":[16],\"name\":[513],\"disabled\":[516],\"editable\":[516],\"moveable\":[516],\"done\":[516],\"xscale\":[514],\"yscale\":[514],\"pagenumber\":[514],\"signatureid\":[513],\"isPreview\":[516,\"is-preview\"],\"showingProperties\":[32],\"focused\":[32],\"menuOpen\":[32],\"tempSignature\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]},[[0,\"blur\",\"handleBlur\"],[0,\"blur\",\"onBlur\"]]],[256,\"verdocs-field-textarea\",{\"endpoint\":[16],\"source\":[513],\"sourceid\":[513],\"fieldname\":[513],\"field\":[16],\"isPreview\":[516,\"is-preview\"],\"disabled\":[516],\"editable\":[516],\"moveable\":[516],\"done\":[516],\"xscale\":[514],\"yscale\":[514],\"pagenumber\":[514],\"showingProperties\":[32],\"focused\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]},[[2,\"blur\",\"handleBlur\"]]],[256,\"verdocs-field-textbox\",{\"source\":[513],\"sourceid\":[513],\"fieldname\":[513],\"field\":[16],\"isPreview\":[516,\"is-preview\"],\"disabled\":[516],\"multiline\":[516],\"editable\":[516],\"moveable\":[516],\"done\":[516],\"xscale\":[514],\"yscale\":[514],\"pagenumber\":[514],\"showingProperties\":[32],\"focused\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]},[[2,\"blur\",\"handleBlur\"]]],[256,\"verdocs-field-timestamp\",{\"source\":[513],\"sourceid\":[513],\"fieldname\":[513],\"field\":[16],\"isPreview\":[516,\"is-preview\"],\"disabled\":[516],\"editable\":[516],\"moveable\":[516],\"done\":[516],\"xscale\":[514],\"yscale\":[514],\"pagenumber\":[2],\"showingProperties\":[32],\"focused\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]},[[2,\"blur\",\"handleBlur\"]]],[256,\"verdocs-upload-dialog\",{\"maxSize\":[1026,\"max-size\"],\"existingFile\":[1032,\"existing-file\"],\"draggingOver\":[32],\"confirmDelete\":[32],\"selectedFiles\":[32],\"errorMessage\":[32]}]]],[\"verdocs-template-document-page_2.cjs\",[[256,\"verdocs-toolbar-icon\",{\"text\":[1],\"icon\":[1],\"placement\":[1],\"containerId\":[32]}],[256,\"verdocs-template-document-page\",{\"endpoint\":[16],\"editable\":[4],\"disabled\":[4],\"done\":[4],\"templateId\":[513,\"template-id\"],\"documentId\":[513,\"document-id\"],\"pageNumber\":[514,\"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],\"xScale\":[32],\"yScale\":[32],\"loading\":[32],\"template\":[32]}]]]]"), options);
22
+ return index.bootstrapLazy(JSON.parse("[[\"verdocs-build.cjs\",[[256,\"verdocs-build\",{\"endpoint\":[16],\"templateId\":[1537,\"template-id\"],\"step\":[1537],\"loading\":[32],\"template\":[32]},null,{\"templateId\":[\"onTemplateIdChanged\"],\"step\":[\"onStepChanged\"]}]]],[\"verdocs-sign.cjs\",[[256,\"verdocs-sign\",{\"endpoint\":[1040],\"envelopeId\":[513,\"envelope-id\"],\"roleId\":[513,\"role-id\"],\"inviteCode\":[513,\"invite-code\"],\"headerTargetId\":[1,\"header-target-id\"],\"toolbarStyle\":[1,\"toolbar-style\"],\"recipient\":[32],\"hasSignature\":[32],\"nextButtonLabel\":[32],\"nextSubmits\":[32],\"fatalErrorHeader\":[32],\"fatalErrorMessage\":[32],\"focusedField\":[32],\"disclosures\":[32],\"fieldUpdateCounter\":[32],\"submitting\":[32],\"submitted\":[32],\"isDone\":[32],\"showDone\":[32],\"adoptingSignature\":[32],\"showLoadError\":[32],\"finishLater\":[32],\"showFinishLater\":[32],\"agreed\":[32],\"signatureId\":[32],\"initialId\":[32],\"documentsSingularPlural\":[32],\"authStep\":[32],\"authMethodStates\":[32],\"pageNumber\":[32],\"kbaQuestions\":[32],\"showSpinner\":[32],\"declining\":[32],\"delegating\":[32],\"delegated\":[32],\"kbaChoices\":[32],\"showDownloadDialog\":[32],\"loading\":[32],\"envelope\":[32],\"zoomLevel\":[32],\"signingProgressMode\":[32],\"polling\":[32]}]]],[\"verdocs-envelopes-list.cjs\",[[256,\"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]},null,{\"view\":[\"handleViewUpdated\"],\"status\":[\"handleStatusUpdated\"],\"sort\":[\"handleSortUpdated\"],\"match\":[\"handleMatchUpdated\"],\"selectedPage\":[\"handlePageUpdated\"]}]]],[\"verdocs-templates-list.cjs\",[[256,\"verdocs-templates-list\",{\"endpoint\":[16],\"visibility\":[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]},null,{\"sharing\":[\"handleSharingUpdated\"],\"starred\":[\"handleStarredUpdated\"],\"sort\":[\"handleSortUpdated\"],\"name\":[\"handleNameUpdated\"],\"selectedPage\":[\"handlePageUpdated\"]}]]],[\"verdocs-envelope-sidebar.cjs\",[[256,\"verdocs-envelope-sidebar\",{\"endpoint\":[16],\"envelopeId\":[1,\"envelope-id\"],\"activeTab\":[32],\"panelOpen\":[32],\"showRecipientDialog\":[32],\"showCancelDialog\":[32],\"showReinviteDialog\":[32],\"showUpdateDialog\":[32],\"remindersEnabled\":[32],\"updatingReminders\":[32],\"initialReminder\":[32],\"followupReminders\":[32],\"loading\":[32],\"envelope\":[32]}]]],[\"verdocs-field-payment.cjs\",[[256,\"verdocs-field-payment\",{\"source\":[513],\"sourceid\":[513],\"fieldname\":[513],\"field\":[16],\"isPreview\":[516,\"is-preview\"],\"disabled\":[516],\"done\":[516],\"editable\":[516],\"moveable\":[516],\"xscale\":[514],\"yscale\":[514],\"pagenumber\":[514],\"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\"],\"signed\":[4],\"roleindex\":[2],\"showingProperties\":[32],\"focused\":[32],\"preparedMessage\":[32],\"signatureUrl\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]},[[0,\"blur\",\"handleBlur\"]]]]],[\"verdocs-template-settings.cjs\",[[256,\"verdocs-template-settings\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"name\":[32],\"visibility\":[32],\"sender\":[32],\"sendReminders\":[32],\"initialReminder\":[32],\"followupReminders\":[32],\"dirty\":[32],\"loading\":[32],\"template\":[32]}]]],[\"verdocs-template-create.cjs\",[[256,\"verdocs-template-create\",{\"endpoint\":[16],\"maxSize\":[1026,\"max-size\"],\"file\":[32],\"creating\":[32],\"progressLabel\":[32],\"progressPercent\":[32],\"errorMessage\":[32]}]]],[\"verdocs-auth.cjs\",[[256,\"verdocs-auth\",{\"endpoint\":[16],\"visible\":[4],\"logo\":[1],\"displayMode\":[1025,\"display-mode\"],\"org_name\":[32],\"first_name\":[32],\"last_name\":[32],\"email\":[32],\"verificationCode\":[32],\"newPassword\":[32],\"password\":[32],\"confirmpass\":[32],\"submitting\":[32],\"resendDisabled\":[32],\"session\":[32],\"profile\":[32]}]]],[\"verdocs-initial-dialog.cjs\",[[256,\"verdocs-initial-dialog\",{\"initials\":[1],\"fontLoaded\":[32],\"enteredInitials\":[32],\"mode\":[32]}]]],[\"verdocs-signature-dialog.cjs\",[[256,\"verdocs-signature-dialog\",{\"name\":[1],\"fontLoaded\":[32],\"enteredName\":[32],\"mode\":[32],\"isDrawing\":[32],\"hasDrawnSignature\":[32],\"hasUploadedImage\":[32],\"uploadedFileName\":[32]}]]],[\"verdocs-date-input.cjs\",[[256,\"verdocs-date-input\",{\"value\":[1537],\"label\":[1],\"placeholder\":[1],\"helpText\":[1,\"help-text\"],\"disabled\":[4],\"required\":[4],\"showingPw\":[32],\"focused\":[32],\"containerId\":[32],\"focusField\":[64]}]]],[\"verdocs-envelope-recipient-summary.cjs\",[[256,\"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],\"recipientStatusIcons\":[32],\"containerId\":[32],\"gettingLinks\":[32],\"links\":[32],\"loading\":[32],\"envelope\":[32]}]]],[\"verdocs-multiselect.cjs\",[[256,\"verdocs-multiselect\",{\"label\":[1],\"placeholder\":[1],\"options\":[16],\"selectedOptions\":[16],\"showPicker\":[32]}]]],[\"verdocs-signing-progress.cjs\",[[256,\"verdocs-signing-progress\",{\"mode\":[1],\"focusedField\":[1,\"focused-field\"],\"fields\":[16],\"recipientFields\":[16]}]]],[\"verdocs-button-panel.cjs\",[[260,\"verdocs-button-panel\",{\"icon\":[1],\"showPanel\":[64],\"hidePanel\":[64],\"toggle\":[64]}]]],[\"verdocs-quick-functions.cjs\",[[256,\"verdocs-quick-functions\",{\"endpoint\":[16]}]]],[\"verdocs-search-box.cjs\",[[256,\"verdocs-search-box\",{\"endpoint\":[16],\"placeholder\":[1],\"type\":[1],\"query\":[1],\"grabsFocus\":[4,\"grabs-focus\"],\"focusField\":[64]}]]],[\"verdocs-search-tabs.cjs\",[[256,\"verdocs-search-tabs\",{\"selected\":[32]}]]],[\"verdocs-table.cjs\",[[256,\"verdocs-table\",{\"columns\":[16],\"data\":[16]}]]],[\"verdocs-tabs.cjs\",[[260,\"verdocs-tabs\",{\"tabs\":[16],\"selectedTab\":[2,\"selected-tab\"]}]]],[\"verdocs-template-card.cjs\",[[256,\"verdocs-template-card\",{\"template\":[16]}]]],[\"verdocs-template-tags.cjs\",[[256,\"verdocs-template-tags\",{\"tags\":[16]}]]],[\"verdocs-toggle.cjs\",[[256,\"verdocs-toggle\",{\"options\":[16],\"theme\":[1],\"selectedOption\":[32]}]]],[\"verdocs-toggle-button.cjs\",[[256,\"verdocs-toggle-button\",{\"active\":[4],\"icon\":[1],\"label\":[1],\"size\":[1],\"_active\":[32]}]]],[\"verdocs-status-indicator.cjs\",[[256,\"verdocs-status-indicator\",{\"size\":[1],\"theme\":[1],\"status\":[1],\"envelope\":[16],\"isOpen\":[32],\"containerId\":[32]}]]],[\"verdocs-template-star.cjs\",[[256,\"verdocs-template-star\",{\"endpoint\":[16],\"template\":[1040],\"updating\":[32]}]]],[\"verdocs-envelope-recipient-link_2.cjs\",[[256,\"verdocs-envelope-update-recipient\",{\"endpoint\":[16],\"envelopeId\":[1,\"envelope-id\"],\"roleName\":[1,\"role-name\"],\"isOpen\":[32],\"gettingLink\":[32],\"link\":[32],\"loading\":[32],\"envelope\":[32],\"originalRecipient\":[32],\"updatedRecipient\":[32]}],[256,\"verdocs-envelope-recipient-link\",{\"endpoint\":[16],\"envelopeId\":[1,\"envelope-id\"],\"roleName\":[1,\"role-name\"],\"isOpen\":[32],\"gettingLink\":[32],\"link\":[32],\"loading\":[32],\"envelope\":[32],\"recipient\":[32]}]]],[\"verdocs-contact-picker.cjs\",[[256,\"verdocs-contact-picker\",{\"endpoint\":[16],\"templateRole\":[16],\"contactSuggestions\":[16],\"first_name\":[32],\"last_name\":[32],\"email\":[32],\"phone\":[32],\"zip\":[32],\"address\":[32],\"message\":[32],\"showSuggestions\":[32],\"showMessage\":[32],\"delegator\":[32],\"name_locked\":[32],\"auth_methods\":[32],\"passcode\":[32],\"firstNameFieldId\":[32],\"lastNameFieldId\":[32],\"emailFieldId\":[32],\"phoneFieldId\":[32],\"featureFlags\":[32],\"activeEntitlements\":[32]}]]],[\"verdocs-radio-button.cjs\",[[256,\"verdocs-radio-button\",{\"checked\":[4],\"name\":[1],\"value\":[1],\"disabled\":[4]}]]],[\"verdocs-switch.cjs\",[[256,\"verdocs-switch\",{\"checked\":[1028],\"theme\":[1],\"disabled\":[4]}]]],[\"verdocs-button_3.cjs\",[[256,\"verdocs-text-input\",{\"value\":[1537],\"label\":[1],\"placeholder\":[1],\"description\":[1],\"autocomplete\":[1],\"helpText\":[1,\"help-text\"],\"clearable\":[4],\"copyable\":[4],\"type\":[1],\"disabled\":[4],\"required\":[4],\"showingPw\":[32]}],[256,\"verdocs-help-icon\",{\"text\":[1],\"icon\":[1],\"containerId\":[32]}],[256,\"verdocs-button\",{\"label\":[1],\"startIcon\":[1,\"start-icon\"],\"endIcon\":[1,\"end-icon\"],\"size\":[1],\"type\":[1],\"variant\":[1],\"disabled\":[4]}]]],[\"verdocs-menu-panel_2.cjs\",[[256,\"verdocs-template-role-properties\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"roleName\":[1,\"role-name\"],\"dirty\":[32],\"saving\":[32],\"name\":[32],\"type\":[32],\"first_name\":[32],\"last_name\":[32],\"email\":[32],\"phone\":[32],\"delegator\":[32],\"loading\":[32],\"template\":[32]}],[260,\"verdocs-menu-panel\",{\"side\":[1],\"overlay\":[4],\"width\":[2]},[[4,\"click\",\"handleClick\"]]]]],[\"verdocs-pagination_2.cjs\",[[256,\"verdocs-quick-filter\",{\"options\":[16],\"label\":[1],\"value\":[1537],\"placeholder\":[1],\"open\":[32]}],[256,\"verdocs-pagination\",{\"selectedPage\":[1538,\"selected-page\"],\"itemCount\":[2,\"item-count\"],\"perPage\":[2,\"per-page\"]}]]],[\"verdocs-dropdown.cjs\",[[256,\"verdocs-dropdown\",{\"options\":[16],\"containerId\":[32],\"showPicker\":[32]}]]],[\"verdocs-file-chooser_2.cjs\",[[256,\"verdocs-file-chooser\",{\"endpoint\":[16],\"file\":[32]}],[256,\"verdocs-progress-bar\",{\"label\":[1],\"showPercent\":[4,\"show-percent\"],\"percent\":[2]}]]],[\"verdocs-spinner.cjs\",[[256,\"verdocs-spinner\",{\"size\":[2],\"mode\":[1]}]]],[\"verdocs-dialog.cjs\",[[260,\"verdocs-dialog\",{\"persistent\":[4]}]]],[\"verdocs-ok-dialog.cjs\",[[256,\"verdocs-ok-dialog\",{\"heading\":[1],\"message\":[1],\"buttonLabel\":[1,\"button-label\"],\"showCancel\":[4,\"show-cancel\"],\"closed\":[32]}]]],[\"verdocs-flag.cjs\",[[256,\"verdocs-flag\",{\"variant\":[1],\"label\":[1],\"showSkip\":[4,\"show-skip\"]}]]],[\"verdocs-download-dialog_4.cjs\",[[256,\"verdocs-sign-footer\",{\"endpoint\":[16],\"envelopeId\":[1,\"envelope-id\"],\"isDone\":[4,\"is-done\"],\"askingQuestion\":[32],\"declinine\":[32],\"envelope\":[32]}],[256,\"verdocs-download-dialog\",{\"signed\":[4],\"polling\":[4],\"documents\":[16],\"hasCertificate\":[4,\"has-certificate\"]}],[256,\"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]}],[256,\"verdocs-question-dialog\",{\"question\":[1025],\"closed\":[32]}]]],[\"verdocs-adopt-signature-dialog_7.cjs\",[[256,\"verdocs-view\",{\"endpoint\":[16],\"envelopeId\":[1,\"envelope-id\"],\"headerTargetId\":[1,\"header-target-id\"],\"canceling\":[32],\"showCancelDone\":[32],\"showLoadError\":[32],\"loading\":[32],\"envelope\":[32],\"zoomLevel\":[32],\"showDownloadDialog\":[32],\"polling\":[32]}],[256,\"verdocs-kba-dialog\",{\"step\":[2],\"steps\":[2],\"helptitle\":[1],\"helptext\":[1],\"mode\":[1],\"label\":[1],\"placeholder\":[1],\"recipient\":[16],\"choices\":[16],\"agreed\":[32],\"response\":[32],\"updatedRecipient\":[32],\"dobContainerId\":[32]}],[256,\"verdocs-adopt-signature-dialog\",{\"name\":[1],\"nameLocked\":[4,\"name-locked\"],\"fontLoaded\":[32],\"enteredName\":[32],\"enteredInitials\":[32],\"mode\":[32],\"isDrawing\":[32],\"hasDrawnSignature\":[32],\"hasDrawnInitials\":[32]}],[256,\"verdocs-otp-dialog\",{\"endpoint\":[1040],\"method\":[1],\"resendDisabled\":[32],\"response\":[32]}],[256,\"verdocs-passcode-dialog\",{\"endpoint\":[1040],\"response\":[32]}],[256,\"verdocs-disclosure-dialog\",{\"disclosures\":[1],\"delegator\":[4],\"accepted\":[32]}],[256,\"verdocs-delegate-dialog\",{\"endpoint\":[1040],\"envelope\":[16],\"first_name\":[32],\"last_name\":[32],\"email\":[32],\"phone\":[32],\"message\":[32]}]]],[\"verdocs-organization-card_2.cjs\",[[256,\"verdocs-organization-card\",{\"organization\":[16],\"hovered\":[32]},[[1,\"mouseover\",\"onMouseOver\"],[1,\"mouseout\",\"onMouseOut\"]]],[260,\"verdocs-portal\",{\"anchor\":[1],\"voffset\":[2]},[[11,\"scroll\",\"handleScroll\"],[9,\"resize\",\"handleResize\"],[4,\"click\",\"handleClick\"]]]]],[\"verdocs-checkbox_5.cjs\",[[256,\"verdocs-template-field-properties\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"fieldName\":[1025,\"field-name\"],\"helpText\":[1,\"help-text\"],\"dirty\":[32],\"label\":[32],\"type\":[32],\"name\":[32],\"required\":[32],\"readonly\":[32],\"roleName\":[32],\"group\":[32],\"fieldType\":[32],\"options\":[32],\"placeholder\":[32],\"defaultValue\":[32],\"showingHelp\":[32],\"loading\":[32],\"template\":[32]}],[256,\"verdocs-select-input\",{\"value\":[1],\"label\":[1],\"options\":[16],\"disabled\":[4]}],[256,\"verdocs-component-error\",{\"message\":[1]}],[256,\"verdocs-checkbox\",{\"checked\":[4],\"name\":[1],\"label\":[1],\"value\":[1],\"theme\":[1],\"size\":[1],\"disabled\":[4]}],[256,\"verdocs-loader\"]]],[\"verdocs-field-attachment_11.cjs\",[[256,\"verdocs-field-attachment\",{\"source\":[513],\"sourceid\":[513],\"fieldname\":[513],\"field\":[16],\"isPreview\":[516,\"is-preview\"],\"disabled\":[516],\"editable\":[516],\"moveable\":[516],\"done\":[516],\"xscale\":[514],\"yscale\":[514],\"pagenumber\":[514],\"showingProperties\":[32],\"dialogOpen\":[32],\"selectedFile\":[32],\"focused\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]},[[0,\"blur\",\"handleBlur\"]]],[256,\"verdocs-field-checkbox\",{\"source\":[513],\"sourceid\":[513],\"fieldname\":[513],\"field\":[16],\"isPreview\":[516,\"is-preview\"],\"disabled\":[516],\"done\":[516],\"editable\":[516],\"moveable\":[516],\"xscale\":[514],\"yscale\":[514],\"pagenumber\":[514],\"showingProperties\":[32],\"focused\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]},[[0,\"blur\",\"handleBlur\"]]],[256,\"verdocs-field-date\",{\"source\":[513],\"sourceid\":[513],\"fieldname\":[513],\"disabled\":[516],\"editable\":[516],\"moveable\":[516],\"done\":[516],\"xscale\":[514],\"yscale\":[514],\"pagenumber\":[514],\"field\":[16],\"isPreview\":[516,\"is-preview\"],\"containerId\":[32],\"showingProperties\":[32],\"focused\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]},[[2,\"blur\",\"handleBlur\"]]],[256,\"verdocs-field-dropdown\",{\"source\":[513],\"sourceid\":[513],\"fieldname\":[513],\"field\":[16],\"isPreview\":[516,\"is-preview\"],\"disabled\":[516],\"editable\":[516],\"moveable\":[516],\"done\":[516],\"xscale\":[514],\"yscale\":[514],\"pagenumber\":[514],\"showingProperties\":[32],\"focused\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]},[[2,\"blur\",\"handleBlur\"]]],[256,\"verdocs-field-initial\",{\"source\":[513],\"sourceid\":[513],\"fieldname\":[513],\"field\":[16],\"disabled\":[516],\"initials\":[513],\"editable\":[516],\"moveable\":[516],\"done\":[516],\"xscale\":[514],\"yscale\":[514],\"pagenumber\":[514],\"initialid\":[513],\"isPreview\":[516,\"is-preview\"],\"showingProperties\":[32],\"focused\":[32],\"menuOpen\":[32],\"tempInitials\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]},[[0,\"blur\",\"handleBlur\"]]],[256,\"verdocs-field-radio\",{\"source\":[513],\"sourceid\":[513],\"fieldname\":[513],\"field\":[16],\"isPreview\":[516,\"is-preview\"],\"disabled\":[516],\"required\":[516],\"done\":[516],\"editable\":[516],\"moveable\":[516],\"xscale\":[514],\"yscale\":[514],\"pagenumber\":[514],\"showingProperties\":[32],\"focused\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]},[[0,\"blur\",\"handleBlur\"]]],[256,\"verdocs-field-signature\",{\"source\":[513],\"sourceid\":[513],\"fieldname\":[513],\"field\":[16],\"name\":[513],\"disabled\":[516],\"editable\":[516],\"moveable\":[516],\"done\":[516],\"xscale\":[514],\"yscale\":[514],\"pagenumber\":[514],\"signatureid\":[513],\"isPreview\":[516,\"is-preview\"],\"showingProperties\":[32],\"focused\":[32],\"menuOpen\":[32],\"tempSignature\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]},[[0,\"blur\",\"handleBlur\"],[0,\"blur\",\"onBlur\"]]],[256,\"verdocs-field-textarea\",{\"endpoint\":[16],\"source\":[513],\"sourceid\":[513],\"fieldname\":[513],\"field\":[16],\"isPreview\":[516,\"is-preview\"],\"disabled\":[516],\"editable\":[516],\"moveable\":[516],\"done\":[516],\"xscale\":[514],\"yscale\":[514],\"pagenumber\":[514],\"showingProperties\":[32],\"focused\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]},[[2,\"blur\",\"handleBlur\"]]],[256,\"verdocs-field-textbox\",{\"source\":[513],\"sourceid\":[513],\"fieldname\":[513],\"field\":[16],\"isPreview\":[516,\"is-preview\"],\"disabled\":[516],\"multiline\":[516],\"editable\":[516],\"moveable\":[516],\"done\":[516],\"xscale\":[514],\"yscale\":[514],\"pagenumber\":[514],\"showingProperties\":[32],\"focused\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]},[[2,\"blur\",\"handleBlur\"]]],[256,\"verdocs-field-timestamp\",{\"source\":[513],\"sourceid\":[513],\"fieldname\":[513],\"field\":[16],\"isPreview\":[516,\"is-preview\"],\"disabled\":[516],\"editable\":[516],\"moveable\":[516],\"done\":[516],\"xscale\":[514],\"yscale\":[514],\"pagenumber\":[2],\"showingProperties\":[32],\"focused\":[32],\"focusField\":[64],\"showSettingsPanel\":[64],\"hideSettingsPanel\":[64]},[[2,\"blur\",\"handleBlur\"]]],[256,\"verdocs-upload-dialog\",{\"maxSize\":[1026,\"max-size\"],\"existingFile\":[1032,\"existing-file\"],\"draggingOver\":[32],\"confirmDelete\":[32],\"selectedFiles\":[32],\"errorMessage\":[32]}]]],[\"verdocs-template-document-page_2.cjs\",[[256,\"verdocs-toolbar-icon\",{\"text\":[1],\"icon\":[1],\"placement\":[1],\"containerId\":[32]}],[256,\"verdocs-template-document-page\",{\"endpoint\":[16],\"editable\":[4],\"disabled\":[4],\"done\":[4],\"templateId\":[513,\"template-id\"],\"documentId\":[513,\"document-id\"],\"pageNumber\":[514,\"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],\"xScale\":[32],\"yScale\":[32],\"loading\":[32],\"template\":[32]}]]],[\"verdocs-preview_6.cjs\",[[256,\"verdocs-template-fields\",{\"endpoint\":[16],\"templateId\":[1537,\"template-id\"],\"toolbarTargetId\":[1,\"toolbar-target-id\"],\"placing\":[32],\"showMustSelectRole\":[32],\"selectedRoleName\":[32],\"loading\":[32],\"template\":[32]},[[4,\"keydown\",\"handleKeyDown\"]],{\"templateId\":[\"onTemplateIdChanged\"]}],[256,\"verdocs-preview\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"loading\":[32],\"template\":[32]},null,{\"templateId\":[\"onTemplateIdChanged\"]}],[256,\"verdocs-send\",{\"endpoint\":[16],\"templateId\":[513,\"template-id\"],\"environment\":[1],\"showCancel\":[4,\"show-cancel\"],\"containerId\":[32],\"showPickerForId\":[32],\"sessionContacts\":[32],\"sending\":[32],\"rolesCompleted\":[32],\"loading\":[32],\"template\":[32],\"reset\":[64]},null,{\"templateId\":[\"onTemplateIdChanged\"]}],[256,\"verdocs-template-roles\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"showingRoleDialog\":[32],\"sender\":[32],\"dragging\":[32],\"loading\":[32],\"template\":[32]}],[256,\"verdocs-template-attachments\",{\"endpoint\":[16],\"templateId\":[1,\"template-id\"],\"uploading\":[32],\"progressLabel\":[32],\"progressPercent\":[32],\"showDeleteError\":[32],\"confirmDeleteDocument\":[32],\"loading\":[32],\"template\":[32]}],[256,\"verdocs-template-build-tabs\",{\"endpoint\":[16],\"templateId\":[1537,\"template-id\"],\"step\":[1537],\"loading\":[32],\"template\":[32]},null,{\"templateId\":[\"onTemplateIdChanged\"],\"step\":[\"onStepChanged\"]}]]]]"), options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -12,6 +12,10 @@ verdocs-build .content {
12
12
  }
13
13
  verdocs-build verdocs-template-attachments,
14
14
  verdocs-build verdocs-template-roles {
15
+ display: block;
16
+ width: 500px;
17
+ max-width: 95%;
18
+ box-sizing: border-box;
15
19
  margin: 20px;
16
20
  }
17
21
  verdocs-build verdocs-template-fields {
@@ -104,10 +104,12 @@ export class VerdocsBuild {
104
104
  }
105
105
  async handleRolesUpdated(e) {
106
106
  var _a;
107
+ console.log('[BUILD] Roloes updated', e);
107
108
  (_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
108
109
  }
109
110
  async handleTemplateUpdated(e) {
110
111
  var _a;
112
+ console.log('[BUILD] Template updated', e);
111
113
  (_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
112
114
  }
113
115
  handleAttachmentsNext() {
@@ -132,7 +134,7 @@ export class VerdocsBuild {
132
134
  if (!this.endpoint.session) {
133
135
  return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
134
136
  }
135
- 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: () => this.handleCancel(), onNext: () => this.handleAttachmentsNext(), onTemplateUpdated: e => this.handleTemplateUpdated(e) })), this.step === 'roles' && (h("verdocs-template-roles", { templateId: this.templateId, endpoint: this.endpoint, onExit: () => this.handleCancel(), onNext: () => this.handleRolesNext(), onRolesUpdated: e => this.handleRolesUpdated(e) })), this.step === 'settings' && h("verdocs-template-settings", { templateId: this.templateId, endpoint: this.endpoint, 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' } })))))));
137
+ 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: () => this.handleCancel(), onNext: () => this.handleAttachmentsNext(), onTemplateUpdated: e => this.handleTemplateUpdated(e) })), this.step === 'roles' && (h("verdocs-template-roles", { templateId: this.templateId, endpoint: this.endpoint, onExit: () => this.handleCancel(), onNext: () => this.handleRolesNext(), onRolesUpdated: e => this.handleRolesUpdated(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' } })))))));
136
138
  }
137
139
  static get is() { return "verdocs-build"; }
138
140
  static get originalStyleUrls() {
@@ -196,7 +198,7 @@ export class VerdocsBuild {
196
198
  "mutable": true,
197
199
  "complexType": {
198
200
  "original": "TVerdocsBuildStep",
199
- "resolved": "\"attachments\" | \"fields\" | \"preview\" | \"roles\" | \"settings\"",
201
+ "resolved": "\"attachments\" | \"fields\" | \"preview\" | \"roles\"",
200
202
  "references": {
201
203
  "TVerdocsBuildStep": {
202
204
  "location": "local",
@@ -274,7 +276,7 @@ export class VerdocsBuild {
274
276
  },
275
277
  "complexType": {
276
278
  "original": "TVerdocsBuildStep",
277
- "resolved": "\"attachments\" | \"fields\" | \"preview\" | \"roles\" | \"settings\"",
279
+ "resolved": "\"attachments\" | \"fields\" | \"preview\" | \"roles\"",
278
280
  "references": {
279
281
  "TVerdocsBuildStep": {
280
282
  "location": "local",
@@ -1 +1 @@
1
- {"version":3,"file":"verdocs-build.js","sourceRoot":"","sources":["../../../../src/components/embeds/verdocs-build/verdocs-build.tsx"],"names":[],"mappings":"AAAA,OAAO,E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AAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,WAAC,OAAA,MAAA,IAAI,CAAC,IAAI,0CAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA,EAAA,EAAE,KAAK,EAAE,EAAC,KAAK,EAAE,MAAM,EAAC,GAAI,CAClI;oBACN,WAAK,KAAK,EAAC,yBAAyB;wBAClC,uBAAiB,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAC,GAAI,CAC9H,CACF,CACP,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {getTemplate, ICreateEnvelopeRecipientFromTemplate, IRole, ITemplate, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, Prop, h, Element, Event, EventEmitter, Host, Watch, State} from '@stencil/core';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nexport type TVerdocsBuildStep = 'attachments' | 'roles' | 'settings' | 'fields' | 'preview';\n\n/**\n * Display a template building experience. Several event callbacks provide status updates to the\n * parent application to support interface updates.\n *\n * ```ts\n * <verdocs-build\n * templateId={TEMPLATE_ID} step=\"preview\"\n * onSend={({detail}) => { console.log('Sent envelope from template', detail) }}\n * onSdkError={({ detail }) => { console.log('SDK error', detail) }}\n * />\n * ```\n */\n@Component({\n tag: 'verdocs-build',\n styleUrl: 'verdocs-build.scss',\n shadow: false,\n})\nexport class VerdocsBuild {\n private templateListenerId = null;\n\n @Element() el!: any;\n\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The ID of the template to create the document from. Unlike most other components, this is an optional parameter here.\n * If the template ID is known, `step` may also be specified to force displaying a specific step in the creation process.\n * If it is not specified, `step` will be ignored and the create step will be shown.\n */\n @Prop({reflect: true, mutable: true}) templateId: string | null = null;\n\n /**\n * The step in the creation process to display.\n */\n @Prop({reflect: true, mutable: true}) step: TVerdocsBuildStep = 'preview';\n\n /**\n * Event fired if the user clicks Cancel.\n */\n @Event({composed: true}) cancel: EventEmitter;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the user selects a different step.\n */\n @Event({composed: true}) stepChanged: EventEmitter<TVerdocsBuildStep>;\n\n /**\n * The user completed the Send form and clicked send.\n */\n @Event({composed: true}) send: EventEmitter<{recipients: ICreateEnvelopeRecipientFromTemplate[]; name: string; template_id: string}>;\n\n /**\n * Event fired when the template is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.\n */\n @Event({composed: true}) templateUpdated: EventEmitter<{endpoint: VerdocsEndpoint; template: ITemplate; event: string}>;\n\n /**\n * Event fired when the template is created by the upload step.\n */\n @Event({composed: true}) templateCreated: EventEmitter<{endpoint: VerdocsEndpoint; template: ITemplate; event: string}>;\n\n /**\n * Event fired when roles are updated in the roles step.\n */\n @Event({composed: true}) rolesUpdated: EventEmitter<{endpoint: VerdocsEndpoint; templateId: string; event: 'added' | 'deleted' | 'updated'; roles: IRole[]}>;\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n @Watch('templateId')\n onTemplateIdChanged(newTemplateId: string, oldTemplateId: string) {\n if (!oldTemplateId && newTemplateId && this.step === 'attachments') {\n this.step = 'preview';\n }\n\n this.loadTemplate(newTemplateId).catch((e: any) => console.log('Unknown Error', e));\n }\n\n @Watch('step')\n onStepChanged() {\n // We reload the template here even if only the step changed in case\n // we were out of sync before\n this.loadTemplate(this.templateId).catch((e: any) => console.log('Unknown Error', e));\n }\n\n async componentWillLoad() {\n try {\n this.endpoint.loadSession();\n if (!this.endpoint.session) {\n console.log('[BUILD] Unable to start builder session, must be authenticated');\n return;\n }\n\n if (!this.templateId) {\n console.log(`[BUILD] No template ID, activating upload mode`);\n this.step = 'attachments';\n this.loading = false;\n return;\n }\n\n try {\n this.loadTemplate(this.templateId).catch(e => console.log('[BUILD] Unable to load template', e));\n } catch (e) {\n console.log('[BUILD] Error loading template', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n } catch (e) {\n console.log('[BUILD] Error with builder session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n async loadTemplate(templateId: string) {\n if (templateId) {\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n false,\n (template: ITemplate) => {\n this.template = template;\n this.loading = false;\n },\n );\n }\n }\n\n disconnectedCallback() {\n console.log('[BUILD] Disconnected');\n this.unlistenToTemplate();\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n handleCancel() {\n this.step = 'preview';\n this.cancel?.emit();\n }\n\n async handleTemplateCreated(templateId: string) {\n await this.loadTemplate(templateId);\n this.templateId = templateId;\n this.step = 'roles';\n this.stepChanged?.emit('roles');\n }\n\n async handleRolesUpdated(e: any) {\n this.templateUpdated?.emit(e.detail);\n }\n\n async handleTemplateUpdated(e: any) {\n this.templateUpdated?.emit(e.detail);\n }\n\n handleAttachmentsNext() {\n this.step = 'roles';\n this.stepChanged?.emit('roles');\n }\n\n handleRolesNext() {\n this.step = 'fields';\n this.stepChanged?.emit('fields');\n }\n\n handleStepChanged(step: TVerdocsBuildStep) {\n this.step = step;\n this.stepChanged?.emit(step);\n }\n\n render() {\n if (this.loading) {\n return (\n <Host class=\"loading\">\n <verdocs-loader />\n </Host>\n );\n }\n\n if (!this.endpoint.session) {\n return (\n <Host>\n <verdocs-component-error message=\"You must be authenticated to use this module.\" />\n </Host>\n );\n }\n\n return (\n <Host>\n <div class=\"content\">\n <verdocs-template-build-tabs\n endpoint={this.endpoint}\n templateId={this.templateId}\n step={this.step}\n onSdkError={e => this.sdkError?.emit(e.detail)}\n onStepChanged={e => this.handleStepChanged(e.detail)}\n />\n\n {this.step === 'attachments' && (\n <verdocs-template-attachments\n templateId={this.templateId}\n endpoint={this.endpoint}\n onExit={() => this.handleCancel()}\n onNext={() => this.handleAttachmentsNext()}\n onTemplateUpdated={e => this.handleTemplateUpdated(e)}\n />\n )}\n\n {this.step === 'roles' && (\n <verdocs-template-roles\n templateId={this.templateId}\n endpoint={this.endpoint}\n onExit={() => this.handleCancel()}\n onNext={() => this.handleRolesNext()}\n onRolesUpdated={e => this.handleRolesUpdated(e)}\n />\n )}\n\n {this.step === 'settings' && <verdocs-template-settings templateId={this.templateId} endpoint={this.endpoint} onTemplateUpdated={e => this.handleTemplateUpdated(e)} />}\n\n {this.step === 'fields' && <verdocs-template-fields templateId={this.templateId} endpoint={this.endpoint} onTemplateUpdated={e => this.handleTemplateUpdated(e)} />}\n\n {this.step === 'preview' && (\n <div class=\"preview-container\">\n <div class=\"preview-send-wrapper\">\n <verdocs-send templateId={this.templateId} endpoint={this.endpoint} onSend={e => this.send?.emit(e.detail)} style={{width: '100%'}} />\n </div>\n <div class=\"preview-preview-wrapper\">\n <verdocs-preview templateId={this.templateId} endpoint={this.endpoint} style={{display: 'flex', flex: '1', maxWidth: '1000px'}} />\n </div>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"ver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AE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,WAAC,OAAA,MAAA,IAAI,CAAC,IAAI,0CAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA,EAAA,EAAE,KAAK,EAAE,EAAC,KAAK,EAAE,MAAM,EAAC,GAAI,CAClI;oBACN,WAAK,KAAK,EAAC,yBAAyB;wBAClC,uBAAiB,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAC,GAAI,CAC9H,CACF,CACP,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {getTemplate, ICreateEnvelopeRecipientFromTemplate, IRole, ITemplate, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, Prop, h, Element, Event, EventEmitter, Host, Watch, State} from '@stencil/core';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nexport type TVerdocsBuildStep = 'attachments' | 'roles' | 'fields' | 'preview';\n\n/**\n * Display a template building experience. Several event callbacks provide status updates to the\n * parent application to support interface updates.\n *\n * ```ts\n * <verdocs-build\n * templateId={TEMPLATE_ID} step=\"preview\"\n * onSend={({detail}) => { console.log('Sent envelope from template', detail) }}\n * onSdkError={({ detail }) => { console.log('SDK error', detail) }}\n * />\n * ```\n */\n@Component({\n tag: 'verdocs-build',\n styleUrl: 'verdocs-build.scss',\n shadow: false,\n})\nexport class VerdocsBuild {\n private templateListenerId = null;\n\n @Element() el!: any;\n\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The ID of the template to create the document from. Unlike most other components, this is an optional parameter here.\n * If the template ID is known, `step` may also be specified to force displaying a specific step in the creation process.\n * If it is not specified, `step` will be ignored and the create step will be shown.\n */\n @Prop({reflect: true, mutable: true}) templateId: string | null = null;\n\n /**\n * The step in the creation process to display.\n */\n @Prop({reflect: true, mutable: true}) step: TVerdocsBuildStep = 'preview';\n\n /**\n * Event fired if the user clicks Cancel.\n */\n @Event({composed: true}) cancel: EventEmitter;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the user selects a different step.\n */\n @Event({composed: true}) stepChanged: EventEmitter<TVerdocsBuildStep>;\n\n /**\n * The user completed the Send form and clicked send.\n */\n @Event({composed: true}) send: EventEmitter<{recipients: ICreateEnvelopeRecipientFromTemplate[]; name: string; template_id: string}>;\n\n /**\n * Event fired when the template is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.\n */\n @Event({composed: true}) templateUpdated: EventEmitter<{endpoint: VerdocsEndpoint; template: ITemplate; event: string}>;\n\n /**\n * Event fired when the template is created by the upload step.\n */\n @Event({composed: true}) templateCreated: EventEmitter<{endpoint: VerdocsEndpoint; template: ITemplate; event: string}>;\n\n /**\n * Event fired when roles are updated in the roles step.\n */\n @Event({composed: true}) rolesUpdated: EventEmitter<{endpoint: VerdocsEndpoint; templateId: string; event: 'added' | 'deleted' | 'updated'; roles: IRole[]}>;\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n @Watch('templateId')\n onTemplateIdChanged(newTemplateId: string, oldTemplateId: string) {\n if (!oldTemplateId && newTemplateId && this.step === 'attachments') {\n this.step = 'preview';\n }\n\n this.loadTemplate(newTemplateId).catch((e: any) => console.log('Unknown Error', e));\n }\n\n @Watch('step')\n onStepChanged() {\n // We reload the template here even if only the step changed in case\n // we were out of sync before\n this.loadTemplate(this.templateId).catch((e: any) => console.log('Unknown Error', e));\n }\n\n async componentWillLoad() {\n try {\n this.endpoint.loadSession();\n if (!this.endpoint.session) {\n console.log('[BUILD] Unable to start builder session, must be authenticated');\n return;\n }\n\n if (!this.templateId) {\n console.log(`[BUILD] No template ID, activating upload mode`);\n this.step = 'attachments';\n this.loading = false;\n return;\n }\n\n try {\n this.loadTemplate(this.templateId).catch(e => console.log('[BUILD] Unable to load template', e));\n } catch (e) {\n console.log('[BUILD] Error loading template', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n } catch (e) {\n console.log('[BUILD] Error with builder session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n async loadTemplate(templateId: string) {\n if (templateId) {\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n false,\n (template: ITemplate) => {\n this.template = template;\n this.loading = false;\n },\n );\n }\n }\n\n disconnectedCallback() {\n console.log('[BUILD] Disconnected');\n this.unlistenToTemplate();\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n handleCancel() {\n this.step = 'preview';\n this.cancel?.emit();\n }\n\n async handleTemplateCreated(templateId: string) {\n await this.loadTemplate(templateId);\n this.templateId = templateId;\n this.step = 'roles';\n this.stepChanged?.emit('roles');\n }\n\n async handleRolesUpdated(e: any) {\n console.log('[BUILD] Roloes updated', e);\n this.templateUpdated?.emit(e.detail);\n }\n\n async handleTemplateUpdated(e: any) {\n console.log('[BUILD] Template updated', e);\n this.templateUpdated?.emit(e.detail);\n }\n\n handleAttachmentsNext() {\n this.step = 'roles';\n this.stepChanged?.emit('roles');\n }\n\n handleRolesNext() {\n this.step = 'fields';\n this.stepChanged?.emit('fields');\n }\n\n handleStepChanged(step: TVerdocsBuildStep) {\n this.step = step;\n this.stepChanged?.emit(step);\n }\n\n render() {\n if (this.loading) {\n return (\n <Host class=\"loading\">\n <verdocs-loader />\n </Host>\n );\n }\n\n if (!this.endpoint.session) {\n return (\n <Host>\n <verdocs-component-error message=\"You must be authenticated to use this module.\" />\n </Host>\n );\n }\n\n return (\n <Host>\n <div class=\"content\">\n <verdocs-template-build-tabs\n endpoint={this.endpoint}\n templateId={this.templateId}\n step={this.step}\n onSdkError={e => this.sdkError?.emit(e.detail)}\n onStepChanged={e => this.handleStepChanged(e.detail)}\n />\n\n {this.step === 'attachments' && (\n <verdocs-template-attachments\n templateId={this.templateId}\n endpoint={this.endpoint}\n onExit={() => this.handleCancel()}\n onNext={() => this.handleAttachmentsNext()}\n onTemplateUpdated={e => this.handleTemplateUpdated(e)}\n />\n )}\n\n {this.step === 'roles' && (\n <verdocs-template-roles\n templateId={this.templateId}\n endpoint={this.endpoint}\n onExit={() => this.handleCancel()}\n onNext={() => this.handleRolesNext()}\n onRolesUpdated={e => this.handleRolesUpdated(e)}\n />\n )}\n\n {this.step === 'fields' && <verdocs-template-fields templateId={this.templateId} endpoint={this.endpoint} onTemplateUpdated={e => this.handleTemplateUpdated(e)} />}\n\n {this.step === 'preview' && (\n <div class=\"preview-container\">\n <div class=\"preview-send-wrapper\">\n <verdocs-send templateId={this.templateId} endpoint={this.endpoint} onSend={e => this.send?.emit(e.detail)} style={{width: '100%'}} />\n </div>\n <div class=\"preview-preview-wrapper\">\n <verdocs-preview templateId={this.templateId} endpoint={this.endpoint} style={{display: 'flex', flex: '1', maxWidth: '1000px'}} />\n </div>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -1,60 +1,52 @@
1
1
  verdocs-template-build-tabs {
2
- flex: 1;
3
- gap: 15px;
4
2
  display: flex;
5
- align-items: center;
6
3
  flex-direction: row;
7
- font-family: var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);
8
- }
9
- verdocs-template-build-tabs verdocs-button-panel svg {
10
- transform: scale(0.8);
11
- }
12
- verdocs-template-build-tabs verdocs-template-attachments,
13
- verdocs-template-build-tabs verdocs-template-roles {
14
- margin: 20px;
15
- }
16
- verdocs-template-build-tabs verdocs-template-fields {
17
- border-top: 1px solid #777777;
18
- }
19
- verdocs-template-build-tabs verdocs-template-attachments {
20
- padding: 20px;
21
- background: #ffffff;
22
- }
23
- verdocs-template-build-tabs verdocs-template-fields {
4
+ align-items: flex-end;
5
+ flex: 0 0 50px;
24
6
  width: 100%;
7
+ background: #ffffff;
8
+ color: #72757d;
9
+ border-bottom: 1px solid #dddddd;
10
+ filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
11
+ font-family: var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);
25
12
  }
26
- verdocs-template-build-tabs verdocs-preview {
27
- flex: 1;
28
- }
29
-
30
- .template-details-panel .row {
13
+ verdocs-template-build-tabs .tab {
14
+ position: relative;
31
15
  display: flex;
32
- flex-direction: row;
33
- gap: 8px;
34
- margin: 10px 0;
35
- }
36
- .template-details-panel label {
37
- flex: 0 0 70px;
38
- }
39
- .template-details-panel .value {
40
16
  flex: 1;
41
- font-weight: 300;
42
- overflow: hidden;
43
- text-overflow: ellipsis;
44
- white-space: nowrap;
45
- }
46
- .template-details-panel .icon-button {
17
+ align-items: center;
18
+ justify-content: center;
19
+ height: 50px;
20
+ padding: 0 4px;
21
+ background: #e7e7e7;
22
+ font-weight: 700;
23
+ font-size: 12px;
47
24
  cursor: pointer;
48
- opacity: 0.8;
49
- flex: 0;
50
- width: 18px;
51
- height: 18px;
52
25
  }
53
- .template-details-panel .icon-button svg {
54
- stroke: #000000;
55
- width: 18px;
56
- height: 18px;
26
+ @media (min-width: 768px) {
27
+ verdocs-template-build-tabs .tab {
28
+ padding: 0 8px 0 24px;
29
+ font-size: 14px;
30
+ }
31
+ }
32
+ verdocs-template-build-tabs .tab svg {
33
+ position: absolute;
34
+ top: 0;
35
+ right: -19px;
36
+ z-index: 10;
37
+ pointer-events: none;
38
+ display: none;
39
+ }
40
+ @media (min-width: 768px) {
41
+ verdocs-template-build-tabs .tab svg {
42
+ display: block;
43
+ }
44
+ }
45
+ verdocs-template-build-tabs .tab.active {
46
+ background: #ffffff;
47
+ color: #707ae5;
57
48
  }
58
- .template-details-panel .icon-button:hover {
59
- opacity: 1;
49
+ verdocs-template-build-tabs .tab.disabled {
50
+ cursor: default;
51
+ color: #d1d5db;
60
52
  }
@@ -1,12 +1,7 @@
1
- import { format } from "date-fns";
2
1
  import { getTemplate, VerdocsEndpoint } from "@verdocs/js-sdk";
3
2
  import { h, Host } from "@stencil/core";
4
- import { VerdocsToast } from "../../../utils/Toast";
5
3
  import { SDKError } from "../../../utils/errors";
6
4
  import { Store } from "../../../utils/Datastore";
7
- const HelpIcon = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" fill="#5c6575"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>';
8
- const CopyIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75" /></svg>`;
9
- const STEPS = ['attachments', 'roles', 'settings', 'fields', 'preview'];
10
5
  /**
11
6
  * Display a set of tabs for the template builder.
12
7
  */
@@ -73,28 +68,16 @@ export class VerdocsTemplateBuildTabs {
73
68
  (_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));
74
69
  }
75
70
  }
76
- setStep(e) {
71
+ handleSelect(tab) {
77
72
  var _a;
78
- console.log('[BUILD_TABS] Selected step', e.detail.tab.id);
79
- e.stopPropagation();
80
- e.preventDefault();
81
- this.step = e.detail.tab.id;
82
- (_a = this.stepChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail.tab.id);
83
- }
84
- copyTemplateId() {
85
- navigator.clipboard
86
- .writeText(this.templateId)
87
- .then(() => {
88
- VerdocsToast('Template ID copied', { style: 'success', duration: 3000 });
89
- })
90
- .catch(e => {
91
- var _a;
92
- console.warn('[BUILD_TABS] Error copying to clipboard', e);
93
- (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(e);
94
- });
73
+ if (tab.disabled || tab.id === this.step) {
74
+ return;
75
+ }
76
+ this.step = tab.id;
77
+ (_a = this.stepChanged) === null || _a === void 0 ? void 0 : _a.emit(tab.id);
95
78
  }
96
79
  render() {
97
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
80
+ var _a, _b, _c;
98
81
  if (this.loading) {
99
82
  return (h(Host, null, h("verdocs-loader", null)));
100
83
  }
@@ -102,26 +85,23 @@ export class VerdocsTemplateBuildTabs {
102
85
  return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
103
86
  }
104
87
  const canEditRoles = (((_a = this.template) === null || _a === void 0 ? void 0 : _a.documents) || []).length > 0;
105
- let canEditFields = canEditRoles && (((_b = this.template) === null || _b === void 0 ? void 0 : _b.roles) || []).length > 0;
88
+ const canEditFields = canEditRoles && (((_b = this.template) === null || _b === void 0 ? void 0 : _b.roles) || []).length > 0;
106
89
  const canPreview = canEditFields && (((_c = this.template) === null || _c === void 0 ? void 0 : _c.fields) || []).length > 0;
107
- let selectedStepIndex = Math.max(STEPS.indexOf(this.step), 0);
108
- if (!canPreview && selectedStepIndex >= 4) {
109
- selectedStepIndex = 3;
110
- }
111
- if (!canEditFields && selectedStepIndex >= 3) {
112
- selectedStepIndex = 1;
113
- }
114
- if (!canEditRoles && selectedStepIndex >= 1) {
115
- selectedStepIndex = 0;
116
- }
117
- return (h(Host, null, h("verdocs-tabs", { onSelectTab: e => this.setStep(e), selectedTab: selectedStepIndex, tabs: [
118
- { id: 'attachments', disabled: false, label: 'Attachment(s)' },
119
- { id: 'roles', disabled: !canEditRoles, label: 'Roles' },
120
- { id: 'settings', disabled: !canEditFields, label: 'Settings' },
121
- { id: 'fields', disabled: !canEditFields, label: 'Fields' },
122
- { id: 'preview', disabled: !canPreview, label: 'Preview/Send' },
123
- ] }), this.templateId && (h("div", { class: "info" }, h("verdocs-button-panel", { icon: HelpIcon }, h("div", { class: "template-details-panel" }, h("h6", null, "Template Details"), h("div", { class: "row" }, h("label", null, "ID:"), h("div", { class: "value" }, this.templateId), h("div", { class: "icon-button", innerHTML: CopyIcon, onClick: () => this.copyTemplateId() })), h("div", { class: "row" }, h("label", null, "Name:"), h("div", { class: "value" }, (_d = this.template) === null || _d === void 0 ? void 0 : _d.name)), h("div", { class: "row" }, h("label", null, "Visibility:"), h("div", { class: "value" }, ((_e = this.template) === null || _e === void 0 ? void 0 : _e.is_public) ? 'Public' : ((_f = this.template) === null || _f === void 0 ? void 0 : _f.is_personal) ? 'Private' : 'Shared')), h("div", { class: "row" }, h("label", null, "Created:"), h("div", { class: "value" }, ((_g = this.template) === null || _g === void 0 ? void 0 : _g.counter) ? format(new Date((_h = this.template) === null || _h === void 0 ? void 0 : _h.created_at), 'P p') : '')), h("div", { class: "row" }, h("label", null, "Used:"), h("div", { class: "value" }, (_j = this.template) === null || _j === void 0 ? void 0 :
124
- _j.counter, " time(s)"))))))));
90
+ const tabs = [
91
+ { id: 'attachments', label: 'Attachments', disabled: false },
92
+ { id: 'roles', label: 'Workflow', disabled: !canEditRoles },
93
+ { id: 'fields', label: 'Fields', disabled: !canEditFields },
94
+ { id: 'preview', label: 'Preview & Send', disabled: !canPreview },
95
+ ];
96
+ return (h(Host, null, tabs.map(tab => {
97
+ const isActive = tab.id === this.step;
98
+ const classes = ['tab'];
99
+ if (isActive)
100
+ classes.push('active');
101
+ if (tab.disabled)
102
+ classes.push('disabled');
103
+ return (h("div", { class: classes.join(' '), onClick: () => this.handleSelect(tab) }, h("span", null, tab.label), h("svg", { "aria-hidden": "true", xmlns: "http://www.w3.org/2000/svg", width: "19", height: "50", viewBox: "0 0 19 50" }, h("polygon", { points: "0,0 19,25 0,50", fill: isActive ? '#ffffff' : '#e7e7e7' }))));
104
+ })));
125
105
  }
126
106
  static get is() { return "verdocs-template-build-tabs"; }
127
107
  static get originalStyleUrls() {
@@ -185,7 +165,7 @@ export class VerdocsTemplateBuildTabs {
185
165
  "mutable": true,
186
166
  "complexType": {
187
167
  "original": "TVerdocsBuildStep",
188
- "resolved": "\"attachments\" | \"fields\" | \"preview\" | \"roles\" | \"settings\"",
168
+ "resolved": "\"attachments\" | \"fields\" | \"preview\" | \"roles\"",
189
169
  "references": {
190
170
  "TVerdocsBuildStep": {
191
171
  "location": "local",
@@ -248,7 +228,7 @@ export class VerdocsTemplateBuildTabs {
248
228
  },
249
229
  "complexType": {
250
230
  "original": "TVerdocsBuildStep",
251
- "resolved": "\"attachments\" | \"fields\" | \"preview\" | \"roles\" | \"settings\"",
231
+ "resolved": "\"attachments\" | \"fields\" | \"preview\" | \"roles\"",
252
232
  "references": {
253
233
  "TVerdocsBuildStep": {
254
234
  "location": "local",
@@ -1 +1 @@
1
- {"version":3,"file":"verdocs-template-build-tabs.js","sourceRoot":"","sources":["../../../../src/components/templates/verdocs-template-build-tabs/verdocs-template-build-tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,WAAW,EAAa,eAAe,EAAC,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,IAAI,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAC,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAC,KAAK,EAAC,MAAM,0BAA0B,CAAC;AAE/C,MAAM,QAAQ,GACZ,q7BAAq7B,CAAC;AAEx7B,MAAM,QAAQ,GAAG,onBAAonB,CAAC;AAEtoB,MAAM,KAAK,GAAG,CAAC,aAAa,EAAE,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CAAC,cAAc,EAAE,GAAI,CAClF;wBACN,WAAK,KAAK,EAAC,KAAK;4BACd,yBAAoB;4BACpB,WAAK,KAAK,EAAC,OAAO,IAAE,MAAA,IAAI,CAAC,QAAQ,0CAAE,IAAI,CAAO,CAC1C;wBACN,WAAK,KAAK,EAAC,KAAK;4BACd,+BAA0B;4BAC1B,WAAK,KAAK,EAAC,OAAO,IAAE,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,SAAS,EAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,WAAW,EAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAO,CAC9G;wBACN,WAAK,KAAK,EAAC,KAAK;4BACd,4BAAuB;4BACvB,WAAK,KAAK,EAAC,OAAO,IAAE,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,OAAO,EAAC,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,MAAA,IAAI,CAAC,QAAQ,0CAAE,UAAU,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAO,CACvG;wBACN,WAAK,KAAK,EAAC,KAAK;4BACd,yBAAoB;4BACpB,WAAK,KAAK,EAAC,OAAO,IAAE,MAAA,IAAI,CAAC,QAAQ;mCAAE,OAAO;2CAAe,CACrD,CACF,CACe,CACnB,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {format} from 'date-fns';\nimport {getTemplate, ITemplate, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, Prop, h, Event, EventEmitter, Host, Watch, State} from '@stencil/core';\nimport {VerdocsToast} from '../../../utils/Toast';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nconst HelpIcon =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" width=\"24\" fill=\"#5c6575\"><path d=\"M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z\"/></svg>';\n\nconst CopyIcon = `<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75\" /></svg>`;\n\nconst STEPS = ['attachments', 'roles', 'settings', 'fields', 'preview'];\nexport type TVerdocsBuildStep = 'attachments' | 'roles' | 'settings' | 'fields' | 'preview';\n\n/**\n * Display a set of tabs for the template builder.\n */\n@Component({\n tag: 'verdocs-template-build-tabs',\n styleUrl: 'verdocs-template-build-tabs.scss',\n shadow: false,\n})\nexport class VerdocsTemplateBuildTabs {\n private templateListenerId = null;\n\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The ID of the template to create the document from. Unlike most other components, this is an optional parameter here.\n * If the template ID is known, `step` may also be specified to force displaying a specific step in the creation process.\n * If it is not specified, `step` will be ignored and the create step will be shown.\n */\n @Prop({reflect: true, mutable: true}) templateId: string | null = null;\n\n /**\n * The step in the creation process to display.\n */\n @Prop({reflect: true, mutable: true}) step: TVerdocsBuildStep = 'preview';\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the user selects a different step.\n */\n @Event({composed: true}) stepChanged: EventEmitter<TVerdocsBuildStep>;\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n disconnectedCallback() {\n this.unlistenToTemplate();\n }\n\n async listenToTemplate() {\n this.unlistenToTemplate();\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n false,\n (template: ITemplate) => {\n this.template = template;\n this.loading = false;\n },\n );\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n @Watch('templateId')\n onTemplateIdChanged(newTemplateId: string) {\n console.log('[BUILD_TABS] Template ID changed', newTemplateId);\n this.listenToTemplate();\n }\n\n @Watch('step')\n onStepChanged(newStep: TVerdocsBuildStep) {\n console.log('[BUILD_TABS] Step changed', newStep);\n }\n\n async componentWillLoad() {\n try {\n this.endpoint.loadSession();\n if (!this.endpoint.session) {\n console.log('[BUILD_TABS] Unable to start builder session, must be authenticated');\n return;\n }\n\n if (!this.templateId) {\n this.step = 'attachments';\n console.log('[BUILD_TABS] Missing required template ID, forcing view to attachments');\n return;\n }\n\n this.listenToTemplate();\n } catch (e) {\n console.log('[BUILD_TABS] Error loading template', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n setStep(e: any) {\n console.log('[BUILD_TABS] Selected step', e.detail.tab.id);\n e.stopPropagation();\n e.preventDefault();\n this.step = e.detail.tab.id;\n this.stepChanged?.emit(e.detail.tab.id);\n }\n\n copyTemplateId() {\n navigator.clipboard\n .writeText(this.templateId)\n .then(() => {\n VerdocsToast('Template ID copied', {style: 'success', duration: 3000});\n })\n .catch(e => {\n console.warn('[BUILD_TABS] Error copying to clipboard', e);\n this.sdkError?.emit(e);\n });\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n if (!this.endpoint.session) {\n return (\n <Host>\n <verdocs-component-error message=\"You must be authenticated to use this module.\" />\n </Host>\n );\n }\n\n const canEditRoles = (this.template?.documents || []).length > 0;\n let canEditFields = canEditRoles && (this.template?.roles || []).length > 0;\n const canPreview = canEditFields && (this.template?.fields || []).length > 0;\n\n let selectedStepIndex = Math.max(STEPS.indexOf(this.step), 0);\n if (!canPreview && selectedStepIndex >= 4) {\n selectedStepIndex = 3;\n }\n if (!canEditFields && selectedStepIndex >= 3) {\n selectedStepIndex = 1;\n }\n if (!canEditRoles && selectedStepIndex >= 1) {\n selectedStepIndex = 0;\n }\n\n return (\n <Host>\n <verdocs-tabs\n onSelectTab={e => this.setStep(e)}\n selectedTab={selectedStepIndex}\n tabs={[\n {id: 'attachments', disabled: false, label: 'Attachment(s)'},\n {id: 'roles', disabled: !canEditRoles, label: 'Roles'},\n {id: 'settings', disabled: !canEditFields, label: 'Settings'},\n {id: 'fields', disabled: !canEditFields, label: 'Fields'},\n {id: 'preview', disabled: !canPreview, label: 'Preview/Send'},\n ]}\n />\n\n {this.templateId && (\n <div class=\"info\">\n <verdocs-button-panel icon={HelpIcon}>\n <div class=\"template-details-panel\">\n <h6>Template Details</h6>\n <div class=\"row\">\n <label>ID:</label>\n <div class=\"value\">{this.templateId}</div>\n <div class=\"icon-button\" innerHTML={CopyIcon} onClick={() => this.copyTemplateId()} />\n </div>\n <div class=\"row\">\n <label>Name:</label>\n <div class=\"value\">{this.template?.name}</div>\n </div>\n <div class=\"row\">\n <label>Visibility:</label>\n <div class=\"value\">{this.template?.is_public ? 'Public' : this.template?.is_personal ? 'Private' : 'Shared'}</div>\n </div>\n <div class=\"row\">\n <label>Created:</label>\n <div class=\"value\">{this.template?.counter ? format(new Date(this.template?.created_at), 'P p') : ''}</div>\n </div>\n <div class=\"row\">\n <label>Used:</label>\n <div class=\"value\">{this.template?.counter} time(s)</div>\n </div>\n </div>\n </verdocs-button-panel>\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"verdocs-template-build-tabs.js","sourceRoot":"","sources":["../../../../src/components/templates/verdocs-template-build-tabs/verdocs-template-build-tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAa,eAAe,EAAC,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,IAAI,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAC,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAC,K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,OAAO,CACL,WAAK,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC;gBAClE,gBAAO,GAAG,CAAC,KAAK,CAAQ;gBACxB,0BAAiB,MAAM,EAAC,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW;oBACnG,eAAS,MAAM,EAAC,gBAAgB,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,GAAI,CACvE,CACF,CACP,CAAC;QACJ,CAAC,CAAC,CACG,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {getTemplate, ITemplate, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, Prop, h, Event, EventEmitter, Host, Watch, State} from '@stencil/core';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nexport type TVerdocsBuildStep = 'attachments' | 'roles' | 'fields' | 'preview';\n\ninterface IBuildTab {\n id: TVerdocsBuildStep;\n label: string;\n disabled: boolean;\n}\n\n/**\n * Display a set of tabs for the template builder.\n */\n@Component({\n tag: 'verdocs-template-build-tabs',\n styleUrl: 'verdocs-template-build-tabs.scss',\n shadow: false,\n})\nexport class VerdocsTemplateBuildTabs {\n private templateListenerId = null;\n\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The ID of the template to create the document from. Unlike most other components, this is an optional parameter here.\n * If the template ID is known, `step` may also be specified to force displaying a specific step in the creation process.\n * If it is not specified, `step` will be ignored and the create step will be shown.\n */\n @Prop({reflect: true, mutable: true}) templateId: string | null = null;\n\n /**\n * The step in the creation process to display.\n */\n @Prop({reflect: true, mutable: true}) step: TVerdocsBuildStep = 'preview';\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the user selects a different step.\n */\n @Event({composed: true}) stepChanged: EventEmitter<TVerdocsBuildStep>;\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n disconnectedCallback() {\n this.unlistenToTemplate();\n }\n\n async listenToTemplate() {\n this.unlistenToTemplate();\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n false,\n (template: ITemplate) => {\n this.template = template;\n this.loading = false;\n },\n );\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n @Watch('templateId')\n onTemplateIdChanged(newTemplateId: string) {\n console.log('[BUILD_TABS] Template ID changed', newTemplateId);\n this.listenToTemplate();\n }\n\n @Watch('step')\n onStepChanged(newStep: TVerdocsBuildStep) {\n console.log('[BUILD_TABS] Step changed', newStep);\n }\n\n async componentWillLoad() {\n try {\n this.endpoint.loadSession();\n if (!this.endpoint.session) {\n console.log('[BUILD_TABS] Unable to start builder session, must be authenticated');\n return;\n }\n\n if (!this.templateId) {\n this.step = 'attachments';\n console.log('[BUILD_TABS] Missing required template ID, forcing view to attachments');\n return;\n }\n\n this.listenToTemplate();\n } catch (e) {\n console.log('[BUILD_TABS] Error loading template', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n handleSelect(tab: IBuildTab) {\n if (tab.disabled || tab.id === this.step) {\n return;\n }\n this.step = tab.id;\n this.stepChanged?.emit(tab.id);\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n if (!this.endpoint.session) {\n return (\n <Host>\n <verdocs-component-error message=\"You must be authenticated to use this module.\" />\n </Host>\n );\n }\n\n const canEditRoles = (this.template?.documents || []).length > 0;\n const canEditFields = canEditRoles && (this.template?.roles || []).length > 0;\n const canPreview = canEditFields && (this.template?.fields || []).length > 0;\n\n const tabs: IBuildTab[] = [\n {id: 'attachments', label: 'Attachments', disabled: false},\n {id: 'roles', label: 'Workflow', disabled: !canEditRoles},\n {id: 'fields', label: 'Fields', disabled: !canEditFields},\n {id: 'preview', label: 'Preview & Send', disabled: !canPreview},\n ];\n\n return (\n <Host>\n {tabs.map(tab => {\n const isActive = tab.id === this.step;\n const classes = ['tab'];\n if (isActive) classes.push('active');\n if (tab.disabled) classes.push('disabled');\n return (\n <div class={classes.join(' ')} onClick={() => this.handleSelect(tab)}>\n <span>{tab.label}</span>\n <svg aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" width=\"19\" height=\"50\" viewBox=\"0 0 19 50\">\n <polygon points=\"0,0 19,25 0,50\" fill={isActive ? '#ffffff' : '#e7e7e7'} />\n </svg>\n </div>\n );\n })}\n </Host>\n );\n }\n}\n"]}