@verdocs/web-sdk 5.0.32 → 5.0.33
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index-ccac8641.js +8 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-build.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-build.cjs.entry.js.map +1 -1
- package/dist/cjs/{verdocs-envelope-recipient-link_2.cjs.entry.js → verdocs-envelope-recipient-link.cjs.entry.js} +1 -25
- package/dist/cjs/verdocs-envelope-recipient-link.cjs.entry.js.map +1 -0
- package/dist/cjs/{verdocs-preview_6.cjs.entry.js → verdocs-preview_7.cjs.entry.js} +145 -14
- package/dist/cjs/verdocs-preview_7.cjs.entry.js.map +1 -0
- package/dist/cjs/verdocs-switch.cjs.entry.js +32 -0
- package/dist/cjs/verdocs-switch.cjs.entry.js.map +1 -0
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/controls/verdocs-switch/verdocs-switch.css +2 -2
- package/dist/collection/components/controls/verdocs-switch/verdocs-switch.js +3 -3
- package/dist/collection/components/controls/verdocs-switch/verdocs-switch.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-build/verdocs-build.js +1 -1
- package/dist/collection/components/embeds/verdocs-build/verdocs-build.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +8 -13
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.js.map +1 -1
- package/dist/collection/components/templates/verdocs-template-settings/verdocs-template-settings.css +57 -0
- package/dist/collection/components/templates/verdocs-template-settings/verdocs-template-settings.js +282 -0
- package/dist/collection/components/templates/verdocs-template-settings/verdocs-template-settings.js.map +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-f4e068a9.js → p-38e1fed8.js} +4 -4
- package/dist/components/{p-f4e068a9.js.map → p-38e1fed8.js.map} +1 -1
- package/dist/components/{p-449f2b47.js → p-4c5164d0.js} +9 -14
- package/dist/components/p-4c5164d0.js.map +1 -0
- package/dist/components/p-7ad22da6.js +212 -0
- package/dist/components/p-7ad22da6.js.map +1 -0
- package/dist/components/verdocs-build.js +85 -73
- package/dist/components/verdocs-build.js.map +1 -1
- package/dist/components/verdocs-envelope-sidebar.js +1 -1
- package/dist/components/verdocs-send.js +1 -1
- package/dist/components/verdocs-switch.js +1 -1
- package/dist/components/verdocs-template-settings.d.ts +11 -0
- package/dist/components/verdocs-template-settings.js +8 -0
- package/dist/components/verdocs-template-settings.js.map +1 -0
- package/dist/custom-elements.json +14 -1
- package/dist/esm/index-272d51a4.js +8 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-build.entry.js +1 -1
- package/dist/esm/verdocs-build.entry.js.map +1 -1
- package/dist/esm/{verdocs-envelope-recipient-link_2.entry.js → verdocs-envelope-recipient-link.entry.js} +2 -25
- package/dist/esm/verdocs-envelope-recipient-link.entry.js.map +1 -0
- package/dist/esm/{verdocs-preview_6.entry.js → verdocs-preview_7.entry.js} +146 -16
- package/dist/esm/verdocs-preview_7.entry.js.map +1 -0
- package/dist/esm/verdocs-switch.entry.js +28 -0
- package/dist/esm/verdocs-switch.entry.js.map +1 -0
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/index-272d51a4.js +1 -1
- package/dist/esm-es5/index-272d51a4.js.map +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js.map +1 -1
- package/dist/esm-es5/{verdocs-envelope-recipient-link_2.entry.js → verdocs-envelope-recipient-link.entry.js} +2 -2
- package/dist/esm-es5/verdocs-envelope-recipient-link.entry.js.map +1 -0
- package/dist/esm-es5/verdocs-preview_7.entry.js +8 -0
- package/dist/esm-es5/verdocs-preview_7.entry.js.map +1 -0
- package/dist/esm-es5/verdocs-switch.entry.js +2 -0
- package/dist/esm-es5/verdocs-switch.entry.js.map +1 -0
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js.map +1 -1
- package/dist/types/components/controls/verdocs-switch/verdocs-switch.d.ts +1 -1
- package/dist/types/components/embeds/verdocs-send/verdocs-send.d.ts +2 -2
- package/dist/types/components/templates/verdocs-template-settings/verdocs-template-settings.d.ts +55 -0
- package/dist/types/components.d.ts +79 -4
- package/dist/verdocs-web-sdk/p-060dbde7.entry.js +8 -0
- package/dist/verdocs-web-sdk/p-060dbde7.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-17457a7a.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-17457a7a.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-21e9abff.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-21e9abff.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-27ddc017.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-27ddc017.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-6f1e2f2f.entry.js → p-8e699235.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-8e699235.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-cabfdb9d.system.entry.js → p-a63b359e.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-a63b359e.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-aca6553d.system.entry.js +8 -0
- package/dist/verdocs-web-sdk/p-aca6553d.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-dddd328d.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-dddd328d.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-e2b70dfb.system.js +1 -1
- package/dist/verdocs-web-sdk/p-e2b70dfb.system.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js.map +0 -1
- package/dist/cjs/verdocs-preview_6.cjs.entry.js.map +0 -1
- package/dist/components/p-449f2b47.js.map +0 -1
- package/dist/esm/verdocs-envelope-recipient-link_2.entry.js.map +0 -1
- package/dist/esm/verdocs-preview_6.entry.js.map +0 -1
- package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js.map +0 -1
- package/dist/esm-es5/verdocs-preview_6.entry.js +0 -8
- package/dist/esm-es5/verdocs-preview_6.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-0666fb5d.system.entry.js +0 -8
- package/dist/verdocs-web-sdk/p-0666fb5d.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-6f1e2f2f.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-b9fee1a7.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-b9fee1a7.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-cabfdb9d.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-e3efeb57.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-e3efeb57.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-f81f766c.entry.js +0 -8
- package/dist/verdocs-web-sdk/p-f81f766c.entry.js.map +0 -1
package/dist/esm-es5/loader.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,o,a){function i(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,n){function d(e){try{l(a.next(e))}catch(e){n(e)}}function s(e){try{l(a["throw"](e))}catch(e){n(e)}}function l(e){e.done?o(e.value):i(e.value).then(d,s)}l((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},a,i,n,d;return d={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function s(e){return function(t){return l([e,t])}}function l(s){if(a)throw new TypeError("Generator is already executing.");while(d&&(d=0,s[0]&&(o=0)),o)try{if(a=1,i&&(n=s[0]&2?i["return"]:s[0]?i["throw"]||((n=i["return"])&&n.call(i),0):i.next)&&!(n=n.call(i,s[1])).done)return n;if(i=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;i=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(n=o.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){o.label=s[1];break}if(s[0]===6&&o.label<n[1]){o.label=n[1];n=s;break}if(n&&o.label<n[2]){o.label=n[2];o.ops.push(s);break}if(n[2])o.ops.pop();o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e];i=0}finally{a=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{b as bootstrapLazy}from"./index-272d51a4.js";export{s as setNonce}from"./index-272d51a4.js";import{g as globalScripts}from"./app-globals-0f993ce5.js";var defineCustomElements=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(typeof window==="undefined")return[2,undefined];return[4,globalScripts()];case 1:e.sent();return[2,bootstrapLazy(JSON.parse('[["verdocs-build",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}]]],["verdocs-envelopes-list",[[0,"verdocs-envelopes-list",{"endpoint":[16],"view":[1537],"status":[1537],"sort":[1537],"match":[1537],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"selectedEnvelopes":[32],"envelopes":[32]},null,{"view":["handleViewUpdated"],"status":["handleStatusUpdated"],"sort":["handleSortUpdated"],"match":["handleMatchUpdated"],"selectedPage":["handlePageUpdated"]}]]],["verdocs-sign",[[0,"verdocs-sign",{"endpoint":[1040],"envelopeId":[513,"envelope-id"],"roleId":[513,"role-id"],"inviteCode":[513,"invite-code"],"headerTargetId":[1,"header-target-id"],"roleNames":[32],"sortedRecipients":[32],"recipient":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"fatalErrorHeader":[32],"fatalErrorMessage":[32],"focusedField":[32],"submitting":[32],"submitted":[32],"isDone":[32],"showDone":[32],"showLoadError":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32],"kbaStep":[32],"kbaQuestions":[32],"showSpinner":[32],"kbaChoices":[32],"loading":[32],"envelope":[32]}]]],["verdocs-templates-list",[[0,"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-field-payment",[[0,"verdocs-field-payment",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"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]}]]],["verdocs-envelope-sidebar",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32],"showRecipientDialog":[32],"showCancelDialog":[32],"showReinviteDialog":[32],"remindersEnabled":[32],"updatingReminders":[32],"initialReminder":[32],"followupReminders":[32],"loading":[32],"envelope":[32]}]]],["verdocs-template-create",[[0,"verdocs-template-create",{"endpoint":[16],"maxSize":[1026,"max-size"],"file":[32],"creating":[32],"progressLabel":[32],"progressPercent":[32],"errorMessage":[32]}]]],["verdocs-auth",[[0,"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-envelope-recipient-summary",[[0,"verdocs-envelope-recipient-summary",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"canSendAnother":[4,"can-send-another"],"canView":[4,"can-view"],"canDone":[4,"can-done"],"isOpen":[32],"recipientStatusIcons":[32],"containerId":[32],"gettingLinks":[32],"links":[32],"loading":[32],"envelope":[32]}]]],["verdocs-dialog",[[4,"verdocs-dialog"]]],["verdocs-quick-functions",[[0,"verdocs-quick-functions",{"endpoint":[16]}]]],["verdocs-radio-button",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["verdocs-search-box",[[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["verdocs-search-tabs",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["verdocs-table",[[0,"verdocs-table",{"columns":[16],"data":[16]}]]],["verdocs-template-card",[[0,"verdocs-template-card",{"template":[16]}]]],["verdocs-template-tags",[[0,"verdocs-template-tags",{"tags":[16]}]]],["verdocs-toggle",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["verdocs-status-indicator",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"containerId":[32]}]]],["verdocs-template-star",[[0,"verdocs-template-star",{"endpoint":[16],"template":[1040],"updating":[32]}]]],["verdocs-envelope-document-page",[[0,"verdocs-envelope-document-page",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"type":[1],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}]]],["verdocs-button_2",[[0,"verdocs-help-icon",{"text":[1],"icon":[1],"containerId":[32]}],[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["verdocs-kba-dialog_2",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"headerTargetId":[1,"header-target-id"],"canceling":[32],"showCancelDone":[32],"showLoadError":[32],"loading":[32],"envelope":[32]}],[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"recipient":[16],"choices":[16],"response":[32],"updatedRecipient":[32]}]]],["verdocs-envelope-recipient-link_2",[[0,"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]}],[0,"verdocs-switch",{"checked":[1028],"theme":[1],"disabled":[4]}]]],["verdocs-menu-panel_2",[[0,"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]}],[4,"verdocs-menu-panel",{"side":[1],"overlay":[4],"width":[2]},[[4,"click","handleClick"]]]]],["verdocs-button-panel_2",[[4,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}],[4,"verdocs-tabs",{"tabs":[16],"selectedTab":[2,"selected-tab"]}]]],["verdocs-pagination_2",[[0,"verdocs-pagination",{"selectedPage":[1538,"selected-page"],"itemCount":[2,"item-count"],"perPage":[2,"per-page"]}],[0,"verdocs-quick-filter",{"options":[16],"label":[1],"value":[1537],"placeholder":[1],"open":[32]}]]],["verdocs-ok-dialog",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"buttonLabel":[1,"button-label"],"showCancel":[4,"show-cancel"],"closed":[32]}]]],["verdocs-template-document-page_2",[[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}],[0,"verdocs-template-document-page",{"endpoint":[16],"editable":[4],"disabled":[4],"done":[4],"templateId":[1,"template-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32],"xScale":[32],"yScale":[32],"loading":[32],"template":[32]}]]],["verdocs-contact-picker_2",[[0,"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],"showKba":[32],"kba_method":[32],"kba_pin":[32],"nameFieldId":[32],"firstNameFieldId":[32],"lastNameFieldId":[32],"emailFieldId":[32],"phoneFieldId":[32]}],[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["verdocs-file-chooser_2",[[0,"verdocs-file-chooser",{"endpoint":[16],"file":[32]}],[0,"verdocs-progress-bar",{"label":[1],"showPercent":[4,"show-percent"],"percent":[2]}]]],["verdocs-spinner",[[0,"verdocs-spinner",{"size":[2],"mode":[1]}]]],["verdocs-organization-card_2",[[0,"verdocs-organization-card",{"organization":[16],"hovered":[32]},[[1,"mouseover","onMouseOver"],[1,"mouseout","onMouseOut"]]],[4,"verdocs-portal",{"anchor":[1],"voffset":[2]},[[11,"scroll","handleScroll"],[9,"resize","handleResize"],[4,"click","handleClick"]]]]],["verdocs-dropdown",[[0,"verdocs-dropdown",{"options":[16],"containerId":[32],"showPicker":[32]}]]],["verdocs-checkbox_6",[[0,"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],"roleName":[32],"group":[32],"fieldType":[32],"options":[32],"placeholder":[32],"defaultValue":[32],"showingHelp":[32],"loading":[32],"template":[32]}],[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-loader"],[0,"verdocs-text-input",{"value":[1537],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"clearable":[4],"copyable":[4],"type":[1],"disabled":[4],"required":[4],"showingPw":[32]}]]],["verdocs-field-attachment_13",[[0,"verdocs-field-attachment",{"endpoint":[16],"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"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,"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],"showingProperties":[32],"focused":[32],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"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],"showingProperties":[32],"focused":[32],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-checkbox",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"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,"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],"containerId":[32],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-dropdown",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-radio",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"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,"verdocs-field-textarea",{"endpoint":[16],"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textbox",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"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]}],[0,"verdocs-field-timestamp",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}],[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}],[0,"verdocs-upload-dialog",{"maxSize":[1026,"max-size"],"existingFile":[1032,"existing-file"],"draggingOver":[32],"confirmDelete":[32],"selectedFiles":[32],"errorMessage":[32]}]]],["verdocs-preview_6",[[0,"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"]}],[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-send",{"endpoint":[16],"templateId":[513,"template-id"],"environment":[1],"containerId":[32],"showPickerForId":[32],"sessionContacts":[32],"sending":[32],"rolesCompleted":[32],"loading":[32],"template":[32],"reset":[64]},null,{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-template-roles",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"sender":[32],"dragging":[32],"loading":[32],"template":[32]}],[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"uploading":[32],"progressLabel":[32],"progressPercent":[32],"showDeleteError":[32],"confirmDeleteDocument":[32],"loading":[32],"template":[32]}],[0,"verdocs-template-build-tabs",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}]]]]'),t)]}}))}))};export{defineCustomElements};
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,o,i){function a(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,n){function d(e){try{l(i.next(e))}catch(e){n(e)}}function s(e){try{l(i["throw"](e))}catch(e){n(e)}}function l(e){e.done?o(e.value):a(e.value).then(d,s)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,a,n,d;return d={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function s(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(d&&(d=0,s[0]&&(o=0)),o)try{if(i=1,a&&(n=s[0]&2?a["return"]:s[0]?a["throw"]||((n=a["return"])&&n.call(a),0):a.next)&&!(n=n.call(a,s[1])).done)return n;if(a=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;a=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(n=o.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){o.label=s[1];break}if(s[0]===6&&o.label<n[1]){o.label=n[1];n=s;break}if(n&&o.label<n[2]){o.label=n[2];o.ops.push(s);break}if(n[2])o.ops.pop();o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e];a=0}finally{i=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{b as bootstrapLazy}from"./index-272d51a4.js";export{s as setNonce}from"./index-272d51a4.js";import{g as globalScripts}from"./app-globals-0f993ce5.js";var defineCustomElements=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(typeof window==="undefined")return[2,undefined];return[4,globalScripts()];case 1:e.sent();return[2,bootstrapLazy(JSON.parse('[["verdocs-build",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}]]],["verdocs-envelopes-list",[[0,"verdocs-envelopes-list",{"endpoint":[16],"view":[1537],"status":[1537],"sort":[1537],"match":[1537],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"selectedEnvelopes":[32],"envelopes":[32]},null,{"view":["handleViewUpdated"],"status":["handleStatusUpdated"],"sort":["handleSortUpdated"],"match":["handleMatchUpdated"],"selectedPage":["handlePageUpdated"]}]]],["verdocs-sign",[[0,"verdocs-sign",{"endpoint":[1040],"envelopeId":[513,"envelope-id"],"roleId":[513,"role-id"],"inviteCode":[513,"invite-code"],"headerTargetId":[1,"header-target-id"],"roleNames":[32],"sortedRecipients":[32],"recipient":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"fatalErrorHeader":[32],"fatalErrorMessage":[32],"focusedField":[32],"submitting":[32],"submitted":[32],"isDone":[32],"showDone":[32],"showLoadError":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32],"kbaStep":[32],"kbaQuestions":[32],"showSpinner":[32],"kbaChoices":[32],"loading":[32],"envelope":[32]}]]],["verdocs-templates-list",[[0,"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-field-payment",[[0,"verdocs-field-payment",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"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]}]]],["verdocs-envelope-sidebar",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32],"showRecipientDialog":[32],"showCancelDialog":[32],"showReinviteDialog":[32],"remindersEnabled":[32],"updatingReminders":[32],"initialReminder":[32],"followupReminders":[32],"loading":[32],"envelope":[32]}]]],["verdocs-template-create",[[0,"verdocs-template-create",{"endpoint":[16],"maxSize":[1026,"max-size"],"file":[32],"creating":[32],"progressLabel":[32],"progressPercent":[32],"errorMessage":[32]}]]],["verdocs-auth",[[0,"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-envelope-recipient-summary",[[0,"verdocs-envelope-recipient-summary",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"canSendAnother":[4,"can-send-another"],"canView":[4,"can-view"],"canDone":[4,"can-done"],"isOpen":[32],"recipientStatusIcons":[32],"containerId":[32],"gettingLinks":[32],"links":[32],"loading":[32],"envelope":[32]}]]],["verdocs-dialog",[[4,"verdocs-dialog"]]],["verdocs-quick-functions",[[0,"verdocs-quick-functions",{"endpoint":[16]}]]],["verdocs-radio-button",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["verdocs-search-box",[[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["verdocs-search-tabs",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["verdocs-table",[[0,"verdocs-table",{"columns":[16],"data":[16]}]]],["verdocs-template-card",[[0,"verdocs-template-card",{"template":[16]}]]],["verdocs-template-tags",[[0,"verdocs-template-tags",{"tags":[16]}]]],["verdocs-toggle",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["verdocs-button_2",[[0,"verdocs-help-icon",{"text":[1],"icon":[1],"containerId":[32]}],[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["verdocs-envelope-recipient-link",[[0,"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-status-indicator",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"containerId":[32]}]]],["verdocs-template-star",[[0,"verdocs-template-star",{"endpoint":[16],"template":[1040],"updating":[32]}]]],["verdocs-envelope-document-page",[[0,"verdocs-envelope-document-page",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"type":[1],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}]]],["verdocs-switch",[[0,"verdocs-switch",{"checked":[1028],"theme":[1],"disabled":[4]}]]],["verdocs-menu-panel_2",[[0,"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]}],[4,"verdocs-menu-panel",{"side":[1],"overlay":[4],"width":[2]},[[4,"click","handleClick"]]]]],["verdocs-button-panel_2",[[4,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}],[4,"verdocs-tabs",{"tabs":[16],"selectedTab":[2,"selected-tab"]}]]],["verdocs-pagination_2",[[0,"verdocs-pagination",{"selectedPage":[1538,"selected-page"],"itemCount":[2,"item-count"],"perPage":[2,"per-page"]}],[0,"verdocs-quick-filter",{"options":[16],"label":[1],"value":[1537],"placeholder":[1],"open":[32]}]]],["verdocs-contact-picker_2",[[0,"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],"showKba":[32],"kba_method":[32],"kba_pin":[32],"nameFieldId":[32],"firstNameFieldId":[32],"lastNameFieldId":[32],"emailFieldId":[32],"phoneFieldId":[32]}],[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["verdocs-file-chooser_2",[[0,"verdocs-file-chooser",{"endpoint":[16],"file":[32]}],[0,"verdocs-progress-bar",{"label":[1],"showPercent":[4,"show-percent"],"percent":[2]}]]],["verdocs-organization-card_2",[[0,"verdocs-organization-card",{"organization":[16],"hovered":[32]},[[1,"mouseover","onMouseOver"],[1,"mouseout","onMouseOut"]]],[4,"verdocs-portal",{"anchor":[1],"voffset":[2]},[[11,"scroll","handleScroll"],[9,"resize","handleResize"],[4,"click","handleClick"]]]]],["verdocs-dropdown",[[0,"verdocs-dropdown",{"options":[16],"containerId":[32],"showPicker":[32]}]]],["verdocs-ok-dialog",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"buttonLabel":[1,"button-label"],"showCancel":[4,"show-cancel"],"closed":[32]}]]],["verdocs-checkbox_6",[[0,"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],"roleName":[32],"group":[32],"fieldType":[32],"options":[32],"placeholder":[32],"defaultValue":[32],"showingHelp":[32],"loading":[32],"template":[32]}],[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-loader"],[0,"verdocs-text-input",{"value":[1537],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"clearable":[4],"copyable":[4],"type":[1],"disabled":[4],"required":[4],"showingPw":[32]}]]],["verdocs-kba-dialog_2",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"headerTargetId":[1,"header-target-id"],"canceling":[32],"showCancelDone":[32],"showLoadError":[32],"loading":[32],"envelope":[32]}],[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"recipient":[16],"choices":[16],"response":[32],"updatedRecipient":[32]}]]],["verdocs-field-attachment_13",[[0,"verdocs-field-attachment",{"endpoint":[16],"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"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,"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],"showingProperties":[32],"focused":[32],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"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],"showingProperties":[32],"focused":[32],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-checkbox",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"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,"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],"containerId":[32],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-dropdown",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-radio",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"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,"verdocs-field-textarea",{"endpoint":[16],"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textbox",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"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]}],[0,"verdocs-field-timestamp",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}],[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}],[0,"verdocs-upload-dialog",{"maxSize":[1026,"max-size"],"existingFile":[1032,"existing-file"],"draggingOver":[32],"confirmDelete":[32],"selectedFiles":[32],"errorMessage":[32]}]]],["verdocs-template-document-page_2",[[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}],[0,"verdocs-template-document-page",{"endpoint":[16],"editable":[4],"disabled":[4],"done":[4],"templateId":[1,"template-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32],"xScale":[32],"yScale":[32],"loading":[32],"template":[32]}]]],["verdocs-spinner",[[0,"verdocs-spinner",{"size":[2],"mode":[1]}]]],["verdocs-preview_7",[[0,"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"]}],[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-send",{"endpoint":[16],"templateId":[513,"template-id"],"environment":[1],"containerId":[32],"showPickerForId":[32],"sessionContacts":[32],"sending":[32],"rolesCompleted":[32],"loading":[32],"template":[32],"reset":[64]},null,{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-template-roles",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"sender":[32],"dragging":[32],"loading":[32],"template":[32]}],[0,"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]}],[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"uploading":[32],"progressLabel":[32],"progressPercent":[32],"showDeleteError":[32],"confirmDeleteDocument":[32],"loading":[32],"template":[32]}],[0,"verdocs-template-build-tabs",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}]]]]'),t)]}}))}))};export{defineCustomElements};
|
2
2
|
//# sourceMappingURL=loader.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["defineCustomElements","win","options","__awaiter","window","undefined","globalScripts","_a","sent","bootstrapLazy","JSON","parse"],"sources":["@lazy-external-entrypoint?app-data=conditional"],"sourcesContent":["export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\nexport const defineCustomElements = async (win, options) => {\n if (typeof window === 'undefined') return undefined;\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n};\n"],"mappings":"2mDAGY,IAACA,qBAAuB,SAAOC,EAAKC,GAAO,OAAAC,eAAA,4B,4DACrD,UAAWC,SAAW,YAAa,SAAOC,WAC1C,SAAMC,iB,OAANC,EAAAC,OACA,SAAOC,cAAcC,KAAAC,MAAA,
|
1
|
+
{"version":3,"names":["defineCustomElements","win","options","__awaiter","window","undefined","globalScripts","_a","sent","bootstrapLazy","JSON","parse"],"sources":["@lazy-external-entrypoint?app-data=conditional"],"sourcesContent":["export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\nexport const defineCustomElements = async (win, options) => {\n if (typeof window === 'undefined') return undefined;\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n};\n"],"mappings":"2mDAGY,IAACA,qBAAuB,SAAOC,EAAKC,GAAO,OAAAC,eAAA,4B,4DACrD,UAAWC,SAAW,YAAa,SAAOC,WAC1C,SAAMC,iB,OAANC,EAAAC,OACA,SAAOC,cAAcC,KAAAC,MAAA,47dAAuCT,I","ignoreList":[]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{a(n.next(e))}catch(e){o(e)}}function l(e){try{a(n["throw"](e))}catch(e){o(e)}}function a(e){e.done?i(e.value):r(e.value).then(s,l)}a((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(t){return a([e,t])}}function a(l){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(i=0)),i)try{if(n=1,r&&(o=l[0]&2?r["return"]:l[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;if(r=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:i.label++;return{value:l[1],done:false};case 5:i.label++;r=l[1];l=[0];continue;case 7:l=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){i=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(l[0]===6&&i.label<o[1]){i.label=o[1];o=l;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(l);break}if(o[2])i.ops.pop();i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e];r=0}finally{n=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-272d51a4.js";import{VerdocsEndpoint,getTemplate}from"@verdocs/js-sdk";import{S as SDKError}from"./errors-887f1e88.js";import{S as Store}from"./Datastore-77cb8d9c.js";var verdocsBuildCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-build{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-build .content{-ms-flex:1;flex:1;gap:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column}verdocs-build verdocs-template-attachments,verdocs-build verdocs-template-roles{margin:20px}verdocs-build verdocs-template-fields{border-top:1px solid #777777}verdocs-build verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-build verdocs-template-fields{width:100%}verdocs-build verdocs-preview{-ms-flex:1;flex:1}verdocs-build .preview-container{-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;width:100%;background-color:#eeeeee;max-height:100%}@media all and (max-width: 450px){verdocs-build .preview-container{-ms-flex-direction:column;flex-direction:column}}verdocs-build .preview-send-wrapper{display:-ms-flexbox;display:flex;-ms-flex:0 0 300px;flex:0 0 300px;background-color:#ffffff;-webkit-box-shadow:1px 1px 6px -2px rgba(0, 0, 0, 0.4980392157);box-shadow:1px 1px 6px -2px rgba(0, 0, 0, 0.4980392157)}@media all and (max-width: 450px){verdocs-build .preview-send-wrapper{-ms-flex:0;flex:0}}verdocs-build .preview-preview-wrapper{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;overflow-y:scroll}';var VerdocsBuildStyle0=verdocsBuildCss;var VerdocsBuild=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.stepChanged=createEvent(this,"stepChanged",7);this.send=createEvent(this,"send",7);this.templateUpdated=createEvent(this,"templateUpdated",7);this.templateCreated=createEvent(this,"templateCreated",7);this.rolesUpdated=createEvent(this,"rolesUpdated",7);this.templateListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId=null;this.step="preview";this.loading=true;this.template=null}e.prototype.onTemplateIdChanged=function(e,t){if(!t&&e&&this.step==="attachments"){this.step="preview"}this.loadTemplate(e).catch((function(e){return console.log("Unknown Error",e)}))};e.prototype.onStepChanged=function(){this.loadTemplate(this.templateId).catch((function(e){return console.log("Unknown Error",e)}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,r,o;return __generator(this,(function(s){try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return[2]}if(!this.templateId){console.log("[BUILD] No template ID, activating upload mode");this.step="attachments";return[2]}try{this.loadTemplate(this.templateId).catch((function(e){return console.log("[BUILD] Unable to load template",e)}))}catch(n){console.log("[BUILD] Error loading template",n);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(n.message,(t=n.response)===null||t===void 0?void 0:t.status,(i=n.response)===null||i===void 0?void 0:i.data))}}catch(e){console.log("[BUILD] Error with builder session",e);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new SDKError(e.message,(r=e.response)===null||r===void 0?void 0:r.status,(o=e.response)===null||o===void 0?void 0:o.data))}return[2]}))}))};e.prototype.loadTemplate=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){if(e){Store.subscribe("templates",this.templateId,(function(){return getTemplate(t.endpoint,t.templateId)}),false,(function(e){t.template=e;t.loading=false}))}return[2]}))}))};e.prototype.disconnectedCallback=function(){console.log("[BUILD] Disconnected");this.unlistenToTemplate()};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.handleCancel=function(){this.step="preview"};e.prototype.handleTemplateCreated=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){switch(i.label){case 0:return[4,this.loadTemplate(e)];case 1:i.sent();this.templateId=e;this.step="roles";(t=this.stepChanged)===null||t===void 0?void 0:t.emit("roles");return[2]}}))}))};e.prototype.handleRolesUpdated=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){(t=this.templateUpdated)===null||t===void 0?void 0:t.emit(e.detail);return[2]}))}))};e.prototype.handleTemplateUpdated=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){(t=this.templateUpdated)===null||t===void 0?void 0:t.emit(e.detail);return[2]}))}))};e.prototype.handleAttachmentsNext=function(){var e;this.step="roles";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("roles")};e.prototype.handleRolesNext=function(){var e;this.step="fields";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("fields")};e.prototype.handleStepChanged=function(e){var t;this.step=e;(t=this.stepChanged)===null||t===void 0?void 0:t.emit(e)};e.prototype.render=function(){var e=this;if(this.loading){return h(Host,{class:"loading"},h("verdocs-loader",null))}if(!this.endpoint.session){return h(Host,null,h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return h(Host,null,h("div",{class:"content"},h("verdocs-template-build-tabs",{endpoint:this.endpoint,templateId:this.templateId,step:this.step,onSdkError:function(t){var i;return(i=e.sdkError)===null||i===void 0?void 0:i.emit(t.detail)},onStepChanged:function(t){return e.handleStepChanged(t.detail)}}),this.step==="attachments"&&h("verdocs-template-attachments",{templateId:this.templateId,endpoint:this.endpoint,onExit:function(){return e.handleCancel()},onNext:function(){return e.handleAttachmentsNext()},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),this.step==="roles"&&h("verdocs-template-roles",{templateId:this.templateId,endpoint:this.endpoint,onExit:function(){return e.handleCancel()},onNext:function(){return e.handleRolesNext()},onRolesUpdated:function(t){return e.handleRolesUpdated(t)}}),this.step==="settings"&&h("verdocs-template-settings",{templateId:this.templateId,endpoint:this.endpoint,onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),this.step==="fields"&&h("verdocs-template-fields",{templateId:this.templateId,endpoint:this.endpoint,onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),this.step==="preview"&&h("div",{class:"preview-container"},h("div",{class:"preview-send-wrapper"},h("verdocs-send",{templateId:this.templateId,endpoint:this.endpoint,onSend:function(t){var i;return(i=e.send)===null||i===void 0?void 0:i.emit(t.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"}})))))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{templateId:["onTemplateIdChanged"],step:["onStepChanged"]}},enumerable:false,configurable:true});return e}();VerdocsBuild.style=VerdocsBuildStyle0;export{VerdocsBuild as verdocs_build};
|
2
2
|
//# sourceMappingURL=verdocs-build.entry.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["verdocsBuildCss","VerdocsBuildStyle0","VerdocsBuild","this","templateListenerId","VerdocsEndpoint","getDefault","class_1","prototype","onTemplateIdChanged","newTemplateId","oldTemplateId","step","loadTemplate","catch","e","console","log","onStepChanged","templateId","componentWillLoad","endpoint","loadSession","session","_a","sdkError","emit","SDKError","message","_b","response","status","_c","data","_d","_e","_f","Store","subscribe","getTemplate","_this","template","loading","disconnectedCallback","unlistenToTemplate","store","delListener","handleCancel","handleTemplateCreated","_g","sent","stepChanged","handleRolesUpdated","templateUpdated","detail","handleTemplateUpdated","handleAttachmentsNext","handleRolesNext","handleStepChanged","render","h","Host","class","onSdkError","onExit","onNext","onTemplateUpdated","onRolesUpdated","style","flexDirection","gap","display","maxWidth","margin","backgroundColor","padding","onSend","send","width","flex"],"sources":["src/components/embeds/verdocs-build/verdocs-build.scss?tag=verdocs-build","src/components/embeds/verdocs-build/verdocs-build.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-build {\n display: flex;\n flex-direction: column;\n font-family: $verdocs-primary-font;\n\n .content {\n flex: 1;\n gap: 20px;\n display: flex;\n align-items: center;\n flex-direction: column;\n //box-shadow: 0 0 7px -3px #000000cc;\n }\n\n verdocs-template-attachments,\n verdocs-template-roles {\n margin: 20px;\n }\n\n verdocs-template-fields {\n border-top: 1px solid #777777;\n }\n\n verdocs-template-attachments {\n padding: 20px;\n background: #ffffff;\n }\n\n verdocs-template-fields {\n width: 100%;\n }\n\n verdocs-preview {\n flex: 1;\n }\n\n .preview-container {\n flex-direction: row;\n display: flex;\n width: 100%;\n background-color: #eeeeee;\n max-height: 100%;\n\n @media all and (max-width: 450px) {\n flex-direction: column;\n }\n }\n\n .preview-send-wrapper {\n display: flex;\n flex: 0 0 300px;\n background-color: #ffffff;\n box-shadow: 1px 1px 6px -2px #0000007f;\n\n @media all and (max-width: 450px) {\n flex: 0;\n }\n }\n\n .preview-preview-wrapper {\n display: flex;\n flex: 1;\n justify-content: center;\n overflow-y: scroll;\n }\n}\n","import {getTemplate, ICreateEnvelopeRecipient, 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 templateId={templateId} step=\"preview\" onSend={(detail) => {\n * console.log('Sent envelope from template', 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 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: ICreateEnvelopeRecipient[]; 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 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 }\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' && (\n <div style={{flexDirection: 'column', gap: '20px', display: 'flex', maxWidth: '400px', margin: '20px'}}>\n <verdocs-template-name\n templateId={this.templateId}\n endpoint={this.endpoint}\n style={{backgroundColor: '#ffffff', padding: '20px'}}\n onTemplateUpdated={e => this.handleTemplateUpdated(e)}\n />\n <verdocs-template-reminders\n templateId={this.templateId}\n endpoint={this.endpoint}\n style={{backgroundColor: '#ffffff', padding: '20px'}}\n onTemplateUpdated={e => this.handleTemplateUpdated(e)}\n />\n <verdocs-template-visibility\n templateId={this.templateId}\n endpoint={this.endpoint}\n style={{backgroundColor: '#ffffff', padding: '20px'}}\n onTemplateUpdated={e => this.handleTemplateUpdated(e)}\n />\n </div>\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"],"mappings":"2sDAAA,IAAMA,gBAAkB,quDACxB,IAAAC,mBAAeD,gB,ICqBFE,aAAY,W,uVACfC,KAAAC,mBAAqB,K,cAOOC,gBAAgBC,a,gBAOc,K,UAKF,U,aAiC7C,K,cACmB,I,CAGtCC,EAAAC,UAAAC,oBAA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AE1B6C,EAAA,8BACEzC,WAAYhB,KAAKgB,WACjBE,SAAUlB,KAAKkB,SACf+C,MAAO,CAACM,gBAAiB,UAAWC,QAAS,QAC7CT,kBAAmB,SAAAnD,GAAK,OAAAyB,EAAKe,sBAAsBxC,EAA3B,IAE1B6C,EAAA,+BACEzC,WAAYhB,KAAKgB,WACjBE,SAAUlB,KAAKkB,SACf+C,MAAO,CAACM,gBAAiB,UAAWC,QAAS,QAC7CT,kBAAmB,SAAAnD,GAAK,OAAAyB,EAAKe,sBAAsBxC,EAA3B,KAK7BZ,KAAKS,OAAS,UAAYgD,EAAA,2BAAyBzC,WAAYhB,KAAKgB,WAAYE,SAAUlB,KAAKkB,SAAU6C,kBAAmB,SAAAnD,GAAK,OAAAyB,EAAKe,sBAAsBxC,EAA3B,IAEjIZ,KAAKS,OAAS,WACbgD,EAAA,OAAKE,MAAM,qBACTF,EAAA,OAAKE,MAAM,wBACTF,EAAA,gBAAczC,WAAYhB,KAAKgB,WAAYE,SAAUlB,KAAKkB,SAAUuD,OAAQ,SAAA7D,GAAC,IAAAS,EAAI,OAAAA,EAAAgB,EAAKqC,QAAI,MAAArD,SAAA,SAAAA,EAAEE,KAAKX,EAAEuC,OAAO,EAAEc,MAAO,CAACU,MAAO,WAE7HlB,EAAA,OAAKE,MAAM,2BACTF,EAAA,mBAAiBzC,WAAYhB,KAAKgB,WAAYE,SAAUlB,KAAKkB,SAAU+C,MAAO,CAACG,QAAS,OAAQQ,KAAM,IAAKP,SAAU,e,2RA9O5G,G","ignoreList":[]}
|
1
|
+
{"version":3,"names":["verdocsBuildCss","VerdocsBuildStyle0","VerdocsBuild","this","templateListenerId","VerdocsEndpoint","getDefault","class_1","prototype","onTemplateIdChanged","newTemplateId","oldTemplateId","step","loadTemplate","catch","e","console","log","onStepChanged","templateId","componentWillLoad","endpoint","loadSession","session","_a","sdkError","emit","SDKError","message","_b","response","status","_c","data","_d","_e","_f","Store","subscribe","getTemplate","_this","template","loading","disconnectedCallback","unlistenToTemplate","store","delListener","handleCancel","handleTemplateCreated","_g","sent","stepChanged","handleRolesUpdated","templateUpdated","detail","handleTemplateUpdated","handleAttachmentsNext","handleRolesNext","handleStepChanged","render","h","Host","class","onSdkError","onExit","onNext","onTemplateUpdated","onRolesUpdated","onSend","send","style","width","display","flex","maxWidth"],"sources":["src/components/embeds/verdocs-build/verdocs-build.scss?tag=verdocs-build","src/components/embeds/verdocs-build/verdocs-build.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-build {\n display: flex;\n flex-direction: column;\n font-family: $verdocs-primary-font;\n\n .content {\n flex: 1;\n gap: 20px;\n display: flex;\n align-items: center;\n flex-direction: column;\n //box-shadow: 0 0 7px -3px #000000cc;\n }\n\n verdocs-template-attachments,\n verdocs-template-roles {\n margin: 20px;\n }\n\n verdocs-template-fields {\n border-top: 1px solid #777777;\n }\n\n verdocs-template-attachments {\n padding: 20px;\n background: #ffffff;\n }\n\n verdocs-template-fields {\n width: 100%;\n }\n\n verdocs-preview {\n flex: 1;\n }\n\n .preview-container {\n flex-direction: row;\n display: flex;\n width: 100%;\n background-color: #eeeeee;\n max-height: 100%;\n\n @media all and (max-width: 450px) {\n flex-direction: column;\n }\n }\n\n .preview-send-wrapper {\n display: flex;\n flex: 0 0 300px;\n background-color: #ffffff;\n box-shadow: 1px 1px 6px -2px #0000007f;\n\n @media all and (max-width: 450px) {\n flex: 0;\n }\n }\n\n .preview-preview-wrapper {\n display: flex;\n flex: 1;\n justify-content: center;\n overflow-y: scroll;\n }\n}\n","import {getTemplate, ICreateEnvelopeRecipient, 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 templateId={templateId} step=\"preview\" onSend={(detail) => {\n * console.log('Sent envelope from template', 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 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: ICreateEnvelopeRecipient[]; 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 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 }\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"],"mappings":"2sDAAA,IAAMA,gB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EAAKe,sBAAsBxC,EAA3B,IAErIZ,KAAKS,OAAS,UAAYgD,EAAA,2BAAyBzC,WAAYhB,KAAKgB,WAAYE,SAAUlB,KAAKkB,SAAU6C,kBAAmB,SAAAnD,GAAK,OAAAyB,EAAKe,sBAAsBxC,EAA3B,IAEjIZ,KAAKS,OAAS,WACbgD,EAAA,OAAKE,MAAM,qBACTF,EAAA,OAAKE,MAAM,wBACTF,EAAA,gBAAczC,WAAYhB,KAAKgB,WAAYE,SAAUlB,KAAKkB,SAAU+C,OAAQ,SAAArD,GAAC,IAAAS,EAAI,OAAAA,EAAAgB,EAAK6B,QAAI,MAAA7C,SAAA,SAAAA,EAAEE,KAAKX,EAAEuC,OAAO,EAAEgB,MAAO,CAACC,MAAO,WAE7HX,EAAA,OAAKE,MAAM,2BACTF,EAAA,mBAAiBzC,WAAYhB,KAAKgB,WAAYE,SAAUlB,KAAKkB,SAAUiD,MAAO,CAACE,QAAS,OAAQC,KAAM,IAAKC,SAAU,e,2RAzN5G,G","ignoreList":[]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,i,r,t){function n(e){return e instanceof r?e:new r((function(i){i(e)}))}return new(r||(r=Promise))((function(r,o){function s(e){try{a(t.next(e))}catch(e){o(e)}}function c(e){try{a(t["throw"](e))}catch(e){o(e)}}function a(e){e.done?r(e.value):n(e.value).then(s,c)}a((t=t.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},t,n,o,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(e){return function(i){return a([e,i])}}function a(c){if(t)throw new TypeError("Generator is already executing.");while(s&&(s=0,c[0]&&(r=0)),r)try{if(t=1,n&&(o=c[0]&2?n["return"]:c[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;if(n=0,o)c=[c[0]&2,o.value];switch(c[0]){case 0:case 1:o=c;break;case 4:r.label++;return{value:c[1],done:false};case 5:r.label++;n=c[1];c=[0];continue;case 7:c=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1];o=c;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(c);break}if(o[2])r.ops.pop();r.trys.pop();continue}c=i.call(e,r)}catch(e){c=[6,e];n=0}finally{t=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-272d51a4.js";import{VerdocsEndpoint,getEnvelope,getInPersonLink,formatFullName}from"@verdocs/js-sdk";import{V as VerdocsToast}from"./Toast-c4843828.js";import{S as SDKError}from"./errors-887f1e88.js";import{S as Store}from"./Datastore-77cb8d9c.js";var verdocsEnvelopeRecipientLinkCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-envelope-recipient-link{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:rgba(0, 0, 0, 0.4980392157)}verdocs-envelope-recipient-link .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-link .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-link .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-link .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-link .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-link .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-link .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:rgb(55, 65, 81);line-height:1.25rem;background-color:#d8d8d8;border:2px solid rgb(156, 163, 175)}verdocs-envelope-recipient-link .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-link .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;overflow:hidden;margin:0 6px 0 0;border-radius:4px;white-space:nowrap;-ms-flex-align:center;align-items:center;text-overflow:ellipsis;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-link .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-link .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-link .buttons verdocs-button button{width:100%}';var VerdocsEnvelopeRecipientLinkStyle0=verdocsEnvelopeRecipientLinkCss;var VerdocsEnvelopeRecipientLink=function(){function e(e){registerInstance(this,e);this.next=createEvent(this,"next",7);this.sdkError=createEvent(this,"sdkError",7);this.envelopeListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.roleName="";this.isOpen=undefined;this.gettingLink=true;this.link="";this.loading=true;this.envelope=null;this.recipient=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,r;return __generator(this,(function(t){try{this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENT_LINK] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENT_LINK] Unable to start session, must be authenticated");return[2]}this.listenToEnvelope()}catch(t){console.log("[RECIPIENT_LINK] Error loading envelope",t);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(t.message,(i=t.response)===null||i===void 0?void 0:i.status,(r=t.response)===null||r===void 0?void 0:r.data))}return[2]}))}))};e.prototype.disconnectedCallback=function(){this.unlistenToEnvelope()};e.prototype.listenToEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(i){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();Store.subscribe("envelopes",this.envelopeId,(function(){return getEnvelope(e.endpoint,e.envelopeId)}),false,(function(i){var r;e.envelope=i;e.loading=false;e.recipient=(((r=e.envelope)===null||r===void 0?void 0:r.recipients)||[]).find((function(i){return i.role_name===e.roleName}));e.getLink(e.recipient)}));return[2]}))}))};e.prototype.unlistenToEnvelope=function(){if(this.envelopeListenerId){Store.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}};e.prototype.handleDone=function(e){var i;e.preventDefault();(i=this.next)===null||i===void 0?void 0:i.emit({envelope:this.envelope})};e.prototype.copyLink=function(e){navigator.clipboard.writeText(e).then((function(){return VerdocsToast("Link copied to clipboard!",{style:"success",duration:3e3})})).catch((function(e){console.warn("[RECIPIENT_LINK] Error copying to clipboard",e);VerdocsToast("Unable to copy to clipboard: ".concat(e.message),{style:"error"})}))};e.prototype.getLink=function(e){var i=this;this.gettingLink=true;getInPersonLink(this.endpoint,e.envelope_id,e.role_name).then((function(e){i.gettingLink=false;i.link=e.link})).catch((function(e){i.gettingLink=false;console.log("[RECIPIENT_LINK] Error getting link",e);VerdocsToast("Unable to get link: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;if(this.loading||!this.recipient){return h(Host,null)}var i=formatFullName(this.recipient);return h(Host,null,h("div",{class:"summary-content"},h("h1",{class:"summary-title"},"In-Person Signing Link"),h("div",{class:"summary-rows"},h("div",{class:"summary-recipient"},h("div",{class:"role-name"},this.recipient.role_name),h("div",{class:"role-details"},h("div",{class:"role-info"},h("div",{class:"role-full-name"},i," (",this.recipient.email||this.recipient.phone,")"),!this.link&&h("verdocs-button",{size:"small",variant:"outline",label:this.gettingLink?"Loading...":"Get Link",disabled:this.gettingLink,onClick:function(){return e.getLink(e.recipient)}})),this.link&&h("div",{class:"link-wrapper"},h("div",{class:"link"},this.link),h("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(e.link)}}))))),h("div",{class:"buttons"},h("verdocs-button",{size:"small",label:"Done",onClick:function(i){return e.handleDone(i)}}))))};return e}();VerdocsEnvelopeRecipientLink.style=VerdocsEnvelopeRecipientLinkStyle0;var verdocsSwitchCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-switch{font-family:"Inter", "Barlow", sans-serif}verdocs-switch .switch{display:-ms-inline-flexbox;display:inline-flex;height:24px;width:44px;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;cursor:pointer;border-radius:12px;border:transparent;-webkit-transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:150ms;transition-duration:150ms}verdocs-switch .switch.primary[data-state=checked]{background:#55bc81}verdocs-switch .switch.primary[data-state=unchecked]{background:#e3e3e3}verdocs-switch .switch.secondary[data-state=checked]{background:#4c56cb}verdocs-switch .switch.secondary[data-state=unchecked]{background:#e3e3e3}verdocs-switch .slider{display:block;width:20px;height:20px;border-radius:20px;background:#ffffff;-webkit-box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:150ms;transition-duration:150ms}verdocs-switch .slider[data-state=checked]{-webkit-transform:translateX(22px);transform:translateX(22px)}verdocs-switch .slider[data-state=unchecked]{-webkit-transform:translateX(2px);transform:translateX(2px)}verdocs-switch .switch.disabled.primary,verdocs-switch .switch.disabled.secondary{cursor:not-allowed;background:#666666}';var VerdocsSwitchStyle0=verdocsSwitchCss;var VerdocsSwitch=function(){function e(e){registerInstance(this,e);this.checkedChange=createEvent(this,"checkedChange",7);this.checked=false;this.theme="primary";this.disabled=false}e.prototype.render=function(){var e=this;return h("button",{key:"e9153549bcee6b924ce7a7d620d1096fa91782d2",value:"on",type:"button",role:"switch",class:"switch ".concat(this.theme," ").concat(this.disabled?"disabled":""),"data-state":this.checked?"checked":"unchecked","aria-checked":this.checked?"checked":"unchecked",onClick:function(){var i;if(!e.disabled){e.checked=!e.checked;(i=e.checkedChange)===null||i===void 0?void 0:i.emit(e.checked)}}},h("span",{key:"61d97d7571b7f52f186ce44daaf0ef7132c6d5f6","data-state":this.checked?"checked":"unchecked",class:"slider"}))};return e}();VerdocsSwitch.style=VerdocsSwitchStyle0;export{VerdocsEnvelopeRecipientLink as verdocs_envelope_recipient_link,VerdocsSwitch as verdocs_switch};
|
2
|
-
//# sourceMappingURL=verdocs-envelope-recipient-
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,i,n,r){function t(e){return e instanceof n?e:new n((function(i){i(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function l(e){try{c(r["throw"](e))}catch(e){o(e)}}function c(e){e.done?n(e.value):t(e.value).then(s,l)}c((r=r.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,t,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(i){return c([e,i])}}function c(l){if(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(n=0)),n)try{if(r=1,t&&(o=l[0]&2?t["return"]:l[0]?t["throw"]||((o=t["return"])&&o.call(t),0):t.next)&&!(o=o.call(t,l[1])).done)return o;if(t=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;t=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1];o=l;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(l);break}if(o[2])n.ops.pop();n.trys.pop();continue}l=i.call(e,n)}catch(e){l=[6,e];t=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-272d51a4.js";import{VerdocsEndpoint,getEnvelope,getInPersonLink,formatFullName}from"@verdocs/js-sdk";import{V as VerdocsToast}from"./Toast-c4843828.js";import{S as SDKError}from"./errors-887f1e88.js";import{S as Store}from"./Datastore-77cb8d9c.js";var verdocsEnvelopeRecipientLinkCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-envelope-recipient-link{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:rgba(0, 0, 0, 0.4980392157)}verdocs-envelope-recipient-link .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-link .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-link .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-link .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-link .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-link .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-link .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:rgb(55, 65, 81);line-height:1.25rem;background-color:#d8d8d8;border:2px solid rgb(156, 163, 175)}verdocs-envelope-recipient-link .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-link .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;overflow:hidden;margin:0 6px 0 0;border-radius:4px;white-space:nowrap;-ms-flex-align:center;align-items:center;text-overflow:ellipsis;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-link .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-link .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-link .buttons verdocs-button button{width:100%}';var VerdocsEnvelopeRecipientLinkStyle0=verdocsEnvelopeRecipientLinkCss;var VerdocsEnvelopeRecipientLink=function(){function e(e){registerInstance(this,e);this.next=createEvent(this,"next",7);this.sdkError=createEvent(this,"sdkError",7);this.envelopeListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.roleName="";this.isOpen=undefined;this.gettingLink=true;this.link="";this.loading=true;this.envelope=null;this.recipient=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,n;return __generator(this,(function(r){try{this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENT_LINK] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENT_LINK] Unable to start session, must be authenticated");return[2]}this.listenToEnvelope()}catch(r){console.log("[RECIPIENT_LINK] Error loading envelope",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(r.message,(i=r.response)===null||i===void 0?void 0:i.status,(n=r.response)===null||n===void 0?void 0:n.data))}return[2]}))}))};e.prototype.disconnectedCallback=function(){this.unlistenToEnvelope()};e.prototype.listenToEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(i){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();Store.subscribe("envelopes",this.envelopeId,(function(){return getEnvelope(e.endpoint,e.envelopeId)}),false,(function(i){var n;e.envelope=i;e.loading=false;e.recipient=(((n=e.envelope)===null||n===void 0?void 0:n.recipients)||[]).find((function(i){return i.role_name===e.roleName}));e.getLink(e.recipient)}));return[2]}))}))};e.prototype.unlistenToEnvelope=function(){if(this.envelopeListenerId){Store.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}};e.prototype.handleDone=function(e){var i;e.preventDefault();(i=this.next)===null||i===void 0?void 0:i.emit({envelope:this.envelope})};e.prototype.copyLink=function(e){navigator.clipboard.writeText(e).then((function(){return VerdocsToast("Link copied to clipboard!",{style:"success",duration:3e3})})).catch((function(e){console.warn("[RECIPIENT_LINK] Error copying to clipboard",e);VerdocsToast("Unable to copy to clipboard: ".concat(e.message),{style:"error"})}))};e.prototype.getLink=function(e){var i=this;this.gettingLink=true;getInPersonLink(this.endpoint,e.envelope_id,e.role_name).then((function(e){i.gettingLink=false;i.link=e.link})).catch((function(e){i.gettingLink=false;console.log("[RECIPIENT_LINK] Error getting link",e);VerdocsToast("Unable to get link: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;if(this.loading||!this.recipient){return h(Host,null)}var i=formatFullName(this.recipient);return h(Host,null,h("div",{class:"summary-content"},h("h1",{class:"summary-title"},"In-Person Signing Link"),h("div",{class:"summary-rows"},h("div",{class:"summary-recipient"},h("div",{class:"role-name"},this.recipient.role_name),h("div",{class:"role-details"},h("div",{class:"role-info"},h("div",{class:"role-full-name"},i," (",this.recipient.email||this.recipient.phone,")"),!this.link&&h("verdocs-button",{size:"small",variant:"outline",label:this.gettingLink?"Loading...":"Get Link",disabled:this.gettingLink,onClick:function(){return e.getLink(e.recipient)}})),this.link&&h("div",{class:"link-wrapper"},h("div",{class:"link"},this.link),h("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(e.link)}}))))),h("div",{class:"buttons"},h("verdocs-button",{size:"small",label:"Done",onClick:function(i){return e.handleDone(i)}}))))};return e}();VerdocsEnvelopeRecipientLink.style=VerdocsEnvelopeRecipientLinkStyle0;export{VerdocsEnvelopeRecipientLink as verdocs_envelope_recipient_link};
|
2
|
+
//# sourceMappingURL=verdocs-envelope-recipient-link.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["verdocsEnvelopeRecipientLinkCss","VerdocsEnvelopeRecipientLinkStyle0","VerdocsEnvelopeRecipientLink","this","envelopeListenerId","VerdocsEndpoint","getDefault","class_1","prototype","componentWillLoad","endpoint","loadSession","envelopeId","console","log","concat","session","listenToEnvelope","e","_a","sdkError","emit","SDKError","message","_b","response","status","_c","data","disconnectedCallback","unlistenToEnvelope","Store","subscribe","getEnvelope","_this","envelope","loading","recipient","recipients","find","r","role_name","roleName","getLink","store","delListener","handleDone","preventDefault","next","copyLink","link","navigator","clipboard","writeText","then","VerdocsToast","style","duration","catch","warn","gettingLink","getInPersonLink","envelope_id","render","h","Host","fullName","formatFullName","class","email","phone","size","variant","label","disabled","onClick"],"sources":["src/components/envelopes/verdocs-envelope-recipient-link/verdocs-envelope-recipient-link.scss?tag=verdocs-envelope-recipient-link","src/components/envelopes/verdocs-envelope-recipient-link/verdocs-envelope-recipient-link.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-envelope-recipient-link {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n z-index: 100000;\n position: fixed;\n align-items: center;\n justify-content: center;\n font-family: $primary-font;\n background-color: #0000007f;\n\n .summary-content {\n width: 600px;\n display: flex;\n max-width: 90%;\n font-size: 18px;\n flex: 0 0 600px;\n border-radius: 6px;\n background: #ffffff;\n flex-direction: column;\n padding: 30px 20px 20px;\n\n .summary-title {\n font-size: 20px;\n font-weight: 700;\n margin: 0 0 10px 0;\n color: $verdocs-dark-blue;\n }\n }\n\n .summary-recipient {\n display: flex;\n color: $verdocs-grey-1;\n margin: 8px 0 24px 0;\n flex-direction: column;\n\n .role-name {\n flex: 1;\n display: flex;\n font-size: 14px;\n font-weight: 600;\n margin: 0 0 8px 0;\n color: $verdocs-grey-0;\n }\n\n .role-details {\n }\n\n .role-info {\n gap: 5px;\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n }\n\n .role-full-name {\n flex: 1;\n height: 34px;\n display: flex;\n font-size: 16px;\n padding: 0 12px;\n border-radius: 4px;\n align-items: center;\n border: 1px solid #cccccc;\n background: rgb(249, 250, 251);\n }\n\n .recipient-link {\n width: 120px;\n padding: 0 16px;\n font-weight: 500;\n margin: 0 0 0 8px;\n text-align: center;\n font-size: 0.875rem;\n border-radius: 100%;\n color: rgb(55, 65, 81);\n line-height: 1.25rem;\n background-color: #d8d8d8;\n border: 2px solid rgb(156, 163, 175);\n }\n\n .link-wrapper {\n gap: 5px;\n display: flex;\n margin: 4px 0 0 0;\n flex-direction: row;\n\n .link {\n flex: 1;\n height: 34px;\n display: flex;\n font-size: 16px;\n padding: 0 12px;\n overflow: hidden;\n margin: 0 6px 0 0;\n border-radius: 4px;\n white-space: nowrap;\n align-items: center;\n text-overflow: ellipsis;\n border: 1px solid #cccccc;\n background: rgb(249, 250, 251);\n }\n }\n }\n\n .buttons {\n display: flex;\n column-gap: 15px;\n margin: 10px 0 0 0;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n\n verdocs-button {\n flex: 0 0 120px;\n margin-left: 10px;\n white-space: nowrap;\n\n button {\n width: 100%;\n }\n }\n }\n}\n","import {Component, Prop, Host, h, State, Event, EventEmitter} from '@stencil/core';\nimport {formatFullName, getEnvelope, getInPersonLink, IEnvelope, IRecipient, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {VerdocsToast} from '../../../utils/Toast';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Displays a single recipient from an envelope, with the opportunity to copy an in-person\n * signing link for that recipient to use.\n */\n@Component({\n tag: 'verdocs-envelope-recipient-link',\n styleUrl: 'verdocs-envelope-recipient-link.scss',\n})\nexport class VerdocsEnvelopeRecipientLink {\n private envelopeListenerId = 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 envelope ID to edit.\n */\n @Prop() envelopeId: string = '';\n\n /**\n * The role to load.\n */\n @Prop() roleName: string = '';\n\n /**\n * Event fired when the user clicks Done to proceed. It is up to the host application\n * to redirect the user to the appropriate next workflow step.\n */\n @Event({composed: true}) next: EventEmitter<{envelope: IEnvelope}>;\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 @State() isOpen: boolean;\n @State() gettingLink = true;\n @State() link = '';\n\n @State() loading = true;\n @State() envelope: IEnvelope | null = null;\n @State() recipient: IRecipient | null = null;\n\n async componentWillLoad() {\n try {\n this.endpoint.loadSession();\n\n if (!this.envelopeId) {\n console.log(`[RECIPIENT_LINK] Missing required envelope ID ${this.envelopeId}`);\n return;\n }\n\n if (!this.endpoint.session) {\n console.log('[RECIPIENT_LINK] Unable to start session, must be authenticated');\n return;\n }\n\n this.listenToEnvelope();\n } catch (e) {\n console.log('[RECIPIENT_LINK] Error loading envelope', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n disconnectedCallback() {\n this.unlistenToEnvelope();\n }\n\n async listenToEnvelope() {\n console.log('[SIDEBAR] Loading envelope', this.envelopeId);\n this.unlistenToEnvelope();\n Store.subscribe(\n 'envelopes',\n this.envelopeId,\n () => getEnvelope(this.endpoint, this.envelopeId),\n false,\n (envelope: IEnvelope) => {\n this.envelope = envelope;\n this.loading = false;\n\n this.recipient = (this.envelope?.recipients || []).find(r => r.role_name === this.roleName);\n this.getLink(this.recipient);\n },\n );\n }\n\n unlistenToEnvelope() {\n if (this.envelopeListenerId) {\n Store.store.delListener(this.envelopeListenerId);\n this.envelopeListenerId = null;\n }\n }\n\n handleDone(e: any) {\n e.preventDefault();\n this.next?.emit({envelope: this.envelope});\n }\n\n copyLink(link: string) {\n navigator.clipboard\n .writeText(link)\n .then(() => VerdocsToast('Link copied to clipboard!', {style: 'success', duration: 3000}))\n .catch(e => {\n console.warn('[RECIPIENT_LINK] Error copying to clipboard', e);\n VerdocsToast(`Unable to copy to clipboard: ${e.message}`, {style: 'error'});\n });\n }\n\n getLink(recipient: IRecipient) {\n this.gettingLink = true;\n getInPersonLink(this.endpoint, recipient.envelope_id, recipient.role_name)\n .then(response => {\n this.gettingLink = false;\n this.link = response.link;\n // NOTE: Left here for documentation purposes. We don't auto-copy the link because many browsers now\n // error on that because we aren't the focus/gesture-initiator since we're a new component just being\n // drawn in the DOM. So we let the user click to trigger that.\n // this.copyLink(response.link);\n })\n .catch(e => {\n this.gettingLink = false;\n console.log('[RECIPIENT_LINK] Error getting link', e);\n VerdocsToast('Unable to get link: ' + e.message, {style: 'error'});\n });\n }\n\n render() {\n if (this.loading || !this.recipient) {\n return <Host />;\n }\n\n // const recipientsWithActions = getRecipientsWithActions(this.store.state); const showLinkButton = recipientCanAct(recipient, recipientsWithActions); const link =\n // this.links[recipient.role_name]; const gettingLink = this.gettingLinks[recipient.role_name]; return (\n\n const fullName = formatFullName(this.recipient);\n return (\n <Host>\n <div class=\"summary-content\">\n <h1 class=\"summary-title\">In-Person Signing Link</h1>\n <div class=\"summary-rows\">\n <div class=\"summary-recipient\">\n <div class=\"role-name\">{this.recipient.role_name}</div>\n <div class=\"role-details\">\n <div class=\"role-info\">\n <div class=\"role-full-name\">\n {fullName} ({this.recipient.email || this.recipient.phone})\n </div>\n {!this.link && (\n <verdocs-button\n size=\"small\"\n variant=\"outline\"\n label={this.gettingLink ? 'Loading...' : 'Get Link'}\n disabled={this.gettingLink}\n onClick={() => this.getLink(this.recipient)}\n />\n )}\n </div>\n\n {this.link && (\n <div class=\"link-wrapper\">\n <div class=\"link\">{this.link}</div>\n <verdocs-button size=\"small\" variant=\"outline\" label=\"Copy\" onClick={() => this.copyLink(this.link)} />\n </div>\n )}\n </div>\n </div>\n </div>\n\n <div class=\"buttons\">\n <verdocs-button size=\"small\" label=\"Done\" onClick={e => this.handleDone(e)} />\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"6wDAAA,IAAMA,gCAAkC,ghGACxC,IAAAC,mCAAeD,gC,ICaFE,6BAA4B,W,yHAC/BC,KAAAC,mBAAqB,K,cAKOC,gBAAgBC,a,gBAKvB,G,cAKF,G,uCAeJ,K,UACP,G,aAEG,K,cACmB,K,eACE,I,CAElCC,EAAAC,UAAAC,kBAAN,W,+FACE,IACEN,KAAKO,SAASC,cAEd,IAAKR,KAAKS,WAAY,CACpBC,QAAQC,IAAI,iDAAAC,OAAiDZ,KAAKS,aAClE,S,CAGF,IAAKT,KAAKO,SAASM,QAAS,CAC1BH,QAAQC,IAAI,mEACZ,S,CAGFX,KAAKc,kB,CACL,MAA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