@hubsync/esign-web-sdk 6.5.5 → 6.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-passcode-dialog.verdocs-signing-progress.verdocs-view.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-adopt-signature-dialog_8.cjs.entry.js +3 -9
- package/dist/cjs/verdocs-field-attachment_11.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +6 -2
- package/dist/cjs/verdocs-ok-dialog.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +130 -33
- package/dist/cjs/verdocs-sign.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js +6 -2
- package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js.map +1 -1
- package/dist/collection/components/dialogs/verdocs-signing-progress/verdocs-signing-progress.js +5 -11
- package/dist/collection/components/dialogs/verdocs-signing-progress/verdocs-signing-progress.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +134 -34
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-radio/verdocs-field-radio.css +4 -5
- package/dist/components/{p-DfItspZ0.js → p-1MIt5Mm9.js} +7 -7
- package/dist/components/{p-DfItspZ0.js.map → p-1MIt5Mm9.js.map} +1 -1
- package/dist/components/{p-RIeHu5V1.js → p-BBCbRcjI.js} +3 -3
- package/dist/components/{p-RIeHu5V1.js.map → p-BBCbRcjI.js.map} +1 -1
- package/dist/components/{p-LfDLlp5r.js → p-BvPd1sPA.js} +3 -3
- package/dist/components/p-BvPd1sPA.js.map +1 -0
- package/dist/components/{p-4olD14NA.js → p-By4lLDL5.js} +3 -3
- package/dist/components/{p-4olD14NA.js.map → p-By4lLDL5.js.map} +1 -1
- package/dist/components/{p-CMpYlbLu.js → p-C3q4mHaq.js} +4 -4
- package/dist/components/{p-CMpYlbLu.js.map → p-C3q4mHaq.js.map} +1 -1
- package/dist/components/{p-B-ZoFCli.js → p-CY3peFvA.js} +5 -11
- package/dist/components/p-CY3peFvA.js.map +1 -0
- package/dist/components/{p-BAwv4SNb.js → p-Cz6Y5nA8.js} +3 -3
- package/dist/components/{p-BAwv4SNb.js.map → p-Cz6Y5nA8.js.map} +1 -1
- package/dist/components/{p-Q4A8au3E.js → p-D3-Ing_B.js} +7 -7
- package/dist/components/{p-Q4A8au3E.js.map → p-D3-Ing_B.js.map} +1 -1
- package/dist/components/{p-CUrnqIyl.js → p-DnuBWvuE.js} +8 -4
- package/dist/components/p-DnuBWvuE.js.map +1 -0
- package/dist/components/{p-oa9K_bbZ.js → p-Dz20noaY.js} +6 -6
- package/dist/components/{p-oa9K_bbZ.js.map → p-Dz20noaY.js.map} +1 -1
- package/dist/components/verdocs-build.js +8 -8
- package/dist/components/verdocs-envelope-sidebar.js +1 -1
- package/dist/components/verdocs-field-attachment.js +1 -1
- package/dist/components/verdocs-field-radio.js +1 -1
- package/dist/components/verdocs-ok-dialog.js +1 -1
- package/dist/components/verdocs-preview.js +1 -1
- package/dist/components/verdocs-sign.js +136 -36
- package/dist/components/verdocs-sign.js.map +1 -1
- package/dist/components/verdocs-signing-progress.js +1 -1
- package/dist/components/verdocs-template-attachments.js +1 -1
- package/dist/components/verdocs-template-document-page.js +1 -1
- package/dist/components/verdocs-template-fields.js +1 -1
- package/dist/components/verdocs-templates-list.js +1 -1
- package/dist/components/verdocs-upload-dialog.js +1 -1
- package/dist/components/verdocs-view.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-passcode-dialog.verdocs-signing-progress.verdocs-view.entry.js.map +1 -1
- package/dist/esm/verdocs-adopt-signature-dialog_8.entry.js +3 -9
- package/dist/esm/verdocs-field-attachment_11.entry.js +1 -1
- package/dist/esm/verdocs-ok-dialog.entry.js +6 -2
- package/dist/esm/verdocs-ok-dialog.entry.js.map +1 -1
- package/dist/esm/verdocs-sign.entry.js +130 -33
- 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-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-passcode-dialog.verdocs-signing-progress.verdocs-view.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-adopt-signature-dialog_8.entry.js +1 -1
- package/dist/esm-es5/verdocs-adopt-signature-dialog_8.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-field-attachment_11.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment_11.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-ok-dialog.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/dialogs/verdocs-signing-progress/verdocs-signing-progress.d.ts +2 -2
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +8 -1
- package/dist/types/components.d.ts +4 -4
- package/dist/verdocs-web-sdk/p-38577511.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-38577511.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-1b63fe0b.entry.js → p-3e12a9d6.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-3e12a9d6.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-615e3533.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-615e3533.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-2db89a87.system.entry.js → p-7389986e.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-2db89a87.system.entry.js.map → p-7389986e.system.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-e0253fa3.entry.js → p-7a2be757.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-e0253fa3.entry.js.map → p-7a2be757.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-f24d6c61.system.entry.js → p-8777a11b.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-8777a11b.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-9e9fdb1a.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-9e9fdb1a.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
- package/dist/verdocs-web-sdk/p-Bcp-PA2y.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-CnRDNxzf.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-f624338c.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-f624338c.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-gUJxKxOG.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-DixucIng.system.js.map → p-qKdY3jhy.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-passcode-dialog.verdocs-signing-progress.verdocs-view.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-ok-dialog.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-sign.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +2 -2
- package/dist/components/p-B-ZoFCli.js.map +0 -1
- package/dist/components/p-CUrnqIyl.js.map +0 -1
- package/dist/components/p-LfDLlp5r.js.map +0 -1
- package/dist/verdocs-web-sdk/p-1UWKyp9k.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-1b63fe0b.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-36950fda.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-36950fda.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-3c05be8a.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-3c05be8a.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-CrAB6I_0.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-D85w8lT9.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-bac24b35.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-bac24b35.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-f24d6c61.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-f551f8e0.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-f551f8e0.system.entry.js.map +0 -1
|
@@ -4469,19 +4469,13 @@ const VerdocsSigningProgress = class {
|
|
|
4469
4469
|
if (this.mode === 'start') {
|
|
4470
4470
|
return index.h("div", { class: "field-label" }, this.fieldLabel);
|
|
4471
4471
|
}
|
|
4472
|
-
if (this.fieldCompleted) {
|
|
4473
|
-
return (index.h("div", { class: "field-completed" }, index.h("div", { class: "icon" }, this.renderSuccessIcon()), index.h("span", { class: "text" }, "Ready to submit.")));
|
|
4474
|
-
}
|
|
4475
4472
|
return index.h("div", { class: "field-label" }, this.fieldLabel);
|
|
4476
4473
|
}
|
|
4477
4474
|
renderFooter() {
|
|
4478
4475
|
if (this.mode === 'start') {
|
|
4479
4476
|
return (index.h("button", { class: "btn start", onClick: () => this.started.emit() }, "Start Signing"));
|
|
4480
4477
|
}
|
|
4481
|
-
return (index.h("div", { class: "nav-buttons" }, this.
|
|
4482
|
-
index.h("button", { class: "btn previous", disabled: this.current <= 1, onClick: () => this.previous.emit() }, "Previous"),
|
|
4483
|
-
index.h("button", { class: "btn next", disabled: this.current >= this.total, onClick: () => this.next.emit() }, "Next"),
|
|
4484
|
-
])));
|
|
4478
|
+
return (index.h("div", { class: "nav-buttons" }, index.h("button", { class: "btn previous", disabled: this.current <= 1, onClick: () => this.previous.emit() }, "Previous"), index.h("button", { class: "btn next", disabled: this.current >= this.total, onClick: () => this.next.emit() }, "Next")));
|
|
4485
4479
|
}
|
|
4486
4480
|
renderCompleted() {
|
|
4487
4481
|
return (index.h("div", { class: "card completed" }, index.h("div", { class: "header-completed" }, index.h("div", { class: "icon" }, this.renderSuccessIcon()), "Ready to Submit"), index.h("div", { class: "description" }, "You have entered all requested signatures. Select Submit to complete the signing process."), index.h("div", { class: "separator" }), index.h("button", { class: "btn submit", onClick: () => this.exit.emit() }, "Submit")));
|
|
@@ -4492,8 +4486,8 @@ const VerdocsSigningProgress = class {
|
|
|
4492
4486
|
}
|
|
4493
4487
|
return (index.h("div", { class: "card" }, index.h("div", { class: "header" }, this.progress
|
|
4494
4488
|
? [
|
|
4495
|
-
index.h("div", { class: "progress-line" }, this.progress.required.
|
|
4496
|
-
this.progress.optional.total > 0 ? (index.h("div", { class: "progress-line optional" }, this.progress.optional.
|
|
4489
|
+
index.h("div", { class: "progress-line" }, this.progress.required.filled, " of ", this.progress.required.total, " required fields completed"),
|
|
4490
|
+
this.progress.optional.total > 0 ? (index.h("div", { class: "progress-line optional" }, this.progress.optional.filled, " of ", this.progress.optional.total, " optional fields completed")) : null,
|
|
4497
4491
|
]
|
|
4498
4492
|
: this.remainingFields && this.remainingFields.length > 0
|
|
4499
4493
|
? `${this.remainingFields.length} fields remaining`
|
|
@@ -679,7 +679,7 @@ const VerdocsFieldInitial = class {
|
|
|
679
679
|
};
|
|
680
680
|
VerdocsFieldInitial.style = verdocsFieldInitialCss;
|
|
681
681
|
|
|
682
|
-
const verdocsFieldRadioCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-radio{font-family:var(--verdocs-primary-font, \"Inter\", \"Barlow\", sans-serif);width:14px;height:14px;display:block;font-size:11px;position:relative;scroll-margin:20px 0;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left
|
|
682
|
+
const verdocsFieldRadioCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-radio{font-family:var(--verdocs-primary-font, \"Inter\", \"Barlow\", sans-serif);width:14px;height:14px;display:block;font-size:11px;position:relative;scroll-margin:20px 0;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-radio.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-radio svg{margin-top:4px}verdocs-field-radio.disabled.done{opacity:1}verdocs-field-radio div.label{top:0;left:16px;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-radius:2px;white-space:nowrap}verdocs-field-radio div.group{top:14px;left:-1px;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#bb0589;border-bottom-left-radius:2px;border-bottom-right-radius:2px}verdocs-field-radio input{cursor:inherit}verdocs-field-radio.disabled input{opacity:0.5}verdocs-field-radio.done input[type=radio]{margin:0;padding:0;width:10px;height:10px}verdocs-field-radio:not(.done) input[type=radio]{position:absolute;opacity:0}verdocs-field-radio:not(.done) input[type=radio]+label:before{content:\"\";border-radius:100%;border:1px solid rgba(0, 0, 0, 0.6);display:inline-block;width:12px;height:12px;position:absolute;left:1px;top:1px;cursor:pointer;text-align:center;-webkit-transition:all 250ms ease;transition:all 250ms ease}verdocs-field-radio:not(.done) input[type=radio]:checked+label:before{background-color:#55bc81;-webkit-box-shadow:inset 0 0 0 2px #f5f5fa;box-shadow:inset 0 0 0 2px #f5f5fa}verdocs-field-radio:not(.done) input[type=radio]:focus+label:before{outline:none;border-color:#55bc81}verdocs-field-radio:not(.done) input[type=radio]:disabled+label:before{-webkit-box-shadow:inset 0 0 0 4px #f5f5fa;box-shadow:inset 0 0 0 4px #f5f5fa;border-color:#f3f3fc;background:#f3f3fc}verdocs-field-radio:not(.done) input[type=radio]+label:empty:before{margin-right:0}verdocs-field-radio.required{border:1px solid var(--verdocs-required-field-border)}verdocs-field-radio.hide{display:none}verdocs-field-radio.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-radio verdocs-button-panel{margin-left:-20px;margin-top:-7px;-webkit-transform:scale(0.7);transform:scale(0.7)}verdocs-field-radio .settings-icon{position:absolute;top:-6px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-radio .settings-icon svg{fill:#707ae5}verdocs-field-radio .settings-icon:hover{opacity:1}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}";
|
|
683
683
|
|
|
684
684
|
const RadioIconUnselected = `<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg>`;
|
|
685
685
|
const RadioIconSelected = `<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg>`;
|
|
@@ -37,13 +37,17 @@ const VerdocsOkDialog = class {
|
|
|
37
37
|
// We need a separate event handler for clicking the background because it can receive events "through" other child components
|
|
38
38
|
handleDismiss(e) {
|
|
39
39
|
this.closed = true;
|
|
40
|
-
if (e.target.className === 'background-overlay') {
|
|
40
|
+
if (e && e.target && e.target.className === 'background-overlay') {
|
|
41
41
|
e.preventDefault();
|
|
42
42
|
this.exit.emit();
|
|
43
43
|
}
|
|
44
|
+
else {
|
|
45
|
+
// For X button click, treat it the same as OK button
|
|
46
|
+
this.handleOk();
|
|
47
|
+
}
|
|
44
48
|
}
|
|
45
49
|
render() {
|
|
46
|
-
return (index.h("verdocs-dialog", { key: '
|
|
50
|
+
return (index.h("verdocs-dialog", { key: 'ff7b556af3b2606225660a1889aae6e5b33813a5', onExit: e => this.handleDismiss(e) }, index.h("div", { key: '6bfc4858cadf223f7ae4279363d19ab480d53289', slot: "heading", class: "heading" }, index.h("div", { key: '1300fb84b5c72b49bc52fa026d5b5f8c9f683733', class: "icon" }, index.h("svg", { key: '52da497c35a04565ce08b7b27a0103adee373074', width: "22", height: "19", viewBox: "0 0 22 19", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("g", { key: '23e3e4608d6950b6e40a0ced6f60876d14469f8e', "clip-path": "url(#clip0_34208_4881)" }, index.h("path", { key: '7eda7671b1c96eb6a7b731c9bb90cae5ce23edf3', d: "M3.125 0.75C1.88398 0.75 0.875 1.75898 0.875 3V16.5C0.875 17.741 1.88398 18.75 3.125 18.75H12.125C13.366 18.75 14.375 17.741 14.375 16.5V15.8215C14.2801 15.8602 14.1852 15.8918 14.0867 15.9164L11.9738 16.4437C11.8684 16.4684 11.7629 16.4859 11.6574 16.493C11.6258 16.4965 11.5941 16.5 11.5625 16.5H9.3125C9.09805 16.5 8.90469 16.3805 8.80977 16.1906L8.50039 15.5684C8.44062 15.4488 8.32109 15.375 8.19102 15.375C8.06094 15.375 7.93789 15.4488 7.88164 15.5684L7.57227 16.1906C7.47031 16.398 7.24883 16.5211 7.02031 16.5C6.7918 16.4789 6.59492 16.3207 6.53164 16.1027L5.9375 14.1445L5.59297 15.2977C5.37852 16.0113 4.72109 16.5 3.97578 16.5H3.6875C3.37812 16.5 3.125 16.2469 3.125 15.9375C3.125 15.6281 3.37812 15.375 3.6875 15.375H3.97578C4.22539 15.375 4.44336 15.2133 4.51367 14.9742L5.0375 13.234C5.15703 12.8367 5.52266 12.5625 5.9375 12.5625C6.35234 12.5625 6.71797 12.8367 6.8375 13.234L7.24531 14.591C7.50547 14.373 7.83594 14.25 8.1875 14.25C8.74648 14.25 9.25625 14.5664 9.50586 15.0656L9.66055 15.375H9.97344C9.86445 15.0656 9.84336 14.7281 9.92422 14.3977L10.4516 12.2848C10.55 11.8875 10.7539 11.5289 11.0422 11.2406L14.375 7.90781V6.375H9.875C9.25273 6.375 8.75 5.87227 8.75 5.25V0.75H3.125ZM9.875 0.75V5.25H14.375L9.875 0.75ZM20.2039 5.66133C19.6555 5.11289 18.766 5.11289 18.2141 5.66133L17.1805 6.69492L19.6766 9.19102L20.7102 8.15742C21.2586 7.60898 21.2586 6.71953 20.7102 6.16758L20.2039 5.66133ZM11.8402 12.0352C11.6961 12.1793 11.5941 12.3586 11.5449 12.559L11.0176 14.6719C10.9684 14.8652 11.0246 15.0656 11.1652 15.2063C11.3059 15.3469 11.5062 15.4031 11.6996 15.3539L13.8125 14.8266C14.0094 14.7773 14.1922 14.6754 14.3363 14.5312L18.8785 9.98555L16.3824 7.48945L11.8402 12.0352Z", fill: "white" })), index.h("defs", { key: '38d1c5c31a6c9118290b83212379703ef69ce774' }, index.h("clipPath", { key: '265e55b6ccd6c7f4ab531dad0fccc531e55c3db0', id: "clip0_34208_4881" }, index.h("path", { key: 'd5bc6581f3b9032b1e3c244940ba77195bccef21', d: "M0.875 0.75H21.125V18.75H0.875V0.75Z", fill: "white" }))))), index.h("div", { key: 'fc38f8f671154450bb4939991af22aba25b62cc5', class: "title" }, " ", this.heading)), index.h("div", { key: '49793f431faf0a0c90b98f64a0e6ca517c66d1b6', slot: "content", class: "content", innerHTML: this.message }), index.h("div", { key: '313e428b62bd8ae4413bf7b231e943018c5e8a71', class: "footer", slot: "footer" }, index.h("div", { key: '6d44f94ce1ce3d0934909e91599e19974f70438c', class: "buttons" }, this.showCancel && (index.h("button", { key: '7ac7d0ea22202dec3f2c6f5df61cbd52069e5d0b', class: "cancel", onClick: () => this.handleCancel() }, "Cancel")), index.h("button", { key: '691f98cf0bb08d71616b80ef833e5ff551a9a870', class: !this.showCancel ? 'ok single' : 'ok', onClick: () => this.handleOk() }, "OK")))));
|
|
47
51
|
}
|
|
48
52
|
};
|
|
49
53
|
VerdocsOkDialog.style = verdocsOkDialogCss;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verdocs-ok-dialog.entry.cjs.js","sources":["src/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.scss?tag=verdocs-ok-dialog","src/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-ok-dialog {\n box-sizing: border-box;\n font-family: $primary-font;\n\n &.closed {\n display: none;\n }\n\n .buttons {\n gap: 12px;\n display: flex;\n margin-top: 0;\n flex-direction: row;\n justify-content: flex-end;\n\n button {\n padding: 8px 16px;\n height: 40px;\n display: flex;\n font-size: 14px;\n font-weight: 400;\n cursor: pointer;\n align-items: center;\n border-radius: var(--verdocs-button-radius, 4px);\n justify-content: center;\n transition: all 0.2s ease;\n\n &.cancel {\n background-color: transparent;\n border: var(--verdocs-button-secondary-border, 1px solid #d1d5db);\n color: var(--verdocs-button-secondary-color, #374151);\n }\n\n &.ok {\n background-color: var(--verdocs-primary-color, $verdocs-green);\n border: 1px solid transparent;\n color: #ffffff;\n\n &:hover {\n background-color: var(--verdocs-primary-color-hover, $verdocs-green-shade);\n }\n }\n\n &:disabled {\n background-color: var(--verdocs-button-disabled-bg, #e5e7eb);\n color: var(--verdocs-button-disabled-color, #9ca3af);\n cursor: not-allowed;\n }\n }\n }\n}\n","import {Component, Prop, h, Event, EventEmitter, State} from '@stencil/core';\n\n/**\n * Display a simple text dialog box with an Ok button. This adds a partially-transparent overlay and screen-centered dialog\n * box with a message and optional header/title. An OK button is shown that will dismiss the message.\n * It can also be dismissed by clicking the background overlay.\n */\n@Component({\n tag: 'verdocs-ok-dialog',\n styleUrl: 'verdocs-ok-dialog.scss',\n})\nexport class VerdocsOkDialog {\n /**\n * The title of the dialog. \"title\" is a reserved word, so we use heading.\n */\n @Prop() heading: string = '';\n\n /**\n * The message content to display.\n */\n @Prop() message: string = '';\n\n /**\n * Override the \"OK\" button's label\n */\n @Prop() buttonLabel: string = 'OK';\n\n /**\n * If set, a cancel button will also be displayed. Note that the dialog is always cancelable by clicking the background\n * overlay to dismiss it.\n */\n @Prop() showCancel: boolean = false;\n\n /**\n * Event fired when the user clicks the OK button.\n */\n @Event({composed: true}) next: EventEmitter;\n\n /**\n * Event fired when Cancel is pressed. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n @State() closed = false;\n\n handleOk() {\n this.next.emit();\n }\n\n handleCancel() {\n this.exit.emit();\n }\n\n // We need a separate event handler for clicking the background because it can receive events \"through\" other child components\n handleDismiss(e: any) {\n this.closed = true;\n if (e.target.className === 'background-overlay') {\n e.preventDefault();\n this.exit.emit();\n }\n }\n\n render() {\n return (\n <verdocs-dialog onExit={e => this.handleDismiss(e)}>\n <div slot=\"heading\" class=\"heading\">\n <div class=\"icon\">\n <svg width=\"22\" height=\"19\" viewBox=\"0 0 22 19\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_34208_4881)\">\n <path\n d=\"M3.125 0.75C1.88398 0.75 0.875 1.75898 0.875 3V16.5C0.875 17.741 1.88398 18.75 3.125 18.75H12.125C13.366 18.75 14.375 17.741 14.375 16.5V15.8215C14.2801 15.8602 14.1852 15.8918 14.0867 15.9164L11.9738 16.4437C11.8684 16.4684 11.7629 16.4859 11.6574 16.493C11.6258 16.4965 11.5941 16.5 11.5625 16.5H9.3125C9.09805 16.5 8.90469 16.3805 8.80977 16.1906L8.50039 15.5684C8.44062 15.4488 8.32109 15.375 8.19102 15.375C8.06094 15.375 7.93789 15.4488 7.88164 15.5684L7.57227 16.1906C7.47031 16.398 7.24883 16.5211 7.02031 16.5C6.7918 16.4789 6.59492 16.3207 6.53164 16.1027L5.9375 14.1445L5.59297 15.2977C5.37852 16.0113 4.72109 16.5 3.97578 16.5H3.6875C3.37812 16.5 3.125 16.2469 3.125 15.9375C3.125 15.6281 3.37812 15.375 3.6875 15.375H3.97578C4.22539 15.375 4.44336 15.2133 4.51367 14.9742L5.0375 13.234C5.15703 12.8367 5.52266 12.5625 5.9375 12.5625C6.35234 12.5625 6.71797 12.8367 6.8375 13.234L7.24531 14.591C7.50547 14.373 7.83594 14.25 8.1875 14.25C8.74648 14.25 9.25625 14.5664 9.50586 15.0656L9.66055 15.375H9.97344C9.86445 15.0656 9.84336 14.7281 9.92422 14.3977L10.4516 12.2848C10.55 11.8875 10.7539 11.5289 11.0422 11.2406L14.375 7.90781V6.375H9.875C9.25273 6.375 8.75 5.87227 8.75 5.25V0.75H3.125ZM9.875 0.75V5.25H14.375L9.875 0.75ZM20.2039 5.66133C19.6555 5.11289 18.766 5.11289 18.2141 5.66133L17.1805 6.69492L19.6766 9.19102L20.7102 8.15742C21.2586 7.60898 21.2586 6.71953 20.7102 6.16758L20.2039 5.66133ZM11.8402 12.0352C11.6961 12.1793 11.5941 12.3586 11.5449 12.559L11.0176 14.6719C10.9684 14.8652 11.0246 15.0656 11.1652 15.2063C11.3059 15.3469 11.5062 15.4031 11.6996 15.3539L13.8125 14.8266C14.0094 14.7773 14.1922 14.6754 14.3363 14.5312L18.8785 9.98555L16.3824 7.48945L11.8402 12.0352Z\"\n fill=\"white\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_34208_4881\">\n <path d=\"M0.875 0.75H21.125V18.75H0.875V0.75Z\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n </div>\n\n <div class=\"title\"> {this.heading}</div>\n </div>\n\n <div slot=\"content\" class=\"content\" innerHTML={this.message} />\n\n <div class=\"footer\" slot=\"footer\">\n <div class=\"buttons\">\n {this.showCancel && (\n <button class=\"cancel\" onClick={() => this.handleCancel()}>\n Cancel\n </button>\n )}\n <button class={!this.showCancel ? 'ok single' : 'ok'} onClick={() => this.handleOk()}>\n OK\n </button>\n </div>\n </div>\n </verdocs-dialog>\n );\n }\n}\n"],"names":["h"],"mappings":";;;;AAAA,MAAM,kBAAkB,GAAG,iiDAAiiD;;MCW/iD,eAAe,GAAA,MAAA;AAJ5B,IAAA,WAAA,CAAA,OAAA,EAAA;;;;AAKE;;AAEG;AACK,QAAA,IAAO,CAAA,OAAA,GAAW,EAAE;AAE5B;;AAEG;AACK,QAAA,IAAO,CAAA,OAAA,GAAW,EAAE;AAE5B;;AAEG;AACK,QAAA,IAAW,CAAA,WAAA,GAAW,IAAI;AAElC;;;AAGG;AACK,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;AAY1B,QAAA,IAAM,CAAA,MAAA,GAAG,KAAK;
|
|
1
|
+
{"version":3,"file":"verdocs-ok-dialog.entry.cjs.js","sources":["src/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.scss?tag=verdocs-ok-dialog","src/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-ok-dialog {\n box-sizing: border-box;\n font-family: $primary-font;\n\n &.closed {\n display: none;\n }\n\n .buttons {\n gap: 12px;\n display: flex;\n margin-top: 0;\n flex-direction: row;\n justify-content: flex-end;\n\n button {\n padding: 8px 16px;\n height: 40px;\n display: flex;\n font-size: 14px;\n font-weight: 400;\n cursor: pointer;\n align-items: center;\n border-radius: var(--verdocs-button-radius, 4px);\n justify-content: center;\n transition: all 0.2s ease;\n\n &.cancel {\n background-color: transparent;\n border: var(--verdocs-button-secondary-border, 1px solid #d1d5db);\n color: var(--verdocs-button-secondary-color, #374151);\n }\n\n &.ok {\n background-color: var(--verdocs-primary-color, $verdocs-green);\n border: 1px solid transparent;\n color: #ffffff;\n\n &:hover {\n background-color: var(--verdocs-primary-color-hover, $verdocs-green-shade);\n }\n }\n\n &:disabled {\n background-color: var(--verdocs-button-disabled-bg, #e5e7eb);\n color: var(--verdocs-button-disabled-color, #9ca3af);\n cursor: not-allowed;\n }\n }\n }\n}\n","import { Component, Prop, h, Event, EventEmitter, State } from '@stencil/core';\n\n/**\n * Display a simple text dialog box with an Ok button. This adds a partially-transparent overlay and screen-centered dialog\n * box with a message and optional header/title. An OK button is shown that will dismiss the message.\n * It can also be dismissed by clicking the background overlay.\n */\n@Component({\n tag: 'verdocs-ok-dialog',\n styleUrl: 'verdocs-ok-dialog.scss',\n})\nexport class VerdocsOkDialog {\n /**\n * The title of the dialog. \"title\" is a reserved word, so we use heading.\n */\n @Prop() heading: string = '';\n\n /**\n * The message content to display.\n */\n @Prop() message: string = '';\n\n /**\n * Override the \"OK\" button's label\n */\n @Prop() buttonLabel: string = 'OK';\n\n /**\n * If set, a cancel button will also be displayed. Note that the dialog is always cancelable by clicking the background\n * overlay to dismiss it.\n */\n @Prop() showCancel: boolean = false;\n\n /**\n * Event fired when the user clicks the OK button.\n */\n @Event({ composed: true }) next: EventEmitter;\n\n /**\n * Event fired when Cancel is pressed. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({ composed: true }) exit: EventEmitter;\n\n @State() closed = false;\n\n handleOk() {\n this.next.emit();\n }\n\n handleCancel() {\n this.exit.emit();\n }\n\n // We need a separate event handler for clicking the background because it can receive events \"through\" other child components\n handleDismiss(e: any) {\n this.closed = true;\n if (e && e.target && e.target.className === 'background-overlay') {\n e.preventDefault();\n this.exit.emit();\n } else {\n // For X button click, treat it the same as OK button\n this.handleOk();\n }\n }\n\n render() {\n return (\n <verdocs-dialog onExit={e => this.handleDismiss(e)}>\n <div slot=\"heading\" class=\"heading\">\n <div class=\"icon\">\n <svg width=\"22\" height=\"19\" viewBox=\"0 0 22 19\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_34208_4881)\">\n <path\n d=\"M3.125 0.75C1.88398 0.75 0.875 1.75898 0.875 3V16.5C0.875 17.741 1.88398 18.75 3.125 18.75H12.125C13.366 18.75 14.375 17.741 14.375 16.5V15.8215C14.2801 15.8602 14.1852 15.8918 14.0867 15.9164L11.9738 16.4437C11.8684 16.4684 11.7629 16.4859 11.6574 16.493C11.6258 16.4965 11.5941 16.5 11.5625 16.5H9.3125C9.09805 16.5 8.90469 16.3805 8.80977 16.1906L8.50039 15.5684C8.44062 15.4488 8.32109 15.375 8.19102 15.375C8.06094 15.375 7.93789 15.4488 7.88164 15.5684L7.57227 16.1906C7.47031 16.398 7.24883 16.5211 7.02031 16.5C6.7918 16.4789 6.59492 16.3207 6.53164 16.1027L5.9375 14.1445L5.59297 15.2977C5.37852 16.0113 4.72109 16.5 3.97578 16.5H3.6875C3.37812 16.5 3.125 16.2469 3.125 15.9375C3.125 15.6281 3.37812 15.375 3.6875 15.375H3.97578C4.22539 15.375 4.44336 15.2133 4.51367 14.9742L5.0375 13.234C5.15703 12.8367 5.52266 12.5625 5.9375 12.5625C6.35234 12.5625 6.71797 12.8367 6.8375 13.234L7.24531 14.591C7.50547 14.373 7.83594 14.25 8.1875 14.25C8.74648 14.25 9.25625 14.5664 9.50586 15.0656L9.66055 15.375H9.97344C9.86445 15.0656 9.84336 14.7281 9.92422 14.3977L10.4516 12.2848C10.55 11.8875 10.7539 11.5289 11.0422 11.2406L14.375 7.90781V6.375H9.875C9.25273 6.375 8.75 5.87227 8.75 5.25V0.75H3.125ZM9.875 0.75V5.25H14.375L9.875 0.75ZM20.2039 5.66133C19.6555 5.11289 18.766 5.11289 18.2141 5.66133L17.1805 6.69492L19.6766 9.19102L20.7102 8.15742C21.2586 7.60898 21.2586 6.71953 20.7102 6.16758L20.2039 5.66133ZM11.8402 12.0352C11.6961 12.1793 11.5941 12.3586 11.5449 12.559L11.0176 14.6719C10.9684 14.8652 11.0246 15.0656 11.1652 15.2063C11.3059 15.3469 11.5062 15.4031 11.6996 15.3539L13.8125 14.8266C14.0094 14.7773 14.1922 14.6754 14.3363 14.5312L18.8785 9.98555L16.3824 7.48945L11.8402 12.0352Z\"\n fill=\"white\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_34208_4881\">\n <path d=\"M0.875 0.75H21.125V18.75H0.875V0.75Z\" fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n </div>\n\n <div class=\"title\"> {this.heading}</div>\n </div>\n\n <div slot=\"content\" class=\"content\" innerHTML={this.message} />\n\n <div class=\"footer\" slot=\"footer\">\n <div class=\"buttons\">\n {this.showCancel && (\n <button class=\"cancel\" onClick={() => this.handleCancel()}>\n Cancel\n </button>\n )}\n <button class={!this.showCancel ? 'ok single' : 'ok'} onClick={() => this.handleOk()}>\n OK\n </button>\n </div>\n </div>\n </verdocs-dialog>\n );\n }\n}\n"],"names":["h"],"mappings":"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"}
|
|
@@ -48,7 +48,7 @@ const VerdocsSign = class {
|
|
|
48
48
|
/**
|
|
49
49
|
* The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.
|
|
50
50
|
*/
|
|
51
|
-
this.endpoint = new jsSdk.VerdocsEndpoint({ sessionType: 'signing' });
|
|
51
|
+
this.endpoint = new jsSdk.VerdocsEndpoint({ sessionType: 'signing', baseURL: 'https://esign-dev.hubsync.com/api' });
|
|
52
52
|
/**
|
|
53
53
|
* The ID of the envelope to sign.
|
|
54
54
|
*/
|
|
@@ -107,6 +107,9 @@ const VerdocsSign = class {
|
|
|
107
107
|
this.delegated = false;
|
|
108
108
|
this.kbaChoices = [];
|
|
109
109
|
this.showDownloadDialog = false;
|
|
110
|
+
this.signingStarted = false;
|
|
111
|
+
this.skippedOptionalFields = [];
|
|
112
|
+
this.visitedFieldNames = [];
|
|
110
113
|
this.loading = true;
|
|
111
114
|
this.envelope = null;
|
|
112
115
|
this.zoomLevel = 'normal';
|
|
@@ -219,6 +222,9 @@ const VerdocsSign = class {
|
|
|
219
222
|
this.agreed = recipient.agreed;
|
|
220
223
|
this.signatureId = ((_e = (_d = response.signatures) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.id) || null;
|
|
221
224
|
this.initialId = ((_g = (_f = response.initials) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.id) || null;
|
|
225
|
+
this.signingStarted = false;
|
|
226
|
+
this.skippedOptionalFields = [];
|
|
227
|
+
this.visitedFieldNames = [];
|
|
222
228
|
this.submitted = recipient.status === 'submitted';
|
|
223
229
|
this.loading = false;
|
|
224
230
|
this.isDone = this.submitted;
|
|
@@ -326,6 +332,9 @@ const VerdocsSign = class {
|
|
|
326
332
|
}
|
|
327
333
|
updateRecipientFieldValue(fieldName, updateResult) {
|
|
328
334
|
console.log('[SIGN] updateRecipientFieldValue', fieldName, updateResult);
|
|
335
|
+
if (this.skippedOptionalFields.includes(fieldName)) {
|
|
336
|
+
this.skippedOptionalFields = this.skippedOptionalFields.filter(name => name !== fieldName);
|
|
337
|
+
}
|
|
329
338
|
this.getRecipientFields().forEach(oldField => {
|
|
330
339
|
if (oldField.name === fieldName) {
|
|
331
340
|
oldField.value = updateResult.value;
|
|
@@ -363,6 +372,8 @@ const VerdocsSign = class {
|
|
|
363
372
|
});
|
|
364
373
|
}
|
|
365
374
|
async handleFieldChange(field, e) {
|
|
375
|
+
this.signingStarted = true;
|
|
376
|
+
this.markFieldVisited(field.name);
|
|
366
377
|
const { value, checked } = e.target;
|
|
367
378
|
switch (field.type) {
|
|
368
379
|
// TODO: Remove legacy type when no longer needed
|
|
@@ -484,8 +495,46 @@ const VerdocsSign = class {
|
|
|
484
495
|
jsSdk.sortFields(recipientFields);
|
|
485
496
|
return recipientFields;
|
|
486
497
|
}
|
|
498
|
+
markFieldVisited(fieldName) {
|
|
499
|
+
if (!fieldName || this.visitedFieldNames.includes(fieldName)) {
|
|
500
|
+
return;
|
|
501
|
+
}
|
|
502
|
+
this.visitedFieldNames = [...this.visitedFieldNames, fieldName];
|
|
503
|
+
}
|
|
504
|
+
focusField(field, scrollInline = 'center') {
|
|
505
|
+
var _a;
|
|
506
|
+
if (!field)
|
|
507
|
+
return;
|
|
508
|
+
const id = utils.getFieldId(field);
|
|
509
|
+
const el = document.getElementById(id);
|
|
510
|
+
el === null || el === void 0 ? void 0 : el.scrollIntoView({ behavior: 'smooth', block: 'center', inline: scrollInline });
|
|
511
|
+
(_a = el === null || el === void 0 ? void 0 : el.focusField) === null || _a === void 0 ? void 0 : _a.call(el);
|
|
512
|
+
this.focusedField = field.name;
|
|
513
|
+
this.markFieldVisited(field.name);
|
|
514
|
+
this.checkRecipientFields();
|
|
515
|
+
}
|
|
516
|
+
handleSkipField(fieldToSkip) {
|
|
517
|
+
if (fieldToSkip.required) {
|
|
518
|
+
return;
|
|
519
|
+
}
|
|
520
|
+
this.signingStarted = true;
|
|
521
|
+
this.markFieldVisited(fieldToSkip.name);
|
|
522
|
+
if (!this.skippedOptionalFields.includes(fieldToSkip.name)) {
|
|
523
|
+
this.skippedOptionalFields = [...this.skippedOptionalFields, fieldToSkip.name];
|
|
524
|
+
}
|
|
525
|
+
const fields = this.getSortedFillableFields();
|
|
526
|
+
const currentIndex = fields.findIndex(field => field.name === fieldToSkip.name);
|
|
527
|
+
const nextField = currentIndex >= 0 && currentIndex < fields.length - 1 ? fields[currentIndex + 1] : null;
|
|
528
|
+
if (nextField) {
|
|
529
|
+
this.focusField(nextField);
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
// If this was the last field, still re-evaluate completion/submit state.
|
|
533
|
+
this.checkRecipientFields([fieldToSkip.name]);
|
|
534
|
+
}
|
|
487
535
|
handleNext() {
|
|
488
536
|
var _a;
|
|
537
|
+
this.signingStarted = true;
|
|
489
538
|
if (this.nextSubmits) {
|
|
490
539
|
try {
|
|
491
540
|
// Patches the date picker to be forcibly removed if still showing during submission
|
|
@@ -503,23 +552,31 @@ const VerdocsSign = class {
|
|
|
503
552
|
}
|
|
504
553
|
return;
|
|
505
554
|
}
|
|
506
|
-
const
|
|
507
|
-
if (
|
|
508
|
-
|
|
509
|
-
const el = document.getElementById(id);
|
|
510
|
-
el === null || el === void 0 ? void 0 : el.scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'center' });
|
|
511
|
-
el === null || el === void 0 ? void 0 : el.focusField();
|
|
512
|
-
this.focusedField = nextField.name;
|
|
555
|
+
const fields = this.getSortedFillableFields();
|
|
556
|
+
if (fields.length < 1) {
|
|
557
|
+
return;
|
|
513
558
|
}
|
|
559
|
+
if (!this.focusedField) {
|
|
560
|
+
this.focusField(fields[0]);
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
const nextField = this.getNextFieldFromList(fields);
|
|
564
|
+
this.focusField(nextField);
|
|
514
565
|
}
|
|
515
566
|
getRecipientFields() {
|
|
516
567
|
var _a;
|
|
517
568
|
return ((_a = this.envelope) === null || _a === void 0 ? void 0 : _a.fields.filter(field => field.role_name === this.recipient.role_name)) || [];
|
|
518
569
|
}
|
|
519
570
|
// See if everything that "needs to be" filled in is, and all "fillable fields" are valid
|
|
520
|
-
checkRecipientFields() {
|
|
521
|
-
const
|
|
522
|
-
|
|
571
|
+
checkRecipientFields(extraVisitedFieldNames = []) {
|
|
572
|
+
const recipientFields = this.getRecipientFields();
|
|
573
|
+
const fillableFields = this.getSortedFillableFields();
|
|
574
|
+
const requiredFields = fillableFields.filter(field => !!field.required);
|
|
575
|
+
const allRequiredFieldsSubmitted = requiredFields.every(field => this.isFieldValidForRecipient(field, recipientFields));
|
|
576
|
+
const visitedFieldNames = new Set([...this.visitedFieldNames, ...extraVisitedFieldNames]);
|
|
577
|
+
const allFieldsVisited = fillableFields.every(field => visitedFieldNames.has(field.name));
|
|
578
|
+
const canSubmit = allRequiredFieldsSubmitted && allFieldsVisited;
|
|
579
|
+
if (canSubmit) {
|
|
523
580
|
this.nextButtonLabel = 'Finish';
|
|
524
581
|
if (!this.nextSubmits) {
|
|
525
582
|
this.nextSubmits = true;
|
|
@@ -531,6 +588,12 @@ const VerdocsSign = class {
|
|
|
531
588
|
}
|
|
532
589
|
this.updateAllFlags();
|
|
533
590
|
}
|
|
591
|
+
isFieldValidForRecipient(field, recipientFields) {
|
|
592
|
+
if (field.type === 'signature' || field.type === 'initial') {
|
|
593
|
+
return !field.required || this.isFieldFilledForNav(field, recipientFields);
|
|
594
|
+
}
|
|
595
|
+
return jsSdk.isFieldValid(field, recipientFields);
|
|
596
|
+
}
|
|
534
597
|
getNextFieldInOrder() {
|
|
535
598
|
// Find the next incomplete field in overall order (required + optional).
|
|
536
599
|
const fields = this.getSortedFillableFields();
|
|
@@ -549,13 +612,38 @@ const VerdocsSign = class {
|
|
|
549
612
|
return null;
|
|
550
613
|
}
|
|
551
614
|
isFieldFilledForNav(field, recipientFields) {
|
|
615
|
+
if (!field.required && this.skippedOptionalFields.includes(field.name)) {
|
|
616
|
+
return true;
|
|
617
|
+
}
|
|
552
618
|
if (field.type === 'signature' || field.type === 'initial') {
|
|
619
|
+
const settings = (field.settings || {});
|
|
620
|
+
const idKey = field.type === 'signature' ? 'signature_id' : 'initial_id';
|
|
621
|
+
const hasSignatureId = Object.prototype.hasOwnProperty.call(settings, 'signature_id');
|
|
622
|
+
const hasInitialId = Object.prototype.hasOwnProperty.call(settings, 'initial_id');
|
|
623
|
+
// For signature/initial fields, settings.* id is the authoritative state.
|
|
624
|
+
// This avoids stale top-level field.value (e.g. "signed") after clearing.
|
|
625
|
+
if (Object.prototype.hasOwnProperty.call(settings, idKey) || hasSignatureId || hasInitialId) {
|
|
626
|
+
const idValue = Object.prototype.hasOwnProperty.call(settings, idKey)
|
|
627
|
+
? settings[idKey]
|
|
628
|
+
: hasSignatureId
|
|
629
|
+
? settings.signature_id
|
|
630
|
+
: settings.initial_id;
|
|
631
|
+
return typeof idValue === 'string' ? idValue.trim().length > 0 : !!idValue;
|
|
632
|
+
}
|
|
633
|
+
if (Object.prototype.hasOwnProperty.call(settings, 'value')) {
|
|
634
|
+
const settingsValue = typeof settings.value === 'string' ? settings.value.trim() : settings.value;
|
|
635
|
+
return !!settingsValue;
|
|
636
|
+
}
|
|
637
|
+
if (Object.prototype.hasOwnProperty.call(settings, 'result')) {
|
|
638
|
+
const settingsResult = typeof settings.result === 'string' ? settings.result.trim() : settings.result;
|
|
639
|
+
return !!settingsResult;
|
|
640
|
+
}
|
|
641
|
+
if (Object.prototype.hasOwnProperty.call(settings, 'base64')) {
|
|
642
|
+
const settingsBase64 = typeof settings.base64 === 'string' ? settings.base64.trim() : settings.base64;
|
|
643
|
+
return !!settingsBase64;
|
|
644
|
+
}
|
|
553
645
|
const value = typeof field.value === 'string' ? field.value.trim() : field.value;
|
|
554
|
-
|
|
555
|
-
return false;
|
|
556
|
-
if (value === 'signed' || value === 'initialed')
|
|
557
|
-
return false;
|
|
558
|
-
return true;
|
|
646
|
+
return !!value;
|
|
559
647
|
}
|
|
560
648
|
if (field.type === 'dropdown') {
|
|
561
649
|
return jsSdk.isFieldFilled(field, recipientFields) && !!field.value;
|
|
@@ -572,16 +660,11 @@ const VerdocsSign = class {
|
|
|
572
660
|
return fields[nextFocusedIndex];
|
|
573
661
|
}
|
|
574
662
|
handlePrev() {
|
|
575
|
-
|
|
663
|
+
this.signingStarted = true;
|
|
576
664
|
const allFields = this.getSortedFillableFields();
|
|
577
665
|
const focusedIndex = allFields.findIndex(f => f.name === this.focusedField);
|
|
578
666
|
if (focusedIndex > 0) {
|
|
579
|
-
|
|
580
|
-
const id = utils.getFieldId(prevField);
|
|
581
|
-
const el = document.getElementById(id);
|
|
582
|
-
el === null || el === void 0 ? void 0 : el.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
583
|
-
(_a = el === null || el === void 0 ? void 0 : el.focusField) === null || _a === void 0 ? void 0 : _a.call(el);
|
|
584
|
-
this.focusedField = prevField.name;
|
|
667
|
+
this.focusField(allFields[focusedIndex - 1]);
|
|
585
668
|
}
|
|
586
669
|
}
|
|
587
670
|
updateAllFlags() {
|
|
@@ -618,8 +701,12 @@ const VerdocsSign = class {
|
|
|
618
701
|
variant,
|
|
619
702
|
label,
|
|
620
703
|
showSkip,
|
|
704
|
+
onClick: () => {
|
|
705
|
+
this.signingStarted = true;
|
|
706
|
+
this.focusField(nextField);
|
|
707
|
+
},
|
|
621
708
|
onSkip: () => {
|
|
622
|
-
this.
|
|
709
|
+
this.handleSkipField(nextField);
|
|
623
710
|
},
|
|
624
711
|
});
|
|
625
712
|
}
|
|
@@ -692,8 +779,15 @@ const VerdocsSign = class {
|
|
|
692
779
|
el.addEventListener('fieldChange', e => {
|
|
693
780
|
this.handleFieldChange(field, e).finally(() => this.checkRecipientFields());
|
|
694
781
|
});
|
|
782
|
+
el.addEventListener('click', () => {
|
|
783
|
+
this.focusedField = field.name;
|
|
784
|
+
this.markFieldVisited(field.name);
|
|
785
|
+
this.checkRecipientFields();
|
|
786
|
+
});
|
|
695
787
|
el.addEventListener('adopt', () => {
|
|
696
788
|
this.focusedField = field.name;
|
|
789
|
+
this.markFieldVisited(field.name);
|
|
790
|
+
this.checkRecipientFields();
|
|
697
791
|
this.adoptingSignature = true;
|
|
698
792
|
});
|
|
699
793
|
el.setAttribute('templateid', this.envelope.template_id);
|
|
@@ -883,7 +977,8 @@ const VerdocsSign = class {
|
|
|
883
977
|
inProgressMenuOptions.unshift({ id: 'delegate', label: 'Delegate' });
|
|
884
978
|
}
|
|
885
979
|
console.log('this.getRecipientFields()', this.getRecipientFields());
|
|
886
|
-
const
|
|
980
|
+
const recipientFields = this.getRecipientFields();
|
|
981
|
+
const invalidFields = recipientFields.filter(field => !this.isFieldValidForRecipient(field, recipientFields));
|
|
887
982
|
invalidFields.length > 0
|
|
888
983
|
? console.log('[SIGN] Invalid fields remaining', invalidFields.map(field => field.name))
|
|
889
984
|
: console.log('[SIGN] All field valid');
|
|
@@ -896,18 +991,20 @@ const VerdocsSign = class {
|
|
|
896
991
|
// Calculate detailed progress
|
|
897
992
|
const allFields = this.getSortedFillableFields();
|
|
898
993
|
const recipientFields = this.getRecipientFields();
|
|
899
|
-
const isFilled = (f) =>
|
|
994
|
+
const isFilled = (f) => this.isFieldFilledForNav(f, recipientFields);
|
|
900
995
|
const requiredFields = allFields.filter(f => f.required);
|
|
901
996
|
const requiredRemaining = requiredFields.filter(f => !isFilled(f)).length;
|
|
997
|
+
const requiredFilled = requiredFields.length - requiredRemaining;
|
|
902
998
|
const optionalFields = allFields.filter(f => !f.required);
|
|
903
999
|
const optionalRemaining = optionalFields.filter(f => !isFilled(f)).length;
|
|
1000
|
+
const optionalFilled = optionalFields.length - optionalRemaining;
|
|
904
1001
|
const progress = {
|
|
905
1002
|
required: {
|
|
906
|
-
|
|
1003
|
+
filled: requiredFilled,
|
|
907
1004
|
total: requiredFields.length,
|
|
908
1005
|
},
|
|
909
1006
|
optional: {
|
|
910
|
-
|
|
1007
|
+
filled: optionalFilled,
|
|
911
1008
|
total: optionalFields.length,
|
|
912
1009
|
},
|
|
913
1010
|
};
|
|
@@ -926,18 +1023,18 @@ const VerdocsSign = class {
|
|
|
926
1023
|
filledFields: recipientFields.filter(f => isFilled(f)).map(f => ({ name: f.name, type: f.type, val: f.value })),
|
|
927
1024
|
});
|
|
928
1025
|
let mode = 'start';
|
|
929
|
-
// We only consider the user to have started "signing" if they have filled out at least one *fillable* field.
|
|
930
|
-
// Readonly fields do not count.
|
|
931
|
-
const anyFieldFilled = requiredRemaining < requiredFields.length || optionalRemaining < optionalFields.length;
|
|
932
1026
|
if (this.nextSubmits) {
|
|
933
1027
|
mode = 'completed';
|
|
934
1028
|
}
|
|
935
|
-
else if (
|
|
1029
|
+
else if (this.signingStarted) {
|
|
936
1030
|
mode = 'signing';
|
|
937
1031
|
}
|
|
938
1032
|
return (index.h("verdocs-signing-progress", { mode: mode, current: Math.max(1, currentIndex), total: totalFields, remainingFields: remainingFields, progress: progress, fieldLabel: getFieldLabel(focusedFieldObj), fieldCompleted: focusedFieldObj ? !!isFilled(focusedFieldObj) : false, onStarted: () => {
|
|
1033
|
+
this.signingStarted = true;
|
|
939
1034
|
this.adoptingSignature = true;
|
|
940
|
-
this.
|
|
1035
|
+
const fields = this.getSortedFillableFields();
|
|
1036
|
+
const startField = fields.find(f => f.name === this.focusedField) || fields[0];
|
|
1037
|
+
this.focusField(startField || null);
|
|
941
1038
|
}, onNext: () => this.handleNext(), onPrevious: () => this.handlePrev(), onExit: () => this.handleNext() }));
|
|
942
1039
|
})(), index.h("div", { class: `document signed-document-container zoom-${this.zoomLevel}` }, (this.envelope.documents || []).map(envelopeDocument => {
|
|
943
1040
|
const pageNumbers = jsSdk.integerSequence(1, envelopeDocument.pages);
|