@verdocs/web-sdk 1.13.10 → 1.13.15
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/{TemplateStore-97e0b3f3.js → TemplateStore-e8039c08.js} +13 -5
- package/dist/cjs/{index-5e786db9.js → index-70677d67.js} +5 -0
- package/dist/cjs/ipc-test.cjs.entry.js +36 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/verdocs-auth.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-build.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-button-panel_3.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-button.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-checkbox_4.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-dropdown_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-attachment.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-date.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-signature.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-floating-menu.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-initial-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-kba-dialog.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-loader.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-organization-card.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search-tabs.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-send.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-sign.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-signature-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-status-indicator.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-attachments_2.cjs.entry.js +228 -0
- package/dist/cjs/verdocs-template-card.cjs.entry.js +1 -1
- package/dist/cjs/{verdocs-template-document-page.cjs.entry.js → verdocs-template-document-page_2.cjs.entry.js} +47 -2
- package/dist/cjs/{verdocs-template-attachments_4.cjs.entry.js → verdocs-template-fields_4.cjs.entry.js} +259 -229
- package/dist/cjs/verdocs-template-name.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-template-properties.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-template-reminders.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-template-tags.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-visibility.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-toggle-button.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-toggle.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-upload-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-view.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-web-sdk.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.css +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/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +23 -6
- package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.css +1 -1
- package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.js +1 -0
- package/dist/collection/components/templates/verdocs-template-visibillity/verdocs-template-visibility.stories.js +1 -1
- package/dist/collection/utils/TemplateStore.js +11 -3
- package/dist/components/TemplateStore.js +11 -3
- package/dist/components/VerdocsEndpoint.js +30 -30
- 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-kba-dialog.js +1 -1
- package/dist/components/verdocs-template-fields2.js +39 -10
- package/dist/components/verdocs-template-role-properties2.js +1 -1
- package/dist/components/verdocs-template-roles2.js +1 -0
- package/dist/custom-elements.json +1591 -0
- package/dist/docs.json +115 -4
- package/dist/esm/{TemplateStore-17fa95d5.js → TemplateStore-5082a055.js} +13 -5
- package/dist/esm/{index-9ee0ca9f.js → index-b18c0348.js} +5 -0
- package/dist/esm/ipc-test.entry.js +32 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{utils-78a752e0.js → utils-39fef438.js} +1 -1
- package/dist/esm/verdocs-auth.entry.js +2 -2
- package/dist/esm/verdocs-build.entry.js +3 -3
- package/dist/esm/verdocs-button-panel_3.entry.js +3 -3
- package/dist/esm/verdocs-button.entry.js +1 -1
- package/dist/esm/verdocs-checkbox_4.entry.js +1 -1
- package/dist/esm/verdocs-contact-picker.entry.js +2 -2
- package/dist/esm/verdocs-dropdown_2.entry.js +3 -3
- package/dist/esm/verdocs-envelope-sidebar.entry.js +2 -2
- package/dist/esm/verdocs-field-attachment.entry.js +1 -1
- package/dist/esm/verdocs-field-checkbox.entry.js +2 -2
- package/dist/esm/verdocs-field-date.entry.js +2 -2
- package/dist/esm/verdocs-field-dropdown.entry.js +2 -2
- package/dist/esm/verdocs-field-initial.entry.js +2 -2
- package/dist/esm/verdocs-field-payment.entry.js +2 -2
- package/dist/esm/verdocs-field-radio-button.entry.js +2 -2
- package/dist/esm/verdocs-field-signature.entry.js +2 -2
- package/dist/esm/verdocs-field-textarea.entry.js +2 -2
- package/dist/esm/verdocs-field-textbox.entry.js +2 -2
- package/dist/esm/verdocs-field-timestamp.entry.js +2 -2
- package/dist/esm/verdocs-file-chooser_2.entry.js +2 -2
- package/dist/esm/verdocs-floating-menu.entry.js +1 -1
- package/dist/esm/verdocs-initial-dialog.entry.js +1 -1
- package/dist/esm/verdocs-kba-dialog.entry.js +2 -2
- package/dist/esm/verdocs-loader.entry.js +1 -1
- package/dist/esm/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm/verdocs-organization-card.entry.js +1 -1
- package/dist/esm/verdocs-preview.entry.js +4 -4
- package/dist/esm/verdocs-quick-functions_3.entry.js +2 -2
- package/dist/esm/verdocs-radio-button.entry.js +1 -1
- package/dist/esm/verdocs-search-tabs.entry.js +1 -1
- package/dist/esm/verdocs-search.entry.js +2 -2
- package/dist/esm/verdocs-send.entry.js +4 -4
- package/dist/esm/verdocs-sign.entry.js +3 -3
- package/dist/esm/verdocs-signature-dialog.entry.js +1 -1
- package/dist/esm/verdocs-status-indicator.entry.js +1 -1
- package/dist/esm/verdocs-template-attachments_2.entry.js +223 -0
- package/dist/esm/verdocs-template-card.entry.js +1 -1
- package/dist/esm/{verdocs-template-document-page.entry.js → verdocs-template-document-page_2.entry.js} +48 -4
- package/dist/esm/{verdocs-template-attachments_4.entry.js → verdocs-template-fields_4.entry.js} +257 -227
- package/dist/esm/verdocs-template-name.entry.js +3 -3
- package/dist/esm/verdocs-template-properties.entry.js +3 -3
- package/dist/esm/verdocs-template-reminders.entry.js +3 -3
- package/dist/esm/verdocs-template-tags.entry.js +1 -1
- package/dist/esm/verdocs-template-visibility.entry.js +3 -3
- package/dist/esm/verdocs-toggle-button.entry.js +1 -1
- package/dist/esm/verdocs-toggle.entry.js +1 -1
- package/dist/esm/verdocs-upload-dialog.entry.js +1 -1
- package/dist/esm/verdocs-view.entry.js +3 -3
- package/dist/esm/verdocs-web-sdk.js +2 -2
- package/dist/esm-es5/TemplateStore-5082a055.js +1 -0
- package/dist/esm-es5/{VerdocsEndpoint-4367eb13.js → VerdocsEndpoint-ca592138.js} +1 -1
- package/dist/esm-es5/{index-9ee0ca9f.js → index-b18c0348.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-78a752e0.js → utils-39fef438.js} +1 -1
- 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 +1 -1
- package/dist/esm-es5/verdocs-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-checkbox_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-dropdown_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment.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-file-chooser_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-floating-menu.entry.js +1 -1
- package/dist/esm-es5/verdocs-initial-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-kba-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-loader.entry.js +1 -1
- package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-organization-card.entry.js +1 -1
- 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-radio-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-search-tabs.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 -1
- package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-attachments_2.entry.js +1 -0
- package/dist/esm-es5/verdocs-template-card.entry.js +1 -1
- 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-template-name.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-properties.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-visibility.entry.js +1 -1
- package/dist/esm-es5/verdocs-toggle-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-toggle.entry.js +1 -1
- package/dist/esm-es5/verdocs-upload-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- 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/templates/verdocs-template-fields/verdocs-template-fields.d.ts +2 -0
- package/dist/types/components.d.ts +29 -0
- package/dist/verdocs-web-sdk/{p-6b3dd926.system.entry.js → p-0138533f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-95119614.system.entry.js → p-06f5b2f6.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3d521eb4.system.entry.js → p-0865d5cb.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-08b56bd7.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-8c8960a3.system.entry.js → p-0a0d0679.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2d40f2ba.system.entry.js → p-0bedf11c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1900bbbb.system.entry.js → p-0c7167e2.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-12aac44a.entry.js → p-0ee33656.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-63d89af6.entry.js → p-10859415.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3186b008.system.entry.js → p-12d84e33.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-753cdc95.entry.js → p-1401c1a5.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-1953e9c5.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-1b7326f9.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-9258d861.system.entry.js → p-1c7bf9f9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-1cf38cea.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-07715513.entry.js → p-1f69d9a3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-09382df0.entry.js → p-20620846.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b2cb8889.system.entry.js → p-221dea5b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c8a56083.system.entry.js → p-23d77279.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6c1817fa.system.entry.js → p-294c3f82.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-056bec65.system.entry.js → p-2cb54b47.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8d998322.entry.js → p-2cc03ba9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f71a30f6.entry.js → p-2d51380b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-13f80bb2.entry.js → p-300b5cae.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-38384461.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-55a13b01.entry.js → p-38733cab.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-df691d95.system.entry.js → p-38ee53a8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-3906caae.js +1 -0
- package/dist/verdocs-web-sdk/{p-4ff16721.entry.js → p-3da76ad8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f63b71ae.entry.js → p-400ec020.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-237975c0.system.entry.js → p-40eb6943.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-42384ab6.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-e312fbab.entry.js → p-44645ef9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c45ee88f.system.entry.js → p-44dd4071.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7b2ca8ef.system.js → p-48f6291b.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c2c49441.js → p-49fb6d62.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a77f4093.system.entry.js → p-4b24bbee.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4b7996e8.system.entry.js → p-4cc40f4c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f1a773bf.entry.js → p-4e5f467f.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7ef23636.entry.js → p-4ffe5ab6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-263acb59.entry.js → p-5709fbe8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2d36f297.system.entry.js → p-5e1b9be8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-71de1985.system.entry.js → p-5efea322.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8ac409c5.system.entry.js → p-5f915769.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ad7caefa.entry.js → p-6a10ae2e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1738fd08.entry.js → p-6d8058f1.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ed3d86cd.entry.js → p-6ec9e789.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a6da9fa8.system.entry.js → p-6f6bac89.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-adb73796.system.entry.js → p-70b42a9c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f23e0059.system.entry.js → p-712d4bc9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-385c9366.entry.js → p-71351c29.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4fdf4196.system.entry.js → p-725ee615.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f6306a21.entry.js → p-750996e5.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-116c6981.system.entry.js → p-763f9ef3.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c6547da0.entry.js → p-76566ac3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-73875e21.system.entry.js → p-780f3883.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1abcf29d.js → p-7f727073.js} +1 -1
- package/dist/verdocs-web-sdk/p-82ac0970.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-6c12d567.entry.js → p-843b717d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2e1b6646.entry.js → p-8446f444.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6a26b4fd.system.entry.js → p-86690cac.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c44fd897.system.js → p-882cf708.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7500179f.entry.js → p-891f954b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5544bdd4.system.entry.js → p-8b2d75bd.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fd374620.system.js → p-934a39b4.system.js} +2 -2
- package/dist/verdocs-web-sdk/{p-09f756a2.system.entry.js → p-953c52a0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-681c7361.entry.js → p-95bf1859.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9a4124dd.system.entry.js → p-9aab1478.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-9cf1a627.js +2 -0
- package/dist/verdocs-web-sdk/{p-201f27f6.system.js → p-a06e53f9.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-a52c45bb.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-a75f3b9a.entry.js → p-a8b6ec03.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-73b44d44.entry.js → p-aa667784.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5a851a3b.system.entry.js → p-aefef96f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-27c96690.system.entry.js → p-af6376ca.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b3c3b7e8.system.entry.js → p-b1eec660.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-29f2dfc9.entry.js → p-b32a5b66.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a490803a.entry.js → p-b4698fe4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7416b77f.entry.js → p-b480c5c8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-aabfb02a.entry.js → p-b5be2016.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fc64e091.system.entry.js → p-b9a316d7.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-32547cde.entry.js → p-bb88c8b6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c54d05db.entry.js → p-c03d75ab.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e5fda62a.entry.js → p-c436e9f3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a9e063bc.system.entry.js → p-c4e25135.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ed6c5982.entry.js → p-c4fd8b65.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-c97f5c31.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-c5fb045c.entry.js → p-ca8186e3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7aeb1f15.entry.js → p-cb6b8c75.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8ebf7d74.system.entry.js → p-cc6dfb40.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3fa5ce6b.entry.js → p-ccc374e8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-bc7c1b67.system.entry.js → p-d767df89.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-da3b66af.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-1a666173.entry.js → p-e275336d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-e63479c6.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-2d73b96f.entry.js → p-e637160a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fbee0760.system.entry.js → p-e7d2709d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-18658f1f.system.entry.js → p-e98e2e3d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-944996b2.entry.js → p-e9cf50ea.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5e292135.entry.js → p-ec0925d5.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-149f9430.system.entry.js → p-f920942e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c42b7ca2.system.entry.js → p-f9d3d6c1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-26801979.system.entry.js → p-fa0eec42.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f1350ea7.system.entry.js → p-fc36ec2f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fa0123d2.entry.js → p-fd4a758d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-452d6537.entry.js → p-fdc4e659.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5d755377.system.entry.js → p-ffc8f64d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/Roles-9b593b95.js +0 -28
- package/dist/cjs/verdocs-template-role-properties_2.cjs.entry.js +0 -220
- package/dist/cjs/verdocs-toolbar-icon.cjs.entry.js +0 -51
- package/dist/esm/Roles-6eb459df.js +0 -24
- package/dist/esm/verdocs-template-role-properties_2.entry.js +0 -215
- package/dist/esm/verdocs-toolbar-icon.entry.js +0 -47
- package/dist/esm-es5/Roles-6eb459df.js +0 -1
- package/dist/esm-es5/TemplateStore-17fa95d5.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-template-role-properties_2.entry.js +0 -1
- package/dist/esm-es5/verdocs-toolbar-icon.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-01a240ac.system.js +0 -1
- package/dist/verdocs-web-sdk/p-1025430e.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2d31b931.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2fa6de11.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-59a88b20.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-9bafdd9f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-acb5e932.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b3dfe499.js +0 -2
- package/dist/verdocs-web-sdk/p-be05977e.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e78b7f2f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ec7fc148.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ed6bc1ce.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f1c98c73.system.entry.js +0 -1
- package/dist/cjs/{VerdocsEndpoint-3e95f87f.js → VerdocsEndpoint-1b1836af.js} +30 -30
- package/dist/esm/{VerdocsEndpoint-4367eb13.js → VerdocsEndpoint-ca592138.js} +30 -30
package/dist/esm/{verdocs-template-attachments_4.entry.js → verdocs-template-fields_4.entry.js}
RENAMED
@@ -1,234 +1,41 @@
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, F as Fragment, a as getElement } from './index-
|
2
|
-
import './Types-5f31149e.js';
|
3
|
-
import { c as createTemplateDocument, d as deleteTemplateDocument } from './TemplateDocuments-6fd2f4e2.js';
|
4
|
-
import { V as VerdocsEndpoint, T as TemplateSenderTypes } from './VerdocsEndpoint-4367eb13.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, a as getRoleNames } from './TemplateStore-17fa95d5.js';
|
7
|
-
import { S as SDKError } from './errors-9b5498c8.js';
|
8
|
-
import { c as createTemplate } from './Templates-67172396.js';
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, F as Fragment, a as getElement } from './index-b18c0348.js';
|
9
2
|
import { i as interact } from './interact.min-cf83fa88.js';
|
3
|
+
import './Types-5f31149e.js';
|
10
4
|
import { u as updateField, c as createField } from './Fields-c82e6df3.js';
|
5
|
+
import { V as VerdocsEndpoint, T as TemplateSenderTypes } from './VerdocsEndpoint-ca592138.js';
|
11
6
|
import { i as integerSequence } from './Primitives-054bc6e5.js';
|
12
|
-
import { a as getRoleIndex, r as renderDocumentField,
|
13
|
-
import {
|
7
|
+
import { a as getRoleIndex, r as renderDocumentField, e as updateCssTransform, f as defaultWidth, h as defaultHeight } from './utils-39fef438.js';
|
8
|
+
import { g as getTemplateStore, a as getRoleNames } from './TemplateStore-5082a055.js';
|
9
|
+
import { S as SDKError } from './errors-9b5498c8.js';
|
14
10
|
import { g as getRGBA } from './Colors-1b298092.js';
|
11
|
+
import { u as updateTemplate } from './Templates-67172396.js';
|
15
12
|
import './_commonjsHelpers-5ec8f9b7.js';
|
16
13
|
import './Envelopes-921cd9d0.js';
|
17
14
|
import './Files-70a192df.js';
|
18
15
|
import './index-d264c496.js';
|
19
16
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
this.uploading = false;
|
32
|
-
this.progressLabel = 'Uploading...';
|
33
|
-
this.progressPercent = 0;
|
34
|
-
this.showDeleteError = false;
|
35
|
-
this.confirmDeleteDocument = null;
|
36
|
-
this.store = null;
|
37
|
-
}
|
38
|
-
async componentWillLoad() {
|
39
|
-
var _a, _b, _c;
|
40
|
-
try {
|
41
|
-
this.endpoint.loadSession();
|
42
|
-
if (!this.templateId) {
|
43
|
-
console.log(`[ROLES] Missing required template ID ${this.templateId}`);
|
44
|
-
return;
|
45
|
-
}
|
46
|
-
if (!this.endpoint.session) {
|
47
|
-
console.log('[ROLES] Unable to start builder session, must be authenticated');
|
48
|
-
return;
|
49
|
-
}
|
50
|
-
this.store = await getTemplateStore(this.endpoint, this.templateId, false);
|
51
|
-
}
|
52
|
-
catch (e) {
|
53
|
-
console.log('[TEMPLATE ATTACHMENTS] Error loading template', e);
|
54
|
-
(_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));
|
55
|
-
}
|
56
|
-
}
|
57
|
-
handleCancel(e) {
|
58
|
-
e.stopPropagation();
|
59
|
-
this.exit.emit();
|
60
|
-
}
|
61
|
-
handleUploadProgress(percent) {
|
62
|
-
if (percent >= 99) {
|
63
|
-
this.progressPercent = 100;
|
64
|
-
this.progressLabel = 'Processing...';
|
65
|
-
}
|
66
|
-
else {
|
67
|
-
this.progressPercent = percent;
|
68
|
-
}
|
69
|
-
}
|
70
|
-
async handleUpload(e) {
|
71
|
-
var _a, _b, _c;
|
72
|
-
e.stopPropagation();
|
73
|
-
const file = e.detail.file;
|
74
|
-
if (!file) {
|
75
|
-
return;
|
76
|
-
}
|
77
|
-
console.log('[ATTACHMENTS] Uploading...', file);
|
78
|
-
this.uploading = true;
|
79
|
-
this.progressLabel = 'Uploading...';
|
80
|
-
try {
|
81
|
-
const template = await createTemplateDocument(this.endpoint, this.templateId, file, this.handleUploadProgress.bind(this));
|
82
|
-
console.log('[ATTACHMENTS] Created attachment', template);
|
83
|
-
this.store = await getTemplateStore(this.endpoint, this.templateId, true);
|
84
|
-
console.log('[ATTACHMENTS] New template', this.store.state);
|
85
|
-
this.uploading = false;
|
86
|
-
this.progressLabel = '';
|
87
|
-
this.progressPercent = 0;
|
88
|
-
}
|
89
|
-
catch (e) {
|
90
|
-
console.log('[ATTACHMENTS] Error creating template', e);
|
91
|
-
(_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));
|
92
|
-
this.uploading = false;
|
93
|
-
}
|
94
|
-
}
|
95
|
-
handleNext(e) {
|
96
|
-
var _a;
|
97
|
-
e.stopPropagation();
|
98
|
-
this.uploading = false;
|
99
|
-
this.progressLabel = '';
|
100
|
-
this.progressPercent = 0;
|
101
|
-
(_a = this.next) === null || _a === void 0 ? void 0 : _a.emit({ template: this.store.state });
|
102
|
-
}
|
103
|
-
async confirmDelete() {
|
104
|
-
await deleteTemplateDocument(this.endpoint, this.templateId, this.confirmDeleteDocument.id);
|
105
|
-
this.store = await getTemplateStore(this.endpoint, this.templateId, true);
|
106
|
-
console.log('[ATTACHMENTS] New template', this.store.state);
|
107
|
-
this.confirmDeleteDocument = null;
|
108
|
-
}
|
109
|
-
async handleDelete(document) {
|
110
|
-
var _a;
|
111
|
-
if (((_a = this.store.state) === null || _a === void 0 ? void 0 : _a.template_documents.length) > 1) {
|
112
|
-
this.confirmDeleteDocument = document;
|
113
|
-
}
|
114
|
-
else {
|
115
|
-
this.showDeleteError = true;
|
116
|
-
}
|
117
|
-
}
|
118
|
-
getFileIcon(document) {
|
119
|
-
switch (document.mime) {
|
120
|
-
case 'application/pdf':
|
121
|
-
return PdfIcon;
|
122
|
-
case 'image/jpeg':
|
123
|
-
return JpgIcon;
|
124
|
-
case 'image/png':
|
125
|
-
return PngIcon;
|
126
|
-
case 'application/msword':
|
127
|
-
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
|
128
|
-
return DocIcon;
|
129
|
-
}
|
130
|
-
return FileIcon$1;
|
131
|
-
}
|
132
|
-
render() {
|
133
|
-
var _a, _b, _c;
|
134
|
-
if (!this.endpoint.session) {
|
135
|
-
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
136
|
-
}
|
137
|
-
const templateState = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state;
|
138
|
-
if (!templateState.isLoaded) {
|
139
|
-
return (h(Host, { class: "loading" }, h("verdocs-loader", null)));
|
140
|
-
}
|
141
|
-
// This is meant to be a companion for larger visual experiences so we just go blank on errors for now.
|
142
|
-
if (!this.endpoint.session || !templateState.profile_id) {
|
143
|
-
return h(Host, { class: "empty" });
|
144
|
-
}
|
145
|
-
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: () => {
|
146
|
-
this.confirmDeleteDocument = null;
|
147
|
-
} }))));
|
148
|
-
}
|
17
|
+
/**
|
18
|
+
* A "role" is an individual participant in a signing flow, such as a signer or CC contact. Roles are identified by
|
19
|
+
* their names, which must be unique (e.g. 'Recipient 1'). Template fields are assigned to roles for signing operations,
|
20
|
+
* so you may have 'Recipient 1 Signature 1' and so forth.
|
21
|
+
*
|
22
|
+
* @module
|
23
|
+
*/
|
24
|
+
var createRole = function (endpoint, templateId, params) {
|
25
|
+
return endpoint.api //
|
26
|
+
.post("/templates/".concat(templateId, "/roles"), params)
|
27
|
+
.then(function (r) { return r.data; });
|
149
28
|
};
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
this.exit = createEvent(this, "exit", 7);
|
160
|
-
this.next = createEvent(this, "next", 7);
|
161
|
-
this.sdkError = createEvent(this, "sdkError", 7);
|
162
|
-
this.endpoint = VerdocsEndpoint.getDefault();
|
163
|
-
this.file = undefined;
|
164
|
-
this.creating = false;
|
165
|
-
this.progressLabel = 'Uploading...';
|
166
|
-
this.progressPercent = 0;
|
167
|
-
}
|
168
|
-
componentWillLoad() {
|
169
|
-
this.endpoint.setTimeout(30000);
|
170
|
-
this.endpoint.loadSession();
|
171
|
-
}
|
172
|
-
handleFileChanged(e) {
|
173
|
-
var _a;
|
174
|
-
this.file = ((_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0]) || null;
|
175
|
-
console.log('[CREATE] Selected file', this.file);
|
176
|
-
// this.filePath = e.target.files?.[0]?.name;
|
177
|
-
}
|
178
|
-
handleUpload(e) {
|
179
|
-
e.stopPropagation();
|
180
|
-
const fileElem = document.getElementById('verdocs-template-create-file');
|
181
|
-
fileElem.click();
|
182
|
-
}
|
183
|
-
handleCancel(e) {
|
184
|
-
e.stopPropagation();
|
185
|
-
this.exit.emit();
|
186
|
-
}
|
187
|
-
async handleSubmit(e) {
|
188
|
-
var _a, _b, _c, _d;
|
189
|
-
e.stopPropagation();
|
190
|
-
console.log('Submitting');
|
191
|
-
// Should be true if we're here because onClick is only enabled then. We're just guarding this for Typescript.
|
192
|
-
if (!this.file) {
|
193
|
-
return;
|
194
|
-
}
|
195
|
-
this.creating = true;
|
196
|
-
this.progressLabel = 'Uploading...';
|
197
|
-
try {
|
198
|
-
const template = await createTemplate(this.endpoint, { name: this.file.name, documents: [this.file] }, percent => {
|
199
|
-
if (percent >= 99) {
|
200
|
-
this.progressLabel = 'Processing...';
|
201
|
-
this.progressPercent = 100;
|
202
|
-
}
|
203
|
-
else {
|
204
|
-
this.progressPercent = percent;
|
205
|
-
}
|
206
|
-
});
|
207
|
-
console.log('[CREATE] Created template', template);
|
208
|
-
(_a = this.next) === null || _a === void 0 ? void 0 : _a.emit(template);
|
209
|
-
this.creating = false;
|
210
|
-
this.progressLabel = '';
|
211
|
-
this.progressPercent = 0;
|
212
|
-
}
|
213
|
-
catch (e) {
|
214
|
-
console.log('[CREATE] Error creating template', e);
|
215
|
-
(_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));
|
216
|
-
this.creating = false;
|
217
|
-
}
|
218
|
-
}
|
219
|
-
render() {
|
220
|
-
if (!this.endpoint.session) {
|
221
|
-
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
222
|
-
}
|
223
|
-
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" }, 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: {
|
224
|
-
marginTop: '20px',
|
225
|
-
marginBottom: '20px',
|
226
|
-
fontSize: '16px',
|
227
|
-
height: '20px',
|
228
|
-
} }, 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 })))));
|
229
|
-
}
|
29
|
+
var updateRole = function (endpoint, templateId, roleName, params) {
|
30
|
+
return endpoint.api //
|
31
|
+
.put("/templates/".concat(templateId, "/roles/").concat(roleName), params)
|
32
|
+
.then(function (r) { return r.data; });
|
33
|
+
};
|
34
|
+
var deleteRole = function (endpoint, templateId, roleName) {
|
35
|
+
return endpoint.api //
|
36
|
+
.delete("/templates/".concat(templateId, "/roles/").concat(roleName))
|
37
|
+
.then(function (r) { return r.data; });
|
230
38
|
};
|
231
|
-
VerdocsTemplateCreate.style = verdocsTemplateCreateCss;
|
232
39
|
|
233
40
|
const verdocsTemplateFieldsCss = "verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;position:relative;display:block;min-height:600px}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 #verdocs-template-fields-toolbar{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 50px;flex:0 0 50px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;font-weight:700;padding:0 20px 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#f5f5fa;-ms-flex-pack:center;justify-content:center;background:#46497d}verdocs-template-fields #verdocs-template-fields-toolbar>verdocs-select-input{margin:0}verdocs-template-fields #verdocs-template-fields-toolbar svg{width:24px;height:24px}verdocs-template-fields #verdocs-template-fields-toolbar .add-for{margin:0;font-weight:500;color:#f5f5fa}verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{margin:0 20px 0 0}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_group{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 fill='%23000000' 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'/%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' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25' /%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_button_group{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 width='32' height='15' viewBox='0 0 32 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_1401_24' fill='white'%3E%3Cpath d='M0 0H32V15H0V0Z'/%3E%3C/mask%3E%3Cpath d='M0 0H32V15H0V0Z' fill='%234C56CB' fill-opacity='0.1'/%3E%3Cpath d='M0 0V-1H-1V0H0ZM0 15H-1V16H0V15ZM0 1H32V-1H0V1ZM32 14H0V16H32V14ZM1 15V0H-1V15H1Z' fill='%234C56CB' mask='url(%23path-1-inside-1_1401_24)'/%3E%3Cpath d='M3 11.8V8.65H14.15V11.8H3ZM3 6.65V3.5H20.15V6.65H3Z' fill='%234C56CB'/%3E%3Cline x1='31.5' y1='1' x2='31.5' y2='14' stroke='%234C56CB' stroke-opacity='0.32' stroke-dasharray='1 1'/%3E%3C/svg%3E%0A\") 0 14, 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 fill='%23000000' d='M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z'%3E%3C/path%3E%3C/svg%3E\") 16 16, pointer}";
|
234
41
|
|
@@ -270,6 +77,7 @@ const VerdocsTemplateFields = class {
|
|
270
77
|
this.templateId = null;
|
271
78
|
this.toolbarTargetId = null;
|
272
79
|
this.placing = null;
|
80
|
+
this.showMustSelectRole = false;
|
273
81
|
this.selectedRoleName = '';
|
274
82
|
this.rerender = 1;
|
275
83
|
}
|
@@ -305,6 +113,14 @@ const VerdocsTemplateFields = class {
|
|
305
113
|
toolbarTarget.append(toolbarEl);
|
306
114
|
}
|
307
115
|
}
|
116
|
+
componentWillUpdate() {
|
117
|
+
var _a, _b, _c, _d, _e, _f;
|
118
|
+
// If a new role was added and there were none yet so far, or the "selected" role was deleted, reset our selection
|
119
|
+
if (!this.selectedRoleName || !(((_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.roles) || []).find(role => role.name === this.selectedRoleName)) {
|
120
|
+
this.selectedRoleName = ((_f = (_e = (_d = (_c = this.store) === null || _c === void 0 ? void 0 : _c.state) === null || _d === void 0 ? void 0 : _d.roles) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.name) || '';
|
121
|
+
console.log('[FIELDS] Selected new role', this.selectedRoleName);
|
122
|
+
}
|
123
|
+
}
|
308
124
|
// Stop field-placement mode if ESC is pressed
|
309
125
|
handleKeyDown(ev) {
|
310
126
|
if (ev.key === 'Escape') {
|
@@ -465,7 +281,7 @@ const VerdocsTemplateFields = class {
|
|
465
281
|
console.log('testing field', fieldName);
|
466
282
|
i++;
|
467
283
|
} while ((_a = this.store) === null || _a === void 0 ? void 0 : _a.state.fields.some(field => field.name === fieldName));
|
468
|
-
console.log('Will use field name', fieldName, (_b = this.store) === null || _b === void 0 ? void 0 : _b.state.fields);
|
284
|
+
console.log('Will use field name', this, fieldName, (_b = this.store) === null || _b === void 0 ? void 0 : _b.state.fields);
|
469
285
|
return fieldName;
|
470
286
|
}
|
471
287
|
// Scale the X,Y clicks to the virtual page dimensions. Also ensure the field doesn't go off the page.
|
@@ -478,7 +294,7 @@ const VerdocsTemplateFields = class {
|
|
478
294
|
async handleClickPage(e, pageNumber) {
|
479
295
|
var _a, _b, _c;
|
480
296
|
if (this.placing) {
|
481
|
-
console.log('Placing field', this.placing, pageNumber, e.offsetX, e.offsetY);
|
297
|
+
console.log('Placing field', this, this.selectedRoleName, this.placing, pageNumber, e.offsetX, e.offsetY);
|
482
298
|
// console.log('Placing field', this.placing, page.sequence, e.offsetX, e.offsetY);
|
483
299
|
// const pageNumber = page.sequence;
|
484
300
|
const clickedX = e.offsetX;
|
@@ -581,7 +397,8 @@ const VerdocsTemplateFields = class {
|
|
581
397
|
}
|
582
398
|
}
|
583
399
|
render() {
|
584
|
-
var _a, _b, _c, _d, _e;
|
400
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
401
|
+
console.log('[FIELDS] Rendering', this.selectedRoleName);
|
585
402
|
if (!this.endpoint.session) {
|
586
403
|
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
587
404
|
}
|
@@ -593,9 +410,15 @@ const VerdocsTemplateFields = class {
|
|
593
410
|
return (h(Host, { class: this.placing ? { [`placing-${this.placing}`]: true } : {}, "data-r": this.rerender, onSubmit: () => {
|
594
411
|
console.log('onSubmit');
|
595
412
|
} }, h("div", { id: "verdocs-template-fields-toolbar" }, h("div", { class: "add-for" }, "Add field:"), h("verdocs-select-input", { value: this.selectedRoleName, options: selectableRoles, onInput: (e) => (this.selectedRoleName = e.target.value) }), menuOptions.map(option => (h("verdocs-toolbar-icon", { text: option.tooltip, icon: option.icon, onClick: () => {
|
413
|
+
// We ignore empty-tooltip entries because they're separators
|
596
414
|
if (option.tooltip) {
|
597
|
-
// We
|
598
|
-
this.
|
415
|
+
// We require a role to be selected first
|
416
|
+
if (this.selectedRoleName) {
|
417
|
+
this.placing = option.id;
|
418
|
+
}
|
419
|
+
else {
|
420
|
+
this.showMustSelectRole = true;
|
421
|
+
}
|
599
422
|
}
|
600
423
|
} })))), h("div", { class: "pages" }, (((_e = (_d = this.store) === null || _d === void 0 ? void 0 : _d.state) === null || _e === void 0 ? void 0 : _e.template_documents) || []).map(document => {
|
601
424
|
const pageNumbers = integerSequence(1, document.page_numbers);
|
@@ -603,11 +426,151 @@ const VerdocsTemplateFields = class {
|
|
603
426
|
{ name: 'page', type: 'canvas' },
|
604
427
|
{ name: 'controls', type: 'div' },
|
605
428
|
] })));
|
606
|
-
}))));
|
429
|
+
})), this.showMustSelectRole && (h("verdocs-ok-dialog", { heading: "Unable to add field", message: ((_h = (_g = (_f = this.store) === null || _f === void 0 ? void 0 : _f.state) === null || _g === void 0 ? void 0 : _g.roles) === null || _h === void 0 ? void 0 : _h.length) > 0 ? 'Please select a role before adding fields.' : 'Please add at least one role before adding fields.', onNext: () => (this.showMustSelectRole = false) }))));
|
607
430
|
}
|
608
431
|
};
|
609
432
|
VerdocsTemplateFields.style = verdocsTemplateFieldsCss;
|
610
433
|
|
434
|
+
const verdocsTemplateRolePropertiesCss = "verdocs-template-role-properties{font-family:\"Barlow\", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties .background-overlay{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-template-role-properties .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-role-properties .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-role-properties .buttons verdocs-button{margin-left:16px}verdocs-template-role-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-role-properties verdocs-text-input{margin:0 0 10px 0}verdocs-template-role-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-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}verdocs-template-role-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties verdocs-text-input verdocs-text-input{margin:0}verdocs-template-role-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-role-properties .delete-button:active{background:#f3f3f3}verdocs-template-role-properties .delete-button svg{width:24px;height:24px}";
|
435
|
+
|
436
|
+
const TrashIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>`;
|
437
|
+
const VerdocsTemplateRoleProperties = class {
|
438
|
+
constructor(hostRef) {
|
439
|
+
registerInstance(this, hostRef);
|
440
|
+
this.close = createEvent(this, "close", 7);
|
441
|
+
this.delete = createEvent(this, "delete", 7);
|
442
|
+
this.sdkError = createEvent(this, "sdkError", 7);
|
443
|
+
this.store = null;
|
444
|
+
this.endpoint = VerdocsEndpoint.getDefault();
|
445
|
+
this.templateId = '';
|
446
|
+
this.roleName = '';
|
447
|
+
this.sender = TemplateSenderTypes.EVERYONE;
|
448
|
+
this.dirty = false;
|
449
|
+
this.saving = false;
|
450
|
+
this.name = '';
|
451
|
+
this.type = 'signer';
|
452
|
+
this.fullName = '';
|
453
|
+
this.email = '';
|
454
|
+
this.phone = '';
|
455
|
+
this.allowDelegation = false;
|
456
|
+
}
|
457
|
+
async componentWillLoad() {
|
458
|
+
var _a, _b, _c, _d, _e;
|
459
|
+
try {
|
460
|
+
this.endpoint.loadSession();
|
461
|
+
if (!this.templateId) {
|
462
|
+
console.log(`[ROLE_PROPERTIES] Missing required template ID ${this.templateId}`);
|
463
|
+
return;
|
464
|
+
}
|
465
|
+
if (!this.endpoint.session) {
|
466
|
+
console.log('[ROLE_PROPERTIES] Unable to start builder session, must be authenticated');
|
467
|
+
return;
|
468
|
+
}
|
469
|
+
this.store = await getTemplateStore(this.endpoint, this.templateId, false);
|
470
|
+
const editingRole = (_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.roles.find(role => role.name === this.roleName);
|
471
|
+
if (editingRole) {
|
472
|
+
this.name = editingRole.name;
|
473
|
+
this.type = editingRole.type;
|
474
|
+
this.fullName = editingRole.full_name;
|
475
|
+
this.email = editingRole.email;
|
476
|
+
this.phone = editingRole.phone;
|
477
|
+
this.allowDelegation = editingRole.delegator;
|
478
|
+
console.log('[ROLES] Editing role', editingRole);
|
479
|
+
}
|
480
|
+
}
|
481
|
+
catch (e) {
|
482
|
+
console.log('[TEMPLATE ROLE PROPERTIES] Error with preview session', e);
|
483
|
+
(_c = this.sdkError) === null || _c === void 0 ? void 0 : _c.emit(new SDKError(e.message, (_d = e.response) === null || _d === void 0 ? void 0 : _d.status, (_e = e.response) === null || _e === void 0 ? void 0 : _e.data));
|
484
|
+
}
|
485
|
+
}
|
486
|
+
handleCancel(e) {
|
487
|
+
var _a, _b, _c;
|
488
|
+
e.stopPropagation();
|
489
|
+
this.name = (_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.name;
|
490
|
+
this.dirty = false;
|
491
|
+
(_c = this.close) === null || _c === void 0 ? void 0 : _c.emit();
|
492
|
+
}
|
493
|
+
async handleSave(e) {
|
494
|
+
e.stopPropagation();
|
495
|
+
this.saving = true;
|
496
|
+
updateRole(this.endpoint, this.templateId, this.roleName, {
|
497
|
+
name: this.name,
|
498
|
+
type: this.type,
|
499
|
+
full_name: this.fullName,
|
500
|
+
email: this.email,
|
501
|
+
phone: this.phone,
|
502
|
+
delegator: this.allowDelegation,
|
503
|
+
})
|
504
|
+
.then(async (r) => {
|
505
|
+
var _a;
|
506
|
+
console.log('[ROLE_PROPERTIES] Update result', r);
|
507
|
+
this.saving = false;
|
508
|
+
this.dirty = false;
|
509
|
+
this.store = await getTemplateStore(this.endpoint, this.templateId, true);
|
510
|
+
// this.sortTemplateRoles();
|
511
|
+
// this.renumberTemplateRoles();
|
512
|
+
// const newRoles = [...this.store.state.roles];
|
513
|
+
// newRoles.forEach(role => {
|
514
|
+
// if (role.name === this.roleName) {
|
515
|
+
// role.name = this.name;
|
516
|
+
// role.type = this.type;
|
517
|
+
// role.full_name = this.fullName;
|
518
|
+
// role.email = this.email;
|
519
|
+
// role.phone = this.phone;
|
520
|
+
// role.delegator = this.allowDelegation;
|
521
|
+
// }
|
522
|
+
// });
|
523
|
+
// this.store.state.roles = newRoles;
|
524
|
+
(_a = this.close) === null || _a === void 0 ? void 0 : _a.emit();
|
525
|
+
})
|
526
|
+
.catch(e => {
|
527
|
+
console.log('Update error', e);
|
528
|
+
this.saving = false;
|
529
|
+
});
|
530
|
+
}
|
531
|
+
async handleDelete(e) {
|
532
|
+
e.stopPropagation();
|
533
|
+
if (window.confirm('Are you sure you wish to remove this role? All associated fields will be removed as well. This action cannot be undone.')) {
|
534
|
+
deleteRole(this.endpoint, this.templateId, this.roleName)
|
535
|
+
.then(r => {
|
536
|
+
var _a;
|
537
|
+
console.log('Role deleted', r);
|
538
|
+
this.store.state.roles = [...this.store.state.roles.filter(role => role.name !== this.roleName)];
|
539
|
+
(_a = this.delete) === null || _a === void 0 ? void 0 : _a.emit({ templateId: this.templateId, roleName: this.roleName });
|
540
|
+
})
|
541
|
+
.catch(e => {
|
542
|
+
console.log('Deletion error', e);
|
543
|
+
});
|
544
|
+
}
|
545
|
+
}
|
546
|
+
render() {
|
547
|
+
return (h(Host, null, h("div", { class: "background-overlay", onClick: e => this.handleCancel(e) }, h("div", { class: "dialog" }, h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("verdocs-text-input", { id: "verdocs-recipient-name", label: "Role Name", value: this.name, autocomplete: "off", helpText: "A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.", placeholder: "Template Name...", onInput: (e) => {
|
548
|
+
this.name = e.target.value;
|
549
|
+
this.dirty = true;
|
550
|
+
} }), h("div", { class: "row" }, h("div", { class: "input-label" }, "Type:"), h("verdocs-select-input", { value: this.type, options: [
|
551
|
+
{ label: 'Signer', value: 'signer' },
|
552
|
+
{ label: 'CC', value: 'cc' },
|
553
|
+
{ label: 'Approver', value: 'approver' },
|
554
|
+
], onInput: (e) => {
|
555
|
+
this.type = e.target.value;
|
556
|
+
this.dirty = true;
|
557
|
+
} }), h("verdocs-help-icon", { text: "Most participants are Signers. CC roles are notified when documents are signed, but have no other actions. Approvers get notified when signing is completed to perform a final review." })), h("verdocs-text-input", { id: "verdocs-recipient-email", label: "Full Name", value: this.fullName, autocomplete: "off", helpText: "The recipient's full name, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.", placeholder: "Full Name...", onInput: (e) => {
|
558
|
+
this.fullName = e.target.value;
|
559
|
+
this.dirty = true;
|
560
|
+
} }), h("verdocs-text-input", { id: "verdocs-recipient-email", label: "Email", value: this.email, autocomplete: "off", helpText: "The recipient's email address, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.", placeholder: "Email Address...", onInput: (e) => {
|
561
|
+
this.email = e.target.value;
|
562
|
+
this.dirty = true;
|
563
|
+
} }), h("verdocs-text-input", { id: "verdocs-recipient-phone", label: "Phone", value: this.phone, autocomplete: "off", helpText: "The recipient's phone number, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.", placeholder: "Phone Number...", onInput: (e) => {
|
564
|
+
this.phone = e.target.value;
|
565
|
+
this.dirty = true;
|
566
|
+
} }), h("div", { class: "row" }, h("div", { class: "input-label" }, "May Delegate:"), h("div", { class: "checkbox-wrapper" }, h("verdocs-checkbox", { checked: this.allowDelegation, onInput: (e) => {
|
567
|
+
this.allowDelegation = e.target.checked;
|
568
|
+
this.dirty = true;
|
569
|
+
} })), h("verdocs-help-icon", { text: "If enabled, this recipient may delegate their actions to another individual." })), h("div", { class: "buttons" }, h("button", { class: "delete-button", disabled: this.dirty, onClick: e => this.handleDelete(e), innerHTML: TrashIcon }), h("div", { style: { flex: '1' } }), h("verdocs-button", { size: "small", variant: "outline", label: "Cancel", disabled: !this.dirty, onClick: e => this.handleCancel(e) }), h("verdocs-button", { size: "small", label: "Save", disabled: !this.dirty, onClick: e => this.handleSave(e) })))))));
|
570
|
+
}
|
571
|
+
};
|
572
|
+
VerdocsTemplateRoleProperties.style = verdocsTemplateRolePropertiesCss;
|
573
|
+
|
611
574
|
const verdocsTemplateRolesCss = "verdocs-template-roles{display:block;min-width:400px;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-template-roles>form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;padding:12px}verdocs-template-roles>form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 10px 0}verdocs-template-roles>form .participants{position:relative}verdocs-template-roles>form .left-line{top:32px;left:11px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-template-roles>form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:0;-moz-column-gap:0;column-gap:0;min-height:35px;margin-left:40px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:6px 0 4px 0}verdocs-template-roles>form .row .row-roles{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles>form .row .icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-template-roles>form .row .sender{height:30px;display:-ms-flexbox;display:flex;font-size:14px;line-height:30px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 15px;border:1px solid #c6c9cc;background-color:#f5f5fa}verdocs-template-roles>form .row .complete{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;background-color:#f5f5fa;border:1px solid #aeb4bf}verdocs-template-roles>form .row .label{font-weight:bold;margin-right:6px;color:#33364b}verdocs-template-roles>form .row .settings-button{display:-ms-flexbox;display:flex;cursor:pointer;margin:0 0 0 9px}verdocs-template-roles>form .row .recipient{height:30px;display:-ms-flexbox;display:flex;font-size:14px;border-radius:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 6px;white-space:nowrap;border:2px solid #aeb4bf}verdocs-template-roles>form .row .recipient .type-icon{width:24px;height:24px;-webkit-transform:scale(0.8);transform:scale(0.8);opacity:0.6;margin:0 12px 0 0}verdocs-template-roles>form .row .recipient.dragging{position:absolute}verdocs-template-roles>form .row .recipient.dragging+.dropzone{display:none !important}verdocs-template-roles>form .row .dropzone{width:14px;height:30px;display:none}verdocs-template-roles>form .row .dropzone svg{fill:#cccccc}verdocs-template-roles>form .row .dropzone.visible{margin:0 7px;display:-ms-flexbox;display:flex;-ms-flex:0 0 14px;flex:0 0 14px}verdocs-template-roles>form .row .dropzone.active{-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;background:#654dcb7f;border:1px dashed #654dcb}verdocs-template-roles>form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-roles>form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-roles>form input:focus{outline:none}verdocs-template-roles .row.add-sequence{display:none}verdocs-template-roles .add-role{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-role:hover{opacity:1}verdocs-template-roles .add-role svg{width:32px;height:32px}verdocs-template-roles .add-step{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-step:hover{opacity:1}verdocs-template-roles .add-step svg{width:32px;height:32px}verdocs-template-roles.dragging .add-role{display:none}verdocs-template-roles.dragging form .row .recipient+.dropzone{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence .dropzone{opacity:0.5;-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;-ms-flex-align:center;align-items:center;background:#654dcb7f;-ms-flex-pack:center;justify-content:center;border:1px dashed #654dcb}verdocs-template-roles.dragging .row.add-sequence .dropzone.active{opacity:1}verdocs-template-roles .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles .empty{font-size:13px;margin-top:15px;margin-bottom:5px}verdocs-template-roles .empty svg{width:20px;height:20px;stroke:#666666;margin-bottom:-5px}verdocs-template-roles ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-moz-placeholder{color:#aaaaaa}verdocs-template-roles :-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::placeholder{color:#aaaaaa}";
|
612
575
|
|
613
576
|
const senderLabels = {
|
@@ -840,6 +803,7 @@ const VerdocsTemplateRoles = class {
|
|
840
803
|
}
|
841
804
|
render() {
|
842
805
|
var _a, _b, _c, _d, _e, _f;
|
806
|
+
console.log('[ROLES] Rendering');
|
843
807
|
if (!this.endpoint.session) {
|
844
808
|
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
845
809
|
}
|
@@ -870,4 +834,70 @@ const VerdocsTemplateRoles = class {
|
|
870
834
|
};
|
871
835
|
VerdocsTemplateRoles.style = verdocsTemplateRolesCss;
|
872
836
|
|
873
|
-
|
837
|
+
const verdocsTemplateSenderCss = "verdocs-template-sender{font-family:\"Barlow\", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender .background-overlay{position:absolute;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-template-sender .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-sender .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-sender .buttons verdocs-button{margin-left:16px}verdocs-template-sender .options{row-gap:10px}verdocs-template-sender .options .option{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .options .option .description{margin-left:10px}verdocs-template-sender .options .option .description .name{display:inline-block;vertical-align:top;margin-top:4px;margin-right:4px}";
|
838
|
+
|
839
|
+
const VerdocsTemplateSender = class {
|
840
|
+
constructor(hostRef) {
|
841
|
+
registerInstance(this, hostRef);
|
842
|
+
this.close = createEvent(this, "close", 7);
|
843
|
+
this.sdkError = createEvent(this, "sdkError", 7);
|
844
|
+
this.store = null;
|
845
|
+
this.endpoint = VerdocsEndpoint.getDefault();
|
846
|
+
this.templateId = '';
|
847
|
+
this.sender = TemplateSenderTypes.EVERYONE;
|
848
|
+
this.saving = false;
|
849
|
+
}
|
850
|
+
async componentWillLoad() {
|
851
|
+
var _a, _b, _c, _d, _e;
|
852
|
+
try {
|
853
|
+
this.endpoint.loadSession();
|
854
|
+
if (!this.templateId) {
|
855
|
+
console.log(`[SENDER] Missing required template ID ${this.templateId}`);
|
856
|
+
return;
|
857
|
+
}
|
858
|
+
if (!this.endpoint.session) {
|
859
|
+
console.log('[SENDER] Unable to start builder session, must be authenticated');
|
860
|
+
return;
|
861
|
+
}
|
862
|
+
this.store = await getTemplateStore(this.endpoint, this.templateId, false);
|
863
|
+
this.sender = (_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.sender;
|
864
|
+
}
|
865
|
+
catch (e) {
|
866
|
+
console.log('[SENDER] Error with preview session', e);
|
867
|
+
(_c = this.sdkError) === null || _c === void 0 ? void 0 : _c.emit(new SDKError(e.message, (_d = e.response) === null || _d === void 0 ? void 0 : _d.status, (_e = e.response) === null || _e === void 0 ? void 0 : _e.data));
|
868
|
+
}
|
869
|
+
}
|
870
|
+
handleClose() {
|
871
|
+
this.close.emit();
|
872
|
+
}
|
873
|
+
// We need a separate event handler for clicking the background because it can receive events "through" other child components
|
874
|
+
handleDismiss(e) {
|
875
|
+
if (e.target.className === 'background-overlay') {
|
876
|
+
e.preventDefault();
|
877
|
+
this.handleClose();
|
878
|
+
}
|
879
|
+
}
|
880
|
+
async handleSelectSetting(value) {
|
881
|
+
this.saving = true;
|
882
|
+
updateTemplate(this.endpoint, this.templateId, { sender: value })
|
883
|
+
.then(r => {
|
884
|
+
var _a;
|
885
|
+
console.log('Update result', r);
|
886
|
+
if ((_a = this.store) === null || _a === void 0 ? void 0 : _a.state) {
|
887
|
+
this.store.state.sender = value;
|
888
|
+
}
|
889
|
+
this.saving = false;
|
890
|
+
this.sender = value;
|
891
|
+
})
|
892
|
+
.catch(e => {
|
893
|
+
console.log('Error saving', e);
|
894
|
+
this.saving = false;
|
895
|
+
});
|
896
|
+
}
|
897
|
+
render() {
|
898
|
+
return (h(Host, null, h("div", { class: "background-overlay", onClick: e => this.handleDismiss(e) }, h("div", { class: "dialog" }, h("div", { class: "options" }, h("div", { class: "option" }, h("verdocs-radio-button", { name: "template-sender", value: TemplateSenderTypes.EVERYONE, checked: this.sender === TemplateSenderTypes.EVERYONE, onInput: () => this.handleSelectSetting(TemplateSenderTypes.EVERYONE) }), h("div", { class: "description" }, h("div", { class: "name" }, "Anyone on the Web"), h("verdocs-help-icon", { text: "Anyone can use this template. (Make its visibility is set to to 'Public' or 'Shared'.)" }))), h("div", { class: "option" }, h("verdocs-radio-button", { name: "template-sender", value: TemplateSenderTypes.EVERYONE_AS_CREATOR, checked: this.sender === TemplateSenderTypes.EVERYONE_AS_CREATOR, onInput: () => this.handleSelectSetting(TemplateSenderTypes.EVERYONE_AS_CREATOR) }), h("div", { class: "description" }, h("div", { class: "name" }, "Anyone on the Web as me"), h("verdocs-help-icon", { text: "Anyone can use this template on my behalf. (Make sure its visibility is set to 'Public' or 'Shared'.)" }))), h("div", { class: "option" }, h("verdocs-radio-button", { name: "template-sender", value: TemplateSenderTypes.ORGANIZATION_MEMBER, checked: this.sender === TemplateSenderTypes.ORGANIZATION_MEMBER, onInput: () => this.handleSelectSetting(TemplateSenderTypes.ORGANIZATION_MEMBER) }), h("div", { class: "description" }, h("div", { class: "name" }, "Anyone in my organization"), h("verdocs-help-icon", { text: "Anyone in my organization can use this template. (Make sure its visibility is set to 'Shared')" }))), h("div", { class: "option" }, h("verdocs-radio-button", { name: "template-sender", value: TemplateSenderTypes.ORGANIZATION_MEMBER_AS_CREATOR, checked: this.sender === TemplateSenderTypes.ORGANIZATION_MEMBER_AS_CREATOR, onInput: () => this.handleSelectSetting(TemplateSenderTypes.ORGANIZATION_MEMBER_AS_CREATOR) }), h("div", { class: "description" }, h("div", { class: "name" }, "Anyone in my organization as me"), h("verdocs-help-icon", { text: "Anyone in my organization can use this template on my behalf. (Make sure its visibility is set to to 'Shared'.)" }))), h("div", { class: "option" }, h("verdocs-radio-button", { name: "template-sender", value: TemplateSenderTypes.CREATOR, checked: this.sender === TemplateSenderTypes.CREATOR, onInput: () => this.handleSelectSetting(TemplateSenderTypes.CREATOR) }), h("div", { class: "description" }, h("div", { class: "name" }, "Me"), h("verdocs-help-icon", { text: "Only I can use this template." })))), h("div", { class: "buttons" }, h("verdocs-button", { label: "Close", onClick: () => this.handleClose() }))))));
|
899
|
+
}
|
900
|
+
};
|
901
|
+
VerdocsTemplateSender.style = verdocsTemplateSenderCss;
|
902
|
+
|
903
|
+
export { VerdocsTemplateFields as verdocs_template_fields, VerdocsTemplateRoleProperties as verdocs_template_role_properties, VerdocsTemplateRoles as verdocs_template_roles, VerdocsTemplateSender as verdocs_template_sender };
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-b18c0348.js';
|
2
2
|
import './Types-5f31149e.js';
|
3
3
|
import { u as updateTemplate } from './Templates-67172396.js';
|
4
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-
|
5
|
-
import { g as getTemplateStore } from './TemplateStore-
|
4
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-ca592138.js';
|
5
|
+
import { g as getTemplateStore } from './TemplateStore-5082a055.js';
|
6
6
|
import { S as SDKError } from './errors-9b5498c8.js';
|
7
7
|
|
8
8
|
const verdocsTemplateNameCss = "";
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-b18c0348.js';
|
2
2
|
import './Types-5f31149e.js';
|
3
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-
|
4
|
-
import { g as getTemplateStore } from './TemplateStore-
|
3
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-ca592138.js';
|
4
|
+
import { g as getTemplateStore } from './TemplateStore-5082a055.js';
|
5
5
|
import { S as SDKError } from './errors-9b5498c8.js';
|
6
6
|
import './Templates-67172396.js';
|
7
7
|
|