@verdocs/web-sdk 1.9.38 → 1.10.0
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/Envelopes-68058bbe.js +118 -0
- package/dist/cjs/{Envelopes-f2f8dd92.js → Envelopes-d30cba62.js} +2 -2
- package/dist/cjs/{VerdocsEndpoint-257ebdb3.js → VerdocsEndpoint-38feb32a.js} +57 -25
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-0ec89d7d.js → utils-712ba3ec.js} +20 -115
- package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-build.cjs.entry.js +4 -1
- package/dist/cjs/{verdocs-button-panel_3.cjs.entry.js → verdocs-button-panel_2.cjs.entry.js} +0 -19
- package/dist/cjs/verdocs-component-error.cjs.entry.js +20 -0
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-document-page_2.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-dropdown.cjs.entry.js +1 -0
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +221 -0
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-date.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-field-signature.cjs.entry.js +70 -0
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-floating-menu_2.cjs.entry.js +151 -0
- package/dist/cjs/verdocs-preview.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-send.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-sign.cjs.entry.js +24 -23
- package/dist/cjs/{verdocs-field-signature_3.cjs.entry.js → verdocs-signature-dialog.cjs.entry.js} +0 -104
- package/dist/cjs/verdocs-template-create_4.cjs.entry.js +153 -37
- package/dist/cjs/verdocs-text-input.cjs.entry.js +25 -0
- package/dist/cjs/verdocs-view.cjs.entry.js +4 -3
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/controls/verdocs-dropdown/verdocs-dropdown.js +1 -0
- package/dist/collection/components/controls/verdocs-floating-menu/verdocs-floating-menu.css +91 -0
- package/dist/collection/components/controls/verdocs-floating-menu/verdocs-floating-menu.js +158 -0
- package/dist/collection/components/controls/verdocs-floating-menu/verdocs-floating-menu.stories.js +49 -0
- package/dist/collection/components/controls/verdocs-toolbar-icon/verdocs-toolbar-icon.css +8 -1
- package/dist/collection/components/controls/verdocs-toolbar-icon/verdocs-toolbar-icon.js +29 -2
- package/dist/collection/components/elements/verdocs-component-error/verdocs-component-error.css +16 -0
- package/dist/collection/components/elements/verdocs-component-error/verdocs-component-error.js +46 -0
- package/dist/collection/components/elements/verdocs-document-page/verdocs-document-page.js +1 -1
- package/dist/collection/components/elements/verdocs-envelope-sidebar/verdocs-envelope-sidebar.css +159 -0
- package/dist/collection/components/elements/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +299 -0
- package/dist/collection/components/elements/verdocs-envelope-sidebar/verdocs-envelope-sidebar.stories.js +12 -0
- package/dist/collection/components/elements/verdocs-field-radio-button-group/verdocs-field-radio-button.css +2 -2
- package/dist/collection/components/elements/verdocs-field-textbox/verdocs-field-textbox.css +2 -3
- package/dist/collection/components/elements/verdocs-template-create/verdocs-template-create.js +7 -2
- package/dist/collection/components/elements/verdocs-template-fields/verdocs-template-fields.css +34 -41
- package/dist/collection/components/elements/verdocs-template-fields/verdocs-template-fields.js +128 -34
- package/dist/collection/components/elements/verdocs-template-properties/verdocs-template-properties.js +4 -1
- package/dist/collection/components/elements/verdocs-template-recipients/verdocs-template-recipients.js +1 -0
- package/dist/collection/components/embeds/verdocs-build/verdocs-build.js +3 -0
- package/dist/collection/utils/utils.js +16 -0
- package/dist/components/Envelopes.js +69 -0
- package/dist/components/Envelopes2.js +111 -0
- package/dist/components/VerdocsEndpoint.js +57 -25
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +3 -0
- package/dist/components/utils.js +18 -110
- package/dist/components/verdocs-build.js +19 -28
- package/dist/components/verdocs-component-error.d.ts +11 -0
- package/dist/components/verdocs-component-error.js +6 -0
- package/dist/components/verdocs-component-error2.js +33 -0
- package/dist/components/verdocs-document-page2.js +1 -1
- package/dist/components/verdocs-dropdown2.js +1 -0
- package/dist/components/verdocs-envelope-sidebar.d.ts +11 -0
- package/dist/components/verdocs-envelope-sidebar.js +242 -0
- package/dist/components/verdocs-field-radio-button.js +1 -1
- package/dist/components/verdocs-field-signature.js +116 -1
- package/dist/components/verdocs-field-textbox.js +1 -1
- package/dist/components/verdocs-floating-menu.d.ts +11 -0
- package/dist/components/verdocs-floating-menu.js +6 -0
- package/dist/components/verdocs-floating-menu2.js +125 -0
- package/dist/components/verdocs-search-activity2.js +1 -1
- package/dist/components/verdocs-sign.js +5 -3
- package/dist/components/verdocs-template-create2.js +15 -4
- package/dist/components/verdocs-template-fields2.js +152 -69
- package/dist/components/verdocs-template-properties2.js +14 -5
- package/dist/components/verdocs-template-recipients2.js +1 -0
- package/dist/components/verdocs-toolbar-icon2.js +8 -3
- package/dist/components/verdocs-view2.js +3 -68
- package/dist/docs.json +281 -36
- package/dist/esm/Envelopes-130fd6ea.js +111 -0
- package/dist/esm/{Envelopes-779de57c.js → Envelopes-6982dfc6.js} +1 -1
- package/dist/esm/{VerdocsEndpoint-28ba21cc.js → VerdocsEndpoint-6df32d3a.js} +57 -25
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-06d58b15.js → utils-3d95c588.js} +18 -110
- package/dist/esm/verdocs-auth.entry.js +1 -1
- package/dist/esm/verdocs-build.entry.js +4 -1
- package/dist/esm/{verdocs-button-panel_3.entry.js → verdocs-button-panel_2.entry.js} +1 -19
- package/dist/esm/verdocs-component-error.entry.js +16 -0
- package/dist/esm/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm/verdocs-document-page_2.entry.js +3 -2
- package/dist/esm/verdocs-dropdown.entry.js +1 -0
- package/dist/esm/verdocs-envelope-sidebar.entry.js +217 -0
- package/dist/esm/verdocs-field-checkbox.entry.js +2 -1
- package/dist/esm/verdocs-field-date.entry.js +2 -1
- package/dist/esm/verdocs-field-dropdown.entry.js +2 -1
- package/dist/esm/verdocs-field-initial.entry.js +2 -1
- package/dist/esm/verdocs-field-payment.entry.js +2 -1
- package/dist/esm/verdocs-field-radio-button.entry.js +3 -2
- package/dist/{components/verdocs-field-signature2.js → esm/verdocs-field-signature.entry.js} +12 -64
- package/dist/esm/verdocs-field-textarea.entry.js +2 -1
- package/dist/esm/verdocs-field-textbox.entry.js +3 -2
- package/dist/esm/verdocs-field-timestamp.entry.js +2 -1
- package/dist/esm/verdocs-floating-menu_2.entry.js +146 -0
- package/dist/esm/verdocs-preview.entry.js +3 -2
- package/dist/esm/verdocs-quick-functions_3.entry.js +2 -2
- package/dist/esm/verdocs-search.entry.js +1 -1
- package/dist/esm/verdocs-send.entry.js +3 -2
- package/dist/esm/verdocs-sign.entry.js +5 -4
- package/dist/esm/{verdocs-field-signature_3.entry.js → verdocs-signature-dialog.entry.js} +1 -103
- package/dist/esm/verdocs-template-create_4.entry.js +153 -37
- package/dist/esm/verdocs-text-input.entry.js +21 -0
- package/dist/esm/verdocs-view.entry.js +4 -3
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/Envelopes-130fd6ea.js +1 -0
- package/dist/esm-es5/Envelopes-6982dfc6.js +1 -0
- package/dist/esm-es5/VerdocsEndpoint-6df32d3a.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/utils-3d95c588.js +1 -0
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/{verdocs-button-panel_3.entry.js → verdocs-button-panel_2.entry.js} +1 -1
- package/dist/esm-es5/verdocs-component-error.entry.js +1 -0
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-document-page_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-dropdown.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -0
- 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 -0
- 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-floating-menu_2.entry.js +1 -0
- package/dist/esm-es5/verdocs-preview.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-search.entry.js +1 -1
- 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-signature-dialog.entry.js +1 -0
- package/dist/esm-es5/verdocs-template-create_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-text-input.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/controls/verdocs-floating-menu/verdocs-floating-menu.d.ts +31 -0
- package/dist/types/components/controls/verdocs-floating-menu/verdocs-floating-menu.stories.d.ts +7 -0
- package/dist/types/components/controls/verdocs-toolbar-icon/verdocs-toolbar-icon.d.ts +5 -0
- package/dist/types/components/elements/verdocs-component-error/verdocs-component-error.d.ts +10 -0
- package/dist/types/components/elements/verdocs-envelope-sidebar/verdocs-envelope-sidebar.d.ts +39 -0
- package/dist/types/components/elements/verdocs-envelope-sidebar/verdocs-envelope-sidebar.stories.d.ts +6 -0
- package/dist/types/components/elements/verdocs-template-fields/verdocs-template-fields.d.ts +14 -3
- package/dist/types/components.d.ts +97 -0
- package/dist/types/utils/Types.d.ts +0 -1
- package/dist/types/utils/utils.d.ts +2 -2
- package/dist/verdocs-web-sdk/p-03833051.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-0eb992eb.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-0a33398a.entry.js → p-17fd7860.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-18cf7ea1.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-1be43032.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-1ef0501b.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-23033619.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-89f25d01.entry.js → p-266e163c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ddda809b.system.js → p-2d687108.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-2e4dfdc6.js +1 -0
- package/dist/verdocs-web-sdk/p-328453a9.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3599f81f.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3dbf8bec.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3dcd05aa.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-aa3a42a4.system.entry.js → p-45ac2230.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5597170d.system.entry.js → p-46bb5543.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4490a384.system.entry.js → p-47dfcf69.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-50f82ed8.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-5b114f68.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-5b8dbf0b.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-5c7ef99f.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-14c69e28.system.entry.js → p-5d220e75.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-621c7079.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-644cc3c3.js +1 -0
- package/dist/verdocs-web-sdk/{p-72b4fa6b.entry.js → p-6b205bb5.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-787a334a.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-7b357e1a.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-7b66bc0d.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-804fbf15.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-838d889b.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-a42a5853.system.entry.js → p-86a8b6ad.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-880b619d.js +1 -0
- package/dist/verdocs-web-sdk/{p-2d36b5a3.entry.js → p-8a2dbb48.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-8f50fd8e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-8f873d8e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-90a92236.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-938a7d4e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-95016ea1.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-a140f6f9.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-a1412c61.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-a32f90e9.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-a4dc6a79.system.js +1 -0
- package/dist/verdocs-web-sdk/p-aba1f14b.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-123572b9.entry.js → p-ae3b30c6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ba6c3671.system.entry.js → p-b505db92.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-b5c21eda.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-b8faf8b8.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-ba23b639.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-c16b6ca4.system.js +1 -1
- package/dist/verdocs-web-sdk/p-c3ba021b.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-4f72d7e9.js → p-c4deb4b7.js} +1 -1
- package/dist/verdocs-web-sdk/p-c6370ca8.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-ce442d55.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d0c587f1.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d30ee967.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d36ae684.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d6d95682.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d7e31573.system.js +1 -0
- package/dist/verdocs-web-sdk/p-d946b1b6.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d9ff093e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-e0cfad01.system.js +1 -0
- package/dist/verdocs-web-sdk/p-eb68cf29.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-ec7a9c6e.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-f43721cf.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-ff45cca0.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +15 -15
- package/dist/esm-es5/Envelopes-779de57c.js +0 -1
- package/dist/esm-es5/VerdocsEndpoint-28ba21cc.js +0 -1
- package/dist/esm-es5/utils-06d58b15.js +0 -1
- package/dist/esm-es5/verdocs-field-signature_3.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-0315f91f.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-0592cb20.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-0b67a5f1.system.js +0 -1
- package/dist/verdocs-web-sdk/p-16fe44ba.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-17136749.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-1cc4f8c2.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-24b9c1a3.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2c776579.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-34bed726.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-34e3df55.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-3ee11027.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-41b71077.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-427524bd.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4814e58e.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-49d804da.js +0 -1
- package/dist/verdocs-web-sdk/p-57165db2.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5dec58c2.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5e67c42f.js +0 -1
- package/dist/verdocs-web-sdk/p-5faa7077.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-602a22c7.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6239f230.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-63a00853.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-69a32638.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6a75bbb5.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-787252e0.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7a6c829f.system.js +0 -1
- package/dist/verdocs-web-sdk/p-85f91c34.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-893553e7.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-93bf1041.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-99c2766b.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-9c595648.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a5698580.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ac4c1ad8.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b39a41fc.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ba02faae.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e9e18f1a.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ef845e9c.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f80f538d.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-fcf9e8f0.entry.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-f78d163d.js';
|
|
2
2
|
import './Types-ab9f6af8.js';
|
|
3
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-
|
|
3
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-6df32d3a.js';
|
|
4
4
|
import { a as getTemplates } from './Templates-0638b1e4.js';
|
|
5
5
|
import './Token-54690789.js';
|
|
6
6
|
|
|
@@ -26,7 +26,7 @@ var __generator = (undefined && undefined.__generator) || function (thisArg, bod
|
|
|
26
26
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
27
27
|
function step(op) {
|
|
28
28
|
if (f) throw new TypeError("Generator is already executing.");
|
|
29
|
-
while (_) try {
|
|
29
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
30
30
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
31
31
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
32
32
|
switch (op[0]) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-f78d163d.js';
|
|
2
2
|
import './Types-ab9f6af8.js';
|
|
3
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-
|
|
3
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-6df32d3a.js';
|
|
4
4
|
import './Token-54690789.js';
|
|
5
5
|
|
|
6
6
|
const verdocsSearchCss = "verdocs-search{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;display:-ms-flexbox;display:flex;background-color:#1e2031}verdocs-search search-box{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:20px 10px}verdocs-search .boxes{-ms-flex-wrap:wrap;flex-wrap:wrap;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:20px 0}verdocs-search search-recent,verdocs-search search-saved,verdocs-search search-quick-functions,verdocs-search search-starred{display:-ms-flexbox;display:flex;margin:0 20px 20px 0}";
|
|
@@ -3,9 +3,10 @@ import { g as getTemplate } from './Templates-0638b1e4.js';
|
|
|
3
3
|
import './Types-ab9f6af8.js';
|
|
4
4
|
import { i as isValidEmail, a as isValidPhone } from './Validators-f110bae2.js';
|
|
5
5
|
import { g as getRGBA } from './Colors-1b298092.js';
|
|
6
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-
|
|
7
|
-
import { a as getRoleIndex } from './utils-
|
|
6
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-6df32d3a.js';
|
|
7
|
+
import { a as getRoleIndex } from './utils-3d95c588.js';
|
|
8
8
|
import './Token-54690789.js';
|
|
9
|
+
import './Envelopes-130fd6ea.js';
|
|
9
10
|
import './Files-70a192df.js';
|
|
10
11
|
|
|
11
12
|
const verdocsSendCss = "verdocs-send{display:-ms-flexbox;display:flex;padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid #97979744}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:#00000089}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, F as Fragment } from './index-f78d163d.js';
|
|
2
|
-
import { b as getSigningSession,
|
|
2
|
+
import { b as getSigningSession, u as updateEnvelopeField, c as updateEnvelopeFieldSignature, d as updateEnvelopeFieldInitials } from './Envelopes-130fd6ea.js';
|
|
3
3
|
import './Types-ab9f6af8.js';
|
|
4
4
|
import { a as isValidPhone, i as isValidEmail } from './Validators-f110bae2.js';
|
|
5
5
|
import { f as fullNameToInitials } from './Primitives-054bc6e5.js';
|
|
6
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-
|
|
7
|
-
import {
|
|
6
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-6df32d3a.js';
|
|
7
|
+
import { s as savePDF, u as updateDocumentFieldValue, a as getRoleIndex, r as renderDocumentField, b as getFieldId } from './utils-3d95c588.js';
|
|
8
|
+
import { g as getEnvelopeById, s as state } from './Envelopes-6982dfc6.js';
|
|
8
9
|
import { S as SDKError } from './errors-9b5498c8.js';
|
|
9
10
|
import './Token-54690789.js';
|
|
10
11
|
import './Files-70a192df.js';
|
|
@@ -26,7 +27,7 @@ var __generator = (undefined && undefined.__generator) || function (thisArg, bod
|
|
|
26
27
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
27
28
|
function step(op) {
|
|
28
29
|
if (f) throw new TypeError("Generator is already executing.");
|
|
29
|
-
while (_) try {
|
|
30
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
30
31
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
31
32
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
32
33
|
switch (op[0]) {
|
|
@@ -1,67 +1,4 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-f78d163d.js';
|
|
2
|
-
import { g as getRGBA } from './Colors-1b298092.js';
|
|
3
|
-
import { g as getFieldSettings } from './utils-06d58b15.js';
|
|
4
|
-
import { c as createPopper } from './popper-f860750c.js';
|
|
5
|
-
import './Token-54690789.js';
|
|
6
|
-
import './Files-70a192df.js';
|
|
7
|
-
|
|
8
|
-
const verdocsFieldSignatureCss = "verdocs-field-signature{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;width:83px;height:36px;display:block;font-size:11px;position:relative;letter-spacing:0.3px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-signature.disabled{opacity:0.5}verdocs-field-signature.done{border:none;opacity:1}verdocs-field-signature img{display:block;max-width:100%;max-height:100%}verdocs-field-signature button{-webkit-box-sizing:border-box;box-sizing:border-box;border:none;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-signature button.hide{display:none}verdocs-field-signature.required{border:1px solid #cc0000}verdocs-field-signature.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-signature verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-signature verdocs-button-panel[data-active],verdocs-field-signature verdocs-button-panel:hover{opacity:1}verdocs-field-signature verdocs-button-panel .icon svg{fill:#333333}verdocs-field-signature verdocs-button-panel .icon:hover svg{fill:#000000}";
|
|
9
|
-
|
|
10
|
-
const settingsIcon = '<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20"><path d="m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z"/></svg>';
|
|
11
|
-
const VerdocsFieldSignature = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
registerInstance(this, hostRef);
|
|
14
|
-
this.fieldChange = createEvent(this, "fieldChange", 7);
|
|
15
|
-
this.settingsPress = createEvent(this, "settingsPress", 7);
|
|
16
|
-
this.field = null;
|
|
17
|
-
this.name = '';
|
|
18
|
-
this.disabled = false;
|
|
19
|
-
this.editable = false;
|
|
20
|
-
this.moveable = false;
|
|
21
|
-
this.done = false;
|
|
22
|
-
this.roleindex = 0;
|
|
23
|
-
this.tempSignature = '';
|
|
24
|
-
}
|
|
25
|
-
async focusField() {
|
|
26
|
-
this.handleShow();
|
|
27
|
-
console.log('focused', this);
|
|
28
|
-
}
|
|
29
|
-
hideDialog() {
|
|
30
|
-
var _a;
|
|
31
|
-
(_a = this.dialog) === null || _a === void 0 ? void 0 : _a.remove();
|
|
32
|
-
this.dialog = null;
|
|
33
|
-
}
|
|
34
|
-
handleAdopt(e) {
|
|
35
|
-
var _a;
|
|
36
|
-
console.log('[SIGNATURE] Adopted signature');
|
|
37
|
-
this.tempSignature = e.detail;
|
|
38
|
-
(_a = this.fieldChange) === null || _a === void 0 ? void 0 : _a.emit(this.tempSignature);
|
|
39
|
-
this.hideDialog();
|
|
40
|
-
}
|
|
41
|
-
handleShow() {
|
|
42
|
-
this.dialog = document.createElement('verdocs-signature-dialog');
|
|
43
|
-
this.dialog.setAttribute('name', this.name);
|
|
44
|
-
this.dialog.setAttribute('roleindex', this.roleindex);
|
|
45
|
-
this.dialog.addEventListener('cancel', () => this.hideDialog());
|
|
46
|
-
this.dialog.addEventListener('next', e => this.handleAdopt(e));
|
|
47
|
-
document.body.append(this.dialog);
|
|
48
|
-
}
|
|
49
|
-
render() {
|
|
50
|
-
var _a, _b, _c;
|
|
51
|
-
const settings = getFieldSettings(this.field);
|
|
52
|
-
const value = settings.base64 || this.tempSignature;
|
|
53
|
-
const disabled = (_b = (_a = this.disabled) !== null && _a !== void 0 ? _a : settings.disabled) !== null && _b !== void 0 ? _b : false;
|
|
54
|
-
const backgroundColor = this.field['rgba'] || getRGBA(this.roleindex);
|
|
55
|
-
if (this.done) {
|
|
56
|
-
return h(Host, { class: { done: this.done } }, value && h("img", { src: value, alt: "Signature" }));
|
|
57
|
-
}
|
|
58
|
-
return (h(Host, { class: { required: (_c = this.field) === null || _c === void 0 ? void 0 : _c.required, disabled }, style: { backgroundColor } }, value ? h("img", { src: value, alt: "Signature" }) : h("button", { onClick: () => !disabled && this.handleShow() }, "Signature"), this.editable && (h("verdocs-button-panel", { icon: settingsIcon }, h("h6", null, "Field Settings"), h("form", null, h("verdocs-select-input", { label: "Recipient", options: [
|
|
59
|
-
{ label: 'Buyer', value: 'Buyer' },
|
|
60
|
-
{ label: 'Seller', value: 'Seller' },
|
|
61
|
-
] }), h("verdocs-text-input", { label: "Field Name", value: "", placeholder: "Stored field name...", onInput: e => console.log('ipt', e) }), h("verdocs-text-input", { label: "Placeholder", value: "", placeholder: "Placeholder text...", onInput: e => console.log('ipt', e) }))))));
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
VerdocsFieldSignature.style = verdocsFieldSignatureCss;
|
|
65
2
|
|
|
66
3
|
const verdocsSignatureDialogCss = "verdocs-signature-dialog{font-family:\"Barlow\", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-signature-dialog .dialog{width:100%;max-width:340px;border-radius:4px;overflow:hidden;-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);background:#f9f9f9}verdocs-signature-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:20px 20px 0 20px;line-height:28px;font-size:20px;font-weight:500}verdocs-signature-dialog .content{font-size:14px;padding:20px}verdocs-signature-dialog .buttons{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center}verdocs-signature-dialog .buttons verdocs-button{margin-left:16px}verdocs-signature-dialog canvas{background:#ffffff;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 auto;width:300px;height:79px;max-width:100%;-webkit-box-shadow:0 0 6px 0 #0000001f;box-shadow:0 0 6px 0 #0000001f}verdocs-signature-dialog .disclaimer{text-align:justify;padding:8px 0;font-size:11px;line-height:14px;color:rgba(0, 0, 0, 0.54)}verdocs-signature-dialog .as-shown{font-size:11px;margin:4px 0 20px 4px;color:rgba(0, 0, 0, 0.54)}verdocs-signature-dialog .tabs{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-signature-dialog .tabs .tab{padding:8px 15px;cursor:pointer}verdocs-signature-dialog .tabs .tab.active{border-bottom:2px solid #cccccc}verdocs-signature-dialog .tabs .tab:hover{color:#55bc81}";
|
|
67
4
|
|
|
@@ -283,43 +220,4 @@ const VerdocsSignatureDialog = class {
|
|
|
283
220
|
};
|
|
284
221
|
VerdocsSignatureDialog.style = verdocsSignatureDialogCss;
|
|
285
222
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
const VerdocsToolbarIcon = class {
|
|
289
|
-
constructor(hostRef) {
|
|
290
|
-
registerInstance(this, hostRef);
|
|
291
|
-
this.text = '';
|
|
292
|
-
this.icon = '';
|
|
293
|
-
this.containerId = `verdocs-toolbar-icon-${Math.random().toString(36).substring(2, 11)}`;
|
|
294
|
-
}
|
|
295
|
-
componentDidLoad() {
|
|
296
|
-
this.popperInstance = createPopper(this.iconEl, this.tooltip, {
|
|
297
|
-
// placement: 'top-end',
|
|
298
|
-
// modifiers: [{name: 'offset', options: {offset: [0, 10]}}],
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
disconnectedCallback() {
|
|
302
|
-
if (this.popperInstance) {
|
|
303
|
-
this.popperInstance.destroy();
|
|
304
|
-
this.popperInstance = null;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
show() {
|
|
308
|
-
var _a, _b;
|
|
309
|
-
(_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.setAttribute('data-show', '');
|
|
310
|
-
(_b = this.popperInstance) === null || _b === void 0 ? void 0 : _b.update().catch(() => { });
|
|
311
|
-
}
|
|
312
|
-
hide() {
|
|
313
|
-
var _a;
|
|
314
|
-
(_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.removeAttribute('data-show');
|
|
315
|
-
}
|
|
316
|
-
// handlePress() {
|
|
317
|
-
// this.press?.emit();
|
|
318
|
-
// }
|
|
319
|
-
render() {
|
|
320
|
-
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": "bottom", ref: el => (this.tooltip = el) }, this.text, h("div", { "data-popper-arrow": "true", class: "arrow" }))));
|
|
321
|
-
}
|
|
322
|
-
};
|
|
323
|
-
VerdocsToolbarIcon.style = verdocsToolbarIconCss;
|
|
324
|
-
|
|
325
|
-
export { VerdocsFieldSignature as verdocs_field_signature, VerdocsSignatureDialog as verdocs_signature_dialog, VerdocsToolbarIcon as verdocs_toolbar_icon };
|
|
223
|
+
export { VerdocsSignatureDialog as verdocs_signature_dialog };
|
|
@@ -1,17 +1,36 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, F as Fragment } from './index-f78d163d.js';
|
|
2
2
|
import { c as createTemplate, g as getTemplate } from './Templates-0638b1e4.js';
|
|
3
3
|
import { T as TemplateSenderTypes } from './Types-ab9f6af8.js';
|
|
4
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-
|
|
4
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-6df32d3a.js';
|
|
5
5
|
import { S as SDKError } from './errors-9b5498c8.js';
|
|
6
|
-
import {
|
|
7
|
-
import { r as renderDocumentField, a as getRoleIndex, i as updateCssTransform } from './utils-06d58b15.js';
|
|
6
|
+
import { a as getRoleIndex, r as renderDocumentField, c as updateCssTransform, d as defaultWidth, e as defaultHeight } from './utils-3d95c588.js';
|
|
8
7
|
import { s as state } from './templateStore-7b50460b.js';
|
|
9
8
|
import { l as loadTemplate } from './Templates-ad0e1ebe.js';
|
|
9
|
+
import { g as getRGBA } from './Colors-1b298092.js';
|
|
10
10
|
import './Token-54690789.js';
|
|
11
|
+
import './Envelopes-130fd6ea.js';
|
|
11
12
|
import './Files-70a192df.js';
|
|
12
13
|
import './index-fd7b8a34.js';
|
|
13
14
|
import './Primitives-054bc6e5.js';
|
|
14
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Add a field to a template.
|
|
18
|
+
*/
|
|
19
|
+
var createField = function (endpoint, templateId, params) {
|
|
20
|
+
return endpoint.api //
|
|
21
|
+
// curl -X POST 'https://api.verdocs.com/templates/d2338742-f3a1-465b-8592-806587413cc1/fields' \
|
|
22
|
+
.post("/templates/".concat(templateId, "/fields"), params)
|
|
23
|
+
.then(function (r) { return r.data; });
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Update a template field.
|
|
27
|
+
*/
|
|
28
|
+
var editField = function (endpoint, templateId, fieldName, params) {
|
|
29
|
+
return endpoint.api //
|
|
30
|
+
.put("/templates/".concat(templateId, "/fields/").concat(fieldName), params)
|
|
31
|
+
.then(function (r) { return r.data; });
|
|
32
|
+
};
|
|
33
|
+
|
|
15
34
|
/**
|
|
16
35
|
* A TemplateDocument represents a PDF or other attachment in a Template.
|
|
17
36
|
*
|
|
@@ -55,7 +74,9 @@ const VerdocsTemplateCreate = class {
|
|
|
55
74
|
this.endpoint = VerdocsEndpoint.getDefault();
|
|
56
75
|
this.file = undefined;
|
|
57
76
|
}
|
|
58
|
-
componentWillLoad() {
|
|
77
|
+
componentWillLoad() {
|
|
78
|
+
this.endpoint.loadSession();
|
|
79
|
+
}
|
|
59
80
|
handleFileChanged(e) {
|
|
60
81
|
var _a;
|
|
61
82
|
console.log('files', e.target.files);
|
|
@@ -100,6 +121,9 @@ const VerdocsTemplateCreate = class {
|
|
|
100
121
|
}
|
|
101
122
|
}
|
|
102
123
|
render() {
|
|
124
|
+
if (!this.endpoint.session) {
|
|
125
|
+
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
|
126
|
+
}
|
|
103
127
|
return (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) }), h("div", { class: "upload-box" }, h("div", null, h("span", { innerHTML: FileIcon })), h("div", { style: { marginTop: '20px', fontSize: '20px', fontWeight: 'bold' } }, "Drag a file here"), h("div", { style: { marginTop: '20px', marginBottom: '20px', fontSize: '16px' } }, "Or, if you prefer..."), h("verdocs-button", { label: "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) }), h("verdocs-button", { label: "Next", size: "small", onClick: e => this.handleSubmit(e), disabled: !this.file }))));
|
|
104
128
|
}
|
|
105
129
|
};
|
|
@@ -131,7 +155,7 @@ var interact_min = createCommonjsModule(function (module, exports) {
|
|
|
131
155
|
|
|
132
156
|
const interact = /*@__PURE__*/getDefaultExportFromCjs(interact_min);
|
|
133
157
|
|
|
134
|
-
const verdocsTemplateFieldsCss = "verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-template-fields .page-0{padding:65px 15px 0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .page-0 .user-placed-fields{height:100px;position:relative;background:#ffffff;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-fields .page-0 .user-placed-fields .title{top:0;left:0;color:#ffffff;font-size:12px;padding:3px 6px;font-weight:bold;position:absolute;background:#46497d}verdocs-template-fields .
|
|
158
|
+
const verdocsTemplateFieldsCss = "verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;position:relative}verdocs-template-fields .page-0{padding:65px 15px 0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .page-0 .user-placed-fields{height:100px;position:relative;background:#ffffff;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-fields .page-0 .user-placed-fields .title{top:0;left:0;color:#ffffff;font-size:12px;padding:3px 6px;font-weight:bold;position:absolute;background:#46497d}verdocs-template-fields .pages{display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-template-fields .pages div,verdocs-template-fields .pages canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields.placing-attachment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-checkbox{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-date{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-dropdown{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-timestamp{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}";
|
|
135
159
|
|
|
136
160
|
const iconSingleline = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>';
|
|
137
161
|
const iconMultiline = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z"/></svg>';
|
|
@@ -140,14 +164,31 @@ const iconRadio = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24
|
|
|
140
164
|
const iconDatepicker = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z"/></svg>';
|
|
141
165
|
const iconSignature = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';
|
|
142
166
|
const iconInitial = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>';
|
|
167
|
+
const menuOptions = [
|
|
168
|
+
{ id: 'attachment', tooltip: 'Attachment', icon: 'A' },
|
|
169
|
+
{ id: 'checkbox', tooltip: 'Check Box', icon: iconCheck },
|
|
170
|
+
{ id: 'date', tooltip: 'Date', icon: iconDatepicker },
|
|
171
|
+
{ id: 'dropdown', tooltip: 'Dropdown', icon: 'O' },
|
|
172
|
+
{ id: 'initial', tooltip: 'Initials', icon: iconInitial },
|
|
173
|
+
{ id: 'payment', tooltip: 'Payment', icon: 'P' },
|
|
174
|
+
{ id: 'radio', tooltip: 'Radio Button', icon: iconRadio },
|
|
175
|
+
{ id: 'signature', tooltip: 'Signature', icon: iconSignature },
|
|
176
|
+
{ id: 'textarea', tooltip: 'Text Area', icon: iconMultiline },
|
|
177
|
+
{ id: 'textbox', tooltip: 'Text Box', icon: iconSingleline },
|
|
178
|
+
{ id: 'timestamp', tooltip: 'Timestamp', icon: 'X' },
|
|
179
|
+
];
|
|
143
180
|
const VerdocsTemplateFields = class {
|
|
144
181
|
constructor(hostRef) {
|
|
145
182
|
registerInstance(this, hostRef);
|
|
146
183
|
this.next = createEvent(this, "next", 7);
|
|
147
184
|
this.cancel = createEvent(this, "cancel", 7);
|
|
148
185
|
this.sdkError = createEvent(this, "sdkError", 7);
|
|
186
|
+
this.pageHeights = {};
|
|
187
|
+
this.cachedPageInfo = {};
|
|
149
188
|
this.endpoint = VerdocsEndpoint.getDefault();
|
|
150
189
|
this.templateId = null;
|
|
190
|
+
this.placing = null;
|
|
191
|
+
this.selectedRoleName = '';
|
|
151
192
|
}
|
|
152
193
|
async componentWillLoad() {
|
|
153
194
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -157,9 +198,15 @@ const VerdocsTemplateFields = class {
|
|
|
157
198
|
console.log(`[FIELDS] Missing required template ID ${this.templateId}`);
|
|
158
199
|
return;
|
|
159
200
|
}
|
|
201
|
+
if (!this.endpoint.session) {
|
|
202
|
+
console.log('[BUILD] Unable to start builder session, must be authenticated');
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
160
205
|
try {
|
|
161
|
-
console.log(`[FIELDS] Loading template ${this.templateId}
|
|
206
|
+
console.log(`[FIELDS] Loading template ${this.templateId}`, this.endpoint.session);
|
|
162
207
|
await loadTemplate(this.endpoint, this.templateId);
|
|
208
|
+
this.selectedRoleName = state.roleNames[0];
|
|
209
|
+
console.log('Starting with role', this.selectedRoleName);
|
|
163
210
|
}
|
|
164
211
|
catch (e) {
|
|
165
212
|
console.log('[FIELDS] Error loading template', e);
|
|
@@ -172,30 +219,40 @@ const VerdocsTemplateFields = class {
|
|
|
172
219
|
}
|
|
173
220
|
}
|
|
174
221
|
componentDidRender() {
|
|
175
|
-
// console.log('rendered', this.page0El, this.toolbarEl);
|
|
176
|
-
// console.log('w', this.page0El.clientWidth);
|
|
177
|
-
// console.log('t', this.toolbarEl.clientWidth);
|
|
178
222
|
interact.dynamicDrop(true);
|
|
179
|
-
this.toolbarEl.style.width = `${this.page0El.clientWidth}px`;
|
|
180
223
|
}
|
|
181
224
|
async handleFieldChange(field, e, optionId) {
|
|
182
225
|
console.log('[FIELDS] handleFieldChange', field, e, optionId);
|
|
183
226
|
}
|
|
227
|
+
attachFieldAttributes(pageInfo, field, roleIndex, el) {
|
|
228
|
+
el.addEventListener('input', e => this.handleFieldChange(field, e));
|
|
229
|
+
el.setAttribute('roleindex', roleIndex);
|
|
230
|
+
el.setAttribute('pageNumber', pageInfo.pageNumber);
|
|
231
|
+
el.setAttribute('xScale', pageInfo.xScale);
|
|
232
|
+
el.setAttribute('yScale', pageInfo.yScale);
|
|
233
|
+
el.setAttribute('name', field.name);
|
|
234
|
+
}
|
|
184
235
|
handlePageRendered(e) {
|
|
185
236
|
const pageInfo = e.detail;
|
|
186
237
|
console.log('[FIELDS] Page rendered', pageInfo);
|
|
238
|
+
this.cachedPageInfo[pageInfo.pageNumber] = pageInfo;
|
|
239
|
+
this.pageHeights[pageInfo.pageNumber] = pageInfo.naturalHeight;
|
|
240
|
+
console.log('tsf', pageInfo.pageNumber, state.fields);
|
|
187
241
|
const fields = state.fields.filter(field => field.page_sequence === pageInfo.pageNumber);
|
|
188
242
|
// const fields = this.fields.filter(field => field.page_sequence === pageInfo.renderedPage.pageNumber);
|
|
189
243
|
console.log('[FIELDS] Fields on page', fields);
|
|
190
244
|
fields.forEach(field => {
|
|
191
|
-
const
|
|
245
|
+
const roleIndex = getRoleIndex(state.roleNames, field.role_name);
|
|
246
|
+
const el = renderDocumentField(field, pageInfo, roleIndex, { disabled: true, editable: true, draggable: true });
|
|
192
247
|
if (!el) {
|
|
193
248
|
return;
|
|
194
249
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
250
|
+
if (Array.isArray(el)) {
|
|
251
|
+
el.map(e => this.attachFieldAttributes(pageInfo, field, roleIndex, e));
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
this.attachFieldAttributes(pageInfo, field, roleIndex, el);
|
|
255
|
+
}
|
|
199
256
|
interact(el).draggable({
|
|
200
257
|
listeners: {
|
|
201
258
|
start(event) {
|
|
@@ -212,42 +269,97 @@ const VerdocsTemplateFields = class {
|
|
|
212
269
|
event.target.setAttribute('posy', newY);
|
|
213
270
|
updateCssTransform(event.target, 'translate', `${newX}px, ${newY}px`);
|
|
214
271
|
},
|
|
215
|
-
end(
|
|
216
|
-
console.log('[FIELDS] Drag ended', event);
|
|
217
|
-
// event.target.setAttribute('posX', 0);
|
|
218
|
-
// event.target.setAttribute('posy', 0);
|
|
219
|
-
// updateCssTransform(event.target, 'translate', `${0}px, ${0}px`);
|
|
220
|
-
},
|
|
272
|
+
end: this.handleMoveField.bind(this),
|
|
221
273
|
},
|
|
222
274
|
});
|
|
223
275
|
});
|
|
224
276
|
}
|
|
277
|
+
async handleMoveField(e) {
|
|
278
|
+
const pageNumber = e.target.getAttribute('pageNumber');
|
|
279
|
+
const { naturalWidth = 612, naturalHeight = 792, renderedHeight = 792 } = this.cachedPageInfo[pageNumber];
|
|
280
|
+
console.log('[FIELDS] Drag ended', pageNumber, e.target);
|
|
281
|
+
const clientRect = e.target.getBoundingClientRect();
|
|
282
|
+
const parent = e.target.parentElement;
|
|
283
|
+
const parentRect = parent.getBoundingClientRect();
|
|
284
|
+
// These two being backwards is not a mistake. Left measures "over" from the left (positive displacement) while bottom measures
|
|
285
|
+
// "up" from the bottom (negative displacement).
|
|
286
|
+
const newX = Math.max(clientRect.left - parentRect.left, 0);
|
|
287
|
+
const newY = Math.max(renderedHeight - (parentRect.bottom - clientRect.bottom), 0);
|
|
288
|
+
const { x, y } = this.viewCoordinatesToPageCoordinates(newX, newY, pageNumber, naturalWidth - e.rect.width, naturalHeight - e.rect.height);
|
|
289
|
+
const name = e.target.getAttribute('name');
|
|
290
|
+
const field = state.fields.find(field => field.name === name);
|
|
291
|
+
if (field) {
|
|
292
|
+
field.setting.x = x;
|
|
293
|
+
field.setting.y = y;
|
|
294
|
+
const edited = await editField(this.endpoint, this.templateId, name, field);
|
|
295
|
+
console.log('edited field', edited);
|
|
296
|
+
this.handlePageRendered({ detail: this.cachedPageInfo[pageNumber] });
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
generateFieldName(type, pageNumber) {
|
|
300
|
+
var _a;
|
|
301
|
+
const page = (_a = state.template.pages) === null || _a === void 0 ? void 0 : _a[pageNumber - 1];
|
|
302
|
+
const fields = (page === null || page === void 0 ? void 0 : page.fields) || [];
|
|
303
|
+
return `${type}P${pageNumber}-${fields.length}`;
|
|
304
|
+
}
|
|
305
|
+
// Scale the X,Y clicks to the virtual page dimensions. Also ensure the field doesn't go off the page.
|
|
306
|
+
viewCoordinatesToPageCoordinates(viewX, viewY, pageNumber, xMax, yMax) {
|
|
307
|
+
const { xScale = 1, yScale = 1, renderedHeight = 792 } = this.cachedPageInfo[pageNumber];
|
|
308
|
+
const x = Math.floor(Math.min(viewX / xScale, xMax));
|
|
309
|
+
const y = Math.floor(Math.min(Math.max(renderedHeight - viewY, 0) / yScale, yMax));
|
|
310
|
+
return { x, y };
|
|
311
|
+
}
|
|
312
|
+
async handleClickPage(e, page) {
|
|
313
|
+
if (this.placing) {
|
|
314
|
+
const pageNumber = page.sequence;
|
|
315
|
+
const clickedX = e.offsetX;
|
|
316
|
+
const clickedY = e.offsetY;
|
|
317
|
+
const width = defaultWidth({ type: this.placing });
|
|
318
|
+
const height = defaultHeight({ type: this.placing });
|
|
319
|
+
const { naturalWidth = 612, naturalHeight = 792 } = this.cachedPageInfo[pageNumber];
|
|
320
|
+
const { x, y } = this.viewCoordinatesToPageCoordinates(clickedX, clickedY, pageNumber, naturalWidth - width, naturalHeight - height);
|
|
321
|
+
const field = {
|
|
322
|
+
name: this.generateFieldName(this.placing, pageNumber),
|
|
323
|
+
role_name: this.selectedRoleName,
|
|
324
|
+
template_id: this.templateId,
|
|
325
|
+
type: this.placing,
|
|
326
|
+
required: true,
|
|
327
|
+
page_sequence: pageNumber,
|
|
328
|
+
validator: null,
|
|
329
|
+
setting: {
|
|
330
|
+
width,
|
|
331
|
+
height,
|
|
332
|
+
x,
|
|
333
|
+
y,
|
|
334
|
+
result: '',
|
|
335
|
+
},
|
|
336
|
+
};
|
|
337
|
+
const saved = await createField(this.endpoint, this.templateId, field);
|
|
338
|
+
console.log('Saved field', saved);
|
|
339
|
+
state.fields.push(saved);
|
|
340
|
+
this.placing = null;
|
|
341
|
+
this.handlePageRendered({ detail: this.cachedPageInfo[pageNumber] });
|
|
342
|
+
}
|
|
343
|
+
}
|
|
225
344
|
render() {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
role_name: 'Recipient 1',
|
|
230
|
-
type: 'textbox',
|
|
231
|
-
required: true,
|
|
232
|
-
setting: {
|
|
233
|
-
x: 0,
|
|
234
|
-
y: 0,
|
|
235
|
-
},
|
|
236
|
-
page_sequence: 0,
|
|
237
|
-
};
|
|
345
|
+
if (!this.endpoint.session) {
|
|
346
|
+
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
|
347
|
+
}
|
|
238
348
|
// TODO: Render a better error
|
|
239
349
|
if (state.loading || !state.template) {
|
|
240
350
|
return (h(Host, null, h("verdocs-loader", null)));
|
|
241
351
|
}
|
|
242
352
|
const pages = [...state.template.pages];
|
|
243
353
|
pages.sort((a, b) => a.sequence - b.sequence);
|
|
244
|
-
return (h(Host,
|
|
245
|
-
console.log('rendering page', page);
|
|
246
|
-
return (h("verdocs-document-page", { pageImageUri: page.display_uri, virtualWidth: 612, virtualHeight: 792, pageNumber: page.sequence, onPageRendered: e => this.handlePageRendered(e), layers: [
|
|
354
|
+
return (h(Host, { class: this.placing ? { [`placing-${this.placing}`]: true } : {} }, h("div", { class: "pages" }, pages.map(page => {
|
|
355
|
+
// console.log('rendering page', page);
|
|
356
|
+
return (h("verdocs-document-page", { pageImageUri: page.display_uri, virtualWidth: 612, virtualHeight: 792, onClick: (e) => this.handleClickPage(e, page), pageNumber: page.sequence, onPageRendered: e => this.handlePageRendered(e), layers: [
|
|
247
357
|
{ name: 'page', type: 'canvas' },
|
|
248
358
|
{ name: 'controls', type: 'div' },
|
|
249
359
|
] }));
|
|
250
|
-
}))
|
|
360
|
+
})), h("verdocs-floating-menu", { options: menuOptions, onOptionSelected: e => {
|
|
361
|
+
this.placing = e.detail.id;
|
|
362
|
+
} })));
|
|
251
363
|
}
|
|
252
364
|
};
|
|
253
365
|
VerdocsTemplateFields.style = verdocsTemplateFieldsCss;
|
|
@@ -306,6 +418,9 @@ const VerdocsTemplateProperties = class {
|
|
|
306
418
|
});
|
|
307
419
|
}
|
|
308
420
|
render() {
|
|
421
|
+
if (!this.endpoint.session) {
|
|
422
|
+
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
|
423
|
+
}
|
|
309
424
|
return (h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("h5", null, "Template Name"), h("fieldset", null, h("verdocs-text-input", { value: this.name, autocomplete: "off", onInput: (e) => (this.name = e.target.value) })), h("h5", null, "Reminders"), h("fieldset", null, h("div", { class: "input-row" }, h("label", null, "Send Automatic Reminders"), h("verdocs-checkbox", { name: "automatic-reminders", checked: this.sendReminders, value: "on", onInput: (e) => (this.sendReminders = e.target.checked) })), h("div", { class: "input-row" }, h("label", null, "Days Before First Reminder"), h("verdocs-text-input", { value: this.firstReminderDays, onInput: (e) => (this.firstReminderDays = e.target.value) })), h("div", { class: "input-row" }, h("label", null, "Days Between Reminders"), h("verdocs-text-input", { value: this.reminderDays, onInput: (e) => (this.reminderDays = e.target.value) }))), h("h5", null, "Template Visibility"), h("fieldset", null, h("div", { class: "radio-row" }, h("verdocs-radio-button", { name: "visibility", checked: true, value: "private", onChange: () => (this.visibility = 'private') }), h("label", { htmlFor: "verdocs-radio-button-visibility-private" }, h("div", { class: "title" }, "Private"), h("div", { class: "description" }, "Only you can share and use this template"))), h("div", { class: "radio-row" }, h("verdocs-radio-button", { name: "visibility", checked: true, value: "shared", onChange: () => (this.visibility = 'shared') }), h("label", { htmlFor: "verdocs-radio-button-visibility-shared" }, h("div", { class: "title" }, "Shared to your organization"), h("div", { class: "description" }, "Give access to your organization to share and use this template"))), h("div", { class: "radio-row" }, h("verdocs-radio-button", { name: "visibility", checked: true, value: "shared_public", onChange: () => (this.visibility = 'shared_public') }), h("label", { htmlFor: "verdocs-radio-button-visibility-shared_public" }, h("div", { class: "title" }, "Shared to your organization and Public"), h("div", { class: "description" }, "Give access to your organization to share this template, and anyone on the Web can find and use this template"))), h("div", { class: "radio-row" }, h("verdocs-radio-button", { name: "visibility", checked: this.visibility === 'public', value: "public", onChange: () => (this.visibility = 'public') }), h("label", { htmlFor: "verdocs-radio-button-visibility-public" }, h("div", { class: "title" }, "Public"), h("div", { class: "description" }, "Anyone on the Web can find and use this template")))), h("div", { class: "buttons" }, h("div", { class: "flex-fill" }), h("verdocs-button", { variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e) }), h("verdocs-button", { label: "OK", size: "small", onClick: e => this.handleSubmit(e) }))));
|
|
310
425
|
}
|
|
311
426
|
};
|
|
@@ -352,6 +467,7 @@ const VerdocsTemplateRecipients = class {
|
|
|
352
467
|
this.orderedRoles = [];
|
|
353
468
|
}
|
|
354
469
|
componentWillLoad() {
|
|
470
|
+
this.endpoint.loadSession();
|
|
355
471
|
if (this.templateRole) {
|
|
356
472
|
this.name = this.templateRole.full_name || '';
|
|
357
473
|
this.email = this.templateRole.email || '';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-f78d163d.js';
|
|
2
|
+
|
|
3
|
+
const verdocsTextInputCss = "verdocs-text-input{font-family:\"Barlow\", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-text-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:16px;height:28px;padding:4px 12px;outline:none}verdocs-text-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:focus{outline:1px solid #7d88ff}verdocs-text-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}verdocs-text-input [data-lastpass-icon-root]{display:none !important}";
|
|
4
|
+
|
|
5
|
+
const VerdocsTextInput = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.value = '';
|
|
9
|
+
this.label = '';
|
|
10
|
+
this.placeholder = '';
|
|
11
|
+
this.autocomplete = '';
|
|
12
|
+
this.type = 'text';
|
|
13
|
+
this.disabled = false;
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return (h(Host, { class: "input-field" }, h("label", null, this.label ? h("div", { class: "input-label" }, this.label + ':') : h("div", null), h("input", { type: this.type, value: this.value, class: "input-element", "data-lpignore": "true", disabled: this.disabled, placeholder: this.placeholder, autoComplete: this.autocomplete }))));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
VerdocsTextInput.style = verdocsTextInputCss;
|
|
20
|
+
|
|
21
|
+
export { VerdocsTextInput as verdocs_text_input };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, F as Fragment, a as getElement } from './index-f78d163d.js';
|
|
2
2
|
import './Types-ab9f6af8.js';
|
|
3
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-
|
|
4
|
-
import { g as getEnvelopeById, s as state } from './Envelopes-
|
|
3
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-6df32d3a.js';
|
|
4
|
+
import { g as getEnvelopeById, s as state } from './Envelopes-6982dfc6.js';
|
|
5
5
|
import { S as SDKError } from './errors-9b5498c8.js';
|
|
6
|
-
import { s as savePDF } from './utils-
|
|
6
|
+
import { s as savePDF } from './utils-3d95c588.js';
|
|
7
7
|
import './Token-54690789.js';
|
|
8
|
+
import './Envelopes-130fd6ea.js';
|
|
8
9
|
import './index-fd7b8a34.js';
|
|
9
10
|
import './Templates-0638b1e4.js';
|
|
10
11
|
import './Files-70a192df.js';
|