@verdocs/web-sdk 6.5.0-beta.35 → 6.5.0-beta.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/cjs/verdocs-download-dialog.verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.cjs.js.map +1 -1
  2. package/dist/cjs/verdocs-download-dialog_4.cjs.entry.js +3 -3
  3. package/dist/cjs/verdocs-sign.cjs.entry.js +9 -11
  4. package/dist/cjs/verdocs-sign.entry.cjs.js.map +1 -1
  5. package/dist/collection/components/dialogs/verdocs-download-dialog/verdocs-download-dialog.js +3 -3
  6. package/dist/collection/components/dialogs/verdocs-download-dialog/verdocs-download-dialog.js.map +1 -1
  7. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +9 -11
  8. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
  9. package/dist/components/{p-Ds489yGT.js → p-DM-OXuAa.js} +5 -5
  10. package/dist/components/p-DM-OXuAa.js.map +1 -0
  11. package/dist/components/{p-DyeSZpGe.js → p-d0VeAfUY.js} +3 -3
  12. package/dist/components/{p-DyeSZpGe.js.map → p-d0VeAfUY.js.map} +1 -1
  13. package/dist/components/verdocs-download-dialog.js +1 -1
  14. package/dist/components/verdocs-sign.js +11 -13
  15. package/dist/components/verdocs-sign.js.map +1 -1
  16. package/dist/components/verdocs-view.js +1 -1
  17. package/dist/esm/verdocs-download-dialog.verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.js.map +1 -1
  18. package/dist/esm/verdocs-download-dialog_4.entry.js +3 -3
  19. package/dist/esm/verdocs-sign.entry.js +9 -11
  20. package/dist/esm/verdocs-sign.entry.js.map +1 -1
  21. package/dist/esm-es5/verdocs-download-dialog.verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.js.map +1 -1
  22. package/dist/esm-es5/verdocs-download-dialog_4.entry.js +1 -1
  23. package/dist/esm-es5/verdocs-download-dialog_4.entry.js.map +1 -1
  24. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  25. package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
  26. package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +1 -0
  27. package/dist/verdocs-web-sdk/p-352daafb.system.entry.js +2 -0
  28. package/dist/verdocs-web-sdk/p-352daafb.system.entry.js.map +1 -0
  29. package/dist/verdocs-web-sdk/p-488136ce.entry.js +2 -0
  30. package/dist/verdocs-web-sdk/p-488136ce.entry.js.map +1 -0
  31. package/dist/verdocs-web-sdk/p-4KCMpaBY.system.js.map +1 -0
  32. package/dist/verdocs-web-sdk/p-5236b232.system.entry.js +2 -0
  33. package/dist/verdocs-web-sdk/p-5236b232.system.entry.js.map +1 -0
  34. package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
  35. package/dist/verdocs-web-sdk/p-IF-mWinT.system.js.map +1 -0
  36. package/dist/verdocs-web-sdk/p-bf3af9f8.entry.js +2 -0
  37. package/dist/verdocs-web-sdk/p-bf3af9f8.entry.js.map +1 -0
  38. package/dist/verdocs-web-sdk/verdocs-download-dialog.verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.esm.js.map +1 -1
  39. package/dist/verdocs-web-sdk/verdocs-sign.entry.esm.js.map +1 -1
  40. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  41. package/package.json +1 -1
  42. package/dist/components/p-Ds489yGT.js.map +0 -1
  43. package/dist/custom-elements.json +0 -2456
  44. package/dist/verdocs-web-sdk/p-16e4f438.system.entry.js +0 -2
  45. package/dist/verdocs-web-sdk/p-16e4f438.system.entry.js.map +0 -1
  46. package/dist/verdocs-web-sdk/p-3aebfd86.entry.js +0 -2
  47. package/dist/verdocs-web-sdk/p-3aebfd86.entry.js.map +0 -1
  48. package/dist/verdocs-web-sdk/p-CwV2z4y9.system.js.map +0 -1
  49. package/dist/verdocs-web-sdk/p-DAagWDJf.system.js.map +0 -1
  50. package/dist/verdocs-web-sdk/p-dbaaa79f.system.entry.js +0 -2
  51. package/dist/verdocs-web-sdk/p-dbaaa79f.system.entry.js.map +0 -1
  52. package/dist/verdocs-web-sdk/p-e74f4251.entry.js +0 -2
  53. package/dist/verdocs-web-sdk/p-e74f4251.entry.js.map +0 -1
@@ -34,11 +34,11 @@ export class VerdocsDownloadDialog {
34
34
  this.next.emit({ action, documentId });
35
35
  }
36
36
  render() {
37
- const attachments = this.documents.filter(d => d.type === 'attachment');
37
+ const attachments = this.documents.filter(d => d.type === 'attachment').sort((a, b) => a.order - b.order);
38
38
  const hasCertificateDoc = this.documents.some(d => d.type === 'certificate') || this.hasCertificate;
39
39
  const canDownloadFinals = this.signed && hasCertificateDoc;
40
- return (h("verdocs-dialog", { key: '45c8b8c19bd70f8e880a69aaec94c5608edb2565', onExit: () => this.exit.emit() }, h("div", { key: 'd132f1c3e02368e0dff8bafd5cb0078931fc7ef2', slot: "heading", class: "heading-container" }, h("h3", { key: 'b1d2792301c037286aa0a2e378e05834e0112988', style: { margin: '0', fontSize: '1.25rem', fontWeight: '600', padding: '16px 24px' } }, "Download"), this.polling && (h("div", { key: 'fb74fa70f1f22ee9fc5edb4aaf2d513ed715d758', class: "polling-indicator", title: "Checking for updates..." }, h("div", { key: 'de2a84bdc58e6171d09cc5c2cb1549ac2f49c465', class: "spinner", innerHTML: RefreshIcon })))), h("div", { key: '1dcb2d6a682584a8053dc4be511d67238e70ac09', slot: "content", class: "content" }, attachments.length <= 2 &&
41
- attachments.map(doc => (h("div", { class: "download-option", onClick: () => this.handleOptionClick('document', doc.id) }, h("div", { class: "icon-container", innerHTML: DocumentIcon }), h("div", { class: "text-container" }, h("div", { class: "label" }, doc.name), h("div", { class: "description" }, this.signed ? 'Download the document' : 'Download the document')), h("div", { class: "status-indicator" }, this.signed ? h("div", { class: "signed", innerHTML: CheckIcon }) : h("div", { class: "unsigned", innerHTML: CircleIcon }), h("span", null, this.signed ? 'Signed' : 'In Progress')), h("div", { class: "arrow", innerHTML: ChevronRight })))), attachments.length > 2 && h("div", { key: '1d8bf30291254664336839f966873e3026ccfeae', class: "info-message" }, "Multiple documents attached. Please use the ZIP option below to download all files."), h("div", { key: 'b8afc97961708c8668419a85eae34a3454c924b6', class: { 'download-option': true, 'disabled': !canDownloadFinals }, onClick: () => this.handleOptionClick('certificate'), title: !canDownloadFinals ? 'Certificate not yet available' : '' }, h("div", { key: '05e75f0075a9bc789ab7e46146200688290518dd', class: "icon-container", innerHTML: CertificateIcon }), h("div", { key: '32919719557f8e9decec9b0fa4abbbc4e07b0a2e', class: "text-container" }, h("div", { key: 'f8345922b24a8f10250d38117f27fd710e08d742', class: "label" }, "Certificate"), h("div", { key: '3fa4bff452953feb000ac3215e3cc10d1c078815', class: "description" }, "Download the certificate")), h("div", { key: '9490501d83aede902931eaf767e5bcd1b4cbb6b2', class: "arrow", innerHTML: ChevronRight })), h("div", { key: 'c6c217c1b04d10efc354084743ee166c8e71927f', class: { 'download-option': true, 'disabled': !canDownloadFinals }, onClick: () => this.handleOptionClick('zip'), title: !canDownloadFinals ? 'Certificate not yet available' : '' }, h("div", { key: 'a460f8376163cfda35d32617a44fab769ef265b6', class: "icon-container", innerHTML: ZipIcon }), h("div", { key: '1dea249021a58a659ce00710de3452575bbec832', class: "text-container" }, h("div", { key: '1dfcd027e5d574ff35048ea6fe3ab01d3868e145', class: "label" }, "All Files"), h("div", { key: '8765a1d7753af8806a9616dfff8576a0119da0d6', class: "description" }, "Download everything as a ZIP file")), h("div", { key: '87b8a5f69b0bf1425d2f393e03ca5e39efb9361a', class: "arrow", innerHTML: ChevronRight }))), h("div", { key: 'ca25dfc7b77497b7ed407a12699ce2d460789663', slot: "footer", style: { display: 'none' } })));
40
+ return (h("verdocs-dialog", { key: '1f3eda2e32cb5bdcd409a99c23d1cf6a104f0848', onExit: () => this.exit.emit() }, h("div", { key: '5efe04c9ae05ae69b4127d299fce5e0a91dc8515', slot: "heading", class: "heading-container" }, h("h3", { key: '3e157afe6c10acf7de8465da84b8ac8b9fd43a27', style: { margin: '0', fontSize: '1.25rem', fontWeight: '600', padding: '16px 24px' } }, "Download"), this.polling && (h("div", { key: '5ad3a1fa22819106f8586a20bf3b53857122f9e4', class: "polling-indicator", title: "Checking for updates..." }, h("div", { key: '7bd6ff763a0dd044e50ec8c25c1b1cef0b3993c9', class: "spinner", innerHTML: RefreshIcon })))), h("div", { key: '256315253dbbc5da0bd8c8b2d2cbb1ce8d398da8', slot: "content", class: "content" }, attachments.length <= 2 &&
41
+ attachments.map(doc => (h("div", { class: "download-option", onClick: () => this.handleOptionClick('document', doc.id) }, h("div", { class: "icon-container", innerHTML: DocumentIcon }), h("div", { class: "text-container" }, h("div", { class: "label" }, doc.name), h("div", { class: "description" }, this.signed ? 'Download the document' : 'Download the document')), h("div", { class: "status-indicator" }, this.signed ? h("div", { class: "signed", innerHTML: CheckIcon }) : h("div", { class: "unsigned", innerHTML: CircleIcon }), h("span", null, this.signed ? 'Signed' : 'In Progress')), h("div", { class: "arrow", innerHTML: ChevronRight })))), attachments.length > 2 && h("div", { key: 'a8b998b71ade27a3615689e3a87eb3d5a385133e', class: "info-message" }, "Multiple documents attached. Please use the ZIP option below to download all files."), h("div", { key: 'e9aaf13d0903f5c9490ff1b67fe4fd3b40774ad7', class: { 'download-option': true, 'disabled': !canDownloadFinals }, onClick: () => this.handleOptionClick('certificate'), title: !canDownloadFinals ? 'Certificate not yet available' : '' }, h("div", { key: '54afca498036b3146b650e9c763965b9ec473b51', class: "icon-container", innerHTML: CertificateIcon }), h("div", { key: 'bf6ffaaaae31cb5ee1416ab0a13df80e18285b9e', class: "text-container" }, h("div", { key: 'fb2606a0e127a073031f2c3828778c8ef71047e1', class: "label" }, "Certificate"), h("div", { key: '2dd12b55b37acc1de0f5ccb5d4d1d3635aeebdf7', class: "description" }, "Download the certificate")), h("div", { key: 'fcb974c2842e7f3651235513b97b2d6cb500b771', class: "arrow", innerHTML: ChevronRight })), h("div", { key: 'b9caabe10e57a1dea7c6015a5b769d236b973f63', class: { 'download-option': true, 'disabled': !canDownloadFinals }, onClick: () => this.handleOptionClick('zip'), title: !canDownloadFinals ? 'Certificate not yet available' : '' }, h("div", { key: 'ef7e94af475d82581e25782b405d729168aacae5', class: "icon-container", innerHTML: ZipIcon }), h("div", { key: 'd969b98d4db2630b59d27a7cd170fd829d22166e', class: "text-container" }, h("div", { key: 'd63270f5d483f8ecfa7b4d9612aa739d2b6d1853', class: "label" }, "All Files"), h("div", { key: 'f74e6585fb1e84b90c2a09366ebfd016a4765cc3', class: "description" }, "Download everything as a ZIP file")), h("div", { key: '9965c39b090e7908e532658633f711fbe821a4cb', class: "arrow", innerHTML: ChevronRight }))), h("div", { key: 'a5640b4a944db48063ee0d0cbab257cdc264e2b4', slot: "footer", style: { display: 'none' } })));
42
42
  }
43
43
  static get is() { return "verdocs-download-dialog"; }
44
44
  static get originalStyleUrls() {
@@ -1 +1 @@
1
- {"version":3,"file":"verdocs-download-dialog.js","sourceRoot":"","sources":["../../../../src/components/dialogs/verdocs-download-dialog/verdocs-download-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,CAAC,EAAE,KAAK,EAAgB,IAAI,EAAC,MAAM,eAAe,CAAC;AAEtE,MAAM,YAAY,GAAG,ihBAAihB,CAAC;AACviB,MAAM,eAAe,GAAG,uaAAua,CAAC;AAChc,MAAM,OAAO,GAAG,quBAAquB,CAAC;AACtvB,MAAM,YAAY,GAAG,iMAAiM,CAAC;AACvN,MAAM,SAAS,GAAG,iMAAiM,CAAC;AACpN,MAAM,UAAU,GAAG,uJAAuJ,CAAC;AAC3K,MAAM,WAAW,GAAG,0TAA0T,CAAC;AAO/U,MAAM,OAAO,qBAAqB;IALlC;QAmBE;;WAEG;QACK,WAAM,GAAG,KAAK,CAAC;QAEvB;;WAEG;QACK,YAAO,GAAG,KAAK,CAAC;QAExB;;WAEG;QACK,cAAS,GAAU,EAAE,CAAC;QAE9B;;WAEG;QAC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<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M13 2H6C5.46957 2 4.96086 2.21071 4.58579 2.58579C4.21071 2.96086 4 3.46957 4 4V20C4 20.5304 4.21071 21.0391 4.58579 21.4142C4.96086 21.7893 5.46957 22 6 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V9L13 2Z\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M13 2V9H20\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>`;\nconst CertificateIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 15C15.866 15 19 11.866 19 8C19 4.13401 15.866 1 12 1C8.13401 1 5 4.13401 5 8C5 11.866 8.13401 15 12 15Z\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M8.21 13.89L7 23L12 20L17 23L15.79 13.88\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>`;\nconst ZipIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10 16V22H14V16\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M6 16H18\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M20 22H4\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M12 10L12 16\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M8 12L12 16L16 12\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M4 16V4H20V16\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>`;\nconst ChevronRight = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9 18L15 12L9 6\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>`;\nconst CheckIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M20 6L9 17L4 12\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>`;\nconst CircleIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"2\"/></svg>`;\nconst RefreshIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M23 4V10H17\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M20.49 15A9 9 0 1 1 21.23 8\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>`;\n\n@Component({\n tag: 'verdocs-download-dialog',\n styleUrl: 'verdocs-download-dialog.scss',\n shadow: false,\n})\nexport class VerdocsDownloadDialog {\n /**\n * Event fired when an option is selected.\n */\n /**\n * Event fired when an option is selected.\n */\n @Event({composed: true}) next: EventEmitter<{action: 'document' | 'certificate' | 'zip'; documentId?: string}>;\n\n /**\n * Event fired when Cancel is pressed or background is clicked.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n /**\n * If true, the envelope is considered signed.\n */\n @Prop() signed = false;\n\n /**\n * If true, we are currently polling the server for updates.\n */\n @Prop() polling = false;\n\n /**\n * The list of documents in the envelope.\n */\n @Prop() documents: any[] = [];\n\n /**\n * If true, the envelope has a certificate available for download.\n */\n @Prop() hasCertificate = false;\n\n handleOptionClick(action: 'document' | 'certificate' | 'zip', documentId?: string) {\n const hasCert = this.documents.some(d => d.type === 'certificate') || this.hasCertificate;\n const canDownloadCert = this.signed && hasCert;\n\n if ((action === 'certificate' || action === 'zip') && !canDownloadCert) {\n return;\n }\n this.next.emit({action, documentId} as any);\n }\n\n render() {\n const attachments = this.documents.filter(d => d.type === 'attachment');\n const hasCertificateDoc = this.documents.some(d => d.type === 'certificate') || this.hasCertificate;\n const canDownloadFinals = this.signed && hasCertificateDoc;\n\n return (\n <verdocs-dialog onExit={() => this.exit.emit()}>\n <div slot=\"heading\" class=\"heading-container\">\n <h3 style={{margin: '0', fontSize: '1.25rem', fontWeight: '600', padding: '16px 24px'}}>Download</h3>\n {this.polling && (\n <div class=\"polling-indicator\" title=\"Checking for updates...\">\n <div class=\"spinner\" innerHTML={RefreshIcon} />\n </div>\n )}\n </div>\n\n <div slot=\"content\" class=\"content\">\n {attachments.length <= 2 &&\n attachments.map(doc => (\n <div class=\"download-option\" onClick={() => this.handleOptionClick('document', doc.id)}>\n <div class=\"icon-container\" innerHTML={DocumentIcon}></div>\n <div class=\"text-container\">\n <div class=\"label\">{doc.name}</div>\n <div class=\"description\">{this.signed ? 'Download the document' : 'Download the document'}</div>\n </div>\n <div class=\"status-indicator\">\n {this.signed ? <div class=\"signed\" innerHTML={CheckIcon}></div> : <div class=\"unsigned\" innerHTML={CircleIcon}></div>}\n <span>{this.signed ? 'Signed' : 'In Progress'}</span>\n </div>\n <div class=\"arrow\" innerHTML={ChevronRight}></div>\n </div>\n ))}\n\n {attachments.length > 2 && <div class=\"info-message\">Multiple documents attached. Please use the ZIP option below to download all files.</div>}\n\n <div\n class={{'download-option': true, 'disabled': !canDownloadFinals}}\n onClick={() => this.handleOptionClick('certificate')}\n title={!canDownloadFinals ? 'Certificate not yet available' : ''}\n >\n <div class=\"icon-container\" innerHTML={CertificateIcon}></div>\n <div class=\"text-container\">\n <div class=\"label\">Certificate</div>\n <div class=\"description\">Download the certificate</div>\n </div>\n <div class=\"arrow\" innerHTML={ChevronRight}></div>\n </div>\n\n <div\n class={{'download-option': true, 'disabled': !canDownloadFinals}}\n onClick={() => this.handleOptionClick('zip')}\n title={!canDownloadFinals ? 'Certificate not yet available' : ''}\n >\n <div class=\"icon-container\" innerHTML={ZipIcon}></div>\n <div class=\"text-container\">\n <div class=\"label\">All Files</div>\n <div class=\"description\">Download everything as a ZIP file</div>\n </div>\n <div class=\"arrow\" innerHTML={ChevronRight}></div>\n </div>\n </div>\n\n <div slot=\"footer\" style={{display: 'none'}} />\n </verdocs-dialog>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"verdocs-download-dialog.js","sourceRoot":"","sources":["../../../../src/components/dialogs/verdocs-download-dialog/verdocs-download-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,CAAC,EAAE,KAAK,EAAgB,IAAI,EAAC,MAAM,eAAe,CAAC;AAEtE,MAAM,YAAY,GAAG,ihBAAihB,CAAC;AACviB,MAAM,eAAe,GAAG,uaAAua,CAAC;AAChc,MAAM,OAAO,GAAG,quBAAquB,CAAC;AACtvB,MAAM,YAAY,GAAG,iMAAiM,CAAC;AACvN,MAAM,SAAS,GAAG,iMAAiM,CAAC;AACpN,MAAM,UAAU,GAAG,uJAAuJ,CAAC;AAC3K,MAAM,WAAW,GAAG,0TAA0T,CAAC;AAO/U,MAAM,OAAO,qBAAqB;IALlC;QAmBE;;WAEG;QACK,WAAM,GAAG,KAAK,CAAC;QAEvB;;WAEG;QACK,YAAO,GAAG,KAAK,CAAC;QAExB;;WAEG;QACK,cAAS,GAAU,EAAE,CAAC;QAE9B;;WAEG;QACK,mBAAc,GAAG,KAAK,CAAC;KA8EhC;IA5EC,iBAAiB,CAAC,MAA0C,EAAE,UAAmB;QAC/E,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAA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"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M13 2H6C5.46957 2 4.96086 2.21071 4.58579 2.58579C4.21071 2.96086 4 3.46957 4 4V20C4 20.5304 4.21071 21.0391 4.58579 21.4142C4.96086 21.7893 5.46957 22 6 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V9L13 2Z\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M13 2V9H20\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>`;\nconst CertificateIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 15C15.866 15 19 11.866 19 8C19 4.13401 15.866 1 12 1C8.13401 1 5 4.13401 5 8C5 11.866 8.13401 15 12 15Z\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M8.21 13.89L7 23L12 20L17 23L15.79 13.88\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>`;\nconst ZipIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10 16V22H14V16\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M6 16H18\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M20 22H4\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M12 10L12 16\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M8 12L12 16L16 12\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M4 16V4H20V16\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>`;\nconst ChevronRight = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9 18L15 12L9 6\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>`;\nconst CheckIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M20 6L9 17L4 12\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>`;\nconst CircleIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"2\"/></svg>`;\nconst RefreshIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M23 4V10H17\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M20.49 15A9 9 0 1 1 21.23 8\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>`;\n\n@Component({\n tag: 'verdocs-download-dialog',\n styleUrl: 'verdocs-download-dialog.scss',\n shadow: false,\n})\nexport class VerdocsDownloadDialog {\n /**\n * Event fired when an option is selected.\n */\n /**\n * Event fired when an option is selected.\n */\n @Event({composed: true}) next: EventEmitter<{action: 'document' | 'certificate' | 'zip'; documentId?: string}>;\n\n /**\n * Event fired when Cancel is pressed or background is clicked.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n /**\n * If true, the envelope is considered signed.\n */\n @Prop() signed = false;\n\n /**\n * If true, we are currently polling the server for updates.\n */\n @Prop() polling = false;\n\n /**\n * The list of documents in the envelope.\n */\n @Prop() documents: any[] = [];\n\n /**\n * If true, the envelope has a certificate available for download.\n */\n @Prop() hasCertificate = false;\n\n handleOptionClick(action: 'document' | 'certificate' | 'zip', documentId?: string) {\n const hasCert = this.documents.some(d => d.type === 'certificate') || this.hasCertificate;\n const canDownloadCert = this.signed && hasCert;\n\n if ((action === 'certificate' || action === 'zip') && !canDownloadCert) {\n return;\n }\n this.next.emit({action, documentId} as any);\n }\n\n render() {\n const attachments = this.documents.filter(d => d.type === 'attachment').sort((a, b) => a.order - b.order);\n const hasCertificateDoc = this.documents.some(d => d.type === 'certificate') || this.hasCertificate;\n const canDownloadFinals = this.signed && hasCertificateDoc;\n\n return (\n <verdocs-dialog onExit={() => this.exit.emit()}>\n <div slot=\"heading\" class=\"heading-container\">\n <h3 style={{margin: '0', fontSize: '1.25rem', fontWeight: '600', padding: '16px 24px'}}>Download</h3>\n {this.polling && (\n <div class=\"polling-indicator\" title=\"Checking for updates...\">\n <div class=\"spinner\" innerHTML={RefreshIcon} />\n </div>\n )}\n </div>\n\n <div slot=\"content\" class=\"content\">\n {attachments.length <= 2 &&\n attachments.map(doc => (\n <div class=\"download-option\" onClick={() => this.handleOptionClick('document', doc.id)}>\n <div class=\"icon-container\" innerHTML={DocumentIcon}></div>\n <div class=\"text-container\">\n <div class=\"label\">{doc.name}</div>\n <div class=\"description\">{this.signed ? 'Download the document' : 'Download the document'}</div>\n </div>\n <div class=\"status-indicator\">\n {this.signed ? <div class=\"signed\" innerHTML={CheckIcon}></div> : <div class=\"unsigned\" innerHTML={CircleIcon}></div>}\n <span>{this.signed ? 'Signed' : 'In Progress'}</span>\n </div>\n <div class=\"arrow\" innerHTML={ChevronRight}></div>\n </div>\n ))}\n\n {attachments.length > 2 && <div class=\"info-message\">Multiple documents attached. Please use the ZIP option below to download all files.</div>}\n\n <div\n class={{'download-option': true, 'disabled': !canDownloadFinals}}\n onClick={() => this.handleOptionClick('certificate')}\n title={!canDownloadFinals ? 'Certificate not yet available' : ''}\n >\n <div class=\"icon-container\" innerHTML={CertificateIcon}></div>\n <div class=\"text-container\">\n <div class=\"label\">Certificate</div>\n <div class=\"description\">Download the certificate</div>\n </div>\n <div class=\"arrow\" innerHTML={ChevronRight}></div>\n </div>\n\n <div\n class={{'download-option': true, 'disabled': !canDownloadFinals}}\n onClick={() => this.handleOptionClick('zip')}\n title={!canDownloadFinals ? 'Certificate not yet available' : ''}\n >\n <div class=\"icon-container\" innerHTML={ZipIcon}></div>\n <div class=\"text-container\">\n <div class=\"label\">All Files</div>\n <div class=\"description\">Download everything as a ZIP file</div>\n </div>\n <div class=\"arrow\" innerHTML={ChevronRight}></div>\n </div>\n </div>\n\n <div slot=\"footer\" style={{display: 'none'}} />\n </verdocs-dialog>\n );\n }\n}\n"]}
@@ -376,10 +376,15 @@ export class VerdocsSign {
376
376
  }
377
377
  });
378
378
  }
379
+ getStartedKey() {
380
+ var _a;
381
+ return `${this.envelopeId}:${((_a = this.recipient) === null || _a === void 0 ? void 0 : _a.role_name) || ''}`;
382
+ }
379
383
  markEnvelopeStarted() {
380
384
  const startedEnvelopes = JSON.parse(localStorage.getItem('startedEnvelopes') || '[]');
381
- if (!startedEnvelopes.includes(this.envelopeId)) {
382
- startedEnvelopes.push(this.envelopeId);
385
+ const key = this.getStartedKey();
386
+ if (!startedEnvelopes.includes(key)) {
387
+ startedEnvelopes.push(key);
383
388
  while (startedEnvelopes.length > 10) {
384
389
  startedEnvelopes.shift();
385
390
  }
@@ -589,7 +594,7 @@ export class VerdocsSign {
589
594
  // We never get a chance to clean them up but 10 GUIDs is tiny compared to what
590
595
  // many apps store in a user's browser.
591
596
  const startedEnvelopes = JSON.parse(localStorage.getItem('startedEnvelopes') || '[]');
592
- const hasStarted = startedEnvelopes.includes(this.envelopeId);
597
+ const hasStarted = startedEnvelopes.includes(this.getStartedKey());
593
598
  if (this.nextSubmits) {
594
599
  this.signingProgressMode = 'completed';
595
600
  }
@@ -1005,14 +1010,7 @@ export class VerdocsSign {
1005
1010
  this.initialId = initResult.id;
1006
1011
  this.showSpinner = false;
1007
1012
  this.adoptingSignature = false;
1008
- const startedEnvelopes = JSON.parse(localStorage.getItem('startedEnvelopes') || '[]');
1009
- if (!startedEnvelopes.includes(this.envelopeId)) {
1010
- startedEnvelopes.push(this.envelopeId);
1011
- while (startedEnvelopes.length > 10) {
1012
- startedEnvelopes.shift();
1013
- }
1014
- localStorage.setItem('startedEnvelopes', JSON.stringify(startedEnvelopes));
1015
- }
1013
+ this.markEnvelopeStarted();
1016
1014
  // Special case: if we were focusing a specific field, apply the new signature/initials to it immediately.
1017
1015
  // This is the "secondary flow" where the user clicks a field directly before adopting.
1018
1016
  if (this.focusedField) {