@verdocs/web-sdk 5.0.41 → 5.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +18 -33
- package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +0 -2
- package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-preview_7.cjs.entry.js +0 -1
- package/dist/cjs/verdocs-preview_7.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +114 -90
- package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +0 -1
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +121 -95
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
- package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js +7 -8
- package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js +0 -2
- package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js.map +1 -1
- package/dist/components/{p-36368807.js → p-4a04090c.js} +3 -3
- package/dist/components/{p-36368807.js.map → p-4a04090c.js.map} +1 -1
- package/dist/components/{p-c1d312d8.js → p-4a4bf38c.js} +2 -3
- package/dist/components/p-4a4bf38c.js.map +1 -0
- package/dist/components/{p-6bfb8eba.js → p-73a39d5a.js} +19 -34
- package/dist/components/p-73a39d5a.js.map +1 -0
- package/dist/components/{p-795b4192.js → p-91eae04c.js} +3 -3
- package/dist/components/{p-795b4192.js.map → p-91eae04c.js.map} +1 -1
- package/dist/components/{p-52c195dd.js → p-92cce3dc.js} +1 -3
- package/dist/components/{p-52c195dd.js.map → p-92cce3dc.js.map} +1 -1
- package/dist/components/{p-7481c7db.js → p-b474c324.js} +2 -2
- package/dist/components/{p-7481c7db.js.map → p-b474c324.js.map} +1 -1
- package/dist/components/verdocs-build.js +6 -6
- package/dist/components/verdocs-contact-picker.js +1 -1
- package/dist/components/verdocs-field-date.js +1 -1
- package/dist/components/verdocs-preview.js +1 -1
- package/dist/components/verdocs-send.js +1 -1
- package/dist/components/verdocs-sign.js +117 -92
- package/dist/components/verdocs-sign.js.map +1 -1
- package/dist/components/verdocs-template-document-page.js +1 -1
- package/dist/components/verdocs-template-fields.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-contact-picker_2.entry.js +18 -33
- package/dist/esm/verdocs-contact-picker_2.entry.js.map +1 -1
- package/dist/esm/verdocs-field-attachment_13.entry.js +0 -2
- package/dist/esm/verdocs-field-attachment_13.entry.js.map +1 -1
- package/dist/esm/verdocs-preview_7.entry.js +0 -1
- package/dist/esm/verdocs-preview_7.entry.js.map +1 -1
- package/dist/esm/verdocs-sign.entry.js +115 -91
- package/dist/esm/verdocs-sign.entry.js.map +1 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker_2.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment_13.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-preview_7.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_7.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js.map +1 -1
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +4 -2
- package/dist/verdocs-web-sdk/p-02e09803.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-02e09803.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-0c1898f6.system.js +1 -1
- package/dist/verdocs-web-sdk/p-0c1898f6.system.js.map +1 -1
- package/dist/verdocs-web-sdk/p-46263e7a.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-46263e7a.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-4d92a71b.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-4d92a71b.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-7f982a59.system.entry.js → p-6cfb51e3.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-6cfb51e3.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-62bde242.system.entry.js → p-89c69404.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-89c69404.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-d47c58de.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-d47c58de.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-7962eb00.entry.js → p-e7ca4f15.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-e7ca4f15.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-dda88c7f.entry.js → p-e8268ed9.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-e8268ed9.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js.map +1 -1
- package/package.json +3 -3
- package/dist/components/p-6bfb8eba.js.map +0 -1
- package/dist/components/p-c1d312d8.js.map +0 -1
- package/dist/verdocs-web-sdk/p-1c8788f5.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-1c8788f5.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-62bde242.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-7962eb00.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-7f982a59.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-a4dd8302.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-a4dd8302.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-dda88c7f.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-df6ab9e9.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-df6ab9e9.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-e5684a49.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-e5684a49.system.entry.js.map +0 -1
@@ -7,7 +7,7 @@ import { d as defineCustomElement$m } from './p-96774726.js';
|
|
7
7
|
import { d as defineCustomElement$l } from './p-39480096.js';
|
8
8
|
import { d as defineCustomElement$k } from './p-eb4bd2d6.js';
|
9
9
|
import { d as defineCustomElement$j } from './p-e85acbfb.js';
|
10
|
-
import { d as defineCustomElement$i } from './p-
|
10
|
+
import { d as defineCustomElement$i } from './p-92cce3dc.js';
|
11
11
|
import { d as defineCustomElement$h } from './p-1a83e46c.js';
|
12
12
|
import { d as defineCustomElement$g } from './p-f66d6a07.js';
|
13
13
|
import { d as defineCustomElement$f } from './p-9a24561a.js';
|
@@ -383,4 +383,4 @@ function defineCustomElement() {
|
|
383
383
|
|
384
384
|
export { VerdocsTemplateDocumentPage as V, defineCustomElement as d };
|
385
385
|
|
386
|
-
//# sourceMappingURL=p-
|
386
|
+
//# sourceMappingURL=p-b474c324.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"p-7481c7db.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,8BAA8B,GAAG,g3BAAg3B,CAAC;AACx5B,0CAAe,8BAA8B;;MCkBhC,2BAA2B;IALxC;;;;QAMU,uBAAkB,GAAG,IAAI,CAAC;;;;QAQ1B,aAAQ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CAAC,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;oBAC5C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC;oBAC1D,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC;oBAC1D,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;iBAC/D,GACD,KAEF,cAAW,CACZ,CAAA;SAAA,CACF,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/templates/verdocs-template-document-page/verdocs-template-document-page.scss?tag=verdocs-template-document-page","src/components/templates/verdocs-template-document-page/verdocs-template-document-page.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-template-document-page {\n width: 100%;\n position: relative;\n\n .verdocs-template-document-page-layer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n box-shadow: 0 0 10px 5px #0000000f;\n\n &.img {\n width: 100%;\n }\n }\n\n .placeholder {\n opacity: 0.1;\n width: 612px;\n height: 792px;\n box-shadow: 0 0 10px 5px #0000000f;\n }\n}\n","// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {getTemplate, getTemplateDocumentPageDisplayUri, type ITemplate, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Element, Fragment} from '@stencil/core';\nimport {IDocumentPageInfo, IPageLayer} from '../../../utils/Types';\nimport {getControlStyles, getFieldId} from '../../../utils/utils';\nimport {throttle} from '../../../utils/utils';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Represents one document page. This is primarily a layout container used to coordinate positions of\n * page-related layers such as the page itself, signature fields, etc. It is not intended to be used\n * on its own as an individual component.\n */\n@Component({\n tag: 'verdocs-template-document-page',\n styleUrl: 'verdocs-template-document-page.scss',\n shadow: false,\n})\nexport class VerdocsTemplateDocumentPage {\n private templateListenerId = null;\n private resizeObserver: ResizeObserver;\n\n @Element() container: HTMLElement;\n\n /**\n * The endpoint to load from.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * Whether the fields should be editable (Builder)\n */\n @Prop() editable = false;\n\n /**\n * Whether the fields should be disabled (Builder)\n */\n @Prop() disabled = false;\n\n /**\n * Whether the field are interactable (done/submitted disables this)\n */\n @Prop() done = false;\n\n /**\n * The ID of the template the document is for.\n */\n @Prop() templateId: 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-document-page-ker2fr1p9\">\n * <div id=\"verdocs-document-page-ker2fr1p9-page\"></div>\n * <div id=\"verdocs-document-page-ker2fr1p9-fields\"></div>\n * </div>\n * ```\n */\n @Prop() layers: IPageLayer[] = [{name: 'page', type: 'canvas'}];\n\n /**\n * Fired when a page has been rendered. This is also fired when the page is resized.\n */\n @Event() pageRendered: EventEmitter<IDocumentPageInfo>;\n\n @State() containerId = `verdocs-document-page-${Math.random().toString(36).substring(2, 11)}`;\n @State() renderedWidth: number = this.virtualWidth;\n @State() renderedHeight: number = this.virtualHeight;\n @State() naturalWidth: number = this.virtualWidth;\n @State() naturalHeight: number = this.virtualHeight;\n @State() aspectRatio: number = this.virtualWidth / this.virtualHeight;\n @State() skipFirstNotification = true;\n @State() pageDisplayUri = '';\n @State() xScale = 1;\n @State() yScale = 1;\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n async componentWillLoad() {\n this.pageDisplayUri = await getTemplateDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber);\n this.listenToTemplate();\n }\n\n componentDidLoad() {\n this.resizeObserver = new ResizeObserver(\n throttle(entries => {\n for (const entry of entries) {\n const renderedWidth = entry.contentRect.width;\n this.renderedWidth = renderedWidth;\n this.renderedHeight = this.virtualHeight * (renderedWidth / this.virtualWidth);\n }\n\n this.notifyRenderedSize();\n }, 100),\n );\n\n this.resizeObserver.observe(this.container);\n }\n\n componentDidUpdate() {\n // This is fired when fields are updated and triggers the parent to re-attach behaviors like drag-and-drop\n this.notifyRenderedSize();\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n this.unlistenToTemplate();\n }\n\n async listenToTemplate() {\n this.unlistenToTemplate();\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n false,\n (template: ITemplate) => {\n this.template = template;\n this.loading = false;\n },\n );\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n notifyRenderedSize() {\n // We skip one notification because by default we will always get at least two, one when rendering the initial size\n // and a second once we're able to compute the scale size, when the resizeObserver sets renderedWidth/renderedHeight.\n if (this.skipFirstNotification) {\n this.skipFirstNotification = false;\n return;\n }\n\n const xScale = this.renderedWidth / this.virtualWidth;\n if (this.xScale !== xScale) {\n this.xScale = xScale;\n }\n\n const yScale = this.renderedHeight / this.virtualHeight;\n if (this.yScale !== yScale) {\n this.yScale = yScale;\n }\n\n this.pageRendered.emit({\n // container: this.container,\n containerId: this.containerId,\n documentId: this.documentId,\n pageNumber: this.pageNumber,\n virtualWidth: this.virtualWidth,\n virtualHeight: this.virtualHeight,\n renderedWidth: this.renderedWidth,\n renderedHeight: this.renderedHeight,\n naturalWidth: this.naturalWidth,\n naturalHeight: this.naturalHeight,\n aspectRatio: this.aspectRatio,\n xScale,\n yScale,\n });\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <img src=\"https://public-assets.verdocs.com/loading-placeholder.png\" class=\"placeholder\" alt=\"Placeholder page\" />\n </Host>\n );\n }\n\n const height = `${this.renderedHeight}px`;\n\n return (\n <Host id={`${this.containerId}`} style={{height, flex: `0 0 ${height}`}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-template-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}}>\n {layer.name === 'controls' &&\n (this.template?.fields || [])\n .filter(field => field && field.page === this.pageNumber)\n .map(field => {\n const id = getFieldId(field);\n let {name, type, multiline} = field;\n const {xScale, yScale, templateId, editable, disabled, done, pageNumber} = this;\n if (field['setting']?.leading > 0 || field['settings']?.leading > 0) {\n type = 'textarea';\n multiline = true;\n }\n switch (type as any) {\n case 'textbox':\n return (\n <verdocs-field-textbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n multiline={multiline}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'textarea':\n return (\n <verdocs-field-textarea\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'date':\n return (\n <verdocs-field-date\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'attachment':\n return (\n <verdocs-field-attachment\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'dropdown':\n return (\n <verdocs-field-dropdown\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'initial':\n return (\n <verdocs-field-initial\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'signature':\n return (\n <verdocs-field-signature\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, this.xScale, this.yScale)}\n />\n );\n case 'timestamp':\n return (\n <verdocs-field-timestamp\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'checkbox':\n return (\n <verdocs-field-checkbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'radio':\n return (\n <verdocs-field-radio\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n default:\n return <Fragment>{name}</Fragment>;\n }\n })}\n </div>\n ) : this.pageDisplayUri ? (\n <img\n class=\"verdocs-template-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageDisplayUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\n loading=\"lazy\"\n onLoad={(e: any) => {\n // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that\n // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).\n // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values\n // for a field are based on the responsive Web view the Template editor was seeing. The IMG was scaled down there in the\n // exact same way, so we just honor it. We capture the natural width and height here more as information. Then we use the\n // aspect ratio to adjust the \"virtual\" height in case the page is not 8.5\"x11\".\n // TODO: Store this in the DB with each page.\n this.naturalWidth = e.target.naturalWidth;\n this.naturalHeight = e.target.naturalHeight;\n this.aspectRatio = this.naturalWidth / this.naturalHeight;\n this.virtualHeight = this.virtualWidth / this.aspectRatio;\n this.renderedHeight = e.target.offsetWidth / this.aspectRatio;\n }}\n />\n ) : (\n <div></div>\n ),\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
1
|
+
{"file":"p-b474c324.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,8BAA8B,GAAG,g3BAAg3B,CAAC;AACx5B,0CAAe,8BAA8B;;MCkBhC,2BAA2B;IALxC;;;;QAMU,uBAAkB,GAAG,IAAI,CAAC;;;;QAQ1B,aAAQ,GAAoB,eAAe,CAAC,UAAU,EAAE,CAAC;;;;QAKzD,aAAQ,GAAG,KAAK,CAAC;;;;QAKjB,aAAQ,GAAG,KAAK,CAAC;;;;QAKjB,SAAI,GAAG,KAAK,CAAC;;;;QAKb,eAAU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,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC;oBAC1D,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;iBAC/D,GACD,KAEF,cAAW,CACZ,CAAA;SAAA,CACF,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/templates/verdocs-template-document-page/verdocs-template-document-page.scss?tag=verdocs-template-document-page","src/components/templates/verdocs-template-document-page/verdocs-template-document-page.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-template-document-page {\n width: 100%;\n position: relative;\n\n .verdocs-template-document-page-layer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n box-shadow: 0 0 10px 5px #0000000f;\n\n &.img {\n width: 100%;\n }\n }\n\n .placeholder {\n opacity: 0.1;\n width: 612px;\n height: 792px;\n box-shadow: 0 0 10px 5px #0000000f;\n }\n}\n","// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {getTemplate, getTemplateDocumentPageDisplayUri, type ITemplate, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Element, Fragment} from '@stencil/core';\nimport {IDocumentPageInfo, IPageLayer} from '../../../utils/Types';\nimport {getControlStyles, getFieldId} from '../../../utils/utils';\nimport {throttle} from '../../../utils/utils';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Represents one document page. This is primarily a layout container used to coordinate positions of\n * page-related layers such as the page itself, signature fields, etc. It is not intended to be used\n * on its own as an individual component.\n */\n@Component({\n tag: 'verdocs-template-document-page',\n styleUrl: 'verdocs-template-document-page.scss',\n shadow: false,\n})\nexport class VerdocsTemplateDocumentPage {\n private templateListenerId = null;\n private resizeObserver: ResizeObserver;\n\n @Element() container: HTMLElement;\n\n /**\n * The endpoint to load from.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * Whether the fields should be editable (Builder)\n */\n @Prop() editable = false;\n\n /**\n * Whether the fields should be disabled (Builder)\n */\n @Prop() disabled = false;\n\n /**\n * Whether the field are interactable (done/submitted disables this)\n */\n @Prop() done = false;\n\n /**\n * The ID of the template the document is for.\n */\n @Prop() templateId: 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-document-page-ker2fr1p9\">\n * <div id=\"verdocs-document-page-ker2fr1p9-page\"></div>\n * <div id=\"verdocs-document-page-ker2fr1p9-fields\"></div>\n * </div>\n * ```\n */\n @Prop() layers: IPageLayer[] = [{name: 'page', type: 'canvas'}];\n\n /**\n * Fired when a page has been rendered. This is also fired when the page is resized.\n */\n @Event() pageRendered: EventEmitter<IDocumentPageInfo>;\n\n @State() containerId = `verdocs-document-page-${Math.random().toString(36).substring(2, 11)}`;\n @State() renderedWidth: number = this.virtualWidth;\n @State() renderedHeight: number = this.virtualHeight;\n @State() naturalWidth: number = this.virtualWidth;\n @State() naturalHeight: number = this.virtualHeight;\n @State() aspectRatio: number = this.virtualWidth / this.virtualHeight;\n @State() skipFirstNotification = true;\n @State() pageDisplayUri = '';\n @State() xScale = 1;\n @State() yScale = 1;\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n async componentWillLoad() {\n this.pageDisplayUri = await getTemplateDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber);\n this.listenToTemplate();\n }\n\n componentDidLoad() {\n this.resizeObserver = new ResizeObserver(\n throttle(entries => {\n for (const entry of entries) {\n const renderedWidth = entry.contentRect.width;\n this.renderedWidth = renderedWidth;\n this.renderedHeight = this.virtualHeight * (renderedWidth / this.virtualWidth);\n }\n\n this.notifyRenderedSize();\n }, 100),\n );\n\n this.resizeObserver.observe(this.container);\n }\n\n componentDidUpdate() {\n // This is fired when fields are updated and triggers the parent to re-attach behaviors like drag-and-drop\n this.notifyRenderedSize();\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n this.unlistenToTemplate();\n }\n\n async listenToTemplate() {\n this.unlistenToTemplate();\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n false,\n (template: ITemplate) => {\n this.template = template;\n this.loading = false;\n },\n );\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n notifyRenderedSize() {\n // We skip one notification because by default we will always get at least two, one when rendering the initial size\n // and a second once we're able to compute the scale size, when the resizeObserver sets renderedWidth/renderedHeight.\n if (this.skipFirstNotification) {\n this.skipFirstNotification = false;\n return;\n }\n\n const xScale = this.renderedWidth / this.virtualWidth;\n if (this.xScale !== xScale) {\n this.xScale = xScale;\n }\n\n const yScale = this.renderedHeight / this.virtualHeight;\n if (this.yScale !== yScale) {\n this.yScale = yScale;\n }\n\n this.pageRendered.emit({\n // container: this.container,\n containerId: this.containerId,\n documentId: this.documentId,\n pageNumber: this.pageNumber,\n virtualWidth: this.virtualWidth,\n virtualHeight: this.virtualHeight,\n renderedWidth: this.renderedWidth,\n renderedHeight: this.renderedHeight,\n naturalWidth: this.naturalWidth,\n naturalHeight: this.naturalHeight,\n aspectRatio: this.aspectRatio,\n xScale,\n yScale,\n });\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <img src=\"https://public-assets.verdocs.com/loading-placeholder.png\" class=\"placeholder\" alt=\"Placeholder page\" />\n </Host>\n );\n }\n\n const height = `${this.renderedHeight}px`;\n\n return (\n <Host id={`${this.containerId}`} style={{height, flex: `0 0 ${height}`}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-template-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}}>\n {layer.name === 'controls' &&\n (this.template?.fields || [])\n .filter(field => field && field.page === this.pageNumber)\n .map(field => {\n const id = getFieldId(field);\n let {name, type, multiline} = field;\n const {xScale, yScale, templateId, editable, disabled, done, pageNumber} = this;\n if (field['setting']?.leading > 0 || field['settings']?.leading > 0) {\n type = 'textarea';\n multiline = true;\n }\n switch (type as any) {\n case 'textbox':\n return (\n <verdocs-field-textbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n multiline={multiline}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'textarea':\n return (\n <verdocs-field-textarea\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'date':\n return (\n <verdocs-field-date\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'attachment':\n return (\n <verdocs-field-attachment\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'dropdown':\n return (\n <verdocs-field-dropdown\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'initial':\n return (\n <verdocs-field-initial\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'signature':\n return (\n <verdocs-field-signature\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, this.xScale, this.yScale)}\n />\n );\n case 'timestamp':\n return (\n <verdocs-field-timestamp\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'checkbox':\n return (\n <verdocs-field-checkbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'radio':\n return (\n <verdocs-field-radio\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n default:\n return <Fragment>{name}</Fragment>;\n }\n })}\n </div>\n ) : this.pageDisplayUri ? (\n <img\n class=\"verdocs-template-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageDisplayUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\n loading=\"lazy\"\n onLoad={(e: any) => {\n // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that\n // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).\n // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values\n // for a field are based on the responsive Web view the Template editor was seeing. The IMG was scaled down there in the\n // exact same way, so we just honor it. We capture the natural width and height here more as information. Then we use the\n // aspect ratio to adjust the \"virtual\" height in case the page is not 8.5\"x11\".\n // TODO: Store this in the DB with each page.\n this.naturalWidth = e.target.naturalWidth;\n this.naturalHeight = e.target.naturalHeight;\n this.aspectRatio = this.naturalWidth / this.naturalHeight;\n this.virtualHeight = this.virtualWidth / this.aspectRatio;\n this.renderedHeight = e.target.offsetWidth / this.aspectRatio;\n }}\n />\n ) : (\n <div></div>\n ),\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
@@ -6,10 +6,10 @@ import { d as defineCustomElement$H } from './p-f5ccf125.js';
|
|
6
6
|
import { d as defineCustomElement$G } from './p-84929e4a.js';
|
7
7
|
import { d as defineCustomElement$F } from './p-96774726.js';
|
8
8
|
import { d as defineCustomElement$E } from './p-39480096.js';
|
9
|
-
import { d as defineCustomElement$D } from './p-
|
9
|
+
import { d as defineCustomElement$D } from './p-73a39d5a.js';
|
10
10
|
import { d as defineCustomElement$C } from './p-eb4bd2d6.js';
|
11
11
|
import { d as defineCustomElement$B } from './p-e85acbfb.js';
|
12
|
-
import { d as defineCustomElement$A } from './p-
|
12
|
+
import { d as defineCustomElement$A } from './p-92cce3dc.js';
|
13
13
|
import { d as defineCustomElement$z } from './p-1a83e46c.js';
|
14
14
|
import { d as defineCustomElement$y } from './p-f66d6a07.js';
|
15
15
|
import { d as defineCustomElement$x } from './p-9a24561a.js';
|
@@ -25,19 +25,19 @@ import { d as defineCustomElement$o } from './p-bebd9b19.js';
|
|
25
25
|
import { d as defineCustomElement$n } from './p-a50f7982.js';
|
26
26
|
import { d as defineCustomElement$m } from './p-081465e0.js';
|
27
27
|
import { d as defineCustomElement$l } from './p-ca16a8ac.js';
|
28
|
-
import { d as defineCustomElement$k } from './p-
|
28
|
+
import { d as defineCustomElement$k } from './p-4a04090c.js';
|
29
29
|
import { d as defineCustomElement$j } from './p-44e14cb9.js';
|
30
30
|
import { d as defineCustomElement$i } from './p-8af753b4.js';
|
31
|
-
import { d as defineCustomElement$h } from './p-
|
31
|
+
import { d as defineCustomElement$h } from './p-4a4bf38c.js';
|
32
32
|
import { d as defineCustomElement$g } from './p-51c8b927.js';
|
33
33
|
import { d as defineCustomElement$f } from './p-61a2c23a.js';
|
34
34
|
import { d as defineCustomElement$e } from './p-e1b7ca10.js';
|
35
35
|
import { d as defineCustomElement$d } from './p-1d98c6e0.js';
|
36
36
|
import { d as defineCustomElement$c } from './p-43b8738f.js';
|
37
37
|
import { d as defineCustomElement$b } from './p-710ca15d.js';
|
38
|
-
import { d as defineCustomElement$a } from './p-
|
38
|
+
import { d as defineCustomElement$a } from './p-b474c324.js';
|
39
39
|
import { d as defineCustomElement$9 } from './p-4dbb9783.js';
|
40
|
-
import { d as defineCustomElement$8 } from './p-
|
40
|
+
import { d as defineCustomElement$8 } from './p-91eae04c.js';
|
41
41
|
import { d as defineCustomElement$7 } from './p-444a3bdf.js';
|
42
42
|
import { d as defineCustomElement$6 } from './p-5d578b83.js';
|
43
43
|
import { d as defineCustomElement$5 } from './p-55edf913.js';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { V as VerdocsContactPicker$1, d as defineCustomElement$1 } from './p-
|
1
|
+
import { V as VerdocsContactPicker$1, d as defineCustomElement$1 } from './p-73a39d5a.js';
|
2
2
|
|
3
3
|
const VerdocsContactPicker = VerdocsContactPicker$1;
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { V as VerdocsFieldDate$1, d as defineCustomElement$1 } from './p-
|
1
|
+
import { V as VerdocsFieldDate$1, d as defineCustomElement$1 } from './p-92cce3dc.js';
|
2
2
|
|
3
3
|
const VerdocsFieldDate = VerdocsFieldDate$1;
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, d as Host, F as Fragment } from './p-1f51246d.js';
|
2
|
-
import { VerdocsEndpoint, startSigningSession,
|
2
|
+
import { VerdocsEndpoint, startSigningSession, envelopeRecipientAgree, envelopeRecipientDecline, updateEnvelopeField, createSignature, updateEnvelopeFieldSignature, createInitials, updateEnvelopeFieldInitials, isValidPhone, isValidEmail, sortFields, envelopeRecipientSubmit, getEnvelope, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, formatFullName, fullNameToInitials, authenticateSigner, integerSequence } from '@verdocs/js-sdk';
|
3
3
|
import { a as saveAttachment, u as updateDocumentFieldValue, r as renderDocumentField, g as getFieldId } from './p-af5ecc92.js';
|
4
4
|
import { V as VerdocsToast } from './p-04c07b7b.js';
|
5
5
|
import { S as SDKError } from './p-fd97809c.js';
|
@@ -80,7 +80,10 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
80
80
|
this.showFinishLater = false;
|
81
81
|
this.agreed = false;
|
82
82
|
this.documentsSingularPlural = 'document';
|
83
|
-
|
83
|
+
// TODO
|
84
|
+
// @State() authStep: TRecipientAuthMethod | null = null;
|
85
|
+
this.authStep = null;
|
86
|
+
this.authDetails = null;
|
84
87
|
this.kbaQuestions = [];
|
85
88
|
this.showSpinner = false;
|
86
89
|
this.kbaChoices = [];
|
@@ -130,13 +133,26 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
130
133
|
if (this.recipientIndex > -1) {
|
131
134
|
this.recipient = this.sortedRecipients[this.recipientIndex];
|
132
135
|
this.agreed = this.recipient.agreed;
|
136
|
+
this.submitted = this.recipient.status === 'submitted';
|
137
|
+
this.authStep = this.recipient.auth_step;
|
138
|
+
if (this.authStep) {
|
139
|
+
console.log('[SIGN] Authentication required', this.authStep);
|
140
|
+
}
|
141
|
+
const auth_method_states = (this.recipient.auth_method_states || {});
|
142
|
+
if (Object.values(auth_method_states).includes('failed')) {
|
143
|
+
this.fatalErrorHeader = 'Recipient Verification Failed';
|
144
|
+
this.fatalErrorMessage = 'We were unable to verify your identity. The sender has been notified.';
|
145
|
+
this.isDone = true;
|
146
|
+
}
|
147
|
+
// TODO
|
148
|
+
// this.kbaQuestions = (r as any).questions?.question || [];
|
149
|
+
// this.kbaChoices = [];
|
133
150
|
}
|
134
151
|
else {
|
135
152
|
console.warn('[SIGN] Could not find our recipient record', this.roleId, this.sortedRecipients);
|
136
153
|
}
|
137
154
|
// TODO: Envelope "complete" | "declined" | "canceled"
|
138
155
|
// TODO: Recipient "canceled"
|
139
|
-
this.submitted = this.recipient.status === 'submitted';
|
140
156
|
this.isDone = this.submitted;
|
141
157
|
this.showDone = this.submitted;
|
142
158
|
if (this.envelope.status === 'canceled') {
|
@@ -152,24 +168,6 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
152
168
|
}
|
153
169
|
this.checkRecipientFields();
|
154
170
|
(_d = this.envelopeLoaded) === null || _d === void 0 ? void 0 : _d.emit({ endpoint: this.endpoint, envelope: this.envelope });
|
155
|
-
if (!this.isDone) {
|
156
|
-
getKbaStep(this.endpoint, this.envelopeId, this.roleId)
|
157
|
-
.then(r => {
|
158
|
-
var _a;
|
159
|
-
console.log('[SIGN] KBA Step', r);
|
160
|
-
this.kbaStep = r.kba_step;
|
161
|
-
if (this.kbaStep === 'failed') {
|
162
|
-
this.fatalErrorHeader = 'Identity Verification Failed';
|
163
|
-
this.fatalErrorMessage = 'We were unable to verify your identity. The sender has been notified.';
|
164
|
-
this.isDone = true;
|
165
|
-
}
|
166
|
-
else {
|
167
|
-
this.kbaQuestions = ((_a = r.questions) === null || _a === void 0 ? void 0 : _a.question) || [];
|
168
|
-
this.kbaChoices = [];
|
169
|
-
}
|
170
|
-
})
|
171
|
-
.catch(e => console.log('Error getting KBA step', e));
|
172
|
-
}
|
173
171
|
}
|
174
172
|
catch (e) {
|
175
173
|
console.log('[SIGN] Error with signing session', e);
|
@@ -588,6 +586,27 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
588
586
|
});
|
589
587
|
this.checkRecipientFields();
|
590
588
|
}
|
589
|
+
handleAuthenticateSigner(params) {
|
590
|
+
console.log('[SIGN] Submitting authentication step', params);
|
591
|
+
authenticateSigner(this.endpoint, params)
|
592
|
+
.then(r => {
|
593
|
+
console.log('[SIGN] Authentication successful', r);
|
594
|
+
this.authStep = r.auth_step;
|
595
|
+
this.authDetails = r.auth_details;
|
596
|
+
})
|
597
|
+
.catch(e => {
|
598
|
+
var _a, _b, _c, _d, _e;
|
599
|
+
console.log('[SIGN] Error submitting authentication step', e);
|
600
|
+
if ((_c = (_b = (_a = e.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.error) === null || _c === void 0 ? void 0 : _c.includes('failed')) {
|
601
|
+
this.fatalErrorHeader = 'Recipient Verification Failed';
|
602
|
+
this.fatalErrorMessage = 'We were unable to verify your identity. The sender has been notified.';
|
603
|
+
this.isDone = true;
|
604
|
+
}
|
605
|
+
else {
|
606
|
+
VerdocsToast(((_e = (_d = e.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.error) || 'Unable to verify your identity. Please try again.', { style: 'error' });
|
607
|
+
}
|
608
|
+
});
|
609
|
+
}
|
591
610
|
render() {
|
592
611
|
if (this.showLoadError) {
|
593
612
|
return (h(Host, null, h("verdocs-ok-dialog", { heading: "Unable to Start Signing", message: `Sorry, your invite code is invalid or has expired. Please check your email for an updated invitation, or contact the sender.`, buttonLabel: "OK", onNext: () => {
|
@@ -611,86 +630,91 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
611
630
|
if (!this.agreed) {
|
612
631
|
return (h(Host, { class: "agreed" }, h("div", { id: "verdocs-sign-header" }, h("div", { class: "inner" }, h("img", { src: "https://verdocs.com/assets/white-logo.svg", alt: "Verdocs Logo", class: "logo" }), h("div", { class: "title" }, this.envelope.name))), h("div", { class: "document", style: { paddingTop: '15px' } }, h("img", { src: "https://public-assets.verdocs.com/loading-placeholder.png", style: { width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px' }, alt: "Placeholder page" })), h("div", { class: "cover" }, h("div", { class: "agree" }, h("verdocs-checkbox", { name: "agree", label: "By checking this box, you:", onInput: () => this.handleClickAgree() }), h("ul", null, h("li", null, "Agree to use electronic records and signatures, and confirm you have read the", ' ', h("a", { href: "https://verdocs.com/en/electronic-record-signature-disclosure/", target: "_blank" }, "Electronic Record and Signatures Disclosure"), "."), h("li", null, "Agree to Verdocs'", ' ', h("a", { href: "https://verdocs.com/en/eula", target: "_blank" }, "End User License Agreement"), ' ', "and confirm you have read Verdocs'", ' ', h("a", { href: "https://verdocs.com/en/privacy-policy/", target: "_blank" }, "Privacy Policy"), "."))))));
|
613
632
|
}
|
614
|
-
if (this.
|
615
|
-
return (h(Host, { class: "kba" }, h("div", { id: "verdocs-sign-header" }, h("div", { class: "inner" }, h("img", { src: "https://verdocs.com/assets/white-logo.svg", alt: "Verdocs Logo", class: "logo" }), h("div", { class: "title" }, this.envelope.name))), h("div", { class: "document", style: { paddingTop: '15px' } }, h("img", { src: "https://public-assets.verdocs.com/loading-placeholder.png", style: { width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px' }, alt: "Placeholder page" })), h("div", { class: "cover" }, h("div", { class: "kba" }, h("verdocs-kba-dialog", { mode: "text", step: 1, steps: 1, helptitle: "Document is protected by a
|
616
|
-
submitKbaPin(this.endpoint, this.envelopeId, this.roleId, e.detail)
|
617
|
-
.then(r => {
|
618
|
-
console.log('[SIGN] PIN code submission result', r);
|
619
|
-
if (r.kba_step === 'complete') {
|
620
|
-
this.kbaStep = '';
|
621
|
-
}
|
622
|
-
})
|
623
|
-
.catch(e => {
|
624
|
-
var _a, _b, _c, _d;
|
625
|
-
console.log('[SIGN] Error submitting PIN', e);
|
626
|
-
if (((_b = (_a = e.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.error) === 'Rejecting PIN submission, too many attempts') {
|
627
|
-
this.fatalErrorHeader = 'PIN Verification Failed';
|
628
|
-
this.fatalErrorMessage = 'Too many failed attempts. The sender has been notified.';
|
629
|
-
this.isDone = true;
|
630
|
-
}
|
631
|
-
else {
|
632
|
-
VerdocsToast(((_d = (_c = e.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.error) || 'Unable to verify PIN code. Please try again.', { style: 'error' });
|
633
|
-
}
|
634
|
-
});
|
635
|
-
} })))));
|
633
|
+
if (this.authStep === 'passcode') {
|
634
|
+
return (h(Host, { class: "kba" }, h("div", { id: "verdocs-sign-header" }, h("div", { class: "inner" }, h("img", { src: "https://verdocs.com/assets/white-logo.svg", alt: "Verdocs Logo", class: "logo" }), h("div", { class: "title" }, this.envelope.name))), h("div", { class: "document", style: { paddingTop: '15px' } }, h("img", { src: "https://public-assets.verdocs.com/loading-placeholder.png", style: { width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px' }, alt: "Placeholder page" })), h("div", { class: "cover" }, h("div", { class: "kba" }, h("verdocs-kba-dialog", { mode: "text", step: 1, steps: 1, helptitle: "Document is protected by a Passcode", helptext: "Please enter your Passcode to proceed. If you do not have one, please contact the sender.", label: "Passcode", onNext: e => this.handleAuthenticateSigner({ auth_method: 'passcode', code: e.detail }) })))));
|
636
635
|
}
|
637
|
-
if (this.
|
636
|
+
if (this.authStep === 'kba') {
|
638
637
|
return (h(Host, { class: "kba" }, h("div", { id: "verdocs-sign-header" }, h("div", { class: "inner" }, h("img", { src: "https://verdocs.com/assets/white-logo.svg", alt: "Verdocs Logo", class: "logo" }), h("div", { class: "title" }, this.envelope.name))), h("div", { class: "document", style: { paddingTop: '15px' } }, h("img", { src: "https://public-assets.verdocs.com/loading-placeholder.png", style: { width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px' }, alt: "Placeholder page" })), h("div", { class: "cover" }, h("div", { class: "kba" }, h("verdocs-kba-dialog", { mode: "identity", helptitle: "Document requires identity verification", helptext: "Please complete your contact details to proceed.", recipient: this.recipient, onNext: async (e) => {
|
639
638
|
const recipDetails = e.detail;
|
640
|
-
|
641
|
-
|
642
|
-
|
639
|
+
this.handleAuthenticateSigner({
|
640
|
+
auth_method: 'kba',
|
641
|
+
first_name: recipDetails.first_name,
|
642
|
+
last_name: recipDetails.last_name,
|
643
643
|
address: recipDetails.address,
|
644
644
|
city: recipDetails.city,
|
645
645
|
state: recipDetails.state,
|
646
646
|
zip: recipDetails.zip,
|
647
|
-
|
648
|
-
|
649
|
-
.then(r => {
|
650
|
-
console.log('[SIGN] Identity submission result', r);
|
651
|
-
this.kbaStep = r.kba_step;
|
652
|
-
})
|
653
|
-
.catch(e => {
|
654
|
-
var _a, _b;
|
655
|
-
console.log('[SIGN] Error submitting identity', e);
|
656
|
-
VerdocsToast(((_b = (_a = e.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.error) || 'Unable to verify identity.', { style: 'error' });
|
647
|
+
ssn_last_4: recipDetails.ssn_last_4,
|
648
|
+
dob: recipDetails.dob,
|
657
649
|
});
|
658
650
|
} })))));
|
659
651
|
}
|
660
|
-
if (this.kbaStep === 'challenge') {
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
652
|
+
// if (this.kbaStep === 'challenge') {
|
653
|
+
// const questionNumber = this.kbaChoices.length;
|
654
|
+
// const kbaQuestion = this.kbaQuestions[questionNumber];
|
655
|
+
// return (
|
656
|
+
// <Host class="kba">
|
657
|
+
// <div id="verdocs-sign-header">
|
658
|
+
// <div class="inner">
|
659
|
+
// <img src="https://verdocs.com/assets/white-logo.svg" alt="Verdocs Logo" class="logo" />
|
660
|
+
// <div class="title">{this.envelope.name}</div>
|
661
|
+
// </div>
|
662
|
+
// </div>
|
663
|
+
//
|
664
|
+
// <div class="document" style={{paddingTop: '15px'}}>
|
665
|
+
// <img
|
666
|
+
// src="https://public-assets.verdocs.com/loading-placeholder.png"
|
667
|
+
// style={{width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px'}}
|
668
|
+
// alt="Placeholder page"
|
669
|
+
// />
|
670
|
+
// </div>
|
671
|
+
//
|
672
|
+
// <div class="cover">
|
673
|
+
// <div class="kba">
|
674
|
+
// {this.kbaChoices.length >= this.kbaQuestions.length ? (
|
675
|
+
// <verdocs-spinner />
|
676
|
+
// ) : (
|
677
|
+
// <verdocs-kba-dialog
|
678
|
+
// mode="choice"
|
679
|
+
// helptitle="Your identity requires additional verification"
|
680
|
+
// helptext={kbaQuestion?.prompt || 'Please select one of the options below.'}
|
681
|
+
// choices={kbaQuestion?.answer || ['Skip Question']}
|
682
|
+
// step={questionNumber + 1}
|
683
|
+
// steps={this.kbaQuestions.length}
|
684
|
+
// onNext={async (e: any) => {
|
685
|
+
// const answer = e.detail as string;
|
686
|
+
// this.kbaChoices = [...this.kbaChoices, answer];
|
687
|
+
// if (this.kbaChoices.length >= this.kbaQuestions.length) {
|
688
|
+
// const responses = this.kbaQuestions.map((q, i) => ({type: q.type, answer: this.kbaChoices[i]}));
|
689
|
+
// console.log('Submitting KBA responses', this.kbaChoices, responses);
|
690
|
+
// try {
|
691
|
+
// const response = await submitKbaChallengeResponse(this.endpoint, this.envelopeId, this.roleId, responses);
|
692
|
+
// console.log('KBA challenge response', response);
|
693
|
+
// this.kbaStep = response.kba_step;
|
694
|
+
// if (this.kbaStep === 'failed') {
|
695
|
+
// this.fatalErrorHeader = 'Identity Verification Failed';
|
696
|
+
// this.fatalErrorMessage = 'We were unable to verify your identity. The sender has been notified.';
|
697
|
+
// this.isDone = true;
|
698
|
+
// } else {
|
699
|
+
// this.kbaQuestions = (response as any).questions?.question || [];
|
700
|
+
// this.kbaChoices = [];
|
701
|
+
// }
|
702
|
+
// } catch (e) {
|
703
|
+
// console.log('Error submitting KBA challenge', e);
|
704
|
+
// this.kbaStep = '';
|
705
|
+
// this.fatalErrorHeader = 'Unable to Verify Identity';
|
706
|
+
// this.fatalErrorMessage = e.response?.data?.error || 'Please try again later.';
|
707
|
+
// this.isDone = true;
|
708
|
+
// }
|
709
|
+
// }
|
710
|
+
// }}
|
711
|
+
// />
|
712
|
+
// )}
|
713
|
+
// </div>
|
714
|
+
// </div>
|
715
|
+
// </Host>
|
716
|
+
// );
|
717
|
+
// }
|
694
718
|
return (h(Host, null, h("div", { id: "verdocs-sign-header" }, h("div", { class: "inner" }, h("img", { src: "https://verdocs.com/assets/white-logo.svg", alt: "Verdocs Logo", class: "logo" }), h("div", { class: "title" }, this.envelope.name), h("div", { style: { flex: '1' } }), !this.finishLater && h("verdocs-button", { size: "xsmall", label: this.nextButtonLabel, disabled: !this.agreed, onClick: () => this.handleNext() }), h("div", { style: { marginLeft: '10px' } }), h("verdocs-dropdown", { options: !this.isDone && !this.finishLater ? inProgressMenuOptions : doneMenuOptions, onOptionSelected: e => this.handleOptionSelected(e) }))), h("div", { class: "document", style: { paddingTop: '15px' } }, (this.envelope.documents || []).map(envelopeDocument => {
|
695
719
|
const pageNumbers = integerSequence(1, envelopeDocument.pages);
|
696
720
|
return (h(Fragment, null, pageNumbers.map(pageNumber => {
|
@@ -739,7 +763,8 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
739
763
|
"showFinishLater": [32],
|
740
764
|
"agreed": [32],
|
741
765
|
"documentsSingularPlural": [32],
|
742
|
-
"
|
766
|
+
"authStep": [32],
|
767
|
+
"authDetails": [32],
|
743
768
|
"kbaQuestions": [32],
|
744
769
|
"showSpinner": [32],
|
745
770
|
"kbaChoices": [32],
|