@hubsync/esign-web-sdk 6.9.40 → 6.9.42

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 (34) 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 +6 -5
  3. package/dist/collection/components/dialogs/verdocs-adopt-signature-dialog/verdocs-adopt-signature-dialog.js +3 -3
  4. package/dist/collection/components/dialogs/verdocs-adopt-signature-dialog/verdocs-adopt-signature-dialog.js.map +1 -1
  5. package/dist/collection/components/dialogs/verdocs-signing-progress/verdocs-signing-progress.js +3 -2
  6. package/dist/collection/components/dialogs/verdocs-signing-progress/verdocs-signing-progress.js.map +1 -1
  7. package/dist/components/{p-DVaiNky1.js → p-CTVwI6I-.js} +5 -4
  8. package/dist/components/p-CTVwI6I-.js.map +1 -0
  9. package/dist/components/{p-PzCAS0cD.js → p-Dpuy1yah.js} +5 -5
  10. package/dist/components/p-Dpuy1yah.js.map +1 -0
  11. package/dist/components/verdocs-adopt-signature-dialog.js +1 -1
  12. package/dist/components/verdocs-sign.js +2 -2
  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 +6 -5
  16. 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
  17. package/dist/esm-es5/verdocs-adopt-signature-dialog_8.entry.js +1 -1
  18. package/dist/esm-es5/verdocs-adopt-signature-dialog_8.entry.js.map +1 -1
  19. package/dist/verdocs-web-sdk/p-3c6e0a1f.entry.js +2 -0
  20. package/dist/verdocs-web-sdk/p-3c6e0a1f.entry.js.map +1 -0
  21. package/dist/verdocs-web-sdk/p-7c5d6848.system.entry.js +2 -0
  22. package/dist/verdocs-web-sdk/p-7c5d6848.system.entry.js.map +1 -0
  23. package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
  24. package/dist/verdocs-web-sdk/p-TlalAeRR.system.js.map +1 -0
  25. 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
  26. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  27. package/package.json +1 -1
  28. package/dist/components/p-DVaiNky1.js.map +0 -1
  29. package/dist/components/p-PzCAS0cD.js.map +0 -1
  30. package/dist/verdocs-web-sdk/p-059fd4b5.entry.js +0 -2
  31. package/dist/verdocs-web-sdk/p-059fd4b5.entry.js.map +0 -1
  32. package/dist/verdocs-web-sdk/p-BwRWY36P.system.js.map +0 -1
  33. package/dist/verdocs-web-sdk/p-e39c7d6b.system.entry.js +0 -2
  34. package/dist/verdocs-web-sdk/p-e39c7d6b.system.entry.js.map +0 -1
@@ -453,11 +453,11 @@ const VerdocsAdoptSignatureDialog = class {
453
453
  };
454
454
  }
455
455
  render() {
456
- return (index.h("verdocs-dialog", { key: '462948fa67d1a3e32c0fdd03d0183f8b822eb312' }, index.h("div", { key: 'f05a30ae50b16934a983f29b2d27ddfc4b3fb3b4', slot: "heading", class: "heading" }, "Adopt Your Signature"), index.h("div", { key: '1a2aa7ace11493961d251ad6bc6ce3406a625532', slot: "content", class: "content" }, index.h("div", { key: 'd4f11c53451ce55c875320829016bf3a7009b8dc', style: { fontWeight: '300', color: '#242424', fontSize: '13px' } }, "Confirm your name, initials, and signature."), index.h("div", { key: '5bd2c07de6a5f3f4e31d308c62d4f8805822fcf9', class: { type: true, active: this.mode === 'type' } }, index.h("verdocs-text-input", { key: '1d6a6a26e1cd66442d7a4d44040a41d66251de55', label: "Full Name", value: this.enteredName, disabled: this.nameLocked, onInput: e => this.handleNameChange(e), onClick: e => e.stopPropagation() }), this.nameLocked && index.h("div", { key: '2a839a7f0791dc5af3154471f7730f0f23e1cf36', class: "name-locked-hint" }, "Your name has been set by the sender and cannot be changed.")), index.h("div", { key: '6090f63b7bb0be98a9cc02705dd2cc2d4e573d3c', style: { fontWeight: '400', color: '#242424', fontSize: '13px' } }, "Select a signature style"), index.h("div", { key: '4ff274227aad18cb5ba62ee876bbb848cca8c111', style: { display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px' } }, index.h("verdocs-radio-button", { key: '6d8c8784e20426fc4cab54aaf1f4d976872b49b1', checked: this.mode === 'type', value: "type", name: "mode", onClick: () => (this.mode = 'type') }), index.h("label", { key: 'c787fadf3e94998050c4d43d30d5a7f84baaaea1' }, "Typed with a keyboard")), index.h("div", { key: 'c7b02e786ef4538621f4adae37ed2087ab176b5b', style: { display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px' } }, index.h("verdocs-radio-button", { key: 'fcf483b47ee7b4031ab0e5d46ae38e3761193441', checked: this.mode === 'draw', value: "draw", name: "mode", onClick: () => (this.mode = 'draw') }), index.h("label", { key: '16c6f4fabb564512fc757685d31aadbdd7723ace' }, "Drawn with touch, mouse, or stylus")), index.h("div", { key: 'c9e059fff254d2654f6fac9afae61c2849a72926', class: "preview-header" }, index.h("div", { key: '396b8d70757e4c976ed946c0c4dee93c1adf41db', style: { fontSize: '13px', fontWeight: '400' } }, "Signature Preview"), this.mode === 'draw' && (index.h("button", { key: '4eabebe8916e28e42011a5d5c5a70fe114179df7', class: "clear-button-text", onClick: e => this.handleClearDrawing(e, 'signature'), disabled: !this.hasDrawnSignature }, "Clear"))), index.h("div", { key: 'c6749bfdef5f26df049c6e54384b528a38f4a8b7', class: "canvas-container signature-container" }, index.h("div", { key: 'eb76bcb4ab6a18c9ba361f466a21a26552687983', class: "signing-indicator" }, index.h("div", { key: 'db9ad8803a7d74319a84d16ae5ac5b82316d9d85', class: "x-icon", innerHTML: Icons.SignatureXIcon }), index.h("div", { key: '72c51304ffe3ebd8d7cce0cc3baa8bca002961d2', class: "signing-line" })), index.h("canvas", { key: 'e795c8fc32ad3dd0dcdffb67915db3c26e7eeeb4', ref: el => (this.signatureElement = el),
456
+ return (index.h("verdocs-dialog", { key: '2d9f8c2d126b604fe74baf617ad66329cc83d642', persistent: true, onExit: () => this.exit.emit() }, index.h("div", { key: 'b5fe4f88aaec381b9dc44d4368eeb7062408d08f', slot: "heading", class: "heading" }, "Adopt Your Signature"), index.h("div", { key: '02094c09fd6b63f6d1a17f0813850558efc65c3e', slot: "content", class: "content" }, index.h("div", { key: '6b6ec99527de5d4d079b3d3d478581d0a403ec61', style: { fontWeight: '300', color: '#242424', fontSize: '13px' } }, "Confirm your name, initials, and signature."), index.h("div", { key: '5446ee94d3f7d8c5a76bb07be4cb36a4977378ec', class: { type: true, active: this.mode === 'type' } }, index.h("verdocs-text-input", { key: '6efbbb16fc67f5360e3497573b045a9187557b1d', label: "Full Name", value: this.enteredName, disabled: this.nameLocked, onInput: e => this.handleNameChange(e), onClick: e => e.stopPropagation() }), this.nameLocked && index.h("div", { key: '1bc48daa4d814199d1e399a6ace89a33ec70dfcd', class: "name-locked-hint" }, "Your name has been set by the sender and cannot be changed.")), index.h("div", { key: '299b6667ff61ebb5bcd38f6e69f793c99073266e', style: { fontWeight: '400', color: '#242424', fontSize: '13px' } }, "Select a signature style"), index.h("div", { key: '50b3b5d6c33790d9702c214f6d4dc536191f3529', style: { display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px' } }, index.h("verdocs-radio-button", { key: '1a7aae5b62f11ce35eca59b85e58ce5300991b20', checked: this.mode === 'type', value: "type", name: "mode", onClick: () => (this.mode = 'type') }), index.h("label", { key: '6bc2c033e6a094140186c394772eb8bb4146a59d' }, "Typed with a keyboard")), index.h("div", { key: 'c8eb2d62a274a069507250b0d4599765e0689b4a', style: { display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px' } }, index.h("verdocs-radio-button", { key: 'a9231341d4896b3e9d2c0cda07b3b47c99aa924a', checked: this.mode === 'draw', value: "draw", name: "mode", onClick: () => (this.mode = 'draw') }), index.h("label", { key: '08800335d245f80006df2d98427555d8eed12500' }, "Drawn with touch, mouse, or stylus")), index.h("div", { key: '40ede26cbe3aee6ca9efb40137acd423757d09e1', class: "preview-header" }, index.h("div", { key: 'f3ab56d0583310e6957d12a25ee17f60c0833752', style: { fontSize: '13px', fontWeight: '400' } }, "Signature Preview"), this.mode === 'draw' && (index.h("button", { key: '671c58fc4ffcf24f63733007bd3e2f9d97089f47', class: "clear-button-text", onClick: e => this.handleClearDrawing(e, 'signature'), disabled: !this.hasDrawnSignature }, "Clear"))), index.h("div", { key: '85e6492ae46953eac7ed47bea89e062066c9042e', class: "canvas-container signature-container" }, index.h("div", { key: 'b5d75586aa87a3dda6b15375750f9b7d992d2ad7', class: "signing-indicator" }, index.h("div", { key: '8e25d6232cff112c91bab09710bd068b6f458fb8', class: "x-icon", innerHTML: Icons.SignatureXIcon }), index.h("div", { key: '351c358e185aa471ba020a5e49a619077e13eaec', class: "signing-line" })), index.h("canvas", { key: 'fb0c2d520f4498581e2457577d673070204b37f1', ref: el => (this.signatureElement = el),
457
457
  // width="300"
458
- height: "79", class: "signature-canvas", onPointerDown: this.handleSigPointerDown, onPointerMove: this.handleSigPointerMove, onPointerUp: this.handleSigPointerUp, onPointerCancel: this.handleSigPointerCancel, style: { touchAction: 'none', cursor: 'crosshair' } })), index.h("div", { key: 'a9987ec211baaaa01288dde3ffc061d0372cd7f3', class: "preview-header" }, index.h("div", { key: '97d1a8462f2d9c272580cf6049ae72017f20b158', style: { fontSize: '13px', fontWeight: '400' } }, "Initials Preview"), this.mode === 'draw' && (index.h("button", { key: '61f91899f09cbc2dac6d89daa3e9ec1617df7b9c', class: "clear-button-text", onClick: e => this.handleClearDrawing(e, 'initials'), disabled: !this.hasDrawnInitials }, "Clear"))), index.h("div", { key: 'b09b7f23218b4747dedcfe9d40b912263bea907a', class: "canvas-container initials-container" }, index.h("div", { key: '35c2b9b40ab5077895f567a922a1b48e86dde3cf', class: "signing-indicator" }, index.h("div", { key: 'dca3b7841d1b0c6c5ffa1d127ffe9acd048b7715', class: "x-icon", innerHTML: Icons.SignatureXIcon }), index.h("div", { key: '54d0f42b043bdebca98fbde793d91deaa39068ec', class: "signing-line" })), index.h("canvas", { key: '2449706db1331aa7835ddcf2cf0f910ac0f5f4a6', ref: el => (this.initialsElement = el),
458
+ height: "79", class: "signature-canvas", onPointerDown: this.handleSigPointerDown, onPointerMove: this.handleSigPointerMove, onPointerUp: this.handleSigPointerUp, onPointerCancel: this.handleSigPointerCancel, style: { touchAction: 'none', cursor: 'crosshair' } })), index.h("div", { key: 'ffd475d6c1ffdd1b0453a8196fa7edc6fc039649', class: "preview-header" }, index.h("div", { key: '61003eae27592625bab6d2aab282406bbd48fdc3', style: { fontSize: '13px', fontWeight: '400' } }, "Initials Preview"), this.mode === 'draw' && (index.h("button", { key: '77350a9062703807f3766f4cf6a1e5e412086ee5', class: "clear-button-text", onClick: e => this.handleClearDrawing(e, 'initials'), disabled: !this.hasDrawnInitials }, "Clear"))), index.h("div", { key: '5c8f3a9a62325d915f2461cddc07adca3136799c', class: "canvas-container initials-container" }, index.h("div", { key: '0b37c4ee2ff03d61304a98bc8e284e0546258698', class: "signing-indicator" }, index.h("div", { key: '9f2f39d84a9aeefb48d310f896d223eccfed2ead', class: "x-icon", innerHTML: Icons.SignatureXIcon }), index.h("div", { key: '57120f545d2d07e1fdace87088b6cd3862dd0289', class: "signing-line" })), index.h("canvas", { key: '1b5080f57ec622775cc987229957029a4f1da2f8', ref: el => (this.initialsElement = el),
459
459
  // width="300"
460
- height: "79", class: "initials-canvas", onPointerDown: this.handleInitialsPointerDown, onPointerMove: this.handleInitialsPointerMove, onPointerUp: this.handleInitialsPointerUp, onPointerCancel: this.handleInitialsPointerCancel, style: { touchAction: 'none', cursor: 'crosshair' } })), index.h("div", { key: '4cc74908b230f05762bbbc92f082b68f1d0298d3', class: "disclaimer" }, "By clicking \u00ABAdopt Signature\u00BB, I agree that the signature and initials above will be the electronic representation of my signature and initials for all purposes when I use them to sign documents. Applying them to a document is legally equivalent to signing with a pen on paper.")), index.h("div", { key: 'dbbee3f80aa7a0f6862ef4920b3edcc493313c80', class: "footer", slot: "footer" }, index.h("div", { key: '44f060db31afd99c8b5b1b4d4ac2734dea70cb04', class: "buttons" }, index.h("button", { key: 'af6c0a693f3576184e7c1fb4235403da1b3db9cf', class: "cancel", onClick: e => this.handleCancel(e) }, "Cancel"), index.h("button", { key: '9283607fa5c94acd924dbfd363073664a5b9d037', class: "proceed", onClick: e => this.handleAdopt(e), disabled: this.isAdoptButtonDisabled() }, "Adopt & Sign")))));
460
+ height: "79", class: "initials-canvas", onPointerDown: this.handleInitialsPointerDown, onPointerMove: this.handleInitialsPointerMove, onPointerUp: this.handleInitialsPointerUp, onPointerCancel: this.handleInitialsPointerCancel, style: { touchAction: 'none', cursor: 'crosshair' } })), index.h("div", { key: '138d718d6705b3096edf5379aadbccaef54a7bf6', class: "disclaimer" }, "By clicking \u00ABAdopt Signature\u00BB, I agree that the signature and initials above will be the electronic representation of my signature and initials for all purposes when I use them to sign documents. Applying them to a document is legally equivalent to signing with a pen on paper.")), index.h("div", { key: '32d3a076edc5db4dafff0070916278279a362760', class: "footer", slot: "footer" }, index.h("div", { key: 'faf75d8abed2bc9d72aa49055f26619ea3927343', class: "buttons" }, index.h("button", { key: '61a8750afa5c3a298b9dd0d82d05c7e185b29999', class: "cancel", onClick: e => this.handleCancel(e) }, "Cancel"), index.h("button", { key: '040577750135d0bed204f92bad1c5a275d759c08', class: "proceed", onClick: e => this.handleAdopt(e), disabled: this.isAdoptButtonDisabled() }, "Adopt & Sign")))));
461
461
  }
462
462
  };
463
463
  VerdocsAdoptSignatureDialog.style = verdocsAdoptSignatureDialogCss;
@@ -4472,7 +4472,7 @@ const VerdocsSigningProgress = class {
4472
4472
  if (fieldCompleted && readyToSubmit) {
4473
4473
  return (index.h("div", { class: "vsp-field-completed" }, index.h("div", { class: "vsp-icon" }, this.renderSuccessIcon()), index.h("span", { class: "vsp-text" }, "Ready to submit.")));
4474
4474
  }
4475
- return index.h("div", { class: "vsp-field-label" }, fieldLabel);
4475
+ return null;
4476
4476
  }
4477
4477
  renderFooter(current, _total, requiredRemaining, optionalRemaining) {
4478
4478
  if (this.mode === 'start') {
@@ -4510,7 +4510,8 @@ const VerdocsSigningProgress = class {
4510
4510
  const focusedFieldObj = this.fields.find(f => f.name === this.focusedField);
4511
4511
  const currentIndex = this.fields.findIndex(f => f.name === this.focusedField) + 1;
4512
4512
  const totalFields = this.fields.length;
4513
- return (index.h("div", { class: "vsp-card" }, index.h("div", { class: "vsp-header" }, index.h("div", { class: "vsp-progress-line" }, requiredRemaining, " of ", requiredFields.length, " required fields remaining"), optionalFields.length > 0 && (index.h("div", { class: "vsp-progress-line vsp-optional" }, optionalRemaining, " of ", optionalFields.length, " optional fields remaining"))), index.h("div", { class: "vsp-body" }, this.renderContent(utils.getFieldLabel(focusedFieldObj), focusedFieldObj ? !!isFilled(focusedFieldObj) : false, requiredRemaining === 0)), index.h("div", { class: "vsp-separator" }), this.renderFooter(Math.max(1, currentIndex), totalFields, requiredRemaining, optionalRemaining)));
4513
+ const progressContent = this.renderContent(utils.getFieldLabel(focusedFieldObj), focusedFieldObj ? !!isFilled(focusedFieldObj) : false, requiredRemaining === 0);
4514
+ return (index.h("div", { class: "vsp-card" }, index.h("div", { class: "vsp-header" }, index.h("div", { class: "vsp-progress-line" }, requiredRemaining, " of ", requiredFields.length, " required fields remaining"), optionalFields.length > 0 && (index.h("div", { class: "vsp-progress-line vsp-optional" }, optionalRemaining, " of ", optionalFields.length, " optional fields remaining"))), progressContent && index.h("div", { class: "vsp-body" }, progressContent), index.h("div", { class: "vsp-separator" }), this.renderFooter(Math.max(1, currentIndex), totalFields, requiredRemaining, optionalRemaining)));
4514
4515
  }
4515
4516
  };
4516
4517
  VerdocsSigningProgress.style = verdocsSigningProgressCss;
@@ -440,11 +440,11 @@ export class VerdocsAdoptSignatureDialog {
440
440
  };
441
441
  }
442
442
  render() {
443
- return (h("verdocs-dialog", { key: '462948fa67d1a3e32c0fdd03d0183f8b822eb312' }, h("div", { key: 'f05a30ae50b16934a983f29b2d27ddfc4b3fb3b4', slot: "heading", class: "heading" }, "Adopt Your Signature"), h("div", { key: '1a2aa7ace11493961d251ad6bc6ce3406a625532', slot: "content", class: "content" }, h("div", { key: 'd4f11c53451ce55c875320829016bf3a7009b8dc', style: { fontWeight: '300', color: '#242424', fontSize: '13px' } }, "Confirm your name, initials, and signature."), h("div", { key: '5bd2c07de6a5f3f4e31d308c62d4f8805822fcf9', class: { type: true, active: this.mode === 'type' } }, h("verdocs-text-input", { key: '1d6a6a26e1cd66442d7a4d44040a41d66251de55', label: "Full Name", value: this.enteredName, disabled: this.nameLocked, onInput: e => this.handleNameChange(e), onClick: e => e.stopPropagation() }), this.nameLocked && h("div", { key: '2a839a7f0791dc5af3154471f7730f0f23e1cf36', class: "name-locked-hint" }, "Your name has been set by the sender and cannot be changed.")), h("div", { key: '6090f63b7bb0be98a9cc02705dd2cc2d4e573d3c', style: { fontWeight: '400', color: '#242424', fontSize: '13px' } }, "Select a signature style"), h("div", { key: '4ff274227aad18cb5ba62ee876bbb848cca8c111', style: { display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px' } }, h("verdocs-radio-button", { key: '6d8c8784e20426fc4cab54aaf1f4d976872b49b1', checked: this.mode === 'type', value: "type", name: "mode", onClick: () => (this.mode = 'type') }), h("label", { key: 'c787fadf3e94998050c4d43d30d5a7f84baaaea1' }, "Typed with a keyboard")), h("div", { key: 'c7b02e786ef4538621f4adae37ed2087ab176b5b', style: { display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px' } }, h("verdocs-radio-button", { key: 'fcf483b47ee7b4031ab0e5d46ae38e3761193441', checked: this.mode === 'draw', value: "draw", name: "mode", onClick: () => (this.mode = 'draw') }), h("label", { key: '16c6f4fabb564512fc757685d31aadbdd7723ace' }, "Drawn with touch, mouse, or stylus")), h("div", { key: 'c9e059fff254d2654f6fac9afae61c2849a72926', class: "preview-header" }, h("div", { key: '396b8d70757e4c976ed946c0c4dee93c1adf41db', style: { fontSize: '13px', fontWeight: '400' } }, "Signature Preview"), this.mode === 'draw' && (h("button", { key: '4eabebe8916e28e42011a5d5c5a70fe114179df7', class: "clear-button-text", onClick: e => this.handleClearDrawing(e, 'signature'), disabled: !this.hasDrawnSignature }, "Clear"))), h("div", { key: 'c6749bfdef5f26df049c6e54384b528a38f4a8b7', class: "canvas-container signature-container" }, h("div", { key: 'eb76bcb4ab6a18c9ba361f466a21a26552687983', class: "signing-indicator" }, h("div", { key: 'db9ad8803a7d74319a84d16ae5ac5b82316d9d85', class: "x-icon", innerHTML: SignatureXIcon }), h("div", { key: '72c51304ffe3ebd8d7cce0cc3baa8bca002961d2', class: "signing-line" })), h("canvas", { key: 'e795c8fc32ad3dd0dcdffb67915db3c26e7eeeb4', ref: el => (this.signatureElement = el),
443
+ return (h("verdocs-dialog", { key: '2d9f8c2d126b604fe74baf617ad66329cc83d642', persistent: true, onExit: () => this.exit.emit() }, h("div", { key: 'b5fe4f88aaec381b9dc44d4368eeb7062408d08f', slot: "heading", class: "heading" }, "Adopt Your Signature"), h("div", { key: '02094c09fd6b63f6d1a17f0813850558efc65c3e', slot: "content", class: "content" }, h("div", { key: '6b6ec99527de5d4d079b3d3d478581d0a403ec61', style: { fontWeight: '300', color: '#242424', fontSize: '13px' } }, "Confirm your name, initials, and signature."), h("div", { key: '5446ee94d3f7d8c5a76bb07be4cb36a4977378ec', class: { type: true, active: this.mode === 'type' } }, h("verdocs-text-input", { key: '6efbbb16fc67f5360e3497573b045a9187557b1d', label: "Full Name", value: this.enteredName, disabled: this.nameLocked, onInput: e => this.handleNameChange(e), onClick: e => e.stopPropagation() }), this.nameLocked && h("div", { key: '1bc48daa4d814199d1e399a6ace89a33ec70dfcd', class: "name-locked-hint" }, "Your name has been set by the sender and cannot be changed.")), h("div", { key: '299b6667ff61ebb5bcd38f6e69f793c99073266e', style: { fontWeight: '400', color: '#242424', fontSize: '13px' } }, "Select a signature style"), h("div", { key: '50b3b5d6c33790d9702c214f6d4dc536191f3529', style: { display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px' } }, h("verdocs-radio-button", { key: '1a7aae5b62f11ce35eca59b85e58ce5300991b20', checked: this.mode === 'type', value: "type", name: "mode", onClick: () => (this.mode = 'type') }), h("label", { key: '6bc2c033e6a094140186c394772eb8bb4146a59d' }, "Typed with a keyboard")), h("div", { key: 'c8eb2d62a274a069507250b0d4599765e0689b4a', style: { display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px' } }, h("verdocs-radio-button", { key: 'a9231341d4896b3e9d2c0cda07b3b47c99aa924a', checked: this.mode === 'draw', value: "draw", name: "mode", onClick: () => (this.mode = 'draw') }), h("label", { key: '08800335d245f80006df2d98427555d8eed12500' }, "Drawn with touch, mouse, or stylus")), h("div", { key: '40ede26cbe3aee6ca9efb40137acd423757d09e1', class: "preview-header" }, h("div", { key: 'f3ab56d0583310e6957d12a25ee17f60c0833752', style: { fontSize: '13px', fontWeight: '400' } }, "Signature Preview"), this.mode === 'draw' && (h("button", { key: '671c58fc4ffcf24f63733007bd3e2f9d97089f47', class: "clear-button-text", onClick: e => this.handleClearDrawing(e, 'signature'), disabled: !this.hasDrawnSignature }, "Clear"))), h("div", { key: '85e6492ae46953eac7ed47bea89e062066c9042e', class: "canvas-container signature-container" }, h("div", { key: 'b5d75586aa87a3dda6b15375750f9b7d992d2ad7', class: "signing-indicator" }, h("div", { key: '8e25d6232cff112c91bab09710bd068b6f458fb8', class: "x-icon", innerHTML: SignatureXIcon }), h("div", { key: '351c358e185aa471ba020a5e49a619077e13eaec', class: "signing-line" })), h("canvas", { key: 'fb0c2d520f4498581e2457577d673070204b37f1', ref: el => (this.signatureElement = el),
444
444
  // width="300"
445
- height: "79", class: "signature-canvas", onPointerDown: this.handleSigPointerDown, onPointerMove: this.handleSigPointerMove, onPointerUp: this.handleSigPointerUp, onPointerCancel: this.handleSigPointerCancel, style: { touchAction: 'none', cursor: 'crosshair' } })), h("div", { key: 'a9987ec211baaaa01288dde3ffc061d0372cd7f3', class: "preview-header" }, h("div", { key: '97d1a8462f2d9c272580cf6049ae72017f20b158', style: { fontSize: '13px', fontWeight: '400' } }, "Initials Preview"), this.mode === 'draw' && (h("button", { key: '61f91899f09cbc2dac6d89daa3e9ec1617df7b9c', class: "clear-button-text", onClick: e => this.handleClearDrawing(e, 'initials'), disabled: !this.hasDrawnInitials }, "Clear"))), h("div", { key: 'b09b7f23218b4747dedcfe9d40b912263bea907a', class: "canvas-container initials-container" }, h("div", { key: '35c2b9b40ab5077895f567a922a1b48e86dde3cf', class: "signing-indicator" }, h("div", { key: 'dca3b7841d1b0c6c5ffa1d127ffe9acd048b7715', class: "x-icon", innerHTML: SignatureXIcon }), h("div", { key: '54d0f42b043bdebca98fbde793d91deaa39068ec', class: "signing-line" })), h("canvas", { key: '2449706db1331aa7835ddcf2cf0f910ac0f5f4a6', ref: el => (this.initialsElement = el),
445
+ height: "79", class: "signature-canvas", onPointerDown: this.handleSigPointerDown, onPointerMove: this.handleSigPointerMove, onPointerUp: this.handleSigPointerUp, onPointerCancel: this.handleSigPointerCancel, style: { touchAction: 'none', cursor: 'crosshair' } })), h("div", { key: 'ffd475d6c1ffdd1b0453a8196fa7edc6fc039649', class: "preview-header" }, h("div", { key: '61003eae27592625bab6d2aab282406bbd48fdc3', style: { fontSize: '13px', fontWeight: '400' } }, "Initials Preview"), this.mode === 'draw' && (h("button", { key: '77350a9062703807f3766f4cf6a1e5e412086ee5', class: "clear-button-text", onClick: e => this.handleClearDrawing(e, 'initials'), disabled: !this.hasDrawnInitials }, "Clear"))), h("div", { key: '5c8f3a9a62325d915f2461cddc07adca3136799c', class: "canvas-container initials-container" }, h("div", { key: '0b37c4ee2ff03d61304a98bc8e284e0546258698', class: "signing-indicator" }, h("div", { key: '9f2f39d84a9aeefb48d310f896d223eccfed2ead', class: "x-icon", innerHTML: SignatureXIcon }), h("div", { key: '57120f545d2d07e1fdace87088b6cd3862dd0289', class: "signing-line" })), h("canvas", { key: '1b5080f57ec622775cc987229957029a4f1da2f8', ref: el => (this.initialsElement = el),
446
446
  // width="300"
447
- height: "79", class: "initials-canvas", onPointerDown: this.handleInitialsPointerDown, onPointerMove: this.handleInitialsPointerMove, onPointerUp: this.handleInitialsPointerUp, onPointerCancel: this.handleInitialsPointerCancel, style: { touchAction: 'none', cursor: 'crosshair' } })), h("div", { key: '4cc74908b230f05762bbbc92f082b68f1d0298d3', class: "disclaimer" }, "By clicking \u00ABAdopt Signature\u00BB, I agree that the signature and initials above will be the electronic representation of my signature and initials for all purposes when I use them to sign documents. Applying them to a document is legally equivalent to signing with a pen on paper.")), h("div", { key: 'dbbee3f80aa7a0f6862ef4920b3edcc493313c80', class: "footer", slot: "footer" }, h("div", { key: '44f060db31afd99c8b5b1b4d4ac2734dea70cb04', class: "buttons" }, h("button", { key: 'af6c0a693f3576184e7c1fb4235403da1b3db9cf', class: "cancel", onClick: e => this.handleCancel(e) }, "Cancel"), h("button", { key: '9283607fa5c94acd924dbfd363073664a5b9d037', class: "proceed", onClick: e => this.handleAdopt(e), disabled: this.isAdoptButtonDisabled() }, "Adopt & Sign")))));
447
+ height: "79", class: "initials-canvas", onPointerDown: this.handleInitialsPointerDown, onPointerMove: this.handleInitialsPointerMove, onPointerUp: this.handleInitialsPointerUp, onPointerCancel: this.handleInitialsPointerCancel, style: { touchAction: 'none', cursor: 'crosshair' } })), h("div", { key: '138d718d6705b3096edf5379aadbccaef54a7bf6', class: "disclaimer" }, "By clicking \u00ABAdopt Signature\u00BB, I agree that the signature and initials above will be the electronic representation of my signature and initials for all purposes when I use them to sign documents. Applying them to a document is legally equivalent to signing with a pen on paper.")), h("div", { key: '32d3a076edc5db4dafff0070916278279a362760', class: "footer", slot: "footer" }, h("div", { key: 'faf75d8abed2bc9d72aa49055f26619ea3927343', class: "buttons" }, h("button", { key: '61a8750afa5c3a298b9dd0d82d05c7e185b29999', class: "cancel", onClick: e => this.handleCancel(e) }, "Cancel"), h("button", { key: '040577750135d0bed204f92bad1c5a275d759c08', class: "proceed", onClick: e => this.handleAdopt(e), disabled: this.isAdoptButtonDisabled() }, "Adopt & Sign")))));
448
448
  }
449
449
  static get is() { return "verdocs-adopt-signature-dialog"; }
450
450
  static get originalStyleUrls() {
@@ -1 +1 @@
1
- {"version":3,"file":"verdocs-adopt-signature-dialog.js","sourceRoot":"","sources":["../../../../src/components/dialogs/verdocs-adopt-signature-dialog/verdocs-adopt-signature-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,KAAK,EAAC,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAEpD;;;GAGG;AAKH,MAAM,OAAO,2BAA2B;IAJxC;QAUE;;WAEG;QACK,SAAI,GAAW,EAAE,CAAC;QAE1B;;WAEG;QACK,eAAU,GAAY,KAAK,CAAC;QAa3B,eAAU,GAAG,KAAK,CAAC;QACnB,gBAAW,GAAW,EAAE,CAAC;QACzB,oBAAe,GAAW,EAAE,CAAC;QAC7B,SAAI,GAAoB,MAAM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CAClB,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Prop, h, Event, EventEmitter, State} from '@stencil/core';\nimport {SignatureXIcon} from '../../../utils/Icons';\n\n/**\n * Display a dialog that allows the user to specify a signature image, either by using a signature-font-generated image\n * based on their full name, or by hand-drawing their signature with a mouse or tablet.\n */\n@Component({\n tag: 'verdocs-adopt-signature-dialog',\n styleUrl: 'verdocs-adopt-signature-dialog.scss',\n})\nexport class VerdocsAdoptSignatureDialog {\n private signatureElement?: HTMLCanvasElement;\n private initialsElement?: HTMLCanvasElement;\n private sigDrawingContext?: CanvasRenderingContext2D;\n private initialsDrawingContext?: CanvasRenderingContext2D;\n\n /**\n * Initial signature text\n */\n @Prop() name: string = '';\n\n /**\n * If true, the name fields will be read-only. Used when the sender has locked the recipient's name.\n */\n @Prop() nameLocked: boolean = false;\n\n /**\n * Fired when the user completes the dialog and clicks Adopt. The event detail will contain a base64-encoded string\n * representation of the signature adopted.\n */\n @Event({composed: true}) next: EventEmitter<{signature: string; initials: string}>;\n\n /**\n * Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n @State() fontLoaded = false;\n @State() enteredName: string = '';\n @State() enteredInitials: string = '';\n @State() mode: 'type' | 'draw' = 'type';\n @State() isDrawing = false;\n @State() hasDrawnSignature = false;\n @State() hasDrawnInitials = false;\n\n private currentSigStroke: Array<{x: number; y: number}> = [];\n private allSigStrokes: Array<Array<{x: number; y: number}>> = [];\n private lastSigPoint: {x: number; y: number} | null = null;\n\n private currentInitialsStroke: Array<{x: number; y: number}> = [];\n private allInitialsStrokes: Array<Array<{x: number; y: number}>> = [];\n private lastInitialsPoint: {x: number; y: number} | null = null;\n\n componentWillLoad() {\n this.enteredName = this.name;\n this.computeEnteredInitials(this.name);\n\n const ds = new FontFace('Dancing Script', 'url(https://fonts.gstatic.com/s/dancingscript/v19/If2cXTr6YS-zF4S-kcSWSVi_sxjsohD9F50Ruu7BMSo3Sup6hNX6plRP.woff)');\n ds.load().then(font => {\n document.fonts.add(font);\n this.fontLoaded = true;\n });\n }\n\n componentDidLoad() {\n this.drawSignatureText();\n this.drawInitialsText();\n this.setupSignatureCanvas();\n this.setupInitialsCanvas();\n }\n\n componentDidUpdate() {\n this.drawSignatureText();\n this.drawInitialsText();\n this.setupSignatureCanvas();\n this.setupInitialsCanvas();\n\n // Redraw drawn signature when in draw mode\n if (this.mode === 'draw' && this.allSigStrokes.length > 0) {\n this.redrawDrawnSignature();\n }\n if (this.mode === 'draw' && this.allInitialsStrokes.length > 0) {\n this.redrawDrawnInitials();\n }\n }\n\n drawSignatureText() {\n if (!this.signatureElement || this.mode !== 'type') {\n return;\n }\n\n const sigCanvasWidth = this.signatureElement.width;\n const sigCanvasHeight = this.signatureElement.height;\n const sigContext = this.signatureElement.getContext('2d');\n sigContext.clearRect(0, 0, this.signatureElement.width, this.signatureElement.height);\n\n let fontSize = 100;\n let metrics: TextMetrics = sigContext.measureText(this.enteredName);\n do {\n fontSize -= 2;\n sigContext.font = `${fontSize}px Dancing Script`;\n metrics = sigContext.measureText(this.enteredName);\n } while (metrics.width > sigCanvasWidth - 24 || metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent + 24 > sigCanvasHeight);\n\n sigContext.textAlign = 'center';\n sigContext.textBaseline = 'middle';\n sigContext.font = `${fontSize}px Dancing Script`;\n sigContext.fillText(this.enteredName, this.signatureElement.width / 2, this.signatureElement.height / 2);\n }\n\n drawInitialsText() {\n if (!this.initialsElement || this.mode !== 'type') {\n return;\n }\n\n const initialsCanvasWidth = this.initialsElement.width;\n const initialsCanvasHeight = this.initialsElement.height;\n const context = this.initialsElement.getContext('2d');\n context.clearRect(0, 0, this.initialsElement.width, this.initialsElement.height);\n\n let fontSize = 100;\n let metrics: TextMetrics = context.measureText(this.enteredInitials);\n do {\n fontSize -= 2;\n context.font = `${fontSize}px Dancing Script`;\n metrics = context.measureText(this.enteredInitials);\n } while (metrics.width > initialsCanvasWidth - 24 || metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent + 24 > initialsCanvasHeight);\n\n context.textAlign = 'center';\n context.textBaseline = 'middle';\n context.font = `${fontSize}px Dancing Script`;\n context.fillText(this.enteredInitials, this.initialsElement.width / 2, this.initialsElement.height / 2);\n }\n\n redrawDrawnSignature() {\n if (!this.signatureElement || !this.sigDrawingContext || this.allSigStrokes.length === 0) {\n return;\n }\n\n // Clear the canvas first\n this.sigDrawingContext.clearRect(0, 0, this.signatureElement.width, this.signatureElement.height);\n\n // Redraw all strokes\n for (const stroke of this.allSigStrokes) {\n if (stroke.length === 0) {\n continue;\n }\n\n // Start the path at the first point\n this.sigDrawingContext.beginPath();\n this.sigDrawingContext.moveTo(stroke[0].x, stroke[0].y);\n\n // Draw smooth curves through all points in the stroke\n for (let i = 1; i < stroke.length; i++) {\n const currentPoint = stroke[i];\n const previousPoint = stroke[i - 1];\n\n // Use quadratic curves for smooth lines\n const midPoint = {\n x: (previousPoint.x + currentPoint.x) / 2,\n y: (previousPoint.y + currentPoint.y) / 2,\n };\n\n this.sigDrawingContext.quadraticCurveTo(previousPoint.x, previousPoint.y, midPoint.x, midPoint.y);\n }\n\n // Draw to the last point\n if (stroke.length > 1) {\n const lastPoint = stroke[stroke.length - 1];\n this.sigDrawingContext.lineTo(lastPoint.x, lastPoint.y);\n }\n\n this.sigDrawingContext.stroke();\n }\n }\n\n redrawDrawnInitials() {\n if (!this.initialsElement || !this.initialsDrawingContext || this.allInitialsStrokes.length === 0) {\n return;\n }\n\n // Clear the canvas first\n this.initialsDrawingContext.clearRect(0, 0, this.initialsElement.width, this.initialsElement.height);\n\n // Redraw all strokes\n for (const stroke of this.allInitialsStrokes) {\n if (stroke.length === 0) {\n continue;\n }\n\n // Start the path at the first point\n this.initialsDrawingContext.beginPath();\n this.initialsDrawingContext.moveTo(stroke[0].x, stroke[0].y);\n\n // Draw smooth curves through all points in the stroke\n for (let i = 1; i < stroke.length; i++) {\n const currentPoint = stroke[i];\n const previousPoint = stroke[i - 1];\n\n // Use quadratic curves for smooth lines\n const midPoint = {\n x: (previousPoint.x + currentPoint.x) / 2,\n y: (previousPoint.y + currentPoint.y) / 2,\n };\n\n this.initialsDrawingContext.quadraticCurveTo(previousPoint.x, previousPoint.y, midPoint.x, midPoint.y);\n }\n\n // Draw to the last point\n if (stroke.length > 1) {\n const lastPoint = stroke[stroke.length - 1];\n this.initialsDrawingContext.lineTo(lastPoint.x, lastPoint.y);\n }\n\n this.initialsDrawingContext.stroke();\n }\n }\n\n handleNameChange(e: any) {\n this.enteredName = e.target.value;\n this.computeEnteredInitials(e.target.value);\n }\n\n computeEnteredInitials(name: string) {\n const nameComponents = name\n .trim()\n .split(' ')\n .filter(part => part.length > 0);\n\n this.enteredInitials = nameComponents.length > 1 ? nameComponents.map(word => word.charAt(0).toUpperCase()).join('') : nameComponents[0].toUpperCase();\n }\n\n handleCancel(e: any) {\n e.stopPropagation();\n e.preventDefault();\n this.exit.emit();\n }\n\n handleAdopt(e: any) {\n e.stopPropagation();\n e.preventDefault();\n const signature = this.signatureElement.toDataURL('image/png');\n const initials = this.initialsElement.toDataURL('image/png');\n this.next.emit({signature, initials});\n }\n\n isAdoptButtonDisabled(): boolean {\n switch (this.mode) {\n case 'type':\n // Disable if no name has been entered\n return !this.enteredName || this.enteredName.trim().length === 0;\n case 'draw':\n // Disable if nothing has been drawn\n return (!this.hasDrawnSignature && !this.hasDrawnInitials) || this.allSigStrokes.length === 0 || this.allInitialsStrokes.length === 0;\n default:\n return true;\n }\n }\n\n setupSignatureCanvas() {\n if (!this.signatureElement) {\n return;\n }\n\n // Set up drawing context when in draw mode\n if (this.mode === 'draw') {\n // Always get fresh context from the current canvas element\n const sigContext = this.signatureElement.getContext('2d');\n\n // Only initialize if we don't have a context or it's different\n if (sigContext && sigContext !== this.sigDrawingContext) {\n this.sigDrawingContext = sigContext;\n\n // Configure drawing style for smooth signatures\n this.sigDrawingContext.strokeStyle = '#000000';\n this.sigDrawingContext.lineWidth = 2;\n this.sigDrawingContext.lineCap = 'round';\n this.sigDrawingContext.lineJoin = 'round';\n\n // Clear canvas only if there are no existing strokes\n if (this.allSigStrokes.length === 0) {\n this.sigDrawingContext.clearRect(0, 0, this.signatureElement.width, this.signatureElement.height);\n }\n }\n }\n\n // Reset drawing context when switching away from draw mode\n // NOTE: We don't clear allStrokes here so drawing persists when returning to draw mode\n if (this.mode !== 'draw' && this.sigDrawingContext) {\n this.sigDrawingContext = null;\n this.currentSigStroke = [];\n this.lastSigPoint = null;\n }\n }\n\n setupInitialsCanvas() {\n if (!this.initialsElement) {\n return;\n }\n\n // Set up drawing context when in draw mode\n if (this.mode === 'draw') {\n // Always get fresh context from the current canvas element\n const initialsContext = this.initialsElement.getContext('2d');\n\n // Only initialize if we don't have a context or it's different\n if (initialsContext && initialsContext !== this.initialsDrawingContext) {\n this.initialsDrawingContext = initialsContext;\n\n // Configure drawing style for smooth signatures\n this.initialsDrawingContext.strokeStyle = '#000000';\n this.initialsDrawingContext.lineWidth = 2;\n this.initialsDrawingContext.lineCap = 'round';\n this.initialsDrawingContext.lineJoin = 'round';\n\n // Clear canvas only if there are no existing strokes\n if (this.allInitialsStrokes.length === 0) {\n this.initialsDrawingContext.clearRect(0, 0, this.initialsElement.width, this.initialsElement.height);\n }\n }\n }\n\n // Reset drawing context when switching away from draw mode\n // NOTE: We don't clear allStrokes here so drawing persists when returning to draw mode\n if (this.mode !== 'draw' && this.initialsDrawingContext) {\n this.initialsDrawingContext = null;\n this.currentInitialsStroke = [];\n this.lastInitialsPoint = null;\n }\n }\n\n clearSignatureCanvas() {\n if (!this.signatureElement || !this.sigDrawingContext) {\n return;\n }\n\n this.sigDrawingContext.clearRect(0, 0, this.signatureElement.width, this.signatureElement.height);\n this.currentSigStroke = [];\n this.allSigStrokes = [];\n this.lastSigPoint = null;\n this.hasDrawnSignature = false;\n }\n\n clearInitialsCanvas() {\n if (!this.initialsElement || !this.initialsDrawingContext) {\n return;\n }\n\n this.initialsDrawingContext.clearRect(0, 0, this.initialsElement.width, this.initialsElement.height);\n this.currentInitialsStroke = [];\n this.allInitialsStrokes = [];\n this.lastInitialsPoint = null;\n this.hasDrawnInitials = false;\n }\n\n handleClearDrawing(e: any, type: 'signature' | 'initials' | 'all' = 'all') {\n e.stopPropagation();\n e.preventDefault();\n if (type === 'all' || type === 'signature') this.clearSignatureCanvas();\n if (type === 'all' || type === 'initials') this.clearInitialsCanvas();\n }\n\n getSigCanvasCoordinates(e: PointerEvent): {x: number; y: number} {\n if (!this.signatureElement) {\n return {x: 0, y: 0};\n }\n\n const rect = this.signatureElement.getBoundingClientRect();\n\n // Calculate the scale factor between canvas size and display size\n const scaleX = this.signatureElement.width / rect.width;\n const scaleY = this.signatureElement.height / rect.height;\n\n return {\n x: (e.clientX - rect.left) * scaleX,\n y: (e.clientY - rect.top) * scaleY,\n };\n }\n\n getInitialsCanvasCoordinates(e: PointerEvent): {x: number; y: number} {\n if (!this.initialsElement) {\n return {x: 0, y: 0};\n }\n\n const rect = this.initialsElement.getBoundingClientRect();\n\n // Calculate the scale factor between canvas size and display size\n const scaleX = this.initialsElement.width / rect.width;\n const scaleY = this.initialsElement.height / rect.height;\n\n return {\n x: (e.clientX - rect.left) * scaleX,\n y: (e.clientY - rect.top) * scaleY,\n };\n }\n\n handleSigPointerDown = (e: PointerEvent) => {\n e.preventDefault();\n\n if (!this.signatureElement || !this.sigDrawingContext) {\n return;\n }\n\n this.isDrawing = true;\n this.hasDrawnSignature = true;\n\n const point = this.getSigCanvasCoordinates(e);\n this.currentSigStroke = [point];\n this.lastSigPoint = point;\n\n // Start a new path\n this.sigDrawingContext.beginPath();\n this.sigDrawingContext.moveTo(point.x, point.y);\n\n // Capture pointer to ensure we get all events even if pointer leaves canvas\n this.signatureElement.setPointerCapture(e.pointerId);\n };\n\n handleSigPointerMove = (e: PointerEvent) => {\n e.preventDefault();\n\n if (!this.isDrawing || !this.sigDrawingContext || !this.lastSigPoint) {\n return;\n }\n\n const point = this.getSigCanvasCoordinates(e);\n this.currentSigStroke.push(point);\n\n // Use quadratic curves for smooth drawing\n // The control point is the last point, and we draw to the midpoint\n const midPoint = {\n x: (this.lastSigPoint.x + point.x) / 2,\n y: (this.lastSigPoint.y + point.y) / 2,\n };\n\n this.sigDrawingContext.quadraticCurveTo(this.lastSigPoint.x, this.lastSigPoint.y, midPoint.x, midPoint.y);\n this.sigDrawingContext.stroke();\n\n this.lastSigPoint = point;\n };\n\n handleSigPointerUp = (e: PointerEvent) => {\n e.preventDefault();\n\n if (!this.isDrawing || !this.sigDrawingContext) {\n return;\n }\n\n // Complete the stroke\n if (this.lastSigPoint && this.currentSigStroke.length > 0) {\n this.sigDrawingContext.lineTo(this.lastSigPoint.x, this.lastSigPoint.y);\n this.sigDrawingContext.stroke();\n }\n\n // Save the completed stroke\n if (this.currentSigStroke.length > 0) {\n this.allSigStrokes.push([...this.currentSigStroke]);\n }\n\n this.isDrawing = false;\n this.currentSigStroke = [];\n this.lastSigPoint = null;\n\n // Release pointer capture\n if (this.signatureElement) {\n this.signatureElement.releasePointerCapture(e.pointerId);\n }\n };\n\n handleSigPointerCancel = (e: PointerEvent) => {\n // Handle cases where drawing is interrupted (e.g., phone call, notification)\n this.isDrawing = false;\n this.currentSigStroke = [];\n this.lastSigPoint = null;\n\n if (this.signatureElement) {\n this.signatureElement.releasePointerCapture(e.pointerId);\n }\n };\n\n handleInitialsPointerDown = (e: PointerEvent) => {\n e.preventDefault();\n\n if (!this.initialsElement || !this.initialsDrawingContext) {\n return;\n }\n\n this.isDrawing = true;\n this.hasDrawnInitials = true;\n\n const point = this.getInitialsCanvasCoordinates(e);\n this.currentInitialsStroke = [point];\n this.lastInitialsPoint = point;\n\n // Start a new path\n this.initialsDrawingContext.beginPath();\n this.initialsDrawingContext.moveTo(point.x, point.y);\n\n // Capture pointer to ensure we get all events even if pointer leaves canvas\n this.initialsElement.setPointerCapture(e.pointerId);\n };\n\n handleInitialsPointerMove = (e: PointerEvent) => {\n e.preventDefault();\n\n if (!this.isDrawing || !this.initialsDrawingContext || !this.lastInitialsPoint) {\n return;\n }\n\n const point = this.getInitialsCanvasCoordinates(e);\n this.currentInitialsStroke.push(point);\n\n // Use quadratic curves for smooth drawing\n // The control point is the last point, and we draw to the midpoint\n const midPoint = {\n x: (this.lastInitialsPoint.x + point.x) / 2,\n y: (this.lastInitialsPoint.y + point.y) / 2,\n };\n\n this.initialsDrawingContext.quadraticCurveTo(this.lastInitialsPoint.x, this.lastInitialsPoint.y, midPoint.x, midPoint.y);\n this.initialsDrawingContext.stroke();\n\n this.lastInitialsPoint = point;\n };\n\n handleInitialsPointerUp = (e: PointerEvent) => {\n e.preventDefault();\n\n if (!this.isDrawing || !this.initialsDrawingContext) {\n return;\n }\n\n // Complete the stroke\n if (this.lastInitialsPoint && this.currentInitialsStroke.length > 0) {\n this.initialsDrawingContext.lineTo(this.lastInitialsPoint.x, this.lastInitialsPoint.y);\n this.initialsDrawingContext.stroke();\n }\n\n // Save the completed stroke\n if (this.currentInitialsStroke.length > 0) {\n this.allInitialsStrokes.push([...this.currentInitialsStroke]);\n }\n\n this.isDrawing = false;\n this.currentInitialsStroke = [];\n this.lastInitialsPoint = null;\n\n // Release pointer capture\n if (this.initialsElement) {\n this.initialsElement.releasePointerCapture(e.pointerId);\n }\n };\n\n handleInitialsPointerCancel = (e: PointerEvent) => {\n // Handle cases where drawing is interrupted (e.g., phone call, notification)\n this.isDrawing = false;\n this.currentInitialsStroke = [];\n this.lastInitialsPoint = null;\n\n if (this.initialsElement) {\n this.initialsElement.releasePointerCapture(e.pointerId);\n }\n };\n\n render() {\n return (\n <verdocs-dialog>\n <div slot=\"heading\" class=\"heading\">\n Adopt Your Signature\n </div>\n\n <div slot=\"content\" class=\"content\">\n <div style={{fontWeight: '300', color: '#242424', fontSize: '13px'}}>Confirm your name, initials, and signature.</div>\n\n <div class={{type: true, active: this.mode === 'type'}}>\n <verdocs-text-input\n label=\"Full Name\"\n value={this.enteredName}\n disabled={this.nameLocked}\n onInput={e => this.handleNameChange(e)}\n onClick={e => e.stopPropagation()}\n />\n {this.nameLocked && <div class=\"name-locked-hint\">Your name has been set by the sender and cannot be changed.</div>}\n </div>\n\n <div style={{fontWeight: '400', color: '#242424', fontSize: '13px'}}>Select a signature style</div>\n\n <div style={{display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px'}}>\n <verdocs-radio-button checked={this.mode === 'type'} value=\"type\" name=\"mode\" onClick={() => (this.mode = 'type')} />\n <label>Typed with a keyboard</label>\n </div>\n <div style={{display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px'}}>\n <verdocs-radio-button checked={this.mode === 'draw'} value=\"draw\" name=\"mode\" onClick={() => (this.mode = 'draw')} />\n <label>Drawn with touch, mouse, or stylus</label>\n </div>\n\n <div class=\"preview-header\">\n <div style={{fontSize: '13px', fontWeight: '400'}}>Signature Preview</div>\n {this.mode === 'draw' && (\n <button class=\"clear-button-text\" onClick={e => this.handleClearDrawing(e, 'signature')} disabled={!this.hasDrawnSignature}>\n Clear\n </button>\n )}\n </div>\n <div class=\"canvas-container signature-container\">\n <div class=\"signing-indicator\">\n <div class=\"x-icon\" innerHTML={SignatureXIcon}></div>\n <div class=\"signing-line\"></div>\n </div>\n <canvas\n ref={el => (this.signatureElement = el as HTMLCanvasElement)}\n // width=\"300\"\n height=\"79\"\n class=\"signature-canvas\"\n onPointerDown={this.handleSigPointerDown}\n onPointerMove={this.handleSigPointerMove}\n onPointerUp={this.handleSigPointerUp}\n onPointerCancel={this.handleSigPointerCancel}\n style={{touchAction: 'none', cursor: 'crosshair'}}\n />\n </div>\n\n <div class=\"preview-header\">\n <div style={{fontSize: '13px', fontWeight: '400'}}>Initials Preview</div>\n {this.mode === 'draw' && (\n <button class=\"clear-button-text\" onClick={e => this.handleClearDrawing(e, 'initials')} disabled={!this.hasDrawnInitials}>\n Clear\n </button>\n )}\n </div>\n <div class=\"canvas-container initials-container\">\n <div class=\"signing-indicator\">\n <div class=\"x-icon\" innerHTML={SignatureXIcon}></div>\n <div class=\"signing-line\"></div>\n </div>\n <canvas\n ref={el => (this.initialsElement = el as HTMLCanvasElement)}\n // width=\"300\"\n height=\"79\"\n class=\"initials-canvas\"\n onPointerDown={this.handleInitialsPointerDown}\n onPointerMove={this.handleInitialsPointerMove}\n onPointerUp={this.handleInitialsPointerUp}\n onPointerCancel={this.handleInitialsPointerCancel}\n style={{touchAction: 'none', cursor: 'crosshair'}}\n />\n </div>\n\n <div class=\"disclaimer\">\n By clicking «Adopt Signature», I agree that the signature and initials above will be the electronic representation of my signature and initials for all purposes when I\n use them to sign documents. Applying them to a document is legally equivalent to signing with a pen on paper.\n </div>\n </div>\n\n <div class=\"footer\" slot=\"footer\">\n <div class=\"buttons\">\n <button class=\"cancel\" onClick={e => this.handleCancel(e)}>\n Cancel\n </button>\n <button class=\"proceed\" onClick={e => this.handleAdopt(e)} disabled={this.isAdoptButtonDisabled()}>\n Adopt & Sign\n </button>\n </div>\n </div>\n </verdocs-dialog>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"verdocs-adopt-signature-dialog.js","sourceRoot":"","sources":["../../../../src/components/dialogs/verdocs-adopt-signature-dialog/verdocs-adopt-signature-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,KAAK,EAAC,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAEpD;;;GAGG;AAKH,MAAM,OAAO,2BAA2B;IAJxC;QAUE;;WAEG;QACK,SAAI,GAAW,EAAE,CAAC;QAE1B;;WAEG;QACK,eAAU,GAAY,KAAK,CAAC;QAa3B,eAAU,GAAG,KAAK,CA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;oBACT,+DAAQ,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,qBAAqB,EAAE,mBAExF,CACL,CACF,CACS,CAClB,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Prop, h, Event, EventEmitter, State} from '@stencil/core';\nimport {SignatureXIcon} from '../../../utils/Icons';\n\n/**\n * Display a dialog that allows the user to specify a signature image, either by using a signature-font-generated image\n * based on their full name, or by hand-drawing their signature with a mouse or tablet.\n */\n@Component({\n tag: 'verdocs-adopt-signature-dialog',\n styleUrl: 'verdocs-adopt-signature-dialog.scss',\n})\nexport class VerdocsAdoptSignatureDialog {\n private signatureElement?: HTMLCanvasElement;\n private initialsElement?: HTMLCanvasElement;\n private sigDrawingContext?: CanvasRenderingContext2D;\n private initialsDrawingContext?: CanvasRenderingContext2D;\n\n /**\n * Initial signature text\n */\n @Prop() name: string = '';\n\n /**\n * If true, the name fields will be read-only. Used when the sender has locked the recipient's name.\n */\n @Prop() nameLocked: boolean = false;\n\n /**\n * Fired when the user completes the dialog and clicks Adopt. The event detail will contain a base64-encoded string\n * representation of the signature adopted.\n */\n @Event({composed: true}) next: EventEmitter<{signature: string; initials: string}>;\n\n /**\n * Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n @State() fontLoaded = false;\n @State() enteredName: string = '';\n @State() enteredInitials: string = '';\n @State() mode: 'type' | 'draw' = 'type';\n @State() isDrawing = false;\n @State() hasDrawnSignature = false;\n @State() hasDrawnInitials = false;\n\n private currentSigStroke: Array<{x: number; y: number}> = [];\n private allSigStrokes: Array<Array<{x: number; y: number}>> = [];\n private lastSigPoint: {x: number; y: number} | null = null;\n\n private currentInitialsStroke: Array<{x: number; y: number}> = [];\n private allInitialsStrokes: Array<Array<{x: number; y: number}>> = [];\n private lastInitialsPoint: {x: number; y: number} | null = null;\n\n componentWillLoad() {\n this.enteredName = this.name;\n this.computeEnteredInitials(this.name);\n\n const ds = new FontFace('Dancing Script', 'url(https://fonts.gstatic.com/s/dancingscript/v19/If2cXTr6YS-zF4S-kcSWSVi_sxjsohD9F50Ruu7BMSo3Sup6hNX6plRP.woff)');\n ds.load().then(font => {\n document.fonts.add(font);\n this.fontLoaded = true;\n });\n }\n\n componentDidLoad() {\n this.drawSignatureText();\n this.drawInitialsText();\n this.setupSignatureCanvas();\n this.setupInitialsCanvas();\n }\n\n componentDidUpdate() {\n this.drawSignatureText();\n this.drawInitialsText();\n this.setupSignatureCanvas();\n this.setupInitialsCanvas();\n\n // Redraw drawn signature when in draw mode\n if (this.mode === 'draw' && this.allSigStrokes.length > 0) {\n this.redrawDrawnSignature();\n }\n if (this.mode === 'draw' && this.allInitialsStrokes.length > 0) {\n this.redrawDrawnInitials();\n }\n }\n\n drawSignatureText() {\n if (!this.signatureElement || this.mode !== 'type') {\n return;\n }\n\n const sigCanvasWidth = this.signatureElement.width;\n const sigCanvasHeight = this.signatureElement.height;\n const sigContext = this.signatureElement.getContext('2d');\n sigContext.clearRect(0, 0, this.signatureElement.width, this.signatureElement.height);\n\n let fontSize = 100;\n let metrics: TextMetrics = sigContext.measureText(this.enteredName);\n do {\n fontSize -= 2;\n sigContext.font = `${fontSize}px Dancing Script`;\n metrics = sigContext.measureText(this.enteredName);\n } while (metrics.width > sigCanvasWidth - 24 || metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent + 24 > sigCanvasHeight);\n\n sigContext.textAlign = 'center';\n sigContext.textBaseline = 'middle';\n sigContext.font = `${fontSize}px Dancing Script`;\n sigContext.fillText(this.enteredName, this.signatureElement.width / 2, this.signatureElement.height / 2);\n }\n\n drawInitialsText() {\n if (!this.initialsElement || this.mode !== 'type') {\n return;\n }\n\n const initialsCanvasWidth = this.initialsElement.width;\n const initialsCanvasHeight = this.initialsElement.height;\n const context = this.initialsElement.getContext('2d');\n context.clearRect(0, 0, this.initialsElement.width, this.initialsElement.height);\n\n let fontSize = 100;\n let metrics: TextMetrics = context.measureText(this.enteredInitials);\n do {\n fontSize -= 2;\n context.font = `${fontSize}px Dancing Script`;\n metrics = context.measureText(this.enteredInitials);\n } while (metrics.width > initialsCanvasWidth - 24 || metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent + 24 > initialsCanvasHeight);\n\n context.textAlign = 'center';\n context.textBaseline = 'middle';\n context.font = `${fontSize}px Dancing Script`;\n context.fillText(this.enteredInitials, this.initialsElement.width / 2, this.initialsElement.height / 2);\n }\n\n redrawDrawnSignature() {\n if (!this.signatureElement || !this.sigDrawingContext || this.allSigStrokes.length === 0) {\n return;\n }\n\n // Clear the canvas first\n this.sigDrawingContext.clearRect(0, 0, this.signatureElement.width, this.signatureElement.height);\n\n // Redraw all strokes\n for (const stroke of this.allSigStrokes) {\n if (stroke.length === 0) {\n continue;\n }\n\n // Start the path at the first point\n this.sigDrawingContext.beginPath();\n this.sigDrawingContext.moveTo(stroke[0].x, stroke[0].y);\n\n // Draw smooth curves through all points in the stroke\n for (let i = 1; i < stroke.length; i++) {\n const currentPoint = stroke[i];\n const previousPoint = stroke[i - 1];\n\n // Use quadratic curves for smooth lines\n const midPoint = {\n x: (previousPoint.x + currentPoint.x) / 2,\n y: (previousPoint.y + currentPoint.y) / 2,\n };\n\n this.sigDrawingContext.quadraticCurveTo(previousPoint.x, previousPoint.y, midPoint.x, midPoint.y);\n }\n\n // Draw to the last point\n if (stroke.length > 1) {\n const lastPoint = stroke[stroke.length - 1];\n this.sigDrawingContext.lineTo(lastPoint.x, lastPoint.y);\n }\n\n this.sigDrawingContext.stroke();\n }\n }\n\n redrawDrawnInitials() {\n if (!this.initialsElement || !this.initialsDrawingContext || this.allInitialsStrokes.length === 0) {\n return;\n }\n\n // Clear the canvas first\n this.initialsDrawingContext.clearRect(0, 0, this.initialsElement.width, this.initialsElement.height);\n\n // Redraw all strokes\n for (const stroke of this.allInitialsStrokes) {\n if (stroke.length === 0) {\n continue;\n }\n\n // Start the path at the first point\n this.initialsDrawingContext.beginPath();\n this.initialsDrawingContext.moveTo(stroke[0].x, stroke[0].y);\n\n // Draw smooth curves through all points in the stroke\n for (let i = 1; i < stroke.length; i++) {\n const currentPoint = stroke[i];\n const previousPoint = stroke[i - 1];\n\n // Use quadratic curves for smooth lines\n const midPoint = {\n x: (previousPoint.x + currentPoint.x) / 2,\n y: (previousPoint.y + currentPoint.y) / 2,\n };\n\n this.initialsDrawingContext.quadraticCurveTo(previousPoint.x, previousPoint.y, midPoint.x, midPoint.y);\n }\n\n // Draw to the last point\n if (stroke.length > 1) {\n const lastPoint = stroke[stroke.length - 1];\n this.initialsDrawingContext.lineTo(lastPoint.x, lastPoint.y);\n }\n\n this.initialsDrawingContext.stroke();\n }\n }\n\n handleNameChange(e: any) {\n this.enteredName = e.target.value;\n this.computeEnteredInitials(e.target.value);\n }\n\n computeEnteredInitials(name: string) {\n const nameComponents = name\n .trim()\n .split(' ')\n .filter(part => part.length > 0);\n\n this.enteredInitials = nameComponents.length > 1 ? nameComponents.map(word => word.charAt(0).toUpperCase()).join('') : nameComponents[0].toUpperCase();\n }\n\n handleCancel(e: any) {\n e.stopPropagation();\n e.preventDefault();\n this.exit.emit();\n }\n\n handleAdopt(e: any) {\n e.stopPropagation();\n e.preventDefault();\n const signature = this.signatureElement.toDataURL('image/png');\n const initials = this.initialsElement.toDataURL('image/png');\n this.next.emit({signature, initials});\n }\n\n isAdoptButtonDisabled(): boolean {\n switch (this.mode) {\n case 'type':\n // Disable if no name has been entered\n return !this.enteredName || this.enteredName.trim().length === 0;\n case 'draw':\n // Disable if nothing has been drawn\n return (!this.hasDrawnSignature && !this.hasDrawnInitials) || this.allSigStrokes.length === 0 || this.allInitialsStrokes.length === 0;\n default:\n return true;\n }\n }\n\n setupSignatureCanvas() {\n if (!this.signatureElement) {\n return;\n }\n\n // Set up drawing context when in draw mode\n if (this.mode === 'draw') {\n // Always get fresh context from the current canvas element\n const sigContext = this.signatureElement.getContext('2d');\n\n // Only initialize if we don't have a context or it's different\n if (sigContext && sigContext !== this.sigDrawingContext) {\n this.sigDrawingContext = sigContext;\n\n // Configure drawing style for smooth signatures\n this.sigDrawingContext.strokeStyle = '#000000';\n this.sigDrawingContext.lineWidth = 2;\n this.sigDrawingContext.lineCap = 'round';\n this.sigDrawingContext.lineJoin = 'round';\n\n // Clear canvas only if there are no existing strokes\n if (this.allSigStrokes.length === 0) {\n this.sigDrawingContext.clearRect(0, 0, this.signatureElement.width, this.signatureElement.height);\n }\n }\n }\n\n // Reset drawing context when switching away from draw mode\n // NOTE: We don't clear allStrokes here so drawing persists when returning to draw mode\n if (this.mode !== 'draw' && this.sigDrawingContext) {\n this.sigDrawingContext = null;\n this.currentSigStroke = [];\n this.lastSigPoint = null;\n }\n }\n\n setupInitialsCanvas() {\n if (!this.initialsElement) {\n return;\n }\n\n // Set up drawing context when in draw mode\n if (this.mode === 'draw') {\n // Always get fresh context from the current canvas element\n const initialsContext = this.initialsElement.getContext('2d');\n\n // Only initialize if we don't have a context or it's different\n if (initialsContext && initialsContext !== this.initialsDrawingContext) {\n this.initialsDrawingContext = initialsContext;\n\n // Configure drawing style for smooth signatures\n this.initialsDrawingContext.strokeStyle = '#000000';\n this.initialsDrawingContext.lineWidth = 2;\n this.initialsDrawingContext.lineCap = 'round';\n this.initialsDrawingContext.lineJoin = 'round';\n\n // Clear canvas only if there are no existing strokes\n if (this.allInitialsStrokes.length === 0) {\n this.initialsDrawingContext.clearRect(0, 0, this.initialsElement.width, this.initialsElement.height);\n }\n }\n }\n\n // Reset drawing context when switching away from draw mode\n // NOTE: We don't clear allStrokes here so drawing persists when returning to draw mode\n if (this.mode !== 'draw' && this.initialsDrawingContext) {\n this.initialsDrawingContext = null;\n this.currentInitialsStroke = [];\n this.lastInitialsPoint = null;\n }\n }\n\n clearSignatureCanvas() {\n if (!this.signatureElement || !this.sigDrawingContext) {\n return;\n }\n\n this.sigDrawingContext.clearRect(0, 0, this.signatureElement.width, this.signatureElement.height);\n this.currentSigStroke = [];\n this.allSigStrokes = [];\n this.lastSigPoint = null;\n this.hasDrawnSignature = false;\n }\n\n clearInitialsCanvas() {\n if (!this.initialsElement || !this.initialsDrawingContext) {\n return;\n }\n\n this.initialsDrawingContext.clearRect(0, 0, this.initialsElement.width, this.initialsElement.height);\n this.currentInitialsStroke = [];\n this.allInitialsStrokes = [];\n this.lastInitialsPoint = null;\n this.hasDrawnInitials = false;\n }\n\n handleClearDrawing(e: any, type: 'signature' | 'initials' | 'all' = 'all') {\n e.stopPropagation();\n e.preventDefault();\n if (type === 'all' || type === 'signature') this.clearSignatureCanvas();\n if (type === 'all' || type === 'initials') this.clearInitialsCanvas();\n }\n\n getSigCanvasCoordinates(e: PointerEvent): {x: number; y: number} {\n if (!this.signatureElement) {\n return {x: 0, y: 0};\n }\n\n const rect = this.signatureElement.getBoundingClientRect();\n\n // Calculate the scale factor between canvas size and display size\n const scaleX = this.signatureElement.width / rect.width;\n const scaleY = this.signatureElement.height / rect.height;\n\n return {\n x: (e.clientX - rect.left) * scaleX,\n y: (e.clientY - rect.top) * scaleY,\n };\n }\n\n getInitialsCanvasCoordinates(e: PointerEvent): {x: number; y: number} {\n if (!this.initialsElement) {\n return {x: 0, y: 0};\n }\n\n const rect = this.initialsElement.getBoundingClientRect();\n\n // Calculate the scale factor between canvas size and display size\n const scaleX = this.initialsElement.width / rect.width;\n const scaleY = this.initialsElement.height / rect.height;\n\n return {\n x: (e.clientX - rect.left) * scaleX,\n y: (e.clientY - rect.top) * scaleY,\n };\n }\n\n handleSigPointerDown = (e: PointerEvent) => {\n e.preventDefault();\n\n if (!this.signatureElement || !this.sigDrawingContext) {\n return;\n }\n\n this.isDrawing = true;\n this.hasDrawnSignature = true;\n\n const point = this.getSigCanvasCoordinates(e);\n this.currentSigStroke = [point];\n this.lastSigPoint = point;\n\n // Start a new path\n this.sigDrawingContext.beginPath();\n this.sigDrawingContext.moveTo(point.x, point.y);\n\n // Capture pointer to ensure we get all events even if pointer leaves canvas\n this.signatureElement.setPointerCapture(e.pointerId);\n };\n\n handleSigPointerMove = (e: PointerEvent) => {\n e.preventDefault();\n\n if (!this.isDrawing || !this.sigDrawingContext || !this.lastSigPoint) {\n return;\n }\n\n const point = this.getSigCanvasCoordinates(e);\n this.currentSigStroke.push(point);\n\n // Use quadratic curves for smooth drawing\n // The control point is the last point, and we draw to the midpoint\n const midPoint = {\n x: (this.lastSigPoint.x + point.x) / 2,\n y: (this.lastSigPoint.y + point.y) / 2,\n };\n\n this.sigDrawingContext.quadraticCurveTo(this.lastSigPoint.x, this.lastSigPoint.y, midPoint.x, midPoint.y);\n this.sigDrawingContext.stroke();\n\n this.lastSigPoint = point;\n };\n\n handleSigPointerUp = (e: PointerEvent) => {\n e.preventDefault();\n\n if (!this.isDrawing || !this.sigDrawingContext) {\n return;\n }\n\n // Complete the stroke\n if (this.lastSigPoint && this.currentSigStroke.length > 0) {\n this.sigDrawingContext.lineTo(this.lastSigPoint.x, this.lastSigPoint.y);\n this.sigDrawingContext.stroke();\n }\n\n // Save the completed stroke\n if (this.currentSigStroke.length > 0) {\n this.allSigStrokes.push([...this.currentSigStroke]);\n }\n\n this.isDrawing = false;\n this.currentSigStroke = [];\n this.lastSigPoint = null;\n\n // Release pointer capture\n if (this.signatureElement) {\n this.signatureElement.releasePointerCapture(e.pointerId);\n }\n };\n\n handleSigPointerCancel = (e: PointerEvent) => {\n // Handle cases where drawing is interrupted (e.g., phone call, notification)\n this.isDrawing = false;\n this.currentSigStroke = [];\n this.lastSigPoint = null;\n\n if (this.signatureElement) {\n this.signatureElement.releasePointerCapture(e.pointerId);\n }\n };\n\n handleInitialsPointerDown = (e: PointerEvent) => {\n e.preventDefault();\n\n if (!this.initialsElement || !this.initialsDrawingContext) {\n return;\n }\n\n this.isDrawing = true;\n this.hasDrawnInitials = true;\n\n const point = this.getInitialsCanvasCoordinates(e);\n this.currentInitialsStroke = [point];\n this.lastInitialsPoint = point;\n\n // Start a new path\n this.initialsDrawingContext.beginPath();\n this.initialsDrawingContext.moveTo(point.x, point.y);\n\n // Capture pointer to ensure we get all events even if pointer leaves canvas\n this.initialsElement.setPointerCapture(e.pointerId);\n };\n\n handleInitialsPointerMove = (e: PointerEvent) => {\n e.preventDefault();\n\n if (!this.isDrawing || !this.initialsDrawingContext || !this.lastInitialsPoint) {\n return;\n }\n\n const point = this.getInitialsCanvasCoordinates(e);\n this.currentInitialsStroke.push(point);\n\n // Use quadratic curves for smooth drawing\n // The control point is the last point, and we draw to the midpoint\n const midPoint = {\n x: (this.lastInitialsPoint.x + point.x) / 2,\n y: (this.lastInitialsPoint.y + point.y) / 2,\n };\n\n this.initialsDrawingContext.quadraticCurveTo(this.lastInitialsPoint.x, this.lastInitialsPoint.y, midPoint.x, midPoint.y);\n this.initialsDrawingContext.stroke();\n\n this.lastInitialsPoint = point;\n };\n\n handleInitialsPointerUp = (e: PointerEvent) => {\n e.preventDefault();\n\n if (!this.isDrawing || !this.initialsDrawingContext) {\n return;\n }\n\n // Complete the stroke\n if (this.lastInitialsPoint && this.currentInitialsStroke.length > 0) {\n this.initialsDrawingContext.lineTo(this.lastInitialsPoint.x, this.lastInitialsPoint.y);\n this.initialsDrawingContext.stroke();\n }\n\n // Save the completed stroke\n if (this.currentInitialsStroke.length > 0) {\n this.allInitialsStrokes.push([...this.currentInitialsStroke]);\n }\n\n this.isDrawing = false;\n this.currentInitialsStroke = [];\n this.lastInitialsPoint = null;\n\n // Release pointer capture\n if (this.initialsElement) {\n this.initialsElement.releasePointerCapture(e.pointerId);\n }\n };\n\n handleInitialsPointerCancel = (e: PointerEvent) => {\n // Handle cases where drawing is interrupted (e.g., phone call, notification)\n this.isDrawing = false;\n this.currentInitialsStroke = [];\n this.lastInitialsPoint = null;\n\n if (this.initialsElement) {\n this.initialsElement.releasePointerCapture(e.pointerId);\n }\n };\n\n render() {\n return (\n <verdocs-dialog persistent onExit={() => this.exit.emit()}>\n <div slot=\"heading\" class=\"heading\">\n Adopt Your Signature\n </div>\n\n <div slot=\"content\" class=\"content\">\n <div style={{fontWeight: '300', color: '#242424', fontSize: '13px'}}>Confirm your name, initials, and signature.</div>\n\n <div class={{type: true, active: this.mode === 'type'}}>\n <verdocs-text-input\n label=\"Full Name\"\n value={this.enteredName}\n disabled={this.nameLocked}\n onInput={e => this.handleNameChange(e)}\n onClick={e => e.stopPropagation()}\n />\n {this.nameLocked && <div class=\"name-locked-hint\">Your name has been set by the sender and cannot be changed.</div>}\n </div>\n\n <div style={{fontWeight: '400', color: '#242424', fontSize: '13px'}}>Select a signature style</div>\n\n <div style={{display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px'}}>\n <verdocs-radio-button checked={this.mode === 'type'} value=\"type\" name=\"mode\" onClick={() => (this.mode = 'type')} />\n <label>Typed with a keyboard</label>\n </div>\n <div style={{display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px'}}>\n <verdocs-radio-button checked={this.mode === 'draw'} value=\"draw\" name=\"mode\" onClick={() => (this.mode = 'draw')} />\n <label>Drawn with touch, mouse, or stylus</label>\n </div>\n\n <div class=\"preview-header\">\n <div style={{fontSize: '13px', fontWeight: '400'}}>Signature Preview</div>\n {this.mode === 'draw' && (\n <button class=\"clear-button-text\" onClick={e => this.handleClearDrawing(e, 'signature')} disabled={!this.hasDrawnSignature}>\n Clear\n </button>\n )}\n </div>\n <div class=\"canvas-container signature-container\">\n <div class=\"signing-indicator\">\n <div class=\"x-icon\" innerHTML={SignatureXIcon}></div>\n <div class=\"signing-line\"></div>\n </div>\n <canvas\n ref={el => (this.signatureElement = el as HTMLCanvasElement)}\n // width=\"300\"\n height=\"79\"\n class=\"signature-canvas\"\n onPointerDown={this.handleSigPointerDown}\n onPointerMove={this.handleSigPointerMove}\n onPointerUp={this.handleSigPointerUp}\n onPointerCancel={this.handleSigPointerCancel}\n style={{touchAction: 'none', cursor: 'crosshair'}}\n />\n </div>\n\n <div class=\"preview-header\">\n <div style={{fontSize: '13px', fontWeight: '400'}}>Initials Preview</div>\n {this.mode === 'draw' && (\n <button class=\"clear-button-text\" onClick={e => this.handleClearDrawing(e, 'initials')} disabled={!this.hasDrawnInitials}>\n Clear\n </button>\n )}\n </div>\n <div class=\"canvas-container initials-container\">\n <div class=\"signing-indicator\">\n <div class=\"x-icon\" innerHTML={SignatureXIcon}></div>\n <div class=\"signing-line\"></div>\n </div>\n <canvas\n ref={el => (this.initialsElement = el as HTMLCanvasElement)}\n // width=\"300\"\n height=\"79\"\n class=\"initials-canvas\"\n onPointerDown={this.handleInitialsPointerDown}\n onPointerMove={this.handleInitialsPointerMove}\n onPointerUp={this.handleInitialsPointerUp}\n onPointerCancel={this.handleInitialsPointerCancel}\n style={{touchAction: 'none', cursor: 'crosshair'}}\n />\n </div>\n\n <div class=\"disclaimer\">\n By clicking «Adopt Signature», I agree that the signature and initials above will be the electronic representation of my signature and initials for all purposes when I\n use them to sign documents. Applying them to a document is legally equivalent to signing with a pen on paper.\n </div>\n </div>\n\n <div class=\"footer\" slot=\"footer\">\n <div class=\"buttons\">\n <button class=\"cancel\" onClick={e => this.handleCancel(e)}>\n Cancel\n </button>\n <button class=\"proceed\" onClick={e => this.handleAdopt(e)} disabled={this.isAdoptButtonDisabled()}>\n Adopt & Sign\n </button>\n </div>\n </div>\n </verdocs-dialog>\n );\n }\n}\n"]}
@@ -34,7 +34,7 @@ export class VerdocsSigningProgress {
34
34
  if (fieldCompleted && readyToSubmit) {
35
35
  return (h("div", { class: "vsp-field-completed" }, h("div", { class: "vsp-icon" }, this.renderSuccessIcon()), h("span", { class: "vsp-text" }, "Ready to submit.")));
36
36
  }
37
- return h("div", { class: "vsp-field-label" }, fieldLabel);
37
+ return null;
38
38
  }
39
39
  renderFooter(current, _total, requiredRemaining, optionalRemaining) {
40
40
  if (this.mode === 'start') {
@@ -72,7 +72,8 @@ export class VerdocsSigningProgress {
72
72
  const focusedFieldObj = this.fields.find(f => f.name === this.focusedField);
73
73
  const currentIndex = this.fields.findIndex(f => f.name === this.focusedField) + 1;
74
74
  const totalFields = this.fields.length;
75
- return (h("div", { class: "vsp-card" }, h("div", { class: "vsp-header" }, h("div", { class: "vsp-progress-line" }, requiredRemaining, " of ", requiredFields.length, " required fields remaining"), optionalFields.length > 0 && (h("div", { class: "vsp-progress-line vsp-optional" }, optionalRemaining, " of ", optionalFields.length, " optional fields remaining"))), h("div", { class: "vsp-body" }, this.renderContent(getFieldLabel(focusedFieldObj), focusedFieldObj ? !!isFilled(focusedFieldObj) : false, requiredRemaining === 0)), h("div", { class: "vsp-separator" }), this.renderFooter(Math.max(1, currentIndex), totalFields, requiredRemaining, optionalRemaining)));
75
+ const progressContent = this.renderContent(getFieldLabel(focusedFieldObj), focusedFieldObj ? !!isFilled(focusedFieldObj) : false, requiredRemaining === 0);
76
+ return (h("div", { class: "vsp-card" }, h("div", { class: "vsp-header" }, h("div", { class: "vsp-progress-line" }, requiredRemaining, " of ", requiredFields.length, " required fields remaining"), optionalFields.length > 0 && (h("div", { class: "vsp-progress-line vsp-optional" }, optionalRemaining, " of ", optionalFields.length, " optional fields remaining"))), progressContent && h("div", { class: "vsp-body" }, progressContent), h("div", { class: "vsp-separator" }), this.renderFooter(Math.max(1, currentIndex), totalFields, requiredRemaining, optionalRemaining)));
76
77
  }
77
78
  static get is() { return "verdocs-signing-progress"; }
78
79
  static get originalStyleUrls() {
@@ -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,EAA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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=\"vsp-field-label\">{fieldLabel}</div>;\n }\n\n if (fieldCompleted && readyToSubmit) {\n return (\n <div class=\"vsp-field-completed\">\n <div class=\"vsp-icon\">{this.renderSuccessIcon()}</div>\n <span class=\"vsp-text\">Ready to submit.</span>\n </div>\n );\n }\n\n return <div class=\"vsp-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=\"vsp-btn vsp-start\" onClick={() => this.started.emit()}>\n Start Signing\n </button>\n );\n }\n\n return (\n <div class=\"vsp-nav-buttons\">\n {requiredRemaining === 0 && optionalRemaining === 0 ? (\n <button class=\"vsp-btn vsp-submit\" onClick={() => this.exit.emit()}>\n Submit\n </button>\n ) : (\n [\n <button class=\"vsp-btn vsp-previous\" disabled={current <= 1} onClick={() => this.previous.emit()}>\n Previous\n </button>,\n <button class=\"vsp-btn vsp-next\" onClick={() => this.next.emit()}>\n Next\n </button>,\n ]\n )}\n </div>\n );\n }\n\n renderCompleted() {\n return (\n <div class=\"vsp-card vsp-completed\">\n <div class=\"vsp-header-completed\">\n <div class=\"vsp-icon\">{this.renderSuccessIcon()}</div>\n Ready to Submit\n </div>\n <div class=\"vsp-description\">You have entered all requested signatures. Select Submit to complete the signing process.</div>\n <div class=\"vsp-separator\" />\n <button class=\"vsp-btn vsp-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\"/\"initialed\" even after a signature/initial is cleared, so\n // isFieldFilled (which looks at value) would still report it as filled. settings.signature_id\n // (signature) / settings.initial_id (initial) is the authoritative indicator and is nulled out\n // on clear. This must match the parent's isFieldActuallyFilled() in verdocs-sign so the progress\n // panel and submit gating agree.\n if (f.type === 'signature' || f.type === 'initial') {\n const key = f.type === 'initial' ? 'initial_id' : 'signature_id';\n return !!(f.settings as any)?.[key];\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=\"vsp-card\">\n <div class=\"vsp-header\">\n <div class=\"vsp-progress-line\">\n {requiredRemaining} of {requiredFields.length} required fields remaining\n </div>\n {optionalFields.length > 0 && (\n <div class=\"vsp-progress-line vsp-optional\">\n {optionalRemaining} of {optionalFields.length} optional fields remaining\n </div>\n )}\n </div>\n\n <div class=\"vsp-body\">\n {this.renderContent(getFieldLabel(focusedFieldObj), focusedFieldObj ? !!isFilled(focusedFieldObj) : false, requiredRemaining === 0)}\n </div>\n\n <div class=\"vsp-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,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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=\"vsp-field-label\">{fieldLabel}</div>;\n }\n\n if (fieldCompleted && readyToSubmit) {\n return (\n <div class=\"vsp-field-completed\">\n <div class=\"vsp-icon\">{this.renderSuccessIcon()}</div>\n <span class=\"vsp-text\">Ready to submit.</span>\n </div>\n );\n }\n\n return null;\n }\n\n renderFooter(current: number, _total: number, requiredRemaining: number, optionalRemaining: number) {\n if (this.mode === 'start') {\n return (\n <button class=\"vsp-btn vsp-start\" onClick={() => this.started.emit()}>\n Start Signing\n </button>\n );\n }\n\n return (\n <div class=\"vsp-nav-buttons\">\n {requiredRemaining === 0 && optionalRemaining === 0 ? (\n <button class=\"vsp-btn vsp-submit\" onClick={() => this.exit.emit()}>\n Submit\n </button>\n ) : (\n [\n <button class=\"vsp-btn vsp-previous\" disabled={current <= 1} onClick={() => this.previous.emit()}>\n Previous\n </button>,\n <button class=\"vsp-btn vsp-next\" onClick={() => this.next.emit()}>\n Next\n </button>,\n ]\n )}\n </div>\n );\n }\n\n renderCompleted() {\n return (\n <div class=\"vsp-card vsp-completed\">\n <div class=\"vsp-header-completed\">\n <div class=\"vsp-icon\">{this.renderSuccessIcon()}</div>\n Ready to Submit\n </div>\n <div class=\"vsp-description\">You have entered all requested signatures. Select Submit to complete the signing process.</div>\n <div class=\"vsp-separator\" />\n <button class=\"vsp-btn vsp-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\"/\"initialed\" even after a signature/initial is cleared, so\n // isFieldFilled (which looks at value) would still report it as filled. settings.signature_id\n // (signature) / settings.initial_id (initial) is the authoritative indicator and is nulled out\n // on clear. This must match the parent's isFieldActuallyFilled() in verdocs-sign so the progress\n // panel and submit gating agree.\n if (f.type === 'signature' || f.type === 'initial') {\n const key = f.type === 'initial' ? 'initial_id' : 'signature_id';\n return !!(f.settings as any)?.[key];\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 const progressContent = this.renderContent(getFieldLabel(focusedFieldObj), focusedFieldObj ? !!isFilled(focusedFieldObj) : false, requiredRemaining === 0);\n\n return (\n <div class=\"vsp-card\">\n <div class=\"vsp-header\">\n <div class=\"vsp-progress-line\">\n {requiredRemaining} of {requiredFields.length} required fields remaining\n </div>\n {optionalFields.length > 0 && (\n <div class=\"vsp-progress-line vsp-optional\">\n {optionalRemaining} of {optionalFields.length} optional fields remaining\n </div>\n )}\n </div>\n\n {progressContent && <div class=\"vsp-body\">{progressContent}</div>}\n\n <div class=\"vsp-separator\" />\n\n {this.renderFooter(Math.max(1, currentIndex), totalFields, requiredRemaining, optionalRemaining)}\n </div>\n );\n }\n}\n"]}
@@ -46,7 +46,7 @@ const VerdocsSigningProgress = /*@__PURE__*/ proxyCustomElement(class VerdocsSig
46
46
  if (fieldCompleted && readyToSubmit) {
47
47
  return (h("div", { class: "vsp-field-completed" }, h("div", { class: "vsp-icon" }, this.renderSuccessIcon()), h("span", { class: "vsp-text" }, "Ready to submit.")));
48
48
  }
49
- return h("div", { class: "vsp-field-label" }, fieldLabel);
49
+ return null;
50
50
  }
51
51
  renderFooter(current, _total, requiredRemaining, optionalRemaining) {
52
52
  if (this.mode === 'start') {
@@ -84,7 +84,8 @@ const VerdocsSigningProgress = /*@__PURE__*/ proxyCustomElement(class VerdocsSig
84
84
  const focusedFieldObj = this.fields.find(f => f.name === this.focusedField);
85
85
  const currentIndex = this.fields.findIndex(f => f.name === this.focusedField) + 1;
86
86
  const totalFields = this.fields.length;
87
- return (h("div", { class: "vsp-card" }, h("div", { class: "vsp-header" }, h("div", { class: "vsp-progress-line" }, requiredRemaining, " of ", requiredFields.length, " required fields remaining"), optionalFields.length > 0 && (h("div", { class: "vsp-progress-line vsp-optional" }, optionalRemaining, " of ", optionalFields.length, " optional fields remaining"))), h("div", { class: "vsp-body" }, this.renderContent(getFieldLabel(focusedFieldObj), focusedFieldObj ? !!isFilled(focusedFieldObj) : false, requiredRemaining === 0)), h("div", { class: "vsp-separator" }), this.renderFooter(Math.max(1, currentIndex), totalFields, requiredRemaining, optionalRemaining)));
87
+ const progressContent = this.renderContent(getFieldLabel(focusedFieldObj), focusedFieldObj ? !!isFilled(focusedFieldObj) : false, requiredRemaining === 0);
88
+ return (h("div", { class: "vsp-card" }, h("div", { class: "vsp-header" }, h("div", { class: "vsp-progress-line" }, requiredRemaining, " of ", requiredFields.length, " required fields remaining"), optionalFields.length > 0 && (h("div", { class: "vsp-progress-line vsp-optional" }, optionalRemaining, " of ", optionalFields.length, " optional fields remaining"))), progressContent && h("div", { class: "vsp-body" }, progressContent), h("div", { class: "vsp-separator" }), this.renderFooter(Math.max(1, currentIndex), totalFields, requiredRemaining, optionalRemaining)));
88
89
  }
89
90
  static get style() { return verdocsSigningProgressCss; }
90
91
  }, [256, "verdocs-signing-progress", {
@@ -114,6 +115,6 @@ function defineCustomElement() {
114
115
  }
115
116
 
116
117
  export { VerdocsSigningProgress as V, defineCustomElement as d };
117
- //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CAAC,MAAM,EACzC,4BAAA,CAAA,EACL,cAAc,CAAC,MAAM,GAAG,CAAC,KACxB,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,gCAAgC,EAAA,EACxC,iBAAiB,UAAM,cAAc,CAAC,MAAM,EACzC,4BAAA,CAAA,CACP,CACG,EAEL,eAAe,IAAI,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,UAAU,EAAA,EAAE,eAAe,CAAO,EAEjE,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,eAAe,EAAG,CAAA,EAE5B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,iBAAiB,CAAC,CAC5F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/dialogs/verdocs-signing-progress/verdocs-signing-progress.scss?tag=verdocs-signing-progress","src/components/dialogs/verdocs-signing-progress/verdocs-signing-progress.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-signing-progress {\n // Anchored to the verdocs-sign widget (which is position: relative), not the viewport, so the\n // panel sits correctly whether the SDK is used standalone (full page) or embedded below a host\n // app's nav/header. The widget's own scroll happens inside .document (overflow-y: scroll) while\n // verdocs-sign is overflow: hidden, so the panel stays put as the document scrolls.\n position: absolute;\n top: 70px; // Clears the SDK's ~54px toolbar\n left: 20px;\n z-index: 900;\n display: block;\n font-family: $verdocs-primary-font;\n\n @media (max-width: 600px) {\n display: none;\n }\n\n .vsp-card {\n background: white;\n padding: 16px;\n border-radius: 8px;\n box-shadow:\n 0 4px 6px -1px rgba(0, 0, 0, 0.1),\n 0 2px 4px -1px rgba(0, 0, 0, 0.06);\n width: 240px;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n\n .vsp-header {\n font-size: 14px;\n color: #111827;\n display: flex;\n flex-direction: column;\n gap: 6px;\n\n .vsp-progress-line.vsp-optional {\n color: #6b7280;\n }\n }\n\n .vsp-header-completed {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n font-weight: 500;\n color: #111827;\n }\n\n .vsp-description {\n font-size: 12px;\n line-height: 16px;\n color: #374151;\n }\n\n .vsp-field-label {\n font-family: var(--verdocs-primary-font, $verdocs-primary-font);\n font-size: 0.75rem;\n line-height: 1rem;\n font-weight: 400;\n color: var(--verdocs-body-color, #242424);\n }\n\n .vsp-field-completed {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 0.75rem;\n line-height: 1rem;\n font-weight: 400;\n color: var(--verdocs-body-color, #242424);\n\n .vsp-text {\n position: relative;\n top: -2px;\n }\n }\n\n .vsp-separator {\n height: 1px;\n background-color: #e5e7eb;\n width: 100%;\n }\n\n .vsp-btn {\n width: 100%;\n height: 32px;\n border-radius: 4px;\n font-weight: 600;\n font-size: 0.75rem;\n line-height: 1rem;\n cursor: pointer;\n border: 1px solid transparent; // Default border\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &:disabled {\n background-color: #f0f0f0;\n border: 1px solid #e0e0e0;\n color: #bdbdbd;\n cursor: not-allowed;\n opacity: 1;\n }\n\n &.vsp-start,\n &.vsp-submit,\n &.vsp-next {\n background-color: var(--verdocs-primary-color, #55bc81);\n color: white;\n\n &:hover:not(:disabled) {\n background-color: var(--verdocs-primary-color-hover, #2b995b);\n }\n\n &:disabled {\n background-color: #f0f0f0;\n border: 1px solid #e0e0e0;\n color: #bdbdbd;\n cursor: not-allowed;\n opacity: 1;\n }\n }\n\n &.vsp-previous {\n background-color: #f3f4f6;\n color: #374151;\n\n &:hover:not(:disabled) {\n background-color: #e5e7eb;\n }\n\n &:disabled {\n background-color: #f0f0f0;\n border: 1px solid #e0e0e0;\n color: #bdbdbd;\n cursor: not-allowed;\n opacity: 1;\n }\n }\n }\n\n .vsp-nav-buttons {\n display: flex;\n gap: 12px;\n width: 100%;\n\n .vsp-btn {\n flex: 1;\n }\n }\n}\n","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=\"vsp-field-label\">{fieldLabel}</div>;\n }\n\n if (fieldCompleted && readyToSubmit) {\n return (\n <div class=\"vsp-field-completed\">\n <div class=\"vsp-icon\">{this.renderSuccessIcon()}</div>\n <span class=\"vsp-text\">Ready to submit.</span>\n </div>\n );\n }\n\n return null;\n }\n\n renderFooter(current: number, _total: number, requiredRemaining: number, optionalRemaining: number) {\n if (this.mode === 'start') {\n return (\n <button class=\"vsp-btn vsp-start\" onClick={() => this.started.emit()}>\n Start Signing\n </button>\n );\n }\n\n return (\n <div class=\"vsp-nav-buttons\">\n {requiredRemaining === 0 && optionalRemaining === 0 ? (\n <button class=\"vsp-btn vsp-submit\" onClick={() => this.exit.emit()}>\n Submit\n </button>\n ) : (\n [\n <button class=\"vsp-btn vsp-previous\" disabled={current <= 1} onClick={() => this.previous.emit()}>\n Previous\n </button>,\n <button class=\"vsp-btn vsp-next\" onClick={() => this.next.emit()}>\n Next\n </button>,\n ]\n )}\n </div>\n );\n }\n\n renderCompleted() {\n return (\n <div class=\"vsp-card vsp-completed\">\n <div class=\"vsp-header-completed\">\n <div class=\"vsp-icon\">{this.renderSuccessIcon()}</div>\n Ready to Submit\n </div>\n <div class=\"vsp-description\">You have entered all requested signatures. Select Submit to complete the signing process.</div>\n <div class=\"vsp-separator\" />\n <button class=\"vsp-btn vsp-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\"/\"initialed\" even after a signature/initial is cleared, so\n // isFieldFilled (which looks at value) would still report it as filled. settings.signature_id\n // (signature) / settings.initial_id (initial) is the authoritative indicator and is nulled out\n // on clear. This must match the parent's isFieldActuallyFilled() in verdocs-sign so the progress\n // panel and submit gating agree.\n if (f.type === 'signature' || f.type === 'initial') {\n const key = f.type === 'initial' ? 'initial_id' : 'signature_id';\n return !!(f.settings as any)?.[key];\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 const progressContent = this.renderContent(getFieldLabel(focusedFieldObj), focusedFieldObj ? !!isFilled(focusedFieldObj) : false, requiredRemaining === 0);\n\n return (\n <div class=\"vsp-card\">\n <div class=\"vsp-header\">\n <div class=\"vsp-progress-line\">\n {requiredRemaining} of {requiredFields.length} required fields remaining\n </div>\n {optionalFields.length > 0 && (\n <div class=\"vsp-progress-line vsp-optional\">\n {optionalRemaining} of {optionalFields.length} optional fields remaining\n </div>\n )}\n </div>\n\n {progressContent && <div class=\"vsp-body\">{progressContent}</div>}\n\n <div class=\"vsp-separator\" />\n\n {this.renderFooter(Math.max(1, currentIndex), totalFields, requiredRemaining, optionalRemaining)}\n </div>\n );\n }\n}\n"],"version":3}
@@ -449,11 +449,11 @@ const VerdocsAdoptSignatureDialog = /*@__PURE__*/ proxyCustomElement(class Verdo
449
449
  };
450
450
  }
451
451
  render() {
452
- return (h("verdocs-dialog", { key: '462948fa67d1a3e32c0fdd03d0183f8b822eb312' }, h("div", { key: 'f05a30ae50b16934a983f29b2d27ddfc4b3fb3b4', slot: "heading", class: "heading" }, "Adopt Your Signature"), h("div", { key: '1a2aa7ace11493961d251ad6bc6ce3406a625532', slot: "content", class: "content" }, h("div", { key: 'd4f11c53451ce55c875320829016bf3a7009b8dc', style: { fontWeight: '300', color: '#242424', fontSize: '13px' } }, "Confirm your name, initials, and signature."), h("div", { key: '5bd2c07de6a5f3f4e31d308c62d4f8805822fcf9', class: { type: true, active: this.mode === 'type' } }, h("verdocs-text-input", { key: '1d6a6a26e1cd66442d7a4d44040a41d66251de55', label: "Full Name", value: this.enteredName, disabled: this.nameLocked, onInput: e => this.handleNameChange(e), onClick: e => e.stopPropagation() }), this.nameLocked && h("div", { key: '2a839a7f0791dc5af3154471f7730f0f23e1cf36', class: "name-locked-hint" }, "Your name has been set by the sender and cannot be changed.")), h("div", { key: '6090f63b7bb0be98a9cc02705dd2cc2d4e573d3c', style: { fontWeight: '400', color: '#242424', fontSize: '13px' } }, "Select a signature style"), h("div", { key: '4ff274227aad18cb5ba62ee876bbb848cca8c111', style: { display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px' } }, h("verdocs-radio-button", { key: '6d8c8784e20426fc4cab54aaf1f4d976872b49b1', checked: this.mode === 'type', value: "type", name: "mode", onClick: () => (this.mode = 'type') }), h("label", { key: 'c787fadf3e94998050c4d43d30d5a7f84baaaea1' }, "Typed with a keyboard")), h("div", { key: 'c7b02e786ef4538621f4adae37ed2087ab176b5b', style: { display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px' } }, h("verdocs-radio-button", { key: 'fcf483b47ee7b4031ab0e5d46ae38e3761193441', checked: this.mode === 'draw', value: "draw", name: "mode", onClick: () => (this.mode = 'draw') }), h("label", { key: '16c6f4fabb564512fc757685d31aadbdd7723ace' }, "Drawn with touch, mouse, or stylus")), h("div", { key: 'c9e059fff254d2654f6fac9afae61c2849a72926', class: "preview-header" }, h("div", { key: '396b8d70757e4c976ed946c0c4dee93c1adf41db', style: { fontSize: '13px', fontWeight: '400' } }, "Signature Preview"), this.mode === 'draw' && (h("button", { key: '4eabebe8916e28e42011a5d5c5a70fe114179df7', class: "clear-button-text", onClick: e => this.handleClearDrawing(e, 'signature'), disabled: !this.hasDrawnSignature }, "Clear"))), h("div", { key: 'c6749bfdef5f26df049c6e54384b528a38f4a8b7', class: "canvas-container signature-container" }, h("div", { key: 'eb76bcb4ab6a18c9ba361f466a21a26552687983', class: "signing-indicator" }, h("div", { key: 'db9ad8803a7d74319a84d16ae5ac5b82316d9d85', class: "x-icon", innerHTML: SignatureXIcon }), h("div", { key: '72c51304ffe3ebd8d7cce0cc3baa8bca002961d2', class: "signing-line" })), h("canvas", { key: 'e795c8fc32ad3dd0dcdffb67915db3c26e7eeeb4', ref: el => (this.signatureElement = el),
452
+ return (h("verdocs-dialog", { key: '2d9f8c2d126b604fe74baf617ad66329cc83d642', persistent: true, onExit: () => this.exit.emit() }, h("div", { key: 'b5fe4f88aaec381b9dc44d4368eeb7062408d08f', slot: "heading", class: "heading" }, "Adopt Your Signature"), h("div", { key: '02094c09fd6b63f6d1a17f0813850558efc65c3e', slot: "content", class: "content" }, h("div", { key: '6b6ec99527de5d4d079b3d3d478581d0a403ec61', style: { fontWeight: '300', color: '#242424', fontSize: '13px' } }, "Confirm your name, initials, and signature."), h("div", { key: '5446ee94d3f7d8c5a76bb07be4cb36a4977378ec', class: { type: true, active: this.mode === 'type' } }, h("verdocs-text-input", { key: '6efbbb16fc67f5360e3497573b045a9187557b1d', label: "Full Name", value: this.enteredName, disabled: this.nameLocked, onInput: e => this.handleNameChange(e), onClick: e => e.stopPropagation() }), this.nameLocked && h("div", { key: '1bc48daa4d814199d1e399a6ace89a33ec70dfcd', class: "name-locked-hint" }, "Your name has been set by the sender and cannot be changed.")), h("div", { key: '299b6667ff61ebb5bcd38f6e69f793c99073266e', style: { fontWeight: '400', color: '#242424', fontSize: '13px' } }, "Select a signature style"), h("div", { key: '50b3b5d6c33790d9702c214f6d4dc536191f3529', style: { display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px' } }, h("verdocs-radio-button", { key: '1a7aae5b62f11ce35eca59b85e58ce5300991b20', checked: this.mode === 'type', value: "type", name: "mode", onClick: () => (this.mode = 'type') }), h("label", { key: '6bc2c033e6a094140186c394772eb8bb4146a59d' }, "Typed with a keyboard")), h("div", { key: 'c8eb2d62a274a069507250b0d4599765e0689b4a', style: { display: 'flex', flexDirection: 'row', gap: '10px', marginBottom: '6px', alignItems: 'center', fontSize: '13px' } }, h("verdocs-radio-button", { key: 'a9231341d4896b3e9d2c0cda07b3b47c99aa924a', checked: this.mode === 'draw', value: "draw", name: "mode", onClick: () => (this.mode = 'draw') }), h("label", { key: '08800335d245f80006df2d98427555d8eed12500' }, "Drawn with touch, mouse, or stylus")), h("div", { key: '40ede26cbe3aee6ca9efb40137acd423757d09e1', class: "preview-header" }, h("div", { key: 'f3ab56d0583310e6957d12a25ee17f60c0833752', style: { fontSize: '13px', fontWeight: '400' } }, "Signature Preview"), this.mode === 'draw' && (h("button", { key: '671c58fc4ffcf24f63733007bd3e2f9d97089f47', class: "clear-button-text", onClick: e => this.handleClearDrawing(e, 'signature'), disabled: !this.hasDrawnSignature }, "Clear"))), h("div", { key: '85e6492ae46953eac7ed47bea89e062066c9042e', class: "canvas-container signature-container" }, h("div", { key: 'b5d75586aa87a3dda6b15375750f9b7d992d2ad7', class: "signing-indicator" }, h("div", { key: '8e25d6232cff112c91bab09710bd068b6f458fb8', class: "x-icon", innerHTML: SignatureXIcon }), h("div", { key: '351c358e185aa471ba020a5e49a619077e13eaec', class: "signing-line" })), h("canvas", { key: 'fb0c2d520f4498581e2457577d673070204b37f1', ref: el => (this.signatureElement = el),
453
453
  // width="300"
454
- height: "79", class: "signature-canvas", onPointerDown: this.handleSigPointerDown, onPointerMove: this.handleSigPointerMove, onPointerUp: this.handleSigPointerUp, onPointerCancel: this.handleSigPointerCancel, style: { touchAction: 'none', cursor: 'crosshair' } })), h("div", { key: 'a9987ec211baaaa01288dde3ffc061d0372cd7f3', class: "preview-header" }, h("div", { key: '97d1a8462f2d9c272580cf6049ae72017f20b158', style: { fontSize: '13px', fontWeight: '400' } }, "Initials Preview"), this.mode === 'draw' && (h("button", { key: '61f91899f09cbc2dac6d89daa3e9ec1617df7b9c', class: "clear-button-text", onClick: e => this.handleClearDrawing(e, 'initials'), disabled: !this.hasDrawnInitials }, "Clear"))), h("div", { key: 'b09b7f23218b4747dedcfe9d40b912263bea907a', class: "canvas-container initials-container" }, h("div", { key: '35c2b9b40ab5077895f567a922a1b48e86dde3cf', class: "signing-indicator" }, h("div", { key: 'dca3b7841d1b0c6c5ffa1d127ffe9acd048b7715', class: "x-icon", innerHTML: SignatureXIcon }), h("div", { key: '54d0f42b043bdebca98fbde793d91deaa39068ec', class: "signing-line" })), h("canvas", { key: '2449706db1331aa7835ddcf2cf0f910ac0f5f4a6', ref: el => (this.initialsElement = el),
454
+ height: "79", class: "signature-canvas", onPointerDown: this.handleSigPointerDown, onPointerMove: this.handleSigPointerMove, onPointerUp: this.handleSigPointerUp, onPointerCancel: this.handleSigPointerCancel, style: { touchAction: 'none', cursor: 'crosshair' } })), h("div", { key: 'ffd475d6c1ffdd1b0453a8196fa7edc6fc039649', class: "preview-header" }, h("div", { key: '61003eae27592625bab6d2aab282406bbd48fdc3', style: { fontSize: '13px', fontWeight: '400' } }, "Initials Preview"), this.mode === 'draw' && (h("button", { key: '77350a9062703807f3766f4cf6a1e5e412086ee5', class: "clear-button-text", onClick: e => this.handleClearDrawing(e, 'initials'), disabled: !this.hasDrawnInitials }, "Clear"))), h("div", { key: '5c8f3a9a62325d915f2461cddc07adca3136799c', class: "canvas-container initials-container" }, h("div", { key: '0b37c4ee2ff03d61304a98bc8e284e0546258698', class: "signing-indicator" }, h("div", { key: '9f2f39d84a9aeefb48d310f896d223eccfed2ead', class: "x-icon", innerHTML: SignatureXIcon }), h("div", { key: '57120f545d2d07e1fdace87088b6cd3862dd0289', class: "signing-line" })), h("canvas", { key: '1b5080f57ec622775cc987229957029a4f1da2f8', ref: el => (this.initialsElement = el),
455
455
  // width="300"
456
- height: "79", class: "initials-canvas", onPointerDown: this.handleInitialsPointerDown, onPointerMove: this.handleInitialsPointerMove, onPointerUp: this.handleInitialsPointerUp, onPointerCancel: this.handleInitialsPointerCancel, style: { touchAction: 'none', cursor: 'crosshair' } })), h("div", { key: '4cc74908b230f05762bbbc92f082b68f1d0298d3', class: "disclaimer" }, "By clicking \u00ABAdopt Signature\u00BB, I agree that the signature and initials above will be the electronic representation of my signature and initials for all purposes when I use them to sign documents. Applying them to a document is legally equivalent to signing with a pen on paper.")), h("div", { key: 'dbbee3f80aa7a0f6862ef4920b3edcc493313c80', class: "footer", slot: "footer" }, h("div", { key: '44f060db31afd99c8b5b1b4d4ac2734dea70cb04', class: "buttons" }, h("button", { key: 'af6c0a693f3576184e7c1fb4235403da1b3db9cf', class: "cancel", onClick: e => this.handleCancel(e) }, "Cancel"), h("button", { key: '9283607fa5c94acd924dbfd363073664a5b9d037', class: "proceed", onClick: e => this.handleAdopt(e), disabled: this.isAdoptButtonDisabled() }, "Adopt & Sign")))));
456
+ height: "79", class: "initials-canvas", onPointerDown: this.handleInitialsPointerDown, onPointerMove: this.handleInitialsPointerMove, onPointerUp: this.handleInitialsPointerUp, onPointerCancel: this.handleInitialsPointerCancel, style: { touchAction: 'none', cursor: 'crosshair' } })), h("div", { key: '138d718d6705b3096edf5379aadbccaef54a7bf6', class: "disclaimer" }, "By clicking \u00ABAdopt Signature\u00BB, I agree that the signature and initials above will be the electronic representation of my signature and initials for all purposes when I use them to sign documents. Applying them to a document is legally equivalent to signing with a pen on paper.")), h("div", { key: '32d3a076edc5db4dafff0070916278279a362760', class: "footer", slot: "footer" }, h("div", { key: 'faf75d8abed2bc9d72aa49055f26619ea3927343', class: "buttons" }, h("button", { key: '61a8750afa5c3a298b9dd0d82d05c7e185b29999', class: "cancel", onClick: e => this.handleCancel(e) }, "Cancel"), h("button", { key: '040577750135d0bed204f92bad1c5a275d759c08', class: "proceed", onClick: e => this.handleAdopt(e), disabled: this.isAdoptButtonDisabled() }, "Adopt & Sign")))));
457
457
  }
458
458
  static get style() { return verdocsAdoptSignatureDialogCss; }
459
459
  }, [256, "verdocs-adopt-signature-dialog", {
@@ -502,6 +502,6 @@ function defineCustomElement() {
502
502
  }
503
503
 
504
504
  export { VerdocsAdoptSignatureDialog as V, defineCustomElement as d };
505
- //# sourceMappingURL=p-PzCAS0cD.js.map
505
+ //# sourceMappingURL=p-Dpuy1yah.js.map
506
506
 
507
- //# sourceMappingURL=p-PzCAS0cD.js.map
507
+ //# sourceMappingURL=p-Dpuy1yah.js.map