@verdocs/web-sdk 1.9.22 → 1.9.23
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/{Envelopes-647724d8.js → Envelopes-a9646e09.js} +2 -2
- package/dist/cjs/{Envelopes-647724d8.js.map → Envelopes-a9646e09.js.map} +1 -1
- package/dist/cjs/{Templates-c0b4453e.js → Templates-805e8ffa.js} +2 -2
- package/dist/cjs/{Templates-c0b4453e.js.map → Templates-805e8ffa.js.map} +1 -1
- package/dist/cjs/{templateStore-86cc0f59.js → templateStore-a1ccccdb.js} +2 -2
- package/dist/cjs/{templateStore-86cc0f59.js.map → templateStore-a1ccccdb.js.map} +1 -1
- package/dist/cjs/{utils-fae54b93.js → utils-aa1285cc.js} +12 -1
- package/dist/cjs/utils-aa1285cc.js.map +1 -0
- package/dist/cjs/verdocs-build.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-document-page_2.cjs.entry.js +15 -5
- package/dist/cjs/verdocs-document-page_2.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-date.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-signature_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-send.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +3 -5
- package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-template-create_4.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-view.cjs.entry.js +2 -2
- package/dist/collection/components/elements/verdocs-document-page/verdocs-document-page.js +14 -5
- package/dist/collection/components/elements/verdocs-document-page/verdocs-document-page.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +1 -3
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.stories.js +2 -4
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.stories.js.map +1 -1
- package/dist/collection/utils/Types.js.map +1 -1
- package/dist/collection/utils/utils.js +10 -0
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/utils.js +11 -1
- package/dist/components/utils.js.map +1 -1
- package/dist/components/verdocs-document-page2.js +14 -5
- package/dist/components/verdocs-document-page2.js.map +1 -1
- package/dist/components/verdocs-sign.js +1 -3
- package/dist/components/verdocs-sign.js.map +1 -1
- package/dist/docs.json +1 -1
- package/dist/esm/{Envelopes-bae41b1e.js → Envelopes-bd915f3e.js} +2 -2
- package/dist/esm/{Envelopes-bae41b1e.js.map → Envelopes-bd915f3e.js.map} +1 -1
- package/dist/esm/{Templates-a5ba3f59.js → Templates-653648bb.js} +2 -2
- package/dist/esm/{Templates-a5ba3f59.js.map → Templates-653648bb.js.map} +1 -1
- package/dist/esm/{templateStore-dd69f2f3.js → templateStore-8585145f.js} +2 -2
- package/dist/esm/{templateStore-dd69f2f3.js.map → templateStore-8585145f.js.map} +1 -1
- package/dist/esm/{utils-f2bdefaa.js → utils-c666adcf.js} +12 -2
- package/dist/esm/utils-c666adcf.js.map +1 -0
- package/dist/esm/verdocs-build.entry.js +3 -3
- package/dist/esm/verdocs-document-page_2.entry.js +15 -5
- package/dist/esm/verdocs-document-page_2.entry.js.map +1 -1
- package/dist/esm/verdocs-field-checkbox.entry.js +1 -1
- package/dist/esm/verdocs-field-date.entry.js +1 -1
- package/dist/esm/verdocs-field-dropdown.entry.js +1 -1
- package/dist/esm/verdocs-field-initial.entry.js +1 -1
- package/dist/esm/verdocs-field-payment.entry.js +1 -1
- package/dist/esm/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm/verdocs-field-signature_3.entry.js +1 -1
- package/dist/esm/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm/verdocs-field-textbox.entry.js +2 -2
- package/dist/esm/verdocs-field-timestamp.entry.js +1 -1
- package/dist/esm/verdocs-preview.entry.js +3 -3
- package/dist/esm/verdocs-send.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +3 -5
- package/dist/esm/verdocs-sign.entry.js.map +1 -1
- package/dist/esm/verdocs-template-create_4.entry.js +3 -3
- package/dist/esm/verdocs-view.entry.js +2 -2
- package/dist/esm-es5/{Envelopes-bae41b1e.js → Envelopes-bd915f3e.js} +2 -2
- package/dist/esm-es5/{Envelopes-bae41b1e.js.map → Envelopes-bd915f3e.js.map} +0 -0
- package/dist/esm-es5/{Templates-a5ba3f59.js → Templates-653648bb.js} +2 -2
- package/dist/esm-es5/{Templates-a5ba3f59.js.map → Templates-653648bb.js.map} +0 -0
- package/dist/esm-es5/{templateStore-dd69f2f3.js → templateStore-8585145f.js} +2 -2
- package/dist/esm-es5/{templateStore-dd69f2f3.js.map → templateStore-8585145f.js.map} +0 -0
- package/dist/esm-es5/{utils-f2bdefaa.js → utils-c666adcf.js} +2 -2
- package/dist/esm-es5/utils-c666adcf.js.map +1 -0
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-document-page_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-document-page_2.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-signature_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview.entry.js +1 -1
- package/dist/esm-es5/verdocs-send.entry.js +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-template-create_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/types/utils/Types.d.ts +1 -0
- package/dist/types/utils/utils.d.ts +4 -0
- package/dist/typings.d.ts +4 -0
- package/dist/verdocs-web-sdk/{p-70bf612f.entry.js → p-0126c601.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-70bf612f.entry.js.map → p-0126c601.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-e0e6e79d.system.js → p-075025ab.system.js} +2 -2
- package/dist/verdocs-web-sdk/{p-e0e6e79d.system.js.map → p-075025ab.system.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-b84401ed.entry.js → p-08110f98.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-b84401ed.entry.js.map → p-08110f98.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-fed9fd2b.system.entry.js → p-0d775f91.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-0d775f91.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-0b771a2e.entry.js → p-19435eaf.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-0b771a2e.entry.js.map → p-19435eaf.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-1f2c70da.system.entry.js → p-2557ce63.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-1f2c70da.system.entry.js.map → p-2557ce63.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-f9915732.system.js → p-2bc68d06.system.js} +2 -2
- package/dist/verdocs-web-sdk/{p-f9915732.system.js.map → p-2bc68d06.system.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-7ccd5b2b.entry.js → p-3622cb3c.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-7ccd5b2b.entry.js.map → p-3622cb3c.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-656387e4.entry.js → p-38d5bc9e.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-656387e4.entry.js.map → p-38d5bc9e.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-92580c34.system.entry.js → p-474155b8.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-92580c34.system.entry.js.map → p-474155b8.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/p-48c467a2.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-48c467a2.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-f563a7c8.entry.js → p-4e1fc08d.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-f563a7c8.entry.js.map → p-4e1fc08d.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-7e9dc6ea.entry.js → p-4e775928.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-7e9dc6ea.entry.js.map → p-4e775928.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-45e74078.entry.js → p-4f3b1c7c.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-45e74078.entry.js.map → p-4f3b1c7c.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-0012a455.js → p-5b7a5deb.js} +2 -2
- package/dist/verdocs-web-sdk/{p-0012a455.js.map → p-5b7a5deb.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-de90c405.system.entry.js → p-61e0f6dd.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-de90c405.system.entry.js.map → p-61e0f6dd.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-0cbee9ee.entry.js → p-6524809d.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-0cbee9ee.entry.js.map → p-6524809d.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-c70b6871.entry.js → p-7421e32e.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-c70b6871.entry.js.map → p-7421e32e.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-ce949e78.system.entry.js → p-75f6a179.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-ce949e78.system.entry.js.map → p-75f6a179.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-b00c8e00.system.js → p-78f5c8ad.system.js} +2 -2
- package/dist/verdocs-web-sdk/p-78f5c8ad.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-2c986881.system.entry.js → p-7937a240.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-2c986881.system.entry.js.map → p-7937a240.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-435153a4.system.entry.js → p-7e140c6b.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-435153a4.system.entry.js.map → p-7e140c6b.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-7bccd90d.entry.js → p-7ffe3227.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-7ffe3227.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-112b3e2c.system.js → p-89641895.system.js} +2 -2
- package/dist/verdocs-web-sdk/{p-112b3e2c.system.js.map → p-89641895.system.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-103d61f1.system.entry.js → p-92e526a0.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-103d61f1.system.entry.js.map → p-92e526a0.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-a21c0320.entry.js → p-958a833f.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-a21c0320.entry.js.map → p-958a833f.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-89c64ec1.system.entry.js → p-9e5fcf92.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-89c64ec1.system.entry.js.map → p-9e5fcf92.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/p-a51bb6bf.js +2 -0
- package/dist/verdocs-web-sdk/{p-f2d637b8.js.map → p-a51bb6bf.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-69f813f6.system.entry.js → p-a526fa66.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-69f813f6.system.entry.js.map → p-a526fa66.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-936c9fa5.system.entry.js → p-a6781789.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-936c9fa5.system.entry.js.map → p-a6781789.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-89864e7a.system.entry.js → p-be67bcbf.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-89864e7a.system.entry.js.map → p-be67bcbf.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/p-c16b6ca4.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-e5338826.system.entry.js → p-c7a22e57.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-e5338826.system.entry.js.map → p-c7a22e57.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/p-d4afe7a5.entry.js +2 -0
- package/dist/verdocs-web-sdk/{p-6787c11e.entry.js.map → p-d4afe7a5.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-1d976e5e.entry.js → p-d5af4c62.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-1d976e5e.entry.js.map → p-d5af4c62.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-5648a6a6.entry.js → p-d5c00a37.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-5648a6a6.entry.js.map → p-d5c00a37.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-2b98b182.system.entry.js → p-d86dc6d1.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-2b98b182.system.entry.js.map → p-d86dc6d1.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-4fce2fbf.system.entry.js → p-da9f0046.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-4fce2fbf.system.entry.js.map → p-da9f0046.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-96eb4665.js → p-dbb4398c.js} +2 -2
- package/dist/verdocs-web-sdk/{p-96eb4665.js.map → p-dbb4398c.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-352d2017.system.entry.js → p-e7295a17.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-352d2017.system.entry.js.map → p-e7295a17.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/p-e76b4d24.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-e76b4d24.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-ee3deda1.entry.js → p-fa25cd77.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-ee3deda1.entry.js.map → p-fa25cd77.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/p-fcc3041d.js +2 -0
- package/dist/verdocs-web-sdk/p-fcc3041d.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +15 -17
- package/dist/cjs/utils-fae54b93.js.map +0 -1
- package/dist/custom-elements.json +0 -1123
- package/dist/esm/utils-f2bdefaa.js.map +0 -1
- package/dist/esm-es5/utils-f2bdefaa.js.map +0 -1
- package/dist/verdocs-web-sdk/p-2fe18d0b.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-2fe18d0b.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-40554b1a.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-40554b1a.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-6787c11e.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-7bccd90d.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-80e95049.js +0 -2
- package/dist/verdocs-web-sdk/p-80e95049.js.map +0 -1
- package/dist/verdocs-web-sdk/p-b00c8e00.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-f2d637b8.js +0 -2
- package/dist/verdocs-web-sdk/p-fed9fd2b.system.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"verdocs-sign.entry.cjs.js","mappings":";;;;;;;;;;;;;;AAAA,IAAI,SAAS,GAAG,CAACA,SAAI,IAAIA,SAAI,CAAC,SAAS,KAAK,UAAU,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;AACzF,IAAI,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;AAChH,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,EAAE,UAAU,OAAO,EAAE,MAAM,EAAE;AAC/D,QAAQ,SAAS,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;AACnG,QAAQ,SAAS,QAAQ,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;AACtG,QAAQ,SAAS,IAAI,CAAC,MAAM,EAAE,EAAE,MAAM,CAAC,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erdocsEndpoint","SDKError","Envelopes.getSigningSession","getEnvelopeById","EnvelopeStore","savePDF","Envelopes.updateEnvelopeField","updateEnvelopeFieldInitials","updateEnvelopeFieldSignature","isValidEmail","isValidPhone","getFieldId","fullNameToInitials","getRoleIndex","renderDocumentField","h","Host","Fragment"],"sources":["./node_modules/@verdocs/js-sdk/Envelopes/Recipients.js","./node_modules/@verdocs/js-sdk/Envelopes/Signatures.js","./node_modules/@verdocs/js-sdk/Envelopes/Initials.js","./src/components/embeds/verdocs-sign/verdocs-sign.scss?tag=verdocs-sign","./src/components/embeds/verdocs-sign/verdocs-sign.tsx"],"sourcesContent":["var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n/**\n * Update a recipient's status block\n */\nexport var updateRecipient = function (endpoint, envelopeId, roleName, params) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .put(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(roleName), params)\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Submit an envelope (signing is finished). Note that all fields must be valid/completed for this to succeed.\n */\nexport var envelopeRecipientSubmit = function (endpoint, envelopeId, roleName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'submit' });\n};\n/**\n * Decline to complete an envelope (signing will not terminated).\n */\nexport var envelopeRecipientDecline = function (endpoint, envelopeId, roleName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'decline' });\n};\n/**\n * Claim / change ownership of an envelope. This is a special-case operation only available in certain workflows.\n */\nexport var envelopeRecipientChangeOwner = function (endpoint, envelopeId, roleName, email, fullName) { return updateRecipient(endpoint, envelopeId, roleName, { action: 'owner_update', email: email, full_name: fullName }); };\n/**\n * Agree to electronic signing.\n */\nexport var envelopeRecipientAgree = function (endpoint, envelopeId, roleName, agreed) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'update', agreed: agreed });\n};\n/**\n * Change a recipient's name.\n */\nexport var envelopeRecipientUpdateName = function (endpoint, envelopeId, roleName, fullName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'update', new_full_name: fullName });\n};\n/**\n * Change a recipient's name.\n */\nexport var envelopeRecipientPrepare = function (endpoint, envelopeId, roleName, recipients) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'prepare', recipients: recipients });\n};\nexport var getSignerToken = function (endpoint, envelopeId, roleName) {\n return endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(encodeURIComponent(roleName), \"/signer-token\"))\n .then(function (r) { return r.data; });\n};\nexport var getInPersonLink = function (endpoint, envelopeId, roleName) {\n return endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(encodeURIComponent(roleName), \"?in_person_link=true\"))\n .then(function (r) { return r.data; });\n};\n","/**\n * Create a signature block. In a typical signing workflow, the user is asked at the beginning of the process to \"adopt\"\n * a signature block to be used for all signature fields in the document. Thus, this is typically called one time to\n * create and store a signature block. Thereafter, the ID of the signature block may be re-used for each signature field\n * to be \"stamped\" by the user.\n */\nexport var createSignature = function (endpoint, name, signature) {\n var data = new FormData();\n data.append('signature', signature, name);\n return endpoint.api //\n .post(\"/signatures\", data)\n .then(function (r) { return r.data; });\n};\n/**\n * Get the availbable signatures for a user.\n */\nexport var getSignatures = function (endpoint) {\n return endpoint.api //\n .get('/signatures')\n .then(function (r) { return r.data; });\n};\n/**\n * Get a user's signature by ID.\n */\nexport var getSignature = function (endpoint, signatureId) {\n return endpoint.api //\n .get(\"/signatures/\".concat(signatureId))\n .then(function (r) { return r.data; });\n};\n/**\n * Delete a user's signature.\n */\nexport var deleteSignature = function (endpoint, signatureId) {\n return endpoint.api //\n .delete(\"/signatures/\".concat(signatureId))\n .then(function (r) { return r.data; });\n};\n","/**\n * Create an initials block. In a typical signing workflow, the user is asked at the beginning of the process to \"adopt\"\n * an initials block to be used for all initials fields in the document. Thus, this is typically called one time to\n * create and store an initials block. Thereafter, the ID of the initials block may be re-used for each initials field\n * to be \"stamped\" by the user.\n */\nexport var createInitials = function (endpoint, name, initials) {\n var data = new FormData();\n data.append('initial', initials, name);\n return endpoint.api //\n .post(\"/initials\", data)\n .then(function (r) { return r.data; });\n};\n","@import '../../../theme.scss';\n\nverdocs-sign {\n display: flex;\n overflow: hidden;\n position: relative;\n min-height: 600px;\n flex-direction: column;\n box-sizing: border-box;\n font-family: $verdocs-primary-font;\n\n div {\n display: block;\n box-sizing: border-box;\n }\n\n input {\n vertical-align: top;\n }\n\n .header {\n flex: 0;\n display: flex;\n z-index: 1000;\n align-items: center;\n transition: all 0.25s;\n justify-content: center;\n background-color: $medium-bg;\n box-shadow: 0 4px 4px 0 rgb(0 0 0 / 24%), 0 0 4px 0 rgb(0 0 0 / 12%);\n\n .inner {\n width: 100%;\n max-width: 1028px;\n }\n }\n\n .intro {\n width: 100%;\n height: 60px;\n display: flex;\n background: #ffffff;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n\n .inner {\n width: 100%;\n color: #111111;\n padding: 0 14px;\n font-size: 20px;\n font-weight: 500;\n line-height: 28px;\n max-width: 1024px;\n }\n }\n\n &.agreed {\n .intro {\n //display: none;\n }\n }\n\n .toolbar {\n width: 100%;\n margin: 0 auto;\n padding: 0 14px;\n position: relative;\n }\n\n .tools {\n width: 100%;\n color: #fff;\n height: 56px;\n display: flex;\n font-size: 12px;\n align-items: center;\n flex-direction: row;\n background-color: $medium-bg;\n\n .logo {\n width: 77.5px;\n margin: -6px 0 0 5px;\n }\n\n .title {\n padding-left: 16px;\n font-size: 18px;\n font-weight: 500;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n }\n\n .cover {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 999;\n position: absolute;\n background: rgba(0, 0, 0, 0.5);\n }\n\n .document {\n flex: 1;\n height: 100%;\n display: flex;\n padding: 15px;\n row-gap: 15px;\n min-height: 200px;\n position: relative;\n overflow-y: scroll;\n align-items: center;\n box-sizing: border-box;\n flex-direction: column;\n justify-content: center;\n\n .inner {\n width: 100%;\n max-width: 1028px;\n }\n }\n\n .agree {\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0 15px;\n\n .intro {\n display: none;\n }\n\n .header {\n flex: 0 0 56px;\n }\n }\n}\n\n@media print {\n verdocs-sign .header {\n display: none;\n }\n}\n","import {VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Envelopes} from '@verdocs/js-sdk/Envelopes';\nimport {createInitials} from '@verdocs/js-sdk/Envelopes/Initials';\nimport {createSignature} from '@verdocs/js-sdk/Envelopes/Signatures';\nimport {IDocumentField, IEnvelope, IRecipient} from '@verdocs/js-sdk/Envelopes/Types';\nimport {envelopeRecipientAgree, envelopeRecipientDecline, envelopeRecipientSubmit} from '@verdocs/js-sdk/Envelopes/Recipients';\nimport {isValidEmail, isValidPhone} from '@verdocs/js-sdk/Templates/Validators';\nimport {Event, EventEmitter, Host, Fragment, Component, Prop, State, h} from '@stencil/core';\nimport {updateEnvelopeFieldInitials, updateEnvelopeFieldSignature} from '@verdocs/js-sdk/Envelopes/Envelopes';\nimport {fullNameToInitials, getFieldId, getRoleIndex, renderDocumentField, savePDF} from '../../../utils/utils';\nimport {getEnvelopeById} from '../../../utils/Envelopes';\nimport EnvelopeStore from '../../../utils/envelopeStore';\nimport {IDocumentPageInfo} from '../../../utils/Types';\nimport {SDKError} from '../../../utils/errors';\n\nconst PrintIcon = `<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z\"></path></svg>`;\n\nconst DownloadIcon = `<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z\"></path></svg>`;\n\n/**\n * Display an envelope signing experience. This will display the envelope's attached\n * documents with signing fields overlaid on each page.\n *\n * The component will attempt to initiate a signing session and load the specified\n * envelope. If successful, the recipient's fields will be enabled and the user will\n * be able to sign the envelope's attached documents. If not, an `sdkError` will be\n * thrown and the component will be blank/empty. To provide the best user experience,\n * applications should capture and handle this error to provide the user with\n * instructions/options for next steps based on the application's design and workflow.\n *\n * Unlike other components, this will always create its own endpoint to manage the\n * session session. This endpoint will be included in event callbacks for the\n * convenience of host applications that may wish to make server calls using the\n * signer's credentials once signing is complete (e.g. to obtain copies of\n * the signed attachments.)\n */\n@Component({\n tag: 'verdocs-sign',\n styleUrl: 'verdocs-sign.scss',\n shadow: false,\n})\nexport class VerdocsSign {\n endpoint: VerdocsEndpoint = null;\n\n /**\n * The ID of the envelope to sign.\n */\n @Prop() envelopeId: string | null = null;\n\n /**\n * The ID of the role that will be signing e.g. 'Recipient 1'\n */\n @Prop() roleId: string | null = null;\n\n /**\n * The invite code for the signer.\n */\n @Prop() inviteCode: string | null = null;\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.\n */\n @Event({composed: true}) envelopeLoaded: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope}>;\n\n /**\n * Event fired when the envelope is updated in any way.\n */\n @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n @State() recipient: IRecipient | null = null;\n @State() signerToken = null;\n // @State() envelope: IEnvelope | null = null;\n // @State() fields: IDocumentField[] = [];\n @State() hasSignature = false;\n @State() nextButtonLabel = 'Start';\n @State() nextSubmits = false;\n @State() errorMessage = '';\n @State() focusedField = '';\n @State() isDone = false;\n @State() showDone = false;\n\n @State() finishLater = false;\n @State() showFinishLater = false;\n\n recipientIndex: number = -1;\n fields: IDocumentField[] = [];\n\n componentWillLoad() {\n this.endpoint = new VerdocsEndpoint({sessionType: 'signing'});\n }\n\n async componentDidLoad() {\n if (!this.envelopeId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required envelopId', 500, ''));\n return;\n }\n\n if (!this.roleId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required roleId', 500, ''));\n return;\n }\n\n if (!this.inviteCode) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required inviteCode', 500, ''));\n return;\n }\n\n try {\n console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);\n const {session, recipient, signerToken} = await Envelopes.getSigningSession(this.endpoint, {\n envelopeId: this.envelopeId,\n roleId: this.roleId,\n inviteCode: this.inviteCode,\n });\n\n console.log(`[SIGN] Loaded signing session ${session.email} / ${session.profile_id}`);\n\n this.recipient = recipient;\n this.signerToken = signerToken;\n this.endpoint.setToken(signerToken);\n\n if (this.recipient.agreed) {\n this.nextButtonLabel = 'Next';\n }\n\n await getEnvelopeById(this.endpoint, this.envelopeId);\n // const envelope = await Envelopes.getEnvelope(this.endpoint, this.envelopeId);\n // this.envelope = envelope;\n // console.log('[SIGN] Loaded envelope', envelope);\n\n this.recipientIndex = EnvelopeStore.envelope.recipients.findIndex(recipient => recipient.role_name == this.roleId);\n if (this.recipientIndex > -1) {\n this.recipient = EnvelopeStore.envelope.recipients[this.recipientIndex];\n this.fields = this.recipient.fields;\n }\n\n this.isDone = ['submitted', 'canceled', 'declined'].includes(this.recipient.status);\n console.log('Done', this.isDone);\n\n // TODO: Fix service to allow this?\n // const sigs = await getSignatures();\n // console.log('sigs', sigs);\n\n this.envelopeLoaded?.emit({endpoint: this.endpoint, envelope: EnvelopeStore.envelope});\n } catch (e) {\n console.log('Error with signing session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n handleClickAgree() {\n envelopeRecipientAgree(this.endpoint, this.envelopeId, this.roleId, true)\n .then(r => {\n this.nextButtonLabel = 'Next';\n this.recipient = r;\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: EnvelopeStore.envelope, event: 'agreed'});\n })\n .catch(e => {\n console.log('Update failure', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleOptionSelected(e) {\n switch (e.detail.id) {\n case 'later':\n this.finishLater = true;\n this.showFinishLater = true;\n // this.router.navigate([`view/sign/${this.envelopeId}/role/${this.roleName}/saved`]);\n // if (!window?.['STORYBOOK_ENV']) {\n // window.alert('User intends to sign later.');\n // }\n break;\n case 'claim':\n break;\n case 'decline':\n {\n const declineResult = await envelopeRecipientDecline(this.endpoint, this.envelopeId, this.roleId);\n console.log('Decline result', declineResult);\n this.isDone = true;\n }\n break;\n case 'print':\n window.print();\n break;\n case 'download':\n savePDF(this.endpoint, EnvelopeStore.envelope, EnvelopeStore.envelope.envelope_document_id).catch(() => {});\n break;\n }\n }\n\n saveFieldChange(fieldName: string, fields: Record<string, any>) {\n Envelopes.updateEnvelopeField(this.endpoint, this.envelopeId, fieldName, fields) //\n .catch(e => {\n if (e.response?.status === 401 && e.response?.data?.error === 'jwt expired') {\n // TODO: Do we want to improve the instructions here?\n console.log('[SIGN] Signing session expired');\n this.errorMessage = 'Signing session expired.';\n } else {\n console.log('[SIGN] Server error', e);\n }\n\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleFieldChange(field: IDocumentField, e: any) {\n console.log('fieldChange', field, e, e.target.value);\n const {value, checked} = e.target;\n\n switch (field.type) {\n case 'textbox':\n return this.saveFieldChange(field.name, {prepared: false, value});\n\n case 'checkbox_group': {\n const options = field.settings.options.map(option => ({id: option.id, checked: e.target.checked}));\n return this.saveFieldChange(field.name, {prepared: false, value: {options}});\n }\n\n case 'radio_button_group': {\n const options = field.settings.options.map(option => ({id: option.id, selected: e.target.value === option.id}));\n return this.saveFieldChange(field.name, {prepared: false, value: {options}});\n }\n\n case 'dropdown':\n return this.saveFieldChange(field.name, {prepared: false, value: e.detail});\n\n case 'initial':\n const initialsBlob = await (await fetch(e.detail)).blob();\n return createInitials(this.endpoint, 'initial', initialsBlob) //\n .then(newInitials => {\n console.log('New initials', field.name, newInitials);\n updateEnvelopeFieldInitials(this.endpoint, this.envelopeId, field.name, newInitials.id);\n });\n\n case 'signature':\n const signatureBlob = await (await fetch(e.detail)).blob();\n return createSignature(this.endpoint, 'signature', signatureBlob) //\n .then(newSignature => {\n console.log('New sign', field.name, newSignature);\n updateEnvelopeFieldSignature(this.endpoint, this.envelopeId, field.name, newSignature.id);\n });\n\n case 'date':\n const iso = e.target.getAttribute('iso');\n return this.saveFieldChange(field.name, {prepared: false, value: iso});\n\n case 'timestamp':\n console.log('Updating timestamp', {value, ts: e.target.getAttribute('timestamp')});\n break;\n\n default:\n console.log('Unhandled field update', {value, checked}, field);\n break;\n }\n }\n\n isFieldValid(field: IDocumentField) {\n const {required = false} = field;\n const {result = '', value = '', base64 = ''} = field.settings || {};\n switch (field.type) {\n case 'textbox':\n switch (field.settings?.validator || '') {\n case 'email':\n return isValidEmail(result);\n case 'phone':\n return isValidPhone(result);\n default:\n return !required || result !== '';\n }\n\n case 'signature':\n case 'initial':\n return !required || base64 !== '';\n\n // Timestamp fields get automatically filled when the envelope is submitted.\n case 'timestamp':\n return true;\n\n case 'textarea':\n case 'date':\n case 'attachment':\n return !required || result !== '';\n\n case 'dropdown':\n return !required || value !== '';\n\n case 'checkbox_group':\n const checkedCount = (field.settings?.options?.filter(option => option.checked) || []).length;\n return !required || (checkedCount >= (field.settings?.minimum_checked || 0) && checkedCount <= (field.settings?.maximum_checked || 999));\n\n case 'radio_button_group':\n return !required || (field.settings?.options?.filter(option => option.selected) || []).length > 0;\n // TODO\n // case 'checkbox':\n // return <verdocs-field-checkbox style={style} value={result || ''} id={id} />;\n // case 'payment':\n // return <verdocs-field-payment style={style} field={field} id={id} />;\n default:\n return false;\n }\n }\n\n async handleNext() {\n if (this.nextSubmits) {\n try {\n const result = await envelopeRecipientSubmit(this.endpoint, this.envelopeId, this.roleId);\n console.log('[SIGN] Submitted successfully', result);\n this.showDone = true;\n this.isDone = true;\n // updateRecipientStatus()\n } catch (e) {\n console.log('Error submitting', e);\n }\n return;\n // You're done.\n // You can access the Verdoc at any time by clicking on the link from invitation email.\n //\n // After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.\n //\n // Thank you for using Verdocs.\n // Got it, thanks\n }\n\n // Find and focus the next incomplete required field\n const requiredFields = this.fields.filter(field => field.required);\n const focusedIndex = requiredFields.findIndex(field => field.name === this.focusedField);\n\n let nextFocusedIndex = focusedIndex + 1;\n if (nextFocusedIndex >= requiredFields.length) {\n nextFocusedIndex = 0;\n }\n\n let nextRequiredField = requiredFields[nextFocusedIndex];\n\n // Skip signature and initial fields that are already filled in. We have to count our \"skips\" just in case, to avoid infinite loops.\n let skips = 0;\n if (skips < requiredFields.length && ['signature', 'initial'].includes(nextRequiredField.type) && nextRequiredField.settings?.result === 'signed') {\n skips++;\n nextFocusedIndex++;\n if (nextFocusedIndex >= requiredFields.length) {\n nextFocusedIndex = 0;\n }\n nextRequiredField = requiredFields[nextFocusedIndex];\n }\n\n if (skips >= requiredFields.length) {\n nextRequiredField = null;\n }\n\n if (nextRequiredField) {\n const id = getFieldId(nextRequiredField);\n const el = document.getElementById(id) as any;\n el?.focusField();\n this.focusedField = nextRequiredField.name;\n }\n }\n\n // See if everything that \"needs to be\" filled in is, and all \"fillable fields\" are valid\n checkRecipientFields() {\n const someFieldsInvalid = this.recipient.fields.map(field => this.isFieldValid(field)).some(fieldValid => !fieldValid);\n console.log({someFieldsInvalid});\n if (!someFieldsInvalid) {\n this.nextButtonLabel = 'Finish';\n this.nextSubmits = true;\n } else {\n this.nextSubmits = false;\n }\n }\n\n attachFieldAttributes(pageInfo, field, roleIndex, el) {\n el.addEventListener('input', e => this.handleFieldChange(field, e).finally(() => this.checkRecipientFields()));\n el.addEventListener('fieldChange', e => this.handleFieldChange(field, e).finally(() => this.checkRecipientFields()));\n\n el.setAttribute('roleindex', roleIndex);\n el.setAttribute('xScale', pageInfo.xScale);\n el.setAttribute('yScale', pageInfo.yScale);\n el.setAttribute('initials', this.recipient ? fullNameToInitials(this.recipient.full_name) : '');\n el.setAttribute('name', this.recipient?.full_name || '');\n }\n\n handlePageRendered(e) {\n const pageInfo = e.detail as IDocumentPageInfo;\n const roleIndex = getRoleIndex(EnvelopeStore.roleNames, this.recipient.role_name);\n const recipientFields = this.recipient.fields.filter(field => field.page === pageInfo.pageNumber);\n console.log('[SIGN] Page rendered, adding fields', {pageInfo, roleIndex, recipientFields});\n\n recipientFields.forEach(field => {\n const el = renderDocumentField(field, pageInfo, roleIndex, {disabled: false, editable: false, draggable: false, done: this.isDone});\n console.log('rendered', el);\n if (!el) {\n return;\n }\n\n if (Array.isArray(el)) {\n el.map(e => this.attachFieldAttributes(pageInfo, field, roleIndex, e));\n } else {\n this.attachFieldAttributes(pageInfo, field, roleIndex, el);\n }\n\n // interact(el).draggable({\n // listeners: {\n // start(event) {\n // console.log('[FIELDS] Drag started', event.type, event.target);\n // },\n // move(event) {\n // const oldX = +(event.target.getAttribute('posX') || 0);\n // const oldY = +(event.target.getAttribute('posY') || 0);\n // const xScale = +(event.target.getAttribute('xScale') || 1);\n // const yScale = +(event.target.getAttribute('yScale') || 1);\n // const newX = event.dx / xScale + oldX;\n // const newY = event.dy / yScale + oldY;\n // event.target.setAttribute('posX', newX);\n // event.target.setAttribute('posy', newY);\n // updateCssTransform(event.target, 'translate', `${newX}px, ${newY}px`);\n // },\n // end(event) {\n // console.log('[FIELDS] Drag ended', event);\n // // event.target.setAttribute('posX', 0);\n // // event.target.setAttribute('posy', 0);\n // // updateCssTransform(event.target, 'translate', `${0}px, ${0}px`);\n // },\n // },\n // });\n });\n\n // Render fields for \"the other\" recipients\n EnvelopeStore.envelope.recipients\n .filter(recipient => recipient.role_name !== this.recipient.role_name)\n .map(otherRecipient => {\n const otherRoleIndex = getRoleIndex(EnvelopeStore.roleNames, otherRecipient.role_name);\n const recipientFields = otherRecipient.fields.filter(field => field.page === pageInfo.pageNumber);\n // const fields = this.fields.filter(field => field.page_sequence === pageInfo.renderedPage.pageNumber);\n recipientFields.forEach(field => {\n const el = renderDocumentField(field, pageInfo, otherRoleIndex, {disabled: true, editable: false, draggable: false, done: this.isDone});\n if (!el) {\n return;\n }\n\n el.setAttribute('roleindex', otherRoleIndex);\n el.setAttribute('xScale', pageInfo.xScale);\n el.setAttribute('yScale', pageInfo.yScale);\n });\n });\n\n this.checkRecipientFields();\n }\n\n render() {\n if (EnvelopeStore.loading || !EnvelopeStore.envelope) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n const menuOptions = [\n {id: 'later', label: 'Finish Later'}, //\n // {id: 'claim', label: 'Claim the Document', disabled: true},\n {id: 'decline', label: 'Decline to Sign'},\n {id: 'print', label: 'Print Without Signing', disabled: true},\n {id: 'download', label: 'Download'},\n ];\n\n return (\n <Host class={{agreed: this.recipient?.agreed}}>\n {!this.isDone && !this.finishLater && (\n <div class=\"intro\">\n <div class=\"inner\">Please review and act on these documents.</div>\n </div>\n )}\n\n <div class=\"header\">\n <div class=\"inner\">\n <div class=\"toolbar\">\n <div class=\"tools\">\n {!this.isDone && !this.finishLater && <verdocs-dropdown options={menuOptions} onOptionSelected={e => this.handleOptionSelected(e)} />}\n\n {!this.recipient?.agreed ? (\n <div class=\"agree\">\n <verdocs-checkbox name=\"agree\" label=\"I agree to use electronic records and signatures.\" onInput={() => this.handleClickAgree()} />\n </div>\n ) : (\n <Fragment>\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{EnvelopeStore.envelope.name}</div>\n <div style={{flex: '1'}} />\n <div innerHTML={PrintIcon} style={{width: '24px', height: '24px', fill: '#ffffff', cursor: 'pointer'}} onClick={() => window.print()} />\n <div\n innerHTML={DownloadIcon}\n style={{width: '24px', height: '24px', fill: '#ffffff', cursor: 'pointer', marginLeft: '16px', maginRight: '30px'}}\n onClick={() => savePDF(this.endpoint, EnvelopeStore.envelope, EnvelopeStore.envelope.envelope_document_id).catch(() => {})}\n />\n </Fragment>\n )}\n\n {!this.isDone && !this.finishLater && (\n <verdocs-button size=\"small\" label={this.nextButtonLabel} disabled={!this.recipient?.agreed} onClick={() => this.handleNext()} />\n )}\n </div>\n </div>\n </div>\n </div>\n\n {!this.isDone && !this.recipient?.agreed ? <div class=\"cover\" /> : <div style={{display: 'none'}} />}\n\n <div class=\"document\">\n {(EnvelopeStore.envelope.documents || []).map(envelopeDocument => {\n const pages = [...(envelopeDocument?.pages || [])];\n pages.sort((a, b) => a.sequence - b.sequence);\n\n return (\n <Fragment>\n {pages.map(page => (\n <verdocs-document-page\n pageImageUri={page.display_uri}\n virtualWidth={612}\n virtualHeight={792}\n pageNumber={page.sequence}\n onPageRendered={e => this.handlePageRendered(e)}\n layers={[\n {name: 'page', type: 'canvas'},\n {name: 'controls', type: 'div'},\n ]}\n />\n ))}\n </Fragment>\n );\n })}\n </div>\n\n {this.showFinishLater && (\n <verdocs-ok-dialog\n heading=\"You've saved your document to finish later.\"\n message=\"To complete the document, use the link in the original email notification inviting you to review and finish the document.\"\n onNext={() => (this.showFinishLater = false)}\n />\n )}\n\n {this.errorMessage && <verdocs-ok-dialog heading=\"Network Error\" message={this.errorMessage} onNext={() => (this.errorMessage = '')} />}\n {this.showDone && (\n <verdocs-ok-dialog\n heading=\"You're Done!\"\n message=\"You can access the Verdoc at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.\"\n onNext={() => (this.showDone = false)}\n />\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"verdocs-sign.entry.cjs.js","mappings":";;;;;;;;;;;;;;AAAA,IAAI,SAAS,GAAG,CAACA,SAAI,IAAIA,SAAI,CAAC,SAAS,KAAK,UAAU,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;AACzF,IA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AQ,EAAC;UAC9B,EAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAC;SAChC,GACD,CACH,CAAC,CACO,EACX;KACH,CAAC,CACE,EAEL,IAAI,CAAC,eAAe,KACnBA,+BACE,OAAO,EAAC,6CAA6C,EACrD,OAAO,EAAC,2HAA2H,EACnI,MAAM,EAAE,OAAO,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,GAC5C,CACH,EAEA,IAAI,CAAC,YAAY,IAAIA,+BAAmB,OAAO,EAAC,eAAe,EAAC,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,GAAI,EACtI,IAAI,CAAC,QAAQ,KACZA,+BACE,OAAO,EAAC,cAAc,EACtB,OAAO,EAAC,uOAAuO,EAC/O,MAAM,EAAE,OAAO,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,GACrC,CACH,CACI,EACP;GACH;;;;;;","names":["this","VerdocsEndpoint","SDKError","Envelopes.getSigningSession","getEnvelopeById","EnvelopeStore","savePDF","Envelopes.updateEnvelopeField","updateEnvelopeFieldInitials","updateEnvelopeFieldSignature","isValidEmail","isValidPhone","getFieldId","fullNameToInitials","getRoleIndex","renderDocumentField","h","Host","Fragment"],"sources":["./node_modules/@verdocs/js-sdk/Envelopes/Recipients.js","./node_modules/@verdocs/js-sdk/Envelopes/Signatures.js","./node_modules/@verdocs/js-sdk/Envelopes/Initials.js","./src/components/embeds/verdocs-sign/verdocs-sign.scss?tag=verdocs-sign","./src/components/embeds/verdocs-sign/verdocs-sign.tsx"],"sourcesContent":["var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n/**\n * Update a recipient's status block\n */\nexport var updateRecipient = function (endpoint, envelopeId, roleName, params) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .put(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(roleName), params)\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Submit an envelope (signing is finished). Note that all fields must be valid/completed for this to succeed.\n */\nexport var envelopeRecipientSubmit = function (endpoint, envelopeId, roleName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'submit' });\n};\n/**\n * Decline to complete an envelope (signing will not terminated).\n */\nexport var envelopeRecipientDecline = function (endpoint, envelopeId, roleName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'decline' });\n};\n/**\n * Claim / change ownership of an envelope. This is a special-case operation only available in certain workflows.\n */\nexport var envelopeRecipientChangeOwner = function (endpoint, envelopeId, roleName, email, fullName) { return updateRecipient(endpoint, envelopeId, roleName, { action: 'owner_update', email: email, full_name: fullName }); };\n/**\n * Agree to electronic signing.\n */\nexport var envelopeRecipientAgree = function (endpoint, envelopeId, roleName, agreed) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'update', agreed: agreed });\n};\n/**\n * Change a recipient's name.\n */\nexport var envelopeRecipientUpdateName = function (endpoint, envelopeId, roleName, fullName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'update', new_full_name: fullName });\n};\n/**\n * Change a recipient's name.\n */\nexport var envelopeRecipientPrepare = function (endpoint, envelopeId, roleName, recipients) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'prepare', recipients: recipients });\n};\nexport var getSignerToken = function (endpoint, envelopeId, roleName) {\n return endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(encodeURIComponent(roleName), \"/signer-token\"))\n .then(function (r) { return r.data; });\n};\nexport var getInPersonLink = function (endpoint, envelopeId, roleName) {\n return endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(encodeURIComponent(roleName), \"?in_person_link=true\"))\n .then(function (r) { return r.data; });\n};\n","/**\n * Create a signature block. In a typical signing workflow, the user is asked at the beginning of the process to \"adopt\"\n * a signature block to be used for all signature fields in the document. Thus, this is typically called one time to\n * create and store a signature block. Thereafter, the ID of the signature block may be re-used for each signature field\n * to be \"stamped\" by the user.\n */\nexport var createSignature = function (endpoint, name, signature) {\n var data = new FormData();\n data.append('signature', signature, name);\n return endpoint.api //\n .post(\"/signatures\", data)\n .then(function (r) { return r.data; });\n};\n/**\n * Get the availbable signatures for a user.\n */\nexport var getSignatures = function (endpoint) {\n return endpoint.api //\n .get('/signatures')\n .then(function (r) { return r.data; });\n};\n/**\n * Get a user's signature by ID.\n */\nexport var getSignature = function (endpoint, signatureId) {\n return endpoint.api //\n .get(\"/signatures/\".concat(signatureId))\n .then(function (r) { return r.data; });\n};\n/**\n * Delete a user's signature.\n */\nexport var deleteSignature = function (endpoint, signatureId) {\n return endpoint.api //\n .delete(\"/signatures/\".concat(signatureId))\n .then(function (r) { return r.data; });\n};\n","/**\n * Create an initials block. In a typical signing workflow, the user is asked at the beginning of the process to \"adopt\"\n * an initials block to be used for all initials fields in the document. Thus, this is typically called one time to\n * create and store an initials block. Thereafter, the ID of the initials block may be re-used for each initials field\n * to be \"stamped\" by the user.\n */\nexport var createInitials = function (endpoint, name, initials) {\n var data = new FormData();\n data.append('initial', initials, name);\n return endpoint.api //\n .post(\"/initials\", data)\n .then(function (r) { return r.data; });\n};\n","@import '../../../theme.scss';\n\nverdocs-sign {\n display: flex;\n overflow: hidden;\n position: relative;\n min-height: 600px;\n flex-direction: column;\n box-sizing: border-box;\n font-family: $verdocs-primary-font;\n\n div {\n display: block;\n box-sizing: border-box;\n }\n\n input {\n vertical-align: top;\n }\n\n .header {\n flex: 0;\n display: flex;\n z-index: 1000;\n align-items: center;\n transition: all 0.25s;\n justify-content: center;\n background-color: $medium-bg;\n box-shadow: 0 4px 4px 0 rgb(0 0 0 / 24%), 0 0 4px 0 rgb(0 0 0 / 12%);\n\n .inner {\n width: 100%;\n max-width: 1028px;\n }\n }\n\n .intro {\n width: 100%;\n height: 60px;\n display: flex;\n background: #ffffff;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n\n .inner {\n width: 100%;\n color: #111111;\n padding: 0 14px;\n font-size: 20px;\n font-weight: 500;\n line-height: 28px;\n max-width: 1024px;\n }\n }\n\n &.agreed {\n .intro {\n //display: none;\n }\n }\n\n .toolbar {\n width: 100%;\n margin: 0 auto;\n padding: 0 14px;\n position: relative;\n }\n\n .tools {\n width: 100%;\n color: #fff;\n height: 56px;\n display: flex;\n font-size: 12px;\n align-items: center;\n flex-direction: row;\n background-color: $medium-bg;\n\n .logo {\n width: 77.5px;\n margin: -6px 0 0 5px;\n }\n\n .title {\n padding-left: 16px;\n font-size: 18px;\n font-weight: 500;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n }\n\n .cover {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 999;\n position: absolute;\n background: rgba(0, 0, 0, 0.5);\n }\n\n .document {\n flex: 1;\n height: 100%;\n display: flex;\n padding: 15px;\n row-gap: 15px;\n min-height: 200px;\n position: relative;\n overflow-y: scroll;\n align-items: center;\n box-sizing: border-box;\n flex-direction: column;\n justify-content: center;\n\n .inner {\n width: 100%;\n max-width: 1028px;\n }\n }\n\n .agree {\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0 15px;\n\n .intro {\n display: none;\n }\n\n .header {\n flex: 0 0 56px;\n }\n }\n}\n\n@media print {\n verdocs-sign .header {\n display: none;\n }\n}\n","import {VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Envelopes} from '@verdocs/js-sdk/Envelopes';\nimport {createInitials} from '@verdocs/js-sdk/Envelopes/Initials';\nimport {createSignature} from '@verdocs/js-sdk/Envelopes/Signatures';\nimport {IDocumentField, IEnvelope, IRecipient} from '@verdocs/js-sdk/Envelopes/Types';\nimport {envelopeRecipientAgree, envelopeRecipientDecline, envelopeRecipientSubmit} from '@verdocs/js-sdk/Envelopes/Recipients';\nimport {isValidEmail, isValidPhone} from '@verdocs/js-sdk/Templates/Validators';\nimport {Event, EventEmitter, Host, Fragment, Component, Prop, State, h} from '@stencil/core';\nimport {updateEnvelopeFieldInitials, updateEnvelopeFieldSignature} from '@verdocs/js-sdk/Envelopes/Envelopes';\nimport {fullNameToInitials, getFieldId, getRoleIndex, renderDocumentField, savePDF} from '../../../utils/utils';\nimport {getEnvelopeById} from '../../../utils/Envelopes';\nimport EnvelopeStore from '../../../utils/envelopeStore';\nimport {IDocumentPageInfo} from '../../../utils/Types';\nimport {SDKError} from '../../../utils/errors';\n\nconst PrintIcon = `<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z\"></path></svg>`;\n\nconst DownloadIcon = `<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z\"></path></svg>`;\n\n/**\n * Display an envelope signing experience. This will display the envelope's attached\n * documents with signing fields overlaid on each page.\n *\n * The component will attempt to initiate a signing session and load the specified\n * envelope. If successful, the recipient's fields will be enabled and the user will\n * be able to sign the envelope's attached documents. If not, an `sdkError` will be\n * thrown and the component will be blank/empty. To provide the best user experience,\n * applications should capture and handle this error to provide the user with\n * instructions/options for next steps based on the application's design and workflow.\n *\n * Unlike other components, this will always create its own endpoint to manage the\n * session session. This endpoint will be included in event callbacks for the\n * convenience of host applications that may wish to make server calls using the\n * signer's credentials once signing is complete (e.g. to obtain copies of\n * the signed attachments.)\n */\n@Component({\n tag: 'verdocs-sign',\n styleUrl: 'verdocs-sign.scss',\n shadow: false,\n})\nexport class VerdocsSign {\n endpoint: VerdocsEndpoint = null;\n\n /**\n * The ID of the envelope to sign.\n */\n @Prop() envelopeId: string | null = null;\n\n /**\n * The ID of the role that will be signing e.g. 'Recipient 1'\n */\n @Prop() roleId: string | null = null;\n\n /**\n * The invite code for the signer.\n */\n @Prop() inviteCode: string | null = null;\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.\n */\n @Event({composed: true}) envelopeLoaded: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope}>;\n\n /**\n * Event fired when the envelope is updated in any way.\n */\n @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n @State() recipient: IRecipient | null = null;\n @State() signerToken = null;\n // @State() envelope: IEnvelope | null = null;\n // @State() fields: IDocumentField[] = [];\n @State() hasSignature = false;\n @State() nextButtonLabel = 'Start';\n @State() nextSubmits = false;\n @State() errorMessage = '';\n @State() focusedField = '';\n @State() isDone = false;\n @State() showDone = false;\n\n @State() finishLater = false;\n @State() showFinishLater = false;\n\n recipientIndex: number = -1;\n fields: IDocumentField[] = [];\n\n componentWillLoad() {\n this.endpoint = new VerdocsEndpoint({sessionType: 'signing'});\n }\n\n async componentDidLoad() {\n if (!this.envelopeId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required envelopId', 500, ''));\n return;\n }\n\n if (!this.roleId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required roleId', 500, ''));\n return;\n }\n\n if (!this.inviteCode) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required inviteCode', 500, ''));\n return;\n }\n\n try {\n console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);\n const {session, recipient, signerToken} = await Envelopes.getSigningSession(this.endpoint, {\n envelopeId: this.envelopeId,\n roleId: this.roleId,\n inviteCode: this.inviteCode,\n });\n\n console.log(`[SIGN] Loaded signing session ${session.email} / ${session.profile_id}`);\n\n this.recipient = recipient;\n this.signerToken = signerToken;\n this.endpoint.setToken(signerToken);\n\n if (this.recipient.agreed) {\n this.nextButtonLabel = 'Next';\n }\n\n await getEnvelopeById(this.endpoint, this.envelopeId);\n // const envelope = await Envelopes.getEnvelope(this.endpoint, this.envelopeId);\n // this.envelope = envelope;\n // console.log('[SIGN] Loaded envelope', envelope);\n\n this.recipientIndex = EnvelopeStore.envelope.recipients.findIndex(recipient => recipient.role_name == this.roleId);\n if (this.recipientIndex > -1) {\n this.recipient = EnvelopeStore.envelope.recipients[this.recipientIndex];\n this.fields = this.recipient.fields;\n }\n\n this.isDone = ['submitted', 'canceled', 'declined'].includes(this.recipient.status);\n console.log('Done', this.isDone);\n\n // TODO: Fix service to allow this?\n // const sigs = await getSignatures();\n // console.log('sigs', sigs);\n\n this.envelopeLoaded?.emit({endpoint: this.endpoint, envelope: EnvelopeStore.envelope});\n } catch (e) {\n console.log('Error with signing session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n handleClickAgree() {\n envelopeRecipientAgree(this.endpoint, this.envelopeId, this.roleId, true)\n .then(r => {\n this.nextButtonLabel = 'Next';\n this.recipient = r;\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: EnvelopeStore.envelope, event: 'agreed'});\n })\n .catch(e => {\n console.log('Update failure', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleOptionSelected(e) {\n switch (e.detail.id) {\n case 'later':\n this.finishLater = true;\n this.showFinishLater = true;\n // this.router.navigate([`view/sign/${this.envelopeId}/role/${this.roleName}/saved`]);\n // if (!window?.['STORYBOOK_ENV']) {\n // window.alert('User intends to sign later.');\n // }\n break;\n case 'claim':\n break;\n case 'decline':\n {\n const declineResult = await envelopeRecipientDecline(this.endpoint, this.envelopeId, this.roleId);\n console.log('Decline result', declineResult);\n this.isDone = true;\n }\n break;\n case 'print':\n window.print();\n break;\n case 'download':\n savePDF(this.endpoint, EnvelopeStore.envelope, EnvelopeStore.envelope.envelope_document_id).catch(() => {});\n break;\n }\n }\n\n saveFieldChange(fieldName: string, fields: Record<string, any>) {\n Envelopes.updateEnvelopeField(this.endpoint, this.envelopeId, fieldName, fields) //\n .catch(e => {\n if (e.response?.status === 401 && e.response?.data?.error === 'jwt expired') {\n // TODO: Do we want to improve the instructions here?\n console.log('[SIGN] Signing session expired');\n this.errorMessage = 'Signing session expired.';\n } else {\n console.log('[SIGN] Server error', e);\n }\n\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleFieldChange(field: IDocumentField, e: any) {\n console.log('fieldChange', field, e, e.target.value);\n const {value, checked} = e.target;\n\n switch (field.type) {\n case 'textbox':\n return this.saveFieldChange(field.name, {prepared: false, value});\n\n case 'checkbox_group': {\n const options = field.settings.options.map(option => ({id: option.id, checked: e.target.checked}));\n return this.saveFieldChange(field.name, {prepared: false, value: {options}});\n }\n\n case 'radio_button_group': {\n const options = field.settings.options.map(option => ({id: option.id, selected: e.target.value === option.id}));\n return this.saveFieldChange(field.name, {prepared: false, value: {options}});\n }\n\n case 'dropdown':\n return this.saveFieldChange(field.name, {prepared: false, value: e.detail});\n\n case 'initial':\n const initialsBlob = await (await fetch(e.detail)).blob();\n return createInitials(this.endpoint, 'initial', initialsBlob) //\n .then(newInitials => {\n console.log('New initials', field.name, newInitials);\n updateEnvelopeFieldInitials(this.endpoint, this.envelopeId, field.name, newInitials.id);\n });\n\n case 'signature':\n const signatureBlob = await (await fetch(e.detail)).blob();\n return createSignature(this.endpoint, 'signature', signatureBlob) //\n .then(newSignature => {\n console.log('New sign', field.name, newSignature);\n updateEnvelopeFieldSignature(this.endpoint, this.envelopeId, field.name, newSignature.id);\n });\n\n case 'date':\n const iso = e.target.getAttribute('iso');\n return this.saveFieldChange(field.name, {prepared: false, value: iso});\n\n case 'timestamp':\n console.log('Updating timestamp', {value, ts: e.target.getAttribute('timestamp')});\n break;\n\n default:\n console.log('Unhandled field update', {value, checked}, field);\n break;\n }\n }\n\n isFieldValid(field: IDocumentField) {\n const {required = false} = field;\n const {result = '', value = '', base64 = ''} = field.settings || {};\n switch (field.type) {\n case 'textbox':\n switch (field.settings?.validator || '') {\n case 'email':\n return isValidEmail(result);\n case 'phone':\n return isValidPhone(result);\n default:\n return !required || result !== '';\n }\n\n case 'signature':\n case 'initial':\n return !required || base64 !== '';\n\n // Timestamp fields get automatically filled when the envelope is submitted.\n case 'timestamp':\n return true;\n\n case 'textarea':\n case 'date':\n case 'attachment':\n return !required || result !== '';\n\n case 'dropdown':\n return !required || value !== '';\n\n case 'checkbox_group':\n const checkedCount = (field.settings?.options?.filter(option => option.checked) || []).length;\n return !required || (checkedCount >= (field.settings?.minimum_checked || 0) && checkedCount <= (field.settings?.maximum_checked || 999));\n\n case 'radio_button_group':\n return !required || (field.settings?.options?.filter(option => option.selected) || []).length > 0;\n // TODO\n // case 'checkbox':\n // return <verdocs-field-checkbox style={style} value={result || ''} id={id} />;\n // case 'payment':\n // return <verdocs-field-payment style={style} field={field} id={id} />;\n default:\n return false;\n }\n }\n\n async handleNext() {\n if (this.nextSubmits) {\n try {\n const result = await envelopeRecipientSubmit(this.endpoint, this.envelopeId, this.roleId);\n console.log('[SIGN] Submitted successfully', result);\n this.showDone = true;\n this.isDone = true;\n // updateRecipientStatus()\n } catch (e) {\n console.log('Error submitting', e);\n }\n return;\n // You're done.\n // You can access the Verdoc at any time by clicking on the link from invitation email.\n //\n // After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.\n //\n // Thank you for using Verdocs.\n // Got it, thanks\n }\n\n // Find and focus the next incomplete required field\n const requiredFields = this.fields.filter(field => field.required);\n const focusedIndex = requiredFields.findIndex(field => field.name === this.focusedField);\n\n let nextFocusedIndex = focusedIndex + 1;\n if (nextFocusedIndex >= requiredFields.length) {\n nextFocusedIndex = 0;\n }\n\n let nextRequiredField = requiredFields[nextFocusedIndex];\n\n // Skip signature and initial fields that are already filled in. We have to count our \"skips\" just in case, to avoid infinite loops.\n let skips = 0;\n if (skips < requiredFields.length && ['signature', 'initial'].includes(nextRequiredField.type) && nextRequiredField.settings?.result === 'signed') {\n skips++;\n nextFocusedIndex++;\n if (nextFocusedIndex >= requiredFields.length) {\n nextFocusedIndex = 0;\n }\n nextRequiredField = requiredFields[nextFocusedIndex];\n }\n\n if (skips >= requiredFields.length) {\n nextRequiredField = null;\n }\n\n if (nextRequiredField) {\n const id = getFieldId(nextRequiredField);\n const el = document.getElementById(id) as any;\n el?.focusField();\n this.focusedField = nextRequiredField.name;\n }\n }\n\n // See if everything that \"needs to be\" filled in is, and all \"fillable fields\" are valid\n checkRecipientFields() {\n const someFieldsInvalid = this.recipient.fields.map(field => this.isFieldValid(field)).some(fieldValid => !fieldValid);\n if (!someFieldsInvalid) {\n this.nextButtonLabel = 'Finish';\n this.nextSubmits = true;\n } else {\n this.nextSubmits = false;\n }\n }\n\n attachFieldAttributes(pageInfo, field, roleIndex, el) {\n el.addEventListener('input', e => this.handleFieldChange(field, e).finally(() => this.checkRecipientFields()));\n el.addEventListener('fieldChange', e => this.handleFieldChange(field, e).finally(() => this.checkRecipientFields()));\n\n el.setAttribute('roleindex', roleIndex);\n el.setAttribute('xScale', pageInfo.xScale);\n el.setAttribute('yScale', pageInfo.yScale);\n el.setAttribute('initials', this.recipient ? fullNameToInitials(this.recipient.full_name) : '');\n el.setAttribute('name', this.recipient?.full_name || '');\n }\n\n handlePageRendered(e) {\n const pageInfo = e.detail as IDocumentPageInfo;\n const roleIndex = getRoleIndex(EnvelopeStore.roleNames, this.recipient.role_name);\n const recipientFields = this.recipient.fields.filter(field => field.page === pageInfo.pageNumber);\n console.log('[SIGN] Page rendered, updating fields', {pageInfo, roleIndex, recipientFields});\n\n recipientFields.forEach(field => {\n const el = renderDocumentField(field, pageInfo, roleIndex, {disabled: false, editable: false, draggable: false, done: this.isDone});\n if (!el) {\n return;\n }\n\n if (Array.isArray(el)) {\n el.map(e => this.attachFieldAttributes(pageInfo, field, roleIndex, e));\n } else {\n this.attachFieldAttributes(pageInfo, field, roleIndex, el);\n }\n\n // interact(el).draggable({\n // listeners: {\n // start(event) {\n // console.log('[FIELDS] Drag started', event.type, event.target);\n // },\n // move(event) {\n // const oldX = +(event.target.getAttribute('posX') || 0);\n // const oldY = +(event.target.getAttribute('posY') || 0);\n // const xScale = +(event.target.getAttribute('xScale') || 1);\n // const yScale = +(event.target.getAttribute('yScale') || 1);\n // const newX = event.dx / xScale + oldX;\n // const newY = event.dy / yScale + oldY;\n // event.target.setAttribute('posX', newX);\n // event.target.setAttribute('posy', newY);\n // updateCssTransform(event.target, 'translate', `${newX}px, ${newY}px`);\n // },\n // end(event) {\n // console.log('[FIELDS] Drag ended', event);\n // // event.target.setAttribute('posX', 0);\n // // event.target.setAttribute('posy', 0);\n // // updateCssTransform(event.target, 'translate', `${0}px, ${0}px`);\n // },\n // },\n // });\n });\n\n // Render fields for \"the other\" recipients\n EnvelopeStore.envelope.recipients\n .filter(recipient => recipient.role_name !== this.recipient.role_name)\n .map(otherRecipient => {\n const otherRoleIndex = getRoleIndex(EnvelopeStore.roleNames, otherRecipient.role_name);\n const recipientFields = otherRecipient.fields.filter(field => field.page === pageInfo.pageNumber);\n // const fields = this.fields.filter(field => field.page_sequence === pageInfo.renderedPage.pageNumber);\n recipientFields.forEach(field => {\n const el = renderDocumentField(field, pageInfo, otherRoleIndex, {disabled: true, editable: false, draggable: false, done: this.isDone});\n if (!el) {\n return;\n }\n\n el.setAttribute('roleindex', otherRoleIndex);\n el.setAttribute('xScale', pageInfo.xScale);\n el.setAttribute('yScale', pageInfo.yScale);\n });\n });\n\n this.checkRecipientFields();\n }\n\n render() {\n if (EnvelopeStore.loading || !EnvelopeStore.envelope) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n const menuOptions = [\n {id: 'later', label: 'Finish Later'}, //\n // {id: 'claim', label: 'Claim the Document', disabled: true},\n {id: 'decline', label: 'Decline to Sign'},\n {id: 'print', label: 'Print Without Signing', disabled: true},\n {id: 'download', label: 'Download'},\n ];\n\n return (\n <Host class={{agreed: this.recipient?.agreed}}>\n {!this.isDone && !this.finishLater && (\n <div class=\"intro\">\n <div class=\"inner\">Please review and act on these documents.</div>\n </div>\n )}\n\n <div class=\"header\">\n <div class=\"inner\">\n <div class=\"toolbar\">\n <div class=\"tools\">\n {!this.isDone && !this.finishLater && <verdocs-dropdown options={menuOptions} onOptionSelected={e => this.handleOptionSelected(e)} />}\n\n {!this.recipient?.agreed ? (\n <div class=\"agree\">\n <verdocs-checkbox name=\"agree\" label=\"I agree to use electronic records and signatures.\" onInput={() => this.handleClickAgree()} />\n </div>\n ) : (\n <Fragment>\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{EnvelopeStore.envelope.name}</div>\n <div style={{flex: '1'}} />\n <div innerHTML={PrintIcon} style={{width: '24px', height: '24px', fill: '#ffffff', cursor: 'pointer'}} onClick={() => window.print()} />\n <div\n innerHTML={DownloadIcon}\n style={{width: '24px', height: '24px', fill: '#ffffff', cursor: 'pointer', marginLeft: '16px', maginRight: '30px'}}\n onClick={() => savePDF(this.endpoint, EnvelopeStore.envelope, EnvelopeStore.envelope.envelope_document_id).catch(() => {})}\n />\n </Fragment>\n )}\n\n {!this.isDone && !this.finishLater && (\n <verdocs-button size=\"small\" label={this.nextButtonLabel} disabled={!this.recipient?.agreed} onClick={() => this.handleNext()} />\n )}\n </div>\n </div>\n </div>\n </div>\n\n {!this.isDone && !this.recipient?.agreed ? <div class=\"cover\" /> : <div style={{display: 'none'}} />}\n\n <div class=\"document\">\n {(EnvelopeStore.envelope.documents || []).map(envelopeDocument => {\n const pages = [...(envelopeDocument?.pages || [])];\n pages.sort((a, b) => a.sequence - b.sequence);\n\n return (\n <Fragment>\n {pages.map(page => (\n <verdocs-document-page\n pageImageUri={page.display_uri}\n virtualWidth={612}\n virtualHeight={792}\n pageNumber={page.sequence}\n onPageRendered={e => this.handlePageRendered(e)}\n layers={[\n {name: 'page', type: 'canvas'},\n {name: 'controls', type: 'div'},\n ]}\n />\n ))}\n </Fragment>\n );\n })}\n </div>\n\n {this.showFinishLater && (\n <verdocs-ok-dialog\n heading=\"You've saved your document to finish later.\"\n message=\"To complete the document, use the link in the original email notification inviting you to review and finish the document.\"\n onNext={() => (this.showFinishLater = false)}\n />\n )}\n\n {this.errorMessage && <verdocs-ok-dialog heading=\"Network Error\" message={this.errorMessage} onNext={() => (this.errorMessage = '')} />}\n {this.showDone && (\n <verdocs-ok-dialog\n heading=\"You're Done!\"\n message=\"You can access the Verdoc at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.\"\n onNext={() => (this.showDone = false)}\n />\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -8,9 +8,9 @@ const Types = require('./Types-da57ce69.js');
|
|
|
8
8
|
const VerdocsEndpoint = require('./VerdocsEndpoint-a9bf9d59.js');
|
|
9
9
|
const errors = require('./errors-0396da3d.js');
|
|
10
10
|
const Colors = require('./Colors-e809dcc9.js');
|
|
11
|
-
const utils = require('./utils-
|
|
12
|
-
const templateStore = require('./templateStore-
|
|
13
|
-
const Templates$1 = require('./Templates-
|
|
11
|
+
const utils = require('./utils-aa1285cc.js');
|
|
12
|
+
const templateStore = require('./templateStore-a1ccccdb.js');
|
|
13
|
+
const Templates$1 = require('./Templates-805e8ffa.js');
|
|
14
14
|
require('./Token-576f0e8a.js');
|
|
15
15
|
require('./index-eb130f52.js');
|
|
16
16
|
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-1329d89c.js');
|
|
6
6
|
require('./Types-da57ce69.js');
|
|
7
7
|
const VerdocsEndpoint = require('./VerdocsEndpoint-a9bf9d59.js');
|
|
8
|
-
const utils = require('./utils-
|
|
9
|
-
const Envelopes = require('./Envelopes-
|
|
8
|
+
const utils = require('./utils-aa1285cc.js');
|
|
9
|
+
const Envelopes = require('./Envelopes-a9646e09.js');
|
|
10
10
|
const errors = require('./errors-0396da3d.js');
|
|
11
11
|
require('./Token-576f0e8a.js');
|
|
12
12
|
require('./index-eb130f52.js');
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// NOTE: This component does not have a story because it's not intended for external use.
|
|
2
2
|
import { h, Host } from '@stencil/core';
|
|
3
|
+
import { throttle } from '../../../utils/utils';
|
|
3
4
|
/**
|
|
4
5
|
* Represents one document page. This is primarily a layout container used to coordinate positions of
|
|
5
6
|
* page-related layers such as the page itself, signature fields, etc. It is not intended to be used
|
|
@@ -21,14 +22,14 @@ export class VerdocsDocumentPage {
|
|
|
21
22
|
this.skipFirstNotification = true;
|
|
22
23
|
}
|
|
23
24
|
componentDidLoad() {
|
|
24
|
-
this.resizeObserver = new ResizeObserver(entries => {
|
|
25
|
+
this.resizeObserver = new ResizeObserver(throttle(entries => {
|
|
25
26
|
for (const entry of entries) {
|
|
26
27
|
const renderedWidth = entry.contentRect.width;
|
|
27
28
|
this.renderedWidth = renderedWidth;
|
|
28
29
|
this.renderedHeight = this.virtualHeight * (renderedWidth / this.virtualWidth);
|
|
29
30
|
}
|
|
30
31
|
this.notifyRenderedSize();
|
|
31
|
-
});
|
|
32
|
+
}, 100));
|
|
32
33
|
this.resizeObserver.observe(this.container);
|
|
33
34
|
}
|
|
34
35
|
disconnectedCallback() {
|
|
@@ -47,7 +48,6 @@ export class VerdocsDocumentPage {
|
|
|
47
48
|
this.skipFirstNotification = false;
|
|
48
49
|
return;
|
|
49
50
|
}
|
|
50
|
-
console.log('Notyfing new size');
|
|
51
51
|
this.pageRendered.emit({
|
|
52
52
|
container: this.container,
|
|
53
53
|
containerId: this.containerId,
|
|
@@ -58,16 +58,25 @@ export class VerdocsDocumentPage {
|
|
|
58
58
|
renderedHeight: this.renderedHeight,
|
|
59
59
|
naturalWidth: this.naturalWidth,
|
|
60
60
|
naturalHeight: this.naturalHeight,
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
aspectRatio: this.aspectRatio,
|
|
62
|
+
xScale: this.renderedWidth / this.virtualWidth,
|
|
63
|
+
yScale: this.renderedHeight / this.virtualHeight,
|
|
63
64
|
});
|
|
64
65
|
}
|
|
65
66
|
render() {
|
|
66
67
|
const height = `${this.renderedHeight}px`;
|
|
67
68
|
return (h(Host, { id: `${this.containerId}`, style: { height } }, this.layers.map(layer => layer.type === 'div' ? (h("div", { class: "verdocs-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } })) : (h("img", { class: "verdocs-document-page-layer img", id: `${this.containerId}-${layer.name}`, src: this.pageImageUri, alt: `Page ${this.pageNumber}`, "aria-hidden": true, onLoad: (e) => {
|
|
69
|
+
// Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that
|
|
70
|
+
// useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).
|
|
71
|
+
// Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values
|
|
72
|
+
// for a field are based on the responsive Web view the Template editor was seeing. The IMG was scaled down there in the
|
|
73
|
+
// exact same way, so we just honor it. We capture the natural width and height here more as information. Then we use the
|
|
74
|
+
// aspect ratio to adjust the "virtual" height in case the page is not 8.5"x11".
|
|
75
|
+
// TODO: Store this in the DB with each page.
|
|
68
76
|
this.naturalWidth = e.target.naturalWidth;
|
|
69
77
|
this.naturalHeight = e.target.naturalHeight;
|
|
70
78
|
this.aspectRatio = this.naturalWidth / this.naturalHeight;
|
|
79
|
+
this.virtualHeight = this.virtualWidth / this.aspectRatio;
|
|
71
80
|
} })))));
|
|
72
81
|
}
|
|
73
82
|
static get is() { return "verdocs-document-page"; }
|
package/dist/collection/components/elements/verdocs-document-page/verdocs-document-page.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verdocs-document-page.js","sourceRoot":"","sources":["../../../../src/components/elements/verdocs-document-page/verdocs-document-page.tsx"],"names":[],"mappings":"AAAA,yFAAyF;AAEzF,OAAO,EAAC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,OAAO,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"verdocs-document-page.js","sourceRoot":"","sources":["../../../../src/components/elements/verdocs-document-page/verdocs-document-page.tsx"],"names":[],"mappings":"AAAA,yFAAyF;AAEzF,OAAO,EAAC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,OAAO,EAAC,MAAM,eAAe,CAAC;AAE5F,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAE9C;;;;GAIG;AAMH,MAAM,OAAO,mBAAmB;;wBAOC,EAAE;sBAMJ,CAAC;wBAMC,GAAG;yBAMF,GAAG;kBAcJ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAC,CAAC;uBAOxC,yBAAyB,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE;yBAE5D,IAAI,CAAC,YAAY;0BAChB,IAAI,CAAC,aAAa;wBACpB,IAAI,CAAC,YAAY;yBAChB,IAAI,CAAC,aAAa;uBACpB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,aAAa;iCAEpC,IAAI;;EAErC,gBAAgB;IACd,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CACtC,QAAQ,CAAC,OAAO,CAAC,EAAE;MACjB,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE;QAC3B,MAAM,aAAa,GAAG,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC;QAC9C,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,aAAa,GAAG,CAAC,aAAa,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC;OAChF;MAED,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC5B,CAAC,EAAE,GAAG,CAAC,CACR,CAAC;IAEF,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,I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EAAC,EAAE,EAAE,GAAG,IAAI,CAAC,WAAW,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,EAAC,MAAM,EAAC,GAAI,CACtG,CAAC,CAAC,CAAC,CACF,WACE,KAAK,EAAC,iCAAiC,EACvC,EAAE,EAAE,GAAG,IAAI,CAAC,WAAW,IAAI,KAAK,CAAC,IAAI,EAAE,EACvC,GAAG,EAAE,IAAI,CAAC,YAAY,EACtB,GAAG,EAAE,QAAQ,IAAI,CAAC,UAAU,EAAE,iBACjB,IAAI,EACjB,MAAM,EAAE,CAAC,CAAM,EAAE,EAAE;QACjB,4HAA4H;QAC5H,0HAA0H;QAC1H,yHAAyH;QACzH,wHAAwH;QACxH,yHAAyH;QACzH,gFAAgF;QAChF,6CAA6C;QAC7C,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;QAC1C,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QAC5C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC;QAC1D,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC;MAC5D,CAAC,GACD,CACH,CACF,CACI,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Element} from '@stencil/core';\nimport {IDocumentPageInfo, IPageLayer} from '../../../utils/Types';\nimport {throttle} from '../../../utils/utils';\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-document-page',\n styleUrl: 'verdocs-document-page.scss',\n shadow: false,\n})\nexport class VerdocsDocumentPage {\n @Element() container: HTMLElement;\n private resizeObserver: ResizeObserver;\n\n /**\n * The URL of the image to render as the page background.\n */\n @Prop() pageImageUri: string = '';\n\n /**\n * The page number being rendered. Not used internally, but included in callbacks/events beacuse page numbers\n * are used everywhere in document handling. (Reminder: page numbers are 1-based.)\n */\n @Prop() 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() 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\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\n @State() skipFirstNotification = true;\n\n componentDidLoad(): void {\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 disconnectedCallback() {\n this.resizeObserver?.disconnect();\n }\n\n // Left here for documentation purposes in case we find an edge case where this isn't true. But we apparently don't need this.\n // When we add the resize observer it will always be triggered at least once so notifying here as well is just a dupe.\n // componentDidRender() {\n // this.notifyRenderedSize();\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 this.pageRendered.emit({\n container: this.container,\n containerId: this.containerId,\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: this.renderedWidth / this.virtualWidth,\n yScale: this.renderedHeight / this.virtualHeight,\n });\n }\n\n render() {\n const height = `${this.renderedHeight}px`;\n\n return (\n <Host id={`${this.containerId}`} style={{height}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}} />\n ) : (\n <img\n class=\"verdocs-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageImageUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\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 }}\n />\n ),\n )}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -291,7 +291,6 @@ export class VerdocsSign {
|
|
|
291
291
|
// See if everything that "needs to be" filled in is, and all "fillable fields" are valid
|
|
292
292
|
checkRecipientFields() {
|
|
293
293
|
const someFieldsInvalid = this.recipient.fields.map(field => this.isFieldValid(field)).some(fieldValid => !fieldValid);
|
|
294
|
-
console.log({ someFieldsInvalid });
|
|
295
294
|
if (!someFieldsInvalid) {
|
|
296
295
|
this.nextButtonLabel = 'Finish';
|
|
297
296
|
this.nextSubmits = true;
|
|
@@ -314,10 +313,9 @@ export class VerdocsSign {
|
|
|
314
313
|
const pageInfo = e.detail;
|
|
315
314
|
const roleIndex = getRoleIndex(EnvelopeStore.roleNames, this.recipient.role_name);
|
|
316
315
|
const recipientFields = this.recipient.fields.filter(field => field.page === pageInfo.pageNumber);
|
|
317
|
-
console.log('[SIGN] Page rendered,
|
|
316
|
+
console.log('[SIGN] Page rendered, updating fields', { pageInfo, roleIndex, recipientFields });
|
|
318
317
|
recipientFields.forEach(field => {
|
|
319
318
|
const el = renderDocumentField(field, pageInfo, roleIndex, { disabled: false, editable: false, draggable: false, done: this.isDone });
|
|
320
|
-
console.log('rendered', el);
|
|
321
319
|
if (!el) {
|
|
322
320
|
return;
|
|
323
321
|
}
|