@verdocs/web-sdk 6.5.0-beta.37 → 6.5.0-beta.38

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 (29) 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 +1 -1
  3. package/dist/collection/components/dialogs/verdocs-download-dialog/verdocs-download-dialog.css +1 -0
  4. package/dist/components/{p-BgNYe7h9.js → p-BmuvbqHK.js} +3 -3
  5. package/dist/components/{p-BgNYe7h9.js.map → p-BmuvbqHK.js.map} +1 -1
  6. package/dist/components/{p-C0_V6_aB.js → p-C3gOLT8d.js} +3 -3
  7. package/dist/components/p-C3gOLT8d.js.map +1 -0
  8. package/dist/components/verdocs-download-dialog.js +1 -1
  9. package/dist/components/verdocs-sign.js +2 -2
  10. package/dist/components/verdocs-view.js +1 -1
  11. package/dist/esm/verdocs-download-dialog.verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.js.map +1 -1
  12. package/dist/esm/verdocs-download-dialog_4.entry.js +1 -1
  13. package/dist/esm-es5/verdocs-download-dialog.verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.js.map +1 -1
  14. package/dist/esm-es5/verdocs-download-dialog_4.entry.js +1 -1
  15. package/dist/esm-es5/verdocs-download-dialog_4.entry.js.map +1 -1
  16. package/dist/verdocs-web-sdk/p-788aa2b2.entry.js +2 -0
  17. package/dist/verdocs-web-sdk/{p-c51227f3.entry.js.map → p-788aa2b2.entry.js.map} +1 -1
  18. package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
  19. package/dist/verdocs-web-sdk/p-SjmvOB0f.system.js.map +1 -0
  20. package/dist/verdocs-web-sdk/p-d057ed7f.system.entry.js +2 -0
  21. package/dist/verdocs-web-sdk/{p-650b74e0.system.entry.js.map → p-d057ed7f.system.entry.js.map} +1 -1
  22. package/dist/verdocs-web-sdk/verdocs-download-dialog.verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.esm.js.map +1 -1
  23. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  24. package/package.json +1 -1
  25. package/dist/components/p-C0_V6_aB.js.map +0 -1
  26. package/dist/custom-elements.json +0 -2456
  27. package/dist/verdocs-web-sdk/p-650b74e0.system.entry.js +0 -2
  28. package/dist/verdocs-web-sdk/p-CgBORoqt.system.js.map +0 -1
  29. package/dist/verdocs-web-sdk/p-c51227f3.entry.js +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"verdocs-download-dialog.verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.cjs.js","sources":["src/components/dialogs/verdocs-download-dialog/verdocs-download-dialog.scss?tag=verdocs-download-dialog","src/components/dialogs/verdocs-download-dialog/verdocs-download-dialog.tsx","src/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.scss?tag=verdocs-envelope-document-page","src/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.tsx","src/components/dialogs/verdocs-question-dialog/verdocs-question-dialog.scss?tag=verdocs-question-dialog","src/components/dialogs/verdocs-question-dialog/verdocs-question-dialog.tsx","src/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.scss?tag=verdocs-sign-footer","src/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-download-dialog {\n box-sizing: border-box;\n font-family: $primary-font;\n\n .heading-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n .polling-indicator {\n padding: 0 24px;\n color: #9ca3af;\n\n .spinner {\n display: flex;\n animation: rotate 2s linear infinite;\n\n svg {\n width: 20px;\n height: 20px;\n }\n }\n }\n }\n\n .content {\n display: flex;\n flex-direction: column;\n gap: 15px; // Reduced slightly\n padding: 0 24px 20px 24px; // Adjusted top padding\n }\n\n .download-option {\n display: flex;\n align-items: center;\n padding: 12px 15px; // Reduced padding slightly\n border: 1px solid #e5e7eb;\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s ease;\n gap: 15px;\n background: white;\n\n &.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n\n &:hover {\n background-color: white;\n border-color: #e5e7eb;\n }\n }\n\n &:hover {\n border-color: $verdocs-primary-color;\n background-color: #f9fafb;\n }\n }\n\n .icon-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px; // Reduced slightly\n height: 36px;\n background-color: #f3f4f6;\n border-radius: 50%;\n color: #4b5563;\n flex-shrink: 0;\n\n svg {\n width: 18px;\n height: 18px;\n }\n }\n\n .text-container {\n flex: 1;\n\n .label {\n font-weight: 500;\n color: #111827;\n margin-bottom: 2px;\n }\n\n .description {\n font-size: 13px;\n color: #6b7280;\n }\n }\n\n .status-indicator {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 2px;\n font-size: 11px;\n color: #9ca3af;\n min-width: 50px;\n\n .signed {\n color: #10b981;\n }\n\n .unsigned {\n color: #9ca3af;\n }\n\n svg {\n width: 16px;\n height: 16px;\n }\n }\n\n .info-message {\n font-size: 13px;\n color: #6b7280;\n font-style: italic;\n padding: 0 4px;\n }\n\n .arrow {\n color: #9ca3af;\n }\n}\n\n@keyframes rotate {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n}\n","import {Component, h, Event, EventEmitter, Prop} from '@stencil/core';\n\nconst DocumentIcon = `<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').sort((a, b) => (a.order !== b.order ? a.order - b.order : a.created_at.localeCompare(b.created_at)));\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","@import '../../../theme.scss';\n\nverdocs-envelope-document-page {\n width: 100%;\n position: relative;\n\n .verdocs-envelope-document-page-layer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n box-shadow: 0 0 10px 5px #0000000f;\n\n &.img {\n width: 100%;\n }\n }\n}\n","// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {getEnvelopeDocumentPageDisplayUri, VerdocsEndpoint} from '@verdocs/js-sdk';\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-envelope-document-page',\n styleUrl: 'verdocs-envelope-document-page.scss',\n shadow: false,\n})\nexport class VerdocsEnvelopeDocumentPage {\n @Element() container: HTMLElement;\n private resizeObserver: ResizeObserver;\n\n /**\n * The endpoint to load from.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The ID of the envelope the document is for.\n */\n @Prop() envelopeId: string = '';\n\n /**\n * The ID of the document to display.\n */\n @Prop() documentId: string = '';\n\n /**\n * The page number being rendered. (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({mutable: true}) virtualHeight: number = 792;\n\n /**\n * The layers that will be rendered. The DOM structure will be a DIV container with one child DIV for each layer.\n * The parent DIV will have a unique ID, and each child DIV will have that ID with the layer name appended, e.g.\n * if `pages` was ['page', 'fields'] the structure will be:\n *\n * ```\n * <div id=\"verdocs-envelope-document-page-ker2fr1p9\">\n * <div id=\"verdocs-envelope-document-page-ker2fr1p9-page\"></div>\n * <div id=\"verdocs-envelope-document-page-ker2fr1p9-fields\"></div>\n * </div>\n * ```\n */\n @Prop() layers: IPageLayer[] = [{name: 'page', type: 'canvas'}];\n\n @Prop() type: 'original' | 'filled' | 'certificate' = 'original';\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-envelope-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 @State() pageDisplayUri = 'https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png';\n\n async componentWillLoad() {\n this.pageDisplayUri = await getEnvelopeDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber, this.type);\n }\n\n componentDidLoad() {\n this.resizeObserver = new ResizeObserver(\n throttle(entries => {\n for (const entry of entries) {\n const renderedWidth = entry.contentRect.width;\n this.renderedWidth = renderedWidth;\n this.renderedHeight = this.virtualHeight * (renderedWidth / this.virtualWidth);\n }\n\n this.notifyRenderedSize();\n }, 100),\n );\n\n this.resizeObserver.observe(this.container);\n }\n\n 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 documentId: this.documentId,\n pageNumber: this.pageNumber,\n virtualWidth: this.virtualWidth,\n virtualHeight: this.virtualHeight,\n renderedWidth: this.renderedWidth,\n renderedHeight: this.renderedHeight,\n naturalWidth: this.naturalWidth,\n naturalHeight: this.naturalHeight,\n aspectRatio: this.aspectRatio,\n xScale: 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, flex: `0 0 ${height}`}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-envelope-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}} />\n ) : this.pageDisplayUri ? (\n <img\n class=\"verdocs-envelope-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageDisplayUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\n loading=\"lazy\"\n onLoad={(e: any) => {\n // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that\n // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).\n // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values\n // for a field are based on the responsive Web view the Template editor was seeing. The IMG was scaled down there in the\n // exact same way, so we just honor it. We capture the natural width and height here more as information. Then we use the\n // aspect ratio to adjust the \"virtual\" height in case the page is not 8.5\"x11\".\n // TODO: Store this in the DB with each page.\n this.naturalWidth = e.target.naturalWidth;\n this.naturalHeight = e.target.naturalHeight;\n this.aspectRatio = this.naturalWidth / this.naturalHeight;\n this.virtualHeight = this.virtualWidth / this.aspectRatio;\n this.renderedHeight = e.target.offsetWidth / this.aspectRatio;\n }}\n />\n ) : (\n <div></div>\n ),\n )}\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-question-dialog {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n position: fixed;\n box-sizing: border-box;\n font-family: $primary-font;\n\n &.closed {\n display: none;\n }\n\n textarea {\n box-sizing: border-box;\n border: 1px solid $border-color;\n border-radius: 4px;\n background: $verdocs-grey-4;\n color: #000;\n width: 100%;\n font-size: 14px;\n padding: 9px;\n outline: none;\n }\n\n .heading .title {\n font-size: 18px;\n }\n\n .buttons {\n gap: 20px;\n display: flex;\n margin-top: 24px;\n flex-direction: row;\n justify-content: center;\n\n button {\n flex: 1;\n border: 0;\n height: 38px;\n display: flex;\n color: #ffffff;\n font-size: 14px;\n cursor: pointer;\n border-radius: 6px;\n align-items: center;\n justify-content: center;\n\n &.cancel {\n background-color: $verdocs-button-purple;\n }\n\n &.ok {\n background-color: $verdocs-button-green;\n\n &.single {\n max-width: 150px;\n }\n }\n\n &:disabled {\n background-color: $verdocs-button-disabled;\n }\n }\n }\n}\n","import {Component, h, Event, EventEmitter, State, Prop} from '@stencil/core';\n\nconst QuestionIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z\" fill=\"#ffffff\"/></svg>`;\n\n/**\n * Display a simple text dialog box with an Ok button. This adds a partially-transparent overlay and screen-centered dialog\n * box with a message and optional header/title. An OK button is shown that will dismiss the message.\n * It can also be dismissed by clicking the background overlay.\n */\n@Component({\n tag: 'verdocs-question-dialog',\n styleUrl: 'verdocs-question-dialog.scss',\n})\nexport class VerdocsQuestionDialog {\n @Prop({mutable: true}) question: string = '';\n\n /**\n * Event fired when the user clicks the OK button.\n */\n @Event({composed: true}) next: EventEmitter<{question: string}>;\n\n /**\n * Event fired when Cancel is pressed. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n @State() closed = false;\n\n handleOk() {\n this.next.emit({question: this.question});\n }\n\n handleCancel() {\n this.exit.emit();\n }\n\n // We need a separate event handler for clicking the background because it can receive events \"through\" other child components\n handleDismiss(e: any) {\n this.closed = true;\n if (e.target.className === 'background-overlay') {\n e.preventDefault();\n this.exit.emit();\n }\n }\n\n render() {\n return (\n <verdocs-dialog onExit={e => this.handleDismiss(e)}>\n <div slot=\"heading\" class=\"heading\">\n <div class=\"icon\" innerHTML={QuestionIcon} />\n\n <div class=\"title\">Ask the Sender a Question</div>\n </div>\n\n <div slot=\"content\" class=\"content\">\n <textarea name=\"question\" rows={6} placeholder=\"Enter your question...\" onInput={(e: any) => (this.question = e.target.value)}>\n {this.question}\n </textarea>\n </div>\n\n <div class=\"footer\" slot=\"footer\">\n <div class=\"buttons\">\n <button class=\"cancel\" onClick={() => this.handleCancel()}>\n Cancel\n </button>\n <button class={'ok'} onClick={() => this.handleOk()}>\n OK\n </button>\n </div>\n </div>\n </verdocs-dialog>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-sign-footer {\n left: 0;\n right: 0;\n bottom: 0;\n height: 48px;\n display: flex;\n color: #616161;\n position: fixed;\n font-size: 12px;\n padding: 0 24px;\n align-items: center;\n flex-direction: row;\n background: #ffffff;\n container-type: inline-size;\n border-top: 1px solid #e0e0e0;\n justify-content: space-between;\n font-family: $verdocs-primary-font;\n transition: 0.5s cubic-bezier(0.35, 0, 0.25, 1);\n\n a {\n color: #616161;\n cursor: pointer;\n text-decoration: none;\n border-bottom: 1px dotted #616161;\n }\n\n &.loading {\n display: none;\n }\n\n .powered-by {\n white-space: nowrap;\n }\n\n .buttons {\n flex: 0;\n gap: 16px;\n display: flex;\n flex-direction: row;\n white-space: nowrap;\n align-items: center;\n\n button {\n gap: 4px;\n border: none;\n display: flex;\n outline: none;\n cursor: pointer;\n flex-direction: row;\n align-items: center;\n background: transparent;\n }\n\n div {\n gap: 4px;\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n }\n\n .links {\n flex: 0;\n gap: 8px;\n display: flex;\n flex-direction: row;\n white-space: nowrap;\n }\n\n &.just-buttons {\n .buttons {\n flex: 1;\n justify-content: center;\n }\n }\n\n @container (max-width: 720px) {\n &.has-buttons .powered-by {\n display: none;\n }\n }\n\n @container (max-width: 540px) {\n &.no-buttons .powered-by {\n display: none;\n }\n\n &.has-buttons .links {\n display: none;\n }\n\n .buttons {\n flex: 1;\n justify-content: center;\n }\n }\n}\n","import {IEnvelope} from '@verdocs/js-sdk';\nimport {Component, h, Event, EventEmitter, Host, Prop, State} from '@stencil/core';\nimport {getEnvelope, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nconst QuestionIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z\" fill=\"#424242\"/></svg>`;\nconst DeclineIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.14645 7.14645C7.34171 6.95118 7.65829 6.95118 7.85355 7.14645L10 9.29289L12.1464 7.14645C12.3417 6.95118 12.6583 6.95118 12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L10.7071 10L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L10 10.7071L7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536C6.95118 12.6583 6.95118 12.3417 7.14645 12.1464L9.29289 10L7.14645 7.85355C6.95118 7.65829 6.95118 7.34171 7.14645 7.14645ZM3 6C3 4.34315 4.34315 3 6 3H14C15.6569 3 17 4.34315 17 6V14C17 15.6569 15.6569 17 14 17H6C4.34315 17 3 15.6569 3 14V6ZM6 4C4.89543 4 4 4.89543 4 6V14C4 15.1046 4.89543 16 6 16H14C15.1046 16 16 15.1046 16 14V6C16 4.89543 15.1046 4 14 4H6Z\" fill=\"#424242\"/></svg>`;\nconst SaveIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3 5C3 3.89543 3.89543 3 5 3H13.3787C13.9091 3 14.4178 3.21071 14.7929 3.58579L16.4142 5.20711C16.7893 5.58218 17 6.09089 17 6.62132V15C17 16.1046 16.1046 17 15 17H5C3.89543 17 3 16.1046 3 15V5ZM5 4C4.44772 4 4 4.44772 4 5V15C4 15.5523 4.44772 16 5 16L5 11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V16C15.5523 16 16 15.5523 16 15V6.62132C16 6.3561 15.8946 6.10175 15.7071 5.91421L14.0858 4.29289C13.8983 4.10536 13.6439 4 13.3787 4L13 4V6.5C13 7.32843 12.3284 8 11.5 8L7.5 8C6.67157 8 6 7.32843 6 6.5L6 4H5ZM7 4L7 6.5C7 6.77614 7.22386 7 7.5 7L11.5 7C11.7761 7 12 6.77614 12 6.5V4L7 4ZM14 16V11.5C14 11.2239 13.7761 11 13.5 11H6.5C6.22386 11 6 11.2239 6 11.5V16H14Z\" fill=\"#424242\"/></svg>`;\n\n/**\n * Typically presented by the `verdocs-sign` component. Displays a footer toolbar\n * with a few convenience functions for the envelope recipient to use.\n */\n@Component({\n tag: 'verdocs-sign-footer',\n styleUrl: 'verdocs-sign-footer.scss',\n shadow: false,\n})\nexport class VerdocsSignFooter {\n private envelopeListenerId = null;\n\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The envelope ID to render. Set ONE OF templateId or envelopeId. If both are set, envelopeId will be ignored.\n */\n @Prop() envelopeId: string = '';\n\n /**\n * If the recipient is \"done,\" some buttons will be hidden.\n */\n @Prop() isDone = false;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) askQuestion: EventEmitter<{question: string}>;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) decline: EventEmitter;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) finishLater: EventEmitter;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the envelope is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.\n */\n // @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n @State() askingQuestion = false;\n @State() declinine = false;\n @State() envelope: IEnvelope | null = null;\n\n async componentWillLoad() {\n try {\n // NOTE: The caller must have a signing session already active and shared to us via\n // the endpoint property.\n if (!this.envelopeId) {\n console.log(`[FOOTER] Missing required envelope ID ${this.envelopeId}`);\n return;\n }\n\n this.listenToEnvelope();\n } catch (e) {\n console.log('[FOOTER] Error loading envelope', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n disconnectedCallback() {\n this.unlistenToEnvelope();\n }\n\n async listenToEnvelope() {\n console.log('[FOOTER] Loading envelope', this.envelopeId);\n this.unlistenToEnvelope();\n Store.subscribe(\n 'envelopes',\n this.envelopeId,\n () => getEnvelope(this.endpoint, this.envelopeId),\n false,\n (envelope: IEnvelope) => {\n this.envelope = envelope;\n },\n );\n }\n\n unlistenToEnvelope() {\n if (this.envelopeListenerId) {\n Store.store.delListener(this.envelopeListenerId);\n this.envelopeListenerId = null;\n }\n }\n\n // handleRecipientAction(recipient: IRecipient, id: string) {\n // console.log('[SIDEBAR] Recipient action', id, recipient);\n // switch (id) {\n // case 'update':\n // this.showUpdateDialog = recipient.role_name;\n // break;\n //\n // case 'reminder':\n // remindRecipient(this.endpoint, this.envelopeId, recipient.role_name)\n // .then(() => {\n // VerdocsToast('Reminder Sent', {style: 'success'});\n // })\n // .catch(e => {\n // console.log('[SIDEBAR] Error resending invitation', e);\n // VerdocsToast('Error resending invitation: ' + e.message, {style: 'error'});\n // });\n // break;\n //\n // case 'reinvite':\n // this.showReinviteDialog = recipient.role_name;\n // break;\n //\n // case 'inperson':\n // this.showRecipientDialog = recipient.role_name;\n // break;\n //\n // case 'modify':\n // VerdocsToast('This feature will be enabled in a future release. Please try again later.', {style: 'info'});\n // break;\n //\n // case 'details':\n // VerdocsToast('This feature will be enabled in a future release. Please try again later.', {style: 'info'});\n // break;\n // }\n // }\n\n // handleUpdateRecipient(originalRecipient: IRecipient, updatedRecipient: IRecipient) {\n // console.log('Updating recipient', originalRecipient, updatedRecipient);\n // const fields: any = {};\n // if (updatedRecipient.email !== originalRecipient.email) {\n // fields.email = updatedRecipient.email;\n // }\n // if (updatedRecipient.phone !== originalRecipient.phone) {\n // fields.phone = updatedRecipient.phone;\n // }\n // if (updatedRecipient.message !== originalRecipient.message) {\n // fields.message = updatedRecipient.message;\n // }\n // if (updatedRecipient.first_name !== originalRecipient.first_name) {\n // fields.first_name = updatedRecipient.first_name;\n // }\n // if (updatedRecipient.last_name !== originalRecipient.last_name) {\n // fields.last_name = updatedRecipient.last_name;\n // }\n //\n // if (Object.keys(fields).length > 0) {\n // updateRecipient(this.endpoint, this.envelopeId, originalRecipient.role_name, fields)\n // .then(r => {\n // // TODO: Reload the envelope?\n // VerdocsToast('Recipient updated', {style: 'success'});\n // console.log('[SIDEBAR] Updated recipient', r);\n // Store.getEnvelope(this.endpoint, this.envelopeId, true);\n // this.showUpdateDialog = '';\n // })\n // .catch(e => {\n // VerdocsToast(e.response.data.error, {style: 'error'});\n // this.showUpdateDialog = '';\n // });\n // } else {\n // this.showUpdateDialog = '';\n // }\n // }\n\n render() {\n const hasPoweredBy = !!this.envelope?.organization?.powered_by_label;\n const hasLinks = !!this.envelope?.organization?.terms_use_url || !!this.envelope?.organization?.privacy_policy_url;\n const hasButtons = !this.isDone;\n\n return (\n <Host class={{'has-buttons': hasButtons, 'no-buttons': !hasButtons, 'has-powered-by': hasPoweredBy, 'has-links': hasLinks, 'just-buttons': !hasPoweredBy && !hasLinks}}>\n {this.envelope?.organization?.powered_by_label && (\n <div class=\"powered-by\">\n {this.envelope?.organization?.powered_by_url ? (\n <a href={this.envelope?.organization?.powered_by_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>{this.envelope?.organization?.powered_by_label}</span>\n </a>\n ) : (\n <span>{this.envelope?.organization?.powered_by_label}</span>\n )}\n </div>\n )}\n\n {!this.isDone && (\n <div class=\"buttons\">\n <button onClick={() => (this.askingQuestion = true)}>\n <span innerHTML={QuestionIcon} />\n Ask Sender a Question\n </button>\n <button onClick={() => this.decline?.emit()}>\n <span innerHTML={DeclineIcon} />\n Decline Signing\n </button>\n <button onClick={() => this.finishLater?.emit()}>\n <span innerHTML={SaveIcon} />\n Finish Later\n </button>\n </div>\n )}\n\n <div class=\"links\">\n {this.envelope?.organization?.terms_use_url && (\n <a href={this.envelope?.organization?.terms_use_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>Terms of Use</span>\n </a>\n )}\n {this.envelope?.organization?.privacy_policy_url && (\n <a href={this.envelope?.organization?.privacy_policy_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>Privacy Policy</span>\n </a>\n )}\n </div>\n\n {this.askingQuestion && (\n <verdocs-question-dialog\n onNext={e => {\n this.askQuestion?.emit({question: e.detail.question});\n this.askingQuestion = false;\n }}\n onExit={() => (this.askingQuestion = false)}\n />\n )}\n </Host>\n );\n }\n}\n"],"names":["h","VerdocsEndpoint","getEnvelopeDocumentPageDisplayUri","throttle","Host","QuestionIcon","SDKError","Store","getEnvelope"],"mappings":";;;;;;;;;;AAAA,MAAM,wBAAwB,GAAG,8tFAA8tF;;ACE/vF,MAAM,YAAY,GAAG,CAAA,+gBAAA,CAAihB;AACtiB,MAAM,eAAe,GAAG,CAAA,qaAAA,CAAua;AAC/b,MAAM,OAAO,GAAG,CAAA,muBAAA,CAAquB;AACrvB,MAAM,YAAY,GAAG,CAAA,+LAAA,CAAiM;AACtN,MAAM,SAAS,GAAG,CAAA,+LAAA,CAAiM;AACnN,MAAM,UAAU,GAAG,CAAA,qJAAA,CAAuJ;AAC1K,MAAM,WAAW,GAAG,CAAA,wTAAA,CAA0T;MAOjU,qBAAqB,GAAA,MAAA;AALlC,IAAA,WAAA,CAAA,OAAA,EAAA;;;;AAm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ACvB,CACL,EACA,CAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,YAAY,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,kBAAkB,MAC9CA,OAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,IAAI,EAAE,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,QAAQ,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,YAAY,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,kBAAkB,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,EAAA,EACjGA,OAA2B,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAA,gBAAA,CAAA,CACzB,CACL,CACG,EAEL,IAAI,CAAC,cAAc,KAClBA,sFACE,MAAM,EAAE,CAAC,IAAG;;AACV,gBAAA,CAAA,EAAA,GAAA,IAAI,CAAC,WAAW,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI,CAAC,EAAC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAC,CAAC;AACrD,gBAAA,IAAI,CAAC,cAAc,GAAG,KAAK;AAC7B,aAAC,EACD,MAAM,EAAE,OAAO,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,GAC3C,CACH,CACI;;;;;;;;;;"}
1
+ {"version":3,"file":"verdocs-download-dialog.verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.cjs.js","sources":["src/components/dialogs/verdocs-download-dialog/verdocs-download-dialog.scss?tag=verdocs-download-dialog","src/components/dialogs/verdocs-download-dialog/verdocs-download-dialog.tsx","src/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.scss?tag=verdocs-envelope-document-page","src/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.tsx","src/components/dialogs/verdocs-question-dialog/verdocs-question-dialog.scss?tag=verdocs-question-dialog","src/components/dialogs/verdocs-question-dialog/verdocs-question-dialog.tsx","src/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.scss?tag=verdocs-sign-footer","src/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-download-dialog {\n box-sizing: border-box;\n font-family: $primary-font;\n\n .heading-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n .polling-indicator {\n margin: -6px 24px 0 0;\n padding: 0 24px;\n color: #9ca3af;\n\n .spinner {\n display: flex;\n animation: rotate 2s linear infinite;\n\n svg {\n width: 20px;\n height: 20px;\n }\n }\n }\n }\n\n .content {\n display: flex;\n flex-direction: column;\n gap: 15px; // Reduced slightly\n padding: 0 24px 20px 24px; // Adjusted top padding\n }\n\n .download-option {\n display: flex;\n align-items: center;\n padding: 12px 15px; // Reduced padding slightly\n border: 1px solid #e5e7eb;\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s ease;\n gap: 15px;\n background: white;\n\n &.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n\n &:hover {\n background-color: white;\n border-color: #e5e7eb;\n }\n }\n\n &:hover {\n border-color: $verdocs-primary-color;\n background-color: #f9fafb;\n }\n }\n\n .icon-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px; // Reduced slightly\n height: 36px;\n background-color: #f3f4f6;\n border-radius: 50%;\n color: #4b5563;\n flex-shrink: 0;\n\n svg {\n width: 18px;\n height: 18px;\n }\n }\n\n .text-container {\n flex: 1;\n\n .label {\n font-weight: 500;\n color: #111827;\n margin-bottom: 2px;\n }\n\n .description {\n font-size: 13px;\n color: #6b7280;\n }\n }\n\n .status-indicator {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 2px;\n font-size: 11px;\n color: #9ca3af;\n min-width: 50px;\n\n .signed {\n color: #10b981;\n }\n\n .unsigned {\n color: #9ca3af;\n }\n\n svg {\n width: 16px;\n height: 16px;\n }\n }\n\n .info-message {\n font-size: 13px;\n color: #6b7280;\n font-style: italic;\n padding: 0 4px;\n }\n\n .arrow {\n color: #9ca3af;\n }\n}\n\n@keyframes rotate {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n}\n","import {Component, h, Event, EventEmitter, Prop} from '@stencil/core';\n\nconst DocumentIcon = `<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').sort((a, b) => (a.order !== b.order ? a.order - b.order : a.created_at.localeCompare(b.created_at)));\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","@import '../../../theme.scss';\n\nverdocs-envelope-document-page {\n width: 100%;\n position: relative;\n\n .verdocs-envelope-document-page-layer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n box-shadow: 0 0 10px 5px #0000000f;\n\n &.img {\n width: 100%;\n }\n }\n}\n","// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {getEnvelopeDocumentPageDisplayUri, VerdocsEndpoint} from '@verdocs/js-sdk';\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-envelope-document-page',\n styleUrl: 'verdocs-envelope-document-page.scss',\n shadow: false,\n})\nexport class VerdocsEnvelopeDocumentPage {\n @Element() container: HTMLElement;\n private resizeObserver: ResizeObserver;\n\n /**\n * The endpoint to load from.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The ID of the envelope the document is for.\n */\n @Prop() envelopeId: string = '';\n\n /**\n * The ID of the document to display.\n */\n @Prop() documentId: string = '';\n\n /**\n * The page number being rendered. (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({mutable: true}) virtualHeight: number = 792;\n\n /**\n * The layers that will be rendered. The DOM structure will be a DIV container with one child DIV for each layer.\n * The parent DIV will have a unique ID, and each child DIV will have that ID with the layer name appended, e.g.\n * if `pages` was ['page', 'fields'] the structure will be:\n *\n * ```\n * <div id=\"verdocs-envelope-document-page-ker2fr1p9\">\n * <div id=\"verdocs-envelope-document-page-ker2fr1p9-page\"></div>\n * <div id=\"verdocs-envelope-document-page-ker2fr1p9-fields\"></div>\n * </div>\n * ```\n */\n @Prop() layers: IPageLayer[] = [{name: 'page', type: 'canvas'}];\n\n @Prop() type: 'original' | 'filled' | 'certificate' = 'original';\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-envelope-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 @State() pageDisplayUri = 'https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png';\n\n async componentWillLoad() {\n this.pageDisplayUri = await getEnvelopeDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber, this.type);\n }\n\n componentDidLoad() {\n this.resizeObserver = new ResizeObserver(\n throttle(entries => {\n for (const entry of entries) {\n const renderedWidth = entry.contentRect.width;\n this.renderedWidth = renderedWidth;\n this.renderedHeight = this.virtualHeight * (renderedWidth / this.virtualWidth);\n }\n\n this.notifyRenderedSize();\n }, 100),\n );\n\n this.resizeObserver.observe(this.container);\n }\n\n 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 documentId: this.documentId,\n pageNumber: this.pageNumber,\n virtualWidth: this.virtualWidth,\n virtualHeight: this.virtualHeight,\n renderedWidth: this.renderedWidth,\n renderedHeight: this.renderedHeight,\n naturalWidth: this.naturalWidth,\n naturalHeight: this.naturalHeight,\n aspectRatio: this.aspectRatio,\n xScale: 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, flex: `0 0 ${height}`}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-envelope-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}} />\n ) : this.pageDisplayUri ? (\n <img\n class=\"verdocs-envelope-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageDisplayUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\n loading=\"lazy\"\n onLoad={(e: any) => {\n // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that\n // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).\n // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values\n // for a field are based on the responsive Web view the Template editor was seeing. The IMG was scaled down there in the\n // exact same way, so we just honor it. We capture the natural width and height here more as information. Then we use the\n // aspect ratio to adjust the \"virtual\" height in case the page is not 8.5\"x11\".\n // TODO: Store this in the DB with each page.\n this.naturalWidth = e.target.naturalWidth;\n this.naturalHeight = e.target.naturalHeight;\n this.aspectRatio = this.naturalWidth / this.naturalHeight;\n this.virtualHeight = this.virtualWidth / this.aspectRatio;\n this.renderedHeight = e.target.offsetWidth / this.aspectRatio;\n }}\n />\n ) : (\n <div></div>\n ),\n )}\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-question-dialog {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n position: fixed;\n box-sizing: border-box;\n font-family: $primary-font;\n\n &.closed {\n display: none;\n }\n\n textarea {\n box-sizing: border-box;\n border: 1px solid $border-color;\n border-radius: 4px;\n background: $verdocs-grey-4;\n color: #000;\n width: 100%;\n font-size: 14px;\n padding: 9px;\n outline: none;\n }\n\n .heading .title {\n font-size: 18px;\n }\n\n .buttons {\n gap: 20px;\n display: flex;\n margin-top: 24px;\n flex-direction: row;\n justify-content: center;\n\n button {\n flex: 1;\n border: 0;\n height: 38px;\n display: flex;\n color: #ffffff;\n font-size: 14px;\n cursor: pointer;\n border-radius: 6px;\n align-items: center;\n justify-content: center;\n\n &.cancel {\n background-color: $verdocs-button-purple;\n }\n\n &.ok {\n background-color: $verdocs-button-green;\n\n &.single {\n max-width: 150px;\n }\n }\n\n &:disabled {\n background-color: $verdocs-button-disabled;\n }\n }\n }\n}\n","import {Component, h, Event, EventEmitter, State, Prop} from '@stencil/core';\n\nconst QuestionIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z\" fill=\"#ffffff\"/></svg>`;\n\n/**\n * Display a simple text dialog box with an Ok button. This adds a partially-transparent overlay and screen-centered dialog\n * box with a message and optional header/title. An OK button is shown that will dismiss the message.\n * It can also be dismissed by clicking the background overlay.\n */\n@Component({\n tag: 'verdocs-question-dialog',\n styleUrl: 'verdocs-question-dialog.scss',\n})\nexport class VerdocsQuestionDialog {\n @Prop({mutable: true}) question: string = '';\n\n /**\n * Event fired when the user clicks the OK button.\n */\n @Event({composed: true}) next: EventEmitter<{question: string}>;\n\n /**\n * Event fired when Cancel is pressed. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n @State() closed = false;\n\n handleOk() {\n this.next.emit({question: this.question});\n }\n\n handleCancel() {\n this.exit.emit();\n }\n\n // We need a separate event handler for clicking the background because it can receive events \"through\" other child components\n handleDismiss(e: any) {\n this.closed = true;\n if (e.target.className === 'background-overlay') {\n e.preventDefault();\n this.exit.emit();\n }\n }\n\n render() {\n return (\n <verdocs-dialog onExit={e => this.handleDismiss(e)}>\n <div slot=\"heading\" class=\"heading\">\n <div class=\"icon\" innerHTML={QuestionIcon} />\n\n <div class=\"title\">Ask the Sender a Question</div>\n </div>\n\n <div slot=\"content\" class=\"content\">\n <textarea name=\"question\" rows={6} placeholder=\"Enter your question...\" onInput={(e: any) => (this.question = e.target.value)}>\n {this.question}\n </textarea>\n </div>\n\n <div class=\"footer\" slot=\"footer\">\n <div class=\"buttons\">\n <button class=\"cancel\" onClick={() => this.handleCancel()}>\n Cancel\n </button>\n <button class={'ok'} onClick={() => this.handleOk()}>\n OK\n </button>\n </div>\n </div>\n </verdocs-dialog>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-sign-footer {\n left: 0;\n right: 0;\n bottom: 0;\n height: 48px;\n display: flex;\n color: #616161;\n position: fixed;\n font-size: 12px;\n padding: 0 24px;\n align-items: center;\n flex-direction: row;\n background: #ffffff;\n container-type: inline-size;\n border-top: 1px solid #e0e0e0;\n justify-content: space-between;\n font-family: $verdocs-primary-font;\n transition: 0.5s cubic-bezier(0.35, 0, 0.25, 1);\n\n a {\n color: #616161;\n cursor: pointer;\n text-decoration: none;\n border-bottom: 1px dotted #616161;\n }\n\n &.loading {\n display: none;\n }\n\n .powered-by {\n white-space: nowrap;\n }\n\n .buttons {\n flex: 0;\n gap: 16px;\n display: flex;\n flex-direction: row;\n white-space: nowrap;\n align-items: center;\n\n button {\n gap: 4px;\n border: none;\n display: flex;\n outline: none;\n cursor: pointer;\n flex-direction: row;\n align-items: center;\n background: transparent;\n }\n\n div {\n gap: 4px;\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n }\n\n .links {\n flex: 0;\n gap: 8px;\n display: flex;\n flex-direction: row;\n white-space: nowrap;\n }\n\n &.just-buttons {\n .buttons {\n flex: 1;\n justify-content: center;\n }\n }\n\n @container (max-width: 720px) {\n &.has-buttons .powered-by {\n display: none;\n }\n }\n\n @container (max-width: 540px) {\n &.no-buttons .powered-by {\n display: none;\n }\n\n &.has-buttons .links {\n display: none;\n }\n\n .buttons {\n flex: 1;\n justify-content: center;\n }\n }\n}\n","import {IEnvelope} from '@verdocs/js-sdk';\nimport {Component, h, Event, EventEmitter, Host, Prop, State} from '@stencil/core';\nimport {getEnvelope, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nconst QuestionIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z\" fill=\"#424242\"/></svg>`;\nconst DeclineIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.14645 7.14645C7.34171 6.95118 7.65829 6.95118 7.85355 7.14645L10 9.29289L12.1464 7.14645C12.3417 6.95118 12.6583 6.95118 12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L10.7071 10L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L10 10.7071L7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536C6.95118 12.6583 6.95118 12.3417 7.14645 12.1464L9.29289 10L7.14645 7.85355C6.95118 7.65829 6.95118 7.34171 7.14645 7.14645ZM3 6C3 4.34315 4.34315 3 6 3H14C15.6569 3 17 4.34315 17 6V14C17 15.6569 15.6569 17 14 17H6C4.34315 17 3 15.6569 3 14V6ZM6 4C4.89543 4 4 4.89543 4 6V14C4 15.1046 4.89543 16 6 16H14C15.1046 16 16 15.1046 16 14V6C16 4.89543 15.1046 4 14 4H6Z\" fill=\"#424242\"/></svg>`;\nconst SaveIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3 5C3 3.89543 3.89543 3 5 3H13.3787C13.9091 3 14.4178 3.21071 14.7929 3.58579L16.4142 5.20711C16.7893 5.58218 17 6.09089 17 6.62132V15C17 16.1046 16.1046 17 15 17H5C3.89543 17 3 16.1046 3 15V5ZM5 4C4.44772 4 4 4.44772 4 5V15C4 15.5523 4.44772 16 5 16L5 11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V16C15.5523 16 16 15.5523 16 15V6.62132C16 6.3561 15.8946 6.10175 15.7071 5.91421L14.0858 4.29289C13.8983 4.10536 13.6439 4 13.3787 4L13 4V6.5C13 7.32843 12.3284 8 11.5 8L7.5 8C6.67157 8 6 7.32843 6 6.5L6 4H5ZM7 4L7 6.5C7 6.77614 7.22386 7 7.5 7L11.5 7C11.7761 7 12 6.77614 12 6.5V4L7 4ZM14 16V11.5C14 11.2239 13.7761 11 13.5 11H6.5C6.22386 11 6 11.2239 6 11.5V16H14Z\" fill=\"#424242\"/></svg>`;\n\n/**\n * Typically presented by the `verdocs-sign` component. Displays a footer toolbar\n * with a few convenience functions for the envelope recipient to use.\n */\n@Component({\n tag: 'verdocs-sign-footer',\n styleUrl: 'verdocs-sign-footer.scss',\n shadow: false,\n})\nexport class VerdocsSignFooter {\n private envelopeListenerId = null;\n\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The envelope ID to render. Set ONE OF templateId or envelopeId. If both are set, envelopeId will be ignored.\n */\n @Prop() envelopeId: string = '';\n\n /**\n * If the recipient is \"done,\" some buttons will be hidden.\n */\n @Prop() isDone = false;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) askQuestion: EventEmitter<{question: string}>;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) decline: EventEmitter;\n\n /**\n * Event fired if the user asks the sender a question. The parent component is responsible for handling this.\n */\n @Event({composed: true}) finishLater: EventEmitter;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the envelope is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.\n */\n // @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n @State() askingQuestion = false;\n @State() declinine = false;\n @State() envelope: IEnvelope | null = null;\n\n async componentWillLoad() {\n try {\n // NOTE: The caller must have a signing session already active and shared to us via\n // the endpoint property.\n if (!this.envelopeId) {\n console.log(`[FOOTER] Missing required envelope ID ${this.envelopeId}`);\n return;\n }\n\n this.listenToEnvelope();\n } catch (e) {\n console.log('[FOOTER] Error loading envelope', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n disconnectedCallback() {\n this.unlistenToEnvelope();\n }\n\n async listenToEnvelope() {\n console.log('[FOOTER] Loading envelope', this.envelopeId);\n this.unlistenToEnvelope();\n Store.subscribe(\n 'envelopes',\n this.envelopeId,\n () => getEnvelope(this.endpoint, this.envelopeId),\n false,\n (envelope: IEnvelope) => {\n this.envelope = envelope;\n },\n );\n }\n\n unlistenToEnvelope() {\n if (this.envelopeListenerId) {\n Store.store.delListener(this.envelopeListenerId);\n this.envelopeListenerId = null;\n }\n }\n\n // handleRecipientAction(recipient: IRecipient, id: string) {\n // console.log('[SIDEBAR] Recipient action', id, recipient);\n // switch (id) {\n // case 'update':\n // this.showUpdateDialog = recipient.role_name;\n // break;\n //\n // case 'reminder':\n // remindRecipient(this.endpoint, this.envelopeId, recipient.role_name)\n // .then(() => {\n // VerdocsToast('Reminder Sent', {style: 'success'});\n // })\n // .catch(e => {\n // console.log('[SIDEBAR] Error resending invitation', e);\n // VerdocsToast('Error resending invitation: ' + e.message, {style: 'error'});\n // });\n // break;\n //\n // case 'reinvite':\n // this.showReinviteDialog = recipient.role_name;\n // break;\n //\n // case 'inperson':\n // this.showRecipientDialog = recipient.role_name;\n // break;\n //\n // case 'modify':\n // VerdocsToast('This feature will be enabled in a future release. Please try again later.', {style: 'info'});\n // break;\n //\n // case 'details':\n // VerdocsToast('This feature will be enabled in a future release. Please try again later.', {style: 'info'});\n // break;\n // }\n // }\n\n // handleUpdateRecipient(originalRecipient: IRecipient, updatedRecipient: IRecipient) {\n // console.log('Updating recipient', originalRecipient, updatedRecipient);\n // const fields: any = {};\n // if (updatedRecipient.email !== originalRecipient.email) {\n // fields.email = updatedRecipient.email;\n // }\n // if (updatedRecipient.phone !== originalRecipient.phone) {\n // fields.phone = updatedRecipient.phone;\n // }\n // if (updatedRecipient.message !== originalRecipient.message) {\n // fields.message = updatedRecipient.message;\n // }\n // if (updatedRecipient.first_name !== originalRecipient.first_name) {\n // fields.first_name = updatedRecipient.first_name;\n // }\n // if (updatedRecipient.last_name !== originalRecipient.last_name) {\n // fields.last_name = updatedRecipient.last_name;\n // }\n //\n // if (Object.keys(fields).length > 0) {\n // updateRecipient(this.endpoint, this.envelopeId, originalRecipient.role_name, fields)\n // .then(r => {\n // // TODO: Reload the envelope?\n // VerdocsToast('Recipient updated', {style: 'success'});\n // console.log('[SIDEBAR] Updated recipient', r);\n // Store.getEnvelope(this.endpoint, this.envelopeId, true);\n // this.showUpdateDialog = '';\n // })\n // .catch(e => {\n // VerdocsToast(e.response.data.error, {style: 'error'});\n // this.showUpdateDialog = '';\n // });\n // } else {\n // this.showUpdateDialog = '';\n // }\n // }\n\n render() {\n const hasPoweredBy = !!this.envelope?.organization?.powered_by_label;\n const hasLinks = !!this.envelope?.organization?.terms_use_url || !!this.envelope?.organization?.privacy_policy_url;\n const hasButtons = !this.isDone;\n\n return (\n <Host class={{'has-buttons': hasButtons, 'no-buttons': !hasButtons, 'has-powered-by': hasPoweredBy, 'has-links': hasLinks, 'just-buttons': !hasPoweredBy && !hasLinks}}>\n {this.envelope?.organization?.powered_by_label && (\n <div class=\"powered-by\">\n {this.envelope?.organization?.powered_by_url ? (\n <a href={this.envelope?.organization?.powered_by_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>{this.envelope?.organization?.powered_by_label}</span>\n </a>\n ) : (\n <span>{this.envelope?.organization?.powered_by_label}</span>\n )}\n </div>\n )}\n\n {!this.isDone && (\n <div class=\"buttons\">\n <button onClick={() => (this.askingQuestion = true)}>\n <span innerHTML={QuestionIcon} />\n Ask Sender a Question\n </button>\n <button onClick={() => this.decline?.emit()}>\n <span innerHTML={DeclineIcon} />\n Decline Signing\n </button>\n <button onClick={() => this.finishLater?.emit()}>\n <span innerHTML={SaveIcon} />\n Finish Later\n </button>\n </div>\n )}\n\n <div class=\"links\">\n {this.envelope?.organization?.terms_use_url && (\n <a href={this.envelope?.organization?.terms_use_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>Terms of Use</span>\n </a>\n )}\n {this.envelope?.organization?.privacy_policy_url && (\n <a href={this.envelope?.organization?.privacy_policy_url} target=\"_blank\" rel=\"noopener noreferrer\">\n <span>Privacy Policy</span>\n </a>\n )}\n </div>\n\n {this.askingQuestion && (\n <verdocs-question-dialog\n onNext={e => {\n this.askQuestion?.emit({question: e.detail.question});\n this.askingQuestion = false;\n }}\n onExit={() => (this.askingQuestion = false)}\n />\n )}\n </Host>\n );\n }\n}\n"],"names":["h","VerdocsEndpoint","getEnvelopeDocumentPageDisplayUri","throttle","Host","QuestionIcon","SDKError","Store","getEnvelope"],"mappings":";;;;;;;;;;AAAA,MAAM,wBAAwB,GAAG,mvFAAmvF;;ACEpxF,MAAM,YAAY,GAAG,CAAA,+gBAAA,CAAihB;AACtiB,MAAM,eAAe,GAAG,CAAA,qaAAA,CAAua;AAC/b,MAAM,OAAO,GAAG,CAAA,muBAAA,CAAquB;AACrvB,MAAM,YAAY,GAAG,CAAA,+LAAA,CAAiM;AACtN,MAAM,SAAS,GAAG,CAAA,+LAAA,CAAiM;AACnN,MAAM,UAAU,GAAG,CAAA,qJAAA,CAAuJ;AAC1K,MAAM,WAAW,GAAG,CAAA,wTAAA,CAA0T;MAOjU,qBAAqB,GAAA,MAAA;AALlC,IAAA,WAAA,CAAA,OAAA,EAAA;;;;AAmBE;;AAEG;AACK,QAAA,IAAM,CAAA,MAAA,GAAG,KAAK;AAEtB;;AAEG;AACK,QAAA,IAAO,CAAA,OAAA,GAAG,KAAK;AAEvB;;AAEG;AACK,QAAA,IAAS,CAAA,SAAA,GAAU,EAAE;AAE7B;;AAEG;AACK,QAAA,IAAc,CAAA,cAAA,GAAG,KAAK;AA8E/B;IA5EC,iBAAiB,CAAC,MAA0C,EAAE,UAAmB,EAAA;QAC/E,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,aAAa,CAAC,IAAI,IAAI,CAAC,cAAc;AACzF,QAAA,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,IAAI,OAAO;AAE9C,QAAA,IAAI,CAAC,MAAM,KAAK,aAAa,IAAI,MAAM,KAAK,KAAK,KAAK,CAAC,eAAe,EAA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,EACjGA,OAA2B,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAA,gBAAA,CAAA,CACzB,CACL,CACG,EAEL,IAAI,CAAC,cAAc,KAClBA,sFACE,MAAM,EAAE,CAAC,IAAG;;AACV,gBAAA,CAAA,EAAA,GAAA,IAAI,CAAC,WAAW,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI,CAAC,EAAC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAC,CAAC;AACrD,gBAAA,IAAI,CAAC,cAAc,GAAG,KAAK;AAC7B,aAAC,EACD,MAAM,EAAE,OAAO,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,GAC3C,CACH,CACI;;;;;;;;;;"}
@@ -8,7 +8,7 @@ var Datastore = require('./Datastore-B-sxWSPD.js');
8
8
  require('./index-CeUF44L9.js');
9
9
  require('./Types-YJQtg77a.js');
10
10
 
11
- const verdocsDownloadDialogCss = "verdocs-download-dialog{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-download-dialog .heading-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}verdocs-download-dialog .heading-container .polling-indicator{padding:0 24px;color:#9ca3af}verdocs-download-dialog .heading-container .polling-indicator .spinner{display:-ms-flexbox;display:flex;-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}verdocs-download-dialog .heading-container .polling-indicator .spinner svg{width:20px;height:20px}verdocs-download-dialog .content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:15px;padding:0 24px 20px 24px}verdocs-download-dialog .download-option{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:12px 15px;border:1px solid #e5e7eb;border-radius:6px;cursor:pointer;-webkit-transition:all 0.2s ease;transition:all 0.2s ease;gap:15px;background:white}verdocs-download-dialog .download-option.disabled{opacity:0.5;cursor:not-allowed}verdocs-download-dialog .download-option.disabled:hover{background-color:white;border-color:#e5e7eb}verdocs-download-dialog .download-option:hover{border-color:#654dcb;background-color:#f9fafb}verdocs-download-dialog .icon-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:36px;height:36px;background-color:#f3f4f6;border-radius:50%;color:#4b5563;-ms-flex-negative:0;flex-shrink:0}verdocs-download-dialog .icon-container svg{width:18px;height:18px}verdocs-download-dialog .text-container{-ms-flex:1;flex:1}verdocs-download-dialog .text-container .label{font-weight:500;color:#111827;margin-bottom:2px}verdocs-download-dialog .text-container .description{font-size:13px;color:#6b7280}verdocs-download-dialog .status-indicator{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;gap:2px;font-size:11px;color:#9ca3af;min-width:50px}verdocs-download-dialog .status-indicator .signed{color:#10b981}verdocs-download-dialog .status-indicator .unsigned{color:#9ca3af}verdocs-download-dialog .status-indicator svg{width:16px;height:16px}verdocs-download-dialog .info-message{font-size:13px;color:#6b7280;font-style:italic;padding:0 4px}verdocs-download-dialog .arrow{color:#9ca3af}@-webkit-keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}";
11
+ const verdocsDownloadDialogCss = "verdocs-download-dialog{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-download-dialog .heading-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}verdocs-download-dialog .heading-container .polling-indicator{margin:-6px 24px 0 0;padding:0 24px;color:#9ca3af}verdocs-download-dialog .heading-container .polling-indicator .spinner{display:-ms-flexbox;display:flex;-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}verdocs-download-dialog .heading-container .polling-indicator .spinner svg{width:20px;height:20px}verdocs-download-dialog .content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:15px;padding:0 24px 20px 24px}verdocs-download-dialog .download-option{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:12px 15px;border:1px solid #e5e7eb;border-radius:6px;cursor:pointer;-webkit-transition:all 0.2s ease;transition:all 0.2s ease;gap:15px;background:white}verdocs-download-dialog .download-option.disabled{opacity:0.5;cursor:not-allowed}verdocs-download-dialog .download-option.disabled:hover{background-color:white;border-color:#e5e7eb}verdocs-download-dialog .download-option:hover{border-color:#654dcb;background-color:#f9fafb}verdocs-download-dialog .icon-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:36px;height:36px;background-color:#f3f4f6;border-radius:50%;color:#4b5563;-ms-flex-negative:0;flex-shrink:0}verdocs-download-dialog .icon-container svg{width:18px;height:18px}verdocs-download-dialog .text-container{-ms-flex:1;flex:1}verdocs-download-dialog .text-container .label{font-weight:500;color:#111827;margin-bottom:2px}verdocs-download-dialog .text-container .description{font-size:13px;color:#6b7280}verdocs-download-dialog .status-indicator{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;gap:2px;font-size:11px;color:#9ca3af;min-width:50px}verdocs-download-dialog .status-indicator .signed{color:#10b981}verdocs-download-dialog .status-indicator .unsigned{color:#9ca3af}verdocs-download-dialog .status-indicator svg{width:16px;height:16px}verdocs-download-dialog .info-message{font-size:13px;color:#6b7280;font-style:italic;padding:0 4px}verdocs-download-dialog .arrow{color:#9ca3af}@-webkit-keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}";
12
12
 
13
13
  const DocumentIcon = `<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>`;
14
14
  const 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>`;
@@ -8,6 +8,7 @@ verdocs-download-dialog .heading-container {
8
8
  align-items: center;
9
9
  }
10
10
  verdocs-download-dialog .heading-container .polling-indicator {
11
+ margin: -6px 24px 0 0;
11
12
  padding: 0 24px;
12
13
  color: #9ca3af;
13
14
  }
@@ -4,7 +4,7 @@ import { V as VerdocsToast } from './p-CyvDgtoV.js';
4
4
  import { S as SDKError } from './p-C1sRVZWv.js';
5
5
  import { S as Store } from './p-bS8INhRF.js';
6
6
  import { d as defineCustomElement$8 } from './p-CO3KQG1e.js';
7
- import { d as defineCustomElement$7 } from './p-C0_V6_aB.js';
7
+ import { d as defineCustomElement$7 } from './p-C3gOLT8d.js';
8
8
  import { d as defineCustomElement$6 } from './p-DKO4_Yp9.js';
9
9
  import { d as defineCustomElement$5 } from './p-CHLvWYEx.js';
10
10
  import { d as defineCustomElement$4 } from './p-Bt8fO1FH.js';
@@ -412,6 +412,6 @@ function defineCustomElement() {
412
412
  }
413
413
 
414
414
  export { VerdocsView as V, defineCustomElement as d };
415
- //# sourceMappingURL=p-BgNYe7h9.js.map
415
+ //# sourceMappingURL=p-BmuvbqHK.js.map
416
416
 
417
- //# sourceMappingURL=p-BgNYe7h9.js.map
417
+ //# sourceMappingURL=p-BmuvbqHK.js.map
@@ -1 +1 @@
1
- {"file":"p-BgNYe7h9.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,cAAc,GAAG,iyHAAiyH;;ACMxzH;;;;;;;;;;AAUG;AACH,MAAM,gBAAgB,GAAG,CAAA,6pBAAA,CAA+pB;AACxrB,MAAM,eAAe,GAAG,CAAA,iyBAAA,CAAmyB;AAC3zB,MAAM,mBAAmB,GAAG,CAAA,g3BAAA,CAAk3B;AAC94B,MAAM,gBAAgB,GAAG,CAAA,izBAAA,CAAmzB;MAO/zB,WAAW,iBAAAA,kBAAA,CAAA,MAAA,WAAA,SAAAC,CAAA,CAAA;AALxB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;;;AAMU,QAAA,IAAkB,CAAA,kBAAA,GAAG,IAAI;AAIjC;;AAEG;AACK,QAAA,IAAQ,CAAA,QAAA,GAA2B,IAAI;AAE/C;;AAEG;AACK,QAAA,IAAU,CAAA,UAAA,GAAW,EAAE;AAE/B;;;;;;;;AAQG;AACK,QAAA,IAAc,CAAA,cAAA,GAAkB,IAAI;AA8BnC,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK;AACjB,QAAA,IAAc,CAAA,cAAA,GAAG,KAAK;AACtB,QAAA,IAAa,CAAA,aAAA,GAAG,KAAK;AAErB,QAAA,IAAO,CAAA,OAAA,GAAG,IAAI;AACd,QAAA,IAAQ,CAAA,QAAA,GAAqB,IAAI;AACjC,QAAA,IAAS,CAAA,SAAA,GAAiC,QAAQ;AAClD,QAAA,IAAkB,CAAA,kBAAA,GAAG,KAAK;AAC1B,QAAA,IAAO,CAAA,OAAA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oBAAA,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE,GAAG,CAAC;oBACpC,YAAY,CAAC,sCAAsC,EAAE,EAAC,KAAK,EAAE,OAAO,EAAC,CAAC;;aAEzE,GACD,CACH,EAEA,CAAC,UAAU,KACV,CAAA,CAAA,qBAAA,EAAA,EAAqB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,MAAK,GAAG,EAAE,SAAS,EAAE,MAAK,GAAG,EAAE,aAAa,EAAE,MAAK,GAAG,GAAI,CACnK,CACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/embeds/verdocs-view/verdocs-view.scss?tag=verdocs-view","src/components/embeds/verdocs-view/verdocs-view.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-view {\n display: flex;\n overflow: hidden;\n min-height: 600px;\n position: relative;\n flex-direction: column;\n box-sizing: border-box;\n font-family: $verdocs-primary-font;\n background-color: #f5f5f5;\n\n div,\n canvas {\n box-sizing: border-box;\n }\n\n .document {\n flex: 1;\n width: 100%;\n height: 100%;\n display: flex;\n // padding: 15px; // Reduced padding for zoom container\n row-gap: 15px;\n min-height: 200px;\n max-width: 1200px;\n position: relative;\n overflow-y: scroll;\n align-items: center;\n box-sizing: border-box;\n flex-direction: column;\n padding-right: 15px;\n\n .inner {\n width: 100%;\n max-width: 1028px;\n }\n }\n\n .signed-document-container {\n width: 64%;\n margin: 0 auto;\n transition: all 0.3s ease;\n padding: 15px;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 15px;\n\n &.zoom-normal {\n width: 64%;\n }\n\n &.zoom-zoom1 {\n width: 80%;\n }\n\n &.zoom-zoom2 {\n width: 100%;\n }\n }\n\n @media (max-width: 768px) {\n .signed-document-container {\n width: 100%;\n\n &.zoom-normal,\n &.zoom-zoom1,\n &.zoom-zoom2 {\n width: 100%;\n }\n }\n\n // Hide toolbars on mobile\n .controls-toolbar {\n .center-controls {\n display: none;\n }\n\n .right-controls {\n .icon-button {\n &.minus,\n &.plus {\n display: none;\n }\n }\n }\n }\n }\n\n .loading-indicator {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n z-index: 10000;\n position: fixed;\n background-color: rgba(0, 0, 0, 0.7);\n justify-content: center;\n align-items: center;\n }\n\n verdocs-ok-dialog .background-overlay {\n align-items: flex-start;\n padding-top: 100px;\n }\n}\n\n// Styled separately because this toolbar can be reparented\n#verdocs-view-header {\n // Use .controls-toolbar styles here\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 54px;\n padding: 0 12px 0 24px;\n background-color: #ffffff;\n border-bottom: 1px solid #e0e0e0;\n box-shadow: none;\n font-family: 'Inter', sans-serif;\n color: #424242;\n z-index: 1000;\n width: 100%;\n box-sizing: border-box;\n\n .left-controls {\n flex: 1;\n display: flex;\n align-items: center;\n\n .title {\n font-weight: 500;\n font-size: 16px;\n color: #242424;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n }\n\n .center-controls {\n flex: 1;\n display: none; // Hidden for now\n align-items: center;\n justify-content: center;\n gap: 10px;\n font-size: 14px;\n }\n\n .right-controls {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n\n .icon-button {\n width: 32px;\n height: 32px;\n display: flex;\n color: #424242;\n cursor: pointer;\n align-items: center;\n justify-content: center;\n transition: background-color 0.2s;\n\n &:hover {\n background-color: #f5f5f5;\n }\n\n &.disabled {\n opacity: 0.3;\n pointer-events: none;\n }\n\n svg {\n display: block;\n width: 20px;\n height: 20px;\n }\n }\n }\n}\n\n@media print {\n #verdocs-view-header {\n display: none !important;\n }\n\n verdocs-view {\n min-height: auto;\n background-color: white;\n\n .document {\n overflow: visible;\n height: auto;\n display: block;\n padding: 0;\n }\n\n .signed-document-container {\n width: 100%;\n margin: 0;\n }\n }\n}\n","import {cancelEnvelope, getEnvelopeDocumentDownloadLink, getEnvelope, IEnvelope, integerSequence, userCanCancelEnvelope, VerdocsEndpoint, getEnvelopesZip} from '@verdocs/js-sdk';\nimport {Component, h, Element, Event, Host, Prop, EventEmitter, Fragment, State} from '@stencil/core';\nimport {VerdocsToast} from '../../../utils/Toast';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Render the documents attached to an envelope in read-only (view) mode. All documents are\n * displayed in order.\n *\n * ```ts\n * <verdocs-view\n * envelopeId={ENVELOPE_ID}\n * onSdkError={({ detail }) => { console.log('SDK error', detail) }\n * />\n * ```\n */\nconst ToolbarMinusIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11 8C11.2761 8 11.5 8.22386 11.5 8.5C11.5 8.77614 11.2761 9 11 9H6C5.72386 9 5.5 8.77614 5.5 8.5C5.5 8.22386 5.72386 8 6 8H11ZM14 8.5C14 5.46243 11.5376 3 8.5 3C5.46243 3 3 5.46243 3 8.5C3 11.5376 5.46243 14 8.5 14C9.83879 14 11.0659 13.5217 12.0196 12.7266L16.1464 16.8536L16.2157 16.9114C16.4106 17.0464 16.68 17.0271 16.8536 16.8536C17.0488 16.6583 17.0488 16.3417 16.8536 16.1464L12.7266 12.0196C13.5217 11.0659 14 9.83879 14 8.5ZM4 8.5C4 6.01472 6.01472 4 8.5 4C10.9853 4 13 6.01472 13 8.5C13 10.9853 10.9853 13 8.5 13C6.01472 13 4 10.9853 4 8.5Z\" fill=\"#424242\" /></svg>`;\nconst ToolbarPlusIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.5 8.5C11.5 8.22386 11.2761 8 11 8H9V6C9 5.72386 8.77614 5.5 8.5 5.5C8.22386 5.5 8 5.72386 8 6V8H6C5.72386 8 5.5 8.22386 5.5 8.5C5.5 8.77614 5.72386 9 6 9H8V11C8 11.2761 8.22386 11.5 8.5 11.5C8.77614 11.5 9 11.2761 9 11V9H11C11.2761 9 11.5 8.77614 11.5 8.5ZM8.5 3C11.5376 3 14 5.46243 14 8.5C14 9.83879 13.5217 11.0659 12.7266 12.0196L16.8536 16.1464C17.0488 16.3417 17.0488 16.6583 16.8536 16.8536C16.68 17.0271 16.4106 17.0464 16.2157 16.9114L16.1464 16.8536L12.0196 12.7266C11.0659 13.5217 9.83879 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3ZM8.5 4C6.01472 4 4 6.01472 4 8.5C4 10.9853 6.01472 13 8.5 13C10.9853 13 13 10.9853 13 8.5C13 6.01472 10.9853 4 8.5 4Z\" fill=\"#424242\" /></svg>`;\nconst ToolbarDownloadIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M15.5 16.9988C15.7761 16.9988 16 17.2226 16 17.4988C16 17.7442 15.8231 17.9484 15.5899 17.9907L15.5 17.9988H4.5C4.22386 17.9988 4 17.7749 4 17.4988C4 17.2533 4.17688 17.0492 4.41012 17.0068L4.5 16.9988H15.5ZM10.0001 2.00098C10.2456 2.00098 10.4497 2.17798 10.492 2.41124L10.5 2.50112L10.496 14.295L14.1414 10.6466C14.3148 10.4729 14.5842 10.4534 14.7792 10.5882L14.8485 10.646C15.0222 10.8194 15.0418 11.0888 14.907 11.2838L14.8492 11.3531L10.3574 15.8531C10.285 15.9257 10.1957 15.9714 10.1021 15.9901L9.99608 15.9999C9.83511 15.9999 9.69192 15.9237 9.60051 15.8056L5.14386 11.3537C4.94846 11.1586 4.94823 10.842 5.14336 10.6466C5.3168 10.4729 5.58621 10.4534 5.78117 10.5883L5.85046 10.6461L9.496 14.287L9.5 2.50083C9.50008 2.22469 9.724 2.00098 10.0001 2.00098Z\" fill=\"#424242\"/></svg>`;\nconst ToolbarPrintIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5 4.5C5 3.67157 5.67157 3 6.5 3H13.5C14.3284 3 15 3.67157 15 4.5V5H15.5C16.8807 5 18 6.11929 18 7.5V12.5C18 13.3284 17.3284 14 16.5 14H15V15.5C15 16.3284 14.3284 17 13.5 17H6.5C5.67157 17 5 16.3284 5 15.5V14H3.5C2.67157 14 2 13.3284 2 12.5V7.5C2 6.11929 3.11929 5 4.5 5H5V4.5ZM6 5H14V4.5C14 4.22386 13.7761 4 13.5 4H6.5C6.22386 4 6 4.22386 6 4.5V5ZM5 13V11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V13H16.5C16.7761 13 17 12.7761 17 12.5V7.5C17 6.67157 16.3284 6 15.5 6H4.5C3.67157 6 3 6.67157 3 7.5V12.5C3 12.7761 3.22386 13 3.5 13H5ZM6.5 11C6.22386 11 6 11.2239 6 11.5V15.5C6 15.7761 6.22386 16 6.5 16H13.5C13.7761 16 14 15.7761 14 15.5V11.5C14 11.2239 13.7761 11 13.5 11H6.5Z\" fill=\"#424242\"/></svg>`;\n\n@Component({\n tag: 'verdocs-view',\n styleUrl: 'verdocs-view.scss',\n shadow: false,\n})\nexport class VerdocsView {\n private envelopeListenerId = null;\n\n @Element() component: HTMLElement;\n\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint | null = null;\n\n /**\n * The envelope ID to render. Set ONE OF templateId or envelopeId. If both are set, envelopeId will be ignored.\n */\n @Prop() envelopeId: string = '';\n\n /**\n * If set, (recommended), the host application should create a <DIV> element with a unique ID. When this\n * component renders, the header will be removed from its default location and placed in the target element.\n * This allows the parent application to more easily control its placement and scroll effects (e.g. \"fixed\").\n *\n * The movement of the header to the target container is not dynamic - it is performed only on the initial\n * render. Host applications should not conditionally render this container. If the header's visibility must\n * be externally controlled, use CSS display options to hide/show it instead.\n */\n @Prop() headerTargetId: 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. May be used for tasks such as cache invalidation or reporting to other systems.\n */\n @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n /**\n * Event fired when the user clicks Send Another to proceed. It is up to the host application\n * to redirect the user to the appropriate next workflow step.\n */\n @Event({composed: true}) another: EventEmitter;\n\n /**\n * Event fired when the user clicks Send Another to proceed. It is up to the host application\n * to redirect the user to the appropriate next workflow step.\n */\n @Event({composed: true}) view: EventEmitter;\n\n /**\n * Event fired when the user clicks Done to proceed. It is up to the host application\n * to redirect the user to the appropriate next workflow step.\n */\n @Event({composed: true}) next: EventEmitter;\n @State() canceling = false;\n @State() showCancelDone = false;\n @State() showLoadError = false;\n\n @State() loading = true;\n @State() envelope: IEnvelope | null = null;\n @State() zoomLevel: 'normal' | 'zoom1' | 'zoom2' = 'normal';\n @State() showDownloadDialog = false;\n @State() polling = false;\n\n private pollingInterval: any = null;\n\n async componentWillLoad() {\n this.updateZoomFromWindow();\n window.addEventListener('resize', () => this.updateZoomFromWindow());\n if (!this.endpoint) {\n this.endpoint = VerdocsEndpoint.getDefault();\n this.endpoint.loadSession();\n }\n\n if (!this.envelopeId) {\n console.error(`[VIEW] Missing required envelopeId`);\n return;\n }\n\n await this.listenToEnvelope();\n\n if (!this.envelope) {\n try {\n console.log('[VIEW] Loading envelope...');\n this.envelope = await getEnvelope(this.endpoint, this.envelopeId);\n console.log('[VIEW] Loaded envelope', this.envelope);\n } catch (e) {\n this.showLoadError = true;\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n }\n\n componentDidRender() {\n const headerTarget = this.headerTargetId ? document.getElementById(this.headerTargetId) : null;\n const headerEl = document.getElementById('verdocs-view-header');\n if (headerTarget && headerEl) {\n console.log('[VIEW] Moving header');\n headerEl.remove();\n headerTarget.append(headerEl);\n }\n }\n\n disconnectedCallback() {\n this.stopPolling();\n this.unlistenToEnvelope();\n window.removeEventListener('resize', () => this.updateZoomFromWindow());\n }\n\n updateZoomFromWindow() {\n const width = window.innerWidth;\n if (width < 768) {\n if (this.zoomLevel !== 'zoom2') this.zoomLevel = 'zoom2';\n } else if (width < 1024) {\n if (this.zoomLevel !== 'zoom1') this.zoomLevel = 'zoom1';\n } else {\n if (this.zoomLevel !== 'normal') this.zoomLevel = 'normal';\n }\n }\n\n async listenToEnvelope() {\n console.log('[VIEW] Loading envelope', this.envelopeId);\n this.unlistenToEnvelope();\n Store.subscribe(\n 'envelopes',\n this.envelopeId,\n () => getEnvelope(this.endpoint, this.envelopeId),\n true,\n (envelope: IEnvelope) => {\n this.envelope = envelope;\n this.loading = false;\n },\n );\n }\n\n unlistenToEnvelope() {\n if (this.envelopeListenerId) {\n Store.store.delListener(this.envelopeListenerId);\n this.envelopeListenerId = null;\n }\n }\n\n handlePageRendered(_e: any) {\n // const pageInfo = e.detail as IDocumentPageInfo;\n // console.log('[VIEW] Page rendered', pageInfo);\n }\n\n async handleOptionSelected(e: any) {\n switch (e.detail.id) {\n case 'cancel':\n // TODO: Better option for inline-flow confirmation and alert dialogs.\n if (confirm('Are you sure you wish to cancel this envelope? This action cannot be undone.')) {\n this.canceling = true;\n cancelEnvelope(this.endpoint, this.envelopeId)\n .then(r => {\n this.canceling = false;\n console.log('[VIEW] Envelope canceled', r);\n return getEnvelope(this.endpoint, this.envelopeId);\n })\n .then(env => {\n console.log('[VIEW] Loaded new envelope details', env);\n this.envelope = env;\n })\n .catch(e => {\n this.canceling = false;\n console.log('[VIEW] Error canceling envelope', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n this.showCancelDone = true;\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'canceled'});\n }\n break;\n\n case 'print':\n window.print();\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'printed'});\n break;\n\n case 'download':\n this.showDownloadDialog = true;\n this.startPolling();\n break;\n\n case 'download-attachments':\n // TODO: Multiple document support\n try {\n const firstDoc = this.envelope.documents.find(doc => doc.type === 'attachment');\n if (firstDoc) {\n const url = await getEnvelopeDocumentDownloadLink(this.endpoint, firstDoc.id);\n window.open(url, '_blank');\n }\n } catch (e) {\n console.log('Unable to download document', e);\n VerdocsToast(e.response?.data?.error || 'Unable to download document. Please try again later.', {style: 'error'});\n }\n break;\n\n case 'download-certificate':\n // TODO: Multiple certificate support\n {\n const firstCert = this.envelope.documents.find(doc => doc.type === 'certificate');\n if (firstCert) {\n const url = await getEnvelopeDocumentDownloadLink(this.endpoint, firstCert.id);\n window.open(url, '_blank');\n }\n }\n break;\n\n case 'download-all':\n getEnvelopesZip(this.endpoint, [this.envelope.id])\n .then(() => {\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'downloaded'});\n })\n .catch(e => {\n console.log('Error downloading Zip', e);\n });\n break;\n }\n }\n\n startPolling() {\n this.stopPolling();\n\n const checkPollingConditions = () => {\n // NOTE: Polling logic for finalizing envelope\n const isSigned = this.envelope?.status === 'complete' || !!this.envelope?.signed;\n const hasCertificate = this.envelope?.documents?.some(d => d.type === 'certificate');\n const allRecipientsSubmitted = this.envelope?.recipients?.every(r => r.status === 'submitted');\n\n if (isSigned && hasCertificate) return false;\n if (!allRecipientsSubmitted) return false;\n\n return true;\n };\n\n if (!checkPollingConditions()) {\n return;\n }\n\n this.polling = true;\n this.pollingInterval = setInterval(async () => {\n try {\n const envelope = await getEnvelope(this.endpoint, this.envelopeId);\n this.envelope = envelope;\n Store.updateEnvelope(this.envelopeId, envelope);\n\n if (!checkPollingConditions()) {\n this.stopPolling();\n }\n } catch (e) {\n console.error('[VIEW] Polling error', e);\n this.stopPolling();\n }\n }, 5000);\n }\n\n stopPolling() {\n if (this.pollingInterval) {\n clearInterval(this.pollingInterval);\n this.pollingInterval = null;\n }\n this.polling = false;\n }\n\n handleZoomIn() {\n if (this.zoomLevel === 'normal') {\n this.zoomLevel = 'zoom1';\n } else if (this.zoomLevel === 'zoom1') {\n this.zoomLevel = 'zoom2';\n }\n }\n\n handleZoomOut() {\n if (this.zoomLevel === 'zoom1') {\n this.zoomLevel = 'normal';\n } else if (this.zoomLevel === 'zoom2') {\n this.zoomLevel = 'zoom1';\n }\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n if (this.showLoadError) {\n return (\n <Host>\n <verdocs-ok-dialog\n heading=\"Unable to View Envelope\"\n message={`Sorry, that envelope is not valid.`}\n buttonLabel=\"OK\"\n onNext={() => {\n this.showLoadError = false;\n }}\n />\n </Host>\n );\n }\n\n if (!this.envelope) {\n return (\n <Host>\n <img\n src=\"https://public-assets.verdocs.com/loading-placeholder.png\"\n style={{width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px'}}\n alt=\"Placeholder page\"\n />\n </Host>\n );\n }\n\n // TODO: Review whether we want a different trigger for this.\n const showFooter = userCanCancelEnvelope(this.endpoint.profile, this.envelope);\n\n return (\n <Host>\n <div class=\"controls-toolbar\" id=\"verdocs-view-header\">\n <div class=\"left-controls\">\n <div class=\"title\">{this.envelope.name}</div>\n </div>\n <div class=\"center-controls\">{/* Pagination controls hidden for now */}</div>\n <div class=\"right-controls\">\n <div class={{'icon-button': true, 'minus': true, 'disabled': this.zoomLevel === 'normal'}} innerHTML={ToolbarMinusIcon} onClick={() => this.handleZoomOut()} />\n <div class={{'icon-button': true, 'plus': true, 'disabled': this.zoomLevel === 'zoom2'}} innerHTML={ToolbarPlusIcon} onClick={() => this.handleZoomIn()} />\n <div class=\"icon-button download\" innerHTML={ToolbarDownloadIcon} onClick={() => this.handleOptionSelected({detail: {id: 'download'}})} />\n <div class=\"icon-button print\" innerHTML={ToolbarPrintIcon} onClick={() => this.handleOptionSelected({detail: {id: 'print'}})} />\n </div>\n </div>\n\n <div class={`document signed-document-container zoom-${this.zoomLevel}`} style={{paddingTop: this.headerTargetId ? '70px' : '15px'}}>\n {(this.envelope?.documents || [])\n .filter(document => document.type !== 'certificate')\n .map(envelopeDocument => {\n const pageNumbers = integerSequence(1, envelopeDocument.pages);\n\n return (\n <Fragment>\n {pageNumbers.map(pageNumber => {\n const pageSize = envelopeDocument.page_sizes?.[pageNumber] || {width: 612, height: 792};\n\n return (\n <verdocs-envelope-document-page\n envelopeId={this.envelopeId}\n documentId={envelopeDocument.id}\n endpoint={this.endpoint}\n type=\"filled\"\n virtualWidth={pageSize.width}\n virtualHeight={pageSize.height}\n pageNumber={pageNumber}\n onPageRendered={e => this.handlePageRendered(e)}\n layers={[\n {name: 'page', type: 'canvas'},\n {name: 'controls', type: 'div'},\n ]}\n />\n );\n })}\n </Fragment>\n );\n })}\n </div>\n\n {this.showCancelDone && (\n <verdocs-ok-dialog\n heading=\"Cancelled\"\n message={`This envelope has been cancelled successfully.`}\n onNext={() => {\n this.showCancelDone = false;\n }}\n />\n )}\n\n {this.canceling && (\n <div class=\"loading-indicator\">\n <verdocs-loader />\n </div>\n )}\n\n {this.showDownloadDialog && (\n <verdocs-download-dialog\n signed={this.envelope.status === 'complete' || this.envelope.signed}\n polling={this.polling}\n documents={this.envelope.documents}\n onExit={() => {\n this.showDownloadDialog = false;\n this.stopPolling();\n }}\n onNext={async e => {\n this.showDownloadDialog = false;\n this.stopPolling();\n const {action, documentId} = e.detail as any;\n console.log('[VIEW] Download action selected:', action, documentId);\n\n try {\n if (action === 'document') {\n const targetDocId = documentId || this.envelope.documents.find(d => d.type === 'attachment')?.id;\n if (targetDocId) {\n const url = await getEnvelopeDocumentDownloadLink(this.endpoint, targetDocId);\n window.open(url, '_blank');\n }\n } else if (action === 'certificate') {\n const cert = this.envelope.documents.find(d => d.type === 'certificate');\n if (cert) {\n const url = await getEnvelopeDocumentDownloadLink(this.endpoint, cert.id);\n window.open(url, '_blank');\n } else {\n VerdocsToast('Certificate not yet available.', {style: 'info'});\n }\n } else if (action === 'zip') {\n const blob = await getEnvelopesZip(this.endpoint, [this.envelopeId]);\n const url = window.URL.createObjectURL(blob.data);\n const a = document.createElement('a');\n a.href = url;\n a.download = `${this.envelope.name}.zip`;\n document.body.appendChild(a);\n a.click();\n a.remove();\n window.URL.revokeObjectURL(url);\n }\n } catch (err) {\n console.error('Download error', err);\n VerdocsToast('Unable to complete download request.', {style: 'error'});\n }\n }}\n />\n )}\n\n {!showFooter && (\n <verdocs-sign-footer endpoint={this.endpoint} envelopeId={this.envelopeId} isDone={true} onAskQuestion={() => {}} onDecline={() => {}} onFinishLater={() => {}} />\n )}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-BmuvbqHK.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,cAAc,GAAG,iyHAAiyH;;ACMxzH;;;;;;;;;;AAUG;AACH,MAAM,gBAAgB,GAAG,CAAA,6pBAAA,CAA+pB;AACxrB,MAAM,eAAe,GAAG,CAAA,iyBAAA,CAAmyB;AAC3zB,MAAM,mBAAmB,GAAG,CAAA,g3BAAA,CAAk3B;AAC94B,MAAM,gBAAgB,GAAG,CAAA,izBAAA,CAAmzB;MAO/zB,WAAW,iBAAAA,kBAAA,CAAA,MAAA,WAAA,SAAAC,CAAA,CAAA;AALxB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;;;AAMU,QAAA,IAAkB,CAAA,kBAAA,GAAG,IAAI;AAIjC;;AAEG;AACK,QAAA,IAAQ,CAAA,QAAA,GAA2B,IAAI;AAE/C;;AAEG;AACK,QAAA,IAAU,CAAA,UAAA,GAAW,EAAE;AAE/B;;;;;;;;AAQG;AACK,QAAA,IAAc,CAAA,cAAA,GAAkB,IAAI;AA8BnC,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK;AACjB,QAAA,IAAc,CAAA,cAAA,GAAG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Q,CAAC,IAAI,CAAA,IAAA,CAAM;AACxC,wBAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;wBAC5B,CAAC,CAAC,KAAK,EAAE;wBACT,CAAC,CAAC,MAAM,EAAE;AACV,wBAAA,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC;;;gBAEjC,OAAO,GAAG,EAAE;AACZ,oBAAA,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE,GAAG,CAAC;oBACpC,YAAY,CAAC,sCAAsC,EAAE,EAAC,KAAK,EAAE,OAAO,EAAC,CAAC;;aAEzE,GACD,CACH,EAEA,CAAC,UAAU,KACV,CAAA,CAAA,qBAAA,EAAA,EAAqB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,MAAK,GAAG,EAAE,SAAS,EAAE,MAAK,GAAG,EAAE,aAAa,EAAE,MAAK,GAAG,GAAI,CACnK,CACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/embeds/verdocs-view/verdocs-view.scss?tag=verdocs-view","src/components/embeds/verdocs-view/verdocs-view.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-view {\n display: flex;\n overflow: hidden;\n min-height: 600px;\n position: relative;\n flex-direction: column;\n box-sizing: border-box;\n font-family: $verdocs-primary-font;\n background-color: #f5f5f5;\n\n div,\n canvas {\n box-sizing: border-box;\n }\n\n .document {\n flex: 1;\n width: 100%;\n height: 100%;\n display: flex;\n // padding: 15px; // Reduced padding for zoom container\n row-gap: 15px;\n min-height: 200px;\n max-width: 1200px;\n position: relative;\n overflow-y: scroll;\n align-items: center;\n box-sizing: border-box;\n flex-direction: column;\n padding-right: 15px;\n\n .inner {\n width: 100%;\n max-width: 1028px;\n }\n }\n\n .signed-document-container {\n width: 64%;\n margin: 0 auto;\n transition: all 0.3s ease;\n padding: 15px;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 15px;\n\n &.zoom-normal {\n width: 64%;\n }\n\n &.zoom-zoom1 {\n width: 80%;\n }\n\n &.zoom-zoom2 {\n width: 100%;\n }\n }\n\n @media (max-width: 768px) {\n .signed-document-container {\n width: 100%;\n\n &.zoom-normal,\n &.zoom-zoom1,\n &.zoom-zoom2 {\n width: 100%;\n }\n }\n\n // Hide toolbars on mobile\n .controls-toolbar {\n .center-controls {\n display: none;\n }\n\n .right-controls {\n .icon-button {\n &.minus,\n &.plus {\n display: none;\n }\n }\n }\n }\n }\n\n .loading-indicator {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n z-index: 10000;\n position: fixed;\n background-color: rgba(0, 0, 0, 0.7);\n justify-content: center;\n align-items: center;\n }\n\n verdocs-ok-dialog .background-overlay {\n align-items: flex-start;\n padding-top: 100px;\n }\n}\n\n// Styled separately because this toolbar can be reparented\n#verdocs-view-header {\n // Use .controls-toolbar styles here\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 54px;\n padding: 0 12px 0 24px;\n background-color: #ffffff;\n border-bottom: 1px solid #e0e0e0;\n box-shadow: none;\n font-family: 'Inter', sans-serif;\n color: #424242;\n z-index: 1000;\n width: 100%;\n box-sizing: border-box;\n\n .left-controls {\n flex: 1;\n display: flex;\n align-items: center;\n\n .title {\n font-weight: 500;\n font-size: 16px;\n color: #242424;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n }\n\n .center-controls {\n flex: 1;\n display: none; // Hidden for now\n align-items: center;\n justify-content: center;\n gap: 10px;\n font-size: 14px;\n }\n\n .right-controls {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n\n .icon-button {\n width: 32px;\n height: 32px;\n display: flex;\n color: #424242;\n cursor: pointer;\n align-items: center;\n justify-content: center;\n transition: background-color 0.2s;\n\n &:hover {\n background-color: #f5f5f5;\n }\n\n &.disabled {\n opacity: 0.3;\n pointer-events: none;\n }\n\n svg {\n display: block;\n width: 20px;\n height: 20px;\n }\n }\n }\n}\n\n@media print {\n #verdocs-view-header {\n display: none !important;\n }\n\n verdocs-view {\n min-height: auto;\n background-color: white;\n\n .document {\n overflow: visible;\n height: auto;\n display: block;\n padding: 0;\n }\n\n .signed-document-container {\n width: 100%;\n margin: 0;\n }\n }\n}\n","import {cancelEnvelope, getEnvelopeDocumentDownloadLink, getEnvelope, IEnvelope, integerSequence, userCanCancelEnvelope, VerdocsEndpoint, getEnvelopesZip} from '@verdocs/js-sdk';\nimport {Component, h, Element, Event, Host, Prop, EventEmitter, Fragment, State} from '@stencil/core';\nimport {VerdocsToast} from '../../../utils/Toast';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Render the documents attached to an envelope in read-only (view) mode. All documents are\n * displayed in order.\n *\n * ```ts\n * <verdocs-view\n * envelopeId={ENVELOPE_ID}\n * onSdkError={({ detail }) => { console.log('SDK error', detail) }\n * />\n * ```\n */\nconst ToolbarMinusIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11 8C11.2761 8 11.5 8.22386 11.5 8.5C11.5 8.77614 11.2761 9 11 9H6C5.72386 9 5.5 8.77614 5.5 8.5C5.5 8.22386 5.72386 8 6 8H11ZM14 8.5C14 5.46243 11.5376 3 8.5 3C5.46243 3 3 5.46243 3 8.5C3 11.5376 5.46243 14 8.5 14C9.83879 14 11.0659 13.5217 12.0196 12.7266L16.1464 16.8536L16.2157 16.9114C16.4106 17.0464 16.68 17.0271 16.8536 16.8536C17.0488 16.6583 17.0488 16.3417 16.8536 16.1464L12.7266 12.0196C13.5217 11.0659 14 9.83879 14 8.5ZM4 8.5C4 6.01472 6.01472 4 8.5 4C10.9853 4 13 6.01472 13 8.5C13 10.9853 10.9853 13 8.5 13C6.01472 13 4 10.9853 4 8.5Z\" fill=\"#424242\" /></svg>`;\nconst ToolbarPlusIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.5 8.5C11.5 8.22386 11.2761 8 11 8H9V6C9 5.72386 8.77614 5.5 8.5 5.5C8.22386 5.5 8 5.72386 8 6V8H6C5.72386 8 5.5 8.22386 5.5 8.5C5.5 8.77614 5.72386 9 6 9H8V11C8 11.2761 8.22386 11.5 8.5 11.5C8.77614 11.5 9 11.2761 9 11V9H11C11.2761 9 11.5 8.77614 11.5 8.5ZM8.5 3C11.5376 3 14 5.46243 14 8.5C14 9.83879 13.5217 11.0659 12.7266 12.0196L16.8536 16.1464C17.0488 16.3417 17.0488 16.6583 16.8536 16.8536C16.68 17.0271 16.4106 17.0464 16.2157 16.9114L16.1464 16.8536L12.0196 12.7266C11.0659 13.5217 9.83879 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3ZM8.5 4C6.01472 4 4 6.01472 4 8.5C4 10.9853 6.01472 13 8.5 13C10.9853 13 13 10.9853 13 8.5C13 6.01472 10.9853 4 8.5 4Z\" fill=\"#424242\" /></svg>`;\nconst ToolbarDownloadIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M15.5 16.9988C15.7761 16.9988 16 17.2226 16 17.4988C16 17.7442 15.8231 17.9484 15.5899 17.9907L15.5 17.9988H4.5C4.22386 17.9988 4 17.7749 4 17.4988C4 17.2533 4.17688 17.0492 4.41012 17.0068L4.5 16.9988H15.5ZM10.0001 2.00098C10.2456 2.00098 10.4497 2.17798 10.492 2.41124L10.5 2.50112L10.496 14.295L14.1414 10.6466C14.3148 10.4729 14.5842 10.4534 14.7792 10.5882L14.8485 10.646C15.0222 10.8194 15.0418 11.0888 14.907 11.2838L14.8492 11.3531L10.3574 15.8531C10.285 15.9257 10.1957 15.9714 10.1021 15.9901L9.99608 15.9999C9.83511 15.9999 9.69192 15.9237 9.60051 15.8056L5.14386 11.3537C4.94846 11.1586 4.94823 10.842 5.14336 10.6466C5.3168 10.4729 5.58621 10.4534 5.78117 10.5883L5.85046 10.6461L9.496 14.287L9.5 2.50083C9.50008 2.22469 9.724 2.00098 10.0001 2.00098Z\" fill=\"#424242\"/></svg>`;\nconst ToolbarPrintIcon = `<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5 4.5C5 3.67157 5.67157 3 6.5 3H13.5C14.3284 3 15 3.67157 15 4.5V5H15.5C16.8807 5 18 6.11929 18 7.5V12.5C18 13.3284 17.3284 14 16.5 14H15V15.5C15 16.3284 14.3284 17 13.5 17H6.5C5.67157 17 5 16.3284 5 15.5V14H3.5C2.67157 14 2 13.3284 2 12.5V7.5C2 6.11929 3.11929 5 4.5 5H5V4.5ZM6 5H14V4.5C14 4.22386 13.7761 4 13.5 4H6.5C6.22386 4 6 4.22386 6 4.5V5ZM5 13V11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V13H16.5C16.7761 13 17 12.7761 17 12.5V7.5C17 6.67157 16.3284 6 15.5 6H4.5C3.67157 6 3 6.67157 3 7.5V12.5C3 12.7761 3.22386 13 3.5 13H5ZM6.5 11C6.22386 11 6 11.2239 6 11.5V15.5C6 15.7761 6.22386 16 6.5 16H13.5C13.7761 16 14 15.7761 14 15.5V11.5C14 11.2239 13.7761 11 13.5 11H6.5Z\" fill=\"#424242\"/></svg>`;\n\n@Component({\n tag: 'verdocs-view',\n styleUrl: 'verdocs-view.scss',\n shadow: false,\n})\nexport class VerdocsView {\n private envelopeListenerId = null;\n\n @Element() component: HTMLElement;\n\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint | null = null;\n\n /**\n * The envelope ID to render. Set ONE OF templateId or envelopeId. If both are set, envelopeId will be ignored.\n */\n @Prop() envelopeId: string = '';\n\n /**\n * If set, (recommended), the host application should create a <DIV> element with a unique ID. When this\n * component renders, the header will be removed from its default location and placed in the target element.\n * This allows the parent application to more easily control its placement and scroll effects (e.g. \"fixed\").\n *\n * The movement of the header to the target container is not dynamic - it is performed only on the initial\n * render. Host applications should not conditionally render this container. If the header's visibility must\n * be externally controlled, use CSS display options to hide/show it instead.\n */\n @Prop() headerTargetId: 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. May be used for tasks such as cache invalidation or reporting to other systems.\n */\n @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n /**\n * Event fired when the user clicks Send Another to proceed. It is up to the host application\n * to redirect the user to the appropriate next workflow step.\n */\n @Event({composed: true}) another: EventEmitter;\n\n /**\n * Event fired when the user clicks Send Another to proceed. It is up to the host application\n * to redirect the user to the appropriate next workflow step.\n */\n @Event({composed: true}) view: EventEmitter;\n\n /**\n * Event fired when the user clicks Done to proceed. It is up to the host application\n * to redirect the user to the appropriate next workflow step.\n */\n @Event({composed: true}) next: EventEmitter;\n @State() canceling = false;\n @State() showCancelDone = false;\n @State() showLoadError = false;\n\n @State() loading = true;\n @State() envelope: IEnvelope | null = null;\n @State() zoomLevel: 'normal' | 'zoom1' | 'zoom2' = 'normal';\n @State() showDownloadDialog = false;\n @State() polling = false;\n\n private pollingInterval: any = null;\n\n async componentWillLoad() {\n this.updateZoomFromWindow();\n window.addEventListener('resize', () => this.updateZoomFromWindow());\n if (!this.endpoint) {\n this.endpoint = VerdocsEndpoint.getDefault();\n this.endpoint.loadSession();\n }\n\n if (!this.envelopeId) {\n console.error(`[VIEW] Missing required envelopeId`);\n return;\n }\n\n await this.listenToEnvelope();\n\n if (!this.envelope) {\n try {\n console.log('[VIEW] Loading envelope...');\n this.envelope = await getEnvelope(this.endpoint, this.envelopeId);\n console.log('[VIEW] Loaded envelope', this.envelope);\n } catch (e) {\n this.showLoadError = true;\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n }\n\n componentDidRender() {\n const headerTarget = this.headerTargetId ? document.getElementById(this.headerTargetId) : null;\n const headerEl = document.getElementById('verdocs-view-header');\n if (headerTarget && headerEl) {\n console.log('[VIEW] Moving header');\n headerEl.remove();\n headerTarget.append(headerEl);\n }\n }\n\n disconnectedCallback() {\n this.stopPolling();\n this.unlistenToEnvelope();\n window.removeEventListener('resize', () => this.updateZoomFromWindow());\n }\n\n updateZoomFromWindow() {\n const width = window.innerWidth;\n if (width < 768) {\n if (this.zoomLevel !== 'zoom2') this.zoomLevel = 'zoom2';\n } else if (width < 1024) {\n if (this.zoomLevel !== 'zoom1') this.zoomLevel = 'zoom1';\n } else {\n if (this.zoomLevel !== 'normal') this.zoomLevel = 'normal';\n }\n }\n\n async listenToEnvelope() {\n console.log('[VIEW] Loading envelope', this.envelopeId);\n this.unlistenToEnvelope();\n Store.subscribe(\n 'envelopes',\n this.envelopeId,\n () => getEnvelope(this.endpoint, this.envelopeId),\n true,\n (envelope: IEnvelope) => {\n this.envelope = envelope;\n this.loading = false;\n },\n );\n }\n\n unlistenToEnvelope() {\n if (this.envelopeListenerId) {\n Store.store.delListener(this.envelopeListenerId);\n this.envelopeListenerId = null;\n }\n }\n\n handlePageRendered(_e: any) {\n // const pageInfo = e.detail as IDocumentPageInfo;\n // console.log('[VIEW] Page rendered', pageInfo);\n }\n\n async handleOptionSelected(e: any) {\n switch (e.detail.id) {\n case 'cancel':\n // TODO: Better option for inline-flow confirmation and alert dialogs.\n if (confirm('Are you sure you wish to cancel this envelope? This action cannot be undone.')) {\n this.canceling = true;\n cancelEnvelope(this.endpoint, this.envelopeId)\n .then(r => {\n this.canceling = false;\n console.log('[VIEW] Envelope canceled', r);\n return getEnvelope(this.endpoint, this.envelopeId);\n })\n .then(env => {\n console.log('[VIEW] Loaded new envelope details', env);\n this.envelope = env;\n })\n .catch(e => {\n this.canceling = false;\n console.log('[VIEW] Error canceling envelope', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n this.showCancelDone = true;\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'canceled'});\n }\n break;\n\n case 'print':\n window.print();\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'printed'});\n break;\n\n case 'download':\n this.showDownloadDialog = true;\n this.startPolling();\n break;\n\n case 'download-attachments':\n // TODO: Multiple document support\n try {\n const firstDoc = this.envelope.documents.find(doc => doc.type === 'attachment');\n if (firstDoc) {\n const url = await getEnvelopeDocumentDownloadLink(this.endpoint, firstDoc.id);\n window.open(url, '_blank');\n }\n } catch (e) {\n console.log('Unable to download document', e);\n VerdocsToast(e.response?.data?.error || 'Unable to download document. Please try again later.', {style: 'error'});\n }\n break;\n\n case 'download-certificate':\n // TODO: Multiple certificate support\n {\n const firstCert = this.envelope.documents.find(doc => doc.type === 'certificate');\n if (firstCert) {\n const url = await getEnvelopeDocumentDownloadLink(this.endpoint, firstCert.id);\n window.open(url, '_blank');\n }\n }\n break;\n\n case 'download-all':\n getEnvelopesZip(this.endpoint, [this.envelope.id])\n .then(() => {\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'downloaded'});\n })\n .catch(e => {\n console.log('Error downloading Zip', e);\n });\n break;\n }\n }\n\n startPolling() {\n this.stopPolling();\n\n const checkPollingConditions = () => {\n // NOTE: Polling logic for finalizing envelope\n const isSigned = this.envelope?.status === 'complete' || !!this.envelope?.signed;\n const hasCertificate = this.envelope?.documents?.some(d => d.type === 'certificate');\n const allRecipientsSubmitted = this.envelope?.recipients?.every(r => r.status === 'submitted');\n\n if (isSigned && hasCertificate) return false;\n if (!allRecipientsSubmitted) return false;\n\n return true;\n };\n\n if (!checkPollingConditions()) {\n return;\n }\n\n this.polling = true;\n this.pollingInterval = setInterval(async () => {\n try {\n const envelope = await getEnvelope(this.endpoint, this.envelopeId);\n this.envelope = envelope;\n Store.updateEnvelope(this.envelopeId, envelope);\n\n if (!checkPollingConditions()) {\n this.stopPolling();\n }\n } catch (e) {\n console.error('[VIEW] Polling error', e);\n this.stopPolling();\n }\n }, 5000);\n }\n\n stopPolling() {\n if (this.pollingInterval) {\n clearInterval(this.pollingInterval);\n this.pollingInterval = null;\n }\n this.polling = false;\n }\n\n handleZoomIn() {\n if (this.zoomLevel === 'normal') {\n this.zoomLevel = 'zoom1';\n } else if (this.zoomLevel === 'zoom1') {\n this.zoomLevel = 'zoom2';\n }\n }\n\n handleZoomOut() {\n if (this.zoomLevel === 'zoom1') {\n this.zoomLevel = 'normal';\n } else if (this.zoomLevel === 'zoom2') {\n this.zoomLevel = 'zoom1';\n }\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n if (this.showLoadError) {\n return (\n <Host>\n <verdocs-ok-dialog\n heading=\"Unable to View Envelope\"\n message={`Sorry, that envelope is not valid.`}\n buttonLabel=\"OK\"\n onNext={() => {\n this.showLoadError = false;\n }}\n />\n </Host>\n );\n }\n\n if (!this.envelope) {\n return (\n <Host>\n <img\n src=\"https://public-assets.verdocs.com/loading-placeholder.png\"\n style={{width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px'}}\n alt=\"Placeholder page\"\n />\n </Host>\n );\n }\n\n // TODO: Review whether we want a different trigger for this.\n const showFooter = userCanCancelEnvelope(this.endpoint.profile, this.envelope);\n\n return (\n <Host>\n <div class=\"controls-toolbar\" id=\"verdocs-view-header\">\n <div class=\"left-controls\">\n <div class=\"title\">{this.envelope.name}</div>\n </div>\n <div class=\"center-controls\">{/* Pagination controls hidden for now */}</div>\n <div class=\"right-controls\">\n <div class={{'icon-button': true, 'minus': true, 'disabled': this.zoomLevel === 'normal'}} innerHTML={ToolbarMinusIcon} onClick={() => this.handleZoomOut()} />\n <div class={{'icon-button': true, 'plus': true, 'disabled': this.zoomLevel === 'zoom2'}} innerHTML={ToolbarPlusIcon} onClick={() => this.handleZoomIn()} />\n <div class=\"icon-button download\" innerHTML={ToolbarDownloadIcon} onClick={() => this.handleOptionSelected({detail: {id: 'download'}})} />\n <div class=\"icon-button print\" innerHTML={ToolbarPrintIcon} onClick={() => this.handleOptionSelected({detail: {id: 'print'}})} />\n </div>\n </div>\n\n <div class={`document signed-document-container zoom-${this.zoomLevel}`} style={{paddingTop: this.headerTargetId ? '70px' : '15px'}}>\n {(this.envelope?.documents || [])\n .filter(document => document.type !== 'certificate')\n .map(envelopeDocument => {\n const pageNumbers = integerSequence(1, envelopeDocument.pages);\n\n return (\n <Fragment>\n {pageNumbers.map(pageNumber => {\n const pageSize = envelopeDocument.page_sizes?.[pageNumber] || {width: 612, height: 792};\n\n return (\n <verdocs-envelope-document-page\n envelopeId={this.envelopeId}\n documentId={envelopeDocument.id}\n endpoint={this.endpoint}\n type=\"filled\"\n virtualWidth={pageSize.width}\n virtualHeight={pageSize.height}\n pageNumber={pageNumber}\n onPageRendered={e => this.handlePageRendered(e)}\n layers={[\n {name: 'page', type: 'canvas'},\n {name: 'controls', type: 'div'},\n ]}\n />\n );\n })}\n </Fragment>\n );\n })}\n </div>\n\n {this.showCancelDone && (\n <verdocs-ok-dialog\n heading=\"Cancelled\"\n message={`This envelope has been cancelled successfully.`}\n onNext={() => {\n this.showCancelDone = false;\n }}\n />\n )}\n\n {this.canceling && (\n <div class=\"loading-indicator\">\n <verdocs-loader />\n </div>\n )}\n\n {this.showDownloadDialog && (\n <verdocs-download-dialog\n signed={this.envelope.status === 'complete' || this.envelope.signed}\n polling={this.polling}\n documents={this.envelope.documents}\n onExit={() => {\n this.showDownloadDialog = false;\n this.stopPolling();\n }}\n onNext={async e => {\n this.showDownloadDialog = false;\n this.stopPolling();\n const {action, documentId} = e.detail as any;\n console.log('[VIEW] Download action selected:', action, documentId);\n\n try {\n if (action === 'document') {\n const targetDocId = documentId || this.envelope.documents.find(d => d.type === 'attachment')?.id;\n if (targetDocId) {\n const url = await getEnvelopeDocumentDownloadLink(this.endpoint, targetDocId);\n window.open(url, '_blank');\n }\n } else if (action === 'certificate') {\n const cert = this.envelope.documents.find(d => d.type === 'certificate');\n if (cert) {\n const url = await getEnvelopeDocumentDownloadLink(this.endpoint, cert.id);\n window.open(url, '_blank');\n } else {\n VerdocsToast('Certificate not yet available.', {style: 'info'});\n }\n } else if (action === 'zip') {\n const blob = await getEnvelopesZip(this.endpoint, [this.envelopeId]);\n const url = window.URL.createObjectURL(blob.data);\n const a = document.createElement('a');\n a.href = url;\n a.download = `${this.envelope.name}.zip`;\n document.body.appendChild(a);\n a.click();\n a.remove();\n window.URL.revokeObjectURL(url);\n }\n } catch (err) {\n console.error('Download error', err);\n VerdocsToast('Unable to complete download request.', {style: 'error'});\n }\n }}\n />\n )}\n\n {!showFooter && (\n <verdocs-sign-footer endpoint={this.endpoint} envelopeId={this.envelopeId} isDone={true} onAskQuestion={() => {}} onDecline={() => {}} onFinishLater={() => {}} />\n )}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,7 +1,7 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h } from './p-CUAGH_8P.js';
2
2
  import { d as defineCustomElement$1 } from './p-CO3KQG1e.js';
3
3
 
4
- const verdocsDownloadDialogCss = "verdocs-download-dialog{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-download-dialog .heading-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}verdocs-download-dialog .heading-container .polling-indicator{padding:0 24px;color:#9ca3af}verdocs-download-dialog .heading-container .polling-indicator .spinner{display:-ms-flexbox;display:flex;-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}verdocs-download-dialog .heading-container .polling-indicator .spinner svg{width:20px;height:20px}verdocs-download-dialog .content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:15px;padding:0 24px 20px 24px}verdocs-download-dialog .download-option{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:12px 15px;border:1px solid #e5e7eb;border-radius:6px;cursor:pointer;-webkit-transition:all 0.2s ease;transition:all 0.2s ease;gap:15px;background:white}verdocs-download-dialog .download-option.disabled{opacity:0.5;cursor:not-allowed}verdocs-download-dialog .download-option.disabled:hover{background-color:white;border-color:#e5e7eb}verdocs-download-dialog .download-option:hover{border-color:#654dcb;background-color:#f9fafb}verdocs-download-dialog .icon-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:36px;height:36px;background-color:#f3f4f6;border-radius:50%;color:#4b5563;-ms-flex-negative:0;flex-shrink:0}verdocs-download-dialog .icon-container svg{width:18px;height:18px}verdocs-download-dialog .text-container{-ms-flex:1;flex:1}verdocs-download-dialog .text-container .label{font-weight:500;color:#111827;margin-bottom:2px}verdocs-download-dialog .text-container .description{font-size:13px;color:#6b7280}verdocs-download-dialog .status-indicator{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;gap:2px;font-size:11px;color:#9ca3af;min-width:50px}verdocs-download-dialog .status-indicator .signed{color:#10b981}verdocs-download-dialog .status-indicator .unsigned{color:#9ca3af}verdocs-download-dialog .status-indicator svg{width:16px;height:16px}verdocs-download-dialog .info-message{font-size:13px;color:#6b7280;font-style:italic;padding:0 4px}verdocs-download-dialog .arrow{color:#9ca3af}@-webkit-keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}";
4
+ const verdocsDownloadDialogCss = "verdocs-download-dialog{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-download-dialog .heading-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}verdocs-download-dialog .heading-container .polling-indicator{margin:-6px 24px 0 0;padding:0 24px;color:#9ca3af}verdocs-download-dialog .heading-container .polling-indicator .spinner{display:-ms-flexbox;display:flex;-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}verdocs-download-dialog .heading-container .polling-indicator .spinner svg{width:20px;height:20px}verdocs-download-dialog .content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:15px;padding:0 24px 20px 24px}verdocs-download-dialog .download-option{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:12px 15px;border:1px solid #e5e7eb;border-radius:6px;cursor:pointer;-webkit-transition:all 0.2s ease;transition:all 0.2s ease;gap:15px;background:white}verdocs-download-dialog .download-option.disabled{opacity:0.5;cursor:not-allowed}verdocs-download-dialog .download-option.disabled:hover{background-color:white;border-color:#e5e7eb}verdocs-download-dialog .download-option:hover{border-color:#654dcb;background-color:#f9fafb}verdocs-download-dialog .icon-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:36px;height:36px;background-color:#f3f4f6;border-radius:50%;color:#4b5563;-ms-flex-negative:0;flex-shrink:0}verdocs-download-dialog .icon-container svg{width:18px;height:18px}verdocs-download-dialog .text-container{-ms-flex:1;flex:1}verdocs-download-dialog .text-container .label{font-weight:500;color:#111827;margin-bottom:2px}verdocs-download-dialog .text-container .description{font-size:13px;color:#6b7280}verdocs-download-dialog .status-indicator{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;gap:2px;font-size:11px;color:#9ca3af;min-width:50px}verdocs-download-dialog .status-indicator .signed{color:#10b981}verdocs-download-dialog .status-indicator .unsigned{color:#9ca3af}verdocs-download-dialog .status-indicator svg{width:16px;height:16px}verdocs-download-dialog .info-message{font-size:13px;color:#6b7280;font-style:italic;padding:0 4px}verdocs-download-dialog .arrow{color:#9ca3af}@-webkit-keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}";
5
5
 
6
6
  const DocumentIcon = `<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>`;
7
7
  const 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>`;
@@ -77,6 +77,6 @@ function defineCustomElement() {
77
77
  }
78
78
 
79
79
  export { VerdocsDownloadDialog as V, defineCustomElement as d };
80
- //# sourceMappingURL=p-C0_V6_aB.js.map
80
+ //# sourceMappingURL=p-C3gOLT8d.js.map
81
81
 
82
- //# sourceMappingURL=p-C0_V6_aB.js.map
82
+ //# sourceMappingURL=p-C3gOLT8d.js.map
@@ -0,0 +1 @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CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,gBAAgB,EAAA,EACzB,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,OAAO,EAAgB,EAAA,WAAA,CAAA,EAClC,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,aAAa,EAAA,EAAA,mCAAA,CAAwC,CAC5D,EACN,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,OAAO,EAAC,SAAS,EAAE,YAAY,EAAQ,CAAA,CAC9C,CACF,EAEN,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,EAAC,OAAO,EAAE,MAAM,EAAC,EAAI,CAAA,CAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/dialogs/verdocs-download-dialog/verdocs-download-dialog.scss?tag=verdocs-download-dialog","src/components/dialogs/verdocs-download-dialog/verdocs-download-dialog.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-download-dialog {\n box-sizing: border-box;\n font-family: $primary-font;\n\n .heading-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n .polling-indicator {\n margin: -6px 24px 0 0;\n padding: 0 24px;\n color: #9ca3af;\n\n .spinner {\n display: flex;\n animation: rotate 2s linear infinite;\n\n svg {\n width: 20px;\n height: 20px;\n }\n }\n }\n }\n\n .content {\n display: flex;\n flex-direction: column;\n gap: 15px; // Reduced slightly\n padding: 0 24px 20px 24px; // Adjusted top padding\n }\n\n .download-option {\n display: flex;\n align-items: center;\n padding: 12px 15px; // Reduced padding slightly\n border: 1px solid #e5e7eb;\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s ease;\n gap: 15px;\n background: white;\n\n &.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n\n &:hover {\n background-color: white;\n border-color: #e5e7eb;\n }\n }\n\n &:hover {\n border-color: $verdocs-primary-color;\n background-color: #f9fafb;\n }\n }\n\n .icon-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px; // Reduced slightly\n height: 36px;\n background-color: #f3f4f6;\n border-radius: 50%;\n color: #4b5563;\n flex-shrink: 0;\n\n svg {\n width: 18px;\n height: 18px;\n }\n }\n\n .text-container {\n flex: 1;\n\n .label {\n font-weight: 500;\n color: #111827;\n margin-bottom: 2px;\n }\n\n .description {\n font-size: 13px;\n color: #6b7280;\n }\n }\n\n .status-indicator {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 2px;\n font-size: 11px;\n color: #9ca3af;\n min-width: 50px;\n\n .signed {\n color: #10b981;\n }\n\n .unsigned {\n color: #9ca3af;\n }\n\n svg {\n width: 16px;\n height: 16px;\n }\n }\n\n .info-message {\n font-size: 13px;\n color: #6b7280;\n font-style: italic;\n padding: 0 4px;\n }\n\n .arrow {\n color: #9ca3af;\n }\n}\n\n@keyframes rotate {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n}\n","import {Component, h, Event, EventEmitter, Prop} from '@stencil/core';\n\nconst DocumentIcon = `<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').sort((a, b) => (a.order !== b.order ? a.order - b.order : a.created_at.localeCompare(b.created_at)));\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"],"version":3}
@@ -1,4 +1,4 @@
1
- import { V as VerdocsDownloadDialog$1, d as defineCustomElement$1 } from './p-C0_V6_aB.js';
1
+ import { V as VerdocsDownloadDialog$1, d as defineCustomElement$1 } from './p-C3gOLT8d.js';
2
2
 
3
3
  const VerdocsDownloadDialog = VerdocsDownloadDialog$1;
4
4
  const defineCustomElement = defineCustomElement$1;