@verdocs/web-sdk 4.2.118 → 4.2.119
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/{utils-c878d0c2.js → utils-469e8fc5.js} +1 -0
- package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-kba-dialog_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-pagination_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview_9.cjs.entry.js +28 -16
- package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
- package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.css +2 -1
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +1 -1
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +27 -15
- package/dist/collection/utils/utils.js +1 -0
- package/dist/components/utils.js +1 -0
- package/dist/components/verdocs-auth.js +1 -1
- package/dist/components/verdocs-template-fields2.js +27 -15
- package/dist/components/verdocs-upload-dialog2.js +1 -1
- package/dist/esm/{utils-0a9eb6f8.js → utils-06448b9b.js} +1 -0
- package/dist/esm/verdocs-auth.entry.js +1 -1
- package/dist/esm/verdocs-contact-picker_2.entry.js +1 -1
- package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm/verdocs-field-attachment_13.entry.js +1 -1
- package/dist/esm/verdocs-kba-dialog_2.entry.js +1 -1
- package/dist/esm/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm/verdocs-preview_9.entry.js +28 -16
- package/dist/esm/verdocs-sign.entry.js +1 -1
- package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm-es5/{utils-0a9eb6f8.js → utils-06448b9b.js} +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
- package/dist/esm-es5/verdocs-kba-dialog_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_9.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +0 -1
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/verdocs-web-sdk/{p-e07b6adf.system.entry.js → p-1151b8f6.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5235b94f.entry.js → p-195fbae1.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9ee3f90d.entry.js → p-1cf84ac4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-267df026.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-d41c5eae.entry.js → p-345f08c2.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3a0db043.entry.js → p-35fa7834.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d1241532.entry.js → p-3bd8fbaa.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b57446bb.system.entry.js → p-4af90836.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-97e16d5d.entry.js → p-4d9b8926.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-98b60918.system.entry.js → p-6465a990.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8f29bffd.system.entry.js → p-75079e4e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-476996a3.system.entry.js → p-77feaf73.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fd27aa1a.system.entry.js → p-79d28740.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1f4feeff.system.entry.js → p-8ac88c27.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a583ffe0.system.entry.js → p-8f68db2b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7b5c1bd5.system.entry.js → p-952f4967.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7933fc15.system.js → p-b96a9a0f.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-123768d7.entry.js → p-ba49517a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e0d7224c.system.entry.js → p-bab9ba61.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5c903ba4.entry.js → p-c97702db.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-cbac8750.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-925f6ad5.js → p-ddcffa6b.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c7606304.entry.js → p-fb70eb59.entry.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/custom-elements.json +0 -2044
- package/dist/verdocs-web-sdk/p-226ae566.entry.js +0 -1
@@ -90,6 +90,7 @@ const setControlStyles = (el, field, xScale, yScale) => {
|
|
90
90
|
const getControlStyles = (field, xScale, yScale) => {
|
91
91
|
let { x = 0, y = 0, width = defaultWidth(field.type), height = defaultHeight(field.type) } = field;
|
92
92
|
return {
|
93
|
+
zIndex: '100',
|
93
94
|
width: `${width}px`,
|
94
95
|
height: `${height}px`,
|
95
96
|
position: 'absolute',
|
@@ -288,7 +288,7 @@ const VerdocsAuth = class {
|
|
288
288
|
return (index.h("div", { class: "form" }, index.h("form", { onSubmit: () => this.handleVerification() }, index.h("p", null, "Please check your e-mail inbox for a verification code and enter it below."), index.h("verdocs-text-input", { label: "Verification Code", required: true, value: this.verificationCode, onInput: (e) => (this.verificationCode = e.target.value), disabled: this.submitting }), index.h("div", { class: "buttons" }, index.h("verdocs-button", { label: "Sign Out", variant: "outline", disabled: this.submitting, onClick: () => this.handleLogout() }), index.h("verdocs-button", { label: "Verify", disabled: this.submitting || !this.verificationCode || this.verificationCode.length !== 6, onClick: () => this.handleVerification() })), index.h("div", { class: "buttons" }, index.h("verdocs-button", { variant: "text", label: "Resend Code", disabled: this.resendDisabled || this.submitting, onClick: () => this.handleResendVerification() })))));
|
289
289
|
}
|
290
290
|
if (this.displayMode === 'forgot') {
|
291
|
-
return (index.h("div", { class: "form" }, index.h("a", { href: "https://verdocs.com/en/" }, index.h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), index.h("h3", null, "Forgot your password?"), index.h("p", null, "Enter your e-mail address below. If the e-mail address is valid, a password reset code will be sent to your inbox. Please allow up to 15 minutes to arrive, and check your spam folder if you do not receive the message."), index.h("form", { onSubmit: () => this.handleResetGetCode() }, index.h("verdocs-text-input", { label: "Email Address", autocomplete: "email", required: true, value: this.email, onInput: (e) => (this.email = e.target.value), disabled: this.submitting }), index.h("div", { style: { marginTop: '30px' } }), index.h("div", { class: "buttons" }, index.h("verdocs-button", { label: "Cancel", variant: "outline", disabled: this.submitting, onClick: () => (this.displayMode = 'login') }), index.h("verdocs-button", { label: "Request Code", disabled: this.submitting, onClick: () => this.handleResetGetCode() })))));
|
291
|
+
return (index.h("div", { class: "form" }, index.h("a", { href: "https://verdocs.com/en/" }, index.h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), index.h("h3", null, "Forgot your password?"), index.h("p", null, "Enter your e-mail address below. If the e-mail address is valid, a password reset code will be sent to your inbox. Please allow up to 15 minutes to arrive, and check your spam folder if you do not receive the message."), index.h("form", { onSubmit: () => this.handleResetGetCode() }, index.h("verdocs-text-input", { label: "Email Address", autocomplete: "email", required: true, value: this.email, onInput: (e) => (this.email = e.target.value), disabled: this.submitting }), index.h("div", { style: { marginTop: '30px' } }), index.h("div", { class: "buttons" }, index.h("verdocs-button", { size: "small", label: "Cancel", variant: "outline", disabled: this.submitting, onClick: () => (this.displayMode = 'login') }), index.h("verdocs-button", { size: "small", label: "Request Code", disabled: this.submitting, onClick: () => this.handleResetGetCode() })))));
|
292
292
|
}
|
293
293
|
if (this.displayMode === 'reset') {
|
294
294
|
return (index.h("div", { class: "form" }, index.h("a", { href: "https://verdocs.com/en/" }, index.h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), index.h("h3", null, "Forgot your password?"), index.h("p", null, "Enter your e-mail address below, and reset instructions will be sent to your Inbox. Please allow up to 15 minutes to arrive. Check your spam folder if you do not receive the message."), index.h("form", { onSubmit: () => this.handleResetPassword() }, index.h("verdocs-text-input", { label: "Verification Code", required: true, value: this.verificationCode, onInput: (e) => (this.verificationCode = e.target.value), disabled: this.submitting }), index.h("verdocs-text-input", { label: "Password", type: "password", required: true, autocomplete: "off", value: this.newPassword, onInput: (e) => (this.newPassword = e.target.value), disabled: this.submitting }), index.h("verdocs-text-input", { label: "Confirm Password", type: "password", required: true, autocomplete: "off", value: this.confirmpass, onInput: (e) => (this.confirmpass = e.target.value), disabled: this.submitting }), index.h("div", { style: { marginTop: '30px' } }), index.h("div", { class: "buttons" }, index.h("verdocs-button", { label: "Cancel", variant: "outline", disabled: this.submitting, onClick: () => (this.displayMode = 'login') }), index.h("verdocs-button", { label: "Reset", disabled: this.submitting, onClick: () => this.handleResetPassword() })), index.h("div", { class: "buttons" }, index.h("verdocs-button", { variant: "text", label: "Resend Code", disabled: this.resendDisabled || this.submitting, onClick: () => this.handleResendReset() })))));
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-a27a7f77.js');
|
6
6
|
const jsSdk = require('@verdocs/js-sdk');
|
7
|
-
const utils = require('./utils-
|
7
|
+
const utils = require('./utils-469e8fc5.js');
|
8
8
|
require('./_commonjsHelpers-e6ff1d6e.js');
|
9
9
|
require('./Types-7a726ff3.js');
|
10
10
|
require('./format-0f565a28.js');
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-a27a7f77.js');
|
6
6
|
const jsSdk = require('@verdocs/js-sdk');
|
7
|
-
const utils = require('./utils-
|
7
|
+
const utils = require('./utils-469e8fc5.js');
|
8
8
|
require('./_commonjsHelpers-e6ff1d6e.js');
|
9
9
|
require('./Types-7a726ff3.js');
|
10
10
|
require('./format-0f565a28.js');
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-a27a7f77.js');
|
6
6
|
const jsSdk = require('@verdocs/js-sdk');
|
7
|
-
const utils = require('./utils-
|
7
|
+
const utils = require('./utils-469e8fc5.js');
|
8
8
|
const Toast = require('./Toast-d84d7bd3.js');
|
9
9
|
const errors = require('./errors-017fb835.js');
|
10
10
|
require('./_commonjsHelpers-e6ff1d6e.js');
|
@@ -1381,7 +1381,7 @@ const VerdocsSignatureDialog = class {
|
|
1381
1381
|
};
|
1382
1382
|
VerdocsSignatureDialog.style = VerdocsSignatureDialogStyle0;
|
1383
1383
|
|
1384
|
-
const verdocsUploadDialogCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-upload-dialog{font-family:\"Inter\", \"Barlow\", sans-serif
|
1384
|
+
const verdocsUploadDialogCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-upload-dialog{position:fixed;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-upload-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-upload-dialog .background-overlay{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}verdocs-upload-dialog .dialog{width:320px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-upload-dialog .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-upload-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-upload-dialog .buttons verdocs-button{margin-left:16px}verdocs-upload-dialog .current-label{margin:20px 0 5px 0}verdocs-upload-dialog .drop-target{opacity:1;width:100%;display:-ms-flexbox;display:flex;margin:20px 0;min-height:260px;padding:30px 15px;text-align:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;background-color:#f5f5f5;color:rgba(0, 0, 0, 0.54);border:2px dashed #979797}verdocs-upload-dialog .drop-target p{margin:12px 0}verdocs-upload-dialog .drop-target.dragging-over{border:5px solid #4c56cb}verdocs-upload-dialog .drop-target>verdocs-button{margin:12px 0;display:inline-block}verdocs-upload-dialog .attachments{height:56px;font-size:0;margin:20px 0;padding:0 16px;line-height:56px;white-space:normal;-webkit-box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14);box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)}verdocs-upload-dialog .attachments .attachment{gap:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-upload-dialog .attachments .attachment .icon{width:18px;height:18px;line-height:18px}verdocs-upload-dialog .attachments .attachment .icon.trash{cursor:pointer}verdocs-upload-dialog .attachments .attachment .name{-ms-flex:1;flex:1;font-size:14px;overflow:hidden;font-weight:400;white-space:nowrap;text-overflow:ellipsis}";
|
1385
1385
|
const VerdocsUploadDialogStyle0 = verdocsUploadDialogCss;
|
1386
1386
|
|
1387
1387
|
const TrashIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" /></svg>`;
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-a27a7f77.js');
|
6
6
|
const jsSdk = require('@verdocs/js-sdk');
|
7
|
-
const utils = require('./utils-
|
7
|
+
const utils = require('./utils-469e8fc5.js');
|
8
8
|
const errors = require('./errors-017fb835.js');
|
9
9
|
require('./_commonjsHelpers-e6ff1d6e.js');
|
10
10
|
require('./Types-7a726ff3.js');
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-a27a7f77.js');
|
6
6
|
const jsSdk = require('@verdocs/js-sdk');
|
7
|
-
const utils = require('./utils-
|
7
|
+
const utils = require('./utils-469e8fc5.js');
|
8
8
|
const popper = require('./popper-31badbf8.js');
|
9
9
|
require('./_commonjsHelpers-e6ff1d6e.js');
|
10
10
|
require('./Types-7a726ff3.js');
|
@@ -12,7 +12,7 @@ const Icons = require('./Icons-9a6f2f7c.js');
|
|
12
12
|
const Toast = require('./Toast-d84d7bd3.js');
|
13
13
|
const format = require('./format-0f565a28.js');
|
14
14
|
const interact_min = require('./interact.min-e6956f8b.js');
|
15
|
-
const utils = require('./utils-
|
15
|
+
const utils = require('./utils-469e8fc5.js');
|
16
16
|
require('./index-c12980a1.js');
|
17
17
|
require('./index-2a189d85.js');
|
18
18
|
require('./_commonjsHelpers-e6ff1d6e.js');
|
@@ -772,19 +772,17 @@ const VerdocsTemplateFields = class {
|
|
772
772
|
this.placing = null;
|
773
773
|
}
|
774
774
|
}
|
775
|
-
async handleFieldChange(field, e, optionId) {
|
776
|
-
|
777
|
-
}
|
775
|
+
// async handleFieldChange(field: ITemplateField, e: any, optionId?: string) {
|
776
|
+
// console.log('[FIELDS] handleFieldChange', field, e, optionId);
|
777
|
+
// }
|
778
778
|
attachFieldAttributes(pageInfo, field, el) {
|
779
|
-
el.addEventListener('input', e => this.handleFieldChange(field, e));
|
780
|
-
el.addEventListener('settingsChanged', (
|
779
|
+
// el.addEventListener('input', e => this.handleFieldChange(field, e));
|
780
|
+
el.addEventListener('settingsChanged', () => {
|
781
781
|
var _a, _b;
|
782
|
-
console.log('Settings changed', e.detail);
|
783
782
|
(_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: (_b = this.templateStore) === null || _b === void 0 ? void 0 : _b.state, event: 'added-field' });
|
784
783
|
});
|
785
784
|
el.addEventListener('deleted', () => {
|
786
785
|
var _a, _b;
|
787
|
-
console.log('[FIELDS] Deleted', this, field);
|
788
786
|
el.remove();
|
789
787
|
(_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: (_b = this.templateStore) === null || _b === void 0 ? void 0 : _b.state, event: 'updated-field' });
|
790
788
|
});
|
@@ -833,7 +831,7 @@ const VerdocsTemplateFields = class {
|
|
833
831
|
utils.updateCssTransform(event.target, 'translate', `${newX}px, ${newY}px`);
|
834
832
|
}
|
835
833
|
async handleMoveEnd(event) {
|
836
|
-
var _a, _b, _c, _d, _e;
|
834
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
837
835
|
const name = event.target.getAttribute('fieldname');
|
838
836
|
const option = +(event.target.getAttribute('option') || '0');
|
839
837
|
const field = this.fieldStore.get('fields').find(field => field.name === name);
|
@@ -842,19 +840,33 @@ const VerdocsTemplateFields = class {
|
|
842
840
|
return;
|
843
841
|
}
|
844
842
|
const pageNumber = event.target.getAttribute('pagenumber');
|
845
|
-
|
843
|
+
let { naturalWidth = 612, naturalHeight = 792, renderedHeight = 792 } = this.cachedPageInfo[pageNumber];
|
846
844
|
const clientRect = event.target.getBoundingClientRect();
|
847
845
|
const parent = event.target.parentElement;
|
848
846
|
const parentRect = parent.getBoundingClientRect();
|
849
847
|
const width = field.width || utils.defaultWidth(field.type);
|
850
848
|
const height = field.height || utils.defaultHeight(field.type);
|
851
|
-
// These two being backwards is not a mistake. Left measures "over" from the left
|
852
|
-
// "up" from the bottom (negative displacement).
|
849
|
+
// These two being backwards is not a mistake. Left measures "over" from the left
|
850
|
+
// (positive displacement) while bottom measures "up" from the bottom (negative displacement).
|
853
851
|
const newX = Math.max(clientRect.left - parentRect.left, 0);
|
854
|
-
|
852
|
+
let newY = Math.max(renderedHeight - (parentRect.bottom - clientRect.bottom), 0);
|
853
|
+
console.log('drop', { pageNumber, newX, newY });
|
854
|
+
let newPageNumber = parseInt(pageNumber);
|
855
|
+
if (newY > renderedHeight) {
|
856
|
+
newPageNumber = Math.min(newPageNumber + 1, ((_d = (_c = (_b = (_a = this.templateStore) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.documents) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.pages) || 1);
|
857
|
+
newY -= renderedHeight;
|
858
|
+
renderedHeight = this.cachedPageInfo[newPageNumber].renderedHeight;
|
859
|
+
console.log('Next page', { newPageNumber, newY, renderedHeight });
|
860
|
+
}
|
861
|
+
else if (newY < 0) {
|
862
|
+
newPageNumber = Math.max(newPageNumber - 1, 1);
|
863
|
+
renderedHeight = this.cachedPageInfo[newPageNumber].renderedHeight;
|
864
|
+
newY += renderedHeight;
|
865
|
+
console.log('Next page', { newPageNumber, newY, renderedHeight });
|
866
|
+
}
|
855
867
|
const { x, y } = this.viewCoordinatesToPageCoordinates(newX, newY, pageNumber, naturalWidth - width, naturalHeight - height);
|
856
868
|
try {
|
857
|
-
const params = { x, y };
|
869
|
+
const params = { x, y, page: newPageNumber };
|
858
870
|
console.log('[FIELDS] Will update', name, y, option, params);
|
859
871
|
const newFieldData = await jsSdk.updateField(this.endpoint, this.templateId, name, params);
|
860
872
|
console.log('[FIELDS] Updated', newFieldData);
|
@@ -862,12 +874,12 @@ const VerdocsTemplateFields = class {
|
|
862
874
|
event.target.removeAttribute('posX');
|
863
875
|
event.target.removeAttribute('posY');
|
864
876
|
utils.removeCssTransform(event.target);
|
865
|
-
(
|
877
|
+
(_e = this.templateUpdated) === null || _e === void 0 ? void 0 : _e.emit({ endpoint: this.endpoint, template: (_f = this.templateStore) === null || _f === void 0 ? void 0 : _f.state, event: 'updated-field' });
|
866
878
|
}
|
867
879
|
catch (e) {
|
868
880
|
Toast.VerdocsToast('Error updating field, please try again later', { style: 'error' });
|
869
881
|
console.log('[FIELDS] Error updating field', e);
|
870
|
-
(
|
882
|
+
(_g = this.sdkError) === null || _g === void 0 ? void 0 : _g.emit(new errors.SDKError(e.message, (_h = e.response) === null || _h === void 0 ? void 0 : _h.status, (_j = e.response) === null || _j === void 0 ? void 0 : _j.data));
|
871
883
|
event.target.removeAttribute('posX');
|
872
884
|
event.target.removeAttribute('posY');
|
873
885
|
utils.removeCssTransform(event.target);
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-a27a7f77.js');
|
6
6
|
const jsSdk = require('@verdocs/js-sdk');
|
7
|
-
const utils = require('./utils-
|
7
|
+
const utils = require('./utils-469e8fc5.js');
|
8
8
|
const TemplateFieldStore = require('./TemplateFieldStore-836d8bf5.js');
|
9
9
|
const Toast = require('./Toast-d84d7bd3.js');
|
10
10
|
const errors = require('./errors-017fb835.js');
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
const index = require('./index-a27a7f77.js');
|
6
6
|
const jsSdk = require('@verdocs/js-sdk');
|
7
7
|
const TemplateFieldStore = require('./TemplateFieldStore-836d8bf5.js');
|
8
|
-
const utils = require('./utils-
|
8
|
+
const utils = require('./utils-469e8fc5.js');
|
9
9
|
const popper = require('./popper-31badbf8.js');
|
10
10
|
require('./index-c12980a1.js');
|
11
11
|
require('./_commonjsHelpers-e6ff1d6e.js');
|
@@ -302,7 +302,7 @@ export class VerdocsAuth {
|
|
302
302
|
return (h("div", { class: "form" }, h("form", { onSubmit: () => this.handleVerification() }, h("p", null, "Please check your e-mail inbox for a verification code and enter it below."), h("verdocs-text-input", { label: "Verification Code", required: true, value: this.verificationCode, onInput: (e) => (this.verificationCode = e.target.value), disabled: this.submitting }), h("div", { class: "buttons" }, h("verdocs-button", { label: "Sign Out", variant: "outline", disabled: this.submitting, onClick: () => this.handleLogout() }), h("verdocs-button", { label: "Verify", disabled: this.submitting || !this.verificationCode || this.verificationCode.length !== 6, onClick: () => this.handleVerification() })), h("div", { class: "buttons" }, h("verdocs-button", { variant: "text", label: "Resend Code", disabled: this.resendDisabled || this.submitting, onClick: () => this.handleResendVerification() })))));
|
303
303
|
}
|
304
304
|
if (this.displayMode === 'forgot') {
|
305
|
-
return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Forgot your password?"), h("p", null, "Enter your e-mail address below. If the e-mail address is valid, a password reset code will be sent to your inbox. Please allow up to 15 minutes to arrive, and check your spam folder if you do not receive the message."), h("form", { onSubmit: () => this.handleResetGetCode() }, h("verdocs-text-input", { label: "Email Address", autocomplete: "email", required: true, value: this.email, onInput: (e) => (this.email = e.target.value), disabled: this.submitting }), h("div", { style: { marginTop: '30px' } }), h("div", { class: "buttons" }, h("verdocs-button", { label: "Cancel", variant: "outline", disabled: this.submitting, onClick: () => (this.displayMode = 'login') }), h("verdocs-button", { label: "Request Code", disabled: this.submitting, onClick: () => this.handleResetGetCode() })))));
|
305
|
+
return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Forgot your password?"), h("p", null, "Enter your e-mail address below. If the e-mail address is valid, a password reset code will be sent to your inbox. Please allow up to 15 minutes to arrive, and check your spam folder if you do not receive the message."), h("form", { onSubmit: () => this.handleResetGetCode() }, h("verdocs-text-input", { label: "Email Address", autocomplete: "email", required: true, value: this.email, onInput: (e) => (this.email = e.target.value), disabled: this.submitting }), h("div", { style: { marginTop: '30px' } }), h("div", { class: "buttons" }, h("verdocs-button", { size: "small", label: "Cancel", variant: "outline", disabled: this.submitting, onClick: () => (this.displayMode = 'login') }), h("verdocs-button", { size: "small", label: "Request Code", disabled: this.submitting, onClick: () => this.handleResetGetCode() })))));
|
306
306
|
}
|
307
307
|
if (this.displayMode === 'reset') {
|
308
308
|
return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Forgot your password?"), h("p", null, "Enter your e-mail address below, and reset instructions will be sent to your Inbox. Please allow up to 15 minutes to arrive. Check your spam folder if you do not receive the message."), h("form", { onSubmit: () => this.handleResetPassword() }, h("verdocs-text-input", { label: "Verification Code", required: true, value: this.verificationCode, onInput: (e) => (this.verificationCode = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Password", type: "password", required: true, autocomplete: "off", value: this.newPassword, onInput: (e) => (this.newPassword = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Confirm Password", type: "password", required: true, autocomplete: "off", value: this.confirmpass, onInput: (e) => (this.confirmpass = e.target.value), disabled: this.submitting }), h("div", { style: { marginTop: '30px' } }), h("div", { class: "buttons" }, h("verdocs-button", { label: "Cancel", variant: "outline", disabled: this.submitting, onClick: () => (this.displayMode = 'login') }), h("verdocs-button", { label: "Reset", disabled: this.submitting, onClick: () => this.handleResetPassword() })), h("div", { class: "buttons" }, h("verdocs-button", { variant: "text", label: "Resend Code", disabled: this.resendDisabled || this.submitting, onClick: () => this.handleResendReset() })))));
|
package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js
CHANGED
@@ -111,19 +111,17 @@ export class VerdocsTemplateFields {
|
|
111
111
|
this.placing = null;
|
112
112
|
}
|
113
113
|
}
|
114
|
-
async handleFieldChange(field, e, optionId) {
|
115
|
-
|
116
|
-
}
|
114
|
+
// async handleFieldChange(field: ITemplateField, e: any, optionId?: string) {
|
115
|
+
// console.log('[FIELDS] handleFieldChange', field, e, optionId);
|
116
|
+
// }
|
117
117
|
attachFieldAttributes(pageInfo, field, el) {
|
118
|
-
el.addEventListener('input', e => this.handleFieldChange(field, e));
|
119
|
-
el.addEventListener('settingsChanged', (
|
118
|
+
// el.addEventListener('input', e => this.handleFieldChange(field, e));
|
119
|
+
el.addEventListener('settingsChanged', () => {
|
120
120
|
var _a, _b;
|
121
|
-
console.log('Settings changed', e.detail);
|
122
121
|
(_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: (_b = this.templateStore) === null || _b === void 0 ? void 0 : _b.state, event: 'added-field' });
|
123
122
|
});
|
124
123
|
el.addEventListener('deleted', () => {
|
125
124
|
var _a, _b;
|
126
|
-
console.log('[FIELDS] Deleted', this, field);
|
127
125
|
el.remove();
|
128
126
|
(_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: (_b = this.templateStore) === null || _b === void 0 ? void 0 : _b.state, event: 'updated-field' });
|
129
127
|
});
|
@@ -172,7 +170,7 @@ export class VerdocsTemplateFields {
|
|
172
170
|
updateCssTransform(event.target, 'translate', `${newX}px, ${newY}px`);
|
173
171
|
}
|
174
172
|
async handleMoveEnd(event) {
|
175
|
-
var _a, _b, _c, _d, _e;
|
173
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
176
174
|
const name = event.target.getAttribute('fieldname');
|
177
175
|
const option = +(event.target.getAttribute('option') || '0');
|
178
176
|
const field = this.fieldStore.get('fields').find(field => field.name === name);
|
@@ -181,19 +179,33 @@ export class VerdocsTemplateFields {
|
|
181
179
|
return;
|
182
180
|
}
|
183
181
|
const pageNumber = event.target.getAttribute('pagenumber');
|
184
|
-
|
182
|
+
let { naturalWidth = 612, naturalHeight = 792, renderedHeight = 792 } = this.cachedPageInfo[pageNumber];
|
185
183
|
const clientRect = event.target.getBoundingClientRect();
|
186
184
|
const parent = event.target.parentElement;
|
187
185
|
const parentRect = parent.getBoundingClientRect();
|
188
186
|
const width = field.width || defaultWidth(field.type);
|
189
187
|
const height = field.height || defaultHeight(field.type);
|
190
|
-
// These two being backwards is not a mistake. Left measures "over" from the left
|
191
|
-
// "up" from the bottom (negative displacement).
|
188
|
+
// These two being backwards is not a mistake. Left measures "over" from the left
|
189
|
+
// (positive displacement) while bottom measures "up" from the bottom (negative displacement).
|
192
190
|
const newX = Math.max(clientRect.left - parentRect.left, 0);
|
193
|
-
|
191
|
+
let newY = Math.max(renderedHeight - (parentRect.bottom - clientRect.bottom), 0);
|
192
|
+
console.log('drop', { pageNumber, newX, newY });
|
193
|
+
let newPageNumber = parseInt(pageNumber);
|
194
|
+
if (newY > renderedHeight) {
|
195
|
+
newPageNumber = Math.min(newPageNumber + 1, ((_d = (_c = (_b = (_a = this.templateStore) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.documents) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.pages) || 1);
|
196
|
+
newY -= renderedHeight;
|
197
|
+
renderedHeight = this.cachedPageInfo[newPageNumber].renderedHeight;
|
198
|
+
console.log('Next page', { newPageNumber, newY, renderedHeight });
|
199
|
+
}
|
200
|
+
else if (newY < 0) {
|
201
|
+
newPageNumber = Math.max(newPageNumber - 1, 1);
|
202
|
+
renderedHeight = this.cachedPageInfo[newPageNumber].renderedHeight;
|
203
|
+
newY += renderedHeight;
|
204
|
+
console.log('Next page', { newPageNumber, newY, renderedHeight });
|
205
|
+
}
|
194
206
|
const { x, y } = this.viewCoordinatesToPageCoordinates(newX, newY, pageNumber, naturalWidth - width, naturalHeight - height);
|
195
207
|
try {
|
196
|
-
const params = { x, y };
|
208
|
+
const params = { x, y, page: newPageNumber };
|
197
209
|
console.log('[FIELDS] Will update', name, y, option, params);
|
198
210
|
const newFieldData = await updateField(this.endpoint, this.templateId, name, params);
|
199
211
|
console.log('[FIELDS] Updated', newFieldData);
|
@@ -201,12 +213,12 @@ export class VerdocsTemplateFields {
|
|
201
213
|
event.target.removeAttribute('posX');
|
202
214
|
event.target.removeAttribute('posY');
|
203
215
|
removeCssTransform(event.target);
|
204
|
-
(
|
216
|
+
(_e = this.templateUpdated) === null || _e === void 0 ? void 0 : _e.emit({ endpoint: this.endpoint, template: (_f = this.templateStore) === null || _f === void 0 ? void 0 : _f.state, event: 'updated-field' });
|
205
217
|
}
|
206
218
|
catch (e) {
|
207
219
|
VerdocsToast('Error updating field, please try again later', { style: 'error' });
|
208
220
|
console.log('[FIELDS] Error updating field', e);
|
209
|
-
(
|
221
|
+
(_g = this.sdkError) === null || _g === void 0 ? void 0 : _g.emit(new SDKError(e.message, (_h = e.response) === null || _h === void 0 ? void 0 : _h.status, (_j = e.response) === null || _j === void 0 ? void 0 : _j.data));
|
210
222
|
event.target.removeAttribute('posX');
|
211
223
|
event.target.removeAttribute('posY');
|
212
224
|
removeCssTransform(event.target);
|
@@ -67,6 +67,7 @@ export const setControlStyles = (el, field, xScale, yScale) => {
|
|
67
67
|
export const getControlStyles = (field, xScale, yScale) => {
|
68
68
|
let { x = 0, y = 0, width = defaultWidth(field.type), height = defaultHeight(field.type) } = field;
|
69
69
|
return {
|
70
|
+
zIndex: '100',
|
70
71
|
width: `${width}px`,
|
71
72
|
height: `${height}px`,
|
72
73
|
position: 'absolute',
|
package/dist/components/utils.js
CHANGED
@@ -88,6 +88,7 @@ const setControlStyles = (el, field, xScale, yScale) => {
|
|
88
88
|
const getControlStyles = (field, xScale, yScale) => {
|
89
89
|
let { x = 0, y = 0, width = defaultWidth(field.type), height = defaultHeight(field.type) } = field;
|
90
90
|
return {
|
91
|
+
zIndex: '100',
|
91
92
|
width: `${width}px`,
|
92
93
|
height: `${height}px`,
|
93
94
|
position: 'absolute',
|
@@ -288,7 +288,7 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsAuth extends
|
|
288
288
|
return (h("div", { class: "form" }, h("form", { onSubmit: () => this.handleVerification() }, h("p", null, "Please check your e-mail inbox for a verification code and enter it below."), h("verdocs-text-input", { label: "Verification Code", required: true, value: this.verificationCode, onInput: (e) => (this.verificationCode = e.target.value), disabled: this.submitting }), h("div", { class: "buttons" }, h("verdocs-button", { label: "Sign Out", variant: "outline", disabled: this.submitting, onClick: () => this.handleLogout() }), h("verdocs-button", { label: "Verify", disabled: this.submitting || !this.verificationCode || this.verificationCode.length !== 6, onClick: () => this.handleVerification() })), h("div", { class: "buttons" }, h("verdocs-button", { variant: "text", label: "Resend Code", disabled: this.resendDisabled || this.submitting, onClick: () => this.handleResendVerification() })))));
|
289
289
|
}
|
290
290
|
if (this.displayMode === 'forgot') {
|
291
|
-
return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Forgot your password?"), h("p", null, "Enter your e-mail address below. If the e-mail address is valid, a password reset code will be sent to your inbox. Please allow up to 15 minutes to arrive, and check your spam folder if you do not receive the message."), h("form", { onSubmit: () => this.handleResetGetCode() }, h("verdocs-text-input", { label: "Email Address", autocomplete: "email", required: true, value: this.email, onInput: (e) => (this.email = e.target.value), disabled: this.submitting }), h("div", { style: { marginTop: '30px' } }), h("div", { class: "buttons" }, h("verdocs-button", { label: "Cancel", variant: "outline", disabled: this.submitting, onClick: () => (this.displayMode = 'login') }), h("verdocs-button", { label: "Request Code", disabled: this.submitting, onClick: () => this.handleResetGetCode() })))));
|
291
|
+
return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Forgot your password?"), h("p", null, "Enter your e-mail address below. If the e-mail address is valid, a password reset code will be sent to your inbox. Please allow up to 15 minutes to arrive, and check your spam folder if you do not receive the message."), h("form", { onSubmit: () => this.handleResetGetCode() }, h("verdocs-text-input", { label: "Email Address", autocomplete: "email", required: true, value: this.email, onInput: (e) => (this.email = e.target.value), disabled: this.submitting }), h("div", { style: { marginTop: '30px' } }), h("div", { class: "buttons" }, h("verdocs-button", { size: "small", label: "Cancel", variant: "outline", disabled: this.submitting, onClick: () => (this.displayMode = 'login') }), h("verdocs-button", { size: "small", label: "Request Code", disabled: this.submitting, onClick: () => this.handleResetGetCode() })))));
|
292
292
|
}
|
293
293
|
if (this.displayMode === 'reset') {
|
294
294
|
return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Forgot your password?"), h("p", null, "Enter your e-mail address below, and reset instructions will be sent to your Inbox. Please allow up to 15 minutes to arrive. Check your spam folder if you do not receive the message."), h("form", { onSubmit: () => this.handleResetPassword() }, h("verdocs-text-input", { label: "Verification Code", required: true, value: this.verificationCode, onInput: (e) => (this.verificationCode = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Password", type: "password", required: true, autocomplete: "off", value: this.newPassword, onInput: (e) => (this.newPassword = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Confirm Password", type: "password", required: true, autocomplete: "off", value: this.confirmpass, onInput: (e) => (this.confirmpass = e.target.value), disabled: this.submitting }), h("div", { style: { marginTop: '30px' } }), h("div", { class: "buttons" }, h("verdocs-button", { label: "Cancel", variant: "outline", disabled: this.submitting, onClick: () => (this.displayMode = 'login') }), h("verdocs-button", { label: "Reset", disabled: this.submitting, onClick: () => this.handleResetPassword() })), h("div", { class: "buttons" }, h("verdocs-button", { variant: "text", label: "Resend Code", disabled: this.resendDisabled || this.submitting, onClick: () => this.handleResendReset() })))));
|
@@ -141,19 +141,17 @@ const VerdocsTemplateFields = /*@__PURE__*/ proxyCustomElement(class VerdocsTemp
|
|
141
141
|
this.placing = null;
|
142
142
|
}
|
143
143
|
}
|
144
|
-
async handleFieldChange(field, e, optionId) {
|
145
|
-
|
146
|
-
}
|
144
|
+
// async handleFieldChange(field: ITemplateField, e: any, optionId?: string) {
|
145
|
+
// console.log('[FIELDS] handleFieldChange', field, e, optionId);
|
146
|
+
// }
|
147
147
|
attachFieldAttributes(pageInfo, field, el) {
|
148
|
-
el.addEventListener('input', e => this.handleFieldChange(field, e));
|
149
|
-
el.addEventListener('settingsChanged', (
|
148
|
+
// el.addEventListener('input', e => this.handleFieldChange(field, e));
|
149
|
+
el.addEventListener('settingsChanged', () => {
|
150
150
|
var _a, _b;
|
151
|
-
console.log('Settings changed', e.detail);
|
152
151
|
(_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: (_b = this.templateStore) === null || _b === void 0 ? void 0 : _b.state, event: 'added-field' });
|
153
152
|
});
|
154
153
|
el.addEventListener('deleted', () => {
|
155
154
|
var _a, _b;
|
156
|
-
console.log('[FIELDS] Deleted', this, field);
|
157
155
|
el.remove();
|
158
156
|
(_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: (_b = this.templateStore) === null || _b === void 0 ? void 0 : _b.state, event: 'updated-field' });
|
159
157
|
});
|
@@ -202,7 +200,7 @@ const VerdocsTemplateFields = /*@__PURE__*/ proxyCustomElement(class VerdocsTemp
|
|
202
200
|
updateCssTransform(event.target, 'translate', `${newX}px, ${newY}px`);
|
203
201
|
}
|
204
202
|
async handleMoveEnd(event) {
|
205
|
-
var _a, _b, _c, _d, _e;
|
203
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
206
204
|
const name = event.target.getAttribute('fieldname');
|
207
205
|
const option = +(event.target.getAttribute('option') || '0');
|
208
206
|
const field = this.fieldStore.get('fields').find(field => field.name === name);
|
@@ -211,19 +209,33 @@ const VerdocsTemplateFields = /*@__PURE__*/ proxyCustomElement(class VerdocsTemp
|
|
211
209
|
return;
|
212
210
|
}
|
213
211
|
const pageNumber = event.target.getAttribute('pagenumber');
|
214
|
-
|
212
|
+
let { naturalWidth = 612, naturalHeight = 792, renderedHeight = 792 } = this.cachedPageInfo[pageNumber];
|
215
213
|
const clientRect = event.target.getBoundingClientRect();
|
216
214
|
const parent = event.target.parentElement;
|
217
215
|
const parentRect = parent.getBoundingClientRect();
|
218
216
|
const width = field.width || defaultWidth(field.type);
|
219
217
|
const height = field.height || defaultHeight(field.type);
|
220
|
-
// These two being backwards is not a mistake. Left measures "over" from the left
|
221
|
-
// "up" from the bottom (negative displacement).
|
218
|
+
// These two being backwards is not a mistake. Left measures "over" from the left
|
219
|
+
// (positive displacement) while bottom measures "up" from the bottom (negative displacement).
|
222
220
|
const newX = Math.max(clientRect.left - parentRect.left, 0);
|
223
|
-
|
221
|
+
let newY = Math.max(renderedHeight - (parentRect.bottom - clientRect.bottom), 0);
|
222
|
+
console.log('drop', { pageNumber, newX, newY });
|
223
|
+
let newPageNumber = parseInt(pageNumber);
|
224
|
+
if (newY > renderedHeight) {
|
225
|
+
newPageNumber = Math.min(newPageNumber + 1, ((_d = (_c = (_b = (_a = this.templateStore) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.documents) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.pages) || 1);
|
226
|
+
newY -= renderedHeight;
|
227
|
+
renderedHeight = this.cachedPageInfo[newPageNumber].renderedHeight;
|
228
|
+
console.log('Next page', { newPageNumber, newY, renderedHeight });
|
229
|
+
}
|
230
|
+
else if (newY < 0) {
|
231
|
+
newPageNumber = Math.max(newPageNumber - 1, 1);
|
232
|
+
renderedHeight = this.cachedPageInfo[newPageNumber].renderedHeight;
|
233
|
+
newY += renderedHeight;
|
234
|
+
console.log('Next page', { newPageNumber, newY, renderedHeight });
|
235
|
+
}
|
224
236
|
const { x, y } = this.viewCoordinatesToPageCoordinates(newX, newY, pageNumber, naturalWidth - width, naturalHeight - height);
|
225
237
|
try {
|
226
|
-
const params = { x, y };
|
238
|
+
const params = { x, y, page: newPageNumber };
|
227
239
|
console.log('[FIELDS] Will update', name, y, option, params);
|
228
240
|
const newFieldData = await updateField(this.endpoint, this.templateId, name, params);
|
229
241
|
console.log('[FIELDS] Updated', newFieldData);
|
@@ -231,12 +243,12 @@ const VerdocsTemplateFields = /*@__PURE__*/ proxyCustomElement(class VerdocsTemp
|
|
231
243
|
event.target.removeAttribute('posX');
|
232
244
|
event.target.removeAttribute('posY');
|
233
245
|
removeCssTransform(event.target);
|
234
|
-
(
|
246
|
+
(_e = this.templateUpdated) === null || _e === void 0 ? void 0 : _e.emit({ endpoint: this.endpoint, template: (_f = this.templateStore) === null || _f === void 0 ? void 0 : _f.state, event: 'updated-field' });
|
235
247
|
}
|
236
248
|
catch (e) {
|
237
249
|
VerdocsToast('Error updating field, please try again later', { style: 'error' });
|
238
250
|
console.log('[FIELDS] Error updating field', e);
|
239
|
-
(
|
251
|
+
(_g = this.sdkError) === null || _g === void 0 ? void 0 : _g.emit(new SDKError(e.message, (_h = e.response) === null || _h === void 0 ? void 0 : _h.status, (_j = e.response) === null || _j === void 0 ? void 0 : _j.data));
|
240
252
|
event.target.removeAttribute('posX');
|
241
253
|
event.target.removeAttribute('posY');
|
242
254
|
removeCssTransform(event.target);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host, Fragment } from '@stencil/core/internal/client';
|
2
2
|
import { d as defineCustomElement$1 } from './verdocs-button2.js';
|
3
3
|
|
4
|
-
const verdocsUploadDialogCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-upload-dialog{font-family:\"Inter\", \"Barlow\", sans-serif
|
4
|
+
const verdocsUploadDialogCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-upload-dialog{position:fixed;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-upload-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-upload-dialog .background-overlay{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}verdocs-upload-dialog .dialog{width:320px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-upload-dialog .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-upload-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-upload-dialog .buttons verdocs-button{margin-left:16px}verdocs-upload-dialog .current-label{margin:20px 0 5px 0}verdocs-upload-dialog .drop-target{opacity:1;width:100%;display:-ms-flexbox;display:flex;margin:20px 0;min-height:260px;padding:30px 15px;text-align:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;background-color:#f5f5f5;color:rgba(0, 0, 0, 0.54);border:2px dashed #979797}verdocs-upload-dialog .drop-target p{margin:12px 0}verdocs-upload-dialog .drop-target.dragging-over{border:5px solid #4c56cb}verdocs-upload-dialog .drop-target>verdocs-button{margin:12px 0;display:inline-block}verdocs-upload-dialog .attachments{height:56px;font-size:0;margin:20px 0;padding:0 16px;line-height:56px;white-space:normal;-webkit-box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14);box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)}verdocs-upload-dialog .attachments .attachment{gap:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-upload-dialog .attachments .attachment .icon{width:18px;height:18px;line-height:18px}verdocs-upload-dialog .attachments .attachment .icon.trash{cursor:pointer}verdocs-upload-dialog .attachments .attachment .name{-ms-flex:1;flex:1;font-size:14px;overflow:hidden;font-weight:400;white-space:nowrap;text-overflow:ellipsis}";
|
5
5
|
const VerdocsUploadDialogStyle0 = verdocsUploadDialogCss;
|
6
6
|
|
7
7
|
const TrashIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" /></svg>`;
|
@@ -88,6 +88,7 @@ const setControlStyles = (el, field, xScale, yScale) => {
|
|
88
88
|
const getControlStyles = (field, xScale, yScale) => {
|
89
89
|
let { x = 0, y = 0, width = defaultWidth(field.type), height = defaultHeight(field.type) } = field;
|
90
90
|
return {
|
91
|
+
zIndex: '100',
|
91
92
|
width: `${width}px`,
|
92
93
|
height: `${height}px`,
|
93
94
|
position: 'absolute',
|
@@ -284,7 +284,7 @@ const VerdocsAuth = class {
|
|
284
284
|
return (h("div", { class: "form" }, h("form", { onSubmit: () => this.handleVerification() }, h("p", null, "Please check your e-mail inbox for a verification code and enter it below."), h("verdocs-text-input", { label: "Verification Code", required: true, value: this.verificationCode, onInput: (e) => (this.verificationCode = e.target.value), disabled: this.submitting }), h("div", { class: "buttons" }, h("verdocs-button", { label: "Sign Out", variant: "outline", disabled: this.submitting, onClick: () => this.handleLogout() }), h("verdocs-button", { label: "Verify", disabled: this.submitting || !this.verificationCode || this.verificationCode.length !== 6, onClick: () => this.handleVerification() })), h("div", { class: "buttons" }, h("verdocs-button", { variant: "text", label: "Resend Code", disabled: this.resendDisabled || this.submitting, onClick: () => this.handleResendVerification() })))));
|
285
285
|
}
|
286
286
|
if (this.displayMode === 'forgot') {
|
287
|
-
return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Forgot your password?"), h("p", null, "Enter your e-mail address below. If the e-mail address is valid, a password reset code will be sent to your inbox. Please allow up to 15 minutes to arrive, and check your spam folder if you do not receive the message."), h("form", { onSubmit: () => this.handleResetGetCode() }, h("verdocs-text-input", { label: "Email Address", autocomplete: "email", required: true, value: this.email, onInput: (e) => (this.email = e.target.value), disabled: this.submitting }), h("div", { style: { marginTop: '30px' } }), h("div", { class: "buttons" }, h("verdocs-button", { label: "Cancel", variant: "outline", disabled: this.submitting, onClick: () => (this.displayMode = 'login') }), h("verdocs-button", { label: "Request Code", disabled: this.submitting, onClick: () => this.handleResetGetCode() })))));
|
287
|
+
return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Forgot your password?"), h("p", null, "Enter your e-mail address below. If the e-mail address is valid, a password reset code will be sent to your inbox. Please allow up to 15 minutes to arrive, and check your spam folder if you do not receive the message."), h("form", { onSubmit: () => this.handleResetGetCode() }, h("verdocs-text-input", { label: "Email Address", autocomplete: "email", required: true, value: this.email, onInput: (e) => (this.email = e.target.value), disabled: this.submitting }), h("div", { style: { marginTop: '30px' } }), h("div", { class: "buttons" }, h("verdocs-button", { size: "small", label: "Cancel", variant: "outline", disabled: this.submitting, onClick: () => (this.displayMode = 'login') }), h("verdocs-button", { size: "small", label: "Request Code", disabled: this.submitting, onClick: () => this.handleResetGetCode() })))));
|
288
288
|
}
|
289
289
|
if (this.displayMode === 'reset') {
|
290
290
|
return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Forgot your password?"), h("p", null, "Enter your e-mail address below, and reset instructions will be sent to your Inbox. Please allow up to 15 minutes to arrive. Check your spam folder if you do not receive the message."), h("form", { onSubmit: () => this.handleResetPassword() }, h("verdocs-text-input", { label: "Verification Code", required: true, value: this.verificationCode, onInput: (e) => (this.verificationCode = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Password", type: "password", required: true, autocomplete: "off", value: this.newPassword, onInput: (e) => (this.newPassword = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Confirm Password", type: "password", required: true, autocomplete: "off", value: this.confirmpass, onInput: (e) => (this.confirmpass = e.target.value), disabled: this.submitting }), h("div", { style: { marginTop: '30px' } }), h("div", { class: "buttons" }, h("verdocs-button", { label: "Cancel", variant: "outline", disabled: this.submitting, onClick: () => (this.displayMode = 'login') }), h("verdocs-button", { label: "Reset", disabled: this.submitting, onClick: () => this.handleResetPassword() })), h("div", { class: "buttons" }, h("verdocs-button", { variant: "text", label: "Resend Code", disabled: this.resendDisabled || this.submitting, onClick: () => this.handleResendReset() })))));
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host } from './index-a68c7262.js';
|
2
2
|
import { VerdocsEndpoint, formatFullName } from '@verdocs/js-sdk';
|
3
|
-
import { f as convertToE164 } from './utils-
|
3
|
+
import { f as convertToE164 } from './utils-06448b9b.js';
|
4
4
|
import './_commonjsHelpers-bdec4bbd.js';
|
5
5
|
import './Types-95d86a44.js';
|
6
6
|
import './format-0771834a.js';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a68c7262.js';
|
2
2
|
import { VerdocsEndpoint, getEnvelopeDocumentPageDisplayUri } from '@verdocs/js-sdk';
|
3
|
-
import { t as throttle } from './utils-
|
3
|
+
import { t as throttle } from './utils-06448b9b.js';
|
4
4
|
import './_commonjsHelpers-bdec4bbd.js';
|
5
5
|
import './Types-95d86a44.js';
|
6
6
|
import './format-0771834a.js';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-a68c7262.js';
|
2
2
|
import { VerdocsEndpoint, getEnvelopes, integerSequence, getRecipientsWithActions, userCanCancelEnvelope, userCanAct, formatFullName, cancelEnvelope } from '@verdocs/js-sdk';
|
3
|
-
import { s as saveEnvelopesAsZip } from './utils-
|
3
|
+
import { s as saveEnvelopesAsZip } from './utils-06448b9b.js';
|
4
4
|
import { V as VerdocsToast } from './Toast-c4843828.js';
|
5
5
|
import { S as SDKError } from './errors-887f1e88.js';
|
6
6
|
import './_commonjsHelpers-bdec4bbd.js';
|
@@ -1377,7 +1377,7 @@ const VerdocsSignatureDialog = class {
|
|
1377
1377
|
};
|
1378
1378
|
VerdocsSignatureDialog.style = VerdocsSignatureDialogStyle0;
|
1379
1379
|
|
1380
|
-
const verdocsUploadDialogCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-upload-dialog{font-family:\"Inter\", \"Barlow\", sans-serif
|
1380
|
+
const verdocsUploadDialogCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-upload-dialog{position:fixed;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-upload-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-upload-dialog .background-overlay{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}verdocs-upload-dialog .dialog{width:320px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-upload-dialog .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-upload-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-upload-dialog .buttons verdocs-button{margin-left:16px}verdocs-upload-dialog .current-label{margin:20px 0 5px 0}verdocs-upload-dialog .drop-target{opacity:1;width:100%;display:-ms-flexbox;display:flex;margin:20px 0;min-height:260px;padding:30px 15px;text-align:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;background-color:#f5f5f5;color:rgba(0, 0, 0, 0.54);border:2px dashed #979797}verdocs-upload-dialog .drop-target p{margin:12px 0}verdocs-upload-dialog .drop-target.dragging-over{border:5px solid #4c56cb}verdocs-upload-dialog .drop-target>verdocs-button{margin:12px 0;display:inline-block}verdocs-upload-dialog .attachments{height:56px;font-size:0;margin:20px 0;padding:0 16px;line-height:56px;white-space:normal;-webkit-box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14);box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)}verdocs-upload-dialog .attachments .attachment{gap:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-upload-dialog .attachments .attachment .icon{width:18px;height:18px;line-height:18px}verdocs-upload-dialog .attachments .attachment .icon.trash{cursor:pointer}verdocs-upload-dialog .attachments .attachment .name{-ms-flex:1;flex:1;font-size:14px;overflow:hidden;font-weight:400;white-space:nowrap;text-overflow:ellipsis}";
|
1381
1381
|
const VerdocsUploadDialogStyle0 = verdocsUploadDialogCss;
|
1382
1382
|
|
1383
1383
|
const TrashIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" /></svg>`;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host, g as getElement } from './index-a68c7262.js';
|
2
2
|
import { VerdocsEndpoint, getEnvelope, getDocumentDownloadLink, cancelEnvelope, userCanCancelEnvelope, integerSequence } from '@verdocs/js-sdk';
|
3
|
-
import { s as saveEnvelopesAsZip } from './utils-
|
3
|
+
import { s as saveEnvelopesAsZip } from './utils-06448b9b.js';
|
4
4
|
import { S as SDKError } from './errors-887f1e88.js';
|
5
5
|
import './_commonjsHelpers-bdec4bbd.js';
|
6
6
|
import './Types-95d86a44.js';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a68c7262.js';
|
2
2
|
import { integerSequence } from '@verdocs/js-sdk';
|
3
|
-
import { h as renderedTextWidth } from './utils-
|
3
|
+
import { h as renderedTextWidth } from './utils-06448b9b.js';
|
4
4
|
import { c as createPopper } from './popper-0fbeff6d.js';
|
5
5
|
import './_commonjsHelpers-bdec4bbd.js';
|
6
6
|
import './Types-95d86a44.js';
|