@hubsync/esign-web-sdk 6.9.7 → 6.9.9
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.
- package/dist/cjs/loader.cjs.js +1 -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
- package/dist/cjs/verdocs-adopt-signature-dialog_8.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-dialog.cjs.entry.js +5 -1
- package/dist/cjs/verdocs-dialog.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +5 -1
- package/dist/cjs/verdocs-ok-dialog.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +39 -11
- package/dist/cjs/verdocs-sign.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/dialogs/verdocs-dialog/verdocs-dialog.js +25 -1
- package/dist/collection/components/dialogs/verdocs-dialog/verdocs-dialog.js.map +1 -1
- package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js +25 -1
- package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +39 -11
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +1 -1
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.js.map +1 -1
- package/dist/components/{p-CW35CqVu.js → p-8ewXKOGW.js} +7 -7
- package/dist/components/{p-CW35CqVu.js.map → p-8ewXKOGW.js.map} +1 -1
- package/dist/components/{p-Ba_mXs1J.js → p-92Hd0xeK.js} +9 -4
- package/dist/components/p-92Hd0xeK.js.map +1 -0
- package/dist/components/{p-uPFNuSZV.js → p-BZPlymMz.js} +3 -3
- package/dist/components/{p-uPFNuSZV.js.map → p-BZPlymMz.js.map} +1 -1
- package/dist/components/{p-DnknHA5F.js → p-BzspxU-o.js} +3 -3
- package/dist/components/{p-DnknHA5F.js.map → p-BzspxU-o.js.map} +1 -1
- package/dist/components/{p-DmEw4Bbl.js → p-CEedhxiy.js} +4 -4
- package/dist/components/{p-DmEw4Bbl.js.map → p-CEedhxiy.js.map} +1 -1
- package/dist/components/{p-Dg5_Z8EB.js → p-C_Xfg8nQ.js} +3 -3
- package/dist/components/{p-Dg5_Z8EB.js.map → p-C_Xfg8nQ.js.map} +1 -1
- package/dist/components/{p-wu7PgH6H.js → p-Ca3L0AUc.js} +3 -3
- package/dist/components/{p-wu7PgH6H.js.map → p-Ca3L0AUc.js.map} +1 -1
- package/dist/components/{p-CvLZdSB1.js → p-CkkN3QA_.js} +3 -3
- package/dist/components/{p-CvLZdSB1.js.map → p-CkkN3QA_.js.map} +1 -1
- package/dist/components/p-D3NVBZRw.js +85 -0
- package/dist/components/p-D3NVBZRw.js.map +1 -0
- package/dist/components/{p-B655WZZx.js → p-DJ-FHysU.js} +5 -5
- package/dist/components/{p-B655WZZx.js.map → p-DJ-FHysU.js.map} +1 -1
- package/dist/components/{p-Cg2vZnQZ.js → p-DQvEHGaL.js} +3 -3
- package/dist/components/{p-Cg2vZnQZ.js.map → p-DQvEHGaL.js.map} +1 -1
- package/dist/components/{p-Dz6Xrh7z.js → p-DSiIGDHy.js} +4 -4
- package/dist/components/{p-Dz6Xrh7z.js.map → p-DSiIGDHy.js.map} +1 -1
- package/dist/components/{p-B9-7bLf1.js → p-DwSp-Xp-.js} +3 -3
- package/dist/components/{p-B9-7bLf1.js.map → p-DwSp-Xp-.js.map} +1 -1
- package/dist/components/{p-DE8OCZyM.js → p-DyG59pqj.js} +4 -4
- package/dist/components/{p-DE8OCZyM.js.map → p-DyG59pqj.js.map} +1 -1
- package/dist/components/{p-l9RpNccF.js → p-PzCAS0cD.js} +3 -3
- package/dist/components/{p-l9RpNccF.js.map → p-PzCAS0cD.js.map} +1 -1
- package/dist/components/{p-DdMGzViT.js → p-jm2NkWGW.js} +6 -6
- package/dist/components/{p-DdMGzViT.js.map → p-jm2NkWGW.js.map} +1 -1
- package/dist/components/{p-FQV-PIF2.js → p-oGuKYCp7.js} +8 -8
- package/dist/components/p-oGuKYCp7.js.map +1 -0
- package/dist/components/{p-Droj2g4F.js → p-vHtreMnt.js} +7 -7
- package/dist/components/{p-Droj2g4F.js.map → p-vHtreMnt.js.map} +1 -1
- package/dist/components/verdocs-adopt-signature-dialog.js +1 -1
- package/dist/components/verdocs-build.js +8 -8
- package/dist/components/verdocs-delegate-dialog.js +1 -1
- package/dist/components/verdocs-dialog.js +1 -1
- package/dist/components/verdocs-disclosure-dialog.js +1 -1
- package/dist/components/verdocs-download-dialog.js +1 -1
- package/dist/components/verdocs-envelope-sidebar.js +2 -2
- package/dist/components/verdocs-field-attachment.js +1 -1
- package/dist/components/verdocs-kba-dialog.js +1 -1
- package/dist/components/verdocs-ok-dialog.js +1 -1
- package/dist/components/verdocs-otp-dialog.js +1 -1
- package/dist/components/verdocs-passcode-dialog.js +1 -1
- package/dist/components/verdocs-preview.js +1 -1
- package/dist/components/verdocs-question-dialog.js +1 -1
- package/dist/components/verdocs-sign-footer.js +1 -1
- package/dist/components/verdocs-sign.js +51 -23
- package/dist/components/verdocs-sign.js.map +1 -1
- package/dist/components/verdocs-signature-dialog.js +1 -1
- package/dist/components/verdocs-template-attachments.js +1 -1
- package/dist/components/verdocs-template-document-page.js +1 -1
- package/dist/components/verdocs-template-fields.js +1 -1
- package/dist/components/verdocs-templates-list.js +2 -2
- package/dist/components/verdocs-upload-dialog.js +1 -1
- package/dist/components/verdocs-view.js +1 -1
- package/dist/custom-elements.json +8 -0
- package/dist/esm/loader.js +1 -1
- 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
- package/dist/esm/verdocs-adopt-signature-dialog_8.entry.js +1 -1
- package/dist/esm/verdocs-dialog.entry.js +5 -1
- package/dist/esm/verdocs-dialog.entry.js.map +1 -1
- package/dist/esm/verdocs-ok-dialog.entry.js +5 -1
- package/dist/esm/verdocs-ok-dialog.entry.js.map +1 -1
- package/dist/esm/verdocs-sign.entry.js +39 -11
- package/dist/esm/verdocs-sign.entry.js.map +1 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- 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
- package/dist/esm-es5/verdocs-adopt-signature-dialog_8.entry.js +1 -1
- package/dist/esm-es5/verdocs-adopt-signature-dialog_8.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-dialog.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-ok-dialog.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/dialogs/verdocs-dialog/verdocs-dialog.d.ts +4 -0
- package/dist/types/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.d.ts +4 -0
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +3 -1
- package/dist/types/components.d.ts +20 -0
- package/dist/verdocs-web-sdk/{p-c9289951.entry.js → p-0bb520de.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-0bb520de.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-12212211.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-12212211.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-90278f70.system.entry.js → p-139ea366.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-139ea366.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-40ab139c.system.entry.js → p-46836966.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-46836966.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-46WnwVog.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-4bcc9901.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-4bcc9901.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-CZyag-FJ.system.js.map → p-C9XoQGh9.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-CDCYaPiN.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-Cpnmaxo0.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-a60c394a.system.entry.js → p-b9349e91.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-b9349e91.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-8c85ae2d.entry.js → p-e9dd39d0.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-e9dd39d0.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-58e8b659.entry.js → p-fa8eee5b.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-fa8eee5b.entry.js.map +1 -0
- 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
- package/dist/verdocs-web-sdk/verdocs-dialog.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-ok-dialog.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-sign.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/components/p-Ba_mXs1J.js.map +0 -1
- package/dist/components/p-FQV-PIF2.js.map +0 -1
- package/dist/components/p-o9BQIoXw.js +0 -80
- package/dist/components/p-o9BQIoXw.js.map +0 -1
- package/dist/verdocs-web-sdk/p-40ab139c.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-58e8b659.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-8c85ae2d.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-90278f70.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-BPsLPU5l.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-C5wYi0wL.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-Dj8lPfEj.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-a1614e15.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-a1614e15.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-a60c394a.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-aadf56ed.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-aadf56ed.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-c9289951.entry.js.map +0 -1
|
@@ -2,8 +2,8 @@ import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-
|
|
|
2
2
|
import { VerdocsEndpoint, getEnvelope } from '@verdocs/js-sdk';
|
|
3
3
|
import { S as SDKError } from './p-C1sRVZWv.js';
|
|
4
4
|
import { S as Store } from './p-C7hFgM52.js';
|
|
5
|
-
import { d as defineCustomElement$2 } from './p-
|
|
6
|
-
import { d as defineCustomElement$1 } from './p-
|
|
5
|
+
import { d as defineCustomElement$2 } from './p-92Hd0xeK.js';
|
|
6
|
+
import { d as defineCustomElement$1 } from './p-C_Xfg8nQ.js';
|
|
7
7
|
|
|
8
8
|
const verdocsSignFooterCss = "verdocs-sign-footer {\n left: 0;\n right: 0;\n bottom: 0;\n height: 48px;\n display: -ms-flexbox;\n display: flex;\n color: #616161;\n position: fixed;\n font-size: 12px;\n padding: 0 24px;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n background: #ffffff;\n container-type: inline-size;\n border-top: 1px solid #e0e0e0;\n -ms-flex-pack: justify;\n justify-content: space-between;\n font-family: var(--verdocs-primary-font, \"Inter\", \"Barlow\", sans-serif);\n -webkit-transition: 0.5s cubic-bezier(0.35, 0, 0.25, 1);\n transition: 0.5s cubic-bezier(0.35, 0, 0.25, 1);\n}\nverdocs-sign-footer a {\n color: #616161;\n cursor: pointer;\n text-decoration: none;\n border-bottom: 1px dotted #616161;\n}\nverdocs-sign-footer.loading {\n display: none;\n}\nverdocs-sign-footer .powered-by {\n white-space: nowrap;\n}\nverdocs-sign-footer .buttons {\n -ms-flex: 0;\n flex: 0;\n gap: 16px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n white-space: nowrap;\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-sign-footer .buttons button {\n gap: 4px;\n border: none;\n display: -ms-flexbox;\n display: flex;\n outline: none;\n cursor: pointer;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n background: transparent;\n}\nverdocs-sign-footer .buttons div {\n gap: 4px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-sign-footer .links {\n -ms-flex: 0;\n flex: 0;\n gap: 8px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n white-space: nowrap;\n}\nverdocs-sign-footer.just-buttons .buttons {\n -ms-flex: 1;\n flex: 1;\n -ms-flex-pack: center;\n justify-content: center;\n}\n@container (max-width: 720px) {\n verdocs-sign-footer.has-buttons .powered-by {\n display: none;\n }\n}\n@container (max-width: 540px) {\n verdocs-sign-footer.no-buttons .powered-by {\n display: none;\n }\n verdocs-sign-footer.has-buttons .links {\n display: none;\n }\n verdocs-sign-footer .buttons {\n -ms-flex: 1;\n flex: 1;\n -ms-flex-pack: center;\n justify-content: center;\n }\n}";
|
|
9
9
|
|
|
@@ -189,6 +189,6 @@ function defineCustomElement() {
|
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
export { VerdocsSignFooter as V, defineCustomElement as d };
|
|
192
|
-
//# sourceMappingURL=p-
|
|
192
|
+
//# sourceMappingURL=p-DyG59pqj.js.map
|
|
193
193
|
|
|
194
|
-
//# sourceMappingURL=p-
|
|
194
|
+
//# sourceMappingURL=p-DyG59pqj.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-DE8OCZyM.js","mappings":";;;;;;;AAAA,MAAM,oBAAoB,GAAG,6zEAA6zE;;ACM11E,MAAM,YAAY,GAAG,CAAA,8oBAAA,CAAgpB;AACrqB,MAAM,WAAW,GAAG,CAAA,+1BAAA,CAAi2B;AACr3B,MAAM,QAAQ,GAAG,CAAA,oyBAAA,CAAsyB;MAW1yB,iBAAiB,iBAAAA,kBAAA,CAAA,MAAA,iBAAA,SAAAC,CAAA,CAAA;AAL9B,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;;AAMU,QAAA,IAAkB,CAAA,kBAAA,GAAG,IAAI;AAEjC;;AAEG;AACK,QAAA,IAAA,CAAA,QAAQ,GAAoB,eAAe,CAAC,UAAU,EAAE;AAEhE;;AAEG;AACK,QAAA,IAAU,CAAA,UAAA,GAAW,EAAE;AAE/B;;AAEG;AACK,QAAA,IAAM,CAAA,MAAA,GAAG,KAAK;AAuBtB;;AAEG;;AAGM,QAAA,IAAc,CAAA,cAAA,GAAG,KAAK;AACtB,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK;AACjB,QAAA,IAAQ,CAAA,QAAA,GAAqB,IAAI;AAiL3C;AA/KC,IAAA,MAAM,iBAAiB,GAAA;;AACrB,QAAA,IAAI;;;AAGF,YAAA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,EAAC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAC,CAAC;AACrD,gBAAA,IAAI,CAAC,cAAc,GAAG,KAAK;AAC7B,aAAC,EACD,MAAM,EAAE,OAAO,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,GAC3C,CACH,CACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.scss?tag=verdocs-sign-footer","src/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-sign-footer {\n left: 0;\n right: 0;\n bottom: 0;\n height: 48px;\n display: flex;\n color: #616161;\n position: fixed;\n font-size: 12px;\n padding: 0 24px;\n align-items: center;\n flex-direction: row;\n background: #ffffff;\n container-type: inline-size;\n border-top: 1px solid #e0e0e0;\n justify-content: space-between;\n font-family: $verdocs-primary-font;\n transition: 0.5s cubic-bezier(0.35, 0, 0.25, 1);\n\n a {\n color: #616161;\n cursor: pointer;\n text-decoration: none;\n border-bottom: 1px dotted #616161;\n }\n\n &.loading {\n display: none;\n }\n\n .powered-by {\n white-space: nowrap;\n }\n\n .buttons {\n flex: 0;\n gap: 16px;\n display: flex;\n flex-direction: row;\n white-space: nowrap;\n align-items: center;\n\n button {\n gap: 4px;\n border: none;\n display: flex;\n outline: none;\n cursor: pointer;\n flex-direction: row;\n align-items: center;\n background: transparent;\n }\n\n div {\n gap: 4px;\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n }\n\n .links {\n flex: 0;\n gap: 8px;\n display: flex;\n flex-direction: row;\n white-space: nowrap;\n }\n\n &.just-buttons {\n .buttons {\n flex: 1;\n justify-content: center;\n }\n }\n\n @container (max-width: 720px) {\n &.has-buttons .powered-by {\n display: none;\n }\n }\n\n @container (max-width: 540px) {\n &.no-buttons .powered-by {\n display: none;\n }\n\n &.has-buttons .links {\n display: none;\n }\n\n .buttons {\n flex: 1;\n justify-content: center;\n }\n }\n}\n","import {IEnvelope} from '@verdocs/js-sdk';\nimport {Component, h, Event, EventEmitter, Host, Prop, State} from '@stencil/core';\nimport {getEnvelope, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nconst QuestionIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z\" fill=\"#424242\"/></svg>`;\nconst DeclineIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.14645 7.14645C7.34171 6.95118 7.65829 6.95118 7.85355 7.14645L10 9.29289L12.1464 7.14645C12.3417 6.95118 12.6583 6.95118 12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L10.7071 10L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L10 10.7071L7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536C6.95118 12.6583 6.95118 12.3417 7.14645 12.1464L9.29289 10L7.14645 7.85355C6.95118 7.65829 6.95118 7.34171 7.14645 7.14645ZM3 6C3 4.34315 4.34315 3 6 3H14C15.6569 3 17 4.34315 17 6V14C17 15.6569 15.6569 17 14 17H6C4.34315 17 3 15.6569 3 14V6ZM6 4C4.89543 4 4 4.89543 4 6V14C4 15.1046 4.89543 16 6 16H14C15.1046 16 16 15.1046 16 14V6C16 4.89543 15.1046 4 14 4H6Z\" fill=\"#424242\"/></svg>`;\nconst SaveIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3 5C3 3.89543 3.89543 3 5 3H13.3787C13.9091 3 14.4178 3.21071 14.7929 3.58579L16.4142 5.20711C16.7893 5.58218 17 6.09089 17 6.62132V15C17 16.1046 16.1046 17 15 17H5C3.89543 17 3 16.1046 3 15V5ZM5 4C4.44772 4 4 4.44772 4 5V15C4 15.5523 4.44772 16 5 16L5 11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V16C15.5523 16 16 15.5523 16 15V6.62132C16 6.3561 15.8946 6.10175 15.7071 5.91421L14.0858 4.29289C13.8983 4.10536 13.6439 4 13.3787 4L13 4V6.5C13 7.32843 12.3284 8 11.5 8L7.5 8C6.67157 8 6 7.32843 6 6.5L6 4H5ZM7 4L7 6.5C7 6.77614 7.22386 7 7.5 7L11.5 7C11.7761 7 12 6.77614 12 6.5V4L7 4ZM14 16V11.5C14 11.2239 13.7761 11 13.5 11H6.5C6.22386 11 6 11.2239 6 11.5V16H14Z\" fill=\"#424242\"/></svg>`;\n\n/**\n * Typically presented by the `verdocs-sign` component. Displays a footer toolbar\n * with a few convenience functions for the envelope recipient to use.\n */\n@Component({\n tag: 'verdocs-sign-footer',\n styleUrl: 'verdocs-sign-footer.scss',\n shadow: false,\n})\nexport class VerdocsSignFooter {\n private envelopeListenerId = null;\n\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The envelope ID to render. Set ONE OF templateId or envelopeId. If both are set, envelopeId will be ignored.\n */\n @Prop() envelopeId: string = '';\n\n /**\n * If the recipient is \"done,\" some buttons will be hidden.\n */\n @Prop() isDone = false;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) askQuestion: EventEmitter<{question: string}>;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) decline: EventEmitter;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) finishLater: EventEmitter;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the envelope is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.\n */\n // @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n @State() askingQuestion = false;\n @State() declinine = false;\n @State() envelope: IEnvelope | null = null;\n\n async componentWillLoad() {\n try {\n // NOTE: The caller must have a signing session already active and shared to us via\n // the endpoint property.\n if (!this.envelopeId) {\n console.log(`[FOOTER] Missing required envelope ID ${this.envelopeId}`);\n return;\n }\n\n this.listenToEnvelope();\n } catch (e) {\n console.log('[FOOTER] Error loading envelope', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n disconnectedCallback() {\n this.unlistenToEnvelope();\n }\n\n async listenToEnvelope() {\n console.log('[FOOTER] Loading envelope', this.envelopeId);\n this.unlistenToEnvelope();\n Store.subscribe(\n 'envelopes',\n this.envelopeId,\n () => getEnvelope(this.endpoint, this.envelopeId),\n false,\n (envelope: IEnvelope) => {\n this.envelope = envelope;\n },\n );\n }\n\n unlistenToEnvelope() {\n if (this.envelopeListenerId) {\n Store.store.delListener(this.envelopeListenerId);\n this.envelopeListenerId = null;\n }\n }\n\n // handleRecipientAction(recipient: IRecipient, id: string) {\n // console.log('[SIDEBAR] Recipient action', id, recipient);\n // switch (id) {\n // case 'update':\n // this.showUpdateDialog = recipient.role_name;\n // break;\n //\n // case 'reminder':\n // remindRecipient(this.endpoint, this.envelopeId, recipient.role_name)\n // .then(() => {\n // VerdocsToast('Reminder Sent', {style: 'success'});\n // })\n // .catch(e => {\n // console.log('[SIDEBAR] Error resending invitation', e);\n // VerdocsToast('Error resending invitation: ' + e.message, {style: 'error'});\n // });\n // break;\n //\n // case 'reinvite':\n // this.showReinviteDialog = recipient.role_name;\n // break;\n //\n // case 'inperson':\n // this.showRecipientDialog = recipient.role_name;\n // break;\n //\n // case 'modify':\n // VerdocsToast('This feature will be enabled in a future release. Please try again later.', {style: 'info'});\n // break;\n //\n // case 'details':\n // VerdocsToast('This feature will be enabled in a future release. Please try again later.', {style: 'info'});\n // break;\n // }\n // }\n\n // handleUpdateRecipient(originalRecipient: IRecipient, updatedRecipient: IRecipient) {\n // console.log('Updating recipient', originalRecipient, updatedRecipient);\n // const fields: any = {};\n // if (updatedRecipient.email !== originalRecipient.email) {\n // fields.email = updatedRecipient.email;\n // }\n // if (updatedRecipient.phone !== originalRecipient.phone) {\n // fields.phone = updatedRecipient.phone;\n // }\n // if (updatedRecipient.message !== originalRecipient.message) {\n // fields.message = updatedRecipient.message;\n // }\n // if (updatedRecipient.first_name !== originalRecipient.first_name) {\n // fields.first_name = updatedRecipient.first_name;\n // }\n // if (updatedRecipient.last_name !== originalRecipient.last_name) {\n // fields.last_name = updatedRecipient.last_name;\n // }\n //\n // if (Object.keys(fields).length > 0) {\n // updateRecipient(this.endpoint, this.envelopeId, originalRecipient.role_name, fields)\n // .then(r => {\n // // TODO: Reload the envelope?\n // VerdocsToast('Recipient updated', {style: 'success'});\n // console.log('[SIDEBAR] Updated recipient', r);\n // Store.getEnvelope(this.endpoint, this.envelopeId, true);\n // this.showUpdateDialog = '';\n // })\n // .catch(e => {\n // VerdocsToast(e.response.data.error, {style: 'error'});\n // this.showUpdateDialog = '';\n // });\n // } else {\n // this.showUpdateDialog = '';\n // }\n // }\n\n render() {\n const hasPoweredBy = !!this.envelope?.organization?.powered_by_label;\n const hasLinks = !!this.envelope?.organization?.terms_use_url || !!this.envelope?.organization?.privacy_policy_url;\n const hasButtons = !this.isDone;\n\n return (\n <Host class={{'has-buttons': hasButtons, 'no-buttons': !hasButtons, 'has-powered-by': hasPoweredBy, 'has-links': hasLinks, 'just-buttons': !hasPoweredBy && !hasLinks}}>\n {this.envelope?.organization?.powered_by_label && (\n <div class=\"powered-by\">\n {this.envelope?.organization?.powered_by_url ? (\n <a href={this.envelope?.organization?.powered_by_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>{this.envelope?.organization?.powered_by_label}</span>\n </a>\n ) : (\n <span>{this.envelope?.organization?.powered_by_label}</span>\n )}\n </div>\n )}\n\n {!this.isDone && (\n <div class=\"buttons\">\n <button onClick={() => (this.askingQuestion = true)}>\n <span innerHTML={QuestionIcon} />\n Ask Sender a Question\n </button>\n <button onClick={() => this.decline?.emit()}>\n <span innerHTML={DeclineIcon} />\n Decline Signing\n </button>\n <button onClick={() => this.finishLater?.emit()}>\n <span innerHTML={SaveIcon} />\n Finish Later\n </button>\n </div>\n )}\n\n <div class=\"links\">\n {this.envelope?.organization?.terms_use_url && (\n <a href={this.envelope?.organization?.terms_use_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>Terms of Use</span>\n </a>\n )}\n {this.envelope?.organization?.privacy_policy_url && (\n <a href={this.envelope?.organization?.privacy_policy_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>Privacy Policy</span>\n </a>\n )}\n </div>\n\n {this.askingQuestion && (\n <verdocs-question-dialog\n onNext={e => {\n this.askQuestion?.emit({question: e.detail.question});\n this.askingQuestion = false;\n }}\n onExit={() => (this.askingQuestion = false)}\n />\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-DyG59pqj.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Q,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,YAAY,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,kBAAkB,MAC9C,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,IAAI,EAAE,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,QAAQ,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,YAAY,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,kBAAkB,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,EAAA,EACjG,CAA2B,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAA,gBAAA,CAAA,CACzB,CACL,CACG,EAEL,IAAI,CAAC,cAAc,KAClB,gFACE,MAAM,EAAE,CAAC,IAAG;;AACV,gBAAA,CAAA,EAAA,GAAA,IAAI,CAAC,WAAW,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI,CAAC,EAAC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAC,CAAC;AACrD,gBAAA,IAAI,CAAC,cAAc,GAAG,KAAK;AAC7B,aAAC,EACD,MAAM,EAAE,OAAO,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,GAC3C,CACH,CACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.scss?tag=verdocs-sign-footer","src/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-sign-footer {\n left: 0;\n right: 0;\n bottom: 0;\n height: 48px;\n display: flex;\n color: #616161;\n position: fixed;\n font-size: 12px;\n padding: 0 24px;\n align-items: center;\n flex-direction: row;\n background: #ffffff;\n container-type: inline-size;\n border-top: 1px solid #e0e0e0;\n justify-content: space-between;\n font-family: $verdocs-primary-font;\n transition: 0.5s cubic-bezier(0.35, 0, 0.25, 1);\n\n a {\n color: #616161;\n cursor: pointer;\n text-decoration: none;\n border-bottom: 1px dotted #616161;\n }\n\n &.loading {\n display: none;\n }\n\n .powered-by {\n white-space: nowrap;\n }\n\n .buttons {\n flex: 0;\n gap: 16px;\n display: flex;\n flex-direction: row;\n white-space: nowrap;\n align-items: center;\n\n button {\n gap: 4px;\n border: none;\n display: flex;\n outline: none;\n cursor: pointer;\n flex-direction: row;\n align-items: center;\n background: transparent;\n }\n\n div {\n gap: 4px;\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n }\n\n .links {\n flex: 0;\n gap: 8px;\n display: flex;\n flex-direction: row;\n white-space: nowrap;\n }\n\n &.just-buttons {\n .buttons {\n flex: 1;\n justify-content: center;\n }\n }\n\n @container (max-width: 720px) {\n &.has-buttons .powered-by {\n display: none;\n }\n }\n\n @container (max-width: 540px) {\n &.no-buttons .powered-by {\n display: none;\n }\n\n &.has-buttons .links {\n display: none;\n }\n\n .buttons {\n flex: 1;\n justify-content: center;\n }\n }\n}\n","import {IEnvelope} from '@verdocs/js-sdk';\nimport {Component, h, Event, EventEmitter, Host, Prop, State} from '@stencil/core';\nimport {getEnvelope, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nconst QuestionIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z\" fill=\"#424242\"/></svg>`;\nconst DeclineIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.14645 7.14645C7.34171 6.95118 7.65829 6.95118 7.85355 7.14645L10 9.29289L12.1464 7.14645C12.3417 6.95118 12.6583 6.95118 12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L10.7071 10L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L10 10.7071L7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536C6.95118 12.6583 6.95118 12.3417 7.14645 12.1464L9.29289 10L7.14645 7.85355C6.95118 7.65829 6.95118 7.34171 7.14645 7.14645ZM3 6C3 4.34315 4.34315 3 6 3H14C15.6569 3 17 4.34315 17 6V14C17 15.6569 15.6569 17 14 17H6C4.34315 17 3 15.6569 3 14V6ZM6 4C4.89543 4 4 4.89543 4 6V14C4 15.1046 4.89543 16 6 16H14C15.1046 16 16 15.1046 16 14V6C16 4.89543 15.1046 4 14 4H6Z\" fill=\"#424242\"/></svg>`;\nconst SaveIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3 5C3 3.89543 3.89543 3 5 3H13.3787C13.9091 3 14.4178 3.21071 14.7929 3.58579L16.4142 5.20711C16.7893 5.58218 17 6.09089 17 6.62132V15C17 16.1046 16.1046 17 15 17H5C3.89543 17 3 16.1046 3 15V5ZM5 4C4.44772 4 4 4.44772 4 5V15C4 15.5523 4.44772 16 5 16L5 11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V16C15.5523 16 16 15.5523 16 15V6.62132C16 6.3561 15.8946 6.10175 15.7071 5.91421L14.0858 4.29289C13.8983 4.10536 13.6439 4 13.3787 4L13 4V6.5C13 7.32843 12.3284 8 11.5 8L7.5 8C6.67157 8 6 7.32843 6 6.5L6 4H5ZM7 4L7 6.5C7 6.77614 7.22386 7 7.5 7L11.5 7C11.7761 7 12 6.77614 12 6.5V4L7 4ZM14 16V11.5C14 11.2239 13.7761 11 13.5 11H6.5C6.22386 11 6 11.2239 6 11.5V16H14Z\" fill=\"#424242\"/></svg>`;\n\n/**\n * Typically presented by the `verdocs-sign` component. Displays a footer toolbar\n * with a few convenience functions for the envelope recipient to use.\n */\n@Component({\n tag: 'verdocs-sign-footer',\n styleUrl: 'verdocs-sign-footer.scss',\n shadow: false,\n})\nexport class VerdocsSignFooter {\n private envelopeListenerId = null;\n\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The envelope ID to render. Set ONE OF templateId or envelopeId. If both are set, envelopeId will be ignored.\n */\n @Prop() envelopeId: string = '';\n\n /**\n * If the recipient is \"done,\" some buttons will be hidden.\n */\n @Prop() isDone = false;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) askQuestion: EventEmitter<{question: string}>;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) decline: EventEmitter;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) finishLater: EventEmitter;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the envelope is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.\n */\n // @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n @State() askingQuestion = false;\n @State() declinine = false;\n @State() envelope: IEnvelope | null = null;\n\n async componentWillLoad() {\n try {\n // NOTE: The caller must have a signing session already active and shared to us via\n // the endpoint property.\n if (!this.envelopeId) {\n console.log(`[FOOTER] Missing required envelope ID ${this.envelopeId}`);\n return;\n }\n\n this.listenToEnvelope();\n } catch (e) {\n console.log('[FOOTER] Error loading envelope', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n disconnectedCallback() {\n this.unlistenToEnvelope();\n }\n\n async listenToEnvelope() {\n console.log('[FOOTER] Loading envelope', this.envelopeId);\n this.unlistenToEnvelope();\n Store.subscribe(\n 'envelopes',\n this.envelopeId,\n () => getEnvelope(this.endpoint, this.envelopeId),\n false,\n (envelope: IEnvelope) => {\n this.envelope = envelope;\n },\n );\n }\n\n unlistenToEnvelope() {\n if (this.envelopeListenerId) {\n Store.store.delListener(this.envelopeListenerId);\n this.envelopeListenerId = null;\n }\n }\n\n // handleRecipientAction(recipient: IRecipient, id: string) {\n // console.log('[SIDEBAR] Recipient action', id, recipient);\n // switch (id) {\n // case 'update':\n // this.showUpdateDialog = recipient.role_name;\n // break;\n //\n // case 'reminder':\n // remindRecipient(this.endpoint, this.envelopeId, recipient.role_name)\n // .then(() => {\n // VerdocsToast('Reminder Sent', {style: 'success'});\n // })\n // .catch(e => {\n // console.log('[SIDEBAR] Error resending invitation', e);\n // VerdocsToast('Error resending invitation: ' + e.message, {style: 'error'});\n // });\n // break;\n //\n // case 'reinvite':\n // this.showReinviteDialog = recipient.role_name;\n // break;\n //\n // case 'inperson':\n // this.showRecipientDialog = recipient.role_name;\n // break;\n //\n // case 'modify':\n // VerdocsToast('This feature will be enabled in a future release. Please try again later.', {style: 'info'});\n // break;\n //\n // case 'details':\n // VerdocsToast('This feature will be enabled in a future release. Please try again later.', {style: 'info'});\n // break;\n // }\n // }\n\n // handleUpdateRecipient(originalRecipient: IRecipient, updatedRecipient: IRecipient) {\n // console.log('Updating recipient', originalRecipient, updatedRecipient);\n // const fields: any = {};\n // if (updatedRecipient.email !== originalRecipient.email) {\n // fields.email = updatedRecipient.email;\n // }\n // if (updatedRecipient.phone !== originalRecipient.phone) {\n // fields.phone = updatedRecipient.phone;\n // }\n // if (updatedRecipient.message !== originalRecipient.message) {\n // fields.message = updatedRecipient.message;\n // }\n // if (updatedRecipient.first_name !== originalRecipient.first_name) {\n // fields.first_name = updatedRecipient.first_name;\n // }\n // if (updatedRecipient.last_name !== originalRecipient.last_name) {\n // fields.last_name = updatedRecipient.last_name;\n // }\n //\n // if (Object.keys(fields).length > 0) {\n // updateRecipient(this.endpoint, this.envelopeId, originalRecipient.role_name, fields)\n // .then(r => {\n // // TODO: Reload the envelope?\n // VerdocsToast('Recipient updated', {style: 'success'});\n // console.log('[SIDEBAR] Updated recipient', r);\n // Store.getEnvelope(this.endpoint, this.envelopeId, true);\n // this.showUpdateDialog = '';\n // })\n // .catch(e => {\n // VerdocsToast(e.response.data.error, {style: 'error'});\n // this.showUpdateDialog = '';\n // });\n // } else {\n // this.showUpdateDialog = '';\n // }\n // }\n\n render() {\n const hasPoweredBy = !!this.envelope?.organization?.powered_by_label;\n const hasLinks = !!this.envelope?.organization?.terms_use_url || !!this.envelope?.organization?.privacy_policy_url;\n const hasButtons = !this.isDone;\n\n return (\n <Host class={{'has-buttons': hasButtons, 'no-buttons': !hasButtons, 'has-powered-by': hasPoweredBy, 'has-links': hasLinks, 'just-buttons': !hasPoweredBy && !hasLinks}}>\n {this.envelope?.organization?.powered_by_label && (\n <div class=\"powered-by\">\n {this.envelope?.organization?.powered_by_url ? (\n <a href={this.envelope?.organization?.powered_by_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>{this.envelope?.organization?.powered_by_label}</span>\n </a>\n ) : (\n <span>{this.envelope?.organization?.powered_by_label}</span>\n )}\n </div>\n )}\n\n {!this.isDone && (\n <div class=\"buttons\">\n <button onClick={() => (this.askingQuestion = true)}>\n <span innerHTML={QuestionIcon} />\n Ask Sender a Question\n </button>\n <button onClick={() => this.decline?.emit()}>\n <span innerHTML={DeclineIcon} />\n Decline Signing\n </button>\n <button onClick={() => this.finishLater?.emit()}>\n <span innerHTML={SaveIcon} />\n Finish Later\n </button>\n </div>\n )}\n\n <div class=\"links\">\n {this.envelope?.organization?.terms_use_url && (\n <a href={this.envelope?.organization?.terms_use_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>Terms of Use</span>\n </a>\n )}\n {this.envelope?.organization?.privacy_policy_url && (\n <a href={this.envelope?.organization?.privacy_policy_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>Privacy Policy</span>\n </a>\n )}\n </div>\n\n {this.askingQuestion && (\n <verdocs-question-dialog\n onNext={e => {\n this.askQuestion?.emit({question: e.detail.question});\n this.askingQuestion = false;\n }}\n onExit={() => (this.askingQuestion = false)}\n />\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h } from './p-CUAGH_8P.js';
|
|
2
2
|
import { a as SignatureXIcon } from './p-BDv5kBUR.js';
|
|
3
|
-
import { d as defineCustomElement$4 } from './p-
|
|
3
|
+
import { d as defineCustomElement$4 } from './p-92Hd0xeK.js';
|
|
4
4
|
import { d as defineCustomElement$3 } from './p-CnPaJH5T.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './p-ByFUP3AN.js';
|
|
6
6
|
import { d as defineCustomElement$1 } from './p-CcIN7yIE.js';
|
|
@@ -502,6 +502,6 @@ function defineCustomElement() {
|
|
|
502
502
|
}
|
|
503
503
|
|
|
504
504
|
export { VerdocsAdoptSignatureDialog as V, defineCustomElement as d };
|
|
505
|
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,MAAM,EAAE,MAAM,EAAE,WAAW,EAAC,GACjD,CACE,EAEN,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,YAAY,EAAA,EAAA,iSAAA,CAGjB,CACF,EAEN,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAA,EAC/B,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,SAAS,EAAA,EAClB,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAQ,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAEhD,EAAA,QAAA,CAAA,EACT,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAQ,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,qBAAqB,EAAE,EAAA,EAAA,cAAA,CAExF,CACL,CACF,CACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/dialogs/verdocs-adopt-signature-dialog/verdocs-adopt-signature-dialog.scss?tag=verdocs-adopt-signature-dialog","src/components/dialogs/verdocs-adopt-signature-dialog/verdocs-adopt-signature-dialog.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-adopt-signature-dialog {\n font-family: $primary-font;\n box-sizing: border-box;\n\n verdocs-dialog {\n border-radius: 4px;\n }\n\n .heading {\n color: #201f1e;\n font-weight: 400;\n padding-bottom: 0;\n border-bottom: none;\n }\n\n .content {\n display: flex;\n padding: 12px 24px 0;\n flex-direction: column;\n }\n\n .name-locked-hint {\n font-size: 12px;\n color: #6b7280;\n margin-top: 4px;\n }\n\n verdocs-text-input .input-label {\n color: #242424;\n font-size: 13px;\n font-weight: 400;\n }\n\n verdocs-text-input .input-element {\n border: 1px solid #e0e0e0;\n }\n\n verdocs-radio-button {\n transform: scale(0.9);\n }\n\n .canvas-container {\n position: relative;\n width: 100%;\n margin: 10px 0;\n border-radius: 4px;\n background: #fafafa;\n border: 1px solid #d1d1d1;\n box-sizing: border-box;\n\n &.initials-container {\n max-width: 50%;\n }\n\n canvas {\n width: 100%;\n height: 79px;\n border-radius: 4px;\n /* Background must be transparent to show the guide */\n background: transparent;\n box-sizing: border-box;\n /* Border is handled by container */\n border: none;\n position: relative;\n z-index: 2;\n }\n\n .signing-indicator {\n position: absolute;\n bottom: 9px;\n left: 9px;\n right: 9px;\n height: 28px;\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n gap: 2px;\n z-index: 1;\n pointer-events: none;\n\n .x-icon {\n width: 25px;\n height: 28px;\n display: flex;\n\n svg {\n width: 100%;\n height: 100%;\n }\n }\n\n .signing-line {\n flex: 1;\n /* \"The line is a 1px dashed (8px dash 8px space) #d1d1d1 line\". This works in SOME browsers. */\n border-bottom: 1px dashed #d1d1d1;\n background-position: bottom;\n background-size: 16px 1px;\n /* 8px dash + 8px space = 16px repeat */\n background-repeat: repeat-x;\n margin-bottom: 0;\n /* Since standard border-style: dashed doesn't allow custom spacing, we use a background gradient\n trick or just rely on standard dashed if acceptable.\n */\n height: 1px;\n border: none;\n background-image: linear-gradient(to right, #d1d1d1 50%, transparent 50%);\n }\n }\n }\n\n .disclaimer {\n padding: 8px 0;\n font-size: 11px;\n line-height: 14px;\n text-align: justify;\n color: rgba(0, 0, 0, 0.54);\n }\n\n .tabs {\n display: flex;\n flex-direction: row;\n margin: -20px -20px 0 -20px;\n border-bottom: 1px solid #eeeeee;\n\n .tab {\n flex: 1;\n gap: 4px;\n display: flex;\n cursor: pointer;\n font-size: 12px;\n font-weight: 500;\n padding: 6px 10px;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n\n &.active {\n background: #f9f5fe;\n border-bottom: 2px solid $border-color;\n }\n\n &:hover {\n color: $primary-color;\n }\n\n .icon {\n width: 16px;\n height: 16px;\n }\n }\n }\n\n // We use fixed heights for these sections to avoid layout shifts when switching tabs.\n .type {\n display: none;\n flex-direction: column;\n\n &.active {\n display: flex;\n }\n }\n\n .draw {\n height: 100px;\n display: none;\n margin-top: 20px;\n flex-direction: column;\n\n &.active {\n display: flex;\n }\n\n .draw-instructions {\n font-size: 13px;\n color: rgba(0, 0, 0, 0.6);\n margin-bottom: 8px;\n text-align: center;\n }\n\n canvas {\n cursor: crosshair;\n touch-action: none;\n }\n }\n\n .preview-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 10px;\n\n .clear-button-text {\n background: none;\n border: none;\n color: var(--verdocs-primary-color, #{$verdocs-green});\n cursor: pointer;\n font-size: 13px;\n padding: 0;\n font-weight: 500;\n\n &:hover {\n text-decoration: underline;\n }\n\n &:disabled {\n color: #9ca3af;\n text-decoration: none;\n cursor: not-allowed;\n }\n }\n }\n\n .upload {\n height: 100px;\n display: none;\n margin-top: 20px;\n flex-direction: column;\n\n &.active {\n display: flex;\n }\n\n .upload-instructions {\n font-size: 13px;\n color: rgba(0, 0, 0, 0.6);\n margin-bottom: 8px;\n text-align: center;\n }\n\n .upload-actions {\n display: flex;\n justify-content: center;\n gap: 12px;\n margin-top: 8px;\n\n .upload-button {\n border: 1px solid var(--verdocs-primary-color, #{$verdocs-green});\n background-color: var(--verdocs-primary-color, #{$verdocs-green});\n color: #ffffff;\n padding: 8px 20px;\n font-size: 13px;\n cursor: pointer;\n border-radius: var(--verdocs-button-radius, 4px);\n transition: all 0.2s ease;\n\n &:hover {\n filter: brightness(0.9);\n }\n }\n\n .clear-button {\n border: 1px solid #d0d0d0;\n background-color: #ffffff;\n color: #333333;\n padding: 8px 16px;\n font-size: 13px;\n cursor: pointer;\n border-radius: 4px;\n transition: all 0.2s ease;\n\n &:hover:not(:disabled) {\n background-color: #f5f5f5;\n border-color: #b0b0b0;\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n }\n }\n\n .upload-filename {\n font-size: 12px;\n color: rgba(0, 0, 0, 0.6);\n text-align: center;\n margin-top: 8px;\n font-style: italic;\n }\n }\n\n /* TODO: We're getting positive feedback. Add this as a formal button variant. */\n .buttons {\n gap: 20px;\n display: flex;\n margin-top: 14px;\n flex-direction: row;\n justify-content: flex-end;\n\n button {\n flex: 1;\n border: 0;\n height: 38px;\n display: flex;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n align-items: center;\n border-radius: var(--verdocs-button-radius, 6px);\n justify-content: center;\n transition: all 0.2s ease;\n\n &.cancel {\n background-color: transparent;\n border: 1px solid #d1d5db;\n color: #374151;\n\n &:hover {\n background-color: #f9fafb;\n }\n }\n\n &.proceed {\n background-color: var(--verdocs-primary-color, #{$verdocs-green});\n border: 1px solid transparent;\n color: #ffffff;\n\n &:hover {\n background-color: var(--verdocs-primary-color-hover, #{$verdocs-green-shade});\n filter: brightness(0.95);\n }\n }\n\n &:disabled {\n background-color: #e5e7eb;\n color: #9ca3af;\n cursor: not-allowed;\n }\n }\n }\n}\n","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"],"version":3}
|
|
1
|
+
{"file":"p-PzCAS0cD.js","mappings":";;;;;;;AAAA,MAAM,8BAA8B,GAAG,yhOAAyhO;;MCWnjO,2BAA2B,iBAAAA,kBAAA,CAAA,MAAA,2BAAA,SAAAC,CAAA,CAAA;AAJxC,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;AAUE;;AAEG;AACK,QAAA,IAAI,CAAA,IAAA,GAAW,EAAE;AAEzB;;AAEG;AACK,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;AAa1B,QAAA,IAAU,CAAA,UAAA,GAAG,KAAK;AAClB,QAAA,IAAW,CAAA,WAAA,GAAW,EAAE;AACxB,QAAA,IAAe,CAAA,eAAA,GAAW,EAAE;AAC5B,QAAA,IAAI,CAAA,IAAA,GAAoB,MAAM;AAC9B,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK;AACjB,QAAA,IAAiB,CAAA,iBAAA,GAAG,KAAK;AACzB,QAAA,IAAgB,CAAA,gBAAA,GAAG,KAAK;AAEzB,QAAA,IAAgB,CAAA,gBAAA,GAAkC,EAAE;AACpD,QAAA,IAAa,CAAA,aAAA,GAAyC,EAAE;AACxD,QAAA,IAAY,CAAA,YAAA,GAAkC,IAAI;AAElD,QAAA,IAAqB,CAAA,qBAAA,GAAkC,EAAE;AACzD,QAAA,IAAkB,CAAA,kBAAA,GAAyC,EAAE;AAC7D,QAAA,IAAiB,CAAA,iBAAA,GAAkC,IAAI;AAyV/D,QAAA,IAAA,CAAA,oBAAoB,GAAG,CAAC,CAAe,KAAI;YACzC,CAAC,CAAC,cAAc,EAAE;YAElB,IAAI,CAAC,IAAI,CAAC,gBAAgB,IAAI,CAAC,IAAI,CAAC,iBAAiB,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,EAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAC,GACjD,CACE,EAEN,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,YAAY,EAAA,EAAA,iSAAA,CAGjB,CACF,EAEN,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAA,EAC/B,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,SAAS,EAAA,EAClB,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAQ,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAEhD,EAAA,QAAA,CAAA,EACT,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAQ,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,qBAAqB,EAAE,EAAA,EAAA,cAAA,CAExF,CACL,CACF,CACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/dialogs/verdocs-adopt-signature-dialog/verdocs-adopt-signature-dialog.scss?tag=verdocs-adopt-signature-dialog","src/components/dialogs/verdocs-adopt-signature-dialog/verdocs-adopt-signature-dialog.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-adopt-signature-dialog {\n font-family: $primary-font;\n box-sizing: border-box;\n\n verdocs-dialog {\n border-radius: 4px;\n }\n\n .heading {\n color: #201f1e;\n font-weight: 400;\n padding-bottom: 0;\n border-bottom: none;\n }\n\n .content {\n display: flex;\n padding: 12px 24px 0;\n flex-direction: column;\n }\n\n .name-locked-hint {\n font-size: 12px;\n color: #6b7280;\n margin-top: 4px;\n }\n\n verdocs-text-input .input-label {\n color: #242424;\n font-size: 13px;\n font-weight: 400;\n }\n\n verdocs-text-input .input-element {\n border: 1px solid #e0e0e0;\n }\n\n verdocs-radio-button {\n transform: scale(0.9);\n }\n\n .canvas-container {\n position: relative;\n width: 100%;\n margin: 10px 0;\n border-radius: 4px;\n background: #fafafa;\n border: 1px solid #d1d1d1;\n box-sizing: border-box;\n\n &.initials-container {\n max-width: 50%;\n }\n\n canvas {\n width: 100%;\n height: 79px;\n border-radius: 4px;\n /* Background must be transparent to show the guide */\n background: transparent;\n box-sizing: border-box;\n /* Border is handled by container */\n border: none;\n position: relative;\n z-index: 2;\n }\n\n .signing-indicator {\n position: absolute;\n bottom: 9px;\n left: 9px;\n right: 9px;\n height: 28px;\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n gap: 2px;\n z-index: 1;\n pointer-events: none;\n\n .x-icon {\n width: 25px;\n height: 28px;\n display: flex;\n\n svg {\n width: 100%;\n height: 100%;\n }\n }\n\n .signing-line {\n flex: 1;\n /* \"The line is a 1px dashed (8px dash 8px space) #d1d1d1 line\". This works in SOME browsers. */\n border-bottom: 1px dashed #d1d1d1;\n background-position: bottom;\n background-size: 16px 1px;\n /* 8px dash + 8px space = 16px repeat */\n background-repeat: repeat-x;\n margin-bottom: 0;\n /* Since standard border-style: dashed doesn't allow custom spacing, we use a background gradient\n trick or just rely on standard dashed if acceptable.\n */\n height: 1px;\n border: none;\n background-image: linear-gradient(to right, #d1d1d1 50%, transparent 50%);\n }\n }\n }\n\n .disclaimer {\n padding: 8px 0;\n font-size: 11px;\n line-height: 14px;\n text-align: justify;\n color: rgba(0, 0, 0, 0.54);\n }\n\n .tabs {\n display: flex;\n flex-direction: row;\n margin: -20px -20px 0 -20px;\n border-bottom: 1px solid #eeeeee;\n\n .tab {\n flex: 1;\n gap: 4px;\n display: flex;\n cursor: pointer;\n font-size: 12px;\n font-weight: 500;\n padding: 6px 10px;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n\n &.active {\n background: #f9f5fe;\n border-bottom: 2px solid $border-color;\n }\n\n &:hover {\n color: $primary-color;\n }\n\n .icon {\n width: 16px;\n height: 16px;\n }\n }\n }\n\n // We use fixed heights for these sections to avoid layout shifts when switching tabs.\n .type {\n display: none;\n flex-direction: column;\n\n &.active {\n display: flex;\n }\n }\n\n .draw {\n height: 100px;\n display: none;\n margin-top: 20px;\n flex-direction: column;\n\n &.active {\n display: flex;\n }\n\n .draw-instructions {\n font-size: 13px;\n color: rgba(0, 0, 0, 0.6);\n margin-bottom: 8px;\n text-align: center;\n }\n\n canvas {\n cursor: crosshair;\n touch-action: none;\n }\n }\n\n .preview-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 10px;\n\n .clear-button-text {\n background: none;\n border: none;\n color: var(--verdocs-primary-color, #{$verdocs-green});\n cursor: pointer;\n font-size: 13px;\n padding: 0;\n font-weight: 500;\n\n &:hover {\n text-decoration: underline;\n }\n\n &:disabled {\n color: #9ca3af;\n text-decoration: none;\n cursor: not-allowed;\n }\n }\n }\n\n .upload {\n height: 100px;\n display: none;\n margin-top: 20px;\n flex-direction: column;\n\n &.active {\n display: flex;\n }\n\n .upload-instructions {\n font-size: 13px;\n color: rgba(0, 0, 0, 0.6);\n margin-bottom: 8px;\n text-align: center;\n }\n\n .upload-actions {\n display: flex;\n justify-content: center;\n gap: 12px;\n margin-top: 8px;\n\n .upload-button {\n border: 1px solid var(--verdocs-primary-color, #{$verdocs-green});\n background-color: var(--verdocs-primary-color, #{$verdocs-green});\n color: #ffffff;\n padding: 8px 20px;\n font-size: 13px;\n cursor: pointer;\n border-radius: var(--verdocs-button-radius, 4px);\n transition: all 0.2s ease;\n\n &:hover {\n filter: brightness(0.9);\n }\n }\n\n .clear-button {\n border: 1px solid #d0d0d0;\n background-color: #ffffff;\n color: #333333;\n padding: 8px 16px;\n font-size: 13px;\n cursor: pointer;\n border-radius: 4px;\n transition: all 0.2s ease;\n\n &:hover:not(:disabled) {\n background-color: #f5f5f5;\n border-color: #b0b0b0;\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n }\n }\n\n .upload-filename {\n font-size: 12px;\n color: rgba(0, 0, 0, 0.6);\n text-align: center;\n margin-top: 8px;\n font-style: italic;\n }\n }\n\n /* TODO: We're getting positive feedback. Add this as a formal button variant. */\n .buttons {\n gap: 20px;\n display: flex;\n margin-top: 14px;\n flex-direction: row;\n justify-content: flex-end;\n\n button {\n flex: 1;\n border: 0;\n height: 38px;\n display: flex;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n align-items: center;\n border-radius: var(--verdocs-button-radius, 6px);\n justify-content: center;\n transition: all 0.2s ease;\n\n &.cancel {\n background-color: transparent;\n border: 1px solid #d1d5db;\n color: #374151;\n\n &:hover {\n background-color: #f9fafb;\n }\n }\n\n &.proceed {\n background-color: var(--verdocs-primary-color, #{$verdocs-green});\n border: 1px solid transparent;\n color: #ffffff;\n\n &:hover {\n background-color: var(--verdocs-primary-color-hover, #{$verdocs-green-shade});\n filter: brightness(0.95);\n }\n }\n\n &:disabled {\n background-color: #e5e7eb;\n color: #9ca3af;\n cursor: not-allowed;\n }\n }\n }\n}\n","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"],"version":3}
|
|
@@ -5,8 +5,8 @@ import { S as Store } from './p-C7hFgM52.js';
|
|
|
5
5
|
import { d as defineCustomElement$n } from './p-C_yyK5xE.js';
|
|
6
6
|
import { d as defineCustomElement$m } from './p-BvV9rOTP.js';
|
|
7
7
|
import { d as defineCustomElement$l } from './p-CdmWI0-q.js';
|
|
8
|
-
import { d as defineCustomElement$k } from './p-
|
|
9
|
-
import { d as defineCustomElement$j } from './p-
|
|
8
|
+
import { d as defineCustomElement$k } from './p-92Hd0xeK.js';
|
|
9
|
+
import { d as defineCustomElement$j } from './p-DJ-FHysU.js';
|
|
10
10
|
import { d as defineCustomElement$i } from './p-CoX-UPik.js';
|
|
11
11
|
import { d as defineCustomElement$h } from './p-BAMSjBQv.js';
|
|
12
12
|
import { d as defineCustomElement$g } from './p-DpVavzPM.js';
|
|
@@ -19,12 +19,12 @@ import { d as defineCustomElement$a } from './p-D8mSsBn8.js';
|
|
|
19
19
|
import { d as defineCustomElement$9 } from './p-BC5N3FIA.js';
|
|
20
20
|
import { d as defineCustomElement$8 } from './p-CnPaJH5T.js';
|
|
21
21
|
import { d as defineCustomElement$7 } from './p-CNKACBaL.js';
|
|
22
|
-
import { d as defineCustomElement$6 } from './p-
|
|
22
|
+
import { d as defineCustomElement$6 } from './p-D3NVBZRw.js';
|
|
23
23
|
import { d as defineCustomElement$5 } from './p-DUYRis3A.js';
|
|
24
24
|
import { d as defineCustomElement$4 } from './p-C1AtapGD.js';
|
|
25
25
|
import { d as defineCustomElement$3 } from './p-D7H5IOY_.js';
|
|
26
26
|
import { d as defineCustomElement$2 } from './p-CcIN7yIE.js';
|
|
27
|
-
import { d as defineCustomElement$1 } from './p-
|
|
27
|
+
import { d as defineCustomElement$1 } from './p-CEedhxiy.js';
|
|
28
28
|
|
|
29
29
|
const verdocsTemplateDocumentPageCss = "verdocs-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}verdocs-template-document-page .placeholder{opacity:0.1;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}";
|
|
30
30
|
|
|
@@ -383,6 +383,6 @@ function defineCustomElement() {
|
|
|
383
383
|
}
|
|
384
384
|
|
|
385
385
|
export { VerdocsTemplateDocumentPage as V, defineCustomElement as d };
|
|
386
|
-
//# sourceMappingURL=p-
|
|
386
|
+
//# sourceMappingURL=p-jm2NkWGW.js.map
|
|
387
387
|
|
|
388
|
-
//# sourceMappingURL=p-
|
|
388
|
+
//# sourceMappingURL=p-jm2NkWGW.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-DdMGzViT.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,8BAA8B,GAAG,wjBAAwjB;;MCmBllB,2BAA2B,iBAAAA,kBAAA,CAAA,MAAA,2BAAA,SAAAC,CAAA,CAAA;AALxC,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;AAMU,QAAA,IAAkB,CAAA,kBAAA,GAAG,IAAI;AAKjC;;AAEG;AACK,QAAA,IAAA,CAAA,QAAQ,GAAoB,eAAe,CAAC,UAAU,EAAE;AAEhE;;AAEG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAExB;;AAEG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAExB;;AAEG;AACK,QAAA,I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WAAW,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,aAAa;oBACzD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW;AACzD,oBAAA,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW;AAC/D,iBAAC,EAAA,CACD,KAEF,CAAA,CAAA,KAAA,EAAA,IAAA,CAAW,CACZ;SAAA,CACF,CACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/templates/verdocs-template-document-page/verdocs-template-document-page.scss?tag=verdocs-template-document-page","src/components/templates/verdocs-template-document-page/verdocs-template-document-page.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-template-document-page {\n width: 100%;\n position: relative;\n\n .verdocs-template-document-page-layer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n box-shadow: 0 0 10px 5px #0000000f;\n\n &.img {\n width: 100%;\n }\n }\n\n .placeholder {\n opacity: 0.1;\n width: 612px;\n height: 792px;\n box-shadow: 0 0 10px 5px #0000000f;\n }\n}\n","// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {getTemplate, getTemplateDocumentPageDisplayUri, type ITemplate, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Element, Fragment} from '@stencil/core';\nimport {IDocumentPageInfo, IPageLayer} from '../../../utils/Types';\nimport {getControlStyles, getFieldId} from '../../../utils/utils';\nimport {throttle} from '../../../utils/utils';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Represents one document page. This is primarily a layout container used to coordinate positions of\n * page-related layers such as the page itself, signature fields, etc. It is not intended to be used\n * on its own as an individual component.\n */\n@Component({\n tag: 'verdocs-template-document-page',\n styleUrl: 'verdocs-template-document-page.scss',\n shadow: false,\n})\nexport class VerdocsTemplateDocumentPage {\n private templateListenerId = null;\n private resizeObserver: ResizeObserver;\n\n @Element() container: HTMLElement;\n\n /**\n * The endpoint to load from.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * Whether the fields should be editable (Builder)\n */\n @Prop() editable = false;\n\n /**\n * Whether the fields should be disabled (Builder)\n */\n @Prop() disabled = false;\n\n /**\n * Whether the field are interactable (done/submitted disables this)\n */\n @Prop() done = false;\n\n /**\n * The ID of the template the document is for.\n */\n @Prop({reflect: true}) templateId: string = '';\n\n /**\n * The ID of the document to display.\n */\n @Prop({reflect: true}) documentId: string = '';\n\n /**\n * The page number being rendered. (Reminder: page numbers are 1-based.)\n */\n @Prop({reflect: true}) pageNumber: number = 1;\n\n /**\n * The \"virtual\" width of the page canvas. Defaults to 612 which at 72dpi is 8.5\" wide. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop() virtualWidth: number = 612;\n\n /**\n * The \"virtual\" height of the page canvas. Defaults to 792 which at 72dpi is 11\" tall. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop({mutable: true}) virtualHeight: number = 792;\n\n /**\n * The layers that will be rendered. The DOM structure will be a DIV container with one child DIV for each layer.\n * The parent DIV will have a unique ID, and each child DIV will have that ID with the layer name appended, e.g.\n * if `pages` was ['page', 'fields'] the structure will be:\n *\n * ```\n * <div id=\"verdocs-document-page-ker2fr1p9\">\n * <div id=\"verdocs-document-page-ker2fr1p9-page\"></div>\n * <div id=\"verdocs-document-page-ker2fr1p9-fields\"></div>\n * </div>\n * ```\n */\n @Prop() layers: IPageLayer[] = [{name: 'page', type: 'canvas'}];\n\n /**\n * Fired when a page has been rendered. This is also fired when the page is resized.\n */\n @Event() pageRendered: EventEmitter<IDocumentPageInfo>;\n\n @State() containerId = `verdocs-document-page-${Math.random().toString(36).substring(2, 11)}`;\n @State() renderedWidth: number = this.virtualWidth;\n @State() renderedHeight: number = this.virtualHeight;\n @State() naturalWidth: number = this.virtualWidth;\n @State() naturalHeight: number = this.virtualHeight;\n @State() aspectRatio: number = this.virtualWidth / this.virtualHeight;\n @State() skipFirstNotification = true;\n @State() pageDisplayUri = '';\n @State() xScale = 1;\n @State() yScale = 1;\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n async componentWillLoad() {\n this.pageDisplayUri = await getTemplateDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber);\n this.listenToTemplate();\n }\n\n componentDidLoad() {\n this.resizeObserver = new ResizeObserver(\n throttle(entries => {\n for (const entry of entries) {\n const renderedWidth = entry.contentRect.width;\n this.renderedWidth = renderedWidth;\n this.renderedHeight = this.virtualHeight * (renderedWidth / this.virtualWidth);\n }\n\n this.notifyRenderedSize();\n }, 100),\n );\n\n this.resizeObserver.observe(this.container);\n }\n\n componentDidUpdate() {\n // This is fired when fields are updated and triggers the parent to re-attach behaviors like drag-and-drop\n this.notifyRenderedSize();\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n this.unlistenToTemplate();\n }\n\n async listenToTemplate() {\n this.unlistenToTemplate();\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n false,\n (template: ITemplate) => {\n this.template = template;\n this.loading = false;\n },\n );\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n notifyRenderedSize() {\n // We skip one notification because by default we will always get at least two, one when rendering the initial size\n // and a second once we're able to compute the scale size, when the resizeObserver sets renderedWidth/renderedHeight.\n if (this.skipFirstNotification) {\n this.skipFirstNotification = false;\n return;\n }\n\n const xScale = this.renderedWidth / this.virtualWidth;\n if (this.xScale !== xScale) {\n this.xScale = xScale;\n }\n\n const yScale = this.renderedHeight / this.virtualHeight;\n if (this.yScale !== yScale) {\n this.yScale = yScale;\n }\n\n this.pageRendered.emit({\n // container: this.container,\n containerId: this.containerId,\n documentId: this.documentId,\n pageNumber: this.pageNumber,\n virtualWidth: this.virtualWidth,\n virtualHeight: this.virtualHeight,\n renderedWidth: this.renderedWidth,\n renderedHeight: this.renderedHeight,\n naturalWidth: this.naturalWidth,\n naturalHeight: this.naturalHeight,\n aspectRatio: this.aspectRatio,\n xScale,\n yScale,\n });\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <img src=\"https://public-assets.verdocs.com/loading-placeholder.png\" class=\"placeholder\" alt=\"Placeholder page\" />\n </Host>\n );\n }\n\n const height = `${this.renderedHeight}px`;\n\n return (\n <Host id={`${this.containerId}`} style={{height, flex: `0 0 ${height}`}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-template-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}}>\n {layer.name === 'controls' &&\n (this.template?.fields || [])\n .filter(field => field && field.document_id === this.documentId && field.page === this.pageNumber)\n .map(field => {\n const id = getFieldId(field);\n let {name, type, multiline} = field;\n const {xScale, yScale, templateId, editable, disabled, done, pageNumber} = this;\n if (field['setting']?.leading > 0 || field['settings']?.leading > 0) {\n type = 'textarea';\n multiline = true;\n }\n switch (type as any) {\n case 'textbox':\n return (\n <verdocs-field-textbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n multiline={multiline}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'textarea':\n return (\n <verdocs-field-textarea\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'date':\n return (\n <verdocs-field-date\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'attachment':\n return (\n <verdocs-field-attachment\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'dropdown':\n return (\n <verdocs-field-dropdown\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'initial':\n return (\n <verdocs-field-initial\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'signature':\n return (\n <verdocs-field-signature\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, this.xScale, this.yScale)}\n />\n );\n case 'timestamp':\n return (\n <verdocs-field-timestamp\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'checkbox':\n return (\n <verdocs-field-checkbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'radio':\n return (\n <verdocs-field-radio\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n default:\n return <Fragment>{name}</Fragment>;\n }\n })}\n </div>\n ) : this.pageDisplayUri ? (\n <img\n class=\"verdocs-template-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageDisplayUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\n loading=\"lazy\"\n onLoad={(e: any) => {\n // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that\n // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).\n // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values\n // for a field are based on the responsive Web view the Template editor was seeing. The IMG was scaled down there in the\n // exact same way, so we just honor it. We capture the natural width and height here more as information. Then we use the\n // aspect ratio to adjust the \"virtual\" height in case the page is not 8.5\"x11\".\n // TODO: Store this in the DB with each page.\n this.naturalWidth = e.target.naturalWidth;\n this.naturalHeight = e.target.naturalHeight;\n this.aspectRatio = this.naturalWidth / this.naturalHeight;\n this.virtualHeight = this.virtualWidth / this.aspectRatio;\n this.renderedHeight = e.target.offsetWidth / this.aspectRatio;\n }}\n />\n ) : (\n <div></div>\n ),\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-jm2NkWGW.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,8BAA8B,GAAG,wjBAAwjB;;MCmBllB,2BAA2B,iBAAAA,kBAAA,CAAA,MAAA,2BAAA,SAAAC,CAAA,CAAA;AALxC,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;AAMU,QAAA,IAAkB,CAAA,kBAAA,GAAG,IAAI;AAKjC;;AAEG;AACK,QAAA,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EACd,MAAM,EAAE,CAAC,CAAM,KAAI;;;;;;;;oBAQjB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,YAAY;oBACzC,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,aAAa;oBAC3C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,aAAa;oBACzD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW;AACzD,oBAAA,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW;AAC/D,iBAAC,EAAA,CACD,KAEF,CAAA,CAAA,KAAA,EAAA,IAAA,CAAW,CACZ;SAAA,CACF,CACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/templates/verdocs-template-document-page/verdocs-template-document-page.scss?tag=verdocs-template-document-page","src/components/templates/verdocs-template-document-page/verdocs-template-document-page.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-template-document-page {\n width: 100%;\n position: relative;\n\n .verdocs-template-document-page-layer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n box-shadow: 0 0 10px 5px #0000000f;\n\n &.img {\n width: 100%;\n }\n }\n\n .placeholder {\n opacity: 0.1;\n width: 612px;\n height: 792px;\n box-shadow: 0 0 10px 5px #0000000f;\n }\n}\n","// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {getTemplate, getTemplateDocumentPageDisplayUri, type ITemplate, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Element, Fragment} from '@stencil/core';\nimport {IDocumentPageInfo, IPageLayer} from '../../../utils/Types';\nimport {getControlStyles, getFieldId} from '../../../utils/utils';\nimport {throttle} from '../../../utils/utils';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Represents one document page. This is primarily a layout container used to coordinate positions of\n * page-related layers such as the page itself, signature fields, etc. It is not intended to be used\n * on its own as an individual component.\n */\n@Component({\n tag: 'verdocs-template-document-page',\n styleUrl: 'verdocs-template-document-page.scss',\n shadow: false,\n})\nexport class VerdocsTemplateDocumentPage {\n private templateListenerId = null;\n private resizeObserver: ResizeObserver;\n\n @Element() container: HTMLElement;\n\n /**\n * The endpoint to load from.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * Whether the fields should be editable (Builder)\n */\n @Prop() editable = false;\n\n /**\n * Whether the fields should be disabled (Builder)\n */\n @Prop() disabled = false;\n\n /**\n * Whether the field are interactable (done/submitted disables this)\n */\n @Prop() done = false;\n\n /**\n * The ID of the template the document is for.\n */\n @Prop({reflect: true}) templateId: string = '';\n\n /**\n * The ID of the document to display.\n */\n @Prop({reflect: true}) documentId: string = '';\n\n /**\n * The page number being rendered. (Reminder: page numbers are 1-based.)\n */\n @Prop({reflect: true}) pageNumber: number = 1;\n\n /**\n * The \"virtual\" width of the page canvas. Defaults to 612 which at 72dpi is 8.5\" wide. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop() virtualWidth: number = 612;\n\n /**\n * The \"virtual\" height of the page canvas. Defaults to 792 which at 72dpi is 11\" tall. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop({mutable: true}) virtualHeight: number = 792;\n\n /**\n * The layers that will be rendered. The DOM structure will be a DIV container with one child DIV for each layer.\n * The parent DIV will have a unique ID, and each child DIV will have that ID with the layer name appended, e.g.\n * if `pages` was ['page', 'fields'] the structure will be:\n *\n * ```\n * <div id=\"verdocs-document-page-ker2fr1p9\">\n * <div id=\"verdocs-document-page-ker2fr1p9-page\"></div>\n * <div id=\"verdocs-document-page-ker2fr1p9-fields\"></div>\n * </div>\n * ```\n */\n @Prop() layers: IPageLayer[] = [{name: 'page', type: 'canvas'}];\n\n /**\n * Fired when a page has been rendered. This is also fired when the page is resized.\n */\n @Event() pageRendered: EventEmitter<IDocumentPageInfo>;\n\n @State() containerId = `verdocs-document-page-${Math.random().toString(36).substring(2, 11)}`;\n @State() renderedWidth: number = this.virtualWidth;\n @State() renderedHeight: number = this.virtualHeight;\n @State() naturalWidth: number = this.virtualWidth;\n @State() naturalHeight: number = this.virtualHeight;\n @State() aspectRatio: number = this.virtualWidth / this.virtualHeight;\n @State() skipFirstNotification = true;\n @State() pageDisplayUri = '';\n @State() xScale = 1;\n @State() yScale = 1;\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n async componentWillLoad() {\n this.pageDisplayUri = await getTemplateDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber);\n this.listenToTemplate();\n }\n\n componentDidLoad() {\n this.resizeObserver = new ResizeObserver(\n throttle(entries => {\n for (const entry of entries) {\n const renderedWidth = entry.contentRect.width;\n this.renderedWidth = renderedWidth;\n this.renderedHeight = this.virtualHeight * (renderedWidth / this.virtualWidth);\n }\n\n this.notifyRenderedSize();\n }, 100),\n );\n\n this.resizeObserver.observe(this.container);\n }\n\n componentDidUpdate() {\n // This is fired when fields are updated and triggers the parent to re-attach behaviors like drag-and-drop\n this.notifyRenderedSize();\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n this.unlistenToTemplate();\n }\n\n async listenToTemplate() {\n this.unlistenToTemplate();\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n false,\n (template: ITemplate) => {\n this.template = template;\n this.loading = false;\n },\n );\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n notifyRenderedSize() {\n // We skip one notification because by default we will always get at least two, one when rendering the initial size\n // and a second once we're able to compute the scale size, when the resizeObserver sets renderedWidth/renderedHeight.\n if (this.skipFirstNotification) {\n this.skipFirstNotification = false;\n return;\n }\n\n const xScale = this.renderedWidth / this.virtualWidth;\n if (this.xScale !== xScale) {\n this.xScale = xScale;\n }\n\n const yScale = this.renderedHeight / this.virtualHeight;\n if (this.yScale !== yScale) {\n this.yScale = yScale;\n }\n\n this.pageRendered.emit({\n // container: this.container,\n containerId: this.containerId,\n documentId: this.documentId,\n pageNumber: this.pageNumber,\n virtualWidth: this.virtualWidth,\n virtualHeight: this.virtualHeight,\n renderedWidth: this.renderedWidth,\n renderedHeight: this.renderedHeight,\n naturalWidth: this.naturalWidth,\n naturalHeight: this.naturalHeight,\n aspectRatio: this.aspectRatio,\n xScale,\n yScale,\n });\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <img src=\"https://public-assets.verdocs.com/loading-placeholder.png\" class=\"placeholder\" alt=\"Placeholder page\" />\n </Host>\n );\n }\n\n const height = `${this.renderedHeight}px`;\n\n return (\n <Host id={`${this.containerId}`} style={{height, flex: `0 0 ${height}`}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-template-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}}>\n {layer.name === 'controls' &&\n (this.template?.fields || [])\n .filter(field => field && field.document_id === this.documentId && field.page === this.pageNumber)\n .map(field => {\n const id = getFieldId(field);\n let {name, type, multiline} = field;\n const {xScale, yScale, templateId, editable, disabled, done, pageNumber} = this;\n if (field['setting']?.leading > 0 || field['settings']?.leading > 0) {\n type = 'textarea';\n multiline = true;\n }\n switch (type as any) {\n case 'textbox':\n return (\n <verdocs-field-textbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n multiline={multiline}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'textarea':\n return (\n <verdocs-field-textarea\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'date':\n return (\n <verdocs-field-date\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'attachment':\n return (\n <verdocs-field-attachment\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'dropdown':\n return (\n <verdocs-field-dropdown\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'initial':\n return (\n <verdocs-field-initial\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'signature':\n return (\n <verdocs-field-signature\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, this.xScale, this.yScale)}\n />\n );\n case 'timestamp':\n return (\n <verdocs-field-timestamp\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'checkbox':\n return (\n <verdocs-field-checkbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'radio':\n return (\n <verdocs-field-radio\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n default:\n return <Fragment>{name}</Fragment>;\n }\n })}\n </div>\n ) : this.pageDisplayUri ? (\n <img\n class=\"verdocs-template-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageDisplayUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\n loading=\"lazy\"\n onLoad={(e: any) => {\n // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that\n // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).\n // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values\n // for a field are based on the responsive Web view the Template editor was seeing. The IMG was scaled down there in the\n // exact same way, so we just honor it. We capture the natural width and height here more as information. Then we use the\n // aspect ratio to adjust the \"virtual\" height in case the page is not 8.5\"x11\".\n // TODO: Store this in the DB with each page.\n this.naturalWidth = e.target.naturalWidth;\n this.naturalHeight = e.target.naturalHeight;\n this.aspectRatio = this.naturalWidth / this.naturalHeight;\n this.virtualHeight = this.virtualWidth / this.aspectRatio;\n this.renderedHeight = e.target.offsetWidth / this.aspectRatio;\n }}\n />\n ) : (\n <div></div>\n ),\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|