@verdocs/web-sdk 4.2.147 → 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.
Files changed (29) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/verdocs-kba-dialog_2.cjs.entry.js +6 -4
  3. package/dist/cjs/verdocs-sign.cjs.entry.js +13 -4
  4. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  5. package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.css +2 -0
  6. package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.js +5 -4
  7. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +13 -4
  8. package/dist/components/{p-4645d622.js → p-ce71f0a7.js} +6 -5
  9. package/dist/components/verdocs-kba-dialog.js +1 -1
  10. package/dist/components/verdocs-sign.js +14 -5
  11. package/dist/custom-elements.json +2013 -0
  12. package/dist/esm/loader.js +1 -1
  13. package/dist/esm/verdocs-kba-dialog_2.entry.js +6 -4
  14. package/dist/esm/verdocs-sign.entry.js +13 -4
  15. package/dist/esm/verdocs-web-sdk.js +1 -1
  16. package/dist/esm-es5/loader.js +1 -1
  17. package/dist/esm-es5/verdocs-kba-dialog_2.entry.js +1 -1
  18. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  19. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  20. package/dist/types/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.d.ts +0 -1
  21. package/dist/verdocs-web-sdk/{p-24f52333.system.entry.js → p-04cc3a32.system.entry.js} +1 -1
  22. package/dist/verdocs-web-sdk/p-569434fb.system.js +1 -1
  23. package/dist/verdocs-web-sdk/p-6bafa602.system.entry.js +1 -0
  24. package/dist/verdocs-web-sdk/p-c26e9f70.entry.js +1 -0
  25. package/dist/verdocs-web-sdk/{p-13dd7c4b.entry.js → p-f695ade2.entry.js} +1 -1
  26. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  27. package/package.json +2 -2
  28. package/dist/verdocs-web-sdk/p-4a2b3dd6.entry.js +0 -1
  29. package/dist/verdocs-web-sdk/p-57834c7a.system.entry.js +0 -1
@@ -8,7 +8,7 @@ import { d as defineCustomElement$b } from './p-ac7578f6.js';
8
8
  import { d as defineCustomElement$a } from './p-4dc4418a.js';
9
9
  import { d as defineCustomElement$9 } from './p-df4ac086.js';
10
10
  import { d as defineCustomElement$8 } from './p-fbc69665.js';
11
- import { d as defineCustomElement$7 } from './p-4645d622.js';
11
+ import { d as defineCustomElement$7 } from './p-ce71f0a7.js';
12
12
  import { d as defineCustomElement$6 } from './p-90540412.js';
13
13
  import { d as defineCustomElement$5 } from './p-83245875.js';
14
14
  import { d as defineCustomElement$4 } from './p-8b27ce22.js';
@@ -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,14 +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
643
  if (this.kbaChoices.length >= this.kbaQuestions.length) {
643
644
  const responses = this.kbaQuestions.map((q, i) => ({ type: q.type, answer: this.kbaChoices[i] }));
644
645
  console.log('Submitting KBA responses', this.kbaChoices, responses);
645
- const response = await submitKbaChallengeResponse(this.endpoint, this.envelopeId, this.roleId, { responses });
646
- console.log('KBA challenge response', response);
647
- 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
+ }
648
657
  }
649
658
  } })))));
650
659
  }