@verdocs/web-sdk 2.0.6 → 2.0.8
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/ipc-test.cjs.entry.js +37 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{verdocs-button-panel_3.cjs.entry.js → verdocs-button-panel_2.cjs.entry.js} +0 -17
- package/dist/cjs/{verdocs-checkbox_4.cjs.entry.js → verdocs-checkbox_5.cjs.entry.js} +18 -1
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-radio-button.cjs.entry.js +23 -0
- package/dist/cjs/verdocs-sign.cjs.entry.js +12 -3
- package/dist/cjs/verdocs-template-attachments_2.cjs.entry.js +236 -0
- package/dist/cjs/{verdocs-template-document-page.cjs.entry.js → verdocs-template-document-page_2.cjs.entry.js} +45 -0
- package/dist/cjs/{verdocs-template-attachments_4.cjs.entry.js → verdocs-template-fields_4.cjs.entry.js} +238 -229
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/controls/verdocs-checkbox/verdocs-checkbox.css +1 -0
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.css +2 -0
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +12 -2
- package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.css +1 -1
- package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +1 -1
- package/dist/collection/components/other/ipctest/ipc-test.css +4 -0
- package/dist/collection/components/other/ipctest/ipc-test.js +79 -0
- package/dist/collection/components/other/ipctest/ipc-test.stories.js +8 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/ipc-test.d.ts +11 -0
- package/dist/components/ipc-test.js +142 -0
- package/dist/components/verdocs-checkbox2.js +1 -1
- package/dist/components/verdocs-contact-picker2.js +1 -1
- package/dist/components/verdocs-envelope-sidebar.js +1 -1
- package/dist/components/verdocs-sign.js +13 -3
- package/dist/docs.json +102 -1
- package/dist/esm/ipc-test.entry.js +33 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-aa016f33.js → utils-51c8f6c7.js} +1 -1
- package/dist/esm/{verdocs-button-panel_3.entry.js → verdocs-button-panel_2.entry.js} +1 -17
- package/dist/esm/{verdocs-checkbox_4.entry.js → verdocs-checkbox_5.entry.js} +18 -2
- package/dist/esm/verdocs-contact-picker.entry.js +2 -2
- package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm/verdocs-field-checkbox.entry.js +1 -1
- package/dist/esm/verdocs-field-date.entry.js +1 -1
- package/dist/esm/verdocs-field-dropdown.entry.js +1 -1
- package/dist/esm/verdocs-field-initial.entry.js +1 -1
- package/dist/esm/verdocs-field-payment.entry.js +1 -1
- package/dist/esm/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm/verdocs-field-signature.entry.js +1 -1
- package/dist/esm/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm/verdocs-field-timestamp.entry.js +1 -1
- package/dist/esm/verdocs-pagination_3.entry.js +1 -1
- package/dist/esm/verdocs-preview.entry.js +1 -1
- package/dist/esm/verdocs-radio-button.entry.js +19 -0
- package/dist/esm/verdocs-send.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +13 -4
- package/dist/esm/verdocs-template-attachments_2.entry.js +231 -0
- package/dist/esm/{verdocs-template-document-page.entry.js → verdocs-template-document-page_2.entry.js} +46 -2
- package/dist/esm/{verdocs-template-attachments_4.entry.js → verdocs-template-fields_4.entry.js} +236 -227
- package/dist/esm/verdocs-view.entry.js +1 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/ipc-test.entry.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{utils-aa016f33.js → utils-51c8f6c7.js} +1 -1
- package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -0
- package/dist/esm-es5/verdocs-checkbox_5.entry.js +1 -0
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview.entry.js +1 -1
- package/dist/esm-es5/verdocs-radio-button.entry.js +1 -0
- package/dist/esm-es5/verdocs-send.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-attachments_2.entry.js +1 -0
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -0
- package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -0
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +1 -0
- package/dist/types/components/other/ipctest/ipc-test.d.ts +17 -0
- package/dist/types/components/other/ipctest/ipc-test.stories.d.ts +4 -0
- package/dist/types/components.d.ts +29 -0
- package/dist/verdocs-web-sdk/{p-3a4d619d.system.entry.js → p-048a6205.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-0c5da644.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-965428e4.entry.js → p-11a30706.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c0b4cda6.entry.js → p-19fefdf7.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-26417803.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-d9be74a3.entry.js → p-2ebc0650.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c90a995b.entry.js → p-3561afed.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-3a0ba0b8.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-4c87ae76.system.entry.js → p-403ea34b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-10ed9311.system.entry.js → p-42d2c651.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-cbf15c6d.entry.js → p-450047f1.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-737a2b7c.entry.js → p-455c136c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-da71e206.entry.js → p-485ed6e3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-4dc8cc71.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-3cf07b3d.entry.js → p-5255e6f7.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-96defbf7.system.entry.js → p-5cff7439.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-5e50330a.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-03775689.system.js → p-62aaeefd.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-63bb14bc.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-647cdb84.system.js +1 -1
- package/dist/verdocs-web-sdk/p-657dacc4.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-bed19bbf.system.entry.js → p-6995a8d8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1ad38b2b.system.entry.js → p-6e8b1251.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4239ed46.system.entry.js → p-6ebab009.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e58cfa85.entry.js → p-7cd40ff6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-7fc89f46.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-7ca5de26.system.entry.js → p-844f5d1b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c7b1d2a6.system.entry.js → p-87232ec1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-61eea1eb.entry.js → p-88e0bab8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9b42d207.system.entry.js → p-8b2dc164.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-46a931f2.system.entry.js → p-8b77a5dc.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b1e1de28.system.entry.js → p-90565aa6.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-91b8a076.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-9cc39dc6.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-a106413b.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-05fe6f04.entry.js → p-a3c33953.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-a4dd68fd.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-d317166e.entry.js → p-a88c77bb.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-cd4998db.js → p-ae4c9e4a.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ba5bf927.system.entry.js → p-b42c686d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-b7b48889.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-bd3405ab.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-733909e4.entry.js → p-c7cebd38.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b8b6d7e3.entry.js → p-c8a1de2c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-c91ad3c7.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-bc64de48.system.entry.js → p-cf6d8044.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-596530f0.entry.js → p-d115c414.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-d2b86b2e.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-2f4c539d.entry.js → p-d3f3c09a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1d1ab8f4.system.entry.js → p-d45ea55d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-d6c341c4.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-e32ff05d.system.entry.js → p-f2207c05.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7680baf7.system.entry.js → p-fac4806c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c262c7c0.entry.js → p-fc8bb551.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-fea16530.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/Roles-9b593b95.js +0 -28
- package/dist/cjs/verdocs-radio-button_3.cjs.entry.js +0 -241
- package/dist/cjs/verdocs-toolbar-icon.cjs.entry.js +0 -51
- package/dist/custom-elements.json +0 -1898
- package/dist/esm/Roles-6eb459df.js +0 -24
- package/dist/esm/verdocs-radio-button_3.entry.js +0 -235
- package/dist/esm/verdocs-toolbar-icon.entry.js +0 -47
- package/dist/esm-es5/Roles-6eb459df.js +0 -1
- package/dist/esm-es5/verdocs-button-panel_3.entry.js +0 -1
- package/dist/esm-es5/verdocs-checkbox_4.entry.js +0 -1
- package/dist/esm-es5/verdocs-radio-button_3.entry.js +0 -1
- package/dist/esm-es5/verdocs-template-attachments_4.entry.js +0 -1
- package/dist/esm-es5/verdocs-template-document-page.entry.js +0 -1
- package/dist/esm-es5/verdocs-toolbar-icon.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-0a86db90.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-17ec248a.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-27faf081.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2960c946.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4d8a70fc.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-567f8bbb.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-633926d8.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-65167ce1.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6a56401e.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-781c6f9c.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7daa9e29.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-8027431e.js +0 -1
- package/dist/verdocs-web-sdk/p-8229e6df.system.js +0 -1
- package/dist/verdocs-web-sdk/p-a27bcbd2.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a3820b2c.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b2d8c147.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-da78b0c9.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f3ac446d.system.entry.js +0 -1
@@ -5,7 +5,7 @@ import { e as envelopeRecipientAgree, a as envelopeRecipientDecline, b as envelo
|
|
5
5
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-e447b318.js';
|
6
6
|
import { a as isValidPhone, i as isValidEmail } from './Validators-f110bae2.js';
|
7
7
|
import { f as fullNameToInitials, i as integerSequence } from './Primitives-054bc6e5.js';
|
8
|
-
import { b as saveAttachment, u as updateDocumentFieldValue, a as getRoleIndex, r as renderDocumentField, c as getFieldId } from './utils-
|
8
|
+
import { b as saveAttachment, u as updateDocumentFieldValue, a as getRoleIndex, r as renderDocumentField, c as getFieldId } from './utils-51c8f6c7.js';
|
9
9
|
import { a as FORMAT_DATE } from './Types-de18e225.js';
|
10
10
|
import { S as SDKError } from './errors-9b5498c8.js';
|
11
11
|
import { V as VerdocsToast } from './Toast-f3b8fd46.js';
|
@@ -42,7 +42,7 @@ var createInitials = function (endpoint, name, initials) {
|
|
42
42
|
.then(function (r) { return r.data; });
|
43
43
|
};
|
44
44
|
|
45
|
-
const verdocsSignCss = "verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign .intro{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;color:#111111;font-size:18px;font-weight:500;line-height:28px;-ms-flex-direction:row;flex-direction:row;background:#ffffff}verdocs-sign .intro .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;z-index:999;position:absolute;background:rgba(0, 0, 0, 0.5)}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .agree{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0 15px}verdocs-sign .agree .intro{display:none}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;white-space:nowrap;text-overflow:ellipsis}";
|
45
|
+
const verdocsSignCss = "verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign .intro{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;color:#111111;font-size:18px;font-weight:500;line-height:28px;-ms-flex-direction:row;flex-direction:row;background:#ffffff}verdocs-sign .intro .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;z-index:999;position:absolute;background:rgba(0, 0, 0, 0.5)}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .agree{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0 15px}verdocs-sign .agree .intro{display:none}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}";
|
46
46
|
|
47
47
|
const inProgressMenuOptions = [
|
48
48
|
{ id: 'later', label: 'Finish Later' },
|
@@ -75,6 +75,7 @@ const VerdocsSign = class {
|
|
75
75
|
this.hasSignature = false;
|
76
76
|
this.nextButtonLabel = 'Start';
|
77
77
|
this.nextSubmits = false;
|
78
|
+
this.showSubmitDialog = false;
|
78
79
|
this.errorMessage = '';
|
79
80
|
this.focusedField = '';
|
80
81
|
this.submitting = false;
|
@@ -375,7 +376,10 @@ const VerdocsSign = class {
|
|
375
376
|
const invalidFields = this.recipient.fields.filter(field => !this.isFieldValid(field));
|
376
377
|
if (invalidFields.length < 1) {
|
377
378
|
this.nextButtonLabel = 'Finish';
|
378
|
-
this.nextSubmits
|
379
|
+
if (!this.nextSubmits) {
|
380
|
+
this.showSubmitDialog = true;
|
381
|
+
this.nextSubmits = true;
|
382
|
+
}
|
379
383
|
}
|
380
384
|
else {
|
381
385
|
console.log('[SIGN] Remaining invalid fields', invalidFields);
|
@@ -453,7 +457,7 @@ const VerdocsSign = class {
|
|
453
457
|
this.isDone = true;
|
454
458
|
} })), this.submitting && (h("div", { class: "loading-indicator" }, h("verdocs-loader", null)))));
|
455
459
|
}
|
456
|
-
return (h(Host, { class: { agreed: this.agreed } }, !this.finishLater && (h("div", { class: "intro" }, h("div", { class: "inner" }, "Please review and act on these documents."))), h("div", { id: "verdocs-sign-header" }, h("div", { class: "inner" }, !this.agreed ? (h("div", { class: "agree" }, h("verdocs-checkbox", { name: "agree", label: "I agree to use electronic records and signatures.", onInput: () => this.handleClickAgree() }))) : (h(Fragment, null, h("img", { src: "https://verdocs.com/assets/white-logo.svg", alt: "Verdocs Logo", class: "logo" }), h("div", { class: "title" }, this.envelope.name), h("div", { style: { flex: '1' } }))), !this.finishLater && h("verdocs-button", { size: "small", label: this.nextButtonLabel, disabled: !this.agreed, onClick: () => this.handleNext() }), h("div", { style: { marginLeft: '10px' } }), h("verdocs-dropdown", { options: !this.isDone && !this.finishLater ? inProgressMenuOptions : doneMenuOptions, onOptionSelected: e => this.handleOptionSelected(e) }))), !this.agreed ? h("div", { class: "cover" }) : h("div", { style: { display: 'none' } }), h("div", { class: "document", style: { paddingTop: this.headerTargetId ? '70px' : '15px' } }, (this.envelope.documents || []).map(envelopeDocument => {
|
460
|
+
return (h(Host, { class: { agreed: this.agreed } }, !this.agreed && !this.finishLater && (h("div", { class: "intro" }, h("div", { class: "inner" }, "Please review and act on these documents."))), h("div", { id: "verdocs-sign-header" }, h("div", { class: "inner" }, !this.agreed ? (h("div", { class: "agree" }, h("verdocs-checkbox", { name: "agree", label: "I agree to use electronic records and signatures.", onInput: () => this.handleClickAgree() }))) : (h(Fragment, null, h("img", { src: "https://verdocs.com/assets/white-logo.svg", alt: "Verdocs Logo", class: "logo" }), h("div", { class: "title" }, this.envelope.name), h("div", { style: { flex: '1' } }))), !this.finishLater && h("verdocs-button", { size: "small", label: this.nextButtonLabel, disabled: !this.agreed, onClick: () => this.handleNext() }), h("div", { style: { marginLeft: '10px' } }), h("verdocs-dropdown", { options: !this.isDone && !this.finishLater ? inProgressMenuOptions : doneMenuOptions, onOptionSelected: e => this.handleOptionSelected(e) }))), !this.agreed ? h("div", { class: "cover" }) : h("div", { style: { display: 'none' } }), h("div", { class: "document", style: { paddingTop: this.headerTargetId ? '70px' : '15px' } }, (this.envelope.documents || []).map(envelopeDocument => {
|
457
461
|
const pageNumbers = integerSequence(1, envelopeDocument.page_numbers);
|
458
462
|
return (h(Fragment, null, pageNumbers.map(pageNumber => {
|
459
463
|
// In signing mode we show the original template page with all the recipient fields so we can show source formatting and
|
@@ -472,6 +476,11 @@ const VerdocsSign = class {
|
|
472
476
|
})), this.showFinishLater && (h("verdocs-ok-dialog", { heading: "You've saved your document to finish later.", message: `To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`, onNext: () => (this.showFinishLater = false) })), this.errorMessage && h("verdocs-ok-dialog", { heading: "Network Error", message: this.errorMessage, onNext: () => (this.errorMessage = '') }), this.showDone && (h("verdocs-ok-dialog", { heading: "You're Done!", message: `You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`, onNext: () => {
|
473
477
|
this.showDone = false;
|
474
478
|
this.isDone = true;
|
479
|
+
} })), this.showSubmitDialog && (h("verdocs-ok-dialog", { heading: "Ready to Submit?", message: `All required fields have been completed.<br />Are you ready to submit this document?`, showCancel: true, onExit: () => {
|
480
|
+
this.showSubmitDialog = false;
|
481
|
+
}, onNext: () => {
|
482
|
+
this.showSubmitDialog = false;
|
483
|
+
return this.handleNext();
|
475
484
|
} })), this.submitting && (h("div", { class: "loading-indicator" }, h("verdocs-loader", null)))));
|
476
485
|
}
|
477
486
|
};
|
@@ -0,0 +1,231 @@
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-151c0874.js';
|
2
|
+
import './Types-5f31149e.js';
|
3
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-e447b318.js';
|
4
|
+
import { c as createTemplateDocument, d as deleteTemplateDocument } from './TemplateDocuments-6fd2f4e2.js';
|
5
|
+
import { D as DocIcon, P as PngIcon, J as JpgIcon, a as PdfIcon, F as FileIcon$1, b as PageCountIcon, T as TrashIcon } from './Icons-c29eb0fa.js';
|
6
|
+
import { g as getTemplateStore } from './TemplateStore-17700116.js';
|
7
|
+
import { S as SDKError } from './errors-9b5498c8.js';
|
8
|
+
import { c as createTemplate } from './Templates-f90883f7.js';
|
9
|
+
import './index-38d7bc0b.js';
|
10
|
+
|
11
|
+
const verdocsTemplateAttachmentsCss = "verdocs-template-attachments{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#46497d}verdocs-template-attachments .attachments{margin:0 0 40px 0}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 0;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#33364b}verdocs-template-attachments .attachment:hover .trash-icon{display:-ms-flexbox;display:flex}verdocs-template-attachments .attachment:hover .pages{display:none}verdocs-template-attachments svg{width:28px;height:28px;fill:#5c6575;margin:2px 0 0 0}verdocs-template-attachments .file-icon{-ms-flex:0;flex:0}verdocs-template-attachments .pages{width:24px;height:24px;-ms-flex:0 0 24px;flex:0 0 24px;padding-left:4px;position:relative;margin:-10px 0 0 0}verdocs-template-attachments .pages .pages-icon{top:0;left:0;width:24px;height:24px;position:absolute}verdocs-template-attachments .pages .count{top:11px;left:7px;z-index:1;width:18px;font-size:12px;font-weight:500;position:absolute;text-align:center;letter-spacing:-2px}verdocs-template-attachments .filename{-ms-flex:1;flex:1;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-bottom:1px dotted #cccccc}verdocs-template-attachments .trash-icon{-ms-flex:0;flex:0;display:none}verdocs-template-attachments .trash-icon:hover{cursor:pointer}verdocs-template-attachments verdocs-file-chooser{margin:10px 0;border:2px dashed #979797}verdocs-template-attachments .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .progress-wrapper{padding:20px}verdocs-template-attachments .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-attachments ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-moz-placeholder{color:#aaaaaa}verdocs-template-attachments :-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::placeholder{color:#aaaaaa}";
|
12
|
+
|
13
|
+
const VerdocsTemplateAttachments = class {
|
14
|
+
constructor(hostRef) {
|
15
|
+
registerInstance(this, hostRef);
|
16
|
+
this.exit = createEvent(this, "exit", 7);
|
17
|
+
this.next = createEvent(this, "next", 7);
|
18
|
+
this.templateUpdate = createEvent(this, "templateUpdate", 7);
|
19
|
+
this.sdkError = createEvent(this, "sdkError", 7);
|
20
|
+
this.endpoint = VerdocsEndpoint.getDefault();
|
21
|
+
this.templateId = '';
|
22
|
+
this.uploading = false;
|
23
|
+
this.progressLabel = 'Uploading...';
|
24
|
+
this.progressPercent = 0;
|
25
|
+
this.showDeleteError = false;
|
26
|
+
this.confirmDeleteDocument = null;
|
27
|
+
this.store = null;
|
28
|
+
}
|
29
|
+
async componentWillLoad() {
|
30
|
+
var _a, _b, _c;
|
31
|
+
try {
|
32
|
+
this.endpoint.loadSession();
|
33
|
+
if (!this.templateId) {
|
34
|
+
console.log(`[ROLES] Missing required template ID ${this.templateId}`);
|
35
|
+
return;
|
36
|
+
}
|
37
|
+
if (!this.endpoint.session) {
|
38
|
+
console.log('[ROLES] Unable to start builder session, must be authenticated');
|
39
|
+
return;
|
40
|
+
}
|
41
|
+
this.store = await getTemplateStore(this.endpoint, this.templateId, false);
|
42
|
+
}
|
43
|
+
catch (e) {
|
44
|
+
console.log('[TEMPLATE ATTACHMENTS] Error loading template', e);
|
45
|
+
(_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(new SDKError(e.message, (_b = e.response) === null || _b === void 0 ? void 0 : _b.status, (_c = e.response) === null || _c === void 0 ? void 0 : _c.data));
|
46
|
+
}
|
47
|
+
}
|
48
|
+
handleCancel(e) {
|
49
|
+
e.stopPropagation();
|
50
|
+
this.exit.emit();
|
51
|
+
}
|
52
|
+
handleUploadProgress(percent) {
|
53
|
+
if (percent >= 99) {
|
54
|
+
this.progressPercent = 100;
|
55
|
+
this.progressLabel = 'Processing...';
|
56
|
+
}
|
57
|
+
else {
|
58
|
+
this.progressPercent = percent;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
async handleUpload(e) {
|
62
|
+
var _a, _b, _c;
|
63
|
+
e.stopPropagation();
|
64
|
+
const file = e.detail.file;
|
65
|
+
if (!file) {
|
66
|
+
return;
|
67
|
+
}
|
68
|
+
console.log('[ATTACHMENTS] Uploading...', file);
|
69
|
+
this.uploading = true;
|
70
|
+
this.progressLabel = 'Uploading...';
|
71
|
+
try {
|
72
|
+
const template = await createTemplateDocument(this.endpoint, this.templateId, file, this.handleUploadProgress.bind(this));
|
73
|
+
console.log('[ATTACHMENTS] Created attachment', template);
|
74
|
+
this.store = await getTemplateStore(this.endpoint, this.templateId, true);
|
75
|
+
console.log('[ATTACHMENTS] New template', this.store.state);
|
76
|
+
this.uploading = false;
|
77
|
+
this.progressLabel = '';
|
78
|
+
this.progressPercent = 0;
|
79
|
+
}
|
80
|
+
catch (e) {
|
81
|
+
console.log('[ATTACHMENTS] Error creating template', e);
|
82
|
+
(_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(new SDKError(e.message, (_b = e.response) === null || _b === void 0 ? void 0 : _b.status, (_c = e.response) === null || _c === void 0 ? void 0 : _c.data));
|
83
|
+
this.uploading = false;
|
84
|
+
}
|
85
|
+
}
|
86
|
+
handleNext(e) {
|
87
|
+
var _a;
|
88
|
+
e.stopPropagation();
|
89
|
+
this.uploading = false;
|
90
|
+
this.progressLabel = '';
|
91
|
+
this.progressPercent = 0;
|
92
|
+
(_a = this.next) === null || _a === void 0 ? void 0 : _a.emit({ template: this.store.state });
|
93
|
+
}
|
94
|
+
async confirmDelete() {
|
95
|
+
await deleteTemplateDocument(this.endpoint, this.templateId, this.confirmDeleteDocument.id);
|
96
|
+
this.store = await getTemplateStore(this.endpoint, this.templateId, true);
|
97
|
+
console.log('[ATTACHMENTS] New template', this.store.state);
|
98
|
+
this.confirmDeleteDocument = null;
|
99
|
+
}
|
100
|
+
async handleDelete(document) {
|
101
|
+
var _a;
|
102
|
+
if (((_a = this.store.state) === null || _a === void 0 ? void 0 : _a.template_documents.length) > 1) {
|
103
|
+
this.confirmDeleteDocument = document;
|
104
|
+
}
|
105
|
+
else {
|
106
|
+
this.showDeleteError = true;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
getFileIcon(document) {
|
110
|
+
switch (document.mime) {
|
111
|
+
case 'application/pdf':
|
112
|
+
return PdfIcon;
|
113
|
+
case 'image/jpeg':
|
114
|
+
return JpgIcon;
|
115
|
+
case 'image/png':
|
116
|
+
return PngIcon;
|
117
|
+
case 'application/msword':
|
118
|
+
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
|
119
|
+
return DocIcon;
|
120
|
+
}
|
121
|
+
return FileIcon$1;
|
122
|
+
}
|
123
|
+
render() {
|
124
|
+
var _a, _b, _c;
|
125
|
+
if (!this.endpoint.session) {
|
126
|
+
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
127
|
+
}
|
128
|
+
const templateState = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state;
|
129
|
+
if (!templateState.isLoaded) {
|
130
|
+
return (h(Host, { class: "loading" }, h("verdocs-loader", null)));
|
131
|
+
}
|
132
|
+
// This is meant to be a companion for larger visual experiences so we just go blank on errors for now.
|
133
|
+
if (!this.endpoint.session || !templateState.profile_id) {
|
134
|
+
return h(Host, { class: "empty" });
|
135
|
+
}
|
136
|
+
return (h(Host, null, h("h5", null, "Existing Attachments"), h("div", { class: "attachments" }, (_b = this.store) === null || _b === void 0 ? void 0 : _b.state.template_documents.map(document => (h("div", { class: "attachment" }, h("div", { class: "file-icon", innerHTML: this.getFileIcon(document) }), h("div", { class: "filename", title: document.name }, document.name), h("div", { class: "pages" }, h("div", { class: "count" }, document.page_numbers), h("div", { class: "pages-icon", innerHTML: PageCountIcon })), h("div", { class: "trash-icon", innerHTML: TrashIcon, onClick: () => this.handleDelete(document) }))))), h("h5", null, "Attach a New Document"), this.uploading ? (h("div", { class: "loader-wrapper" }, h("verdocs-loader", null), this.progressLabel && (h("div", { class: "progress-wrapper" }, h("verdocs-progress-bar", { showPercent: true, percent: this.progressPercent, label: this.progressLabel }))))) : (h("verdocs-file-chooser", { onFileSelected: e => this.handleUpload(e) })), h("div", { class: "buttons" }, h("verdocs-button", { variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e), disabled: this.uploading }), h("verdocs-button", { label: "Next", size: "small", onClick: e => this.handleNext(e), disabled: !((_c = this.store) === null || _c === void 0 ? void 0 : _c.state.template_documents.length) || this.uploading })), this.showDeleteError && (h("verdocs-ok-dialog", { heading: "Unable to Delete Attachment", message: "Templates must contain at least one attachment.", onNext: () => (this.showDeleteError = false) })), this.confirmDeleteDocument && (h("verdocs-ok-dialog", { heading: "Delete this Attachment?", message: "This operation cannot be undone. All fields placed<br />on the deleted attachment will also be removed.", onNext: () => this.confirmDelete(), showCancel: true, onExit: () => {
|
137
|
+
this.confirmDeleteDocument = null;
|
138
|
+
} }))));
|
139
|
+
}
|
140
|
+
};
|
141
|
+
VerdocsTemplateAttachments.style = verdocsTemplateAttachmentsCss;
|
142
|
+
|
143
|
+
const verdocsTemplateCreateCss = "verdocs-template-create{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box.drag-over{border:2px solid #4c56cb}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .progress-wrapper{padding:20px}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}";
|
144
|
+
|
145
|
+
const unicodeNBSP = ' ';
|
146
|
+
const FileIcon = '<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>';
|
147
|
+
const VerdocsTemplateCreate = class {
|
148
|
+
constructor(hostRef) {
|
149
|
+
registerInstance(this, hostRef);
|
150
|
+
this.exit = createEvent(this, "exit", 7);
|
151
|
+
this.next = createEvent(this, "next", 7);
|
152
|
+
this.sdkError = createEvent(this, "sdkError", 7);
|
153
|
+
this.endpoint = VerdocsEndpoint.getDefault();
|
154
|
+
this.file = undefined;
|
155
|
+
this.creating = false;
|
156
|
+
this.progressLabel = 'Uploading...';
|
157
|
+
this.progressPercent = 0;
|
158
|
+
}
|
159
|
+
componentWillLoad() {
|
160
|
+
this.endpoint.setTimeout(30000);
|
161
|
+
this.endpoint.loadSession();
|
162
|
+
}
|
163
|
+
handleFileChanged(e) {
|
164
|
+
var _a;
|
165
|
+
this.file = ((_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0]) || null;
|
166
|
+
console.log('[CREATE] Selected file', this.file);
|
167
|
+
// this.filePath = e.target.files?.[0]?.name;
|
168
|
+
}
|
169
|
+
handleUpload(e) {
|
170
|
+
e.stopPropagation();
|
171
|
+
const fileElem = document.getElementById('verdocs-template-create-file');
|
172
|
+
fileElem.click();
|
173
|
+
}
|
174
|
+
handleCancel(e) {
|
175
|
+
e.stopPropagation();
|
176
|
+
this.exit.emit();
|
177
|
+
}
|
178
|
+
async handleSubmit(e) {
|
179
|
+
var _a, _b, _c, _d;
|
180
|
+
e.stopPropagation();
|
181
|
+
console.log('Submitting');
|
182
|
+
// Should be true if we're here because onClick is only enabled then. We're just guarding this for Typescript.
|
183
|
+
if (!this.file) {
|
184
|
+
return;
|
185
|
+
}
|
186
|
+
this.creating = true;
|
187
|
+
this.progressLabel = 'Uploading...';
|
188
|
+
try {
|
189
|
+
const template = await createTemplate(this.endpoint, { name: this.file.name, documents: [this.file] }, percent => {
|
190
|
+
if (percent >= 99) {
|
191
|
+
this.progressLabel = 'Processing...';
|
192
|
+
this.progressPercent = 100;
|
193
|
+
}
|
194
|
+
else {
|
195
|
+
this.progressPercent = percent;
|
196
|
+
}
|
197
|
+
});
|
198
|
+
console.log('[CREATE] Created template', template);
|
199
|
+
(_a = this.next) === null || _a === void 0 ? void 0 : _a.emit(template);
|
200
|
+
this.creating = false;
|
201
|
+
this.progressLabel = '';
|
202
|
+
this.progressPercent = 0;
|
203
|
+
}
|
204
|
+
catch (e) {
|
205
|
+
console.log('[CREATE] Error creating template', e);
|
206
|
+
(_b = this.sdkError) === null || _b === void 0 ? void 0 : _b.emit(new SDKError(e.message, (_c = e.response) === null || _c === void 0 ? void 0 : _c.status, (_d = e.response) === null || _d === void 0 ? void 0 : _d.data));
|
207
|
+
this.creating = false;
|
208
|
+
}
|
209
|
+
}
|
210
|
+
render() {
|
211
|
+
if (!this.endpoint.session) {
|
212
|
+
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
213
|
+
}
|
214
|
+
return (h(Host, null, h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("input", { type: "file", id: "verdocs-template-create-file", multiple: true, accept: "application/pdf", style: { display: 'none' }, onChange: e => this.handleFileChanged(e) }), this.creating ? (h("div", { class: "loader-wrapper" }, h("verdocs-loader", null), this.progressLabel && (h("div", { class: "progress-wrapper" }, h("verdocs-progress-bar", { showPercent: true, percent: this.progressPercent, label: this.progressLabel }))))) : (h("div", { class: "upload-box", onDrop: (e) => {
|
215
|
+
e.preventDefault();
|
216
|
+
e.target.classList.remove('drag-over');
|
217
|
+
this.file = e.dataTransfer.files[0];
|
218
|
+
}, onDragOver: (e) => {
|
219
|
+
e.preventDefault();
|
220
|
+
e.dataTransfer.dropEffect = 'copy';
|
221
|
+
}, onDragEnter: (e) => e.target.classList.add('drag-over'), onDragLeave: (e) => e.target.classList.remove('drag-over') }, h("div", null, h("span", { innerHTML: FileIcon })), h("div", { style: { marginTop: '20px', fontSize: '20px', fontWeight: 'bold', overflowWrap: 'anywhere' } }, this.file ? this.file.name : 'Drag a file here'), h("div", { style: {
|
222
|
+
marginTop: '20px',
|
223
|
+
marginBottom: '20px',
|
224
|
+
fontSize: '16px',
|
225
|
+
height: '20px',
|
226
|
+
} }, this.file ? unicodeNBSP : 'Or, if you prefer...'), h("verdocs-button", { label: this.file ? 'Select a different file' : 'Select a file from your computer', size: "small", onClick: e => this.handleUpload(e) }))), h("div", { class: "buttons" }, h("verdocs-button", { variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e), disabled: this.creating }), h("verdocs-button", { label: "Next", size: "small", onClick: e => this.handleSubmit(e), disabled: !this.file || this.creating })))));
|
227
|
+
}
|
228
|
+
};
|
229
|
+
VerdocsTemplateCreate.style = verdocsTemplateCreateCss;
|
230
|
+
|
231
|
+
export { VerdocsTemplateAttachments as verdocs_template_attachments, VerdocsTemplateCreate as verdocs_template_create };
|
@@ -2,7 +2,8 @@ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement
|
|
2
2
|
import './Types-5f31149e.js';
|
3
3
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-e447b318.js';
|
4
4
|
import { g as getTemplateDocumentPageDisplayUri } from './TemplateDocuments-6fd2f4e2.js';
|
5
|
-
import { t as throttle } from './utils-
|
5
|
+
import { t as throttle } from './utils-51c8f6c7.js';
|
6
|
+
import { c as createPopper } from './popper-15e448b4.js';
|
6
7
|
import './_commonjsHelpers-5ec8f9b7.js';
|
7
8
|
import './Envelopes-290f96cc.js';
|
8
9
|
import './Files-70a192df.js';
|
@@ -99,4 +100,47 @@ const VerdocsTemplateDocumentPage = class {
|
|
99
100
|
};
|
100
101
|
VerdocsTemplateDocumentPage.style = verdocsTemplateDocumentPageCss;
|
101
102
|
|
102
|
-
|
103
|
+
const verdocsToolbarIconCss = "verdocs-toolbar-icon{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;display:inline-block}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:\"\";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}";
|
104
|
+
|
105
|
+
const VerdocsToolbarIcon = class {
|
106
|
+
constructor(hostRef) {
|
107
|
+
registerInstance(this, hostRef);
|
108
|
+
this.text = '';
|
109
|
+
this.icon = '';
|
110
|
+
this.placement = 'bottom';
|
111
|
+
this.containerId = `verdocs-toolbar-icon-${Math.random().toString(36).substring(2, 11)}`;
|
112
|
+
}
|
113
|
+
componentDidLoad() {
|
114
|
+
this.popperInstance = createPopper(this.iconEl, this.tooltip, {
|
115
|
+
placement: this.placement,
|
116
|
+
modifiers: this.placement === 'left' ? [{ name: 'offset', options: { offset: [0, 20] } }] : [],
|
117
|
+
});
|
118
|
+
// placement: 'top-end',
|
119
|
+
// modifiers: [{name: 'offset', options: {offset: [0, 10]}}],
|
120
|
+
// });
|
121
|
+
}
|
122
|
+
disconnectedCallback() {
|
123
|
+
if (this.popperInstance) {
|
124
|
+
this.popperInstance.destroy();
|
125
|
+
this.popperInstance = null;
|
126
|
+
}
|
127
|
+
}
|
128
|
+
show() {
|
129
|
+
var _a, _b;
|
130
|
+
(_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.setAttribute('data-show', '');
|
131
|
+
(_b = this.popperInstance) === null || _b === void 0 ? void 0 : _b.update().catch(() => { });
|
132
|
+
}
|
133
|
+
hide() {
|
134
|
+
var _a;
|
135
|
+
(_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.removeAttribute('data-show');
|
136
|
+
}
|
137
|
+
// handlePress() {
|
138
|
+
// this.press?.emit();
|
139
|
+
// }
|
140
|
+
render() {
|
141
|
+
return (h(Host, { class: {} }, h("div", { "aria-describedby": this.containerId, class: "icon", innerHTML: this.icon, onMouseEnter: () => this.show(), onFocus: () => this.show(), onMouseLeave: () => this.hide(), onBlur: () => this.hide(), ref: el => (this.iconEl = el) }), h("div", { id: this.containerId, role: "tooltip", class: "tooltip", "data-popper-placement": this.placement, ref: el => (this.tooltip = el) }, this.text, h("div", { "data-popper-arrow": "true", class: "arrow" }))));
|
142
|
+
}
|
143
|
+
};
|
144
|
+
VerdocsToolbarIcon.style = verdocsToolbarIconCss;
|
145
|
+
|
146
|
+
export { VerdocsTemplateDocumentPage as verdocs_template_document_page, VerdocsToolbarIcon as verdocs_toolbar_icon };
|