@verdocs/web-sdk 6.9.12 → 6.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/cjs/verdocs-adopt-signature-dialog_7.cjs.entry.js +1 -1
  2. package/dist/cjs/verdocs-adopt-signature-dialog_7.cjs.entry.js.map +1 -1
  3. package/dist/cjs/verdocs-auth.cjs.entry.js +3 -0
  4. package/dist/cjs/verdocs-auth.cjs.entry.js.map +1 -1
  5. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +422 -115
  6. package/dist/cjs/verdocs-contact-picker.cjs.entry.js.map +1 -1
  7. package/dist/cjs/verdocs-download-dialog_4.cjs.entry.js +6 -5
  8. package/dist/cjs/verdocs-download-dialog_4.cjs.entry.js.map +1 -1
  9. package/dist/cjs/verdocs-preview_6.cjs.entry.js +3 -0
  10. package/dist/cjs/verdocs-preview_6.cjs.entry.js.map +1 -1
  11. package/dist/cjs/verdocs-sign.cjs.entry.js +79 -20
  12. package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
  13. package/dist/collection/components/dialogs/verdocs-download-dialog/verdocs-download-dialog.js +6 -5
  14. package/dist/collection/components/dialogs/verdocs-download-dialog/verdocs-download-dialog.js.map +1 -1
  15. package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +3 -0
  16. package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js.map +1 -1
  17. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +3 -0
  18. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js.map +1 -1
  19. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +79 -20
  20. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
  21. package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +1 -1
  22. package/dist/collection/components/embeds/verdocs-view/verdocs-view.js.map +1 -1
  23. package/dist/components/{p-Ce29XBfJ.js → p-CBKrl6B7.js} +2 -2
  24. package/dist/components/{p-Ce29XBfJ.js.map → p-CBKrl6B7.js.map} +1 -1
  25. package/dist/components/p-CPYFXW2q.js +3 -0
  26. package/dist/components/p-CPYFXW2q.js.map +1 -0
  27. package/dist/components/{p-Bpe5Awxh.js → p-CnoHN1S8.js} +2 -2
  28. package/dist/components/p-CnoHN1S8.js.map +1 -0
  29. package/dist/components/{p-BVhOFpVZ.js → p-DfaM_cug.js} +2 -2
  30. package/dist/components/p-DfaM_cug.js.map +1 -0
  31. package/dist/components/verdocs-auth.js +1 -1
  32. package/dist/components/verdocs-auth.js.map +1 -1
  33. package/dist/components/verdocs-build.js +1 -1
  34. package/dist/components/verdocs-contact-picker.js +1 -1
  35. package/dist/components/verdocs-download-dialog.js +1 -1
  36. package/dist/components/verdocs-send.js +1 -1
  37. package/dist/components/verdocs-sign.js +1 -1
  38. package/dist/components/verdocs-sign.js.map +1 -1
  39. package/dist/components/verdocs-view.js +1 -1
  40. package/dist/esm/verdocs-adopt-signature-dialog_7.entry.js +1 -1
  41. package/dist/esm/verdocs-adopt-signature-dialog_7.entry.js.map +1 -1
  42. package/dist/esm/verdocs-auth.entry.js +3 -0
  43. package/dist/esm/verdocs-auth.entry.js.map +1 -1
  44. package/dist/esm/verdocs-contact-picker.entry.js +422 -115
  45. package/dist/esm/verdocs-contact-picker.entry.js.map +1 -1
  46. package/dist/esm/verdocs-download-dialog_4.entry.js +6 -5
  47. package/dist/esm/verdocs-download-dialog_4.entry.js.map +1 -1
  48. package/dist/esm/verdocs-preview_6.entry.js +3 -0
  49. package/dist/esm/verdocs-preview_6.entry.js.map +1 -1
  50. package/dist/esm/verdocs-sign.entry.js +80 -21
  51. package/dist/esm/verdocs-sign.entry.js.map +1 -1
  52. package/dist/esm-es5/verdocs-adopt-signature-dialog_7.entry.js +1 -1
  53. package/dist/esm-es5/verdocs-adopt-signature-dialog_7.entry.js.map +1 -1
  54. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  55. package/dist/esm-es5/verdocs-auth.entry.js.map +1 -1
  56. package/dist/esm-es5/verdocs-contact-picker.entry.js +2 -2
  57. package/dist/esm-es5/verdocs-contact-picker.entry.js.map +1 -1
  58. package/dist/esm-es5/verdocs-download-dialog_4.entry.js +1 -1
  59. package/dist/esm-es5/verdocs-download-dialog_4.entry.js.map +1 -1
  60. package/dist/esm-es5/verdocs-preview_6.entry.js +1 -1
  61. package/dist/esm-es5/verdocs-preview_6.entry.js.map +1 -1
  62. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  63. package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
  64. package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +5 -0
  65. package/dist/verdocs-web-sdk/p-11c3e5bb.entry.js +2 -0
  66. package/dist/verdocs-web-sdk/p-11c3e5bb.entry.js.map +1 -0
  67. package/dist/verdocs-web-sdk/p-16d655d4.system.entry.js +2 -0
  68. package/dist/verdocs-web-sdk/p-16d655d4.system.entry.js.map +1 -0
  69. package/dist/verdocs-web-sdk/p-1ce27c81.system.entry.js +4 -0
  70. package/dist/verdocs-web-sdk/p-1ce27c81.system.entry.js.map +1 -0
  71. package/dist/verdocs-web-sdk/p-2d72560a.entry.js +2 -0
  72. package/dist/verdocs-web-sdk/p-2d72560a.entry.js.map +1 -0
  73. package/dist/verdocs-web-sdk/p-33cfc977.system.entry.js +2 -0
  74. package/dist/verdocs-web-sdk/p-33cfc977.system.entry.js.map +1 -0
  75. package/dist/verdocs-web-sdk/p-43ee0267.entry.js +2 -0
  76. package/dist/verdocs-web-sdk/p-43ee0267.entry.js.map +1 -0
  77. package/dist/verdocs-web-sdk/p-4e84a5b6.entry.js +3 -0
  78. package/dist/verdocs-web-sdk/p-4e84a5b6.entry.js.map +1 -0
  79. package/dist/verdocs-web-sdk/p-BdZ5Ghsa.system.js +1 -1
  80. package/dist/verdocs-web-sdk/{p-9756028f.entry.js → p-d0e8419b.entry.js} +2 -2
  81. package/dist/verdocs-web-sdk/p-d0e8419b.entry.js.map +1 -0
  82. package/dist/verdocs-web-sdk/{p-64034b55.system.entry.js → p-d60cfa3e.system.entry.js} +2 -2
  83. package/dist/verdocs-web-sdk/{p-64034b55.system.entry.js.map → p-d60cfa3e.system.entry.js.map} +1 -1
  84. package/dist/verdocs-web-sdk/p-e608d2bc.system.entry.js +2 -0
  85. package/dist/verdocs-web-sdk/p-e608d2bc.system.entry.js.map +1 -0
  86. package/dist/verdocs-web-sdk/{p-6abf8f8f.entry.js → p-e95723ac.entry.js} +2 -2
  87. package/dist/verdocs-web-sdk/{p-6abf8f8f.entry.js.map → p-e95723ac.entry.js.map} +1 -1
  88. package/dist/verdocs-web-sdk/{p-f85f8560.system.entry.js → p-edab1fed.system.entry.js} +2 -2
  89. package/dist/verdocs-web-sdk/p-edab1fed.system.entry.js.map +1 -0
  90. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  91. package/package.json +2 -2
  92. package/dist/components/p-BVhOFpVZ.js.map +0 -1
  93. package/dist/components/p-Bpe5Awxh.js.map +0 -1
  94. package/dist/components/p-DeQsR41s.js +0 -3
  95. package/dist/components/p-DeQsR41s.js.map +0 -1
  96. package/dist/verdocs-web-sdk/p-0240a6e1.system.entry.js +0 -2
  97. package/dist/verdocs-web-sdk/p-0240a6e1.system.entry.js.map +0 -1
  98. package/dist/verdocs-web-sdk/p-12676649.entry.js +0 -2
  99. package/dist/verdocs-web-sdk/p-12676649.entry.js.map +0 -1
  100. package/dist/verdocs-web-sdk/p-1a6869c9.system.entry.js +0 -2
  101. package/dist/verdocs-web-sdk/p-1a6869c9.system.entry.js.map +0 -1
  102. package/dist/verdocs-web-sdk/p-3a542ed0.system.entry.js +0 -4
  103. package/dist/verdocs-web-sdk/p-3a542ed0.system.entry.js.map +0 -1
  104. package/dist/verdocs-web-sdk/p-3f5ad836.system.entry.js +0 -2
  105. package/dist/verdocs-web-sdk/p-3f5ad836.system.entry.js.map +0 -1
  106. package/dist/verdocs-web-sdk/p-9756028f.entry.js.map +0 -1
  107. package/dist/verdocs-web-sdk/p-9c6cca6e.entry.js +0 -2
  108. package/dist/verdocs-web-sdk/p-9c6cca6e.entry.js.map +0 -1
  109. package/dist/verdocs-web-sdk/p-ae4290c6.entry.js +0 -3
  110. package/dist/verdocs-web-sdk/p-ae4290c6.entry.js.map +0 -1
  111. package/dist/verdocs-web-sdk/p-c89d74b2.entry.js +0 -2
  112. package/dist/verdocs-web-sdk/p-c89d74b2.entry.js.map +0 -1
  113. package/dist/verdocs-web-sdk/p-f85f8560.system.entry.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, F as Fragment, g as getElement } from './index-CjTHbolG.js';
2
- import { VerdocsEndpoint, DEFAULT_DISCLOSURES, startSigningSession, envelopeRecipientAgree, getEnvelope, updateEnvelopeField, createSignature, createInitials, sortFields, envelopeRecipientSubmit, isFieldValid, isFieldFilled, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, formatFullName, fullNameToInitials, verifySigner, getEnvelopesZip, getEnvelopeDocumentDownloadLink, getCombinedEnvelopeDocumentDownloadLink, delegateRecipient, envelopeRecipientDecline, integerSequence, askQuestion } from '@verdocs/js-sdk';
2
+ import { VerdocsEndpoint, DEFAULT_DISCLOSURES, startSigningSession, getEnvelope, envelopeRecipientAgree, updateEnvelopeField, createSignature, createInitials, sortFields, envelopeRecipientSubmit, isFieldValid, isFieldFilled, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, formatFullName, fullNameToInitials, verifySigner, getEnvelopesZip, getEnvelopeDocumentDownloadLink, getCombinedEnvelopeDocumentDownloadLink, delegateRecipient, envelopeRecipientDecline, integerSequence, askQuestion } from '@verdocs/js-sdk';
3
3
  import { u as updateDocumentFieldValue, g as getFieldId, r as renderDocumentFlag, a as renderDocumentField, d as defaultHeight } from './utils-D9l-GFdv.js';
4
4
  import { D as DownloadAction } from './Types-CIxfEdV7.js';
5
5
  import { D as DocumentPageIcon, C as CheckCircleIcon } from './Icons-BU5rnXp2.js';
@@ -89,6 +89,14 @@ const VerdocsSign = class {
89
89
  this.polling = true;
90
90
  this.renderedPages = {};
91
91
  this.pollingInterval = null;
92
+ this.handleDoneDialogDismiss = async () => {
93
+ this.showDone = false;
94
+ if (!this.isDone) {
95
+ this.prepareForViewTransition();
96
+ await new Promise(resolve => requestAnimationFrame(() => resolve()));
97
+ this.isDone = true;
98
+ }
99
+ };
92
100
  }
93
101
  async componentDidLoad() {
94
102
  var _a, _b, _c, _d, _e, _f;
@@ -107,11 +115,7 @@ const VerdocsSign = class {
107
115
  return;
108
116
  }
109
117
  try {
110
- console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);
111
- // NOTE: We don't listen to the store here because we are often an independent
112
- // session and might have a different "view" of the envelope.
113
- const response = await startSigningSession(this.endpoint, this.envelopeId, this.roleId, this.inviteCode);
114
- this.processAuthResponse(response);
118
+ await this.initSigningSession();
115
119
  }
116
120
  catch (e) {
117
121
  console.log('[SIGN] Error with signing session', e);
@@ -119,6 +123,56 @@ const VerdocsSign = class {
119
123
  this.showLoadError = true;
120
124
  }
121
125
  }
126
+ async initSigningSession() {
127
+ console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);
128
+ // NOTE: We don't listen to the store here because we are often an independent
129
+ // session and might have a different "view" of the envelope.
130
+ const response = await startSigningSession(this.endpoint, this.envelopeId, this.roleId, this.inviteCode);
131
+ this.processAuthResponse(response);
132
+ }
133
+ async retrySigningSession() {
134
+ var _a, _b, _c;
135
+ this.showLoadError = false;
136
+ this.loading = true;
137
+ try {
138
+ await this.initSigningSession();
139
+ }
140
+ catch (e) {
141
+ console.log('[SIGN] Error with signing session', e);
142
+ (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(new SDKError(e.message, (_b = e.response) === null || _b === void 0 ? void 0 : _b.status, (_c = e.response) === null || _c === void 0 ? void 0 : _c.data));
143
+ this.showLoadError = true;
144
+ this.loading = false;
145
+ }
146
+ }
147
+ prepareForViewTransition() {
148
+ var _a, _b, _c;
149
+ this.stopPolling();
150
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
151
+ this.observer = null;
152
+ (_b = document.getElementById('air-datepicker-global-container')) === null || _b === void 0 ? void 0 : _b.remove();
153
+ (_c = document.getElementById('verdocs-sign-header')) === null || _c === void 0 ? void 0 : _c.remove();
154
+ }
155
+ async handleSubmitSuccess() {
156
+ var _a, _b;
157
+ this.submitting = false;
158
+ this.submitted = true;
159
+ this.nextSubmits = false;
160
+ this.signingProgressMode = 'completed';
161
+ try {
162
+ const envelope = await getEnvelope(this.endpoint, this.envelopeId);
163
+ this.envelope = envelope;
164
+ Store.updateEnvelope(this.envelopeId, envelope);
165
+ const updatedRecipient = (_a = envelope.recipients) === null || _a === void 0 ? void 0 : _a.find(r => { var _a; return r.role_name === ((_a = this.recipient) === null || _a === void 0 ? void 0 : _a.role_name); });
166
+ if (updatedRecipient) {
167
+ this.recipient = updatedRecipient;
168
+ }
169
+ (_b = this.envelopeUpdated) === null || _b === void 0 ? void 0 : _b.emit({ endpoint: this.endpoint, envelope, event: 'submitted' });
170
+ }
171
+ catch (e) {
172
+ console.warn('[SIGN] Error refreshing envelope after submit', e);
173
+ }
174
+ this.showDone = true;
175
+ }
122
176
  componentDidRender() {
123
177
  const headerTarget = this.headerTargetId ? document.getElementById(this.headerTargetId) : null;
124
178
  const headerEl = document.getElementById('verdocs-sign-header');
@@ -274,7 +328,8 @@ const VerdocsSign = class {
274
328
  handleClickAgree() {
275
329
  this.submitting = true;
276
330
  console.log('[SIGN] Accepting disclosures', this.disclosures);
277
- envelopeRecipientAgree(this.endpoint, this.envelopeId, this.roleId, this.disclosures)
331
+ const localeData = Intl.DateTimeFormat().resolvedOptions();
332
+ envelopeRecipientAgree(this.endpoint, this.envelopeId, this.roleId, this.disclosures, { locale: localeData.locale, timezone: localeData.timeZone })
278
333
  .then(() => {
279
334
  var _a;
280
335
  this.nextButtonLabel = 'Next';
@@ -571,16 +626,17 @@ const VerdocsSign = class {
571
626
  async handleNext() {
572
627
  var _a;
573
628
  if (this.nextSubmits) {
629
+ if (this.submitted) {
630
+ return;
631
+ }
574
632
  try {
575
633
  // Patches the date picker to be forcibly removed if still showing during submission
576
634
  (_a = document.getElementById('air-datepicker-global-container')) === null || _a === void 0 ? void 0 : _a.remove();
577
635
  this.submitting = true;
578
- const result = await envelopeRecipientSubmit(this.endpoint, this.envelopeId, this.roleId);
636
+ const localeData = Intl.DateTimeFormat().resolvedOptions();
637
+ const result = await envelopeRecipientSubmit(this.endpoint, this.envelopeId, this.roleId, { locale: localeData.locale, timezone: localeData.timeZone });
579
638
  console.log('[SIGN] Submitted successfully', result);
580
- // TODO: The "proper" way is generating an error from Stencil
581
- // NotFoundError: Failed to execute 'insertBefore' on 'Node': The node before which
582
- // the new node is to be inserted is not a child of this node.
583
- window.location.reload();
639
+ await this.handleSubmitSuccess();
584
640
  }
585
641
  catch (e) {
586
642
  console.log('[SIGN] Error submitting', e);
@@ -626,6 +682,9 @@ const VerdocsSign = class {
626
682
  }
627
683
  // See if everything that "needs to be" filled in is, and all "fillable fields" are valid
628
684
  checkRecipientFields() {
685
+ if (this.submitted || this.isDone) {
686
+ return;
687
+ }
629
688
  const invalidFields = this.getRecipientFields().filter(field => !isFieldValid(field, this.getRecipientFields()));
630
689
  if (invalidFields.length < 1) {
631
690
  this.nextButtonLabel = 'Finish';
@@ -988,7 +1047,7 @@ const VerdocsSign = class {
988
1047
  var _a;
989
1048
  if (this.showLoadError) {
990
1049
  return (h(Host, null, h("verdocs-ok-dialog", { heading: "Unable to Start Signing", message: `Sorry, your invite code is invalid or has expired. Please check your email for an updated invitation, or contact the sender.`, buttonLabel: "OK", onNext: () => {
991
- window.location.reload();
1050
+ this.retrySigningSession();
992
1051
  } })));
993
1052
  }
994
1053
  if (!this.envelope) {
@@ -1004,8 +1063,7 @@ const VerdocsSign = class {
1004
1063
  return (h(Host, { class: { agreed: this.agreed } }, h("verdocs-view", { endpoint: this.endpoint, envelopeId: this.envelopeId, onSdkError: e => { var _a; return (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(e.detail); } }), this.showDone && (h("verdocs-ok-dialog", { heading: "You're Done!", message: `You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`, onNext: (e) => {
1005
1064
  e.preventDefault();
1006
1065
  e.stopPropagation();
1007
- this.showDone = false;
1008
- this.isDone = true;
1066
+ this.handleDoneDialogDismiss();
1009
1067
  } })), this.submitting && (h("div", { class: "loading-indicator" }, h("verdocs-loader", null)))));
1010
1068
  }
1011
1069
  if (this.delegating) {
@@ -1028,7 +1086,9 @@ const VerdocsSign = class {
1028
1086
  envelopeRecipientDecline(this.endpoint, this.envelopeId, this.roleId)
1029
1087
  .then(r => {
1030
1088
  console.log('[SIGN] Decline result', r);
1031
- window.location.reload();
1089
+ this.declining = false;
1090
+ this.fatalErrorHeader = 'Declined';
1091
+ this.fatalErrorMessage = 'You have declined to sign this request. The sender has been notified.';
1032
1092
  })
1033
1093
  .catch(e => {
1034
1094
  console.warn('[SIGN] Error declining signing session', e);
@@ -1096,7 +1156,7 @@ const VerdocsSign = class {
1096
1156
  const totalPages = this.envelope.documents.reduce((acc, doc) => acc + doc.pages, 0);
1097
1157
  const pageOptions = integerSequence(1, totalPages).map(p => ({ label: p.toString(), value: p.toString() }));
1098
1158
  let globalPageCounter = 0;
1099
- return (h(Host, null, this.toolbarStyle === 'menu' && (h("div", { id: "verdocs-sign-header" }, h("div", { class: "inner" }, h("div", { class: "title" }, this.envelope.name), h("div", { style: { flex: '1' } }), !this.finishLater &&
1159
+ return (h(Host, null, this.toolbarStyle === 'menu' && (h("div", { id: "verdocs-sign-header" }, h("div", { class: "inner" }, h("div", { class: "title" }, this.envelope.name), h("div", { style: { flex: '1' } }), !this.finishLater && !this.submitted &&
1100
1160
  (() => {
1101
1161
  const remaining = this.getRequiredTotalCount() - this.getRequiredFilledCount();
1102
1162
  const optionalLeft = this.getOptionalUnfilledCount();
@@ -1104,7 +1164,7 @@ const VerdocsSign = class {
1104
1164
  return (h("span", { class: "remaining-count" }, remaining, " required field", remaining === 1 ? '' : 's', " left"));
1105
1165
  }
1106
1166
  return (h("span", { class: "remaining-count" }, h("span", { class: "check-icon", innerHTML: CheckCircleIcon }), "All required fields complete", optionalLeft > 0 && (h("div", { class: "review-optional" }, h("span", { class: "separator" }, "| "), h("span", { onClick: () => this.handleNextOptional() }, "Review ", optionalLeft, " optional")))));
1107
- })(), !this.finishLater && (h("verdocs-button", { size: "xsmall", label: this.nextButtonLabel === 'Next' ? 'Next Required' : this.nextButtonLabel, disabled: !this.agreed || this.submitting, onClick: () => this.handleNext() })), h("div", { class: { 'icon-button': true, 'minus': true, 'disabled': this.zoomLevel === 'normal', 'magnify': true }, innerHTML: ToolbarMinusIcon, onClick: () => this.handleZoomOut() }), h("div", { class: { 'icon-button': true, 'plus': true, 'disabled': this.zoomLevel === 'zoom2', 'magnify': true }, innerHTML: ToolbarPlusIcon, onClick: () => this.handleZoomIn() }), h("verdocs-dropdown", { options: !this.isDone && !this.finishLater ? inProgressMenuOptions : doneMenuOptions, onOptionSelected: e => this.handleOptionSelected(e) })))), this.toolbarStyle === 'controls' && (h("div", { class: "controls-toolbar" }, h("div", { class: "left-controls" }, h("div", { class: "title" }, this.envelope.name)), h("div", { class: "center-controls" }, h("span", { class: "label" }, "Page"), h("div", { class: "select-wrapper" }, h("verdocs-select-input", { options: pageOptions, value: this.pageNumber.toString(), onInput: e => this.handlePageSelect(e) })), h("span", { class: "count" }, "of ", totalPages)), h("div", { class: "right-controls" }, h("verdocs-button", { class: "mobile-next-button", label: this.nextButtonLabel, size: "xsmall", disabled: !this.agreed || this.submitting, onClick: () => this.handleNext() }), h("div", { class: { 'icon-button': true, 'minus': true, 'disabled': this.zoomLevel === 'normal' }, innerHTML: ToolbarMinusIcon, onClick: () => this.handleZoomOut() }), h("div", { class: { 'icon-button': true, 'plus': true, 'disabled': this.zoomLevel === 'zoom2' }, innerHTML: ToolbarPlusIcon, onClick: () => this.handleZoomIn() }), h("div", { class: "icon-button download", innerHTML: ToolbarDownloadIcon, onClick: () => this.handleOptionSelected({ detail: { id: 'download' } }) }), h("div", { class: "icon-button print", innerHTML: ToolbarPrintIcon, onClick: () => this.handleOptionSelected({ detail: { id: 'print' } }) })))), h("div", { class: `document signed-document-container zoom-${this.zoomLevel}` }, (this.envelope.documents || []).map(envelopeDocument => {
1167
+ })(), !this.finishLater && !this.submitted && (h("verdocs-button", { size: "xsmall", label: this.nextButtonLabel === 'Next' ? 'Next Required' : this.nextButtonLabel, disabled: !this.agreed || this.submitting || this.submitted, onClick: () => this.handleNext() })), h("div", { class: { 'icon-button': true, 'minus': true, 'disabled': this.zoomLevel === 'normal', 'magnify': true }, innerHTML: ToolbarMinusIcon, onClick: () => this.handleZoomOut() }), h("div", { class: { 'icon-button': true, 'plus': true, 'disabled': this.zoomLevel === 'zoom2', 'magnify': true }, innerHTML: ToolbarPlusIcon, onClick: () => this.handleZoomIn() }), h("verdocs-dropdown", { options: !this.isDone && !this.finishLater && !this.submitted ? inProgressMenuOptions : doneMenuOptions, onOptionSelected: e => this.handleOptionSelected(e) })))), this.toolbarStyle === 'controls' && (h("div", { class: "controls-toolbar" }, h("div", { class: "left-controls" }, h("div", { class: "title" }, this.envelope.name)), h("div", { class: "center-controls" }, h("span", { class: "label" }, "Page"), h("div", { class: "select-wrapper" }, h("verdocs-select-input", { options: pageOptions, value: this.pageNumber.toString(), onInput: e => this.handlePageSelect(e) })), h("span", { class: "count" }, "of ", totalPages)), h("div", { class: "right-controls" }, !this.submitted && (h("verdocs-button", { class: "mobile-next-button", label: this.nextButtonLabel, size: "xsmall", disabled: !this.agreed || this.submitting, onClick: () => this.handleNext() })), h("div", { class: { 'icon-button': true, 'minus': true, 'disabled': this.zoomLevel === 'normal' }, innerHTML: ToolbarMinusIcon, onClick: () => this.handleZoomOut() }), h("div", { class: { 'icon-button': true, 'plus': true, 'disabled': this.zoomLevel === 'zoom2' }, innerHTML: ToolbarPlusIcon, onClick: () => this.handleZoomIn() }), h("div", { class: "icon-button download", innerHTML: ToolbarDownloadIcon, onClick: () => this.handleOptionSelected({ detail: { id: 'download' } }) }), h("div", { class: "icon-button print", innerHTML: ToolbarPrintIcon, onClick: () => this.handleOptionSelected({ detail: { id: 'print' } }) })))), h("div", { class: `document signed-document-container zoom-${this.zoomLevel}` }, (this.envelope.documents || []).map(envelopeDocument => {
1108
1168
  const pageNumbers = integerSequence(1, envelopeDocument.pages);
1109
1169
  return (h(Fragment, null, this.envelope.documents.length > 1 && (h("div", { class: "document-separator" }, h("div", { innerHTML: DocumentPageIcon }), h("span", null, envelopeDocument.name))), pageNumbers.map(pageNumber => {
1110
1170
  var _a;
@@ -1126,8 +1186,7 @@ const VerdocsSign = class {
1126
1186
  this.isDone = true;
1127
1187
  this.showFinishLater = false;
1128
1188
  } })), this.showDone && (h("verdocs-ok-dialog", { heading: "You're Done!", message: `You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`, onNext: () => {
1129
- this.showDone = false;
1130
- this.isDone = true;
1189
+ this.handleDoneDialogDismiss();
1131
1190
  } })), this.adoptingSignature && (h("verdocs-adopt-signature-dialog", { name: formatFullName(this.recipient), nameLocked: !!((_a = this.recipient) === null || _a === void 0 ? void 0 : _a.name_locked), onNext: async (e) => {
1132
1191
  console.log('[SIGN] Adopting signature/initials block', e.detail);
1133
1192
  this.showSpinner = true;
@@ -1165,7 +1224,7 @@ const VerdocsSign = class {
1165
1224
  }, onExit: () => (this.adoptingSignature = false) })), (this.submitting || this.showSpinner) && (h("verdocs-portal", null, h("div", { class: "spinner-overlay" }, h("verdocs-spinner", null)))), this.showDownloadDialog && (h("verdocs-download-dialog", { signed: this.envelope.signed, polling: this.polling, documents: this.envelope.documents, onExit: () => {
1166
1225
  this.showDownloadDialog = false;
1167
1226
  this.stopPolling();
1168
- }, onDownload: this.handleOnDownload })), !this.loading && !this.isDone && (h("verdocs-sign-footer", { endpoint: this.endpoint, envelopeId: this.envelopeId, isDone: this.isDone, onAskQuestion: (e) => {
1227
+ }, onDownload: e => this.handleOnDownload(e) })), !this.loading && !this.isDone && !this.submitted && (h("verdocs-sign-footer", { endpoint: this.endpoint, envelopeId: this.envelopeId, isDone: this.isDone, onAskQuestion: (e) => {
1169
1228
  askQuestion(this.endpoint, this.envelopeId, this.roleId, { question: e.detail.question })
1170
1229
  .then(() => VerdocsToast('Your question has been sent.', { style: 'success' }))
1171
1230
  .catch(e => {