@verdocs/web-sdk 1.14.11 → 1.14.12
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/Roles-9b593b95.js +28 -0
- package/dist/cjs/{TemplateStore-19f84862.js → TemplateStore-f2fb6a62.js} +1 -1
- package/dist/cjs/{index-7c19ba1d.js → index-6528b430.js} +219 -63
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-618c13f1.js → utils-f4efefe3.js} +1 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-button-panel_3.cjs.entry.js +27 -14
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-dropdown_2.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-envelope-recipient-summary.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-date.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-signature.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-organization-card.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-radio-button_3.cjs.entry.js +241 -0
- package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-send.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-sign.cjs.entry.js +3 -3
- package/dist/cjs/{verdocs-template-fields_4.cjs.entry.js → verdocs-template-attachments_4.cjs.entry.js} +232 -241
- package/dist/cjs/{verdocs-template-document-page_2.cjs.entry.js → verdocs-template-document-page.cjs.entry.js} +3 -48
- package/dist/cjs/verdocs-template-name.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-reminders.cjs.entry.js +2 -12
- package/dist/cjs/verdocs-template-visibility.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-toolbar-icon.cjs.entry.js +51 -0
- package/dist/cjs/verdocs-view.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.js +27 -14
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.stories.js +1 -1
- package/dist/components/VerdocsEndpoint.js +30 -30
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.js +0 -1
- package/dist/components/index2.js +219 -63
- package/dist/components/verdocs-template-field-properties2.js +27 -13
- package/dist/components/verdocs-template-reminders.js +0 -10
- package/dist/docs.json +1 -102
- package/dist/esm/Roles-6eb459df.js +24 -0
- package/dist/esm/{TemplateStore-852097c3.js → TemplateStore-87c99dfc.js} +1 -1
- package/dist/esm/{index-914ed6f7.js → index-d264c496.js} +219 -63
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-60683446.js → utils-1bb75f32.js} +2 -2
- package/dist/esm/verdocs-auth.entry.js +1 -1
- package/dist/esm/verdocs-build.entry.js +2 -2
- package/dist/esm/verdocs-button-panel_3.entry.js +27 -14
- package/dist/esm/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm/verdocs-dropdown_2.entry.js +3 -3
- package/dist/esm/verdocs-envelope-recipient-summary.entry.js +1 -1
- package/dist/esm/verdocs-envelope-sidebar.entry.js +2 -2
- 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 +3 -3
- package/dist/esm/verdocs-field-textbox.entry.js +3 -3
- package/dist/esm/verdocs-field-timestamp.entry.js +2 -2
- package/dist/esm/verdocs-file-chooser_2.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 +1 -1
- package/dist/esm/verdocs-radio-button_3.entry.js +235 -0
- package/dist/esm/verdocs-search.entry.js +1 -1
- package/dist/esm/verdocs-send.entry.js +4 -4
- package/dist/esm/verdocs-sign.entry.js +3 -3
- package/dist/esm/{verdocs-template-fields_4.entry.js → verdocs-template-attachments_4.entry.js} +229 -238
- package/dist/esm/{verdocs-template-document-page_2.entry.js → verdocs-template-document-page.entry.js} +4 -48
- package/dist/esm/verdocs-template-name.entry.js +2 -2
- package/dist/esm/verdocs-template-reminders.entry.js +2 -12
- package/dist/esm/verdocs-template-visibility.entry.js +2 -2
- package/dist/esm/verdocs-toolbar-icon.entry.js +47 -0
- package/dist/esm/verdocs-view.entry.js +3 -3
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/Roles-6eb459df.js +1 -0
- package/dist/esm-es5/{TemplateStore-852097c3.js → TemplateStore-87c99dfc.js} +1 -1
- package/dist/esm-es5/{VerdocsEndpoint-5b92f115.js → VerdocsEndpoint-6d7a17ce.js} +1 -1
- package/dist/esm-es5/index-d264c496.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{utils-60683446.js → utils-1bb75f32.js} +2 -2
- 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-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-dropdown_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-recipient-summary.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.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-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_3.entry.js +1 -0
- 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-template-attachments_4.entry.js +1 -0
- package/dist/esm-es5/verdocs-template-document-page.entry.js +1 -0
- package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-visibility.entry.js +1 -1
- package/dist/esm-es5/verdocs-toolbar-icon.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/templates/verdocs-template-field-properties/verdocs-template-field-properties.d.ts +3 -2
- package/dist/types/components.d.ts +0 -29
- package/dist/verdocs-web-sdk/{p-be6d3848.entry.js → p-017dc2a9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0177fb6c.entry.js → p-10bb1e56.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9d7fa51d.system.entry.js → p-1236c197.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2c0d7838.system.entry.js → p-12f0c4e0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4a3b037b.system.entry.js → p-172f5d37.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c841a530.system.entry.js → p-19450d55.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-717c9fe1.entry.js → p-1c4f6ae6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-1cf38cea.system.js +1 -1
- package/dist/verdocs-web-sdk/p-1e8d9829.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-94365585.entry.js → p-204f69c7.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5cff98bd.entry.js → p-237edd0b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0529a428.system.entry.js → p-255a66f9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3fe24d0c.system.entry.js → p-25870f11.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-27846894.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-1420d87e.system.entry.js → p-2a3de488.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9c87f6f8.system.entry.js → p-2d2bdf3c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-dc849a58.system.js → p-365a0216.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0aee25b9.entry.js → p-365a8a00.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-33640d84.entry.js → p-3a9d248d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4b65e2f3.js → p-3ea489e9.js} +1 -1
- package/dist/verdocs-web-sdk/p-42aa31a9.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-8e386265.entry.js → p-43f5476c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-51a3ea62.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-e4ceaebf.system.entry.js → p-56c65857.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8aba7c0a.entry.js → p-5d19f075.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-5df694ab.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-21e90bbf.system.entry.js → p-7399931a.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7fb69dde.entry.js → p-750fabdb.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-76b73d80.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-095a3eba.system.entry.js → p-773a2544.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0e381c36.entry.js → p-789dc7fe.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f37f1ebc.system.entry.js → p-7917673a.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-8027431e.js +1 -0
- package/dist/verdocs-web-sdk/{p-73ea1ea3.entry.js → p-807dbe83.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-02a70b8e.system.entry.js → p-8109a994.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-8229e6df.system.js +1 -0
- package/dist/verdocs-web-sdk/p-83535db7.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-e2635788.system.entry.js → p-8387794f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1a0cccea.system.entry.js → p-886461cd.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-89f34463.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-fdda1309.entry.js → p-8dacb527.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f9bea98a.js → p-8fb2cf32.js} +2 -2
- package/dist/verdocs-web-sdk/{p-438daf23.entry.js → p-8fcb22ea.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ebca6188.entry.js → p-991afbb9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3e4f73cb.system.entry.js → p-9d90ed3d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-84457a67.system.entry.js → p-9dd19ab5.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-a3931094.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-a58691dc.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-813c2fae.system.entry.js → p-a596cd4f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a5bce263.entry.js → p-a5eebbfa.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4cc5d833.system.js → p-a6258dde.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-a654311c.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-c3ef7b4f.entry.js → p-a78616fe.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-ab01f71e.js +1 -0
- package/dist/verdocs-web-sdk/{p-0c0ac290.system.entry.js → p-ac2b339a.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-ad11a39a.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-1f561c42.entry.js → p-b1ffa27a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a3c06b62.entry.js → p-bbdafeac.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6a44fb56.system.entry.js → p-bcda78a9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-afa1f20b.system.entry.js → p-bf850bb9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f0db17e6.system.entry.js → p-c0635249.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e727af9c.system.entry.js → p-c4c8af4c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-380efff2.system.entry.js → p-c7dbe82b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f483cd49.entry.js → p-ca57cd6e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-13959c36.system.entry.js → p-d09a9e1b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e72c075e.entry.js → p-d146b48e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fa6b1145.system.js → p-d21e9e04.system.js} +2 -2
- package/dist/verdocs-web-sdk/{p-44ec0583.entry.js → p-d763dac2.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fcfd3193.system.entry.js → p-df439631.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-49b3ac56.entry.js → p-dfbf689b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7850f739.system.entry.js → p-e5365d23.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a4cbba4a.entry.js → p-e702cf26.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7ac080d6.entry.js → p-ededd783.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6e62e65a.entry.js → p-f61f02a7.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0b4ea5f9.js → p-ff662b13.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/ipc-test.cjs.entry.js +0 -37
- package/dist/cjs/verdocs-radio-button.cjs.entry.js +0 -23
- package/dist/cjs/verdocs-template-attachments_2.cjs.entry.js +0 -236
- package/dist/collection/components/other/ipctest/ipc-test.css +0 -4
- package/dist/collection/components/other/ipctest/ipc-test.js +0 -79
- package/dist/collection/components/other/ipctest/ipc-test.stories.js +0 -8
- package/dist/components/ipc-test.d.ts +0 -11
- package/dist/components/ipc-test.js +0 -142
- package/dist/esm/ipc-test.entry.js +0 -33
- package/dist/esm/verdocs-radio-button.entry.js +0 -19
- package/dist/esm/verdocs-template-attachments_2.entry.js +0 -231
- package/dist/esm-es5/index-914ed6f7.js +0 -1
- package/dist/esm-es5/ipc-test.entry.js +0 -1
- package/dist/esm-es5/verdocs-radio-button.entry.js +0 -1
- package/dist/esm-es5/verdocs-template-attachments_2.entry.js +0 -1
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +0 -1
- package/dist/esm-es5/verdocs-template-fields_4.entry.js +0 -1
- package/dist/types/components/other/ipctest/ipc-test.d.ts +0 -17
- package/dist/types/components/other/ipctest/ipc-test.stories.d.ts +0 -4
- package/dist/verdocs-web-sdk/p-52428dff.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-58bb657b.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-66f9132c.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-70b42a9c.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-8c5ffa7b.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a6e5814e.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-acaf51f7.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c220af42.js +0 -1
- package/dist/verdocs-web-sdk/p-d4c8f358.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-daf19924.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-dc9c4361.system.js +0 -1
- package/dist/verdocs-web-sdk/p-decf6a56.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f2b225b7.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f9c6fa6c.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-fdc4e659.entry.js +0 -1
- package/dist/cjs/{VerdocsEndpoint-f2af9468.js → VerdocsEndpoint-e6517a50.js} +30 -30
- package/dist/esm/{VerdocsEndpoint-5b92f115.js → VerdocsEndpoint-6d7a17ce.js} +30 -30
@@ -3,45 +3,245 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-70677d67.js');
|
6
|
-
const interact_min = require('./interact.min-ba5cc513.js');
|
7
6
|
require('./Types-f89f9116.js');
|
7
|
+
const TemplateDocuments = require('./TemplateDocuments-e2e0e6b7.js');
|
8
|
+
const VerdocsEndpoint = require('./VerdocsEndpoint-e6517a50.js');
|
9
|
+
const Icons = require('./Icons-a11fb3fc.js');
|
10
|
+
const TemplateStore = require('./TemplateStore-f2fb6a62.js');
|
11
|
+
const errors = require('./errors-0396da3d.js');
|
12
|
+
const Templates = require('./Templates-24580a13.js');
|
13
|
+
const interact_min = require('./interact.min-ba5cc513.js');
|
8
14
|
const Fields = require('./Fields-705a2168.js');
|
9
|
-
const VerdocsEndpoint = require('./VerdocsEndpoint-f2af9468.js');
|
10
15
|
const Primitives = require('./Primitives-be5088cb.js');
|
11
|
-
const utils = require('./utils-
|
12
|
-
const
|
13
|
-
const errors = require('./errors-0396da3d.js');
|
16
|
+
const utils = require('./utils-f4efefe3.js');
|
17
|
+
const Roles = require('./Roles-9b593b95.js');
|
14
18
|
const Colors = require('./Colors-e809dcc9.js');
|
15
|
-
|
19
|
+
require('./index-e84e0687.js');
|
16
20
|
require('./_commonjsHelpers-0c557e26.js');
|
17
21
|
require('./Envelopes-e5ffb6a5.js');
|
18
22
|
require('./Files-4bdc0c0f.js');
|
19
23
|
require('./Types-ee5afdf8.js');
|
20
|
-
require('./index-
|
21
|
-
require('./index-e84e0687.js');
|
24
|
+
require('./index-6528b430.js');
|
22
25
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
26
|
+
const verdocsTemplateAttachmentsCss = "verdocs-template-attachments{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#46497d}verdocs-template-attachments .attachments{margin:0 0 40px 0}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 0;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#33364b}verdocs-template-attachments .attachment:hover .trash-icon{display:-ms-flexbox;display:flex}verdocs-template-attachments .attachment:hover .pages{display:none}verdocs-template-attachments svg{width:28px;height:28px;fill:#5c6575;margin:2px 0 0 0}verdocs-template-attachments .file-icon{-ms-flex:0;flex:0}verdocs-template-attachments .pages{width:24px;height:24px;-ms-flex:0 0 24px;flex:0 0 24px;padding-left:4px;position:relative;margin:-10px 0 0 0}verdocs-template-attachments .pages .pages-icon{top:0;left:0;width:24px;height:24px;position:absolute}verdocs-template-attachments .pages .count{top:11px;left:7px;z-index:1;width:18px;font-size:12px;font-weight:500;position:absolute;text-align:center;letter-spacing:-2px}verdocs-template-attachments .filename{-ms-flex:1;flex:1;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-bottom:1px dotted #cccccc}verdocs-template-attachments .trash-icon{-ms-flex:0;flex:0;display:none}verdocs-template-attachments .trash-icon:hover{cursor:pointer}verdocs-template-attachments verdocs-file-chooser{margin:10px 0;border:2px dashed #979797}verdocs-template-attachments .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .progress-wrapper{padding:20px}verdocs-template-attachments .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-attachments ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-moz-placeholder{color:#aaaaaa}verdocs-template-attachments :-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::placeholder{color:#aaaaaa}";
|
27
|
+
|
28
|
+
const VerdocsTemplateAttachments = class {
|
29
|
+
constructor(hostRef) {
|
30
|
+
index.registerInstance(this, hostRef);
|
31
|
+
this.exit = index.createEvent(this, "exit", 7);
|
32
|
+
this.next = index.createEvent(this, "next", 7);
|
33
|
+
this.templateUpdate = index.createEvent(this, "templateUpdate", 7);
|
34
|
+
this.sdkError = index.createEvent(this, "sdkError", 7);
|
35
|
+
this.endpoint = VerdocsEndpoint.VerdocsEndpoint.getDefault();
|
36
|
+
this.templateId = '';
|
37
|
+
this.uploading = false;
|
38
|
+
this.progressLabel = 'Uploading...';
|
39
|
+
this.progressPercent = 0;
|
40
|
+
this.showDeleteError = false;
|
41
|
+
this.confirmDeleteDocument = null;
|
42
|
+
this.store = null;
|
43
|
+
}
|
44
|
+
async componentWillLoad() {
|
45
|
+
var _a, _b, _c;
|
46
|
+
try {
|
47
|
+
this.endpoint.loadSession();
|
48
|
+
if (!this.templateId) {
|
49
|
+
console.log(`[ROLES] Missing required template ID ${this.templateId}`);
|
50
|
+
return;
|
51
|
+
}
|
52
|
+
if (!this.endpoint.session) {
|
53
|
+
console.log('[ROLES] Unable to start builder session, must be authenticated');
|
54
|
+
return;
|
55
|
+
}
|
56
|
+
this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, false);
|
57
|
+
}
|
58
|
+
catch (e) {
|
59
|
+
console.log('[TEMPLATE ATTACHMENTS] Error loading template', e);
|
60
|
+
(_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(new errors.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));
|
61
|
+
}
|
62
|
+
}
|
63
|
+
handleCancel(e) {
|
64
|
+
e.stopPropagation();
|
65
|
+
this.exit.emit();
|
66
|
+
}
|
67
|
+
handleUploadProgress(percent) {
|
68
|
+
if (percent >= 99) {
|
69
|
+
this.progressPercent = 100;
|
70
|
+
this.progressLabel = 'Processing...';
|
71
|
+
}
|
72
|
+
else {
|
73
|
+
this.progressPercent = percent;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
async handleUpload(e) {
|
77
|
+
var _a, _b, _c;
|
78
|
+
e.stopPropagation();
|
79
|
+
const file = e.detail.file;
|
80
|
+
if (!file) {
|
81
|
+
return;
|
82
|
+
}
|
83
|
+
console.log('[ATTACHMENTS] Uploading...', file);
|
84
|
+
this.uploading = true;
|
85
|
+
this.progressLabel = 'Uploading...';
|
86
|
+
try {
|
87
|
+
const template = await TemplateDocuments.createTemplateDocument(this.endpoint, this.templateId, file, this.handleUploadProgress.bind(this));
|
88
|
+
console.log('[ATTACHMENTS] Created attachment', template);
|
89
|
+
this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, true);
|
90
|
+
console.log('[ATTACHMENTS] New template', this.store.state);
|
91
|
+
this.uploading = false;
|
92
|
+
this.progressLabel = '';
|
93
|
+
this.progressPercent = 0;
|
94
|
+
}
|
95
|
+
catch (e) {
|
96
|
+
console.log('[ATTACHMENTS] Error creating template', e);
|
97
|
+
(_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(new errors.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));
|
98
|
+
this.uploading = false;
|
99
|
+
}
|
100
|
+
}
|
101
|
+
handleNext(e) {
|
102
|
+
var _a;
|
103
|
+
e.stopPropagation();
|
104
|
+
this.uploading = false;
|
105
|
+
this.progressLabel = '';
|
106
|
+
this.progressPercent = 0;
|
107
|
+
(_a = this.next) === null || _a === void 0 ? void 0 : _a.emit({ template: this.store.state });
|
108
|
+
}
|
109
|
+
async confirmDelete() {
|
110
|
+
await TemplateDocuments.deleteTemplateDocument(this.endpoint, this.templateId, this.confirmDeleteDocument.id);
|
111
|
+
this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, true);
|
112
|
+
console.log('[ATTACHMENTS] New template', this.store.state);
|
113
|
+
this.confirmDeleteDocument = null;
|
114
|
+
}
|
115
|
+
async handleDelete(document) {
|
116
|
+
var _a;
|
117
|
+
if (((_a = this.store.state) === null || _a === void 0 ? void 0 : _a.template_documents.length) > 1) {
|
118
|
+
this.confirmDeleteDocument = document;
|
119
|
+
}
|
120
|
+
else {
|
121
|
+
this.showDeleteError = true;
|
122
|
+
}
|
123
|
+
}
|
124
|
+
getFileIcon(document) {
|
125
|
+
switch (document.mime) {
|
126
|
+
case 'application/pdf':
|
127
|
+
return Icons.PdfIcon;
|
128
|
+
case 'image/jpeg':
|
129
|
+
return Icons.JpgIcon;
|
130
|
+
case 'image/png':
|
131
|
+
return Icons.PngIcon;
|
132
|
+
case 'application/msword':
|
133
|
+
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
|
134
|
+
return Icons.DocIcon;
|
135
|
+
}
|
136
|
+
return Icons.FileIcon;
|
137
|
+
}
|
138
|
+
render() {
|
139
|
+
var _a, _b, _c;
|
140
|
+
if (!this.endpoint.session) {
|
141
|
+
return (index.h(index.Host, null, index.h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
142
|
+
}
|
143
|
+
const templateState = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state;
|
144
|
+
if (!templateState.isLoaded) {
|
145
|
+
return (index.h(index.Host, { class: "loading" }, index.h("verdocs-loader", null)));
|
146
|
+
}
|
147
|
+
// This is meant to be a companion for larger visual experiences so we just go blank on errors for now.
|
148
|
+
if (!this.endpoint.session || !templateState.profile_id) {
|
149
|
+
return index.h(index.Host, { class: "empty" });
|
150
|
+
}
|
151
|
+
return (index.h(index.Host, null, index.h("h5", null, "Existing Attachments"), index.h("div", { class: "attachments" }, (_b = this.store) === null || _b === void 0 ? void 0 : _b.state.template_documents.map(document => (index.h("div", { class: "attachment" }, index.h("div", { class: "file-icon", innerHTML: this.getFileIcon(document) }), index.h("div", { class: "filename", title: document.name }, document.name), index.h("div", { class: "pages" }, index.h("div", { class: "count" }, document.page_numbers), index.h("div", { class: "pages-icon", innerHTML: Icons.PageCountIcon })), index.h("div", { class: "trash-icon", innerHTML: Icons.TrashIcon, onClick: () => this.handleDelete(document) }))))), index.h("h5", null, "Attach a New Document"), this.uploading ? (index.h("div", { class: "loader-wrapper" }, index.h("verdocs-loader", null), this.progressLabel && (index.h("div", { class: "progress-wrapper" }, index.h("verdocs-progress-bar", { showPercent: true, percent: this.progressPercent, label: this.progressLabel }))))) : (index.h("verdocs-file-chooser", { onFileSelected: e => this.handleUpload(e) })), index.h("div", { class: "buttons" }, index.h("verdocs-button", { variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e), disabled: this.uploading }), index.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 && (index.h("verdocs-ok-dialog", { heading: "Unable to Delete Attachment", message: "Templates must contain at least one attachment.", onNext: () => (this.showDeleteError = false) })), this.confirmDeleteDocument && (index.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: () => {
|
152
|
+
this.confirmDeleteDocument = null;
|
153
|
+
} }))));
|
154
|
+
}
|
39
155
|
};
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
156
|
+
VerdocsTemplateAttachments.style = verdocsTemplateAttachmentsCss;
|
157
|
+
|
158
|
+
const verdocsTemplateCreateCss = "verdocs-template-create{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box.drag-over{border:2px solid #4c56cb}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .progress-wrapper{padding:20px}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}";
|
159
|
+
|
160
|
+
const unicodeNBSP = ' ';
|
161
|
+
const FileIcon = '<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>';
|
162
|
+
const VerdocsTemplateCreate = class {
|
163
|
+
constructor(hostRef) {
|
164
|
+
index.registerInstance(this, hostRef);
|
165
|
+
this.exit = index.createEvent(this, "exit", 7);
|
166
|
+
this.next = index.createEvent(this, "next", 7);
|
167
|
+
this.sdkError = index.createEvent(this, "sdkError", 7);
|
168
|
+
this.endpoint = VerdocsEndpoint.VerdocsEndpoint.getDefault();
|
169
|
+
this.file = undefined;
|
170
|
+
this.creating = false;
|
171
|
+
this.progressLabel = 'Uploading...';
|
172
|
+
this.progressPercent = 0;
|
173
|
+
}
|
174
|
+
componentWillLoad() {
|
175
|
+
this.endpoint.setTimeout(30000);
|
176
|
+
this.endpoint.loadSession();
|
177
|
+
}
|
178
|
+
handleFileChanged(e) {
|
179
|
+
var _a;
|
180
|
+
this.file = ((_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0]) || null;
|
181
|
+
console.log('[CREATE] Selected file', this.file);
|
182
|
+
// this.filePath = e.target.files?.[0]?.name;
|
183
|
+
}
|
184
|
+
handleUpload(e) {
|
185
|
+
e.stopPropagation();
|
186
|
+
const fileElem = document.getElementById('verdocs-template-create-file');
|
187
|
+
fileElem.click();
|
188
|
+
}
|
189
|
+
handleCancel(e) {
|
190
|
+
e.stopPropagation();
|
191
|
+
this.exit.emit();
|
192
|
+
}
|
193
|
+
async handleSubmit(e) {
|
194
|
+
var _a, _b, _c, _d;
|
195
|
+
e.stopPropagation();
|
196
|
+
console.log('Submitting');
|
197
|
+
// Should be true if we're here because onClick is only enabled then. We're just guarding this for Typescript.
|
198
|
+
if (!this.file) {
|
199
|
+
return;
|
200
|
+
}
|
201
|
+
this.creating = true;
|
202
|
+
this.progressLabel = 'Uploading...';
|
203
|
+
try {
|
204
|
+
const template = await Templates.createTemplate(this.endpoint, { name: this.file.name, documents: [this.file] }, percent => {
|
205
|
+
if (percent >= 99) {
|
206
|
+
this.progressLabel = 'Processing...';
|
207
|
+
this.progressPercent = 100;
|
208
|
+
}
|
209
|
+
else {
|
210
|
+
this.progressPercent = percent;
|
211
|
+
}
|
212
|
+
});
|
213
|
+
console.log('[CREATE] Created template', template);
|
214
|
+
(_a = this.next) === null || _a === void 0 ? void 0 : _a.emit(template);
|
215
|
+
this.creating = false;
|
216
|
+
this.progressLabel = '';
|
217
|
+
this.progressPercent = 0;
|
218
|
+
}
|
219
|
+
catch (e) {
|
220
|
+
console.log('[CREATE] Error creating template', e);
|
221
|
+
(_b = this.sdkError) === null || _b === void 0 ? void 0 : _b.emit(new errors.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));
|
222
|
+
this.creating = false;
|
223
|
+
}
|
224
|
+
}
|
225
|
+
render() {
|
226
|
+
if (!this.endpoint.session) {
|
227
|
+
return (index.h(index.Host, null, index.h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
228
|
+
}
|
229
|
+
return (index.h(index.Host, null, index.h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, index.h("input", { type: "file", id: "verdocs-template-create-file", multiple: true, accept: "application/pdf", style: { display: 'none' }, onChange: e => this.handleFileChanged(e) }), this.creating ? (index.h("div", { class: "loader-wrapper" }, index.h("verdocs-loader", null), this.progressLabel && (index.h("div", { class: "progress-wrapper" }, index.h("verdocs-progress-bar", { showPercent: true, percent: this.progressPercent, label: this.progressLabel }))))) : (index.h("div", { class: "upload-box", onDrop: (e) => {
|
230
|
+
e.preventDefault();
|
231
|
+
e.target.classList.remove('drag-over');
|
232
|
+
this.file = e.dataTransfer.files[0];
|
233
|
+
}, onDragOver: (e) => {
|
234
|
+
e.preventDefault();
|
235
|
+
e.dataTransfer.dropEffect = 'copy';
|
236
|
+
}, onDragEnter: (e) => e.target.classList.add('drag-over'), onDragLeave: (e) => e.target.classList.remove('drag-over') }, index.h("div", null, index.h("span", { innerHTML: FileIcon })), index.h("div", { style: { marginTop: '20px', fontSize: '20px', fontWeight: 'bold', overflowWrap: 'anywhere' } }, this.file ? this.file.name : 'Drag a file here'), index.h("div", { style: {
|
237
|
+
marginTop: '20px',
|
238
|
+
marginBottom: '20px',
|
239
|
+
fontSize: '16px',
|
240
|
+
height: '20px',
|
241
|
+
} }, this.file ? unicodeNBSP : 'Or, if you prefer...'), index.h("verdocs-button", { label: this.file ? 'Select a different file' : 'Select a file from your computer', size: "small", onClick: e => this.handleUpload(e) }))), index.h("div", { class: "buttons" }, index.h("verdocs-button", { variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e), disabled: this.creating }), index.h("verdocs-button", { label: "Next", size: "small", onClick: e => this.handleSubmit(e), disabled: !this.file || this.creating })))));
|
242
|
+
}
|
44
243
|
};
|
244
|
+
VerdocsTemplateCreate.style = verdocsTemplateCreateCss;
|
45
245
|
|
46
246
|
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}";
|
47
247
|
|
@@ -441,149 +641,6 @@ const VerdocsTemplateFields = class {
|
|
441
641
|
};
|
442
642
|
VerdocsTemplateFields.style = verdocsTemplateFieldsCss;
|
443
643
|
|
444
|
-
const verdocsTemplateRolePropertiesCss = "verdocs-template-role-properties{font-family:\"Inter\", \"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;padding:0 6px;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 svg{width:24px;height:24px}verdocs-template-role-properties .delete-button:active{background:#f3f3f3}";
|
445
|
-
|
446
|
-
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>`;
|
447
|
-
const VerdocsTemplateRoleProperties = class {
|
448
|
-
constructor(hostRef) {
|
449
|
-
index.registerInstance(this, hostRef);
|
450
|
-
this.close = index.createEvent(this, "close", 7);
|
451
|
-
this.delete = index.createEvent(this, "delete", 7);
|
452
|
-
this.sdkError = index.createEvent(this, "sdkError", 7);
|
453
|
-
this.store = null;
|
454
|
-
this.endpoint = VerdocsEndpoint.VerdocsEndpoint.getDefault();
|
455
|
-
this.templateId = '';
|
456
|
-
this.roleName = '';
|
457
|
-
this.sender = VerdocsEndpoint.TemplateSenderTypes.EVERYONE;
|
458
|
-
this.dirty = false;
|
459
|
-
this.saving = false;
|
460
|
-
this.name = '';
|
461
|
-
this.type = 'signer';
|
462
|
-
this.fullName = '';
|
463
|
-
this.email = '';
|
464
|
-
this.phone = '';
|
465
|
-
this.allowDelegation = false;
|
466
|
-
}
|
467
|
-
async componentWillLoad() {
|
468
|
-
var _a, _b, _c, _d, _e;
|
469
|
-
try {
|
470
|
-
this.endpoint.loadSession();
|
471
|
-
if (!this.templateId) {
|
472
|
-
console.log(`[ROLE_PROPERTIES] Missing required template ID ${this.templateId}`);
|
473
|
-
return;
|
474
|
-
}
|
475
|
-
if (!this.endpoint.session) {
|
476
|
-
console.log('[ROLE_PROPERTIES] Unable to start builder session, must be authenticated');
|
477
|
-
return;
|
478
|
-
}
|
479
|
-
this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, false);
|
480
|
-
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);
|
481
|
-
if (editingRole) {
|
482
|
-
this.name = editingRole.name;
|
483
|
-
this.type = editingRole.type;
|
484
|
-
this.fullName = editingRole.full_name;
|
485
|
-
this.email = editingRole.email;
|
486
|
-
this.phone = editingRole.phone;
|
487
|
-
this.allowDelegation = editingRole.delegator;
|
488
|
-
console.log('[ROLES] Editing role', editingRole);
|
489
|
-
}
|
490
|
-
}
|
491
|
-
catch (e) {
|
492
|
-
console.log('[TEMPLATE ROLE PROPERTIES] Error with preview session', e);
|
493
|
-
(_c = this.sdkError) === null || _c === void 0 ? void 0 : _c.emit(new errors.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));
|
494
|
-
}
|
495
|
-
}
|
496
|
-
handleCancel(e) {
|
497
|
-
var _a, _b, _c;
|
498
|
-
e.stopPropagation();
|
499
|
-
this.name = (_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.name;
|
500
|
-
this.dirty = false;
|
501
|
-
(_c = this.close) === null || _c === void 0 ? void 0 : _c.emit();
|
502
|
-
}
|
503
|
-
async handleSave(e) {
|
504
|
-
e.stopPropagation();
|
505
|
-
this.saving = true;
|
506
|
-
updateRole(this.endpoint, this.templateId, this.roleName, {
|
507
|
-
name: this.name,
|
508
|
-
type: this.type,
|
509
|
-
full_name: this.fullName,
|
510
|
-
email: this.email,
|
511
|
-
phone: this.phone,
|
512
|
-
delegator: this.allowDelegation,
|
513
|
-
})
|
514
|
-
.then(async (r) => {
|
515
|
-
var _a;
|
516
|
-
console.log('[ROLE_PROPERTIES] Update result', r);
|
517
|
-
this.saving = false;
|
518
|
-
this.dirty = false;
|
519
|
-
this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, true);
|
520
|
-
// this.sortTemplateRoles();
|
521
|
-
// this.renumberTemplateRoles();
|
522
|
-
// const newRoles = [...this.store.state.roles];
|
523
|
-
// newRoles.forEach(role => {
|
524
|
-
// if (role.name === this.roleName) {
|
525
|
-
// role.name = this.name;
|
526
|
-
// role.type = this.type;
|
527
|
-
// role.full_name = this.fullName;
|
528
|
-
// role.email = this.email;
|
529
|
-
// role.phone = this.phone;
|
530
|
-
// role.delegator = this.allowDelegation;
|
531
|
-
// }
|
532
|
-
// });
|
533
|
-
// this.store.state.roles = newRoles;
|
534
|
-
(_a = this.close) === null || _a === void 0 ? void 0 : _a.emit();
|
535
|
-
})
|
536
|
-
.catch(e => {
|
537
|
-
console.log('Update error', e);
|
538
|
-
this.saving = false;
|
539
|
-
});
|
540
|
-
}
|
541
|
-
async handleDelete(e) {
|
542
|
-
e.stopPropagation();
|
543
|
-
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.')) {
|
544
|
-
deleteRole(this.endpoint, this.templateId, this.roleName)
|
545
|
-
.then(r => {
|
546
|
-
var _a;
|
547
|
-
console.log('Role deleted', r);
|
548
|
-
this.store.state.roles = [...this.store.state.roles.filter(role => role.name !== this.roleName)];
|
549
|
-
(_a = this.delete) === null || _a === void 0 ? void 0 : _a.emit({ templateId: this.templateId, roleName: this.roleName });
|
550
|
-
})
|
551
|
-
.catch(e => {
|
552
|
-
console.log('Deletion error', e);
|
553
|
-
});
|
554
|
-
}
|
555
|
-
}
|
556
|
-
render() {
|
557
|
-
const hasFields = (this.store.state.fields || []).findIndex(field => field.role_name === this.roleName) !== -1;
|
558
|
-
return (index.h(index.Host, null, index.h("div", { class: "background-overlay", onClick: e => this.handleCancel(e) }, index.h("div", { class: "dialog" }, index.h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, index.h("verdocs-text-input", { id: "verdocs-recipient-name", label: "Role Name", value: this.name, autocomplete: "off", disabled: hasFields, helpText: hasFields
|
559
|
-
? 'This role has fields assigned and can no longer be renamed.'
|
560
|
-
: 'A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.', placeholder: "Template Name...", onInput: (e) => {
|
561
|
-
this.name = e.target.value;
|
562
|
-
this.dirty = true;
|
563
|
-
} }), index.h("div", { class: "row" }, index.h("div", { class: "input-label" }, "Type:"), index.h("verdocs-select-input", { value: this.type, options: [
|
564
|
-
{ label: 'Signer', value: 'signer' },
|
565
|
-
{ label: 'CC', value: 'cc' },
|
566
|
-
{ label: 'Approver', value: 'approver' },
|
567
|
-
], onInput: (e) => {
|
568
|
-
this.type = e.target.value;
|
569
|
-
this.dirty = true;
|
570
|
-
} }), index.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." })), index.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) => {
|
571
|
-
this.fullName = e.target.value;
|
572
|
-
this.dirty = true;
|
573
|
-
} }), index.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) => {
|
574
|
-
this.email = e.target.value;
|
575
|
-
this.dirty = true;
|
576
|
-
} }), index.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) => {
|
577
|
-
this.phone = e.target.value;
|
578
|
-
this.dirty = true;
|
579
|
-
} }), index.h("div", { class: "row" }, index.h("div", { class: "input-label" }, "May Delegate:"), index.h("div", { class: "checkbox-wrapper" }, index.h("verdocs-checkbox", { checked: this.allowDelegation, onInput: (e) => {
|
580
|
-
this.allowDelegation = e.target.checked;
|
581
|
-
this.dirty = true;
|
582
|
-
} })), index.h("verdocs-help-icon", { text: "If enabled, this recipient may delegate their actions to another individual." })), index.h("div", { class: "buttons" }, index.h("button", { class: "delete-button", disabled: this.dirty, onClick: e => this.handleDelete(e), innerHTML: TrashIcon }), index.h("div", { style: { flex: '1' } }), index.h("verdocs-button", { size: "small", variant: "outline", label: "Cancel", disabled: !this.dirty, onClick: e => this.handleCancel(e) }), index.h("verdocs-button", { size: "small", label: "Save", disabled: !this.dirty, onClick: e => this.handleSave(e) })))))));
|
583
|
-
}
|
584
|
-
};
|
585
|
-
VerdocsTemplateRoleProperties.style = verdocsTemplateRolePropertiesCss;
|
586
|
-
|
587
644
|
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;gap:10px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-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}";
|
588
645
|
|
589
646
|
const senderLabels = {
|
@@ -693,7 +750,7 @@ const VerdocsTemplateRoles = class {
|
|
693
750
|
// We have to update ALL the roles to be sure each gets new proper sequence/order numbers assigned.
|
694
751
|
// TODO: We could optimize this by tracking "dirty" states and only update the roles that have changed. But it's a LOT more
|
695
752
|
// code to do right, and since most workflows will typically only have 2-4 recipients max, it may not be worth it.
|
696
|
-
Promise.all((_e = (_d = this.store) === null || _d === void 0 ? void 0 : _d.state) === null || _e === void 0 ? void 0 : _e.roles.map(role => updateRole(this.endpoint, this.templateId, role.name, {
|
753
|
+
Promise.all((_e = (_d = this.store) === null || _d === void 0 ? void 0 : _d.state) === null || _e === void 0 ? void 0 : _e.roles.map(role => Roles.updateRole(this.endpoint, this.templateId, role.name, {
|
697
754
|
sequence: role.sequence,
|
698
755
|
order: role.order,
|
699
756
|
})))
|
@@ -775,7 +832,7 @@ const VerdocsTemplateRoles = class {
|
|
775
832
|
}
|
776
833
|
callCreateRole(name, sequence, order) {
|
777
834
|
console.log('[ROLES] Will create role', { name, sequence, order });
|
778
|
-
createRole(this.endpoint, this.templateId, {
|
835
|
+
Roles.createRole(this.endpoint, this.templateId, {
|
779
836
|
template_id: this.templateId,
|
780
837
|
name,
|
781
838
|
sequence,
|
@@ -847,73 +904,7 @@ const VerdocsTemplateRoles = class {
|
|
847
904
|
};
|
848
905
|
VerdocsTemplateRoles.style = verdocsTemplateRolesCss;
|
849
906
|
|
850
|
-
|
851
|
-
|
852
|
-
const VerdocsTemplateSender = class {
|
853
|
-
constructor(hostRef) {
|
854
|
-
index.registerInstance(this, hostRef);
|
855
|
-
this.close = index.createEvent(this, "close", 7);
|
856
|
-
this.sdkError = index.createEvent(this, "sdkError", 7);
|
857
|
-
this.store = null;
|
858
|
-
this.endpoint = VerdocsEndpoint.VerdocsEndpoint.getDefault();
|
859
|
-
this.templateId = '';
|
860
|
-
this.sender = VerdocsEndpoint.TemplateSenderTypes.EVERYONE;
|
861
|
-
this.saving = false;
|
862
|
-
}
|
863
|
-
async componentWillLoad() {
|
864
|
-
var _a, _b, _c, _d, _e;
|
865
|
-
try {
|
866
|
-
this.endpoint.loadSession();
|
867
|
-
if (!this.templateId) {
|
868
|
-
console.log(`[SENDER] Missing required template ID ${this.templateId}`);
|
869
|
-
return;
|
870
|
-
}
|
871
|
-
if (!this.endpoint.session) {
|
872
|
-
console.log('[SENDER] Unable to start builder session, must be authenticated');
|
873
|
-
return;
|
874
|
-
}
|
875
|
-
this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, false);
|
876
|
-
this.sender = (_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.sender;
|
877
|
-
}
|
878
|
-
catch (e) {
|
879
|
-
console.log('[SENDER] Error with preview session', e);
|
880
|
-
(_c = this.sdkError) === null || _c === void 0 ? void 0 : _c.emit(new errors.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));
|
881
|
-
}
|
882
|
-
}
|
883
|
-
handleClose() {
|
884
|
-
this.close.emit();
|
885
|
-
}
|
886
|
-
// We need a separate event handler for clicking the background because it can receive events "through" other child components
|
887
|
-
handleDismiss(e) {
|
888
|
-
if (e.target.className === 'background-overlay') {
|
889
|
-
e.preventDefault();
|
890
|
-
this.handleClose();
|
891
|
-
}
|
892
|
-
}
|
893
|
-
async handleSelectSetting(value) {
|
894
|
-
this.saving = true;
|
895
|
-
Templates.updateTemplate(this.endpoint, this.templateId, { sender: value })
|
896
|
-
.then(r => {
|
897
|
-
var _a;
|
898
|
-
console.log('Update result', r);
|
899
|
-
if ((_a = this.store) === null || _a === void 0 ? void 0 : _a.state) {
|
900
|
-
this.store.state.sender = value;
|
901
|
-
}
|
902
|
-
this.saving = false;
|
903
|
-
this.sender = value;
|
904
|
-
})
|
905
|
-
.catch(e => {
|
906
|
-
console.log('Error saving', e);
|
907
|
-
this.saving = false;
|
908
|
-
});
|
909
|
-
}
|
910
|
-
render() {
|
911
|
-
return (index.h(index.Host, null, index.h("div", { class: "background-overlay", onClick: e => this.handleDismiss(e) }, index.h("div", { class: "dialog" }, index.h("div", { class: "options" }, index.h("div", { class: "option" }, index.h("verdocs-radio-button", { name: "template-sender", value: VerdocsEndpoint.TemplateSenderTypes.EVERYONE, checked: this.sender === VerdocsEndpoint.TemplateSenderTypes.EVERYONE, onInput: () => this.handleSelectSetting(VerdocsEndpoint.TemplateSenderTypes.EVERYONE) }), index.h("div", { class: "description" }, index.h("div", { class: "name" }, "Anyone on the Web"), index.h("verdocs-help-icon", { text: "Anyone can use this template. (Make its visibility is set to to 'Public' or 'Shared'.)" }))), index.h("div", { class: "option" }, index.h("verdocs-radio-button", { name: "template-sender", value: VerdocsEndpoint.TemplateSenderTypes.EVERYONE_AS_CREATOR, checked: this.sender === VerdocsEndpoint.TemplateSenderTypes.EVERYONE_AS_CREATOR, onInput: () => this.handleSelectSetting(VerdocsEndpoint.TemplateSenderTypes.EVERYONE_AS_CREATOR) }), index.h("div", { class: "description" }, index.h("div", { class: "name" }, "Anyone on the Web as me"), index.h("verdocs-help-icon", { text: "Anyone can use this template on my behalf. (Make sure its visibility is set to 'Public' or 'Shared'.)" }))), index.h("div", { class: "option" }, index.h("verdocs-radio-button", { name: "template-sender", value: VerdocsEndpoint.TemplateSenderTypes.ORGANIZATION_MEMBER, checked: this.sender === VerdocsEndpoint.TemplateSenderTypes.ORGANIZATION_MEMBER, onInput: () => this.handleSelectSetting(VerdocsEndpoint.TemplateSenderTypes.ORGANIZATION_MEMBER) }), index.h("div", { class: "description" }, index.h("div", { class: "name" }, "Anyone in my organization"), index.h("verdocs-help-icon", { text: "Anyone in my organization can use this template. (Make sure its visibility is set to 'Shared')" }))), index.h("div", { class: "option" }, index.h("verdocs-radio-button", { name: "template-sender", value: VerdocsEndpoint.TemplateSenderTypes.ORGANIZATION_MEMBER_AS_CREATOR, checked: this.sender === VerdocsEndpoint.TemplateSenderTypes.ORGANIZATION_MEMBER_AS_CREATOR, onInput: () => this.handleSelectSetting(VerdocsEndpoint.TemplateSenderTypes.ORGANIZATION_MEMBER_AS_CREATOR) }), index.h("div", { class: "description" }, index.h("div", { class: "name" }, "Anyone in my organization as me"), index.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'.)" }))), index.h("div", { class: "option" }, index.h("verdocs-radio-button", { name: "template-sender", value: VerdocsEndpoint.TemplateSenderTypes.CREATOR, checked: this.sender === VerdocsEndpoint.TemplateSenderTypes.CREATOR, onInput: () => this.handleSelectSetting(VerdocsEndpoint.TemplateSenderTypes.CREATOR) }), index.h("div", { class: "description" }, index.h("div", { class: "name" }, "Me"), index.h("verdocs-help-icon", { text: "Only I can use this template." })))), index.h("div", { class: "buttons" }, index.h("verdocs-button", { label: "Close", onClick: () => this.handleClose() }))))));
|
912
|
-
}
|
913
|
-
};
|
914
|
-
VerdocsTemplateSender.style = verdocsTemplateSenderCss;
|
915
|
-
|
907
|
+
exports.verdocs_template_attachments = VerdocsTemplateAttachments;
|
908
|
+
exports.verdocs_template_create = VerdocsTemplateCreate;
|
916
909
|
exports.verdocs_template_fields = VerdocsTemplateFields;
|
917
|
-
exports.verdocs_template_role_properties = VerdocsTemplateRoleProperties;
|
918
910
|
exports.verdocs_template_roles = VerdocsTemplateRoles;
|
919
|
-
exports.verdocs_template_sender = VerdocsTemplateSender;
|
@@ -5,14 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
const index = require('./index-70677d67.js');
|
6
6
|
require('./Types-f89f9116.js');
|
7
7
|
const TemplateDocuments = require('./TemplateDocuments-e2e0e6b7.js');
|
8
|
-
const VerdocsEndpoint = require('./VerdocsEndpoint-
|
9
|
-
const utils = require('./utils-
|
10
|
-
const popper = require('./popper-9def2535.js');
|
8
|
+
const VerdocsEndpoint = require('./VerdocsEndpoint-e6517a50.js');
|
9
|
+
const utils = require('./utils-f4efefe3.js');
|
11
10
|
require('./_commonjsHelpers-0c557e26.js');
|
12
11
|
require('./Envelopes-e5ffb6a5.js');
|
13
12
|
require('./Files-4bdc0c0f.js');
|
14
13
|
require('./Types-ee5afdf8.js');
|
15
|
-
require('./index-
|
14
|
+
require('./index-6528b430.js');
|
16
15
|
|
17
16
|
const verdocsTemplateDocumentPageCss = "verdocs-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}";
|
18
17
|
|
@@ -103,48 +102,4 @@ const VerdocsTemplateDocumentPage = class {
|
|
103
102
|
};
|
104
103
|
VerdocsTemplateDocumentPage.style = verdocsTemplateDocumentPageCss;
|
105
104
|
|
106
|
-
const verdocsToolbarIconCss = "verdocs-toolbar-icon{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;display:inline-block}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:\"\";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}";
|
107
|
-
|
108
|
-
const VerdocsToolbarIcon = class {
|
109
|
-
constructor(hostRef) {
|
110
|
-
index.registerInstance(this, hostRef);
|
111
|
-
this.text = '';
|
112
|
-
this.icon = '';
|
113
|
-
this.placement = 'bottom';
|
114
|
-
this.containerId = `verdocs-toolbar-icon-${Math.random().toString(36).substring(2, 11)}`;
|
115
|
-
}
|
116
|
-
componentDidLoad() {
|
117
|
-
this.popperInstance = popper.createPopper(this.iconEl, this.tooltip, {
|
118
|
-
placement: this.placement,
|
119
|
-
modifiers: this.placement === 'left' ? [{ name: 'offset', options: { offset: [0, 20] } }] : [],
|
120
|
-
});
|
121
|
-
// placement: 'top-end',
|
122
|
-
// modifiers: [{name: 'offset', options: {offset: [0, 10]}}],
|
123
|
-
// });
|
124
|
-
}
|
125
|
-
disconnectedCallback() {
|
126
|
-
if (this.popperInstance) {
|
127
|
-
this.popperInstance.destroy();
|
128
|
-
this.popperInstance = null;
|
129
|
-
}
|
130
|
-
}
|
131
|
-
show() {
|
132
|
-
var _a, _b;
|
133
|
-
(_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.setAttribute('data-show', '');
|
134
|
-
(_b = this.popperInstance) === null || _b === void 0 ? void 0 : _b.update().catch(() => { });
|
135
|
-
}
|
136
|
-
hide() {
|
137
|
-
var _a;
|
138
|
-
(_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.removeAttribute('data-show');
|
139
|
-
}
|
140
|
-
// handlePress() {
|
141
|
-
// this.press?.emit();
|
142
|
-
// }
|
143
|
-
render() {
|
144
|
-
return (index.h(index.Host, { class: {} }, index.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) }), index.h("div", { id: this.containerId, role: "tooltip", class: "tooltip", "data-popper-placement": this.placement, ref: el => (this.tooltip = el) }, this.text, index.h("div", { "data-popper-arrow": "true", class: "arrow" }))));
|
145
|
-
}
|
146
|
-
};
|
147
|
-
VerdocsToolbarIcon.style = verdocsToolbarIconCss;
|
148
|
-
|
149
105
|
exports.verdocs_template_document_page = VerdocsTemplateDocumentPage;
|
150
|
-
exports.verdocs_toolbar_icon = VerdocsToolbarIcon;
|