@verdocs/web-sdk 1.9.33 → 1.9.34
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-dropdown.cjs.entry.js +91 -0
- package/dist/cjs/verdocs-dropdown.cjs.entry.js.map +1 -0
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +6 -5
- package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-view.cjs.entry.js +89 -0
- package/dist/cjs/verdocs-view.cjs.entry.js.map +1 -0
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/elements/verdocs-field-radio-button-group/verdocs-field-radio-button.js +2 -1
- package/dist/collection/components/elements/verdocs-field-radio-button-group/verdocs-field-radio-button.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.css +3 -2
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +7 -5
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.stories.js +2 -2
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.stories.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.css +10 -26
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +19 -3
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.js.map +1 -1
- package/dist/components/verdocs-field-radio-button.js +2 -1
- package/dist/components/verdocs-field-radio-button.js.map +1 -1
- package/dist/components/verdocs-sign.js +8 -6
- package/dist/components/verdocs-sign.js.map +1 -1
- package/dist/components/verdocs-view2.js +28 -6
- package/dist/components/verdocs-view2.js.map +1 -1
- package/dist/docs.json +9 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-dropdown.entry.js +87 -0
- package/dist/esm/verdocs-dropdown.entry.js.map +1 -0
- package/dist/esm/verdocs-field-radio-button.entry.js +2 -1
- package/dist/esm/verdocs-field-radio-button.entry.js.map +1 -1
- package/dist/esm/verdocs-sign.entry.js +6 -5
- package/dist/esm/verdocs-sign.entry.js.map +1 -1
- package/dist/esm/verdocs-view.entry.js +85 -0
- package/dist/esm/verdocs-view.entry.js.map +1 -0
- 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-dropdown.entry.js +2 -0
- package/dist/esm-es5/verdocs-dropdown.entry.js.map +1 -0
- package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-radio-button.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-view.entry.js +2 -0
- package/dist/esm-es5/verdocs-view.entry.js.map +1 -0
- 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 +1 -0
- package/dist/types/components/embeds/verdocs-view/verdocs-view.d.ts +1 -0
- package/dist/verdocs-web-sdk/p-05433ef8.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-05433ef8.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-05b15286.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-05b15286.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-a3820c7f.entry.js → p-37a198be.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-37a198be.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-53011513.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-53011513.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-77fdef53.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-77fdef53.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-c16b6ca4.system.js +1 -1
- package/dist/verdocs-web-sdk/p-c16b6ca4.system.js.map +1 -1
- package/dist/verdocs-web-sdk/p-d942510c.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-d942510c.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-b94cdaea.system.entry.js → p-fa2ef80d.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-fa2ef80d.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-ff3f1b98.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-ff3f1b98.system.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 +2 -2
- package/dist/cjs/verdocs-dropdown_2.cjs.entry.js +0 -156
- package/dist/cjs/verdocs-dropdown_2.cjs.entry.js.map +0 -1
- package/dist/esm/verdocs-dropdown_2.entry.js +0 -151
- package/dist/esm/verdocs-dropdown_2.entry.js.map +0 -1
- package/dist/esm-es5/verdocs-dropdown_2.entry.js +0 -2
- package/dist/esm-es5/verdocs-dropdown_2.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-1be6f38a.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-1be6f38a.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-4c411b0c.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-4c411b0c.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-9f1225bf.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-9f1225bf.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-a3820c7f.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-b122f5c7.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-b122f5c7.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-b94cdaea.system.entry.js.map +0 -1
|
@@ -4,8 +4,10 @@ import { getEnvelopeById } from '../../../utils/Envelopes';
|
|
|
4
4
|
import EnvelopeStore from '../../../utils/envelopeStore';
|
|
5
5
|
import { SDKError } from '../../../utils/errors';
|
|
6
6
|
import { savePDF } from '../../../utils/utils';
|
|
7
|
-
const
|
|
8
|
-
|
|
7
|
+
const menuOptions = [
|
|
8
|
+
{ id: 'print', label: 'Print' },
|
|
9
|
+
{ id: 'download', label: 'Download' },
|
|
10
|
+
];
|
|
9
11
|
/**
|
|
10
12
|
* Render the documents attached to an envelope in read-only (view) mode. All documents are displayed in order.
|
|
11
13
|
*/
|
|
@@ -36,6 +38,18 @@ export class VerdocsView {
|
|
|
36
38
|
const pageInfo = e.detail;
|
|
37
39
|
console.log('[SIGN] Page rendered', pageInfo);
|
|
38
40
|
}
|
|
41
|
+
async handleOptionSelected(e) {
|
|
42
|
+
switch (e.detail.id) {
|
|
43
|
+
case 'print':
|
|
44
|
+
window.print();
|
|
45
|
+
break;
|
|
46
|
+
case 'download':
|
|
47
|
+
savePDF(this.endpoint, EnvelopeStore.envelope, EnvelopeStore.envelope.envelope_document_id).catch(e => {
|
|
48
|
+
console.log('Error downloading PDF', e);
|
|
49
|
+
});
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
39
53
|
render() {
|
|
40
54
|
var _a;
|
|
41
55
|
console.log('[VIEW] Rendering', EnvelopeStore.error, EnvelopeStore.loading, EnvelopeStore.envelope);
|
|
@@ -45,7 +59,9 @@ export class VerdocsView {
|
|
|
45
59
|
if (EnvelopeStore.error) {
|
|
46
60
|
return (h(Host, null, h("div", null, EnvelopeStore.error)));
|
|
47
61
|
}
|
|
48
|
-
return (h(Host, null, h("div", { class: "header" }, h(
|
|
62
|
+
return (h(Host, null, h("div", { class: "header" }, h(Fragment, null, h("img", { src: "https://verdocs.com/assets/white-logo.svg", alt: "Verdocs Logo", class: "logo" }), h("div", { class: "title" }, EnvelopeStore.envelope.name), h("div", { style: { flex: '1' } }), h("div", { style: { marginLeft: '10px' } }), h("verdocs-dropdown", { options: menuOptions, onOptionSelected: e => this.handleOptionSelected(e) }))), h("div", { class: "document" }, (((_a = EnvelopeStore.envelope) === null || _a === void 0 ? void 0 : _a.documents) || [])
|
|
63
|
+
.filter(document => document.type !== 'certificate')
|
|
64
|
+
.map(envelopeDocument => {
|
|
49
65
|
const pages = [...((envelopeDocument === null || envelopeDocument === void 0 ? void 0 : envelopeDocument.pages) || [])];
|
|
50
66
|
pages.sort((a, b) => a.sequence - b.sequence);
|
|
51
67
|
return (h(Fragment, null, pages.map(page => (h("verdocs-document-page", { pageImageUri: page.display_uri, virtualWidth: 612, virtualHeight: 792, pageNumber: page.sequence, onPageRendered: e => this.handlePageRendered(e), layers: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verdocs-view.js","sourceRoot":"","sources":["../../../../src/components/embeds/verdocs-view/verdocs-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAgB,QAAQ,EAAC,MAAM,eAAe,CAAC;AAC/F,OAAO,EAAC,eAAe,EAAC,MAAM,0BAA0B,CAAC;AACzD,OAAO,aAAa,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAC,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAE7C,MAAM,
|
|
1
|
+
{"version":3,"file":"verdocs-view.js","sourceRoot":"","sources":["../../../../src/components/embeds/verdocs-view/verdocs-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAA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from '@stencil/core';\nimport {getEnvelopeById} from '../../../utils/Envelopes';\nimport EnvelopeStore from '../../../utils/envelopeStore';\nimport {IDocumentPageInfo} from '../../../utils/Types';\nimport {SDKError} from '../../../utils/errors';\nimport {savePDF} from '../../../utils/utils';\n\nconst menuOptions = [\n {id: 'print', label: 'Print'},\n {id: 'download', label: 'Download'},\n];\n\n/**\n * Render the documents attached to an envelope in read-only (view) mode. All documents are displayed in order.\n */\n@Component({\n tag: 'verdocs-view',\n styleUrl: 'verdocs-view.scss',\n shadow: false,\n})\nexport class VerdocsView {\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 = 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 * 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 componentWillLoad() {\n this.endpoint.loadSession();\n }\n\n // TODO: Handling signing vs preview-as-user cases\n // TODO: Handle anonymous case and failure to load due to not being logged in\n async componentDidLoad() {\n if (!this.envelopeId) {\n console.error(`[VIEW] Missing required envelopeId`);\n return;\n }\n\n try {\n await getEnvelopeById(this.endpoint, this.envelopeId);\n } catch (e) {\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n handlePageRendered(e) {\n const pageInfo = e.detail as IDocumentPageInfo;\n console.log('[SIGN] Page rendered', pageInfo);\n }\n\n async handleOptionSelected(e) {\n switch (e.detail.id) {\n case 'print':\n window.print();\n break;\n case 'download':\n savePDF(this.endpoint, EnvelopeStore.envelope, EnvelopeStore.envelope.envelope_document_id).catch(e => {\n console.log('Error downloading PDF', e);\n });\n break;\n }\n }\n\n render() {\n console.log('[VIEW] Rendering', EnvelopeStore.error, EnvelopeStore.loading, EnvelopeStore.envelope);\n if (EnvelopeStore.loading || !EnvelopeStore.envelope) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n if (EnvelopeStore.error) {\n return (\n <Host>\n <div>{EnvelopeStore.error}</div>\n </Host>\n );\n }\n\n return (\n <Host>\n <div class=\"header\">\n <Fragment>\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{EnvelopeStore.envelope.name}</div>\n <div style={{flex: '1'}} />\n <div style={{marginLeft: '10px'}} />\n <verdocs-dropdown options={menuOptions} onOptionSelected={e => this.handleOptionSelected(e)} />\n </Fragment>\n </div>\n\n <div class=\"document\">\n {(EnvelopeStore.envelope?.documents || [])\n .filter(document => document.type !== 'certificate')\n .map(envelopeDocument => {\n const pages = [...(envelopeDocument?.pages || [])];\n pages.sort((a, b) => a.sequence - b.sequence);\n\n return (\n <Fragment>\n {pages.map(page => (\n <verdocs-document-page\n pageImageUri={page.display_uri}\n virtualWidth={612}\n virtualHeight={792}\n pageNumber={page.sequence}\n onPageRendered={e => this.handlePageRendered(e)}\n layers={[\n {name: 'page', type: 'canvas'},\n {name: 'controls', type: 'div'},\n ]}\n />\n ))}\n </Fragment>\n );\n })}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -21,12 +21,13 @@ const VerdocsFieldRadioButton$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
21
21
|
const settings = getFieldSettings(this.field);
|
|
22
22
|
const disabled = (_b = (_a = this.disabled) !== null && _a !== void 0 ? _a : settings.disabled) !== null && _b !== void 0 ? _b : false;
|
|
23
23
|
const backgroundColor = this.field['rgba'] || getRGBA(this.roleindex);
|
|
24
|
+
const required = this.field.required;
|
|
24
25
|
const option = settings.options[this.option];
|
|
25
26
|
const id = `${this.field.name}-${option.id}`;
|
|
26
27
|
if (this.done) {
|
|
27
28
|
return (h(Host, { class: { done: this.done }, style: { maxWidth: '10px' } }, h("span", { innerHTML: !!option.selected ? RadioIconSelected : RadioIconUnselected })));
|
|
28
29
|
}
|
|
29
|
-
return (h(Host, { class: { required
|
|
30
|
+
return (h(Host, { class: { required, disabled }, style: { backgroundColor } }, h("input", { id: id, type: "radio", value: option.id, tabIndex: settings.order, name: this.field.name, checked: !!option.selected, disabled: disabled, required: settings.required }), h("label", { htmlFor: id })));
|
|
30
31
|
}
|
|
31
32
|
static get style() { return verdocsFieldRadioButtonCss; }
|
|
32
33
|
}, [0, "verdocs-field-radio-button", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"verdocs-field-radio-button.js","mappings":";;;;AAAA,MAAM,0BAA0B,GAAG,yuDAAyuD;;ACM5wD,MAAM,mBAAmB,GAAG,oNAAoN,CAAC;AAEjP,MAAM,iBAAiB,GAAG,6QAA6Q,CAAC;MAU3RA,yBAAuB;;;;iBAIsB,IAAI;kBAKnC,CAAC;oBAKG,KAAK;gBAKT,KAAK;qBAKD,CAAC;;EAE9B,MAAM;;IACJ,MAAM,QAAQ,GAAG,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,QAAQ,GAAG,MAAA,MAAA,IAAI,CAAC,QAAQ,mCAAI,QAAQ,CAAC,QAAQ,mCAAI,KAAK,CAAC;IAC7D,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACtE,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7C,MAAM,EAAE,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,MAAM,CAAC,EAAE,EAAE,CAAC;IAE7C,IAAI,IAAI,CAAC,IAAI,EAAE;MACb,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAC,EAAE,KAAK,EAAE,EAAC,QAAQ,EAAE,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AmB,GAAI,CAC3E,EACP;KACH;IAED,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,EAAC,QAAQ,EAAE,QAAQ,EAAC,EAAE,KAAK,EAAE,EAAC,eAAe,EAAC,IACzD,aACE,EAAE,EAAE,EAAE,EACN,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,MAAM,CAAC,EAAE,EAChB,QAAQ,EAAE,QAAQ,CAAC,KAAK,EACxB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EACrB,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAC1B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,CAAC,QAAQ,GAC3B,EACF,aAAO,OAAO,EAAE,EAAE,GAAI,CACjB,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["VerdocsFieldRadioButton"],"sources":["./src/components/elements/verdocs-field-radio-button-group/verdocs-field-radio-button.scss?tag=verdocs-field-radio-button","./src/components/elements/verdocs-field-radio-button-group/verdocs-field-radio-button.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\n// See https://www.sliderrevolution.com/resources/styling-radio-buttons/\nverdocs-field-radio-button {\n font-family: $verdocs-primary-font;\n width: 14px;\n height: 14px;\n display: block;\n font-size: 11px;\n position: relative;\n background-color: transparent;\n transform-origin: bottom left;\n border-radius: 100%;\n\n svg {\n margin-top: 4px;\n }\n\n &.disabled {\n opacity: 0.5;\n }\n\n &.disabled.done {\n opacity: 1;\n }\n\n &.done input[type='radio'] {\n margin: 0;\n padding: 0;\n width: 10px;\n height: 10px;\n }\n\n &:not(.done) input[type='radio'] {\n position: absolute;\n opacity: 0;\n\n + label {\n &:before {\n content: '';\n //background: $verdocs-grey-3;\n border-radius: 100%;\n border: 1px solid rgba(0, 0, 0, 0.6);\n display: inline-block;\n width: 10px;\n height: 10px;\n position: absolute;\n left: 1px;\n top: 1px;\n cursor: pointer;\n text-align: center;\n transition: all 250ms ease;\n }\n }\n\n &:checked {\n + label {\n &:before {\n background-color: $verdocs-green;\n box-shadow: inset 0 0 0 2px $verdocs-grey-3;\n }\n }\n }\n\n &:focus {\n + label {\n &:before {\n outline: none;\n border-color: $verdocs-green;\n }\n }\n }\n\n &:disabled {\n + label {\n &:before {\n box-shadow: inset 0 0 0 4px $verdocs-grey-3;\n border-color: darken($verdocs-grey-3, 25%);\n background: darken($verdocs-grey-3, 25%);\n }\n }\n }\n\n + label {\n &:empty {\n &:before {\n margin-right: 0;\n }\n }\n }\n }\n\n &.required {\n input[type='radio'] {\n + label {\n &:before {\n border: 1px solid $verdocs-red-1;\n }\n }\n }\n }\n\n &.hide {\n display: none;\n }\n\n &.focused {\n animation: verdocs-field-pulse 0.75s 2;\n }\n}\n","import {getRGBA} from '@verdocs/js-sdk/Utils/Colors';\nimport {Component, h, Host, Prop} from '@stencil/core';\nimport {ITemplateField} from '@verdocs/js-sdk/Templates/Types';\nimport {IDocumentField} from '@verdocs/js-sdk/Envelopes/Types';\nimport {getFieldSettings} from '../../../utils/utils';\n\nconst RadioIconUnselected = `<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"></path></svg>`;\n\nconst RadioIconSelected = `<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"></path></svg>`;\n\n/**\n * Displays a radio button.\n */\n@Component({\n tag: 'verdocs-field-radio-button',\n styleUrl: 'verdocs-field-radio-button.scss',\n shadow: false,\n})\nexport class VerdocsFieldRadioButton {\n /**\n * The document or template field to display.\n */\n @Prop() field: IDocumentField | ITemplateField | null = null;\n\n /**\n * The index of the settings option this particular checkbox is for\n */\n @Prop() option: number = 0;\n\n /**\n * If set, overrides the field's settings object. Primarily used to support \"preview\" modes where all fields are disabled.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * If set, the field is considered \"done\" and is drawn in a display-final-value state.\n */\n @Prop() done?: boolean = false;\n\n /**\n * If set, the field will be colored using this index value to select the background color.\n */\n @Prop() roleindex?: number = 0;\n\n render() {\n const settings = getFieldSettings(this.field);\n const disabled = this.disabled ?? settings.disabled ?? false;\n const backgroundColor = this.field['rgba'] || getRGBA(this.roleindex);\n const required = this.field.required;\n const option = settings.options[this.option];\n const id = `${this.field.name}-${option.id}`;\n\n if (this.done) {\n return (\n <Host class={{done: this.done}} style={{maxWidth: '10px'}}>\n <span innerHTML={!!option.selected ? RadioIconSelected : RadioIconUnselected} />\n </Host>\n );\n }\n\n return (\n <Host class={{required, disabled}} style={{backgroundColor}}>\n <input\n id={id}\n type=\"radio\"\n value={option.id}\n tabIndex={settings.order}\n name={this.field.name}\n checked={!!option.selected}\n disabled={disabled}\n required={settings.required}\n />\n <label htmlFor={id} />\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -106,11 +106,8 @@ var createInitials = function (endpoint, name, initials) {
|
|
|
106
106
|
.then(function (r) { return r.data; });
|
|
107
107
|
};
|
|
108
108
|
|
|
109
|
-
const verdocsSignCss = "verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign .header{color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 15px;font-size:12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}verdocs-sign .header .logo{width:80px;margin:-6px 0 0 10px}verdocs-sign .header .title{padding-left:16px;font-size:18px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}verdocs-sign .intro{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;color:#111111;padding:0 15px;font-size:18px;font-weight:500;line-height:28px;-ms-flex-direction:row;flex-direction:row;background:#ffffff;-ms-flex-align:center;align-items:center}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;z-index:999;position:absolute;background:rgba(0, 0, 0, 0.5)}verdocs-sign
|
|
109
|
+
const verdocsSignCss = "verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign .header{color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 15px;font-size:12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}verdocs-sign .header .logo{width:80px;display:none;margin:-6px 0 0 10px}verdocs-sign .header .title{padding-left:16px;font-size:18px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}verdocs-sign .intro{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;color:#111111;padding:0 15px;font-size:18px;font-weight:500;line-height:28px;-ms-flex-direction:row;flex-direction:row;background:#ffffff;-ms-flex-align:center;align-items:center}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;z-index:999;position:absolute;background:rgba(0, 0, 0, 0.5)}verdocs-sign>.document{-ms-flex:1;flex:1;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .agree{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0 15px}verdocs-sign .agree .intro{display:none}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}@media print{verdocs-sign .header{display:none}}";
|
|
110
110
|
|
|
111
|
-
// const PrintIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"></path></svg>`;
|
|
112
|
-
//
|
|
113
|
-
// const DownloadIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z"></path></svg>`;
|
|
114
111
|
const inProgressMenuOptions = [
|
|
115
112
|
{ id: 'later', label: 'Finish Later' },
|
|
116
113
|
// {id: 'claim', label: 'Claim the Document', disabled: true},
|
|
@@ -146,6 +143,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
146
143
|
this.finishLater = false;
|
|
147
144
|
this.showFinishLater = false;
|
|
148
145
|
this.agreed = false;
|
|
146
|
+
this.documentsSingularPlural = 'document';
|
|
149
147
|
}
|
|
150
148
|
componentWillLoad() {
|
|
151
149
|
this.endpoint = new VerdocsEndpoint({ sessionType: 'signing' });
|
|
@@ -180,6 +178,9 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
180
178
|
this.nextButtonLabel = 'Next';
|
|
181
179
|
}
|
|
182
180
|
await getEnvelopeById(this.endpoint, this.envelopeId);
|
|
181
|
+
if (state.envelope.documents.length > 0) {
|
|
182
|
+
this.documentsSingularPlural = 'document(s)';
|
|
183
|
+
}
|
|
183
184
|
this.recipientIndex = state.envelope.recipients.findIndex(recipient => recipient.role_name == this.roleId);
|
|
184
185
|
if (this.recipientIndex > -1) {
|
|
185
186
|
this.recipient = state.envelope.recipients[this.recipientIndex];
|
|
@@ -513,7 +514,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
513
514
|
{ name: 'controls', type: 'div' },
|
|
514
515
|
] }));
|
|
515
516
|
})));
|
|
516
|
-
}))), this.showFinishLater && (h("verdocs-ok-dialog", { heading: "You've saved your document to finish later.", message:
|
|
517
|
+
}))), this.showFinishLater && (h("verdocs-ok-dialog", { heading: "You've saved your document to finish later.", message: `To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`, onNext: () => (this.showFinishLater = false) })), this.errorMessage && h("verdocs-ok-dialog", { heading: "Network Error", message: this.errorMessage, onNext: () => (this.errorMessage = '') }), this.showDone && (h("verdocs-ok-dialog", { heading: "You're Done!", message: `You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`, onNext: () => (this.showDone = false) }))));
|
|
517
518
|
}
|
|
518
519
|
static get style() { return verdocsSignCss; }
|
|
519
520
|
}, [0, "verdocs-sign", {
|
|
@@ -531,7 +532,8 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
531
532
|
"showDone": [32],
|
|
532
533
|
"finishLater": [32],
|
|
533
534
|
"showFinishLater": [32],
|
|
534
|
-
"agreed": [32]
|
|
535
|
+
"agreed": [32],
|
|
536
|
+
"documentsSingularPlural": [32]
|
|
535
537
|
}]);
|
|
536
538
|
function defineCustomElement$1() {
|
|
537
539
|
if (typeof customElements === "undefined") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"verdocs-sign.js","mappings":";;;;;;;;;;;;;;;AAAA,IAAI,SAAS,GAAG,CAACA,SAAI,IAAIA,SAAI,CAAC,SAAS,KAAK,UAAU,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;AACzF,IAAI,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;AAChH,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,EAAE,UAAU,OAAO,EAAE,MAAM,EAAE;AAC/D,QAAQ,SAAS,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;AACnG,QAAQ,SAAS,QAAQ,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,EA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E,KAAK,EAAC;WAChC,GACD,EACF;OACH,CAAC,CACO,EACX;KACH,CAAC,CACE,CACP,EAEA,IAAI,CAAC,eAAe,KACnB,yBACE,OAAO,EAAC,6CAA6C,EACrD,OAAO,EAAC,2HAA2H,EACnI,MAAM,EAAE,OAAO,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,GAC5C,CACH,EAEA,IAAI,CAAC,YAAY,IAAI,yBAAmB,OAAO,EAAC,eAAe,EAAC,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,GAAI,EACtI,IAAI,CAAC,QAAQ,KACZ,yBACE,OAAO,EAAC,cAAc,EACtB,OAAO,EAAC,uOAAuO,EAC/O,MAAM,EAAE,OAAO,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,GACrC,CACH,CACI,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["this","VerdocsSign","Envelopes.getSigningSession","EnvelopeStore","Envelopes.updateEnvelopeField"],"sources":["./node_modules/@verdocs/js-sdk/Envelopes/Recipients.js","./node_modules/@verdocs/js-sdk/Envelopes/Signatures.js","./node_modules/@verdocs/js-sdk/Envelopes/Initials.js","./src/components/embeds/verdocs-sign/verdocs-sign.scss?tag=verdocs-sign","./src/components/embeds/verdocs-sign/verdocs-sign.tsx"],"sourcesContent":["var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n/**\n * Update a recipient's status block\n */\nexport var updateRecipient = function (endpoint, envelopeId, roleName, params) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .put(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(roleName), params)\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Submit an envelope (signing is finished). Note that all fields must be valid/completed for this to succeed.\n */\nexport var envelopeRecipientSubmit = function (endpoint, envelopeId, roleName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'submit' });\n};\n/**\n * Decline to complete an envelope (signing will not terminated).\n */\nexport var envelopeRecipientDecline = function (endpoint, envelopeId, roleName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'decline' });\n};\n/**\n * Claim / change ownership of an envelope. This is a special-case operation only available in certain workflows.\n */\nexport var envelopeRecipientChangeOwner = function (endpoint, envelopeId, roleName, email, fullName) { return updateRecipient(endpoint, envelopeId, roleName, { action: 'owner_update', email: email, full_name: fullName }); };\n/**\n * Agree to electronic signing.\n */\nexport var envelopeRecipientAgree = function (endpoint, envelopeId, roleName, agreed) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'update', agreed: agreed });\n};\n/**\n * Change a recipient's name.\n */\nexport var envelopeRecipientUpdateName = function (endpoint, envelopeId, roleName, fullName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'update', new_full_name: fullName });\n};\n/**\n * Change a recipient's name.\n */\nexport var envelopeRecipientPrepare = function (endpoint, envelopeId, roleName, recipients) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'prepare', recipients: recipients });\n};\nexport var getSignerToken = function (endpoint, envelopeId, roleName) {\n return endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(encodeURIComponent(roleName), \"/signer-token\"))\n .then(function (r) { return r.data; });\n};\nexport var getInPersonLink = function (endpoint, envelopeId, roleName) {\n return endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(encodeURIComponent(roleName), \"?in_person_link=true\"))\n .then(function (r) { return r.data; });\n};\n","/**\n * Create a signature block. In a typical signing workflow, the user is asked at the beginning of the process to \"adopt\"\n * a signature block to be used for all signature fields in the document. Thus, this is typically called one time to\n * create and store a signature block. Thereafter, the ID of the signature block may be re-used for each signature field\n * to be \"stamped\" by the user.\n */\nexport var createSignature = function (endpoint, name, signature) {\n var data = new FormData();\n data.append('signature', signature, name);\n return endpoint.api //\n .post(\"/signatures\", data)\n .then(function (r) { return r.data; });\n};\n/**\n * Get the availbable signatures for a user.\n */\nexport var getSignatures = function (endpoint) {\n return endpoint.api //\n .get('/signatures')\n .then(function (r) { return r.data; });\n};\n/**\n * Get a user's signature by ID.\n */\nexport var getSignature = function (endpoint, signatureId) {\n return endpoint.api //\n .get(\"/signatures/\".concat(signatureId))\n .then(function (r) { return r.data; });\n};\n/**\n * Delete a user's signature.\n */\nexport var deleteSignature = function (endpoint, signatureId) {\n return endpoint.api //\n .delete(\"/signatures/\".concat(signatureId))\n .then(function (r) { return r.data; });\n};\n","/**\n * Create an initials block. In a typical signing workflow, the user is asked at the beginning of the process to \"adopt\"\n * an initials block to be used for all initials fields in the document. Thus, this is typically called one time to\n * create and store an initials block. Thereafter, the ID of the initials block may be re-used for each initials field\n * to be \"stamped\" by the user.\n */\nexport var createInitials = function (endpoint, name, initials) {\n var data = new FormData();\n data.append('initial', initials, name);\n return endpoint.api //\n .post(\"/initials\", data)\n .then(function (r) { return r.data; });\n};\n","@import '../../../theme.scss';\n\nverdocs-sign {\n display: flex;\n overflow: hidden;\n position: relative;\n min-height: 600px;\n flex-direction: column;\n box-sizing: border-box;\n font-family: $verdocs-primary-font;\n\n div {\n display: block;\n box-sizing: border-box;\n }\n\n input {\n vertical-align: top;\n }\n\n .header {\n color: #fff;\n display: flex;\n z-index: 1000;\n flex: 0 0 56px;\n padding: 0 15px;\n font-size: 12px;\n align-items: center;\n flex-direction: row;\n transition: all 0.25s;\n background-color: $medium-bg;\n box-shadow: 0 4px 4px 0 rgb(0 0 0 / 24%), 0 0 4px 0 rgb(0 0 0 / 12%);\n\n .logo {\n width: 80px;\n margin: -6px 0 0 10px;\n }\n\n .title {\n padding-left: 16px;\n font-size: 18px;\n font-weight: 500;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n }\n\n .intro {\n width: 100%;\n display: flex;\n flex: 0 0 60px;\n color: #111111;\n padding: 0 15px;\n font-size: 18px;\n font-weight: 500;\n line-height: 28px;\n flex-direction: row;\n background: #ffffff;\n align-items: center;\n }\n\n .cover {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 999;\n position: absolute;\n background: rgba(0, 0, 0, 0.5);\n }\n\n .document {\n flex: 1;\n height: 100%;\n display: flex;\n padding: 15px;\n row-gap: 15px;\n min-height: 200px;\n position: relative;\n overflow-y: scroll;\n align-items: center;\n box-sizing: border-box;\n flex-direction: column;\n justify-content: center;\n\n .inner {\n width: 100%;\n max-width: 1028px;\n }\n }\n\n .agree {\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0 15px;\n\n .intro {\n display: none;\n }\n\n .header {\n flex: 0 0 56px;\n }\n }\n}\n\n@media print {\n verdocs-sign .header {\n display: none;\n }\n}\n","import {VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Envelopes} from '@verdocs/js-sdk/Envelopes';\nimport {createInitials} from '@verdocs/js-sdk/Envelopes/Initials';\nimport {createSignature} from '@verdocs/js-sdk/Envelopes/Signatures';\nimport {fullNameToInitials} from '@verdocs/js-sdk/Utils/Primitives';\nimport {isValidEmail, isValidPhone} from '@verdocs/js-sdk/Templates/Validators';\nimport {IDocumentField, IEnvelope, IRecipient} from '@verdocs/js-sdk/Envelopes/Types';\nimport {Event, EventEmitter, Host, Fragment, Component, Prop, State, h} from '@stencil/core';\nimport {updateEnvelopeFieldInitials, updateEnvelopeFieldSignature} from '@verdocs/js-sdk/Envelopes/Envelopes';\nimport {envelopeRecipientAgree, envelopeRecipientDecline, envelopeRecipientSubmit} from '@verdocs/js-sdk/Envelopes/Recipients';\nimport {getFieldId, getRoleIndex, renderDocumentField, savePDF, updateDocumentFieldValue} from '../../../utils/utils';\nimport {getEnvelopeById} from '../../../utils/Envelopes';\nimport EnvelopeStore from '../../../utils/envelopeStore';\nimport {IDocumentPageInfo} from '../../../utils/Types';\nimport {SDKError} from '../../../utils/errors';\n\n// const PrintIcon = `<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z\"></path></svg>`;\n//\n// const DownloadIcon = `<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z\"></path></svg>`;\n\nconst inProgressMenuOptions = [\n {id: 'later', label: 'Finish Later'}, //\n // {id: 'claim', label: 'Claim the Document', disabled: true},\n {id: 'decline', label: 'Decline to Sign'},\n {id: 'print', label: 'Print Without Signing'},\n {id: 'download', label: 'Download'},\n];\n\nconst doneMenuOptions = [\n {id: 'print', label: 'Print'},\n {id: 'download', label: 'Download'},\n];\n\n/**\n * Display an envelope signing experience. This will display the envelope's attached\n * documents with signing fields overlaid on each page.\n *\n * The component will attempt to initiate a signing session and load the specified\n * envelope. If successful, the recipient's fields will be enabled and the user will\n * be able to sign the envelope's attached documents. If not, an `sdkError` will be\n * thrown and the component will be blank/empty. To provide the best user experience,\n * applications should capture and handle this error to provide the user with\n * instructions/options for next steps based on the application's design and workflow.\n *\n * Unlike other components, this will always create its own endpoint to manage the\n * session session. This endpoint will be included in event callbacks for the\n * convenience of host applications that may wish to make server calls using the\n * signer's credentials once signing is complete (e.g. to obtain copies of\n * the signed attachments.)\n */\n@Component({\n tag: 'verdocs-sign',\n styleUrl: 'verdocs-sign.scss',\n shadow: false,\n})\nexport class VerdocsSign {\n endpoint: VerdocsEndpoint = null;\n\n /**\n * The ID of the envelope to sign.\n */\n @Prop() envelopeId: string | null = null;\n\n /**\n * The ID of the role that will be signing e.g. 'Recipient 1'\n */\n @Prop() roleId: string | null = null;\n\n /**\n * The invite code for the signer.\n */\n @Prop() inviteCode: string | null = null;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the envelope is updated in any way.\n */\n @Event({composed: true}) envelopeLoaded: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope}>;\n\n /**\n * Event fired when the envelope is updated in any way.\n */\n @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n @State() recipient: IRecipient | null = null;\n @State() signerToken = null;\n @State() hasSignature = false;\n @State() nextButtonLabel = 'Start';\n @State() nextSubmits = false;\n @State() errorMessage = '';\n @State() focusedField = '';\n @State() isDone = false;\n @State() showDone = false;\n\n @State() finishLater = false;\n @State() showFinishLater = false;\n @State() agreed = false;\n\n recipientIndex: number = -1;\n\n componentWillLoad() {\n this.endpoint = new VerdocsEndpoint({sessionType: 'signing'});\n }\n\n async componentDidLoad() {\n if (!this.envelopeId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required envelopId', 500, ''));\n return;\n }\n\n if (!this.roleId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required roleId', 500, ''));\n return;\n }\n\n if (!this.inviteCode) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required inviteCode', 500, ''));\n return;\n }\n\n try {\n console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);\n const {session, recipient, signerToken} = await Envelopes.getSigningSession(this.endpoint, {\n envelopeId: this.envelopeId,\n roleId: this.roleId,\n inviteCode: this.inviteCode,\n });\n\n console.log(`[SIGN] Loaded signing session ${session.email} / ${session.profile_id}`);\n\n this.recipient = recipient;\n console.log('[SIGN] We are recipient', this.recipient);\n this.signerToken = signerToken;\n this.endpoint.setToken(signerToken);\n\n if (this.agreed) {\n this.nextButtonLabel = 'Next';\n }\n\n await getEnvelopeById(this.endpoint, this.envelopeId);\n\n this.recipientIndex = EnvelopeStore.envelope.recipients.findIndex(recipient => recipient.role_name == this.roleId);\n if (this.recipientIndex > -1) {\n this.recipient = EnvelopeStore.envelope.recipients[this.recipientIndex];\n this.agreed = this.recipient.agreed;\n console.log('[SIGN] Found our recipient in the envelope', this.recipientIndex, this.recipient);\n } else {\n console.log('[SIGN] Could not find our recipient record', this.roleId, EnvelopeStore.envelope.recipients);\n }\n\n this.isDone = ['submitted', 'canceled', 'declined'].includes(this.recipient.status);\n\n // TODO: Fix service to allow this?\n // const sigs = await getSignatures();\n // console.log('sigs', sigs);\n\n this.envelopeLoaded?.emit({endpoint: this.endpoint, envelope: EnvelopeStore.envelope});\n } catch (e) {\n console.log('Error with signing session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n handleClickAgree() {\n envelopeRecipientAgree(this.endpoint, this.envelopeId, this.roleId, true)\n .then(() => {\n this.nextButtonLabel = 'Next';\n this.agreed = true; // The server returns a recipient object but it's not \"deep\" so we track this locally\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: EnvelopeStore.envelope, event: 'agreed'});\n })\n .catch(e => {\n console.log('Update failure', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleOptionSelected(e) {\n switch (e.detail.id) {\n case 'later':\n this.finishLater = true;\n this.showFinishLater = true;\n // this.router.navigate([`view/sign/${this.envelopeId}/role/${this.roleName}/saved`]);\n break;\n case 'claim':\n window.alert('This feature will be available in an upcoming release.');\n break;\n case 'decline':\n {\n const declineResult = await envelopeRecipientDecline(this.endpoint, this.envelopeId, this.roleId);\n console.log('Decline result', declineResult);\n this.isDone = true;\n }\n break;\n case 'print':\n window.print();\n break;\n case 'download':\n savePDF(this.endpoint, EnvelopeStore.envelope, EnvelopeStore.envelope.envelope_document_id).catch(e => {\n console.log('Error downloading PDF', e);\n });\n break;\n }\n }\n\n updateRecipientFieldValue(fieldName: string, updateResult: any) {\n this.recipient.fields.forEach(oldField => {\n if (oldField.name === fieldName) {\n oldField.settings = updateResult.settings;\n // TODO: When we break out other fields like value, update them here too\n updateDocumentFieldValue(oldField);\n }\n });\n }\n\n saveFieldChange(fieldName: string, fields: Record<string, any>) {\n Envelopes.updateEnvelopeField(this.endpoint, this.envelopeId, fieldName, fields) //\n .then(updateResult => {\n this.updateRecipientFieldValue(fieldName, updateResult);\n })\n .catch(e => {\n if (e.response?.status === 401 && e.response?.data?.error === 'jwt expired') {\n // TODO: Do we want to improve the instructions here?\n console.log('[SIGN] Signing session expired');\n this.errorMessage = 'Signing session expired. Please reload your browser to continue.';\n } else {\n console.log('[SIGN] Server error', e);\n }\n\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleFieldChange(field: IDocumentField, e: any) {\n const {value, checked} = e.target;\n\n switch (field.type) {\n case 'textbox':\n return this.saveFieldChange(field.name, {prepared: false, value});\n\n case 'checkbox_group': {\n const options = field.settings.options.map(option => ({id: option.id, checked: e.target.checked}));\n return this.saveFieldChange(field.name, {prepared: false, value: {options}});\n }\n\n case 'radio_button_group': {\n const options = field.settings.options.map(option => ({id: option.id, selected: e.target.value === option.id}));\n return this.saveFieldChange(field.name, {prepared: false, value: {options}});\n }\n\n case 'dropdown':\n return this.saveFieldChange(field.name, {prepared: false, value: e.detail});\n\n case 'initial':\n const initialsBlob = await (await fetch(e.detail)).blob();\n return createInitials(this.endpoint, 'initial', initialsBlob) //\n .then(async newInitials => {\n const updateResult = await updateEnvelopeFieldInitials(this.endpoint, this.envelopeId, field.name, newInitials.id);\n this.updateRecipientFieldValue(field.name, updateResult);\n });\n\n case 'signature':\n const signatureBlob = await (await fetch(e.detail)).blob();\n return createSignature(this.endpoint, 'signature', signatureBlob) //\n .then(async newSignature => {\n const updateResult = await updateEnvelopeFieldSignature(this.endpoint, this.envelopeId, field.name, newSignature.id);\n this.updateRecipientFieldValue(field.name, updateResult);\n });\n\n case 'date':\n const iso = e.target.getAttribute('iso');\n return this.saveFieldChange(field.name, {prepared: false, value: iso});\n\n case 'timestamp':\n console.log('Updating timestamp', {value, ts: e.target.getAttribute('timestamp')});\n break;\n\n default:\n console.log('Unhandled field update', {value, checked}, field);\n break;\n }\n }\n\n isFieldValid(field: IDocumentField) {\n const {required = false} = field;\n const {result = '', value = '', base64 = ''} = field.settings || {};\n switch (field.type) {\n case 'textbox':\n switch (field.settings?.validator || '') {\n case 'email':\n return isValidEmail(result);\n case 'phone':\n return isValidPhone(result);\n default:\n return !required || result !== '';\n }\n\n case 'signature':\n case 'initial':\n return !required || base64 !== '';\n\n // Timestamp fields get automatically filled when the envelope is submitted.\n case 'timestamp':\n return true;\n\n case 'textarea':\n case 'date':\n case 'attachment':\n return !required || result !== '';\n\n case 'dropdown':\n return !required || value !== '';\n\n case 'checkbox_group':\n const checkedCount = (field.settings?.options?.filter(option => option.checked) || []).length;\n return !required || (checkedCount >= (field.settings?.minimum_checked || 0) && checkedCount <= (field.settings?.maximum_checked || 999));\n\n case 'radio_button_group':\n return !required || (field.settings?.options?.filter(option => option.selected) || []).length > 0;\n // TODO\n // case 'checkbox':\n // return <verdocs-field-checkbox style={style} value={result || ''} id={id} />;\n // case 'payment':\n // return <verdocs-field-payment style={style} field={field} id={id} />;\n default:\n return false;\n }\n }\n\n async handleNext() {\n if (this.nextSubmits) {\n try {\n const result = await envelopeRecipientSubmit(this.endpoint, this.envelopeId, this.roleId);\n console.log('[SIGN] Submitted successfully', result);\n this.showDone = true;\n this.isDone = true;\n } catch (e) {\n console.log('Error submitting', e);\n }\n\n return;\n }\n\n // Find and focus the next incomplete required field\n const requiredFields = this.recipient.fields.filter(field => field.required);\n const focusedIndex = requiredFields.findIndex(field => field.name === this.focusedField);\n\n let nextFocusedIndex = focusedIndex + 1;\n if (nextFocusedIndex >= requiredFields.length) {\n nextFocusedIndex = 0;\n }\n\n let nextRequiredField = requiredFields[nextFocusedIndex];\n\n // Skip signature and initial fields that are already filled in. We have to count our \"skips\" just in case, to avoid infinite loops.\n let skips = 0;\n if (skips < requiredFields.length && ['signature', 'initial'].includes(nextRequiredField.type) && nextRequiredField.settings?.result === 'signed') {\n skips++;\n nextFocusedIndex++;\n if (nextFocusedIndex >= requiredFields.length) {\n nextFocusedIndex = 0;\n }\n nextRequiredField = requiredFields[nextFocusedIndex];\n }\n\n if (skips >= requiredFields.length) {\n nextRequiredField = null;\n }\n\n if (nextRequiredField) {\n const id = getFieldId(nextRequiredField);\n const el = document.getElementById(id) as any;\n el?.focusField();\n this.focusedField = nextRequiredField.name;\n }\n }\n\n // See if everything that \"needs to be\" filled in is, and all \"fillable fields\" are valid\n checkRecipientFields() {\n const invalidFields = this.recipient.fields.filter(field => !this.isFieldValid(field));\n if (invalidFields.length < 1) {\n this.nextButtonLabel = 'Finish';\n this.nextSubmits = true;\n } else {\n console.log('[SIGN] Remaining invalid fields', invalidFields);\n this.nextButtonLabel = 'Next';\n this.nextSubmits = false;\n }\n }\n\n attachFieldAttributes(pageInfo, field, roleIndex, el) {\n el.addEventListener('input', () => this.checkRecipientFields());\n el.addEventListener('focusout', e => this.handleFieldChange(field, e).finally(() => this.checkRecipientFields()));\n el.addEventListener('fieldChange', e => this.handleFieldChange(field, e).finally(() => this.checkRecipientFields()));\n\n el.setAttribute('roleindex', roleIndex);\n el.setAttribute('xScale', pageInfo.xScale);\n el.setAttribute('yScale', pageInfo.yScale);\n el.setAttribute('initials', this.recipient ? fullNameToInitials(this.recipient.full_name) : '');\n el.setAttribute('name', this.recipient?.full_name || '');\n }\n\n handlePageRendered(e) {\n const pageInfo = e.detail as IDocumentPageInfo;\n const roleIndex = getRoleIndex(EnvelopeStore.roleNames, this.recipient.role_name);\n const recipientFields = this.recipient.fields.filter(field => field.page === pageInfo.pageNumber);\n console.log('[SIGN] Page rendered, updating fields', {pageInfo, roleIndex, recipientFields});\n\n recipientFields.forEach(field => {\n const el = renderDocumentField(field, pageInfo, roleIndex, {disabled: false, editable: false, draggable: false, done: this.isDone});\n if (!el) {\n return;\n }\n\n if (Array.isArray(el)) {\n el.map(e => this.attachFieldAttributes(pageInfo, field, roleIndex, e));\n } else {\n this.attachFieldAttributes(pageInfo, field, roleIndex, el);\n }\n\n // interact(el).draggable({\n // listeners: {\n // start(event) {\n // console.log('[FIELDS] Drag started', event.type, event.target);\n // },\n // move(event) {\n // const oldX = +(event.target.getAttribute('posX') || 0);\n // const oldY = +(event.target.getAttribute('posY') || 0);\n // const xScale = +(event.target.getAttribute('xScale') || 1);\n // const yScale = +(event.target.getAttribute('yScale') || 1);\n // const newX = event.dx / xScale + oldX;\n // const newY = event.dy / yScale + oldY;\n // event.target.setAttribute('posX', newX);\n // event.target.setAttribute('posy', newY);\n // updateCssTransform(event.target, 'translate', `${newX}px, ${newY}px`);\n // },\n // end(event) {\n // console.log('[FIELDS] Drag ended', event);\n // // event.target.setAttribute('posX', 0);\n // // event.target.setAttribute('posy', 0);\n // // updateCssTransform(event.target, 'translate', `${0}px, ${0}px`);\n // },\n // },\n // });\n });\n\n // Render fields for \"the other\" recipients\n EnvelopeStore.envelope.recipients\n .filter(recipient => recipient.role_name !== this.recipient.role_name)\n .forEach(otherRecipient => {\n const otherRoleIndex = getRoleIndex(EnvelopeStore.roleNames, otherRecipient.role_name);\n const recipientFields = otherRecipient.fields.filter(field => field.page === pageInfo.pageNumber);\n\n // We don't render other recipients' fields if they've already acted, because those values are now stamped into the document page.\n // TODO: Do we want to render alternate treatments for recipients who have declined (red boxes?) and/or if the envelope is cancelled?\n // TODO: When doing server-side rendering we probably want to \"stamp\" values into the rendered PDF only once the recipient is done\n // acting. Do this once vSign is in Production.\n // TODO: Changed tacks here. During signing we show the template PDFs and everybody's fields, filled in or no. When done, we switch\n // to showing the envelope PDFs with stamped-in values. Confirm this is a good approach.\n // if (!['submitted', 'signed'].includes(otherRecipient.status)) {\n recipientFields.forEach(field => {\n const el = renderDocumentField(field, pageInfo, otherRoleIndex, {\n disabled: true,\n editable: false,\n draggable: false,\n done: this.isDone,\n });\n if (!el) {\n return;\n }\n\n // TODO: Research why this occurs. There are cases when we're getting \"el.setAttribute is not a function\"\n if (el.setAttribute) {\n el.setAttribute('roleindex', otherRoleIndex);\n el.setAttribute('xScale', pageInfo.xScale);\n el.setAttribute('yScale', pageInfo.yScale);\n }\n });\n // }\n });\n\n this.checkRecipientFields();\n }\n\n render() {\n if (EnvelopeStore.loading || !EnvelopeStore.envelope) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n return (\n <Host class={{agreed: this.agreed}}>\n {!this.isDone && !this.finishLater && <div class=\"intro\">Please review and act on these documents.</div>}\n\n {!this.isDone && (\n <div class=\"header\">\n {!this.agreed ? (\n <div class=\"agree\">\n <verdocs-checkbox name=\"agree\" label=\"I agree to use electronic records and signatures.\" onInput={() => this.handleClickAgree()} />\n </div>\n ) : (\n <Fragment>\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{EnvelopeStore.envelope.name}</div>\n <div style={{flex: '1'}} />\n </Fragment>\n )}\n\n {!this.isDone && !this.finishLater && <verdocs-button size=\"small\" label={this.nextButtonLabel} disabled={!this.agreed} onClick={() => this.handleNext()} />}\n\n <div style={{marginLeft: '10px'}} />\n <verdocs-dropdown options={!this.isDone && !this.finishLater ? inProgressMenuOptions : doneMenuOptions} onOptionSelected={e => this.handleOptionSelected(e)} />\n </div>\n )}\n\n {!this.isDone && !this.agreed ? <div class=\"cover\" /> : <div style={{display: 'none'}} />}\n\n {this.isDone ? (\n // <div>test</div>\n <verdocs-view endpoint={this.endpoint} envelopeId={this.envelopeId} onSdkError={e => this.sdkError?.emit(e.detail)} />\n ) : (\n <div class=\"document\">\n {(EnvelopeStore.envelope.documents || []).map(envelopeDocument => {\n const pages = [...(envelopeDocument?.pages || [])];\n pages.sort((a, b) => a.sequence - b.sequence);\n\n return (\n <Fragment>\n {pages.map(page => {\n // In signing mode we show the original template page with all the recipient fields so we can show source formatting and\n // where everything went. This is also a visual indicator when optional fields weren't filled in by previous actors, or\n // future signers still need to act. Once we're \"done\" we flip to showing the envelope's documents which have the final\n // field vales (so far) stamped into them.\n const templatePage = EnvelopeStore.template?.pages.find(p => p.sequence === page.sequence);\n // TODO: Confirm that a pure page-number match is good enough to find the matching template page. We need to make sure\n // we either don't reset our page numbers for additional attachments, or add match-on identifiers to work around that.\n // console.log('tp', templatePage, page);\n return (\n <verdocs-document-page\n pageImageUri={templatePage?.display_uri || page.display_uri}\n virtualWidth={612}\n virtualHeight={792}\n pageNumber={page.sequence}\n onPageRendered={e => this.handlePageRendered(e)}\n layers={[\n {name: 'page', type: 'canvas'},\n {name: 'controls', type: 'div'},\n ]}\n />\n );\n })}\n </Fragment>\n );\n })}\n </div>\n )}\n\n {this.showFinishLater && (\n <verdocs-ok-dialog\n heading=\"You've saved your document to finish later.\"\n message=\"To complete the document, use the link in the original email notification inviting you to review and finish the document.\"\n onNext={() => (this.showFinishLater = false)}\n />\n )}\n\n {this.errorMessage && <verdocs-ok-dialog heading=\"Network Error\" message={this.errorMessage} onNext={() => (this.errorMessage = '')} />}\n {this.showDone && (\n <verdocs-ok-dialog\n heading=\"You're Done!\"\n message=\"You can access the Verdoc at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.\"\n onNext={() => (this.showDone = false)}\n />\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"verdocs-sign.js","mappings":";;;;;;;;;;;;;;;AAAA,IAAI,SAAS,GAAG,CAACA,SAAI,IAAIA,SAAI,CAAC,SAAS,KAAK,UAAU,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;AACzF,IAAI,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;AAChH,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,EAAE,UAAU,OA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.getSigningSession","EnvelopeStore","Envelopes.updateEnvelopeField"],"sources":["./node_modules/@verdocs/js-sdk/Envelopes/Recipients.js","./node_modules/@verdocs/js-sdk/Envelopes/Signatures.js","./node_modules/@verdocs/js-sdk/Envelopes/Initials.js","./src/components/embeds/verdocs-sign/verdocs-sign.scss?tag=verdocs-sign","./src/components/embeds/verdocs-sign/verdocs-sign.tsx"],"sourcesContent":["var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n/**\n * Update a recipient's status block\n */\nexport var updateRecipient = function (endpoint, envelopeId, roleName, params) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .put(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(roleName), params)\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Submit an envelope (signing is finished). Note that all fields must be valid/completed for this to succeed.\n */\nexport var envelopeRecipientSubmit = function (endpoint, envelopeId, roleName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'submit' });\n};\n/**\n * Decline to complete an envelope (signing will not terminated).\n */\nexport var envelopeRecipientDecline = function (endpoint, envelopeId, roleName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'decline' });\n};\n/**\n * Claim / change ownership of an envelope. This is a special-case operation only available in certain workflows.\n */\nexport var envelopeRecipientChangeOwner = function (endpoint, envelopeId, roleName, email, fullName) { return updateRecipient(endpoint, envelopeId, roleName, { action: 'owner_update', email: email, full_name: fullName }); };\n/**\n * Agree to electronic signing.\n */\nexport var envelopeRecipientAgree = function (endpoint, envelopeId, roleName, agreed) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'update', agreed: agreed });\n};\n/**\n * Change a recipient's name.\n */\nexport var envelopeRecipientUpdateName = function (endpoint, envelopeId, roleName, fullName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'update', new_full_name: fullName });\n};\n/**\n * Change a recipient's name.\n */\nexport var envelopeRecipientPrepare = function (endpoint, envelopeId, roleName, recipients) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'prepare', recipients: recipients });\n};\nexport var getSignerToken = function (endpoint, envelopeId, roleName) {\n return endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(encodeURIComponent(roleName), \"/signer-token\"))\n .then(function (r) { return r.data; });\n};\nexport var getInPersonLink = function (endpoint, envelopeId, roleName) {\n return endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(encodeURIComponent(roleName), \"?in_person_link=true\"))\n .then(function (r) { return r.data; });\n};\n","/**\n * Create a signature block. In a typical signing workflow, the user is asked at the beginning of the process to \"adopt\"\n * a signature block to be used for all signature fields in the document. Thus, this is typically called one time to\n * create and store a signature block. Thereafter, the ID of the signature block may be re-used for each signature field\n * to be \"stamped\" by the user.\n */\nexport var createSignature = function (endpoint, name, signature) {\n var data = new FormData();\n data.append('signature', signature, name);\n return endpoint.api //\n .post(\"/signatures\", data)\n .then(function (r) { return r.data; });\n};\n/**\n * Get the availbable signatures for a user.\n */\nexport var getSignatures = function (endpoint) {\n return endpoint.api //\n .get('/signatures')\n .then(function (r) { return r.data; });\n};\n/**\n * Get a user's signature by ID.\n */\nexport var getSignature = function (endpoint, signatureId) {\n return endpoint.api //\n .get(\"/signatures/\".concat(signatureId))\n .then(function (r) { return r.data; });\n};\n/**\n * Delete a user's signature.\n */\nexport var deleteSignature = function (endpoint, signatureId) {\n return endpoint.api //\n .delete(\"/signatures/\".concat(signatureId))\n .then(function (r) { return r.data; });\n};\n","/**\n * Create an initials block. In a typical signing workflow, the user is asked at the beginning of the process to \"adopt\"\n * an initials block to be used for all initials fields in the document. Thus, this is typically called one time to\n * create and store an initials block. Thereafter, the ID of the initials block may be re-used for each initials field\n * to be \"stamped\" by the user.\n */\nexport var createInitials = function (endpoint, name, initials) {\n var data = new FormData();\n data.append('initial', initials, name);\n return endpoint.api //\n .post(\"/initials\", data)\n .then(function (r) { return r.data; });\n};\n","@import '../../../theme.scss';\n\nverdocs-sign {\n display: flex;\n overflow: hidden;\n position: relative;\n min-height: 600px;\n flex-direction: column;\n box-sizing: border-box;\n font-family: $verdocs-primary-font;\n\n div {\n display: block;\n box-sizing: border-box;\n }\n\n input {\n vertical-align: top;\n }\n\n .header {\n color: #fff;\n display: flex;\n z-index: 1000;\n flex: 0 0 56px;\n padding: 0 15px;\n font-size: 12px;\n align-items: center;\n flex-direction: row;\n transition: all 0.25s;\n background-color: $medium-bg;\n box-shadow: 0 4px 4px 0 rgb(0 0 0 / 24%), 0 0 4px 0 rgb(0 0 0 / 12%);\n\n .logo {\n width: 80px;\n display: none;\n margin: -6px 0 0 10px;\n }\n\n .title {\n padding-left: 16px;\n font-size: 18px;\n font-weight: 500;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n }\n\n .intro {\n width: 100%;\n display: flex;\n flex: 0 0 60px;\n color: #111111;\n padding: 0 15px;\n font-size: 18px;\n font-weight: 500;\n line-height: 28px;\n flex-direction: row;\n background: #ffffff;\n align-items: center;\n }\n\n .cover {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 999;\n position: absolute;\n background: rgba(0, 0, 0, 0.5);\n }\n\n > .document {\n flex: 1;\n height: 100%;\n display: flex;\n padding: 15px;\n row-gap: 15px;\n min-height: 200px;\n position: relative;\n overflow-y: scroll;\n align-items: center;\n box-sizing: border-box;\n flex-direction: column;\n justify-content: center;\n\n .inner {\n width: 100%;\n max-width: 1028px;\n }\n }\n\n .agree {\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0 15px;\n\n .intro {\n display: none;\n }\n\n .header {\n flex: 0 0 56px;\n }\n }\n}\n\n@media print {\n verdocs-sign .header {\n display: none;\n }\n}\n","import {VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Envelopes} from '@verdocs/js-sdk/Envelopes';\nimport {createInitials} from '@verdocs/js-sdk/Envelopes/Initials';\nimport {createSignature} from '@verdocs/js-sdk/Envelopes/Signatures';\nimport {fullNameToInitials} from '@verdocs/js-sdk/Utils/Primitives';\nimport {isValidEmail, isValidPhone} from '@verdocs/js-sdk/Templates/Validators';\nimport {IDocumentField, IEnvelope, IRecipient} from '@verdocs/js-sdk/Envelopes/Types';\nimport {Event, EventEmitter, Host, Fragment, Component, Prop, State, h} from '@stencil/core';\nimport {updateEnvelopeFieldInitials, updateEnvelopeFieldSignature} from '@verdocs/js-sdk/Envelopes/Envelopes';\nimport {envelopeRecipientAgree, envelopeRecipientDecline, envelopeRecipientSubmit} from '@verdocs/js-sdk/Envelopes/Recipients';\nimport {getFieldId, getRoleIndex, renderDocumentField, savePDF, updateDocumentFieldValue} from '../../../utils/utils';\nimport {getEnvelopeById} from '../../../utils/Envelopes';\nimport EnvelopeStore from '../../../utils/envelopeStore';\nimport {IDocumentPageInfo} from '../../../utils/Types';\nimport {SDKError} from '../../../utils/errors';\n\nconst inProgressMenuOptions = [\n {id: 'later', label: 'Finish Later'}, //\n // {id: 'claim', label: 'Claim the Document', disabled: true},\n {id: 'decline', label: 'Decline to Sign'},\n {id: 'print', label: 'Print Without Signing'},\n {id: 'download', label: 'Download'},\n];\n\nconst doneMenuOptions = [\n {id: 'print', label: 'Print'},\n {id: 'download', label: 'Download'},\n];\n\n/**\n * Display an envelope signing experience. This will display the envelope's attached\n * documents with signing fields overlaid on each page.\n *\n * The component will attempt to initiate a signing session and load the specified\n * envelope. If successful, the recipient's fields will be enabled and the user will\n * be able to sign the envelope's attached documents. If not, an `sdkError` will be\n * thrown and the component will be blank/empty. To provide the best user experience,\n * applications should capture and handle this error to provide the user with\n * instructions/options for next steps based on the application's design and workflow.\n *\n * Unlike other components, this will always create its own endpoint to manage the\n * session session. This endpoint will be included in event callbacks for the\n * convenience of host applications that may wish to make server calls using the\n * signer's credentials once signing is complete (e.g. to obtain copies of\n * the signed attachments.)\n */\n@Component({\n tag: 'verdocs-sign',\n styleUrl: 'verdocs-sign.scss',\n shadow: false,\n})\nexport class VerdocsSign {\n endpoint: VerdocsEndpoint = null;\n\n /**\n * The ID of the envelope to sign.\n */\n @Prop() envelopeId: string | null = null;\n\n /**\n * The ID of the role that will be signing e.g. 'Recipient 1'\n */\n @Prop() roleId: string | null = null;\n\n /**\n * The invite code for the signer.\n */\n @Prop() inviteCode: string | null = null;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the envelope is updated in any way.\n */\n @Event({composed: true}) envelopeLoaded: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope}>;\n\n /**\n * Event fired when the envelope is updated in any way.\n */\n @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n @State() recipient: IRecipient | null = null;\n @State() signerToken = null;\n @State() hasSignature = false;\n @State() nextButtonLabel = 'Start';\n @State() nextSubmits = false;\n @State() errorMessage = '';\n @State() focusedField = '';\n @State() isDone = false;\n @State() showDone = false;\n\n @State() finishLater = false;\n @State() showFinishLater = false;\n @State() agreed = false;\n @State() documentsSingularPlural = 'document';\n\n recipientIndex: number = -1;\n\n componentWillLoad() {\n this.endpoint = new VerdocsEndpoint({sessionType: 'signing'});\n }\n\n async componentDidLoad() {\n if (!this.envelopeId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required envelopId', 500, ''));\n return;\n }\n\n if (!this.roleId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required roleId', 500, ''));\n return;\n }\n\n if (!this.inviteCode) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required inviteCode', 500, ''));\n return;\n }\n\n try {\n console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);\n const {session, recipient, signerToken} = await Envelopes.getSigningSession(this.endpoint, {\n envelopeId: this.envelopeId,\n roleId: this.roleId,\n inviteCode: this.inviteCode,\n });\n\n console.log(`[SIGN] Loaded signing session ${session.email} / ${session.profile_id}`);\n\n this.recipient = recipient;\n console.log('[SIGN] We are recipient', this.recipient);\n this.signerToken = signerToken;\n this.endpoint.setToken(signerToken);\n\n if (this.agreed) {\n this.nextButtonLabel = 'Next';\n }\n\n await getEnvelopeById(this.endpoint, this.envelopeId);\n\n if (EnvelopeStore.envelope.documents.length > 0) {\n this.documentsSingularPlural = 'document(s)';\n }\n\n this.recipientIndex = EnvelopeStore.envelope.recipients.findIndex(recipient => recipient.role_name == this.roleId);\n if (this.recipientIndex > -1) {\n this.recipient = EnvelopeStore.envelope.recipients[this.recipientIndex];\n this.agreed = this.recipient.agreed;\n console.log('[SIGN] Found our recipient in the envelope', this.recipientIndex, this.recipient);\n } else {\n console.log('[SIGN] Could not find our recipient record', this.roleId, EnvelopeStore.envelope.recipients);\n }\n\n this.isDone = ['submitted', 'canceled', 'declined'].includes(this.recipient.status);\n\n // TODO: Fix service to allow this?\n // const sigs = await getSignatures();\n // console.log('sigs', sigs);\n\n this.envelopeLoaded?.emit({endpoint: this.endpoint, envelope: EnvelopeStore.envelope});\n } catch (e) {\n console.log('Error with signing session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n handleClickAgree() {\n envelopeRecipientAgree(this.endpoint, this.envelopeId, this.roleId, true)\n .then(() => {\n this.nextButtonLabel = 'Next';\n this.agreed = true; // The server returns a recipient object but it's not \"deep\" so we track this locally\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: EnvelopeStore.envelope, event: 'agreed'});\n })\n .catch(e => {\n console.log('Update failure', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleOptionSelected(e) {\n switch (e.detail.id) {\n case 'later':\n this.finishLater = true;\n this.showFinishLater = true;\n // this.router.navigate([`view/sign/${this.envelopeId}/role/${this.roleName}/saved`]);\n break;\n case 'claim':\n window.alert('This feature will be available in an upcoming release.');\n break;\n case 'decline':\n {\n const declineResult = await envelopeRecipientDecline(this.endpoint, this.envelopeId, this.roleId);\n console.log('Decline result', declineResult);\n this.isDone = true;\n }\n break;\n case 'print':\n window.print();\n break;\n case 'download':\n savePDF(this.endpoint, EnvelopeStore.envelope, EnvelopeStore.envelope.envelope_document_id).catch(e => {\n console.log('Error downloading PDF', e);\n });\n break;\n }\n }\n\n updateRecipientFieldValue(fieldName: string, updateResult: any) {\n this.recipient.fields.forEach(oldField => {\n if (oldField.name === fieldName) {\n oldField.settings = updateResult.settings;\n // TODO: When we break out other fields like value, update them here too\n updateDocumentFieldValue(oldField);\n }\n });\n }\n\n saveFieldChange(fieldName: string, fields: Record<string, any>) {\n Envelopes.updateEnvelopeField(this.endpoint, this.envelopeId, fieldName, fields) //\n .then(updateResult => {\n this.updateRecipientFieldValue(fieldName, updateResult);\n })\n .catch(e => {\n if (e.response?.status === 401 && e.response?.data?.error === 'jwt expired') {\n // TODO: Do we want to improve the instructions here?\n console.log('[SIGN] Signing session expired');\n this.errorMessage = 'Signing session expired. Please reload your browser to continue.';\n } else {\n console.log('[SIGN] Server error', e);\n }\n\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleFieldChange(field: IDocumentField, e: any) {\n const {value, checked} = e.target;\n\n switch (field.type) {\n case 'textbox':\n return this.saveFieldChange(field.name, {prepared: false, value});\n\n case 'checkbox_group': {\n const options = field.settings.options.map(option => ({id: option.id, checked: e.target.checked}));\n return this.saveFieldChange(field.name, {prepared: false, value: {options}});\n }\n\n case 'radio_button_group': {\n const options = field.settings.options.map(option => ({id: option.id, selected: e.target.value === option.id}));\n return this.saveFieldChange(field.name, {prepared: false, value: {options}});\n }\n\n case 'dropdown':\n return this.saveFieldChange(field.name, {prepared: false, value: e.detail});\n\n case 'initial':\n const initialsBlob = await (await fetch(e.detail)).blob();\n return createInitials(this.endpoint, 'initial', initialsBlob) //\n .then(async newInitials => {\n const updateResult = await updateEnvelopeFieldInitials(this.endpoint, this.envelopeId, field.name, newInitials.id);\n this.updateRecipientFieldValue(field.name, updateResult);\n });\n\n case 'signature':\n const signatureBlob = await (await fetch(e.detail)).blob();\n return createSignature(this.endpoint, 'signature', signatureBlob) //\n .then(async newSignature => {\n const updateResult = await updateEnvelopeFieldSignature(this.endpoint, this.envelopeId, field.name, newSignature.id);\n this.updateRecipientFieldValue(field.name, updateResult);\n });\n\n case 'date':\n const iso = e.target.getAttribute('iso');\n return this.saveFieldChange(field.name, {prepared: false, value: iso});\n\n case 'timestamp':\n console.log('Updating timestamp', {value, ts: e.target.getAttribute('timestamp')});\n break;\n\n default:\n console.log('Unhandled field update', {value, checked}, field);\n break;\n }\n }\n\n isFieldValid(field: IDocumentField) {\n const {required = false} = field;\n const {result = '', value = '', base64 = ''} = field.settings || {};\n switch (field.type) {\n case 'textbox':\n switch (field.settings?.validator || '') {\n case 'email':\n return isValidEmail(result);\n case 'phone':\n return isValidPhone(result);\n default:\n return !required || result !== '';\n }\n\n case 'signature':\n case 'initial':\n return !required || base64 !== '';\n\n // Timestamp fields get automatically filled when the envelope is submitted.\n case 'timestamp':\n return true;\n\n case 'textarea':\n case 'date':\n case 'attachment':\n return !required || result !== '';\n\n case 'dropdown':\n return !required || value !== '';\n\n case 'checkbox_group':\n const checkedCount = (field.settings?.options?.filter(option => option.checked) || []).length;\n return !required || (checkedCount >= (field.settings?.minimum_checked || 0) && checkedCount <= (field.settings?.maximum_checked || 999));\n\n case 'radio_button_group':\n return !required || (field.settings?.options?.filter(option => option.selected) || []).length > 0;\n // TODO\n // case 'checkbox':\n // return <verdocs-field-checkbox style={style} value={result || ''} id={id} />;\n // case 'payment':\n // return <verdocs-field-payment style={style} field={field} id={id} />;\n default:\n return false;\n }\n }\n\n async handleNext() {\n if (this.nextSubmits) {\n try {\n const result = await envelopeRecipientSubmit(this.endpoint, this.envelopeId, this.roleId);\n console.log('[SIGN] Submitted successfully', result);\n this.showDone = true;\n this.isDone = true;\n } catch (e) {\n console.log('Error submitting', e);\n }\n\n return;\n }\n\n // Find and focus the next incomplete required field\n const requiredFields = this.recipient.fields.filter(field => field.required);\n const focusedIndex = requiredFields.findIndex(field => field.name === this.focusedField);\n\n let nextFocusedIndex = focusedIndex + 1;\n if (nextFocusedIndex >= requiredFields.length) {\n nextFocusedIndex = 0;\n }\n\n let nextRequiredField = requiredFields[nextFocusedIndex];\n\n // Skip signature and initial fields that are already filled in. We have to count our \"skips\" just in case, to avoid infinite loops.\n let skips = 0;\n if (skips < requiredFields.length && ['signature', 'initial'].includes(nextRequiredField.type) && nextRequiredField.settings?.result === 'signed') {\n skips++;\n nextFocusedIndex++;\n if (nextFocusedIndex >= requiredFields.length) {\n nextFocusedIndex = 0;\n }\n nextRequiredField = requiredFields[nextFocusedIndex];\n }\n\n if (skips >= requiredFields.length) {\n nextRequiredField = null;\n }\n\n if (nextRequiredField) {\n const id = getFieldId(nextRequiredField);\n const el = document.getElementById(id) as any;\n el?.focusField();\n this.focusedField = nextRequiredField.name;\n }\n }\n\n // See if everything that \"needs to be\" filled in is, and all \"fillable fields\" are valid\n checkRecipientFields() {\n const invalidFields = this.recipient.fields.filter(field => !this.isFieldValid(field));\n if (invalidFields.length < 1) {\n this.nextButtonLabel = 'Finish';\n this.nextSubmits = true;\n } else {\n console.log('[SIGN] Remaining invalid fields', invalidFields);\n this.nextButtonLabel = 'Next';\n this.nextSubmits = false;\n }\n }\n\n attachFieldAttributes(pageInfo, field, roleIndex, el) {\n el.addEventListener('input', () => this.checkRecipientFields());\n el.addEventListener('focusout', e => this.handleFieldChange(field, e).finally(() => this.checkRecipientFields()));\n el.addEventListener('fieldChange', e => this.handleFieldChange(field, e).finally(() => this.checkRecipientFields()));\n\n el.setAttribute('roleindex', roleIndex);\n el.setAttribute('xScale', pageInfo.xScale);\n el.setAttribute('yScale', pageInfo.yScale);\n el.setAttribute('initials', this.recipient ? fullNameToInitials(this.recipient.full_name) : '');\n el.setAttribute('name', this.recipient?.full_name || '');\n }\n\n handlePageRendered(e) {\n const pageInfo = e.detail as IDocumentPageInfo;\n const roleIndex = getRoleIndex(EnvelopeStore.roleNames, this.recipient.role_name);\n const recipientFields = this.recipient.fields.filter(field => field.page === pageInfo.pageNumber);\n console.log('[SIGN] Page rendered, updating fields', {pageInfo, roleIndex, recipientFields});\n\n recipientFields.forEach(field => {\n const el = renderDocumentField(field, pageInfo, roleIndex, {disabled: false, editable: false, draggable: false, done: this.isDone});\n if (!el) {\n return;\n }\n\n if (Array.isArray(el)) {\n el.map(e => this.attachFieldAttributes(pageInfo, field, roleIndex, e));\n } else {\n this.attachFieldAttributes(pageInfo, field, roleIndex, el);\n }\n\n // interact(el).draggable({\n // listeners: {\n // start(event) {\n // console.log('[FIELDS] Drag started', event.type, event.target);\n // },\n // move(event) {\n // const oldX = +(event.target.getAttribute('posX') || 0);\n // const oldY = +(event.target.getAttribute('posY') || 0);\n // const xScale = +(event.target.getAttribute('xScale') || 1);\n // const yScale = +(event.target.getAttribute('yScale') || 1);\n // const newX = event.dx / xScale + oldX;\n // const newY = event.dy / yScale + oldY;\n // event.target.setAttribute('posX', newX);\n // event.target.setAttribute('posy', newY);\n // updateCssTransform(event.target, 'translate', `${newX}px, ${newY}px`);\n // },\n // end(event) {\n // console.log('[FIELDS] Drag ended', event);\n // // event.target.setAttribute('posX', 0);\n // // event.target.setAttribute('posy', 0);\n // // updateCssTransform(event.target, 'translate', `${0}px, ${0}px`);\n // },\n // },\n // });\n });\n\n // Render fields for \"the other\" recipients\n EnvelopeStore.envelope.recipients\n .filter(recipient => recipient.role_name !== this.recipient.role_name)\n .forEach(otherRecipient => {\n const otherRoleIndex = getRoleIndex(EnvelopeStore.roleNames, otherRecipient.role_name);\n const recipientFields = otherRecipient.fields.filter(field => field.page === pageInfo.pageNumber);\n\n // We don't render other recipients' fields if they've already acted, because those values are now stamped into the document page.\n // TODO: Do we want to render alternate treatments for recipients who have declined (red boxes?) and/or if the envelope is cancelled?\n // TODO: When doing server-side rendering we probably want to \"stamp\" values into the rendered PDF only once the recipient is done\n // acting. Do this once vSign is in Production.\n // TODO: Changed tacks here. During signing we show the template PDFs and everybody's fields, filled in or no. When done, we switch\n // to showing the envelope PDFs with stamped-in values. Confirm this is a good approach.\n // if (!['submitted', 'signed'].includes(otherRecipient.status)) {\n recipientFields.forEach(field => {\n const el = renderDocumentField(field, pageInfo, otherRoleIndex, {\n disabled: true,\n editable: false,\n draggable: false,\n done: this.isDone,\n });\n if (!el) {\n return;\n }\n\n // TODO: Research why this occurs. There are cases when we're getting \"el.setAttribute is not a function\"\n if (el.setAttribute) {\n el.setAttribute('roleindex', otherRoleIndex);\n el.setAttribute('xScale', pageInfo.xScale);\n el.setAttribute('yScale', pageInfo.yScale);\n }\n });\n // }\n });\n\n this.checkRecipientFields();\n }\n\n render() {\n if (EnvelopeStore.loading || !EnvelopeStore.envelope) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n return (\n <Host class={{agreed: this.agreed}}>\n {!this.isDone && !this.finishLater && <div class=\"intro\">Please review and act on these documents.</div>}\n\n {!this.isDone && (\n <div class=\"header\">\n {!this.agreed ? (\n <div class=\"agree\">\n <verdocs-checkbox name=\"agree\" label=\"I agree to use electronic records and signatures.\" onInput={() => this.handleClickAgree()} />\n </div>\n ) : (\n <Fragment>\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{EnvelopeStore.envelope.name}</div>\n <div style={{flex: '1'}} />\n </Fragment>\n )}\n\n {!this.isDone && !this.finishLater && <verdocs-button size=\"small\" label={this.nextButtonLabel} disabled={!this.agreed} onClick={() => this.handleNext()} />}\n\n <div style={{marginLeft: '10px'}} />\n <verdocs-dropdown options={!this.isDone && !this.finishLater ? inProgressMenuOptions : doneMenuOptions} onOptionSelected={e => this.handleOptionSelected(e)} />\n </div>\n )}\n\n {!this.isDone && !this.agreed ? <div class=\"cover\" /> : <div style={{display: 'none'}} />}\n\n {this.isDone ? (\n // <div>test</div>\n <verdocs-view endpoint={this.endpoint} envelopeId={this.envelopeId} onSdkError={e => this.sdkError?.emit(e.detail)} />\n ) : (\n <div class=\"document\">\n {(EnvelopeStore.envelope.documents || []).map(envelopeDocument => {\n const pages = [...(envelopeDocument?.pages || [])];\n pages.sort((a, b) => a.sequence - b.sequence);\n\n return (\n <Fragment>\n {pages.map(page => {\n // In signing mode we show the original template page with all the recipient fields so we can show source formatting and\n // where everything went. This is also a visual indicator when optional fields weren't filled in by previous actors, or\n // future signers still need to act. Once we're \"done\" we flip to showing the envelope's documents which have the final\n // field vales (so far) stamped into them.\n const templatePage = EnvelopeStore.template?.pages.find(p => p.sequence === page.sequence);\n // TODO: Confirm that a pure page-number match is good enough to find the matching template page. We need to make sure\n // we either don't reset our page numbers for additional attachments, or add match-on identifiers to work around that.\n // console.log('tp', templatePage, page);\n return (\n <verdocs-document-page\n pageImageUri={templatePage?.display_uri || page.display_uri}\n virtualWidth={612}\n virtualHeight={792}\n pageNumber={page.sequence}\n onPageRendered={e => this.handlePageRendered(e)}\n layers={[\n {name: 'page', type: 'canvas'},\n {name: 'controls', type: 'div'},\n ]}\n />\n );\n })}\n </Fragment>\n );\n })}\n </div>\n )}\n\n {this.showFinishLater && (\n <verdocs-ok-dialog\n heading=\"You've saved your document to finish later.\"\n message={`To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`}\n onNext={() => (this.showFinishLater = false)}\n />\n )}\n\n {this.errorMessage && <verdocs-ok-dialog heading=\"Network Error\" message={this.errorMessage} onNext={() => (this.errorMessage = '')} />}\n {this.showDone && (\n <verdocs-ok-dialog\n heading=\"You're Done!\"\n message={`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`}\n onNext={() => (this.showDone = false)}\n />\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -5,7 +5,8 @@ import { i as getEnvelope, s as savePDF } from './utils.js';
|
|
|
5
5
|
import { c as createStore } from './index3.js';
|
|
6
6
|
import { g as getTemplate } from './Templates2.js';
|
|
7
7
|
import { S as SDKError } from './errors.js';
|
|
8
|
-
import { d as defineCustomElement$
|
|
8
|
+
import { d as defineCustomElement$3 } from './verdocs-document-page2.js';
|
|
9
|
+
import { d as defineCustomElement$2 } from './verdocs-dropdown2.js';
|
|
9
10
|
import { d as defineCustomElement$1 } from './verdocs-loader2.js';
|
|
10
11
|
|
|
11
12
|
// NOTE: Do not attempt to convert this to a named-export module. It triggers compilation issues in Rollup that I spent days trying to
|
|
@@ -72,10 +73,12 @@ const getEnvelopeById = async (endpoint, envelopeId) => {
|
|
|
72
73
|
}
|
|
73
74
|
};
|
|
74
75
|
|
|
75
|
-
const verdocsViewCss = "verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .header{
|
|
76
|
+
const verdocsViewCss = "verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .header{color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 15px;font-size:12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}verdocs-view .header .logo{width:80px;display:none;margin:-6px 0 0 10px}verdocs-view .header .title{padding-left:16px;font-size:18px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}verdocs-view .document{-ms-flex:1;flex:1;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}verdocs-view .document .inner{width:100%;max-width:1028px}";
|
|
76
77
|
|
|
77
|
-
const
|
|
78
|
-
|
|
78
|
+
const menuOptions = [
|
|
79
|
+
{ id: 'print', label: 'Print' },
|
|
80
|
+
{ id: 'download', label: 'Download' },
|
|
81
|
+
];
|
|
79
82
|
const VerdocsView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
80
83
|
constructor() {
|
|
81
84
|
super();
|
|
@@ -106,6 +109,18 @@ const VerdocsView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
106
109
|
const pageInfo = e.detail;
|
|
107
110
|
console.log('[SIGN] Page rendered', pageInfo);
|
|
108
111
|
}
|
|
112
|
+
async handleOptionSelected(e) {
|
|
113
|
+
switch (e.detail.id) {
|
|
114
|
+
case 'print':
|
|
115
|
+
window.print();
|
|
116
|
+
break;
|
|
117
|
+
case 'download':
|
|
118
|
+
savePDF(this.endpoint, state.envelope, state.envelope.envelope_document_id).catch(e => {
|
|
119
|
+
console.log('Error downloading PDF', e);
|
|
120
|
+
});
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
109
124
|
render() {
|
|
110
125
|
var _a;
|
|
111
126
|
console.log('[VIEW] Rendering', state.error, state.loading, state.envelope);
|
|
@@ -115,7 +130,9 @@ const VerdocsView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
115
130
|
if (state.error) {
|
|
116
131
|
return (h(Host, null, h("div", null, state.error)));
|
|
117
132
|
}
|
|
118
|
-
return (h(Host, null, h("div", { class: "header" }, h(
|
|
133
|
+
return (h(Host, null, h("div", { class: "header" }, h(Fragment, null, h("img", { src: "https://verdocs.com/assets/white-logo.svg", alt: "Verdocs Logo", class: "logo" }), h("div", { class: "title" }, state.envelope.name), h("div", { style: { flex: '1' } }), h("div", { style: { marginLeft: '10px' } }), h("verdocs-dropdown", { options: menuOptions, onOptionSelected: e => this.handleOptionSelected(e) }))), h("div", { class: "document" }, (((_a = state.envelope) === null || _a === void 0 ? void 0 : _a.documents) || [])
|
|
134
|
+
.filter(document => document.type !== 'certificate')
|
|
135
|
+
.map(envelopeDocument => {
|
|
119
136
|
const pages = [...((envelopeDocument === null || envelopeDocument === void 0 ? void 0 : envelopeDocument.pages) || [])];
|
|
120
137
|
pages.sort((a, b) => a.sequence - b.sequence);
|
|
121
138
|
return (h(Fragment, null, pages.map(page => (h("verdocs-document-page", { pageImageUri: page.display_uri, virtualWidth: 612, virtualHeight: 792, pageNumber: page.sequence, onPageRendered: e => this.handlePageRendered(e), layers: [
|
|
@@ -134,7 +151,7 @@ function defineCustomElement() {
|
|
|
134
151
|
if (typeof customElements === "undefined") {
|
|
135
152
|
return;
|
|
136
153
|
}
|
|
137
|
-
const components = ["verdocs-view", "verdocs-document-page", "verdocs-loader"];
|
|
154
|
+
const components = ["verdocs-view", "verdocs-document-page", "verdocs-dropdown", "verdocs-loader"];
|
|
138
155
|
components.forEach(tagName => { switch (tagName) {
|
|
139
156
|
case "verdocs-view":
|
|
140
157
|
if (!customElements.get(tagName)) {
|
|
@@ -142,6 +159,11 @@ function defineCustomElement() {
|
|
|
142
159
|
}
|
|
143
160
|
break;
|
|
144
161
|
case "verdocs-document-page":
|
|
162
|
+
if (!customElements.get(tagName)) {
|
|
163
|
+
defineCustomElement$3();
|
|
164
|
+
}
|
|
165
|
+
break;
|
|
166
|
+
case "verdocs-dropdown":
|
|
145
167
|
if (!customElements.get(tagName)) {
|
|
146
168
|
defineCustomElement$2();
|
|
147
169
|
}
|