@verdocs/web-sdk 6.13.1 → 6.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-download-dialog_4.cjs.entry.js +13 -4
- package/dist/cjs/verdocs-download-dialog_4.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-preview_6.cjs.entry.js +10 -6
- package/dist/cjs/verdocs-preview_6.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +3 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +10 -6
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +4 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
- package/dist/collection/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.js +36 -4
- package/dist/collection/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.js.map +1 -1
- package/dist/components/{p-BTrjJycH.js → p-06em1_P-.js} +2 -2
- package/dist/components/{p-VqyGWtIp.js → p-Blr31TcJ.js} +2 -2
- package/dist/components/p-Blr31TcJ.js.map +1 -0
- package/dist/components/p-D495hZfr.js +2 -0
- package/dist/components/p-D495hZfr.js.map +1 -0
- package/dist/components/verdocs-build.js +1 -1
- package/dist/components/verdocs-send.js +1 -1
- package/dist/components/verdocs-sign-footer.js +1 -1
- package/dist/components/verdocs-sign.js +1 -1
- package/dist/components/verdocs-sign.js.map +1 -1
- package/dist/components/verdocs-view.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-download-dialog_4.entry.js +13 -4
- package/dist/esm/verdocs-download-dialog_4.entry.js.map +1 -1
- package/dist/esm/verdocs-preview_6.entry.js +10 -6
- package/dist/esm/verdocs-preview_6.entry.js.map +1 -1
- package/dist/esm/verdocs-sign.entry.js +3 -1
- package/dist/esm/verdocs-sign.entry.js.map +1 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/verdocs-download-dialog_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-download-dialog_4.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-preview_6.entry.js +2 -2
- package/dist/esm-es5/verdocs-preview_6.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/embeds/verdocs-send/verdocs-send.d.ts +1 -0
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +1 -0
- package/dist/types/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.d.ts +4 -0
- package/dist/types/components.d.ts +10 -0
- package/dist/verdocs-web-sdk/{p-f3924e9e.entry.js → p-1b818cdf.entry.js} +3 -3
- package/dist/verdocs-web-sdk/p-1b818cdf.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-575b6f98.system.entry.js → p-24dcc54e.system.entry.js} +3 -3
- package/dist/verdocs-web-sdk/p-24dcc54e.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-935267a6.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-935267a6.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-BdZ5Ghsa.system.js +1 -1
- package/dist/verdocs-web-sdk/p-a9899fce.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-a9899fce.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-2e382167.entry.js → p-ea6c0b55.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-ea6c0b55.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-3f9102c4.system.entry.js → p-eccac670.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-eccac670.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +3 -3
- package/dist/components/p-E2hWLZ47.js +0 -2
- package/dist/components/p-E2hWLZ47.js.map +0 -1
- package/dist/components/p-VqyGWtIp.js.map +0 -1
- package/dist/verdocs-web-sdk/p-2e382167.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-3f9102c4.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-575b6f98.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-957e4cb0.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-957e4cb0.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-f3924e9e.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-f41af68e.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-f41af68e.system.entry.js.map +0 -1
- /package/dist/components/{p-BTrjJycH.js.map → p-06em1_P-.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getRoleNames","template","roles","map","role","name","getRoleIndex","role_name","Math","max","findIndex","verdocsSendCss","chevronRightIcon","chevronLeftIcon","warningIcon","infoIcon","externalLinkIcon","VERDOCS_LOGO_URL","SWIPE_START_FRACTION","SWIPE_MIN_DISTANCE","SWIPE_MAX_DURATION","MIN_EXPIRY_DAYS","MAX_EXPIRY_DAYS","DEFAULT_EXPIRY_DAYS","AUTH_METHOD_LABELS","email","passcode","sms","kba","id","VerdocsSend","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","templateListenerId","endpoint","DefaultEndpoint","templateId","environment","showCancel","brandKey","swipeStart","swallowNextClick","loadedOrganizationId","containerId","random","toString","substring","view","editingRoleId","sessionContacts","sending","brands","organization","expiresInDays","noContact","senderDefaults","senderName","senderEmail","rolesCompleted","loading","disconnectedCallback","unlistenToTemplate","componentDidLoad","el","addEventListener","e","stopPropagation","preventDefault","componentDidRender","updateScrollFade","querySelector","_a","toggleAttribute","_b","listenToTemplate","console","log","Store","subscribe","getTemplate","recomputeRolesCompleted","loadBrands","organizationId","organization_id","changedOrganization","stillCurrent","getBrands","then","catch","getOrganization","handleExpiryInput","digits","target","value","replace","String","min","Number","effectiveExpiryDays","days","expiresAt","Date","now","store","delListener","reset","brandSenderName","brand","find","b","key","getDefaultBrand","email_display_name","email_sender_name","effectiveSenderName","effectiveSenderEmail","senderOverrides","trim","sender_name","undefined","sender_email","onTemplateIdChanged","newTemplateId","componentWillLoad","onSessionChanged","_endpoint","_session","profile","me","first_name","last_name","phone","formatFullName","getOrganizationContacts","contacts","loadSession","session","sdkError","emit","SDKError","message","response","status","_c","data","rolesAtLevel","forEach","level","sequence","length","push","isValidEmail","getSequenceNumbers","sequences","Object","keys","s","sort","a","getRolesAtLevel","filter","index","getRoleById","match","getRecipientOptionLabels","recipient","labels","auth_methods","method","delegator","name_locked","defaultId","default_brand_id","getDefaultBrandLabel","getSelectedBrandLabel","showView","handleSelectContact","detail","handleClickRole","handleSend","localeData","Intl","DateTimeFormat","resolvedOptions","details","template_id","initial_reminder","followup_reminders","recipients","values","timezone","timeZone","locale","expires_at","toISOString","no_contact","brand_key","beforeSendResult","beforeSend","defaultPrevented","createEnvelope","r","send","envelope_id","envelope","VerdocsToast","error","handleCancel","exit","handleSwipeStart","pane","currentTarget","rect","getBoundingClientRect","onTextEntry","closest","call","clientX","left","width","x","y","clientY","time","handleSwipeEnd","start","dx","dy","abs","renderDetailHeader","title","h","class","type","onClick","innerHTML","renderDetailBody","content","onScroll","renderDoneButton","label","size","renderRecipientView","roleIndex","style","backgroundColor","getRGBA","onExit","onNext","contactSuggestions","templateRole","onSearchContacts","searchContacts","renderBrandSwatch","fallbackInitial","image","favicon_url","thumbnail_url","src","alt","primary_color","toUpperCase","renderBrandOption","sub","swatch","option","selected","renderBrandView","defaultBrand","others","localeCompare","hasBrands","href","getWebAppUrl","rel","renderExpiresView","when","toLocaleDateString","month","day","year","toLocaleTimeString","hour","minute","inputMode","placeholder","disabled","onInput","renderSenderView","validEmail","htmlFor","renderNotificationsView","checked","renderDetail","render","Host","display","levels","rolesAssigned","allRolesAssigned","assignedEmails","toLowerCase","hasDuplicateEmails","Set","expiresShort","sendable","is_sendable","completed","assigned","optionLabels","off","variant","onPointerDown","onPointerUp","onPointerCancel"],"sources":["src/utils/Templates.ts","src/components/embeds/verdocs-send/verdocs-send.scss?tag=verdocs-send","src/components/embeds/verdocs-send/verdocs-send.tsx"],"sourcesContent":["import {ITemplate} from '@verdocs/js-sdk';\n\nexport const getRoleNames = (template: ITemplate | null) => (template?.roles || []).map(role => role.name);\n\nexport const getRoleIndex = (template: ITemplate | null, role_name: string) =>\n Math.max(\n getRoleNames(template).findIndex(name => name === role_name),\n 0,\n );\n","@import '../../../theme.scss';\n\nverdocs-send {\n --send-ink: var(--verdocs-body-color, #111827);\n --send-ink-2: #374151;\n --send-muted: #6b7280;\n --send-faint: #9ca3af;\n --send-rule: #e5e7eb;\n --send-control-border: #d1d5db;\n --send-accent: var(--verdocs-link-color, #{$secondary-color});\n --send-accent-tint: #f4f5fc;\n --send-accent-tint-2: #e6e7f8;\n --send-warning-bg: #fffbeb;\n --send-warning-border: #fde68a;\n --send-warning-icon: #d97706;\n --send-warning-text: #78350f;\n --send-radius: var(--verdocs-dialog-radius, 8px);\n --send-min-height: 480px;\n --send-max-width: 480px;\n\n display: none;\n position: relative;\n overflow: hidden;\n width: 100%;\n max-width: var(--verdocs-send-max-width, var(--send-max-width));\n box-sizing: border-box;\n background: #ffffff;\n color: var(--send-ink);\n font-size: 14px;\n border-radius: var(--send-radius);\n border: 1px solid var(--send-rule);\n font-family: $verdocs-primary-font;\n\n * {\n box-sizing: border-box;\n }\n\n &.sendable {\n display: block;\n }\n\n // The main pane sets the card's height. The detail pane sits beside it, off-canvas to the\n // right, and the track slides one pane-width left when a detail view is open. Detail views\n // taller than the card scroll inside it.\n .track {\n position: relative;\n display: flex;\n flex-direction: column;\n min-height: var(--send-min-height);\n transition: transform 220ms ease-out;\n }\n\n &.detail-open .track {\n transform: translateX(-100%);\n }\n\n @media (prefers-reduced-motion: reduce) {\n .track {\n transition: none;\n }\n }\n\n .pane {\n padding: 16px;\n display: flex;\n flex-direction: column;\n }\n\n .main-pane {\n flex: 1;\n }\n\n .detail-pane {\n position: absolute;\n top: 0;\n left: 100%;\n bottom: 0;\n width: 100%;\n overflow: hidden;\n }\n\n .detail {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n }\n\n // The body scrolls between a fixed header and a pinned Done button. The fade sits over the\n // body's bottom edge and shows only while there is more below (classes set by updateScrollFade).\n .detail-body-wrap {\n position: relative;\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n }\n\n .detail-body {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n }\n\n .scroll-fade {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 36px;\n opacity: 0;\n pointer-events: none;\n transition: opacity 150ms ease-out;\n background: linear-gradient(rgba(255, 255, 255, 0), #ffffff);\n }\n\n .scrollable:not(.at-end) > .scroll-fade {\n opacity: 1;\n }\n\n .recipient-detail verdocs-contact-picker {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n }\n\n .section-title {\n font-size: 12px;\n font-weight: 600;\n color: var(--send-ink-2);\n margin: 0 0 6px 0;\n }\n\n .delivery-title {\n margin-top: 16px;\n }\n\n .step {\n font-size: 11px;\n color: var(--send-muted);\n padding: 10px 0 4px 0;\n }\n\n .recipient,\n .kv {\n all: unset;\n display: flex;\n width: 100%;\n cursor: pointer;\n align-items: center;\n column-gap: 10px;\n border-top: 1px solid var(--send-rule);\n color: var(--send-ink);\n font-family: inherit;\n\n &:focus-visible {\n outline: 2px solid var(--send-accent);\n outline-offset: -2px;\n border-radius: 4px;\n }\n\n .chevron {\n flex: 0 0 16px;\n width: 16px;\n height: 16px;\n color: var(--send-faint);\n\n svg {\n width: 16px;\n height: 16px;\n display: block;\n }\n }\n }\n\n .recipient {\n padding: 8px 6px 8px 0;\n\n &:last-child {\n border-bottom: 1px solid var(--send-rule);\n }\n\n .who {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n }\n\n .role-name {\n font-size: 13px;\n font-weight: 600;\n }\n\n .who-detail {\n font-size: 12px;\n color: var(--send-muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n &.configure {\n color: var(--send-accent);\n font-weight: 500;\n }\n }\n\n .options {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n margin-top: 3px;\n }\n\n .pill {\n height: 18px;\n padding: 0 6px;\n border-radius: 999px;\n font-size: 10px;\n font-weight: 500;\n display: inline-flex;\n align-items: center;\n background: var(--send-accent-tint);\n color: var(--send-ink-2);\n }\n }\n\n .role-dot {\n flex: 0 0 10px;\n width: 10px;\n height: 10px;\n border-radius: 50%;\n border: 1px solid rgba(0, 0, 0, 0.1);\n }\n\n .kv {\n height: 40px;\n padding: 0 6px 0 0;\n font-size: 13px;\n\n &:last-child {\n border-bottom: 1px solid var(--send-rule);\n }\n\n &:disabled {\n cursor: default;\n color: var(--send-muted);\n }\n\n .key {\n flex: 0 0 84px;\n color: var(--send-muted);\n }\n\n .value {\n flex: 1;\n min-width: 0;\n font-weight: 500;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n small {\n font-size: inherit;\n font-weight: 400;\n color: var(--send-muted);\n }\n\n &.off {\n color: var(--send-warning-icon);\n }\n }\n }\n\n .main-spacer,\n .detail-spacer {\n flex: 1;\n }\n\n .buttons {\n display: flex;\n margin-top: 14px;\n column-gap: 10px;\n flex-wrap: wrap;\n flex-direction: row;\n align-items: center;\n justify-content: flex-end;\n\n .error-message {\n width: 100%;\n color: $verdocs-red-1;\n font-size: 13px;\n margin-bottom: 10px;\n }\n }\n\n // Detail views\n .detail-header {\n display: flex;\n align-items: center;\n column-gap: 8px;\n margin: -2px 0 14px 0;\n\n .back {\n all: unset;\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n font-size: 13px;\n font-weight: 500;\n color: var(--send-accent);\n font-family: inherit;\n flex: 0 0 52px;\n\n .icon,\n .icon svg {\n width: 16px;\n height: 16px;\n display: block;\n }\n\n &:focus-visible {\n outline: 2px solid var(--send-accent);\n outline-offset: 2px;\n border-radius: 4px;\n }\n }\n\n .detail-title {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n column-gap: 8px;\n font-size: 14px;\n font-weight: 600;\n text-align: center;\n }\n\n .detail-header-spacer {\n flex: 0 0 52px;\n }\n }\n\n .detail-footer {\n margin-top: 10px;\n padding-top: 12px;\n border-top: 1px solid var(--send-rule);\n\n verdocs-button,\n verdocs-button button {\n width: 100%;\n }\n }\n\n .hint {\n font-size: 12px;\n line-height: 1.5;\n color: var(--send-muted);\n margin: 10px 0 0 0;\n }\n\n .option-list {\n display: flex;\n flex-direction: column;\n }\n\n .option {\n all: unset;\n display: flex;\n width: 100%;\n cursor: pointer;\n align-items: center;\n column-gap: 10px;\n padding: 10px 0;\n font-size: 13px;\n font-family: inherit;\n color: var(--send-ink);\n border-top: 1px solid var(--send-rule);\n\n &:first-child {\n border-top: 0;\n }\n\n &:focus-visible {\n outline: 2px solid var(--send-accent);\n outline-offset: -2px;\n border-radius: 4px;\n }\n\n .radio {\n flex: 0 0 16px;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n border: 1px solid var(--send-control-border);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n &.selected .radio {\n border-color: var(--send-accent);\n\n &::after {\n content: '';\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--send-accent);\n }\n }\n\n .swatch {\n flex: 0 0 22px;\n width: 22px;\n height: 22px;\n border-radius: 5px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 9px;\n font-weight: 700;\n color: #ffffff;\n overflow: hidden;\n\n &.logo {\n background: #ffffff;\n border: 1px solid var(--send-rule);\n }\n\n img {\n width: 100%;\n height: 100%;\n object-fit: contain;\n display: block;\n }\n }\n\n .option-label {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n\n small {\n font-size: 11px;\n color: var(--send-muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n }\n }\n\n .option-divider {\n height: 0;\n margin: 2px 0;\n border-top: 1px solid var(--send-control-border);\n\n + .option {\n border-top: 0;\n }\n }\n\n .hint a {\n color: var(--send-accent);\n font-weight: 500;\n text-decoration: none;\n border-bottom: 1px solid var(--send-accent-tint-2);\n\n .icon,\n .icon svg {\n width: 11px;\n height: 11px;\n display: inline-block;\n vertical-align: -1px;\n margin-left: 2px;\n }\n }\n\n .expires-field {\n position: relative;\n\n input {\n width: 100%;\n height: 36px;\n padding: 0 52px 0 10px;\n font-size: 14px;\n font-family: inherit;\n color: var(--send-ink);\n background: #ffffff;\n border: 1px solid var(--send-control-border);\n border-radius: 6px;\n outline: none;\n\n &:focus {\n border-color: var(--send-accent);\n box-shadow: 0 0 0 2px var(--send-accent-tint-2);\n }\n\n &::placeholder {\n color: var(--send-faint);\n }\n }\n\n .suffix {\n position: absolute;\n right: 10px;\n top: 0;\n height: 36px;\n display: flex;\n align-items: center;\n font-size: 13px;\n color: var(--send-muted);\n pointer-events: none;\n }\n }\n\n .sender-field {\n display: flex;\n flex-direction: column;\n row-gap: 4px;\n margin: 0 0 10px 0;\n\n label {\n font-size: 12px;\n font-weight: 500;\n color: var(--send-ink-2);\n }\n\n input {\n width: 100%;\n height: 36px;\n padding: 0 10px;\n font-size: 14px;\n font-family: inherit;\n color: var(--send-ink);\n background: #ffffff;\n border: 1px solid var(--send-control-border);\n border-radius: 6px;\n outline: none;\n\n &:focus {\n border-color: var(--send-accent);\n box-shadow: 0 0 0 2px var(--send-accent-tint-2);\n }\n }\n\n .field-error {\n font-size: 12px;\n color: $verdocs-red-1;\n }\n }\n\n .notice {\n display: flex;\n column-gap: 10px;\n margin-top: 4px;\n padding: 10px 12px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 6px;\n color: var(--send-ink-2);\n background: var(--send-accent-tint);\n border: 1px solid var(--send-accent-tint-2);\n\n > .icon {\n flex: 0 0 18px;\n width: 18px;\n height: 18px;\n margin-top: 1px;\n color: var(--send-accent);\n\n svg {\n width: 18px;\n height: 18px;\n display: block;\n }\n }\n }\n\n .warning {\n display: flex;\n column-gap: 10px;\n margin-top: 12px;\n padding: 10px 12px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 6px;\n color: var(--send-warning-text);\n background: var(--send-warning-bg);\n border: 1px solid var(--send-warning-border);\n\n > .icon {\n flex: 0 0 18px;\n width: 18px;\n height: 18px;\n margin-top: 1px;\n color: var(--send-warning-icon);\n\n svg {\n width: 18px;\n height: 18px;\n display: block;\n }\n }\n\n a {\n color: var(--send-accent);\n font-weight: 500;\n text-decoration: none;\n border-bottom: 1px solid var(--send-accent-tint-2);\n\n .icon,\n .icon svg {\n width: 11px;\n height: 11px;\n display: inline-block;\n vertical-align: -1px;\n margin-left: 2px;\n }\n }\n }\n\n verdocs-checkbox {\n display: block;\n padding: 4px 0;\n font-size: 13px;\n }\n}\n","import type {IBrand, IOrganization, TRecipientAuthMethod} from '@verdocs/js-sdk';\nimport {Component, Element, Prop, State, h, Event, EventEmitter, Host, Method, Watch} from '@stencil/core';\nimport type {ICreateEnvelopeFromTemplateRequest, ICreateEnvelopeRecipientFromTemplate, IEnvelope, IRecipient, ITemplate} from '@verdocs/js-sdk';\nimport {createEnvelope, formatFullName, getBrands, getOrganization, getTemplate, getOrganizationContacts, getRGBA, isValidEmail, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {IContactSearchEvent} from '../../envelopes/verdocs-contact-picker/verdocs-contact-picker';\nimport {DefaultEndpoint, getWebAppUrl} from '../../../utils/Environment';\nimport {getRoleIndex, getRoleNames} from '../../../utils/Templates';\nimport {updateScrollFade} from '../../../utils/ScrollFade';\nimport {VerdocsToast} from '../../../utils/Toast';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nconst chevronRightIcon =\n '<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m9 6 6 6-6 6\"/></svg>';\n\nconst chevronLeftIcon =\n '<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m15 18-6-6 6-6\"/></svg>';\n\nconst warningIcon =\n '<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z\"/><path d=\"M12 9v4M12 17h.01\"/></svg>';\n\nconst infoIcon =\n '<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 16v-4M12 8h.01\"/></svg>';\n\nconst externalLinkIcon =\n '<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M15 3h6v6M10 14 21 3M21 14v7H3V3h7\"/></svg>';\n\nconst VERDOCS_LOGO_URL = 'https://app.verdocs.com/assets/blue-logo.svg';\n\n// Swipe mechanics for mobile users in detail views\nconst SWIPE_START_FRACTION = 0.25;\nconst SWIPE_MIN_DISTANCE = 60;\nconst SWIPE_MAX_DURATION = 500;\n\n// Expiration controls. The API is less strict, but Web users prefer a simpler setup so we just range-limit it 1..120 here.\nconst MIN_EXPIRY_DAYS = 1;\nconst MAX_EXPIRY_DAYS = 120;\nconst DEFAULT_EXPIRY_DAYS = 120;\n\nconst AUTH_METHOD_LABELS: Record<TRecipientAuthMethod, string> = {\n email: 'Email',\n passcode: 'Passcode',\n sms: 'SMS',\n kba: 'KBA',\n id: 'ID check',\n};\n\ntype TSendView = 'main' | 'recipient' | 'brand' | 'expires' | 'notifications' | 'sender';\n\nexport interface ISendEventDetail extends ICreateEnvelopeFromTemplateRequest {\n name: string;\n template_id: string;\n recipients: ICreateEnvelopeRecipientFromTemplate[];\n template: ITemplate;\n}\n\nexport interface ISentEventDetail extends ICreateEnvelopeFromTemplateRequest {\n name: string;\n template_id: string;\n recipients: ICreateEnvelopeRecipientFromTemplate[];\n envelope_id: string;\n envelope: IEnvelope;\n}\n\n/**\n * Display a form to send a template to one or more recipients in an envelope for signing.\n * Host applications should ensure the template is \"sendable\" before displaying this component.\n * To be sendable, a template must have at least one document attached, at least one participant\n * defined, and at least one field assigned to every \"signer\" participant. This component will\n * hide itself if the template is not sendable.\n *\n * ```ts\n * <verdocs-send\n * templateId={TEMPLATE_ID}\n * onBeforeSend={({ detail })) => { console.log('Sending... Show a spinner...', detail) }\n * onSend={({ detail }) => { console.log('Sent! Hide the spinner...', detail) }\n * onExit={({ detail }) => { console.log('Send cancelled.', detail) }\n * onSdkError={({ detail }) => { console.log('SDK error', detail) }\n * />\n * ```\n */\n@Component({\n tag: 'verdocs-send',\n styleUrl: 'verdocs-send.scss',\n shadow: false,\n})\nexport class VerdocsSend {\n private templateListenerId = null;\n\n @Element() el: HTMLElement;\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 = DefaultEndpoint;\n\n /**\n * The ID of the template to create the document from.\n */\n @Prop({reflect: true}) templateId: string | null = null;\n\n /**\n * The environment the control is being called from, e.g. 'web'. This has an impact on how certain\n * operations such as email communications are handled to ensure users receive the correct URLs for\n * their invitations. Setting this to unknown values may produce unexpected/incorrect behaviors.\n * If environment is not known, do this set this property.\n */\n @Prop() environment: string = '';\n\n /**\n * Whether to show the cancel button. It may be useful to disable this in environments where\n * the embed is shown in a non-wizard flow with its own navigation for the user to exit.\n */\n @Prop() showCancel = true;\n\n /**\n * Preselect a brand by key, overriding the organization default.\n */\n @Prop({mutable: true}) brandKey = '';\n\n /**\n * The user is sending an envelope the form and clicked send.\n */\n @Event({composed: true}) beforeSend: EventEmitter<ISendEventDetail>;\n\n /**\n * The user completed the form and clicked send.\n */\n @Event({composed: true}) send: EventEmitter<ISentEventDetail>;\n\n /**\n * Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the user enters text in a search field. The parent application may use this to update\n * the `contactSuggestions` property.\n */\n @Event({composed: true}) searchContacts: EventEmitter<IContactSearchEvent>;\n\n private swipeStart: {x: number; y: number; time: number} | null = null;\n private swallowNextClick = false;\n private loadedOrganizationId = '';\n\n @State() containerId = `verdocs-send-${Math.random().toString(36).substring(2, 11)}`;\n @State() view: TSendView = 'main';\n @State() editingRoleId = '';\n @State() sessionContacts: {id: string; first_name: string; last_name: string; email: string; phone: string}[] = [];\n @State() sending = false;\n @State() brands: IBrand[] = [];\n @State() organization: IOrganization | null = null;\n @State() expiresInDays = '';\n @State() noContact = false;\n @State() senderDefaults = {name: '', email: ''};\n @State() senderName = '';\n @State() senderEmail = '';\n @State() rolesCompleted: Record<string, Partial<IRecipient>> = {};\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n disconnectedCallback() {\n this.unlistenToTemplate();\n }\n\n componentDidLoad() {\n this.el.addEventListener(\n 'click',\n e => {\n if (this.swallowNextClick) {\n this.swallowNextClick = false;\n e.stopPropagation();\n e.preventDefault();\n }\n },\n true,\n );\n }\n\n // Make off-canvas controls leave the tab order\n componentDidRender() {\n updateScrollFade(this.el.querySelector('.detail-body'));\n this.el.querySelector('.main-pane')?.toggleAttribute('inert', this.view !== 'main');\n this.el.querySelector('.detail-pane')?.toggleAttribute('inert', this.view === 'main');\n }\n\n async listenToTemplate() {\n console.log('[SEND] Loading template', this.templateId);\n this.unlistenToTemplate();\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n true,\n (template: ITemplate) => {\n console.log('[SEND] Got new template', template);\n this.template = template;\n this.loading = false;\n this.rolesCompleted = {};\n this.view = 'main';\n this.editingRoleId = '';\n this.recomputeRolesCompleted();\n this.loadBrands();\n },\n );\n }\n\n loadBrands() {\n const organizationId = this.template?.organization_id;\n if (!organizationId || organizationId === this.loadedOrganizationId) {\n return;\n }\n\n const changedOrganization = !!this.loadedOrganizationId;\n this.loadedOrganizationId = organizationId;\n this.brands = [];\n this.organization = null;\n if (changedOrganization) {\n this.brandKey = '';\n }\n\n const stillCurrent = () => this.template?.organization_id === organizationId;\n\n getBrands(this.endpoint, organizationId)\n .then(brands => {\n if (stillCurrent()) {\n this.brands = brands || [];\n }\n })\n .catch(e => console.log('[SEND] Unable to load brands', e));\n\n getOrganization(this.endpoint, organizationId)\n .then(organization => {\n if (stillCurrent()) {\n this.organization = organization;\n }\n })\n .catch(e => console.log('[SEND] Unable to load organization', e));\n }\n\n handleExpiryInput(e: any) {\n const digits = (e.target.value || '').replace(/[^0-9]/g, '');\n this.expiresInDays = digits ? String(Math.min(Math.max(Number(digits), MIN_EXPIRY_DAYS), MAX_EXPIRY_DAYS)) : '';\n e.target.value = this.expiresInDays;\n }\n\n effectiveExpiryDays(): number {\n const days = Number(this.expiresInDays);\n return days >= MIN_EXPIRY_DAYS ? days : DEFAULT_EXPIRY_DAYS;\n }\n\n expiresAt(): Date {\n return new Date(Date.now() + this.effectiveExpiryDays() * 24 * 60 * 60 * 1000);\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n @Method()\n async reset() {\n this.rolesCompleted = {};\n this.view = 'main';\n this.editingRoleId = '';\n this.brandKey = '';\n this.expiresInDays = '';\n this.noContact = false;\n this.senderName = '';\n this.senderEmail = '';\n }\n\n // The sender_name defaults to the custom sender identity if configued/active, the brand\n // next, and then the org name.\n brandSenderName() {\n const brand = this.brandKey ? this.brands.find(b => b.key === this.brandKey) : this.getDefaultBrand();\n return brand?.email_display_name || brand?.email_sender_name || this.organization?.name || '';\n }\n\n effectiveSenderName() {\n return this.senderName || this.brandSenderName();\n }\n\n effectiveSenderEmail() {\n return this.senderEmail || this.senderDefaults.email;\n }\n\n senderOverrides() {\n const name = this.senderName.trim();\n const email = this.senderEmail.trim();\n return {\n sender_name: name && name !== this.brandSenderName() ? name : undefined,\n sender_email: email && email !== this.senderDefaults.email ? email : undefined,\n };\n }\n\n @Watch('templateId')\n onTemplateIdChanged(newTemplateId: string) {\n console.log('[SEND] Template ID changed', newTemplateId);\n this.listenToTemplate();\n }\n\n async componentWillLoad() {\n try {\n this.endpoint.onSessionChanged((_endpoint, _session, profile) => {\n if (!profile) {\n return;\n }\n\n const me = {\n id: profile.id,\n first_name: profile.first_name,\n last_name: profile.last_name,\n email: profile.email,\n phone: profile.phone,\n };\n\n if (profile) {\n this.senderDefaults = {name: formatFullName(profile), email: profile.email || ''};\n this.sessionContacts = [me];\n\n getOrganizationContacts(this.endpoint)\n .then(contacts => {\n console.log('[SEND] Got contacts', contacts);\n this.sessionContacts = [...contacts, me];\n })\n .catch(e => {\n console.log('[SEND] Error getting contacts', e);\n });\n }\n });\n\n this.endpoint.loadSession();\n\n if (!this.endpoint.session) {\n console.log('[SEND] Unable to start Send operation, must be authenticated');\n return;\n }\n\n if (!this.templateId) {\n console.log(`[SEND] Missing required template ID ${this.templateId}`);\n return;\n }\n\n this.listenToTemplate();\n } catch (e) {\n console.log('[SEND] Error with send session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n recomputeRolesCompleted() {\n this.rolesCompleted = {};\n\n const rolesAtLevel: Record<number, Partial<IRecipient>[]> = {};\n (this.template?.roles || []).forEach(role => {\n const level = role.sequence;\n rolesAtLevel[level] ||= [];\n const id = `r-${level}-${rolesAtLevel[level].length}`;\n rolesAtLevel[level].push({...role, id, role_name: role.name, first_name: role.first_name, last_name: role.last_name});\n\n // if (role.first_name && (isValidEmail(role.email) || isValidPhone(role.phone))) {\n if (role.first_name && isValidEmail(role.email)) {\n this.rolesCompleted[id] = {...role, id, role_name: role.name, first_name: role.first_name, last_name: role.last_name};\n }\n });\n }\n\n getSequenceNumbers() {\n // This is cleaner with a Set but we found a regression in some target environments where\n // this breaks down. Reverting to an older technique while we diagnose it.\n const sequences: Record<number, boolean> = {};\n (this.template?.roles || []).forEach(role => {\n sequences[role.sequence] = true;\n });\n return Object.keys(sequences)\n .map(s => +s)\n .sort((a, b) => a - b);\n }\n\n getRolesAtLevel(level: number) {\n const rolesAtLevel = (this.template?.roles || [])\n .filter(role => role.sequence === level)\n .map((role, index) => ({\n ...role,\n id: `r-${level}-${index}`,\n role_name: role.name,\n first_name: role.first_name,\n last_name: role.last_name,\n }));\n return rolesAtLevel as Partial<IRecipient>[];\n }\n\n getRoleById(id: string): Partial<IRecipient> | null {\n for (const level of this.getSequenceNumbers()) {\n const match = this.getRolesAtLevel(level).find(role => role.id === id);\n if (match) {\n return match;\n }\n }\n\n return null;\n }\n\n // We only show options the sender switched on.\n getRecipientOptionLabels(recipient: Partial<IRecipient> | undefined): string[] {\n if (!recipient) {\n return [];\n }\n\n const labels = (recipient.auth_methods || []).filter(method => method !== 'email').map(method => AUTH_METHOD_LABELS[method] || method);\n if (recipient.delegator) {\n labels.push('May delegate');\n }\n\n if (recipient.name_locked) {\n labels.push('Name locked');\n }\n\n return labels;\n }\n\n getDefaultBrand(): IBrand | null {\n const defaultId = this.organization?.default_brand_id;\n return (defaultId && this.brands.find(brand => brand.id === defaultId)) || null;\n }\n\n getDefaultBrandLabel() {\n const name = this.getDefaultBrand()?.name;\n return `Default (${name || 'Verdocs'})`;\n }\n\n getSelectedBrandLabel() {\n if (!this.brandKey) {\n return this.getDefaultBrandLabel();\n }\n\n const brand = this.brands.find(b => b.key === this.brandKey);\n return brand?.name || brand?.key || this.brandKey;\n }\n\n showView(view: TSendView) {\n this.view = view;\n }\n\n handleSelectContact(e: any, role: Partial<IRecipient>) {\n e.preventDefault();\n this.rolesCompleted = {...this.rolesCompleted, [role.id]: {...role, ...e.detail}};\n this.editingRoleId = '';\n this.view = 'main';\n }\n\n handleClickRole(e: any, role: Partial<IRecipient>) {\n e.stopPropagation();\n this.editingRoleId = role.id;\n this.view = 'recipient';\n }\n\n handleSend(e: any) {\n if (this.sending) {\n console.log('[SEND] Skipping duplicate send', e);\n return;\n }\n\n console.log('[SEND] Sending', e);\n e.preventDefault();\n e.stopPropagation();\n\n this.sending = true;\n const localeData = Intl.DateTimeFormat().resolvedOptions();\n\n const details: ICreateEnvelopeFromTemplateRequest = {\n template_id: this.templateId,\n name: this.template?.name || 'New Envelope',\n environment: this.environment,\n initial_reminder: 0,\n followup_reminders: 0,\n recipients: Object.values(this.rolesCompleted) as ICreateEnvelopeRecipientFromTemplate[],\n timezone: localeData.timeZone,\n locale: localeData.locale,\n expires_at: this.expiresAt().toISOString(),\n };\n\n details.no_contact = this.noContact;\n const {sender_name, sender_email} = this.senderOverrides();\n if (sender_name) {\n details.sender_name = sender_name;\n }\n if (sender_email) {\n details.sender_email = sender_email;\n }\n if (this.brandKey) {\n details.brand_key = this.brandKey;\n }\n\n const beforeSendResult = this.beforeSend.emit({...details, name: details.name!, template: this.template});\n if (beforeSendResult.defaultPrevented) {\n console.log('[SEND] Send cancelled by parent', details);\n this.sending = false;\n return;\n }\n\n console.log('[SEND] Creating envelope', details);\n createEnvelope(this.endpoint, details)\n .then(r => {\n console.log('[SEND] Send envelope', r);\n this.reset().catch((e: any) => console.log('Unknown Error', e));\n this.sending = false;\n this.send?.emit({...details, name: details.name!, envelope_id: r.id, envelope: r});\n })\n .catch(e => {\n console.log('[SEND] Send error', e);\n VerdocsToast(e.response?.data?.error || 'Error creating envelope, please try again later.');\n this.sending = false;\n this.sdkError?.emit(e);\n });\n }\n\n handleCancel(e: any) {\n e.stopPropagation();\n this.exit?.emit();\n }\n\n handleSwipeStart(e: PointerEvent) {\n this.swallowNextClick = false;\n const pane = e.currentTarget as HTMLElement;\n const rect = pane.getBoundingClientRect();\n const onTextEntry = !!(e.target as HTMLElement)?.closest?.('input, textarea, select, [contenteditable]');\n if (this.view === 'main' || onTextEntry || e.clientX - rect.left > rect.width * SWIPE_START_FRACTION) {\n this.swipeStart = null;\n return;\n }\n\n this.swipeStart = {x: e.clientX, y: e.clientY, time: Date.now()};\n }\n\n handleSwipeEnd(e: PointerEvent) {\n const start = this.swipeStart;\n this.swipeStart = null;\n if (!start) {\n return;\n }\n\n const dx = e.clientX - start.x;\n const dy = Math.abs(e.clientY - start.y);\n if (dx >= SWIPE_MIN_DISTANCE && dx > dy && Date.now() - start.time <= SWIPE_MAX_DURATION) {\n this.swallowNextClick = true;\n this.showView('main');\n }\n }\n\n renderDetailHeader(title: any) {\n return (\n <div class=\"detail-header\">\n <button type=\"button\" class=\"back\" onClick={() => this.showView('main')}>\n <span class=\"icon\" innerHTML={chevronLeftIcon} />\n Back\n </button>\n <div class=\"detail-title\">{title}</div>\n <div class=\"detail-header-spacer\" />\n </div>\n );\n }\n\n renderDetailBody(content: any) {\n return (\n <div class=\"detail-body-wrap\">\n <div class=\"detail-body\" onScroll={(e: any) => updateScrollFade(e.target)}>\n {content}\n </div>\n <div class=\"scroll-fade\" />\n </div>\n );\n }\n\n renderDoneButton() {\n return (\n <div class=\"detail-footer\">\n <verdocs-button label=\"Done\" size=\"small\" onClick={() => this.showView('main')} />\n </div>\n );\n }\n\n renderRecipientView() {\n const role = this.getRoleById(this.editingRoleId);\n if (!role) {\n return <div class=\"detail recipient-detail\">{this.renderDetailHeader('Recipient')}</div>;\n }\n\n const roleIndex = getRoleIndex(this.template, role.role_name);\n return (\n <div class=\"detail recipient-detail\">\n {this.renderDetailHeader([<span class=\"role-dot\" style={{backgroundColor: getRGBA(roleIndex)}} />, role.role_name])}\n <verdocs-contact-picker\n key={role.id}\n showCancel={false}\n onExit={() => this.showView('main')}\n onNext={e => this.handleSelectContact(e, role)}\n contactSuggestions={this.sessionContacts}\n templateRole={(this.rolesCompleted[role.id] ?? role) as IRecipient}\n onSearchContacts={e => this.searchContacts?.emit(e.detail)}\n />\n </div>\n );\n }\n\n renderBrandSwatch(brand: IBrand | null, fallbackInitial: string) {\n const image = brand?.favicon_url || brand?.thumbnail_url || (brand ? null : VERDOCS_LOGO_URL);\n if (image) {\n return (\n <span class=\"swatch logo\">\n <img src={image} alt=\"\" />\n </span>\n );\n }\n\n return (\n <span class=\"swatch\" style={{backgroundColor: brand?.primary_color || '#4c56cb'}}>\n {fallbackInitial.substring(0, 2).toUpperCase()}\n </span>\n );\n }\n\n renderBrandOption(key: string, label: string, sub: string, swatch: any) {\n return (\n <button type=\"button\" class={{option: true, selected: this.brandKey === key}} onClick={() => (this.brandKey = key)}>\n <span class=\"radio\" />\n {swatch}\n <span class=\"option-label\">\n {label}\n <small>{sub}</small>\n </span>\n </button>\n );\n }\n\n renderBrandView() {\n const defaultBrand = this.getDefaultBrand();\n const others = this.brands.filter(brand => brand.id !== defaultBrand?.id).sort((a, b) => (a.name || a.key).localeCompare(b.name || b.key));\n const hasBrands = this.brands.length > 0;\n\n return (\n <div class=\"detail\">\n {this.renderDetailHeader('Brand')}\n {this.renderDetailBody([\n <div class=\"option-list\">\n {this.renderBrandOption('', this.getDefaultBrandLabel(), 'Organization default', this.renderBrandSwatch(defaultBrand, defaultBrand?.name || 'V'))}\n {others.length > 0 && <div class=\"option-divider\" />}\n {others.map(brand => this.renderBrandOption(brand.key, brand.name || brand.key, brand.key, this.renderBrandSwatch(brand, brand.name || brand.key)))}\n </div>,\n !hasBrands && (\n <p class=\"hint\">\n Configure the look and feel of the signing experience by{' '}\n <a href={`${getWebAppUrl(this.endpoint)}/settings/branding`} target=\"_blank\" rel=\"noopener\">\n Creating a Brand\n <span class=\"icon\" innerHTML={externalLinkIcon} />\n </a>\n .\n </p>\n ),\n ])}\n {this.renderDoneButton()}\n </div>\n );\n }\n\n renderExpiresView() {\n const expiresAt = this.expiresAt();\n const when = `${expiresAt.toLocaleDateString(undefined, {month: 'short', day: 'numeric', year: 'numeric'})} at ${expiresAt.toLocaleTimeString(undefined, {hour: 'numeric', minute: '2-digit'})}`;\n\n return (\n <div class=\"detail\">\n {this.renderDetailHeader('Expiration')}\n {this.renderDetailBody([\n <div class=\"expires-field\">\n <input\n type=\"text\"\n inputMode=\"numeric\"\n aria-label=\"Expires in (days)\"\n placeholder={String(DEFAULT_EXPIRY_DAYS)}\n value={this.expiresInDays}\n disabled={this.sending}\n onInput={(e: any) => this.handleExpiryInput(e)}\n />\n <span class=\"suffix\">days</span>\n </div>,\n <p class=\"hint\">\n This envelope will expire on {when}. Expirations may be set from {MIN_EXPIRY_DAYS}-{MAX_EXPIRY_DAYS} days. If left blank, this will default to {DEFAULT_EXPIRY_DAYS}.\n </p>,\n ])}\n {this.renderDoneButton()}\n </div>\n );\n }\n\n renderSenderView() {\n const validEmail = !this.senderEmail.trim() || isValidEmail(this.senderEmail.trim());\n return (\n <div class=\"detail\">\n {this.renderDetailHeader('Sender')}\n {this.renderDetailBody([\n <div class=\"sender-field\">\n <label htmlFor={`${this.containerId}-sender-name`}>Name</label>\n <input\n id={`${this.containerId}-sender-name`}\n type=\"text\"\n value={this.effectiveSenderName()}\n disabled={this.sending}\n onInput={(e: any) => (this.senderName = e.target.value)}\n />\n </div>,\n <div class=\"sender-field\">\n <label htmlFor={`${this.containerId}-sender-email`}>Email</label>\n <input\n id={`${this.containerId}-sender-email`}\n type=\"email\"\n value={this.effectiveSenderEmail()}\n disabled={this.sending}\n onInput={(e: any) => (this.senderEmail = e.target.value)}\n />\n {!validEmail && <div class=\"field-error\">Enter a valid email address.</div>}\n </div>,\n <div class=\"notice\">\n <span class=\"icon\" innerHTML={infoIcon} />\n <div>\n The name is what recipients see as the sender, for example \"Sentry <notifications@verdocs.com>\", and starts as your brand's name. The email is where status\n updates about this envelope are sent and what the certificate shows as the sender. Delivery from your own address needs a custom sender set up under Settings.\n </div>\n </div>,\n ])}\n {this.renderDoneButton()}\n </div>\n );\n }\n\n renderNotificationsView() {\n return (\n <div class=\"detail\">\n {this.renderDetailHeader('Notifications')}\n {this.renderDetailBody([\n <verdocs-checkbox size=\"small\" label=\"Disable notifications\" checked={this.noContact} onInput={(e: any) => (this.noContact = !!e.target.checked)} />,\n this.noContact && (\n <div class=\"warning\">\n <span class=\"icon\" innerHTML={warningIcon} />\n <div>\n Disabling notifications turns off invitations and reminders to recipients as well as status updates to you. You may obtain invite links in the recipient summary or\n via an API call. We strongly recommend enabling{' '}\n <a href={`${getWebAppUrl(this.endpoint)}/settings/webhooks`} target=\"_blank\" rel=\"noopener\">\n Webhooks\n <span class=\"icon\" innerHTML={externalLinkIcon} />\n </a>{' '}\n to help automate this process.\n </div>\n </div>\n ),\n ])}\n {this.renderDoneButton()}\n </div>\n );\n }\n\n renderDetail() {\n switch (this.view) {\n case 'recipient':\n return this.renderRecipientView();\n case 'brand':\n return this.renderBrandView();\n case 'expires':\n return this.renderExpiresView();\n case 'notifications':\n return this.renderNotificationsView();\n case 'sender':\n return this.renderSenderView();\n default:\n return null;\n }\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n if (!this.endpoint.session) {\n return (\n <Host style={{display: 'flex'}}>\n <verdocs-component-error message=\"You must be authenticated to use this module.\" />\n </Host>\n );\n }\n\n const levels = this.getSequenceNumbers();\n const rolesAssigned = Object.values(this.rolesCompleted).filter(recipient => isValidEmail(recipient.email) && recipient.first_name && recipient.last_name);\n const allRolesAssigned = rolesAssigned.length >= getRoleNames(this.template).length;\n const assignedEmails = rolesAssigned.map(r => r.email.toLowerCase());\n const hasDuplicateEmails = new Set(assignedEmails).size < assignedEmails.length;\n const expiresAt = this.expiresAt();\n const expiresShort = expiresAt.toLocaleDateString(undefined, {month: 'short', day: 'numeric'});\n\n return (\n <Host class={{'sendable': this.template?.is_sendable, 'detail-open': this.view !== 'main'}}>\n <div class=\"track\">\n <div class=\"pane main-pane\" aria-hidden={this.view !== 'main' ? 'true' : 'false'}>\n <div class=\"section-title\">Recipients</div>\n <div class=\"recipients\">\n {levels.map(level => [\n levels.length > 1 && <div class=\"step\">Step {level}</div>,\n this.getRolesAtLevel(level).map(role => {\n const roleIndex = getRoleIndex(this.template, role.role_name);\n const completed = this.rolesCompleted[role.id];\n const assigned = completed && rolesAssigned.findIndex(r => r.role_name === role.role_name) > -1;\n const optionLabels = this.getRecipientOptionLabels(completed);\n\n return (\n <button type=\"button\" class=\"recipient\" data-ri={roleIndex} data-rn={role.role_name} onClick={e => this.handleClickRole(e, role)}>\n <span class=\"role-dot\" style={{backgroundColor: getRGBA(roleIndex)}} />\n <span class=\"who\">\n <span class=\"role-name\">{role.role_name}</span>\n {assigned ? (\n <span class=\"who-detail\">\n {formatFullName(completed)} · {completed.email}\n </span>\n ) : (\n <span class=\"who-detail configure\">Configure recipient</span>\n )}\n {optionLabels.length > 0 && (\n <span class=\"options\">\n {optionLabels.map(label => (\n <span class=\"pill\">{label}</span>\n ))}\n </span>\n )}\n </span>\n <span class=\"chevron\" innerHTML={chevronRightIcon} />\n </button>\n );\n }),\n ])}\n </div>\n\n <div class=\"section-title delivery-title\">Delivery</div>\n <div class=\"delivery\">\n <button type=\"button\" class=\"kv\" onClick={() => this.showView('brand')} disabled={this.sending}>\n <span class=\"key\">Brand</span>\n <span class=\"value\">{this.getSelectedBrandLabel()}</span>\n <span class=\"chevron\" innerHTML={chevronRightIcon} />\n </button>\n <button type=\"button\" class=\"kv\" onClick={() => this.showView('expires')} disabled={this.sending}>\n <span class=\"key\">Expires</span>\n <span class=\"value\">\n {this.effectiveExpiryDays()} days <small>· {expiresShort}</small>\n </span>\n <span class=\"chevron\" innerHTML={chevronRightIcon} />\n </button>\n <button type=\"button\" class=\"kv\" onClick={() => this.showView('sender')} disabled={this.sending}>\n <span class=\"key\">Sender</span>\n <span class=\"value\">\n {this.effectiveSenderName() || this.effectiveSenderEmail()}\n {this.effectiveSenderName() && this.effectiveSenderEmail() ? <small> · {this.effectiveSenderEmail()}</small> : null}\n </span>\n <span class=\"chevron\" innerHTML={chevronRightIcon} />\n </button>\n <button type=\"button\" class=\"kv\" onClick={() => this.showView('notifications')} disabled={this.sending}>\n <span class=\"key\">Notifications</span>\n <span class={{value: true, off: this.noContact}}>{this.noContact ? 'Off' : 'On'}</span>\n <span class=\"chevron\" innerHTML={chevronRightIcon} />\n </button>\n </div>\n\n <div class=\"main-spacer\" />\n\n <div class=\"buttons\">\n {hasDuplicateEmails && <div class=\"error-message\">Recipients cannot share the same email.</div>}\n {this.sending && <verdocs-spinner />}\n {this.showCancel && <verdocs-button label=\"Cancel\" size=\"small\" variant=\"outline\" onClick={e => this.handleCancel(e)} disabled={this.sending} />}\n <verdocs-button label=\"Send\" size=\"small\" disabled={!allRolesAssigned || this.sending || hasDuplicateEmails} onClick={e => this.handleSend(e)} />\n </div>\n </div>\n\n <div\n class=\"pane detail-pane\"\n aria-hidden={this.view === 'main' ? 'true' : 'false'}\n onPointerDown={e => this.handleSwipeStart(e)}\n onPointerUp={e => this.handleSwipeEnd(e)}\n onPointerCancel={() => (this.swipeStart = null)}\n >\n {this.renderDetail()}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"upBAEO,MAAMA,EAAgBC,KAAgCA,IAAQ,MAARA,SAAQ,SAARA,EAAUC,QAAS,IAAIC,KAAIC,GAAQA,EAAKC,OAE9F,MAAMC,EAAe,CAACL,EAA4BM,IACvDC,KAAKC,IACHT,EAAaC,GAAUS,WAAUL,GAAQA,IAASE,IAClD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EAAoBpE,QAASzK,GAAKjC,KAAKmJ,WAAWlH,OAI/IsK,EAAA,OACEC,MAAM,mBAAkB,cACXxM,KAAKe,OAAS,OAAS,OAAS,QAC7CyQ,cAAevP,GAAKjC,KAAKiL,iBAAiBhJ,GAC1CwP,YAAaxP,GAAKjC,KAAKgM,eAAe/J,GACtCyP,gBAAiB,IAAO1R,KAAKQ,WAAa,MAEzCR,KAAKqQ,iB","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{p as e,H as s,c as o,h as i,d as t,t as n}from"./p-yZBlG3YQ.js";import{VerdocsEndpoint as r,getEnvelope as d}from"@verdocs/js-sdk";import{S as l}from"./p-C1sRVZWv.js";import{S as a}from"./p-C7hFgM52.js";import{d as c}from"./p-C90lxyUX.js";import{d as f}from"./p-8J_y0V9M.js";const p=()=>`verdocs-sign-footer{left:0;right:0;bottom:0;height:48px;display:-ms-flexbox;display:flex;color:#616161;position:fixed;font-size:12px;padding:0 24px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;background:#ffffff;container-type:inline-size;border-top:1px solid #e0e0e0;-ms-flex-pack:justify;justify-content:space-between;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-sign-footer a{color:#616161;cursor:pointer;text-decoration:none;border-bottom:1px dotted #616161}verdocs-sign-footer.loading{display:none}verdocs-sign-footer .powered-by{white-space:nowrap}verdocs-sign-footer .buttons{-ms-flex:0;flex:0;gap:16px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;white-space:nowrap;-ms-flex-align:center;align-items:center}verdocs-sign-footer .buttons button{gap:4px;border:none;display:-ms-flexbox;display:flex;outline:none;cursor:pointer;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent}verdocs-sign-footer .buttons div{gap:4px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-sign-footer .links{-ms-flex:0;flex:0;gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;white-space:nowrap}verdocs-sign-footer.just-buttons .buttons{-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center}@container (max-width: 720px){verdocs-sign-footer.has-buttons .powered-by{display:none}}@container (max-width: 540px){verdocs-sign-footer.no-buttons .powered-by{display:none}verdocs-sign-footer.has-buttons .links{display:none}verdocs-sign-footer .buttons{-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center}}`;const v=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z" fill="#424242"/></svg>`;const b=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7.14645 7.14645C7.34171 6.95118 7.65829 6.95118 7.85355 7.14645L10 9.29289L12.1464 7.14645C12.3417 6.95118 12.6583 6.95118 12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L10.7071 10L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L10 10.7071L7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536C6.95118 12.6583 6.95118 12.3417 7.14645 12.1464L9.29289 10L7.14645 7.85355C6.95118 7.65829 6.95118 7.34171 7.14645 7.14645ZM3 6C3 4.34315 4.34315 3 6 3H14C15.6569 3 17 4.34315 17 6V14C17 15.6569 15.6569 17 14 17H6C4.34315 17 3 15.6569 3 14V6ZM6 4C4.89543 4 4 4.89543 4 6V14C4 15.1046 4.89543 16 6 16H14C15.1046 16 16 15.1046 16 14V6C16 4.89543 15.1046 4 14 4H6Z" fill="#424242"/></svg>`;const h=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 5C3 3.89543 3.89543 3 5 3H13.3787C13.9091 3 14.4178 3.21071 14.7929 3.58579L16.4142 5.20711C16.7893 5.58218 17 6.09089 17 6.62132V15C17 16.1046 16.1046 17 15 17H5C3.89543 17 3 16.1046 3 15V5ZM5 4C4.44772 4 4 4.44772 4 5V15C4 15.5523 4.44772 16 5 16L5 11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V16C15.5523 16 16 15.5523 16 15V6.62132C16 6.3561 15.8946 6.10175 15.7071 5.91421L14.0858 4.29289C13.8983 4.10536 13.6439 4 13.3787 4L13 4V6.5C13 7.32843 12.3284 8 11.5 8L7.5 8C6.67157 8 6 7.32843 6 6.5L6 4H5ZM7 4L7 6.5C7 6.77614 7.22386 7 7.5 7L11.5 7C11.7761 7 12 6.77614 12 6.5V4L7 4ZM14 16V11.5C14 11.2239 13.7761 11 13.5 11H6.5C6.22386 11 6 11.2239 6 11.5V16H14Z" fill="#424242"/></svg>`;const u=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.askQuestion=o(this,"askQuestion");this.decline=o(this,"decline");this.finishLater=o(this,"finishLater");this.sdkError=o(this,"sdkError");this.envelopeListenerId=null;this.endpoint=r.getDefault();this.envelopeId="";this.isDone=false;this.brand=null;this.askingQuestion=false;this.declinine=false;this.envelope=null}async componentWillLoad(){var e,s,o;try{if(!this.envelopeId){console.log(`[FOOTER] Missing required envelope ID ${this.envelopeId}`);return}this.listenToEnvelope()}catch(i){console.log("[FOOTER] Error loading envelope",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new l(i.message,(s=i.response)===null||s===void 0?void 0:s.status,(o=i.response)===null||o===void 0?void 0:o.data))}}disconnectedCallback(){this.unlistenToEnvelope()}async listenToEnvelope(){console.log("[FOOTER] Loading envelope",this.envelopeId);this.unlistenToEnvelope();a.subscribe("envelopes",this.envelopeId,(()=>d(this.endpoint,this.envelopeId)),false,(e=>{this.envelope=e}))}unlistenToEnvelope(){if(this.envelopeListenerId){a.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}}render(){var e,s,o,n,r,d;const l=(e=this.envelope)===null||e===void 0?void 0:e.organization;const a=((s=this.brand)===null||s===void 0?void 0:s.powered_by_label)||(l===null||l===void 0?void 0:l.powered_by_label);const c=((o=this.brand)===null||o===void 0?void 0:o.powered_by_label)?(n=this.brand)===null||n===void 0?void 0:n.powered_by_url:l===null||l===void 0?void 0:l.powered_by_url;const f=((r=this.brand)===null||r===void 0?void 0:r.terms_use_url)||(l===null||l===void 0?void 0:l.terms_use_url);const p=((d=this.brand)===null||d===void 0?void 0:d.privacy_policy_url)||(l===null||l===void 0?void 0:l.privacy_policy_url);const u=!!a;const x=!!f||!!p;const g=!this.isDone;return i(t,{key:"91d822a2405449adbfb2cce4c87a4086958e4e79",class:{"has-buttons":g,"no-buttons":!g,"has-powered-by":u,"has-links":x,"just-buttons":!u&&!x}},a&&i("div",{key:"5f856e6ba57091e30e455657fb304c6718d9b80c",class:"powered-by"},c?i("a",{href:c,target:"_blank",rel:"noopener noreferrer"},i("span",null,a)):i("span",null,a)),!this.isDone&&i("div",{key:"a9090f99ebc82d1b6602e52edd6d92f8eb94efcc",class:"buttons"},i("button",{key:"08c7596ba10f3240dd29dc9d30f92ea3d6e4b0c3",onClick:()=>this.askingQuestion=true},i("span",{key:"19ba5c915fab3c7e38598f0cf90b1a8c82cc86d8",innerHTML:v}),"Ask Sender a Question"),i("button",{key:"12189b38952064e2a65e6c28f7a5f95d75f12ba7",onClick:()=>{var e;return(e=this.decline)===null||e===void 0?void 0:e.emit()}},i("span",{key:"a5df4760b465ad3c8be1cec7ddbc8d4c88dfa3e2",innerHTML:b}),"Decline Signing"),i("button",{key:"dfd2079149f39c688bd535474ed2a5d86b9be75d",onClick:()=>{var e;return(e=this.finishLater)===null||e===void 0?void 0:e.emit()}},i("span",{key:"35da50d7a9dd7fdf9d0748248cc1a5d98b9d3d11",innerHTML:h}),"Finish Later")),i("div",{key:"7d50e834619ee75a6651d8dc8a0f8e2bcc3c17ad",class:"links"},f&&i("a",{key:"02fb19b915a6c22156a91001e90941219efc529c",href:f,target:"_blank",rel:"noopener noreferrer"},i("span",{key:"752ca1e97fd782fdefe6fdd0d1b2831ea54ca80c"},"Terms of Use")),p&&i("a",{key:"d27725658461073751f76b7c33e76df527b6ea7c",href:p,target:"_blank",rel:"noopener noreferrer"},i("span",{key:"1e7ef9f0a9e88a877bb432b8bf5e4311b759d651"},"Privacy Policy"))),this.askingQuestion&&i("verdocs-question-dialog",{key:"c2ceb8bd5237792f3ef42f919bd837c11dff9a12",onNext:e=>{var s;(s=this.askQuestion)===null||s===void 0?void 0:s.emit({question:e.detail.question});this.askingQuestion=false},onExit:()=>this.askingQuestion=false}))}static get style(){return p()}},[0,"verdocs-sign-footer",{endpoint:[16],envelopeId:[1,"envelope-id"],isDone:[4,"is-done"],brand:[16],askingQuestion:[32],declinine:[32],envelope:[32]}]);function x(){if(typeof customElements==="undefined"){return}const e=["verdocs-sign-footer","verdocs-dialog","verdocs-question-dialog"];e.forEach((e=>{switch(e){case"verdocs-sign-footer":if(!customElements.get(n(e))){customElements.define(n(e),u)}break;case"verdocs-dialog":if(!customElements.get(n(e))){c()}break;case"verdocs-question-dialog":if(!customElements.get(n(e))){f()}break}}))}export{u as V,x as d};
|
|
2
|
+
//# sourceMappingURL=p-D495hZfr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["verdocsSignFooterCss","QuestionIcon","DeclineIcon","SaveIcon","VerdocsSignFooter","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","envelopeListenerId","endpoint","VerdocsEndpoint","getDefault","envelopeId","isDone","brand","askingQuestion","declinine","envelope","componentWillLoad","console","log","listenToEnvelope","e","_a","sdkError","emit","SDKError","message","_b","response","status","_c","data","disconnectedCallback","unlistenToEnvelope","Store","subscribe","getEnvelope","store","delListener","render","org","organization","poweredByLabel","powered_by_label","poweredByUrl","_d","powered_by_url","termsUrl","_e","terms_use_url","privacyUrl","_f","privacy_policy_url","hasPoweredBy","hasLinks","hasButtons","h","Host","key","class","href","target","rel","onClick","innerHTML","decline","finishLater","onNext","askQuestion","question","detail","onExit"],"sources":["src/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.scss?tag=verdocs-sign-footer","src/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-sign-footer {\n left: 0;\n right: 0;\n bottom: 0;\n height: 48px;\n display: flex;\n color: #616161;\n position: fixed;\n font-size: 12px;\n padding: 0 24px;\n align-items: center;\n flex-direction: row;\n background: #ffffff;\n container-type: inline-size;\n border-top: 1px solid #e0e0e0;\n justify-content: space-between;\n font-family: $verdocs-primary-font;\n transition: 0.5s cubic-bezier(0.35, 0, 0.25, 1);\n\n a {\n color: #616161;\n cursor: pointer;\n text-decoration: none;\n border-bottom: 1px dotted #616161;\n }\n\n &.loading {\n display: none;\n }\n\n .powered-by {\n white-space: nowrap;\n }\n\n .buttons {\n flex: 0;\n gap: 16px;\n display: flex;\n flex-direction: row;\n white-space: nowrap;\n align-items: center;\n\n button {\n gap: 4px;\n border: none;\n display: flex;\n outline: none;\n cursor: pointer;\n flex-direction: row;\n align-items: center;\n background: transparent;\n }\n\n div {\n gap: 4px;\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n }\n\n .links {\n flex: 0;\n gap: 8px;\n display: flex;\n flex-direction: row;\n white-space: nowrap;\n }\n\n &.just-buttons {\n .buttons {\n flex: 1;\n justify-content: center;\n }\n }\n\n @container (max-width: 720px) {\n &.has-buttons .powered-by {\n display: none;\n }\n }\n\n @container (max-width: 540px) {\n &.no-buttons .powered-by {\n display: none;\n }\n\n &.has-buttons .links {\n display: none;\n }\n\n .buttons {\n flex: 1;\n justify-content: center;\n }\n }\n}\n","import {IEnvelope} from '@verdocs/js-sdk';\nimport {Component, h, Event, EventEmitter, Host, Prop, State} from '@stencil/core';\nimport {getEnvelope, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nconst QuestionIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z\" fill=\"#424242\"/></svg>`;\nconst DeclineIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.14645 7.14645C7.34171 6.95118 7.65829 6.95118 7.85355 7.14645L10 9.29289L12.1464 7.14645C12.3417 6.95118 12.6583 6.95118 12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L10.7071 10L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L10 10.7071L7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536C6.95118 12.6583 6.95118 12.3417 7.14645 12.1464L9.29289 10L7.14645 7.85355C6.95118 7.65829 6.95118 7.34171 7.14645 7.14645ZM3 6C3 4.34315 4.34315 3 6 3H14C15.6569 3 17 4.34315 17 6V14C17 15.6569 15.6569 17 14 17H6C4.34315 17 3 15.6569 3 14V6ZM6 4C4.89543 4 4 4.89543 4 6V14C4 15.1046 4.89543 16 6 16H14C15.1046 16 16 15.1046 16 14V6C16 4.89543 15.1046 4 14 4H6Z\" fill=\"#424242\"/></svg>`;\nconst SaveIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3 5C3 3.89543 3.89543 3 5 3H13.3787C13.9091 3 14.4178 3.21071 14.7929 3.58579L16.4142 5.20711C16.7893 5.58218 17 6.09089 17 6.62132V15C17 16.1046 16.1046 17 15 17H5C3.89543 17 3 16.1046 3 15V5ZM5 4C4.44772 4 4 4.44772 4 5V15C4 15.5523 4.44772 16 5 16L5 11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V16C15.5523 16 16 15.5523 16 15V6.62132C16 6.3561 15.8946 6.10175 15.7071 5.91421L14.0858 4.29289C13.8983 4.10536 13.6439 4 13.3787 4L13 4V6.5C13 7.32843 12.3284 8 11.5 8L7.5 8C6.67157 8 6 7.32843 6 6.5L6 4H5ZM7 4L7 6.5C7 6.77614 7.22386 7 7.5 7L11.5 7C11.7761 7 12 6.77614 12 6.5V4L7 4ZM14 16V11.5C14 11.2239 13.7761 11 13.5 11H6.5C6.22386 11 6 11.2239 6 11.5V16H14Z\" fill=\"#424242\"/></svg>`;\n\n/**\n * Typically presented by the `verdocs-sign` component. Displays a footer toolbar\n * with a few convenience functions for the envelope recipient to use.\n */\n@Component({\n tag: 'verdocs-sign-footer',\n styleUrl: 'verdocs-sign-footer.scss',\n shadow: false,\n})\nexport class VerdocsSignFooter {\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 render. Set ONE OF templateId or envelopeId. If both are set, envelopeId will be ignored.\n */\n @Prop() envelopeId: string = '';\n\n /**\n * If the recipient is \"done,\" some buttons will be hidden.\n */\n @Prop() isDone = false;\n\n /**\n * The envelope's brand, if any.\n */\n @Prop() brand: Record<string, any> | null = null;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) askQuestion: EventEmitter<{question: string}>;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) decline: EventEmitter;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) finishLater: EventEmitter;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the envelope is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.\n */\n // @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n @State() askingQuestion = false;\n @State() declinine = false;\n @State() envelope: IEnvelope | null = null;\n\n async componentWillLoad() {\n try {\n // NOTE: The caller must have a signing session already active and shared to us via\n // the endpoint property.\n if (!this.envelopeId) {\n console.log(`[FOOTER] Missing required envelope ID ${this.envelopeId}`);\n return;\n }\n\n this.listenToEnvelope();\n } catch (e) {\n console.log('[FOOTER] 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('[FOOTER] 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 },\n );\n }\n\n unlistenToEnvelope() {\n if (this.envelopeListenerId) {\n Store.store.delListener(this.envelopeListenerId);\n this.envelopeListenerId = null;\n }\n }\n\n // handleRecipientAction(recipient: IRecipient, id: string) {\n // console.log('[SIDEBAR] Recipient action', id, recipient);\n // switch (id) {\n // case 'update':\n // this.showUpdateDialog = recipient.role_name;\n // break;\n //\n // case 'reminder':\n // remindRecipient(this.endpoint, this.envelopeId, recipient.role_name)\n // .then(() => {\n // VerdocsToast('Reminder Sent', {style: 'success'});\n // })\n // .catch(e => {\n // console.log('[SIDEBAR] Error resending invitation', e);\n // VerdocsToast('Error resending invitation: ' + e.message, {style: 'error'});\n // });\n // break;\n //\n // case 'reinvite':\n // this.showReinviteDialog = recipient.role_name;\n // break;\n //\n // case 'inperson':\n // this.showRecipientDialog = recipient.role_name;\n // break;\n //\n // case 'modify':\n // VerdocsToast('This feature will be enabled in a future release. Please try again later.', {style: 'info'});\n // break;\n //\n // case 'details':\n // VerdocsToast('This feature will be enabled in a future release. Please try again later.', {style: 'info'});\n // break;\n // }\n // }\n\n // handleUpdateRecipient(originalRecipient: IRecipient, updatedRecipient: IRecipient) {\n // console.log('Updating recipient', originalRecipient, updatedRecipient);\n // const fields: any = {};\n // if (updatedRecipient.email !== originalRecipient.email) {\n // fields.email = updatedRecipient.email;\n // }\n // if (updatedRecipient.phone !== originalRecipient.phone) {\n // fields.phone = updatedRecipient.phone;\n // }\n // if (updatedRecipient.message !== originalRecipient.message) {\n // fields.message = updatedRecipient.message;\n // }\n // if (updatedRecipient.first_name !== originalRecipient.first_name) {\n // fields.first_name = updatedRecipient.first_name;\n // }\n // if (updatedRecipient.last_name !== originalRecipient.last_name) {\n // fields.last_name = updatedRecipient.last_name;\n // }\n //\n // if (Object.keys(fields).length > 0) {\n // updateRecipient(this.endpoint, this.envelopeId, originalRecipient.role_name, fields)\n // .then(r => {\n // // TODO: Reload the envelope?\n // VerdocsToast('Recipient updated', {style: 'success'});\n // console.log('[SIDEBAR] Updated recipient', r);\n // Store.getEnvelope(this.endpoint, this.envelopeId, true);\n // this.showUpdateDialog = '';\n // })\n // .catch(e => {\n // VerdocsToast(e.response.data.error, {style: 'error'});\n // this.showUpdateDialog = '';\n // });\n // } else {\n // this.showUpdateDialog = '';\n // }\n // }\n\n render() {\n const org = this.envelope?.organization;\n const poweredByLabel = this.brand?.powered_by_label || org?.powered_by_label;\n const poweredByUrl = this.brand?.powered_by_label ? this.brand?.powered_by_url : org?.powered_by_url;\n const termsUrl = this.brand?.terms_use_url || org?.terms_use_url;\n const privacyUrl = this.brand?.privacy_policy_url || org?.privacy_policy_url;\n const hasPoweredBy = !!poweredByLabel;\n const hasLinks = !!termsUrl || !!privacyUrl;\n const hasButtons = !this.isDone;\n\n return (\n <Host class={{'has-buttons': hasButtons, 'no-buttons': !hasButtons, 'has-powered-by': hasPoweredBy, 'has-links': hasLinks, 'just-buttons': !hasPoweredBy && !hasLinks}}>\n {poweredByLabel && (\n <div class=\"powered-by\">\n {poweredByUrl ? (\n <a href={poweredByUrl} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>{poweredByLabel}</span>\n </a>\n ) : (\n <span>{poweredByLabel}</span>\n )}\n </div>\n )}\n\n {!this.isDone && (\n <div class=\"buttons\">\n <button onClick={() => (this.askingQuestion = true)}>\n <span innerHTML={QuestionIcon} />\n Ask Sender a Question\n </button>\n <button onClick={() => this.decline?.emit()}>\n <span innerHTML={DeclineIcon} />\n Decline Signing\n </button>\n <button onClick={() => this.finishLater?.emit()}>\n <span innerHTML={SaveIcon} />\n Finish Later\n </button>\n </div>\n )}\n\n <div class=\"links\">\n {termsUrl && (\n <a href={termsUrl} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>Terms of Use</span>\n </a>\n )}\n {privacyUrl && (\n <a href={privacyUrl} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>Privacy Policy</span>\n </a>\n )}\n </div>\n\n {this.askingQuestion && (\n <verdocs-question-dialog\n onNext={e => {\n this.askQuestion?.emit({question: e.detail.question});\n this.askingQuestion = false;\n }}\n onExit={() => (this.askingQuestion = false)}\n />\n )}\n </Host>\n );\n }\n}\n"],"mappings":"0RAAA,MAAMA,EAAuB,IAAM,+0DCMnC,MAAMC,EAAe,ipBACrB,MAAMC,EAAc,k2BACpB,MAAMC,EAAW,uyB,MAWJC,EAAiBC,EAAA,MAAAD,UAAAE,EAL9B,WAAAC,CAAAC,G,0LAMUC,KAAAC,mBAAqB,KAKrBD,KAAAE,SAA4BC,EAAgBC,aAK5CJ,KAAAK,WAAqB,GAKrBL,KAAAM,OAAS,MAKTN,KAAAO,MAAoC,KA4BnCP,KAAAQ,eAAiB,MACjBR,KAAAS,UAAY,MACZT,KAAAU,SAA6B,IAsLvC,CApLC,uBAAMC,G,UACJ,IAGE,IAAKX,KAAKK,WAAY,CACpBO,QAAQC,IAAI,yCAAyCb,KAAKK,cAC1D,M,CAGFL,KAAKc,kB,CACL,MAAOC,GACPH,QAAQC,IAAI,kCAAmCE,IAC/CC,EAAAhB,KAAKiB,YAAQ,MAAAD,SAAA,SAAAA,EAAEE,KAAK,IAAIC,EAASJ,EAAEK,SAASC,EAAAN,EAAEO,YAAQ,MAAAD,SAAA,SAAAA,EAAEE,QAAQC,EAAAT,EAAEO,YAAQ,MAAAE,SAAA,SAAAA,EAAEC,M,EAIhF,oBAAAC,GACE1B,KAAK2B,oB,CAGP,sBAAMb,GACJF,QAAQC,IAAI,4BAA6Bb,KAAKK,YAC9CL,KAAK2B,qBACLC,EAAMC,UACJ,YACA7B,KAAKK,YACL,IAAMyB,EAAY9B,KAAKE,SAAUF,KAAKK,aACtC,OACCK,IACCV,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B,MAC5C0C,EAAA,QAAAE,IAAA,2CAAMM,UAAWlE,IAEV,yBACT0D,EAAA,UAAAE,IAAA,2CAAQK,QAAS,KAAK,IAAAzC,EAAC,OAAAA,EAAAhB,KAAK2D,WAAO,MAAA3C,SAAA,SAAAA,EAAEE,MAAM,GACzCgC,EAAA,QAAAE,IAAA,2CAAMM,UAAWjE,IAEV,mBACTyD,EAAA,UAAAE,IAAA,2CAAQK,QAAS,SAAAzC,EAAM,OAAAA,EAAAhB,KAAK4D,eAAW,MAAA5C,SAAA,SAAAA,EAAEE,MAAM,GAC7CgC,EAAA,QAAAE,IAAA,2CAAMM,UAAWhE,IAEV,iBAIbwD,EAAA,OAAAE,IAAA,2CAAKC,MAAM,SACRZ,GACCS,EAAA,KAAAE,IAAA,2CAAGE,KAAMb,EAAUc,OAAO,SAASC,IAAI,uBACrCN,EAAA,QAAAE,IAAA,6DAGHR,GACCM,EAAA,KAAAE,IAAA,2CAAGE,KAAMV,EAAYW,OAAO,SAASC,IAAI,uBACvCN,EAAA,QAAAE,IAAA,gEAKLpD,KAAKQ,gBACJ0C,EAAA,2BAAAE,IAAA,2CACES,OAAQ9C,I,OACNC,EAAAhB,KAAK8D,eAAW,MAAA9C,SAAA,SAAAA,EAAEE,KAAK,CAAC6C,SAAUhD,EAAEiD,OAAOD,WAC3C/D,KAAKQ,eAAiB,KAAK,EAE7ByD,OAAQ,IAAOjE,KAAKQ,eAAiB,Q","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as s,c as t,h as o,d as r,t as i}from"./p-yZBlG3YQ.js";import{VerdocsEndpoint as d,getTemplate as a}from"@verdocs/js-sdk";import{S as l}from"./p-C1sRVZWv.js";import{S as c}from"./p-C7hFgM52.js";import{d as n}from"./p-Bb5V9TQx.js";import{d as m}from"./p-DGNIsXfr.js";import{d as p}from"./p-C-v22G3g.js";import{d as f}from"./p-ByrpRZ3E.js";import{d as v}from"./p-C90lxyUX.js";import{d as h}from"./p-BKLlc2r0.js";import{d as u}from"./p-1FjgijEi.js";import{d as b}from"./p-D0MFs2Dv.js";import{d as x}from"./p-9kEZy9MP.js";import{d as k}from"./p-B1AE2j97.js";import{d as w}from"./p-ek0LNMtb.js";import{d as E}from"./p-CQzPkAVQ.js";import{d as g}from"./p-B4tpmyon.js";import{d as j}from"./p-CFacV7mg.js";import{d as y}from"./p-CEcG_ay-.js";import{d as I}from"./p-BSX4GfGg.js";import{d as C}from"./p-C8yiLtCJ.js";import{d as D}from"./p-DHzSlpJw.js";import{d as B}from"./p-DqzFuSNN.js";import{d as U}from"./p-DsSqGIBJ.js";import{d as S}from"./p-5FU3bYQ3.js";import{d as L}from"./p-DhOuB4nS.js";import{d as T}from"./p-D-X-Zcsr.js";import{d as N}from"./p-CdnjpaJt.js";import{d as G}from"./p-Bodw4NVB.js";import{d as R}from"./p-VqyGWtIp.js";import{d as V}from"./p-DreV6Npp.js";import{d as F}from"./p-Lo1dCgyv.js";import{d as z}from"./p-DFbeKrpm.js";import{d as M}from"./p-BhG0HGg6.js";import{d as P}from"./p-Bxvw_LqR.js";import{d as J}from"./p-DRP4Xxiu.js";import{d as Q}from"./p-DeAwyTxI.js";import{d as X}from"./p-CnD-TaPJ.js";import{d as Z}from"./p-PfdIkMoz.js";import{d as q}from"./p-B-ul_Soj.js";import{d as A}from"./p-DM3wePVp.js";const W=()=>`verdocs-build{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:var(--verdocs-primary-font, "Inter", "Barlow", 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{display:block;width:500px;max-width:95%;-webkit-box-sizing:border-box;box-sizing:border-box;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}`;const Y=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.cancel=t(this,"cancel");this.sdkError=t(this,"sdkError");this.stepChanged=t(this,"stepChanged");this.send=t(this,"send");this.templateUpdated=t(this,"templateUpdated");this.templateCreated=t(this,"templateCreated");this.rolesUpdated=t(this,"rolesUpdated");this.templateListenerId=null;this.endpoint=d.getDefault();this.templateId=null;this.step="preview";this.loading=true;this.template=null}onTemplateIdChanged(e,s){if(!s&&e&&this.step==="attachments"){this.step="preview"}this.loadTemplate(e).catch((e=>console.log("Unknown Error",e)))}onStepChanged(){this.loadTemplate(this.templateId).catch((e=>console.log("Unknown Error",e)))}async componentWillLoad(){var e,s,t,o,r,i;try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return}if(!this.templateId){console.log(`[BUILD] No template ID, activating upload mode`);this.step="attachments";this.loading=false;return}try{this.loadTemplate(this.templateId).catch((e=>console.log("[BUILD] Unable to load template",e)))}catch(o){console.log("[BUILD] Error loading template",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new l(o.message,(s=o.response)===null||s===void 0?void 0:s.status,(t=o.response)===null||t===void 0?void 0:t.data))}}catch(e){console.log("[BUILD] Error with builder session",e);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new l(e.message,(r=e.response)===null||r===void 0?void 0:r.status,(i=e.response)===null||i===void 0?void 0:i.data))}}async loadTemplate(e){if(e){c.subscribe("templates",this.templateId,(()=>a(this.endpoint,this.templateId)),false,(e=>{this.template=e;this.loading=false}))}}disconnectedCallback(){console.log("[BUILD] Disconnected");this.unlistenToTemplate()}unlistenToTemplate(){if(this.templateListenerId){c.store.delListener(this.templateListenerId);this.templateListenerId=null}}handleCancel(){var e;this.step="preview";(e=this.cancel)===null||e===void 0?void 0:e.emit()}async handleTemplateCreated(e){var s;await this.loadTemplate(e);this.templateId=e;this.step="roles";(s=this.stepChanged)===null||s===void 0?void 0:s.emit("roles")}async handleRolesUpdated(e){var s;console.log("[BUILD] Roloes updated",e);(s=this.templateUpdated)===null||s===void 0?void 0:s.emit(e.detail)}async handleTemplateUpdated(e){var s;console.log("[BUILD] Template updated",e);(s=this.templateUpdated)===null||s===void 0?void 0:s.emit(e.detail)}handleAttachmentsNext(){var e;this.step="roles";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("roles")}handleRolesNext(){var e;this.step="fields";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("fields")}handleStepChanged(e){var s;this.step=e;(s=this.stepChanged)===null||s===void 0?void 0:s.emit(e)}render(){if(this.loading){return o(r,{class:"loading"},o("verdocs-loader",null))}if(!this.endpoint.session){return o(r,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return o(r,null,o("div",{class:"content"},o("verdocs-template-build-tabs",{endpoint:this.endpoint,templateId:this.templateId,step:this.step,onSdkError:e=>{var s;return(s=this.sdkError)===null||s===void 0?void 0:s.emit(e.detail)},onStepChanged:e=>this.handleStepChanged(e.detail)}),this.step==="attachments"&&o("verdocs-template-attachments",{templateId:this.templateId,endpoint:this.endpoint,onExit:()=>this.handleCancel(),onNext:()=>this.handleAttachmentsNext(),onTemplateUpdated:e=>this.handleTemplateUpdated(e)}),this.step==="roles"&&o("verdocs-template-roles",{templateId:this.templateId,endpoint:this.endpoint,onExit:()=>this.handleCancel(),onNext:()=>this.handleRolesNext(),onRolesUpdated:e=>this.handleRolesUpdated(e)}),this.step==="fields"&&o("verdocs-template-fields",{templateId:this.templateId,endpoint:this.endpoint,onTemplateUpdated:e=>this.handleTemplateUpdated(e)}),this.step==="preview"&&o("div",{class:"preview-container"},o("div",{class:"preview-send-wrapper"},o("verdocs-send",{templateId:this.templateId,endpoint:this.endpoint,onSend:e=>{var s;return(s=this.send)===null||s===void 0?void 0:s.emit(e.detail)},style:{width:"100%"}})),o("div",{class:"preview-preview-wrapper"},o("verdocs-preview",{templateId:this.templateId,endpoint:this.endpoint,style:{display:"flex",flex:"1",maxWidth:"1000px"}})))))}get el(){return this}static get watchers(){return{templateId:[{onTemplateIdChanged:0}],step:[{onStepChanged:0}]}}static get style(){return W()}},[0,"verdocs-build",{endpoint:[16],templateId:[1537,"template-id"],step:[1537],loading:[32],template:[32]},undefined,{templateId:[{onTemplateIdChanged:0}],step:[{onStepChanged:0}]}]);function _(){if(typeof customElements==="undefined"){return}const e=["verdocs-build","verdocs-button","verdocs-checkbox","verdocs-component-error","verdocs-contact-picker","verdocs-dialog","verdocs-field-attachment","verdocs-field-checkbox","verdocs-field-date","verdocs-field-dropdown","verdocs-field-initial","verdocs-field-radio","verdocs-field-signature","verdocs-field-textarea","verdocs-field-textbox","verdocs-field-timestamp","verdocs-file-chooser","verdocs-flag","verdocs-help-icon","verdocs-loader","verdocs-menu-panel","verdocs-ok-dialog","verdocs-portal","verdocs-preview","verdocs-progress-bar","verdocs-select-input","verdocs-send","verdocs-spinner","verdocs-template-attachments","verdocs-template-build-tabs","verdocs-template-document-page","verdocs-template-field-properties","verdocs-template-fields","verdocs-template-role-properties","verdocs-template-roles","verdocs-text-input","verdocs-toolbar-icon","verdocs-upload-dialog"];e.forEach((e=>{switch(e){case"verdocs-build":if(!customElements.get(i(e))){customElements.define(i(e),Y)}break;case"verdocs-button":if(!customElements.get(i(e))){n()}break;case"verdocs-checkbox":if(!customElements.get(i(e))){m()}break;case"verdocs-component-error":if(!customElements.get(i(e))){p()}break;case"verdocs-contact-picker":if(!customElements.get(i(e))){f()}break;case"verdocs-dialog":if(!customElements.get(i(e))){v()}break;case"verdocs-field-attachment":if(!customElements.get(i(e))){h()}break;case"verdocs-field-checkbox":if(!customElements.get(i(e))){u()}break;case"verdocs-field-date":if(!customElements.get(i(e))){b()}break;case"verdocs-field-dropdown":if(!customElements.get(i(e))){x()}break;case"verdocs-field-initial":if(!customElements.get(i(e))){k()}break;case"verdocs-field-radio":if(!customElements.get(i(e))){w()}break;case"verdocs-field-signature":if(!customElements.get(i(e))){E()}break;case"verdocs-field-textarea":if(!customElements.get(i(e))){g()}break;case"verdocs-field-textbox":if(!customElements.get(i(e))){j()}break;case"verdocs-field-timestamp":if(!customElements.get(i(e))){y()}break;case"verdocs-file-chooser":if(!customElements.get(i(e))){I()}break;case"verdocs-flag":if(!customElements.get(i(e))){C()}break;case"verdocs-help-icon":if(!customElements.get(i(e))){D()}break;case"verdocs-loader":if(!customElements.get(i(e))){B()}break;case"verdocs-menu-panel":if(!customElements.get(i(e))){U()}break;case"verdocs-ok-dialog":if(!customElements.get(i(e))){S()}break;case"verdocs-portal":if(!customElements.get(i(e))){L()}break;case"verdocs-preview":if(!customElements.get(i(e))){T()}break;case"verdocs-progress-bar":if(!customElements.get(i(e))){N()}break;case"verdocs-select-input":if(!customElements.get(i(e))){G()}break;case"verdocs-send":if(!customElements.get(i(e))){R()}break;case"verdocs-spinner":if(!customElements.get(i(e))){V()}break;case"verdocs-template-attachments":if(!customElements.get(i(e))){F()}break;case"verdocs-template-build-tabs":if(!customElements.get(i(e))){z()}break;case"verdocs-template-document-page":if(!customElements.get(i(e))){M()}break;case"verdocs-template-field-properties":if(!customElements.get(i(e))){P()}break;case"verdocs-template-fields":if(!customElements.get(i(e))){J()}break;case"verdocs-template-role-properties":if(!customElements.get(i(e))){Q()}break;case"verdocs-template-roles":if(!customElements.get(i(e))){X()}break;case"verdocs-text-input":if(!customElements.get(i(e))){Z()}break;case"verdocs-toolbar-icon":if(!customElements.get(i(e))){q()}break;case"verdocs-upload-dialog":if(!customElements.get(i(e))){A()}break}}))}const H=Y;const K=_;export{H as VerdocsBuild,K as defineCustomElement};
|
|
1
|
+
import{p as e,H as s,c as t,h as o,d as r,t as i}from"./p-yZBlG3YQ.js";import{VerdocsEndpoint as d,getTemplate as a}from"@verdocs/js-sdk";import{S as l}from"./p-C1sRVZWv.js";import{S as c}from"./p-C7hFgM52.js";import{d as n}from"./p-Bb5V9TQx.js";import{d as m}from"./p-DGNIsXfr.js";import{d as p}from"./p-C-v22G3g.js";import{d as f}from"./p-ByrpRZ3E.js";import{d as v}from"./p-C90lxyUX.js";import{d as h}from"./p-BKLlc2r0.js";import{d as u}from"./p-1FjgijEi.js";import{d as b}from"./p-D0MFs2Dv.js";import{d as x}from"./p-9kEZy9MP.js";import{d as k}from"./p-B1AE2j97.js";import{d as w}from"./p-ek0LNMtb.js";import{d as E}from"./p-CQzPkAVQ.js";import{d as g}from"./p-B4tpmyon.js";import{d as j}from"./p-CFacV7mg.js";import{d as y}from"./p-CEcG_ay-.js";import{d as I}from"./p-BSX4GfGg.js";import{d as C}from"./p-C8yiLtCJ.js";import{d as B}from"./p-DHzSlpJw.js";import{d as D}from"./p-DqzFuSNN.js";import{d as U}from"./p-DsSqGIBJ.js";import{d as S}from"./p-5FU3bYQ3.js";import{d as T}from"./p-DhOuB4nS.js";import{d as L}from"./p-D-X-Zcsr.js";import{d as N}from"./p-CdnjpaJt.js";import{d as G}from"./p-Bodw4NVB.js";import{d as R}from"./p-Blr31TcJ.js";import{d as F}from"./p-DreV6Npp.js";import{d as V}from"./p-Lo1dCgyv.js";import{d as z}from"./p-DFbeKrpm.js";import{d as J}from"./p-BhG0HGg6.js";import{d as M}from"./p-Bxvw_LqR.js";import{d as P}from"./p-DRP4Xxiu.js";import{d as Q}from"./p-DeAwyTxI.js";import{d as X}from"./p-CnD-TaPJ.js";import{d as Z}from"./p-PfdIkMoz.js";import{d as A}from"./p-B-ul_Soj.js";import{d as q}from"./p-DM3wePVp.js";const W=()=>`verdocs-build{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:var(--verdocs-primary-font, "Inter", "Barlow", 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{display:block;width:500px;max-width:95%;-webkit-box-sizing:border-box;box-sizing:border-box;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}`;const Y=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.cancel=t(this,"cancel");this.sdkError=t(this,"sdkError");this.stepChanged=t(this,"stepChanged");this.send=t(this,"send");this.templateUpdated=t(this,"templateUpdated");this.templateCreated=t(this,"templateCreated");this.rolesUpdated=t(this,"rolesUpdated");this.templateListenerId=null;this.endpoint=d.getDefault();this.templateId=null;this.step="preview";this.loading=true;this.template=null}onTemplateIdChanged(e,s){if(!s&&e&&this.step==="attachments"){this.step="preview"}this.loadTemplate(e).catch((e=>console.log("Unknown Error",e)))}onStepChanged(){this.loadTemplate(this.templateId).catch((e=>console.log("Unknown Error",e)))}async componentWillLoad(){var e,s,t,o,r,i;try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return}if(!this.templateId){console.log(`[BUILD] No template ID, activating upload mode`);this.step="attachments";this.loading=false;return}try{this.loadTemplate(this.templateId).catch((e=>console.log("[BUILD] Unable to load template",e)))}catch(o){console.log("[BUILD] Error loading template",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new l(o.message,(s=o.response)===null||s===void 0?void 0:s.status,(t=o.response)===null||t===void 0?void 0:t.data))}}catch(e){console.log("[BUILD] Error with builder session",e);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new l(e.message,(r=e.response)===null||r===void 0?void 0:r.status,(i=e.response)===null||i===void 0?void 0:i.data))}}async loadTemplate(e){if(e){c.subscribe("templates",this.templateId,(()=>a(this.endpoint,this.templateId)),false,(e=>{this.template=e;this.loading=false}))}}disconnectedCallback(){console.log("[BUILD] Disconnected");this.unlistenToTemplate()}unlistenToTemplate(){if(this.templateListenerId){c.store.delListener(this.templateListenerId);this.templateListenerId=null}}handleCancel(){var e;this.step="preview";(e=this.cancel)===null||e===void 0?void 0:e.emit()}async handleTemplateCreated(e){var s;await this.loadTemplate(e);this.templateId=e;this.step="roles";(s=this.stepChanged)===null||s===void 0?void 0:s.emit("roles")}async handleRolesUpdated(e){var s;console.log("[BUILD] Roloes updated",e);(s=this.templateUpdated)===null||s===void 0?void 0:s.emit(e.detail)}async handleTemplateUpdated(e){var s;console.log("[BUILD] Template updated",e);(s=this.templateUpdated)===null||s===void 0?void 0:s.emit(e.detail)}handleAttachmentsNext(){var e;this.step="roles";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("roles")}handleRolesNext(){var e;this.step="fields";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("fields")}handleStepChanged(e){var s;this.step=e;(s=this.stepChanged)===null||s===void 0?void 0:s.emit(e)}render(){if(this.loading){return o(r,{class:"loading"},o("verdocs-loader",null))}if(!this.endpoint.session){return o(r,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return o(r,null,o("div",{class:"content"},o("verdocs-template-build-tabs",{endpoint:this.endpoint,templateId:this.templateId,step:this.step,onSdkError:e=>{var s;return(s=this.sdkError)===null||s===void 0?void 0:s.emit(e.detail)},onStepChanged:e=>this.handleStepChanged(e.detail)}),this.step==="attachments"&&o("verdocs-template-attachments",{templateId:this.templateId,endpoint:this.endpoint,onExit:()=>this.handleCancel(),onNext:()=>this.handleAttachmentsNext(),onTemplateUpdated:e=>this.handleTemplateUpdated(e)}),this.step==="roles"&&o("verdocs-template-roles",{templateId:this.templateId,endpoint:this.endpoint,onExit:()=>this.handleCancel(),onNext:()=>this.handleRolesNext(),onRolesUpdated:e=>this.handleRolesUpdated(e)}),this.step==="fields"&&o("verdocs-template-fields",{templateId:this.templateId,endpoint:this.endpoint,onTemplateUpdated:e=>this.handleTemplateUpdated(e)}),this.step==="preview"&&o("div",{class:"preview-container"},o("div",{class:"preview-send-wrapper"},o("verdocs-send",{templateId:this.templateId,endpoint:this.endpoint,onSend:e=>{var s;return(s=this.send)===null||s===void 0?void 0:s.emit(e.detail)},style:{width:"100%"}})),o("div",{class:"preview-preview-wrapper"},o("verdocs-preview",{templateId:this.templateId,endpoint:this.endpoint,style:{display:"flex",flex:"1",maxWidth:"1000px"}})))))}get el(){return this}static get watchers(){return{templateId:[{onTemplateIdChanged:0}],step:[{onStepChanged:0}]}}static get style(){return W()}},[0,"verdocs-build",{endpoint:[16],templateId:[1537,"template-id"],step:[1537],loading:[32],template:[32]},undefined,{templateId:[{onTemplateIdChanged:0}],step:[{onStepChanged:0}]}]);function _(){if(typeof customElements==="undefined"){return}const e=["verdocs-build","verdocs-button","verdocs-checkbox","verdocs-component-error","verdocs-contact-picker","verdocs-dialog","verdocs-field-attachment","verdocs-field-checkbox","verdocs-field-date","verdocs-field-dropdown","verdocs-field-initial","verdocs-field-radio","verdocs-field-signature","verdocs-field-textarea","verdocs-field-textbox","verdocs-field-timestamp","verdocs-file-chooser","verdocs-flag","verdocs-help-icon","verdocs-loader","verdocs-menu-panel","verdocs-ok-dialog","verdocs-portal","verdocs-preview","verdocs-progress-bar","verdocs-select-input","verdocs-send","verdocs-spinner","verdocs-template-attachments","verdocs-template-build-tabs","verdocs-template-document-page","verdocs-template-field-properties","verdocs-template-fields","verdocs-template-role-properties","verdocs-template-roles","verdocs-text-input","verdocs-toolbar-icon","verdocs-upload-dialog"];e.forEach((e=>{switch(e){case"verdocs-build":if(!customElements.get(i(e))){customElements.define(i(e),Y)}break;case"verdocs-button":if(!customElements.get(i(e))){n()}break;case"verdocs-checkbox":if(!customElements.get(i(e))){m()}break;case"verdocs-component-error":if(!customElements.get(i(e))){p()}break;case"verdocs-contact-picker":if(!customElements.get(i(e))){f()}break;case"verdocs-dialog":if(!customElements.get(i(e))){v()}break;case"verdocs-field-attachment":if(!customElements.get(i(e))){h()}break;case"verdocs-field-checkbox":if(!customElements.get(i(e))){u()}break;case"verdocs-field-date":if(!customElements.get(i(e))){b()}break;case"verdocs-field-dropdown":if(!customElements.get(i(e))){x()}break;case"verdocs-field-initial":if(!customElements.get(i(e))){k()}break;case"verdocs-field-radio":if(!customElements.get(i(e))){w()}break;case"verdocs-field-signature":if(!customElements.get(i(e))){E()}break;case"verdocs-field-textarea":if(!customElements.get(i(e))){g()}break;case"verdocs-field-textbox":if(!customElements.get(i(e))){j()}break;case"verdocs-field-timestamp":if(!customElements.get(i(e))){y()}break;case"verdocs-file-chooser":if(!customElements.get(i(e))){I()}break;case"verdocs-flag":if(!customElements.get(i(e))){C()}break;case"verdocs-help-icon":if(!customElements.get(i(e))){B()}break;case"verdocs-loader":if(!customElements.get(i(e))){D()}break;case"verdocs-menu-panel":if(!customElements.get(i(e))){U()}break;case"verdocs-ok-dialog":if(!customElements.get(i(e))){S()}break;case"verdocs-portal":if(!customElements.get(i(e))){T()}break;case"verdocs-preview":if(!customElements.get(i(e))){L()}break;case"verdocs-progress-bar":if(!customElements.get(i(e))){N()}break;case"verdocs-select-input":if(!customElements.get(i(e))){G()}break;case"verdocs-send":if(!customElements.get(i(e))){R()}break;case"verdocs-spinner":if(!customElements.get(i(e))){F()}break;case"verdocs-template-attachments":if(!customElements.get(i(e))){V()}break;case"verdocs-template-build-tabs":if(!customElements.get(i(e))){z()}break;case"verdocs-template-document-page":if(!customElements.get(i(e))){J()}break;case"verdocs-template-field-properties":if(!customElements.get(i(e))){M()}break;case"verdocs-template-fields":if(!customElements.get(i(e))){P()}break;case"verdocs-template-role-properties":if(!customElements.get(i(e))){Q()}break;case"verdocs-template-roles":if(!customElements.get(i(e))){X()}break;case"verdocs-text-input":if(!customElements.get(i(e))){Z()}break;case"verdocs-toolbar-icon":if(!customElements.get(i(e))){A()}break;case"verdocs-upload-dialog":if(!customElements.get(i(e))){q()}break}}))}const H=Y;const K=_;export{H as VerdocsBuild,K as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=verdocs-build.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{V as o,d as s}from"./p-
|
|
1
|
+
import{V as o,d as s}from"./p-Blr31TcJ.js";const r=o;const t=s;export{r as VerdocsSend,t as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=verdocs-send.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{V as o,d as s}from"./p-
|
|
1
|
+
import{V as o,d as s}from"./p-D495hZfr.js";const r=o;const t=s;export{r as VerdocsSignFooter,t as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=verdocs-sign-footer.js.map
|