@verdocs/web-sdk 4.2.148 → 4.2.149

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.
@@ -570,7 +570,7 @@ const VerdocsSign = class {
570
570
  return (index.h(index.Host, null, index.h("verdocs-loader", null)));
571
571
  }
572
572
  if (this.isDone) {
573
- return (index.h(index.Host, { class: { agreed: this.agreed } }, index.h("verdocs-view", { endpoint: this.endpoint, envelopeId: this.envelopeId, envelope: this.envelope, onSdkError: e => { var _a; return (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(e.detail); } }), this.errorMessage && index.h("verdocs-ok-dialog", { heading: "Network Error", message: this.errorMessage, onNext: () => (this.errorMessage = '') }), this.showDone && (index.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) => {
573
+ return (index.h(index.Host, { class: { agreed: this.agreed } }, index.h("verdocs-view", { endpoint: this.endpoint, envelopeId: this.envelopeId, envelope: this.envelope, onSdkError: e => { var _a; return (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(e.detail); } }), this.errorMessage && index.h("verdocs-ok-dialog", { heading: "Unable to Sign Document", message: this.errorMessage, onNext: () => (this.errorMessage = '') }), this.showDone && (index.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) => {
574
574
  e.preventDefault();
575
575
  e.stopPropagation();
576
576
  this.showDone = false;
@@ -634,15 +634,23 @@ const VerdocsSign = class {
634
634
  const kbaQuestion = this.kbaQuestions[questionNumber];
635
635
  console.log('Showing KBA question', { questionNumber, kbaQuestion }, this.kbaChoices);
636
636
  return (index.h(index.Host, { class: "kba" }, index.h("div", { id: "verdocs-sign-header" }, index.h("div", { class: "inner" }, index.h("img", { src: "https://verdocs.com/assets/white-logo.svg", alt: "Verdocs Logo", class: "logo" }), index.h("div", { class: "title" }, this.envelope.name))), index.h("div", { class: "document", style: { paddingTop: '15px' } }, index.h("img", { src: "https://public-assets.verdocs.com/loading-placeholder.png", style: { width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px' }, alt: "Placeholder page" })), index.h("div", { class: "cover" }, index.h("div", { class: "kba" }, index.h("verdocs-kba-dialog", { mode: "choice", helptitle: "Your identity requires additional verification", helptext: (kbaQuestion === null || kbaQuestion === void 0 ? void 0 : kbaQuestion.prompt) || 'Please select one of the options below.', choices: (kbaQuestion === null || kbaQuestion === void 0 ? void 0 : kbaQuestion.answer) || ['Skip Question'], step: questionNumber + 1, steps: this.kbaQuestions.length, onNext: async (e) => {
637
+ var _a, _b;
637
638
  const answer = e.detail;
638
639
  this.kbaChoices = [...this.kbaChoices, answer];
639
- console.log('Selected choice', e.detail, this.kbaChoices);
640
640
  if (this.kbaChoices.length >= this.kbaQuestions.length) {
641
641
  const responses = this.kbaQuestions.map((q, i) => ({ type: q.type, answer: this.kbaChoices[i] }));
642
642
  console.log('Submitting KBA responses', this.kbaChoices, responses);
643
- const response = await jsSdk.submitKbaChallengeResponse(this.endpoint, this.envelopeId, this.roleId, responses);
644
- console.log('KBA challenge response', response);
645
- this.kbaStep = 'complete';
643
+ try {
644
+ const response = await jsSdk.submitKbaChallengeResponse(this.endpoint, this.envelopeId, this.roleId, responses);
645
+ console.log('KBA challenge response', response);
646
+ this.kbaStep = '';
647
+ }
648
+ catch (e) {
649
+ console.log('Error submitting KBA challenge', e);
650
+ this.kbaStep = '';
651
+ this.errorMessage = ((_b = (_a = e.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.error) || 'Unable to verify identity.';
652
+ this.isDone = true;
653
+ }
646
654
  }
647
655
  } })))));
648
656
  }
@@ -574,7 +574,7 @@ export class VerdocsSign {
574
574
  return (h(Host, null, h("verdocs-loader", null)));
575
575
  }
576
576
  if (this.isDone) {
577
- return (h(Host, { class: { agreed: this.agreed } }, h("verdocs-view", { endpoint: this.endpoint, envelopeId: this.envelopeId, envelope: this.envelope, onSdkError: e => { var _a; return (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(e.detail); } }), this.errorMessage && h("verdocs-ok-dialog", { heading: "Network Error", message: this.errorMessage, onNext: () => (this.errorMessage = '') }), 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) => {
577
+ return (h(Host, { class: { agreed: this.agreed } }, h("verdocs-view", { endpoint: this.endpoint, envelopeId: this.envelopeId, envelope: this.envelope, onSdkError: e => { var _a; return (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(e.detail); } }), this.errorMessage && h("verdocs-ok-dialog", { heading: "Unable to Sign Document", message: this.errorMessage, onNext: () => (this.errorMessage = '') }), 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) => {
578
578
  e.preventDefault();
579
579
  e.stopPropagation();
580
580
  this.showDone = false;
@@ -638,15 +638,23 @@ export class VerdocsSign {
638
638
  const kbaQuestion = this.kbaQuestions[questionNumber];
639
639
  console.log('Showing KBA question', { questionNumber, kbaQuestion }, this.kbaChoices);
640
640
  return (h(Host, { class: "kba" }, h("div", { id: "verdocs-sign-header" }, h("div", { class: "inner" }, h("img", { src: "https://verdocs.com/assets/white-logo.svg", alt: "Verdocs Logo", class: "logo" }), h("div", { class: "title" }, this.envelope.name))), h("div", { class: "document", style: { paddingTop: '15px' } }, h("img", { src: "https://public-assets.verdocs.com/loading-placeholder.png", style: { width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px' }, alt: "Placeholder page" })), h("div", { class: "cover" }, h("div", { class: "kba" }, h("verdocs-kba-dialog", { mode: "choice", helptitle: "Your identity requires additional verification", helptext: (kbaQuestion === null || kbaQuestion === void 0 ? void 0 : kbaQuestion.prompt) || 'Please select one of the options below.', choices: (kbaQuestion === null || kbaQuestion === void 0 ? void 0 : kbaQuestion.answer) || ['Skip Question'], step: questionNumber + 1, steps: this.kbaQuestions.length, onNext: async (e) => {
641
+ var _a, _b;
641
642
  const answer = e.detail;
642
643
  this.kbaChoices = [...this.kbaChoices, answer];
643
- console.log('Selected choice', e.detail, this.kbaChoices);
644
644
  if (this.kbaChoices.length >= this.kbaQuestions.length) {
645
645
  const responses = this.kbaQuestions.map((q, i) => ({ type: q.type, answer: this.kbaChoices[i] }));
646
646
  console.log('Submitting KBA responses', this.kbaChoices, responses);
647
- const response = await submitKbaChallengeResponse(this.endpoint, this.envelopeId, this.roleId, responses);
648
- console.log('KBA challenge response', response);
649
- this.kbaStep = 'complete';
647
+ try {
648
+ const response = await submitKbaChallengeResponse(this.endpoint, this.envelopeId, this.roleId, responses);
649
+ console.log('KBA challenge response', response);
650
+ this.kbaStep = '';
651
+ }
652
+ catch (e) {
653
+ console.log('Error submitting KBA challenge', e);
654
+ this.kbaStep = '';
655
+ this.errorMessage = ((_b = (_a = e.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.error) || 'Unable to verify identity.';
656
+ this.isDone = true;
657
+ }
650
658
  }
651
659
  } })))));
652
660
  }
@@ -573,7 +573,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
573
573
  return (h(Host, null, h("verdocs-loader", null)));
574
574
  }
575
575
  if (this.isDone) {
576
- return (h(Host, { class: { agreed: this.agreed } }, h("verdocs-view", { endpoint: this.endpoint, envelopeId: this.envelopeId, envelope: this.envelope, onSdkError: e => { var _a; return (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(e.detail); } }), this.errorMessage && h("verdocs-ok-dialog", { heading: "Network Error", message: this.errorMessage, onNext: () => (this.errorMessage = '') }), 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) => {
576
+ return (h(Host, { class: { agreed: this.agreed } }, h("verdocs-view", { endpoint: this.endpoint, envelopeId: this.envelopeId, envelope: this.envelope, onSdkError: e => { var _a; return (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(e.detail); } }), this.errorMessage && h("verdocs-ok-dialog", { heading: "Unable to Sign Document", message: this.errorMessage, onNext: () => (this.errorMessage = '') }), 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) => {
577
577
  e.preventDefault();
578
578
  e.stopPropagation();
579
579
  this.showDone = false;
@@ -637,15 +637,23 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
637
637
  const kbaQuestion = this.kbaQuestions[questionNumber];
638
638
  console.log('Showing KBA question', { questionNumber, kbaQuestion }, this.kbaChoices);
639
639
  return (h(Host, { class: "kba" }, h("div", { id: "verdocs-sign-header" }, h("div", { class: "inner" }, h("img", { src: "https://verdocs.com/assets/white-logo.svg", alt: "Verdocs Logo", class: "logo" }), h("div", { class: "title" }, this.envelope.name))), h("div", { class: "document", style: { paddingTop: '15px' } }, h("img", { src: "https://public-assets.verdocs.com/loading-placeholder.png", style: { width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px' }, alt: "Placeholder page" })), h("div", { class: "cover" }, h("div", { class: "kba" }, h("verdocs-kba-dialog", { mode: "choice", helptitle: "Your identity requires additional verification", helptext: (kbaQuestion === null || kbaQuestion === void 0 ? void 0 : kbaQuestion.prompt) || 'Please select one of the options below.', choices: (kbaQuestion === null || kbaQuestion === void 0 ? void 0 : kbaQuestion.answer) || ['Skip Question'], step: questionNumber + 1, steps: this.kbaQuestions.length, onNext: async (e) => {
640
+ var _a, _b;
640
641
  const answer = e.detail;
641
642
  this.kbaChoices = [...this.kbaChoices, answer];
642
- console.log('Selected choice', e.detail, this.kbaChoices);
643
643
  if (this.kbaChoices.length >= this.kbaQuestions.length) {
644
644
  const responses = this.kbaQuestions.map((q, i) => ({ type: q.type, answer: this.kbaChoices[i] }));
645
645
  console.log('Submitting KBA responses', this.kbaChoices, responses);
646
- const response = await submitKbaChallengeResponse(this.endpoint, this.envelopeId, this.roleId, responses);
647
- console.log('KBA challenge response', response);
648
- this.kbaStep = 'complete';
646
+ try {
647
+ const response = await submitKbaChallengeResponse(this.endpoint, this.envelopeId, this.roleId, responses);
648
+ console.log('KBA challenge response', response);
649
+ this.kbaStep = '';
650
+ }
651
+ catch (e) {
652
+ console.log('Error submitting KBA challenge', e);
653
+ this.kbaStep = '';
654
+ this.errorMessage = ((_b = (_a = e.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.error) || 'Unable to verify identity.';
655
+ this.isDone = true;
656
+ }
649
657
  }
650
658
  } })))));
651
659
  }