@hubsync/esign-web-sdk 6.9.22 → 6.9.24

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 (42) hide show
  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
  2. package/dist/cjs/verdocs-adopt-signature-dialog_8.cjs.entry.js +11 -1
  3. package/dist/cjs/verdocs-sign.cjs.entry.js +4 -4
  4. package/dist/cjs/verdocs-sign.entry.cjs.js.map +1 -1
  5. package/dist/collection/components/dialogs/verdocs-signing-progress/verdocs-signing-progress.js +11 -1
  6. package/dist/collection/components/dialogs/verdocs-signing-progress/verdocs-signing-progress.js.map +1 -1
  7. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +4 -4
  8. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
  9. package/dist/components/{p-DO7oSTLI.js → p-DAj3-nII.js} +13 -3
  10. package/dist/components/p-DAj3-nII.js.map +1 -0
  11. package/dist/components/verdocs-sign.js +5 -5
  12. package/dist/components/verdocs-sign.js.map +1 -1
  13. package/dist/components/verdocs-signing-progress.js +1 -1
  14. 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
  15. package/dist/esm/verdocs-adopt-signature-dialog_8.entry.js +11 -1
  16. package/dist/esm/verdocs-sign.entry.js +4 -4
  17. package/dist/esm/verdocs-sign.entry.js.map +1 -1
  18. 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
  19. package/dist/esm-es5/verdocs-adopt-signature-dialog_8.entry.js +1 -1
  20. package/dist/esm-es5/verdocs-adopt-signature-dialog_8.entry.js.map +1 -1
  21. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  22. package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
  23. package/dist/verdocs-web-sdk/{p-Dw4daWgN.system.js.map → p--ERssswi.system.js.map} +1 -1
  24. package/dist/verdocs-web-sdk/{p-e6659ac9.system.entry.js → p-3896764c.system.entry.js} +2 -2
  25. package/dist/verdocs-web-sdk/{p-e6659ac9.system.entry.js.map → p-3896764c.system.entry.js.map} +1 -1
  26. package/dist/verdocs-web-sdk/{p-67b09919.system.entry.js → p-4a408b0d.system.entry.js} +2 -2
  27. package/dist/verdocs-web-sdk/p-4a408b0d.system.entry.js.map +1 -0
  28. package/dist/verdocs-web-sdk/p-7365a0e7.entry.js +2 -0
  29. package/dist/verdocs-web-sdk/{p-4a48c099.entry.js.map → p-7365a0e7.entry.js.map} +1 -1
  30. package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
  31. package/dist/verdocs-web-sdk/p-CWM0-2JJ.system.js.map +1 -0
  32. package/dist/verdocs-web-sdk/{p-dbffd9a8.entry.js → p-bb4ab10a.entry.js} +2 -2
  33. package/dist/verdocs-web-sdk/p-bb4ab10a.entry.js.map +1 -0
  34. 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
  35. package/dist/verdocs-web-sdk/verdocs-sign.entry.esm.js.map +1 -1
  36. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  37. package/package.json +1 -1
  38. package/dist/components/p-DO7oSTLI.js.map +0 -1
  39. package/dist/verdocs-web-sdk/p-4a48c099.entry.js +0 -2
  40. package/dist/verdocs-web-sdk/p-67b09919.system.entry.js.map +0 -1
  41. package/dist/verdocs-web-sdk/p-BAkWhq53.system.js.map +0 -1
  42. package/dist/verdocs-web-sdk/p-dbffd9a8.entry.js.map +0 -1
@@ -52,7 +52,17 @@ export class VerdocsSigningProgress {
52
52
  if (this.mode === 'completed') {
53
53
  return this.renderCompleted();
54
54
  }
55
- const isFilled = (f) => isFieldFilled(f, this.recipientFields) && (f.type !== 'dropdown' || !!f.value) && (f.type !== 'radio' || f.value === 'true') && (f.type !== 'checkbox' || f.value === 'true');
55
+ const isFilled = (f) => {
56
+ var _a;
57
+ // The server keeps value="signed" even after a signature/initial is cleared, so
58
+ // isFieldFilled (which looks at value) would still report it as filled. settings.signature_id
59
+ // is the authoritative indicator and is nulled out on clear. This must match the parent's
60
+ // isFieldActuallyFilled() in verdocs-sign so the progress panel and submit gating agree.
61
+ if (f.type === 'signature' || f.type === 'initial') {
62
+ return !!((_a = f.settings) === null || _a === void 0 ? void 0 : _a.signature_id);
63
+ }
64
+ return isFieldFilled(f, this.recipientFields) && (f.type !== 'dropdown' || !!f.value) && (f.type !== 'radio' || f.value === 'true') && (f.type !== 'checkbox' || f.value === 'true');
65
+ };
56
66
  const requiredFields = this.fields.filter(f => f.required);
57
67
  const requiredRemaining = requiredFields.filter(f => !isFilled(f)).length;
58
68
  const optionalFields = this.fields.filter(f => !f.required);
@@ -1 +1 @@
1
- {"version":3,"file":"verdocs-signing-progress.js","sourceRoot":"","sources":["../../../../src/components/dialogs/verdocs-signing-progress/verdocs-signing-progress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAe,MAAM,eAAe,CAAC;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAMnD,MAAM,OAAO,sBAAsB;IAJnC;QAKE;;WAEG;QACK,SAAI,GAAsC,OAAO,CAAC;QAE1D;;WAEG;QACK,iBAAY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wB;oBAChC,iBAAiB;;oBAAM,cAAc,CAAC,MAAM;iDACzC,CACP,CACG;YAEN,WAAK,KAAK,EAAC,MAAM,IACd,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,iBAAiB,KAAK,CAAC,CAAC,CAC/H;YAEN,WAAK,KAAK,EAAC,WAAW,GAAG;YAExB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,iBAAiB,CAAC,CAC5F,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {IEnvelopeField, isFieldFilled} from '@verdocs/js-sdk';\nimport {Component, Prop, h, Event, EventEmitter} from '@stencil/core';\nimport {getFieldLabel} from '../../../utils/utils';\n\n@Component({\n tag: 'verdocs-signing-progress',\n styleUrl: 'verdocs-signing-progress.scss',\n})\nexport class VerdocsSigningProgress {\n /**\n * Display mode\n */\n @Prop() mode: 'start' | 'signing' | 'completed' = 'start';\n\n /**\n * The name of the currently focused field (to highlight it and show its label)\n */\n @Prop() focusedField: string = '';\n\n /**\n * All fillable fields for the current recipient\n */\n @Prop() fields: IEnvelopeField[] = [];\n\n /**\n * All fields for the recipient, used to check filled status (may include non-fillable)\n */\n @Prop() recipientFields: IEnvelopeField[] = [];\n\n /**\n * Names of optional fields the user has explicitly skipped\n */\n @Prop() skippedFields: string[] = [];\n\n /**\n * Emitted when user clicks Start\n */\n @Event({composed: true}) started: EventEmitter;\n\n /**\n * Emitted when user clicks Next\n */\n @Event({composed: true}) next: EventEmitter;\n\n /**\n * Emitted when user clicks Previous\n */\n @Event({composed: true}) previous: EventEmitter;\n\n /**\n * Emitted when user clicks Submit\n */\n @Event({composed: true}) exit: EventEmitter;\n\n renderSuccessIcon() {\n return (\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M10 2C14.4183 2 18 5.58172 18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2ZM10 3C6.13401 3 3 6.13401 3 10C3 13.866 6.13401 17 10 17C13.866 17 17 13.866 17 10C17 6.13401 13.866 3 10 3ZM13.3584 7.64645C13.532 7.82001 13.5513 8.08944 13.4163 8.28431L13.3584 8.35355L9.35355 12.3584C9.17999 12.532 8.91056 12.5513 8.71569 12.4163L8.64645 12.3584L6.64645 10.3584C6.45118 10.1632 6.45118 9.84658 6.64645 9.65131C6.82001 9.47775 7.08944 9.45846 7.28431 9.59346L7.35355 9.65131L9 11.298L12.6513 7.64645C12.8466 7.45118 13.1632 7.45118 13.3584 7.64645Z\"\n fill=\"#107C10\"\n />\n </svg>\n );\n }\n\n renderContent(fieldLabel: string, fieldCompleted: boolean, readyToSubmit: boolean) {\n if (this.mode === 'start') {\n return <div class=\"field-label\">{fieldLabel}</div>;\n }\n\n if (fieldCompleted && readyToSubmit) {\n return (\n <div class=\"field-completed\">\n <div class=\"icon\">{this.renderSuccessIcon()}</div>\n <span class=\"text\">Ready to submit.</span>\n </div>\n );\n }\n\n return <div class=\"field-label\">{fieldLabel}</div>;\n }\n\n renderFooter(current: number, _total: number, requiredRemaining: number, optionalRemaining: number) {\n if (this.mode === 'start') {\n return (\n <button class=\"btn start\" onClick={() => this.started.emit()}>\n Start Signing\n </button>\n );\n }\n\n return (\n <div class=\"nav-buttons\">\n {requiredRemaining === 0 && optionalRemaining === 0 ? (\n <button class=\"btn submit\" onClick={() => this.exit.emit()}>\n Submit\n </button>\n ) : (\n [\n <button class=\"btn previous\" disabled={current <= 1} onClick={() => this.previous.emit()}>\n Previous\n </button>,\n <button class=\"btn next\" onClick={() => this.next.emit()}>\n Next\n </button>,\n ]\n )}\n </div>\n );\n }\n\n renderCompleted() {\n return (\n <div class=\"card completed\">\n <div class=\"header-completed\">\n <div class=\"icon\">{this.renderSuccessIcon()}</div>\n Ready to Submit\n </div>\n <div class=\"description\">You have entered all requested signatures. Select Submit to complete the signing process.</div>\n <div class=\"separator\" />\n <button class=\"btn submit\" onClick={() => this.exit.emit()}>\n Submit\n </button>\n </div>\n );\n }\n\n render() {\n if (this.mode === 'completed') {\n return this.renderCompleted();\n }\n\n const isFilled = (f: IEnvelopeField) =>\n isFieldFilled(f, this.recipientFields) && (f.type !== 'dropdown' || !!f.value) && (f.type !== 'radio' || f.value === 'true') && (f.type !== 'checkbox' || f.value === 'true');\n\n const requiredFields = this.fields.filter(f => f.required);\n const requiredRemaining = requiredFields.filter(f => !isFilled(f)).length;\n\n const optionalFields = this.fields.filter(f => !f.required);\n const optionalRemaining = optionalFields.filter(f => !isFilled(f) && !this.skippedFields.includes(f.name)).length;\n\n const focusedFieldObj = this.fields.find(f => f.name === this.focusedField);\n const currentIndex = this.fields.findIndex(f => f.name === this.focusedField) + 1;\n const totalFields = this.fields.length;\n\n return (\n <div class=\"card\">\n <div class=\"header\">\n <div class=\"progress-line\">\n {requiredRemaining} of {requiredFields.length} required fields remaining\n </div>\n {optionalFields.length > 0 && (\n <div class=\"progress-line optional\">\n {optionalRemaining} of {optionalFields.length} optional fields remaining\n </div>\n )}\n </div>\n\n <div class=\"body\">\n {this.renderContent(getFieldLabel(focusedFieldObj), focusedFieldObj ? !!isFilled(focusedFieldObj) : false, requiredRemaining === 0)}\n </div>\n\n <div class=\"separator\" />\n\n {this.renderFooter(Math.max(1, currentIndex), totalFields, requiredRemaining, optionalRemaining)}\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"verdocs-signing-progress.js","sourceRoot":"","sources":["../../../../src/components/dialogs/verdocs-signing-progress/verdocs-signing-progress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAe,MAAM,eAAe,CAAC;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAMnD,MAAM,OAAO,sBAAsB;IAJnC;QAKE;;WAEG;QACK,SAAI,GAAsC,OAAO,CAAC;QAE1D;;WAEG;QACK,iBAAY,GAAW,EAAE,CAAC;QAElC;;WAEG;QACK,WAAM,GAAqB,EAAE,CAAC;QAEtC;;WAEG;QACK,oBAAe,GAAqB,EAAE,CAAC;QAE/C;;WAEG;QACK,kBAAa,GAAa,EAAE,CAAC;KAiJtC;IA3HC,iBAAiB;QACf,OAAO,CACL,WAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B;YAC5F,YACE,CAAC,EAAC,skBAAskB,EACxkB,IAAI,EAAC,SAAS,GACd,CACE,CACP,CAAC;IACJ,CAAC;IAED,aAAa,CAAC,UAAkB,EAAE,cAAuB,EAAE,aAAsB;QAC/E,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YAC1B,OAAO,WAAK,KAAK,EAAC,aAAa,IAAE,UAAU,CAAO,CAAC;QACrD,CAAC;QAED,IAAI,cAAc,IAAI,aAAa,EAAE,CAAC;YACpC,OAAO,CACL,WAAK,KAAK,EAAC,iBAAiB;gBAC1B,WAAK,KAAK,EAAC,MAAM,IAAE,IAAI,CAAC,iBAAiB,EAAE,CAAO;gBAClD,YAAM,KAAK,EAAC,MAAM,uBAAwB,CACtC,CACP,CAAC;QACJ,CAAC;QAED,OAAO,WAAK,KAAK,E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {IEnvelopeField, isFieldFilled} from '@verdocs/js-sdk';\nimport {Component, Prop, h, Event, EventEmitter} from '@stencil/core';\nimport {getFieldLabel} from '../../../utils/utils';\n\n@Component({\n tag: 'verdocs-signing-progress',\n styleUrl: 'verdocs-signing-progress.scss',\n})\nexport class VerdocsSigningProgress {\n /**\n * Display mode\n */\n @Prop() mode: 'start' | 'signing' | 'completed' = 'start';\n\n /**\n * The name of the currently focused field (to highlight it and show its label)\n */\n @Prop() focusedField: string = '';\n\n /**\n * All fillable fields for the current recipient\n */\n @Prop() fields: IEnvelopeField[] = [];\n\n /**\n * All fields for the recipient, used to check filled status (may include non-fillable)\n */\n @Prop() recipientFields: IEnvelopeField[] = [];\n\n /**\n * Names of optional fields the user has explicitly skipped\n */\n @Prop() skippedFields: string[] = [];\n\n /**\n * Emitted when user clicks Start\n */\n @Event({composed: true}) started: EventEmitter;\n\n /**\n * Emitted when user clicks Next\n */\n @Event({composed: true}) next: EventEmitter;\n\n /**\n * Emitted when user clicks Previous\n */\n @Event({composed: true}) previous: EventEmitter;\n\n /**\n * Emitted when user clicks Submit\n */\n @Event({composed: true}) exit: EventEmitter;\n\n renderSuccessIcon() {\n return (\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M10 2C14.4183 2 18 5.58172 18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2ZM10 3C6.13401 3 3 6.13401 3 10C3 13.866 6.13401 17 10 17C13.866 17 17 13.866 17 10C17 6.13401 13.866 3 10 3ZM13.3584 7.64645C13.532 7.82001 13.5513 8.08944 13.4163 8.28431L13.3584 8.35355L9.35355 12.3584C9.17999 12.532 8.91056 12.5513 8.71569 12.4163L8.64645 12.3584L6.64645 10.3584C6.45118 10.1632 6.45118 9.84658 6.64645 9.65131C6.82001 9.47775 7.08944 9.45846 7.28431 9.59346L7.35355 9.65131L9 11.298L12.6513 7.64645C12.8466 7.45118 13.1632 7.45118 13.3584 7.64645Z\"\n fill=\"#107C10\"\n />\n </svg>\n );\n }\n\n renderContent(fieldLabel: string, fieldCompleted: boolean, readyToSubmit: boolean) {\n if (this.mode === 'start') {\n return <div class=\"field-label\">{fieldLabel}</div>;\n }\n\n if (fieldCompleted && readyToSubmit) {\n return (\n <div class=\"field-completed\">\n <div class=\"icon\">{this.renderSuccessIcon()}</div>\n <span class=\"text\">Ready to submit.</span>\n </div>\n );\n }\n\n return <div class=\"field-label\">{fieldLabel}</div>;\n }\n\n renderFooter(current: number, _total: number, requiredRemaining: number, optionalRemaining: number) {\n if (this.mode === 'start') {\n return (\n <button class=\"btn start\" onClick={() => this.started.emit()}>\n Start Signing\n </button>\n );\n }\n\n return (\n <div class=\"nav-buttons\">\n {requiredRemaining === 0 && optionalRemaining === 0 ? (\n <button class=\"btn submit\" onClick={() => this.exit.emit()}>\n Submit\n </button>\n ) : (\n [\n <button class=\"btn previous\" disabled={current <= 1} onClick={() => this.previous.emit()}>\n Previous\n </button>,\n <button class=\"btn next\" onClick={() => this.next.emit()}>\n Next\n </button>,\n ]\n )}\n </div>\n );\n }\n\n renderCompleted() {\n return (\n <div class=\"card completed\">\n <div class=\"header-completed\">\n <div class=\"icon\">{this.renderSuccessIcon()}</div>\n Ready to Submit\n </div>\n <div class=\"description\">You have entered all requested signatures. Select Submit to complete the signing process.</div>\n <div class=\"separator\" />\n <button class=\"btn submit\" onClick={() => this.exit.emit()}>\n Submit\n </button>\n </div>\n );\n }\n\n render() {\n if (this.mode === 'completed') {\n return this.renderCompleted();\n }\n\n const isFilled = (f: IEnvelopeField) => {\n // The server keeps value=\"signed\" even after a signature/initial is cleared, so\n // isFieldFilled (which looks at value) would still report it as filled. settings.signature_id\n // is the authoritative indicator and is nulled out on clear. This must match the parent's\n // isFieldActuallyFilled() in verdocs-sign so the progress panel and submit gating agree.\n if (f.type === 'signature' || f.type === 'initial') {\n return !!(f.settings as any)?.signature_id;\n }\n\n return isFieldFilled(f, this.recipientFields) && (f.type !== 'dropdown' || !!f.value) && (f.type !== 'radio' || f.value === 'true') && (f.type !== 'checkbox' || f.value === 'true');\n };\n\n const requiredFields = this.fields.filter(f => f.required);\n const requiredRemaining = requiredFields.filter(f => !isFilled(f)).length;\n\n const optionalFields = this.fields.filter(f => !f.required);\n const optionalRemaining = optionalFields.filter(f => !isFilled(f) && !this.skippedFields.includes(f.name)).length;\n\n const focusedFieldObj = this.fields.find(f => f.name === this.focusedField);\n const currentIndex = this.fields.findIndex(f => f.name === this.focusedField) + 1;\n const totalFields = this.fields.length;\n\n return (\n <div class=\"card\">\n <div class=\"header\">\n <div class=\"progress-line\">\n {requiredRemaining} of {requiredFields.length} required fields remaining\n </div>\n {optionalFields.length > 0 && (\n <div class=\"progress-line optional\">\n {optionalRemaining} of {optionalFields.length} optional fields remaining\n </div>\n )}\n </div>\n\n <div class=\"body\">\n {this.renderContent(getFieldLabel(focusedFieldObj), focusedFieldObj ? !!isFilled(focusedFieldObj) : false, requiredRemaining === 0)}\n </div>\n\n <div class=\"separator\" />\n\n {this.renderFooter(Math.max(1, currentIndex), totalFields, requiredRemaining, optionalRemaining)}\n </div>\n );\n }\n}\n"]}
@@ -270,7 +270,7 @@ export class VerdocsSign {
270
270
  // TODO: Recipient "canceled"
271
271
  if (this.envelope.status === 'canceled') {
272
272
  this.fatalErrorHeader = 'Unable to Start Signing Session';
273
- this.fatalErrorMessage = 'This envelope has been canceled. The sender has been notified.';
273
+ this.fatalErrorMessage = 'This document has been canceled. The sender has been notified.';
274
274
  }
275
275
  else if (recipient.status === 'declined') {
276
276
  this.fatalErrorHeader = 'Declined';
@@ -1050,7 +1050,7 @@ export class VerdocsSign {
1050
1050
  return (h(Host, { class: { agreed: false } }, h("div", { class: "fatal-error" }, h("div", { class: "message" }, h("div", { class: "header" }, "Delegated Signing Request"), h("p", null, "You have delegated signing to another recipient. You will not be able to sign this request again.")))));
1051
1051
  }
1052
1052
  if (this.isDone) {
1053
- 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.`, hideCloseButton: true, onNext: (e) => {
1053
+ 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 completed document and certificate attached.`, hideCloseButton: true, onNext: (e) => {
1054
1054
  e.preventDefault();
1055
1055
  e.stopPropagation();
1056
1056
  this.showDone = false;
@@ -1073,7 +1073,7 @@ export class VerdocsSign {
1073
1073
  } })));
1074
1074
  }
1075
1075
  if (this.declining) {
1076
- return (h(Host, { class: "agreed" }, 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("verdocs-ok-dialog", { heading: "Decline Signing Request", message: `If you decline to sign this request, you will not be able to sign again in the future. The envelope sender will be notified.`, buttonLabel: "OK", showCancel: true, onExit: () => (this.declining = false), onNext: () => {
1076
+ return (h(Host, { class: "agreed" }, 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("verdocs-ok-dialog", { heading: "Decline Signing Request", message: `If you decline to sign this request, you will not be able to sign again in the future. The sender of the document will be notified.`, buttonLabel: "OK", showCancel: true, onExit: () => (this.declining = false), onNext: () => {
1077
1077
  envelopeRecipientDecline(this.endpoint, this.envelopeId, this.roleId)
1078
1078
  .then(r => {
1079
1079
  console.log('[SIGN] Decline result', r);
@@ -1179,7 +1179,7 @@ export class VerdocsSign {
1179
1179
  })), this.showFinishLater && (h("verdocs-ok-dialog", { heading: "You've saved your document to finish later.", message: `To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`, hideCloseButton: true, onNext: () => {
1180
1180
  this.isDone = true;
1181
1181
  this.showFinishLater = false;
1182
- } })), 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.`, hideCloseButton: true, onNext: () => {
1182
+ } })), 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 completed document and certificate attached.`, hideCloseButton: true, onNext: () => {
1183
1183
  this.showDone = false;
1184
1184
  this.isDone = true;
1185
1185
  } })), 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) => {