@verdocs/web-sdk 6.13.0 → 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 +47 -2
- package/dist/cjs/verdocs-preview_6.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +42 -8
- 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.css +55 -0
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +49 -1
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +43 -8
- 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-Blr31TcJ.js +2 -0
- 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 +48 -3
- package/dist/esm/verdocs-preview_6.entry.js.map +1 -1
- package/dist/esm/verdocs-sign.entry.js +42 -8
- 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 +15 -1
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +2 -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-1b818cdf.entry.js +8 -0
- package/dist/verdocs-web-sdk/p-1b818cdf.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-24dcc54e.system.entry.js +8 -0
- package/dist/verdocs-web-sdk/{p-987d5653.entry.js.map → p-24dcc54e.system.entry.js.map} +1 -1
- 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-CnUZ9w2T.js +0 -2
- package/dist/components/p-CnUZ9w2T.js.map +0 -1
- package/dist/components/p-E2hWLZ47.js +0 -2
- package/dist/components/p-E2hWLZ47.js.map +0 -1
- package/dist/verdocs-web-sdk/p-2a6a3bc6.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-2a6a3bc6.entry.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-5404f6bf.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-5404f6bf.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-788c8d67.system.entry.js +0 -8
- package/dist/verdocs-web-sdk/p-788c8d67.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-987d5653.entry.js +0 -8
- /package/dist/components/{p-BTrjJycH.js.map → p-06em1_P-.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, F as Fragment, g as getElement } from './index-CjTHbolG.js';
|
|
2
2
|
import { i as interact } from './interact.min-Bf1WXbdg.js';
|
|
3
|
-
import { VerdocsEndpoint, getTemplate, integerSequence, getBrands, getOrganization, getOrganizationContacts, isValidEmail, createEnvelope, getRGBA,
|
|
3
|
+
import { VerdocsEndpoint, getTemplate, integerSequence, getBrands, getOrganization, formatFullName, getOrganizationContacts, isValidEmail, createEnvelope, getRGBA, createTemplateDocument, deleteTemplateDocument, updateField, createField, updateTemplateRole, createTemplateRole } from '@verdocs/js-sdk';
|
|
4
4
|
import { a as renderDocumentField, g as getFieldId, h as updateCssTransform, i as removeCssTransform, j as setControlStyles, d as defaultHeight, k as defaultWidth } from './utils-Bh3zb1Xs.js';
|
|
5
5
|
import { S as SDKError } from './errors-C1sRVZWv.js';
|
|
6
6
|
import { S as Store } from './Datastore-C7hFgM52.js';
|
|
@@ -126,11 +126,12 @@ VerdocsPreview.style = verdocsPreviewCss();
|
|
|
126
126
|
const getRoleNames = (template) => ((template === null || template === void 0 ? void 0 : template.roles) || []).map(role => role.name);
|
|
127
127
|
const getRoleIndex = (template, role_name) => Math.max(getRoleNames(template).findIndex(name => name === role_name), 0);
|
|
128
128
|
|
|
129
|
-
const verdocsSendCss = () => `verdocs-send{--send-ink:var(--verdocs-body-color, #111827);--send-ink-2:#374151;--send-muted:#6b7280;--send-faint:#9ca3af;--send-rule:#e5e7eb;--send-control-border:#d1d5db;--send-accent:var(--verdocs-link-color, #4c56cb);--send-accent-tint:#f4f5fc;--send-accent-tint-2:#e6e7f8;--send-warning-bg:#fffbeb;--send-warning-border:#fde68a;--send-warning-icon:#d97706;--send-warning-text:#78350f;--send-radius:var(--verdocs-dialog-radius, 8px);--send-min-height:480px;--send-max-width:480px;display:none;position:relative;overflow:hidden;width:100%;max-width:var(--verdocs-send-max-width, var(--send-max-width));-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;color:var(--send-ink);font-size:14px;border-radius:var(--send-radius);border:1px solid var(--send-rule);font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-send *{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-send.sendable{display:block}verdocs-send .track{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:var(--send-min-height);-webkit-transition:-webkit-transform 220ms ease-out;transition:-webkit-transform 220ms ease-out;transition:transform 220ms ease-out;transition:transform 220ms ease-out, -webkit-transform 220ms ease-out}verdocs-send.detail-open .track{-webkit-transform:translateX(-100%);transform:translateX(-100%)}@media (prefers-reduced-motion: reduce){verdocs-send .track{-webkit-transition:none;transition:none}}verdocs-send .pane{padding:16px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-send .main-pane{-ms-flex:1;flex:1}verdocs-send .detail-pane{position:absolute;top:0;left:100%;bottom:0;width:100%;overflow:hidden}verdocs-send .detail{-ms-flex:1;flex:1;min-height:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-send .detail-body-wrap{position:relative;-ms-flex:1;flex:1;min-height:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-send .detail-body{-ms-flex:1;flex:1;min-height:0;overflow-y:auto}verdocs-send .scroll-fade{position:absolute;left:0;right:0;bottom:0;height:36px;opacity:0;pointer-events:none;-webkit-transition:opacity 150ms ease-out;transition:opacity 150ms ease-out;background:-webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0)), to(#ffffff));background:linear-gradient(rgba(255, 255, 255, 0), #ffffff)}verdocs-send .scrollable:not(.at-end)>.scroll-fade{opacity:1}verdocs-send .recipient-detail verdocs-contact-picker{-ms-flex:1;flex:1;min-height:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-send .section-title{font-size:12px;font-weight:600;color:var(--send-ink-2);margin:0 0 6px 0}verdocs-send .delivery-title{margin-top:16px}verdocs-send .step{font-size:11px;color:var(--send-muted);padding:10px 0 4px 0}verdocs-send .recipient,verdocs-send .kv{all:unset;display:-ms-flexbox;display:flex;width:100%;cursor:pointer;-ms-flex-align:center;align-items:center;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;border-top:1px solid var(--send-rule);color:var(--send-ink);font-family:inherit}verdocs-send .recipient:focus-visible,verdocs-send .kv:focus-visible{outline:2px solid var(--send-accent);outline-offset:-2px;border-radius:4px}verdocs-send .recipient .chevron,verdocs-send .kv .chevron{-ms-flex:0 0 16px;flex:0 0 16px;width:16px;height:16px;color:var(--send-faint)}verdocs-send .recipient .chevron svg,verdocs-send .kv .chevron svg{width:16px;height:16px;display:block}verdocs-send .recipient{padding:8px 6px 8px 0}verdocs-send .recipient:last-child{border-bottom:1px solid var(--send-rule)}verdocs-send .recipient .who{-ms-flex:1;flex:1;min-width:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-send .recipient .role-name{font-size:13px;font-weight:600}verdocs-send .recipient .who-detail{font-size:12px;color:var(--send-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-send .recipient .who-detail.configure{color:var(--send-accent);font-weight:500}verdocs-send .recipient .options{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:4px;margin-top:3px}verdocs-send .recipient .pill{height:18px;padding:0 6px;border-radius:999px;font-size:10px;font-weight:500;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;background:var(--send-accent-tint);color:var(--send-ink-2)}verdocs-send .role-dot{-ms-flex:0 0 10px;flex:0 0 10px;width:10px;height:10px;border-radius:50%;border:1px solid rgba(0, 0, 0, 0.1)}verdocs-send .kv{height:40px;padding:0 6px 0 0;font-size:13px}verdocs-send .kv:last-child{border-bottom:1px solid var(--send-rule)}verdocs-send .kv:disabled{cursor:default;color:var(--send-muted)}verdocs-send .kv .key{-ms-flex:0 0 84px;flex:0 0 84px;color:var(--send-muted)}verdocs-send .kv .value{-ms-flex:1;flex:1;min-width:0;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-send .kv .value small{font-size:inherit;font-weight:400;color:var(--send-muted)}verdocs-send .kv .value.off{color:var(--send-warning-icon)}verdocs-send .main-spacer,verdocs-send .detail-spacer{-ms-flex:1;flex:1}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:14px;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}verdocs-send .buttons .error-message{width:100%;color:#cc0000;font-size:13px;margin-bottom:10px}verdocs-send .detail-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin:-2px 0 14px 0}verdocs-send .detail-header .back{all:unset;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;cursor:pointer;font-size:13px;font-weight:500;color:var(--send-accent);font-family:inherit;-ms-flex:0 0 52px;flex:0 0 52px}verdocs-send .detail-header .back .icon,verdocs-send .detail-header .back .icon svg{width:16px;height:16px;display:block}verdocs-send .detail-header .back:focus-visible{outline:2px solid var(--send-accent);outline-offset:2px;border-radius:4px}verdocs-send .detail-header .detail-title{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;font-size:14px;font-weight:600;text-align:center}verdocs-send .detail-header .detail-header-spacer{-ms-flex:0 0 52px;flex:0 0 52px}verdocs-send .detail-footer{margin-top:10px;padding-top:12px;border-top:1px solid var(--send-rule)}verdocs-send .detail-footer verdocs-button,verdocs-send .detail-footer verdocs-button button{width:100%}verdocs-send .hint{font-size:12px;line-height:1.5;color:var(--send-muted);margin:10px 0 0 0}verdocs-send .option-list{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-send .option{all:unset;display:-ms-flexbox;display:flex;width:100%;cursor:pointer;-ms-flex-align:center;align-items:center;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;padding:10px 0;font-size:13px;font-family:inherit;color:var(--send-ink);border-top:1px solid var(--send-rule)}verdocs-send .option:first-child{border-top:0}verdocs-send .option:focus-visible{outline:2px solid var(--send-accent);outline-offset:-2px;border-radius:4px}verdocs-send .option .radio{-ms-flex:0 0 16px;flex:0 0 16px;width:16px;height:16px;border-radius:50%;border:1px solid var(--send-control-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-send .option.selected .radio{border-color:var(--send-accent)}verdocs-send .option.selected .radio::after{content:"";width:8px;height:8px;border-radius:50%;background:var(--send-accent)}verdocs-send .option .swatch{-ms-flex:0 0 22px;flex:0 0 22px;width:22px;height:22px;border-radius:5px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:9px;font-weight:700;color:#ffffff;overflow:hidden}verdocs-send .option .swatch.logo{background:#ffffff;border:1px solid var(--send-rule)}verdocs-send .option .swatch img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain;display:block}verdocs-send .option .option-label{-ms-flex:1;flex:1;min-width:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-send .option .option-label small{font-size:11px;color:var(--send-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-send .option-divider{height:0;margin:2px 0;border-top:1px solid var(--send-control-border)}verdocs-send .option-divider+.option{border-top:0}verdocs-send .hint a{color:var(--send-accent);font-weight:500;text-decoration:none;border-bottom:1px solid var(--send-accent-tint-2)}verdocs-send .hint a .icon,verdocs-send .hint a .icon svg{width:11px;height:11px;display:inline-block;vertical-align:-1px;margin-left:2px}verdocs-send .expires-field{position:relative}verdocs-send .expires-field input{width:100%;height:36px;padding:0 52px 0 10px;font-size:14px;font-family:inherit;color:var(--send-ink);background:#ffffff;border:1px solid var(--send-control-border);border-radius:6px;outline:none}verdocs-send .expires-field input:focus{border-color:var(--send-accent);-webkit-box-shadow:0 0 0 2px var(--send-accent-tint-2);box-shadow:0 0 0 2px var(--send-accent-tint-2)}verdocs-send .expires-field input::-webkit-input-placeholder{color:var(--send-faint)}verdocs-send .expires-field input::-moz-placeholder{color:var(--send-faint)}verdocs-send .expires-field input:-ms-input-placeholder{color:var(--send-faint)}verdocs-send .expires-field input::-ms-input-placeholder{color:var(--send-faint)}verdocs-send .expires-field input::placeholder{color:var(--send-faint)}verdocs-send .expires-field .suffix{position:absolute;right:10px;top:0;height:36px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-size:13px;color:var(--send-muted);pointer-events:none}verdocs-send .warning{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-top:12px;padding:10px 12px;font-size:12px;line-height:1.5;border-radius:6px;color:var(--send-warning-text);background:var(--send-warning-bg);border:1px solid var(--send-warning-border)}verdocs-send .warning>.icon{-ms-flex:0 0 18px;flex:0 0 18px;width:18px;height:18px;margin-top:1px;color:var(--send-warning-icon)}verdocs-send .warning>.icon svg{width:18px;height:18px;display:block}verdocs-send .warning a{color:var(--send-accent);font-weight:500;text-decoration:none;border-bottom:1px solid var(--send-accent-tint-2)}verdocs-send .warning a .icon,verdocs-send .warning a .icon svg{width:11px;height:11px;display:inline-block;vertical-align:-1px;margin-left:2px}verdocs-send verdocs-checkbox{display:block;padding:4px 0;font-size:13px}`;
|
|
129
|
+
const verdocsSendCss = () => `verdocs-send{--send-ink:var(--verdocs-body-color, #111827);--send-ink-2:#374151;--send-muted:#6b7280;--send-faint:#9ca3af;--send-rule:#e5e7eb;--send-control-border:#d1d5db;--send-accent:var(--verdocs-link-color, #4c56cb);--send-accent-tint:#f4f5fc;--send-accent-tint-2:#e6e7f8;--send-warning-bg:#fffbeb;--send-warning-border:#fde68a;--send-warning-icon:#d97706;--send-warning-text:#78350f;--send-radius:var(--verdocs-dialog-radius, 8px);--send-min-height:480px;--send-max-width:480px;display:none;position:relative;overflow:hidden;width:100%;max-width:var(--verdocs-send-max-width, var(--send-max-width));-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;color:var(--send-ink);font-size:14px;border-radius:var(--send-radius);border:1px solid var(--send-rule);font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-send *{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-send.sendable{display:block}verdocs-send .track{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:var(--send-min-height);-webkit-transition:-webkit-transform 220ms ease-out;transition:-webkit-transform 220ms ease-out;transition:transform 220ms ease-out;transition:transform 220ms ease-out, -webkit-transform 220ms ease-out}verdocs-send.detail-open .track{-webkit-transform:translateX(-100%);transform:translateX(-100%)}@media (prefers-reduced-motion: reduce){verdocs-send .track{-webkit-transition:none;transition:none}}verdocs-send .pane{padding:16px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-send .main-pane{-ms-flex:1;flex:1}verdocs-send .detail-pane{position:absolute;top:0;left:100%;bottom:0;width:100%;overflow:hidden}verdocs-send .detail{-ms-flex:1;flex:1;min-height:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-send .detail-body-wrap{position:relative;-ms-flex:1;flex:1;min-height:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-send .detail-body{-ms-flex:1;flex:1;min-height:0;overflow-y:auto}verdocs-send .scroll-fade{position:absolute;left:0;right:0;bottom:0;height:36px;opacity:0;pointer-events:none;-webkit-transition:opacity 150ms ease-out;transition:opacity 150ms ease-out;background:-webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0)), to(#ffffff));background:linear-gradient(rgba(255, 255, 255, 0), #ffffff)}verdocs-send .scrollable:not(.at-end)>.scroll-fade{opacity:1}verdocs-send .recipient-detail verdocs-contact-picker{-ms-flex:1;flex:1;min-height:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-send .section-title{font-size:12px;font-weight:600;color:var(--send-ink-2);margin:0 0 6px 0}verdocs-send .delivery-title{margin-top:16px}verdocs-send .step{font-size:11px;color:var(--send-muted);padding:10px 0 4px 0}verdocs-send .recipient,verdocs-send .kv{all:unset;display:-ms-flexbox;display:flex;width:100%;cursor:pointer;-ms-flex-align:center;align-items:center;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;border-top:1px solid var(--send-rule);color:var(--send-ink);font-family:inherit}verdocs-send .recipient:focus-visible,verdocs-send .kv:focus-visible{outline:2px solid var(--send-accent);outline-offset:-2px;border-radius:4px}verdocs-send .recipient .chevron,verdocs-send .kv .chevron{-ms-flex:0 0 16px;flex:0 0 16px;width:16px;height:16px;color:var(--send-faint)}verdocs-send .recipient .chevron svg,verdocs-send .kv .chevron svg{width:16px;height:16px;display:block}verdocs-send .recipient{padding:8px 6px 8px 0}verdocs-send .recipient:last-child{border-bottom:1px solid var(--send-rule)}verdocs-send .recipient .who{-ms-flex:1;flex:1;min-width:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-send .recipient .role-name{font-size:13px;font-weight:600}verdocs-send .recipient .who-detail{font-size:12px;color:var(--send-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-send .recipient .who-detail.configure{color:var(--send-accent);font-weight:500}verdocs-send .recipient .options{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:4px;margin-top:3px}verdocs-send .recipient .pill{height:18px;padding:0 6px;border-radius:999px;font-size:10px;font-weight:500;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;background:var(--send-accent-tint);color:var(--send-ink-2)}verdocs-send .role-dot{-ms-flex:0 0 10px;flex:0 0 10px;width:10px;height:10px;border-radius:50%;border:1px solid rgba(0, 0, 0, 0.1)}verdocs-send .kv{height:40px;padding:0 6px 0 0;font-size:13px}verdocs-send .kv:last-child{border-bottom:1px solid var(--send-rule)}verdocs-send .kv:disabled{cursor:default;color:var(--send-muted)}verdocs-send .kv .key{-ms-flex:0 0 84px;flex:0 0 84px;color:var(--send-muted)}verdocs-send .kv .value{-ms-flex:1;flex:1;min-width:0;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-send .kv .value small{font-size:inherit;font-weight:400;color:var(--send-muted)}verdocs-send .kv .value.off{color:var(--send-warning-icon)}verdocs-send .main-spacer,verdocs-send .detail-spacer{-ms-flex:1;flex:1}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:14px;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}verdocs-send .buttons .error-message{width:100%;color:#cc0000;font-size:13px;margin-bottom:10px}verdocs-send .detail-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin:-2px 0 14px 0}verdocs-send .detail-header .back{all:unset;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;cursor:pointer;font-size:13px;font-weight:500;color:var(--send-accent);font-family:inherit;-ms-flex:0 0 52px;flex:0 0 52px}verdocs-send .detail-header .back .icon,verdocs-send .detail-header .back .icon svg{width:16px;height:16px;display:block}verdocs-send .detail-header .back:focus-visible{outline:2px solid var(--send-accent);outline-offset:2px;border-radius:4px}verdocs-send .detail-header .detail-title{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;font-size:14px;font-weight:600;text-align:center}verdocs-send .detail-header .detail-header-spacer{-ms-flex:0 0 52px;flex:0 0 52px}verdocs-send .detail-footer{margin-top:10px;padding-top:12px;border-top:1px solid var(--send-rule)}verdocs-send .detail-footer verdocs-button,verdocs-send .detail-footer verdocs-button button{width:100%}verdocs-send .hint{font-size:12px;line-height:1.5;color:var(--send-muted);margin:10px 0 0 0}verdocs-send .option-list{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-send .option{all:unset;display:-ms-flexbox;display:flex;width:100%;cursor:pointer;-ms-flex-align:center;align-items:center;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;padding:10px 0;font-size:13px;font-family:inherit;color:var(--send-ink);border-top:1px solid var(--send-rule)}verdocs-send .option:first-child{border-top:0}verdocs-send .option:focus-visible{outline:2px solid var(--send-accent);outline-offset:-2px;border-radius:4px}verdocs-send .option .radio{-ms-flex:0 0 16px;flex:0 0 16px;width:16px;height:16px;border-radius:50%;border:1px solid var(--send-control-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-send .option.selected .radio{border-color:var(--send-accent)}verdocs-send .option.selected .radio::after{content:"";width:8px;height:8px;border-radius:50%;background:var(--send-accent)}verdocs-send .option .swatch{-ms-flex:0 0 22px;flex:0 0 22px;width:22px;height:22px;border-radius:5px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:9px;font-weight:700;color:#ffffff;overflow:hidden}verdocs-send .option .swatch.logo{background:#ffffff;border:1px solid var(--send-rule)}verdocs-send .option .swatch img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain;display:block}verdocs-send .option .option-label{-ms-flex:1;flex:1;min-width:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-send .option .option-label small{font-size:11px;color:var(--send-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-send .option-divider{height:0;margin:2px 0;border-top:1px solid var(--send-control-border)}verdocs-send .option-divider+.option{border-top:0}verdocs-send .hint a{color:var(--send-accent);font-weight:500;text-decoration:none;border-bottom:1px solid var(--send-accent-tint-2)}verdocs-send .hint a .icon,verdocs-send .hint a .icon svg{width:11px;height:11px;display:inline-block;vertical-align:-1px;margin-left:2px}verdocs-send .expires-field{position:relative}verdocs-send .expires-field input{width:100%;height:36px;padding:0 52px 0 10px;font-size:14px;font-family:inherit;color:var(--send-ink);background:#ffffff;border:1px solid var(--send-control-border);border-radius:6px;outline:none}verdocs-send .expires-field input:focus{border-color:var(--send-accent);-webkit-box-shadow:0 0 0 2px var(--send-accent-tint-2);box-shadow:0 0 0 2px var(--send-accent-tint-2)}verdocs-send .expires-field input::-webkit-input-placeholder{color:var(--send-faint)}verdocs-send .expires-field input::-moz-placeholder{color:var(--send-faint)}verdocs-send .expires-field input:-ms-input-placeholder{color:var(--send-faint)}verdocs-send .expires-field input::-ms-input-placeholder{color:var(--send-faint)}verdocs-send .expires-field input::placeholder{color:var(--send-faint)}verdocs-send .expires-field .suffix{position:absolute;right:10px;top:0;height:36px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-size:13px;color:var(--send-muted);pointer-events:none}verdocs-send .sender-field{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;row-gap:4px;margin:0 0 10px 0}verdocs-send .sender-field label{font-size:12px;font-weight:500;color:var(--send-ink-2)}verdocs-send .sender-field input{width:100%;height:36px;padding:0 10px;font-size:14px;font-family:inherit;color:var(--send-ink);background:#ffffff;border:1px solid var(--send-control-border);border-radius:6px;outline:none}verdocs-send .sender-field input:focus{border-color:var(--send-accent);-webkit-box-shadow:0 0 0 2px var(--send-accent-tint-2);box-shadow:0 0 0 2px var(--send-accent-tint-2)}verdocs-send .sender-field .field-error{font-size:12px;color:#cc0000}verdocs-send .notice{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-top:4px;padding:10px 12px;font-size:12px;line-height:1.5;border-radius:6px;color:var(--send-ink-2);background:var(--send-accent-tint);border:1px solid var(--send-accent-tint-2)}verdocs-send .notice>.icon{-ms-flex:0 0 18px;flex:0 0 18px;width:18px;height:18px;margin-top:1px;color:var(--send-accent)}verdocs-send .notice>.icon svg{width:18px;height:18px;display:block}verdocs-send .warning{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-top:12px;padding:10px 12px;font-size:12px;line-height:1.5;border-radius:6px;color:var(--send-warning-text);background:var(--send-warning-bg);border:1px solid var(--send-warning-border)}verdocs-send .warning>.icon{-ms-flex:0 0 18px;flex:0 0 18px;width:18px;height:18px;margin-top:1px;color:var(--send-warning-icon)}verdocs-send .warning>.icon svg{width:18px;height:18px;display:block}verdocs-send .warning a{color:var(--send-accent);font-weight:500;text-decoration:none;border-bottom:1px solid var(--send-accent-tint-2)}verdocs-send .warning a .icon,verdocs-send .warning a .icon svg{width:11px;height:11px;display:inline-block;vertical-align:-1px;margin-left:2px}verdocs-send verdocs-checkbox{display:block;padding:4px 0;font-size:13px}`;
|
|
130
130
|
|
|
131
131
|
const chevronRightIcon = '<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>';
|
|
132
132
|
const chevronLeftIcon = '<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>';
|
|
133
133
|
const warningIcon = '<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>';
|
|
134
|
+
const infoIcon = '<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>';
|
|
134
135
|
const externalLinkIcon = '<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>';
|
|
135
136
|
const VERDOCS_LOGO_URL = 'https://app.verdocs.com/assets/blue-logo.svg';
|
|
136
137
|
// Swipe mechanics for mobile users in detail views
|
|
@@ -193,6 +194,9 @@ const VerdocsSend = class {
|
|
|
193
194
|
this.organization = null;
|
|
194
195
|
this.expiresInDays = '';
|
|
195
196
|
this.noContact = false;
|
|
197
|
+
this.senderDefaults = { name: '', email: '' };
|
|
198
|
+
this.senderName = '';
|
|
199
|
+
this.senderEmail = '';
|
|
196
200
|
this.rolesCompleted = {};
|
|
197
201
|
this.loading = true;
|
|
198
202
|
this.template = null;
|
|
@@ -284,6 +288,29 @@ const VerdocsSend = class {
|
|
|
284
288
|
this.brandKey = '';
|
|
285
289
|
this.expiresInDays = '';
|
|
286
290
|
this.noContact = false;
|
|
291
|
+
this.senderName = '';
|
|
292
|
+
this.senderEmail = '';
|
|
293
|
+
}
|
|
294
|
+
// The sender_name defaults to the custom sender identity if configued/active, the brand
|
|
295
|
+
// next, and then the org name.
|
|
296
|
+
brandSenderName() {
|
|
297
|
+
var _a;
|
|
298
|
+
const brand = this.brandKey ? this.brands.find(b => b.key === this.brandKey) : this.getDefaultBrand();
|
|
299
|
+
return (brand === null || brand === void 0 ? void 0 : brand.email_display_name) || (brand === null || brand === void 0 ? void 0 : brand.email_sender_name) || ((_a = this.organization) === null || _a === void 0 ? void 0 : _a.name) || '';
|
|
300
|
+
}
|
|
301
|
+
effectiveSenderName() {
|
|
302
|
+
return this.senderName || this.brandSenderName();
|
|
303
|
+
}
|
|
304
|
+
effectiveSenderEmail() {
|
|
305
|
+
return this.senderEmail || this.senderDefaults.email;
|
|
306
|
+
}
|
|
307
|
+
senderOverrides() {
|
|
308
|
+
const name = this.senderName.trim();
|
|
309
|
+
const email = this.senderEmail.trim();
|
|
310
|
+
return {
|
|
311
|
+
sender_name: name && name !== this.brandSenderName() ? name : undefined,
|
|
312
|
+
sender_email: email && email !== this.senderDefaults.email ? email : undefined,
|
|
313
|
+
};
|
|
287
314
|
}
|
|
288
315
|
onTemplateIdChanged(newTemplateId) {
|
|
289
316
|
console.log('[SEND] Template ID changed', newTemplateId);
|
|
@@ -304,6 +331,7 @@ const VerdocsSend = class {
|
|
|
304
331
|
phone: profile.phone,
|
|
305
332
|
};
|
|
306
333
|
if (profile) {
|
|
334
|
+
this.senderDefaults = { name: formatFullName(profile), email: profile.email || '' };
|
|
307
335
|
this.sessionContacts = [me];
|
|
308
336
|
getOrganizationContacts(this.endpoint)
|
|
309
337
|
.then(contacts => {
|
|
@@ -448,6 +476,13 @@ const VerdocsSend = class {
|
|
|
448
476
|
expires_at: this.expiresAt().toISOString(),
|
|
449
477
|
};
|
|
450
478
|
details.no_contact = this.noContact;
|
|
479
|
+
const { sender_name, sender_email } = this.senderOverrides();
|
|
480
|
+
if (sender_name) {
|
|
481
|
+
details.sender_name = sender_name;
|
|
482
|
+
}
|
|
483
|
+
if (sender_email) {
|
|
484
|
+
details.sender_email = sender_email;
|
|
485
|
+
}
|
|
451
486
|
if (this.brandKey) {
|
|
452
487
|
details.brand_key = this.brandKey;
|
|
453
488
|
}
|
|
@@ -549,6 +584,14 @@ const VerdocsSend = class {
|
|
|
549
584
|
h("p", { class: "hint" }, "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, "."),
|
|
550
585
|
]), this.renderDoneButton()));
|
|
551
586
|
}
|
|
587
|
+
renderSenderView() {
|
|
588
|
+
const validEmail = !this.senderEmail.trim() || isValidEmail(this.senderEmail.trim());
|
|
589
|
+
return (h("div", { class: "detail" }, this.renderDetailHeader('Sender'), this.renderDetailBody([
|
|
590
|
+
h("div", { class: "sender-field" }, h("label", { htmlFor: `${this.containerId}-sender-name` }, "Name"), h("input", { id: `${this.containerId}-sender-name`, type: "text", value: this.effectiveSenderName(), disabled: this.sending, onInput: (e) => (this.senderName = e.target.value) })),
|
|
591
|
+
h("div", { class: "sender-field" }, h("label", { htmlFor: `${this.containerId}-sender-email` }, "Email"), h("input", { id: `${this.containerId}-sender-email`, type: "email", value: this.effectiveSenderEmail(), disabled: this.sending, onInput: (e) => (this.senderEmail = e.target.value) }), !validEmail && h("div", { class: "field-error" }, "Enter a valid email address.")),
|
|
592
|
+
h("div", { class: "notice" }, h("span", { class: "icon", innerHTML: infoIcon }), h("div", null, "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 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.")),
|
|
593
|
+
]), this.renderDoneButton()));
|
|
594
|
+
}
|
|
552
595
|
renderNotificationsView() {
|
|
553
596
|
return (h("div", { class: "detail" }, this.renderDetailHeader('Notifications'), this.renderDetailBody([
|
|
554
597
|
h("verdocs-checkbox", { size: "small", label: "Disable notifications", checked: this.noContact, onInput: (e) => (this.noContact = !!e.target.checked) }),
|
|
@@ -565,6 +608,8 @@ const VerdocsSend = class {
|
|
|
565
608
|
return this.renderExpiresView();
|
|
566
609
|
case 'notifications':
|
|
567
610
|
return this.renderNotificationsView();
|
|
611
|
+
case 'sender':
|
|
612
|
+
return this.renderSenderView();
|
|
568
613
|
default:
|
|
569
614
|
return null;
|
|
570
615
|
}
|
|
@@ -593,7 +638,7 @@ const VerdocsSend = class {
|
|
|
593
638
|
const optionLabels = this.getRecipientOptionLabels(completed);
|
|
594
639
|
return (h("button", { type: "button", class: "recipient", "data-ri": roleIndex, "data-rn": role.role_name, onClick: e => this.handleClickRole(e, role) }, h("span", { class: "role-dot", style: { backgroundColor: getRGBA(roleIndex) } }), h("span", { class: "who" }, h("span", { class: "role-name" }, role.role_name), assigned ? (h("span", { class: "who-detail" }, formatFullName(completed), " \u00B7 ", completed.email)) : (h("span", { class: "who-detail configure" }, "Configure recipient")), optionLabels.length > 0 && (h("span", { class: "options" }, optionLabels.map(label => (h("span", { class: "pill" }, label)))))), h("span", { class: "chevron", innerHTML: chevronRightIcon })));
|
|
595
640
|
}),
|
|
596
|
-
])), h("div", { class: "section-title delivery-title" }, "Delivery"), h("div", { class: "delivery" }, h("button", { type: "button", class: "kv", onClick: () => this.showView('brand'), disabled: this.sending }, h("span", { class: "key" }, "Brand"), h("span", { class: "value" }, this.getSelectedBrandLabel()), h("span", { class: "chevron", innerHTML: chevronRightIcon })), h("button", { type: "button", class: "kv", onClick: () => this.showView('expires'), disabled: this.sending }, h("span", { class: "key" }, "Expires"), h("span", { class: "value" }, this.effectiveExpiryDays(), " days ", h("small", null, "\u00B7 ", expiresShort)), h("span", { class: "chevron", innerHTML: chevronRightIcon })), h("button", { type: "button", class: "kv", onClick: () => this.showView('notifications'), disabled: this.sending }, h("span", { class: "key" }, "Notifications"), h("span", { class: { value: true, off: this.noContact } }, this.noContact ? 'Off' : 'On'), h("span", { class: "chevron", innerHTML: chevronRightIcon }))), h("div", { class: "main-spacer" }), h("div", { class: "buttons" }, hasDuplicateEmails && h("div", { class: "error-message" }, "Recipients cannot share the same email."), this.sending && h("verdocs-spinner", null), this.showCancel && h("verdocs-button", { label: "Cancel", size: "small", variant: "outline", onClick: e => this.handleCancel(e), disabled: this.sending }), h("verdocs-button", { label: "Send", size: "small", disabled: !allRolesAssigned || this.sending || hasDuplicateEmails, onClick: e => this.handleSend(e) }))), h("div", { class: "pane detail-pane", "aria-hidden": this.view === 'main' ? 'true' : 'false', onPointerDown: e => this.handleSwipeStart(e), onPointerUp: e => this.handleSwipeEnd(e), onPointerCancel: () => (this.swipeStart = null) }, this.renderDetail()))));
|
|
641
|
+
])), h("div", { class: "section-title delivery-title" }, "Delivery"), h("div", { class: "delivery" }, h("button", { type: "button", class: "kv", onClick: () => this.showView('brand'), disabled: this.sending }, h("span", { class: "key" }, "Brand"), h("span", { class: "value" }, this.getSelectedBrandLabel()), h("span", { class: "chevron", innerHTML: chevronRightIcon })), h("button", { type: "button", class: "kv", onClick: () => this.showView('expires'), disabled: this.sending }, h("span", { class: "key" }, "Expires"), h("span", { class: "value" }, this.effectiveExpiryDays(), " days ", h("small", null, "\u00B7 ", expiresShort)), h("span", { class: "chevron", innerHTML: chevronRightIcon })), h("button", { type: "button", class: "kv", onClick: () => this.showView('sender'), disabled: this.sending }, h("span", { class: "key" }, "Sender"), h("span", { class: "value" }, this.effectiveSenderName() || this.effectiveSenderEmail(), this.effectiveSenderName() && this.effectiveSenderEmail() ? h("small", null, " \u00B7 ", this.effectiveSenderEmail()) : null), h("span", { class: "chevron", innerHTML: chevronRightIcon })), h("button", { type: "button", class: "kv", onClick: () => this.showView('notifications'), disabled: this.sending }, h("span", { class: "key" }, "Notifications"), h("span", { class: { value: true, off: this.noContact } }, this.noContact ? 'Off' : 'On'), h("span", { class: "chevron", innerHTML: chevronRightIcon }))), h("div", { class: "main-spacer" }), h("div", { class: "buttons" }, hasDuplicateEmails && h("div", { class: "error-message" }, "Recipients cannot share the same email."), this.sending && h("verdocs-spinner", null), this.showCancel && h("verdocs-button", { label: "Cancel", size: "small", variant: "outline", onClick: e => this.handleCancel(e), disabled: this.sending }), h("verdocs-button", { label: "Send", size: "small", disabled: !allRolesAssigned || this.sending || hasDuplicateEmails, onClick: e => this.handleSend(e) }))), h("div", { class: "pane detail-pane", "aria-hidden": this.view === 'main' ? 'true' : 'false', onPointerDown: e => this.handleSwipeStart(e), onPointerUp: e => this.handleSwipeEnd(e), onPointerCancel: () => (this.swipeStart = null) }, this.renderDetail()))));
|
|
597
642
|
}
|
|
598
643
|
get el() { return getElement(this); }
|
|
599
644
|
static get watchers() { return {
|