@verdocs/web-sdk 4.2.117 → 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.
Files changed (74) hide show
  1. package/dist/cjs/{utils-c878d0c2.js → utils-469e8fc5.js} +1 -0
  2. package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
  3. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +1 -1
  4. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
  5. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-kba-dialog_2.cjs.entry.js +1 -1
  8. package/dist/cjs/verdocs-pagination_2.cjs.entry.js +1 -1
  9. package/dist/cjs/verdocs-preview_9.cjs.entry.js +28 -16
  10. package/dist/cjs/verdocs-sign.cjs.entry.js +3 -27
  11. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
  12. package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.css +2 -1
  13. package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +1 -1
  14. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +4 -28
  15. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +27 -15
  16. package/dist/collection/utils/utils.js +1 -0
  17. package/dist/components/utils.js +1 -0
  18. package/dist/components/verdocs-auth.js +1 -1
  19. package/dist/components/verdocs-sign.js +3 -27
  20. package/dist/components/verdocs-template-fields2.js +27 -15
  21. package/dist/components/verdocs-upload-dialog2.js +1 -1
  22. package/dist/esm/{utils-0a9eb6f8.js → utils-06448b9b.js} +1 -0
  23. package/dist/esm/verdocs-auth.entry.js +1 -1
  24. package/dist/esm/verdocs-contact-picker_2.entry.js +1 -1
  25. package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
  26. package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
  27. package/dist/esm/verdocs-field-attachment_13.entry.js +1 -1
  28. package/dist/esm/verdocs-kba-dialog_2.entry.js +1 -1
  29. package/dist/esm/verdocs-pagination_2.entry.js +1 -1
  30. package/dist/esm/verdocs-preview_9.entry.js +28 -16
  31. package/dist/esm/verdocs-sign.entry.js +4 -28
  32. package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
  33. package/dist/esm-es5/{utils-0a9eb6f8.js → utils-06448b9b.js} +1 -1
  34. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  35. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
  36. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  37. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  38. package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
  39. package/dist/esm-es5/verdocs-kba-dialog_2.entry.js +1 -1
  40. package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
  41. package/dist/esm-es5/verdocs-preview_9.entry.js +1 -1
  42. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  43. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  44. package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +1 -1
  45. package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +0 -1
  46. package/dist/types/utils/utils.d.ts +1 -0
  47. package/dist/verdocs-web-sdk/p-1151b8f6.system.entry.js +1 -0
  48. package/dist/verdocs-web-sdk/p-195fbae1.entry.js +1 -0
  49. package/dist/verdocs-web-sdk/{p-9ee3f90d.entry.js → p-1cf84ac4.entry.js} +1 -1
  50. package/dist/verdocs-web-sdk/p-267df026.system.js +1 -1
  51. package/dist/verdocs-web-sdk/{p-d41c5eae.entry.js → p-345f08c2.entry.js} +1 -1
  52. package/dist/verdocs-web-sdk/{p-3a0db043.entry.js → p-35fa7834.entry.js} +1 -1
  53. package/dist/verdocs-web-sdk/{p-d1241532.entry.js → p-3bd8fbaa.entry.js} +1 -1
  54. package/dist/verdocs-web-sdk/{p-b57446bb.system.entry.js → p-4af90836.system.entry.js} +1 -1
  55. package/dist/verdocs-web-sdk/{p-97e16d5d.entry.js → p-4d9b8926.entry.js} +1 -1
  56. package/dist/verdocs-web-sdk/{p-98b60918.system.entry.js → p-6465a990.system.entry.js} +1 -1
  57. package/dist/verdocs-web-sdk/{p-8f29bffd.system.entry.js → p-75079e4e.system.entry.js} +1 -1
  58. package/dist/verdocs-web-sdk/{p-476996a3.system.entry.js → p-77feaf73.system.entry.js} +1 -1
  59. package/dist/verdocs-web-sdk/{p-fd27aa1a.system.entry.js → p-79d28740.system.entry.js} +1 -1
  60. package/dist/verdocs-web-sdk/{p-1f4feeff.system.entry.js → p-8ac88c27.system.entry.js} +1 -1
  61. package/dist/verdocs-web-sdk/{p-a583ffe0.system.entry.js → p-8f68db2b.system.entry.js} +1 -1
  62. package/dist/verdocs-web-sdk/{p-7b5c1bd5.system.entry.js → p-952f4967.system.entry.js} +1 -1
  63. package/dist/verdocs-web-sdk/{p-7933fc15.system.js → p-b96a9a0f.system.js} +1 -1
  64. package/dist/verdocs-web-sdk/{p-123768d7.entry.js → p-ba49517a.entry.js} +1 -1
  65. package/dist/verdocs-web-sdk/{p-e0d7224c.system.entry.js → p-bab9ba61.system.entry.js} +1 -1
  66. package/dist/verdocs-web-sdk/{p-5c903ba4.entry.js → p-c97702db.entry.js} +1 -1
  67. package/dist/verdocs-web-sdk/p-cbac8750.entry.js +1 -0
  68. package/dist/verdocs-web-sdk/{p-925f6ad5.js → p-ddcffa6b.js} +1 -1
  69. package/dist/verdocs-web-sdk/{p-c7606304.entry.js → p-fb70eb59.entry.js} +1 -1
  70. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  71. package/package.json +2 -2
  72. package/dist/verdocs-web-sdk/p-226ae566.entry.js +0 -1
  73. package/dist/verdocs-web-sdk/p-a24ad229.system.entry.js +0 -1
  74. package/dist/verdocs-web-sdk/p-e5b0751b.entry.js +0 -1
@@ -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;-webkit-box-sizing:border-box;box-sizing:border-box}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}";
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-0a9eb6f8.js';
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-0a9eb6f8.js';
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-0a9eb6f8.js';
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;-webkit-box-sizing:border-box;box-sizing:border-box}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}";
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-0a9eb6f8.js';
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-0a9eb6f8.js';
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';
@@ -8,7 +8,7 @@ import { D as DocIcon, P as PngIcon, J as JpgIcon, a as PdfIcon, F as FileIcon$1
8
8
  import { V as VerdocsToast } from './Toast-c4843828.js';
9
9
  import { f as format } from './format-0771834a.js';
10
10
  import { i as interact } from './interact.min-a71beb3d.js';
11
- import { b as updateCssTransform, c as removeCssTransform, g as getFieldId, d as defaultWidth, e as defaultHeight } from './utils-0a9eb6f8.js';
11
+ import { b as updateCssTransform, c as removeCssTransform, g as getFieldId, d as defaultWidth, e as defaultHeight } from './utils-06448b9b.js';
12
12
  import './index-a971a584.js';
13
13
  import './index-7588a071.js';
14
14
  import './_commonjsHelpers-bdec4bbd.js';
@@ -768,19 +768,17 @@ const VerdocsTemplateFields = class {
768
768
  this.placing = null;
769
769
  }
770
770
  }
771
- async handleFieldChange(field, e, optionId) {
772
- console.log('[FIELDS] handleFieldChange', field, e, optionId);
773
- }
771
+ // async handleFieldChange(field: ITemplateField, e: any, optionId?: string) {
772
+ // console.log('[FIELDS] handleFieldChange', field, e, optionId);
773
+ // }
774
774
  attachFieldAttributes(pageInfo, field, el) {
775
- el.addEventListener('input', e => this.handleFieldChange(field, e));
776
- el.addEventListener('settingsChanged', (e) => {
775
+ // el.addEventListener('input', e => this.handleFieldChange(field, e));
776
+ el.addEventListener('settingsChanged', () => {
777
777
  var _a, _b;
778
- console.log('Settings changed', e.detail);
779
778
  (_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' });
780
779
  });
781
780
  el.addEventListener('deleted', () => {
782
781
  var _a, _b;
783
- console.log('[FIELDS] Deleted', this, field);
784
782
  el.remove();
785
783
  (_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' });
786
784
  });
@@ -829,7 +827,7 @@ const VerdocsTemplateFields = class {
829
827
  updateCssTransform(event.target, 'translate', `${newX}px, ${newY}px`);
830
828
  }
831
829
  async handleMoveEnd(event) {
832
- var _a, _b, _c, _d, _e;
830
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
833
831
  const name = event.target.getAttribute('fieldname');
834
832
  const option = +(event.target.getAttribute('option') || '0');
835
833
  const field = this.fieldStore.get('fields').find(field => field.name === name);
@@ -838,19 +836,33 @@ const VerdocsTemplateFields = class {
838
836
  return;
839
837
  }
840
838
  const pageNumber = event.target.getAttribute('pagenumber');
841
- const { naturalWidth = 612, naturalHeight = 792, renderedHeight = 792 } = this.cachedPageInfo[pageNumber];
839
+ let { naturalWidth = 612, naturalHeight = 792, renderedHeight = 792 } = this.cachedPageInfo[pageNumber];
842
840
  const clientRect = event.target.getBoundingClientRect();
843
841
  const parent = event.target.parentElement;
844
842
  const parentRect = parent.getBoundingClientRect();
845
843
  const width = field.width || defaultWidth(field.type);
846
844
  const height = field.height || defaultHeight(field.type);
847
- // These two being backwards is not a mistake. Left measures "over" from the left (positive displacement) while bottom measures
848
- // "up" from the bottom (negative displacement).
845
+ // These two being backwards is not a mistake. Left measures "over" from the left
846
+ // (positive displacement) while bottom measures "up" from the bottom (negative displacement).
849
847
  const newX = Math.max(clientRect.left - parentRect.left, 0);
850
- const newY = Math.max(renderedHeight - (parentRect.bottom - clientRect.bottom), 0);
848
+ let newY = Math.max(renderedHeight - (parentRect.bottom - clientRect.bottom), 0);
849
+ console.log('drop', { pageNumber, newX, newY });
850
+ let newPageNumber = parseInt(pageNumber);
851
+ if (newY > renderedHeight) {
852
+ 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);
853
+ newY -= renderedHeight;
854
+ renderedHeight = this.cachedPageInfo[newPageNumber].renderedHeight;
855
+ console.log('Next page', { newPageNumber, newY, renderedHeight });
856
+ }
857
+ else if (newY < 0) {
858
+ newPageNumber = Math.max(newPageNumber - 1, 1);
859
+ renderedHeight = this.cachedPageInfo[newPageNumber].renderedHeight;
860
+ newY += renderedHeight;
861
+ console.log('Next page', { newPageNumber, newY, renderedHeight });
862
+ }
851
863
  const { x, y } = this.viewCoordinatesToPageCoordinates(newX, newY, pageNumber, naturalWidth - width, naturalHeight - height);
852
864
  try {
853
- const params = { x, y };
865
+ const params = { x, y, page: newPageNumber };
854
866
  console.log('[FIELDS] Will update', name, y, option, params);
855
867
  const newFieldData = await updateField(this.endpoint, this.templateId, name, params);
856
868
  console.log('[FIELDS] Updated', newFieldData);
@@ -858,12 +870,12 @@ const VerdocsTemplateFields = class {
858
870
  event.target.removeAttribute('posX');
859
871
  event.target.removeAttribute('posY');
860
872
  removeCssTransform(event.target);
861
- (_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' });
873
+ (_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' });
862
874
  }
863
875
  catch (e) {
864
876
  VerdocsToast('Error updating field, please try again later', { style: 'error' });
865
877
  console.log('[FIELDS] Error updating field', e);
866
- (_c = this.sdkError) === null || _c === void 0 ? void 0 : _c.emit(new SDKError(e.message, (_d = e.response) === null || _d === void 0 ? void 0 : _d.status, (_e = e.response) === null || _e === void 0 ? void 0 : _e.data));
878
+ (_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));
867
879
  event.target.removeAttribute('posX');
868
880
  event.target.removeAttribute('posY');
869
881
  removeCssTransform(event.target);
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, F as Fragment } from './index-a68c7262.js';
2
- import { VerdocsEndpoint, startSigningSession, getKbaStep, envelopeRecipientAgree, envelopeRecipientDecline, getEnvelope, updateEnvelopeField, createSignature, updateEnvelopeFieldSignature, createInitials, updateEnvelopeFieldInitials, isValidPhone, isValidEmail, envelopeRecipientSubmit, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, formatFullName, fullNameToInitials, submitKbaPin, integerSequence } from '@verdocs/js-sdk';
3
- import { a as saveAttachment, u as updateDocumentFieldValue, r as renderDocumentField, g as getFieldId } from './utils-0a9eb6f8.js';
2
+ import { VerdocsEndpoint, startSigningSession, getKbaStep, envelopeRecipientAgree, envelopeRecipientDecline, getEnvelope, updateEnvelopeField, createSignature, updateEnvelopeFieldSignature, createInitials, updateEnvelopeFieldInitials, isValidPhone, isValidEmail, sortFields, envelopeRecipientSubmit, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, formatFullName, fullNameToInitials, submitKbaPin, integerSequence } from '@verdocs/js-sdk';
3
+ import { a as saveAttachment, u as updateDocumentFieldValue, r as renderDocumentField, g as getFieldId } from './utils-06448b9b.js';
4
4
  import { a as createTemplateFieldStoreFromEnvelope } from './TemplateFieldStore-68bf6acd.js';
5
5
  import { V as VerdocsToast } from './Toast-c4843828.js';
6
6
  import { S as SDKError } from './errors-887f1e88.js';
@@ -330,19 +330,7 @@ const VerdocsSign = class {
330
330
  }
331
331
  getSortedFillableFields() {
332
332
  const recipientFields = this.getRecipientFields().filter(field => field.type !== 'timestamp');
333
- recipientFields.sort((a, b) => {
334
- const aX = a.x || 0;
335
- const aY = a.y || 0;
336
- const bX = b.x || 0;
337
- const bY = b.y || 0;
338
- // NOTE: Logic looks a little strange X vs Y. It's because we go top down,
339
- // left to right. But Y coordinates are inverted in PDFs. The reason for
340
- // the division is because no human makes perfect templates and frequently
341
- // two fields on the "same line" will be slightly offset vertically.
342
- const divaY = Math.floor(aY / 5);
343
- const divbY = Math.floor(bY / 5);
344
- return divbY !== divaY ? divbY - divaY : aX - bX;
345
- });
333
+ sortFields(recipientFields);
346
334
  return recipientFields;
347
335
  }
348
336
  async handleNext() {
@@ -376,19 +364,7 @@ const VerdocsSign = class {
376
364
  }
377
365
  // Find and focus the next incomplete` field (that is fillable)
378
366
  const emptyFields = this.getSortedFillableFields().filter(field => !this.isFieldFilled(field));
379
- emptyFields.sort((a, b) => {
380
- const aX = a.x || 0;
381
- const aY = a.y || 0;
382
- const bX = b.x || 0;
383
- const bY = b.y || 0;
384
- // NOTE: Logic looks a little strange X vs Y. It's because we go top down,
385
- // left to right. But Y coordinates are inverted in PDFs. The reason for
386
- // the division is because no human makes perfect templates and frequently
387
- // two fields on the "same line" will be slightly offset vertically.
388
- const divaY = Math.floor(aY / 5);
389
- const divbY = Math.floor(bY / 5);
390
- return divbY !== divaY ? divbY - divaY : aX - bX;
391
- });
367
+ sortFields(emptyFields);
392
368
  const focusedIndex = emptyFields.findIndex(field => field.name === this.focusedField);
393
369
  let nextFocusedIndex = focusedIndex + 1;
394
370
  if (nextFocusedIndex >= emptyFields.length) {
@@ -1,7 +1,7 @@
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, getTemplateDocumentPageDisplayUri } from '@verdocs/js-sdk';
3
3
  import { g as getTemplateFieldStore } from './TemplateFieldStore-68bf6acd.js';
4
- import { t as throttle, i as getControlStyles, g as getFieldId } from './utils-0a9eb6f8.js';
4
+ import { t as throttle, i as getControlStyles, g as getFieldId } from './utils-06448b9b.js';
5
5
  import { c as createPopper } from './popper-0fbeff6d.js';
6
6
  import './index-a971a584.js';
7
7
  import './_commonjsHelpers-bdec4bbd.js';