@verdocs/web-sdk 2.0.4 → 2.0.6
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-cd05c035.js → TemplateStore-07e274ab.js} +1 -1
- package/dist/cjs/{Templates-6fb62dcd.js → Templates-f6e75719.js} +15 -56
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
- package/dist/cjs/{verdocs-button-panel_2.cjs.entry.js → verdocs-button-panel_3.cjs.entry.js} +19 -2
- package/dist/cjs/{verdocs-checkbox_5.cjs.entry.js → verdocs-checkbox_4.cjs.entry.js} +0 -17
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-preview.cjs.entry.js +2 -2
- 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-send.cjs.entry.js +2 -2
- package/dist/cjs/{verdocs-template-fields_4.cjs.entry.js → verdocs-template-attachments_4.cjs.entry.js} +229 -238
- package/dist/cjs/{verdocs-template-document-page_2.cjs.entry.js → verdocs-template-document-page.cjs.entry.js} +0 -45
- package/dist/cjs/verdocs-template-name.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-reminders.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -2
- package/dist/cjs/verdocs-template-visibility.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-templates-list.cjs.entry.js +14 -23
- package/dist/cjs/verdocs-toolbar-icon.cjs.entry.js +51 -0
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.stories.js +3 -3
- package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.js +2 -2
- package/dist/collection/components/templates/verdocs-template-star/verdocs-template-star.js +4 -5
- package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.js +13 -22
- package/dist/components/TemplateStore.js +1 -1
- package/dist/components/Templates.js +15 -56
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.js +0 -1
- package/dist/components/verdocs-field-textarea.js +2 -2
- package/dist/components/verdocs-search-activity2.js +1 -1
- package/dist/components/verdocs-template-star2.js +1 -2
- package/dist/components/verdocs-templates-list.js +14 -23
- package/dist/custom-elements.json +1898 -0
- package/dist/docs.json +3 -104
- package/dist/esm/Roles-6eb459df.js +24 -0
- package/dist/esm/{TemplateStore-dcfb68c3.js → TemplateStore-17700116.js} +1 -1
- package/dist/esm/{Templates-1893bda7.js → Templates-f90883f7.js} +15 -56
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-51c8f6c7.js → utils-aa016f33.js} +1 -1
- package/dist/esm/verdocs-build.entry.js +2 -2
- package/dist/esm/{verdocs-button-panel_2.entry.js → verdocs-button-panel_3.entry.js} +19 -3
- package/dist/esm/{verdocs-checkbox_5.entry.js → verdocs-checkbox_4.entry.js} +1 -17
- package/dist/esm/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm/verdocs-field-checkbox.entry.js +1 -1
- package/dist/esm/verdocs-field-date.entry.js +1 -1
- package/dist/esm/verdocs-field-dropdown.entry.js +1 -1
- package/dist/esm/verdocs-field-initial.entry.js +1 -1
- package/dist/esm/verdocs-field-payment.entry.js +1 -1
- package/dist/esm/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm/verdocs-field-signature.entry.js +1 -1
- package/dist/esm/verdocs-field-textarea.entry.js +3 -3
- package/dist/esm/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm/verdocs-field-timestamp.entry.js +1 -1
- package/dist/esm/verdocs-pagination_3.entry.js +1 -1
- package/dist/esm/verdocs-preview.entry.js +3 -3
- 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-send.entry.js +3 -3
- package/dist/esm/verdocs-sign.entry.js +1 -1
- package/dist/esm/{verdocs-template-fields_4.entry.js → verdocs-template-attachments_4.entry.js} +227 -236
- package/dist/esm/{verdocs-template-document-page_2.entry.js → verdocs-template-document-page.entry.js} +2 -46
- package/dist/esm/verdocs-template-name.entry.js +2 -2
- package/dist/esm/verdocs-template-reminders.entry.js +2 -2
- package/dist/esm/verdocs-template-star.entry.js +1 -2
- package/dist/esm/verdocs-template-visibility.entry.js +2 -2
- package/dist/esm/verdocs-templates-list.entry.js +14 -23
- package/dist/esm/verdocs-toolbar-icon.entry.js +47 -0
- package/dist/esm/verdocs-view.entry.js +1 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/Roles-6eb459df.js +1 -0
- package/dist/esm-es5/{TemplateStore-dcfb68c3.js → TemplateStore-17700116.js} +1 -1
- package/dist/esm-es5/Templates-f90883f7.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{utils-51c8f6c7.js → utils-aa016f33.js} +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-button-panel_3.entry.js +1 -0
- package/dist/esm-es5/{verdocs-checkbox_5.entry.js → verdocs-checkbox_4.entry.js} +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-radio-button_3.entry.js +1 -0
- package/dist/esm-es5/verdocs-send.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-attachments_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-star.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-visibility.entry.js +1 -1
- package/dist/esm-es5/verdocs-templates-list.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-star/verdocs-template-star.d.ts +2 -2
- package/dist/types/components/templates/verdocs-templates-list/verdocs-templates-list.d.ts +8 -8
- package/dist/types/components.d.ts +3 -32
- package/dist/verdocs-web-sdk/{p-62aaeefd.system.js → p-03775689.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-abfb25bc.system.entry.js → p-05b23b9a.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a3c33953.entry.js → p-05fe6f04.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-0a86db90.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-ee6f2dd3.js → p-0bda34c0.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f8d562a0.system.entry.js → p-10ed9311.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-17ec248a.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-6c60927e.system.entry.js → p-1ad38b2b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9488e048.system.entry.js → p-1d1ab8f4.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9c25c1d4.system.entry.js → p-27faf081.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-2960c946.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-d3f3c09a.entry.js → p-2f4c539d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-2fdb7348.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-5255e6f7.entry.js → p-3cf07b3d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6ebab009.system.entry.js → p-4239ed46.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8b77a5dc.system.entry.js → p-46a931f2.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-403ea34b.system.entry.js → p-4c87ae76.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-4d8a70fc.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-1f592fb0.entry.js → p-4ea9eedc.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ac58a89b.system.entry.js → p-54654ee0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-567f8bbb.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-d115c414.entry.js → p-596530f0.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-118a14fe.system.entry.js → p-5e92d526.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-88e0bab8.entry.js → p-61eea1eb.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-633926d8.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-647cdb84.system.js +1 -1
- package/dist/verdocs-web-sdk/p-65167ce1.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-6a67a872.system.entry.js → p-669b845b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-6a56401e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-c7cebd38.entry.js → p-733909e4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-006dd4da.entry.js → p-737a2b7c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fac4806c.system.entry.js → p-7680baf7.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c893c9e3.entry.js → p-781c6f9c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-787289cc.system.entry.js → p-789424cb.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-844f5d1b.system.entry.js → p-7ca5de26.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2a130b90.entry.js → p-7daa9e29.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-8027431e.js +1 -0
- package/dist/verdocs-web-sdk/p-8229e6df.system.js +1 -0
- package/dist/verdocs-web-sdk/p-92e1ea05.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-81bfb9ee.entry.js → p-9606946c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-11a30706.entry.js → p-965428e4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5cff7439.system.entry.js → p-96defbf7.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-976ec9e8.js +1 -0
- package/dist/verdocs-web-sdk/{p-8b2dc164.system.entry.js → p-9b42d207.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c2eb64ad.system.entry.js → p-a27bcbd2.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-a3820b2c.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-a9f25162.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-90565aa6.system.entry.js → p-b1e1de28.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-b2d8c147.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-e63f1a46.system.entry.js → p-b6c642af.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1ade993c.entry.js → p-b7764fbf.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c8a1de2c.entry.js → p-b8b6d7e3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b42c686d.system.entry.js → p-ba5bf927.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-cf6d8044.system.entry.js → p-bc64de48.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6995a8d8.system.entry.js → p-bed19bbf.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fc8bb551.entry.js → p-c262c7c0.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-87232ec1.system.entry.js → p-c7b1d2a6.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3561afed.entry.js → p-c90a995b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a4129b09.system.js → p-c97a7232.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a8eb011c.entry.js → p-cbf15c6d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ae4c9e4a.js → p-cd4998db.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a88c77bb.entry.js → p-d317166e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-d9be74a3.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-485ed6e3.entry.js → p-da71e206.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c212eac2.system.entry.js → p-da78b0c9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d583e91b.entry.js → p-db748ddf.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f2207c05.system.entry.js → p-e32ff05d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7cd40ff6.entry.js → p-e58cfa85.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f3ac446d.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-189606f5.entry.js → p-febca9d8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-25fdc669.system.entry.js → p-ff71a7ed.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +3 -3
- 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/Templates-1893bda7.js +0 -1
- package/dist/esm-es5/ipc-test.entry.js +0 -1
- package/dist/esm-es5/verdocs-button-panel_2.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-0527ab90.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-11de0d75.system.js +0 -1
- package/dist/verdocs-web-sdk/p-13baed19.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-26417803.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-268fe01c.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2b404e29.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2b7b500b.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2e16dcdf.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4dc8cc71.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4eb26d56.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6570268f.js +0 -1
- package/dist/verdocs-web-sdk/p-78b7499c.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-8909269f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-899f9d42.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-9044fd88.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b7b48889.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-dd7ffe56.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-fea16530.entry.js +0 -1
package/dist/esm/{verdocs-template-fields_4.entry.js → verdocs-template-attachments_4.entry.js}
RENAMED
@@ -1,44 +1,244 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, F as Fragment, a as getElement } from './index-151c0874.js';
|
2
|
-
import { i as interact } from './interact.min-cf83fa88.js';
|
3
2
|
import './Types-5f31149e.js';
|
4
3
|
import { V as VerdocsEndpoint, T as TemplateSenderTypes } from './VerdocsEndpoint-e447b318.js';
|
4
|
+
import { c as createTemplateDocument, d as deleteTemplateDocument } from './TemplateDocuments-6fd2f4e2.js';
|
5
|
+
import { D as DocIcon, P as PngIcon, J as JpgIcon, a as PdfIcon, F as FileIcon$1, b as PageCountIcon, T as TrashIcon } from './Icons-c29eb0fa.js';
|
6
|
+
import { g as getTemplateStore, a as getRoleNames } from './TemplateStore-17700116.js';
|
7
|
+
import { S as SDKError } from './errors-9b5498c8.js';
|
8
|
+
import { c as createTemplate } from './Templates-f90883f7.js';
|
9
|
+
import { i as interact } from './interact.min-cf83fa88.js';
|
5
10
|
import { u as updateField, c as createField } from './Fields-c82e6df3.js';
|
6
11
|
import { i as integerSequence } from './Primitives-054bc6e5.js';
|
7
|
-
import { a as getRoleIndex, r as renderDocumentField,
|
8
|
-
import {
|
9
|
-
import { S as SDKError } from './errors-9b5498c8.js';
|
12
|
+
import { a as getRoleIndex, r as renderDocumentField, e as updateCssTransform, f as defaultWidth, h as defaultHeight } from './utils-aa016f33.js';
|
13
|
+
import { u as updateRole, c as createRole } from './Roles-6eb459df.js';
|
10
14
|
import { g as getRGBA } from './Colors-1b298092.js';
|
11
|
-
import
|
15
|
+
import './index-38d7bc0b.js';
|
12
16
|
import './_commonjsHelpers-5ec8f9b7.js';
|
13
17
|
import './Envelopes-290f96cc.js';
|
14
18
|
import './Files-70a192df.js';
|
15
19
|
import './Types-de18e225.js';
|
16
20
|
import './index-2685d184.js';
|
17
21
|
import './index-8dc8fdc4.js';
|
18
|
-
import './index-38d7bc0b.js';
|
19
22
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
23
|
+
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}";
|
24
|
+
|
25
|
+
const VerdocsTemplateAttachments = class {
|
26
|
+
constructor(hostRef) {
|
27
|
+
registerInstance(this, hostRef);
|
28
|
+
this.exit = createEvent(this, "exit", 7);
|
29
|
+
this.next = createEvent(this, "next", 7);
|
30
|
+
this.templateUpdate = createEvent(this, "templateUpdate", 7);
|
31
|
+
this.sdkError = createEvent(this, "sdkError", 7);
|
32
|
+
this.endpoint = VerdocsEndpoint.getDefault();
|
33
|
+
this.templateId = '';
|
34
|
+
this.uploading = false;
|
35
|
+
this.progressLabel = 'Uploading...';
|
36
|
+
this.progressPercent = 0;
|
37
|
+
this.showDeleteError = false;
|
38
|
+
this.confirmDeleteDocument = null;
|
39
|
+
this.store = null;
|
40
|
+
}
|
41
|
+
async componentWillLoad() {
|
42
|
+
var _a, _b, _c;
|
43
|
+
try {
|
44
|
+
this.endpoint.loadSession();
|
45
|
+
if (!this.templateId) {
|
46
|
+
console.log(`[ROLES] Missing required template ID ${this.templateId}`);
|
47
|
+
return;
|
48
|
+
}
|
49
|
+
if (!this.endpoint.session) {
|
50
|
+
console.log('[ROLES] Unable to start builder session, must be authenticated');
|
51
|
+
return;
|
52
|
+
}
|
53
|
+
this.store = await getTemplateStore(this.endpoint, this.templateId, false);
|
54
|
+
}
|
55
|
+
catch (e) {
|
56
|
+
console.log('[TEMPLATE ATTACHMENTS] Error loading template', e);
|
57
|
+
(_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));
|
58
|
+
}
|
59
|
+
}
|
60
|
+
handleCancel(e) {
|
61
|
+
e.stopPropagation();
|
62
|
+
this.exit.emit();
|
63
|
+
}
|
64
|
+
handleUploadProgress(percent) {
|
65
|
+
if (percent >= 99) {
|
66
|
+
this.progressPercent = 100;
|
67
|
+
this.progressLabel = 'Processing...';
|
68
|
+
}
|
69
|
+
else {
|
70
|
+
this.progressPercent = percent;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
async handleUpload(e) {
|
74
|
+
var _a, _b, _c;
|
75
|
+
e.stopPropagation();
|
76
|
+
const file = e.detail.file;
|
77
|
+
if (!file) {
|
78
|
+
return;
|
79
|
+
}
|
80
|
+
console.log('[ATTACHMENTS] Uploading...', file);
|
81
|
+
this.uploading = true;
|
82
|
+
this.progressLabel = 'Uploading...';
|
83
|
+
try {
|
84
|
+
const template = await createTemplateDocument(this.endpoint, this.templateId, file, this.handleUploadProgress.bind(this));
|
85
|
+
console.log('[ATTACHMENTS] Created attachment', template);
|
86
|
+
this.store = await getTemplateStore(this.endpoint, this.templateId, true);
|
87
|
+
console.log('[ATTACHMENTS] New template', this.store.state);
|
88
|
+
this.uploading = false;
|
89
|
+
this.progressLabel = '';
|
90
|
+
this.progressPercent = 0;
|
91
|
+
}
|
92
|
+
catch (e) {
|
93
|
+
console.log('[ATTACHMENTS] Error creating template', e);
|
94
|
+
(_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));
|
95
|
+
this.uploading = false;
|
96
|
+
}
|
97
|
+
}
|
98
|
+
handleNext(e) {
|
99
|
+
var _a;
|
100
|
+
e.stopPropagation();
|
101
|
+
this.uploading = false;
|
102
|
+
this.progressLabel = '';
|
103
|
+
this.progressPercent = 0;
|
104
|
+
(_a = this.next) === null || _a === void 0 ? void 0 : _a.emit({ template: this.store.state });
|
105
|
+
}
|
106
|
+
async confirmDelete() {
|
107
|
+
await deleteTemplateDocument(this.endpoint, this.templateId, this.confirmDeleteDocument.id);
|
108
|
+
this.store = await getTemplateStore(this.endpoint, this.templateId, true);
|
109
|
+
console.log('[ATTACHMENTS] New template', this.store.state);
|
110
|
+
this.confirmDeleteDocument = null;
|
111
|
+
}
|
112
|
+
async handleDelete(document) {
|
113
|
+
var _a;
|
114
|
+
if (((_a = this.store.state) === null || _a === void 0 ? void 0 : _a.template_documents.length) > 1) {
|
115
|
+
this.confirmDeleteDocument = document;
|
116
|
+
}
|
117
|
+
else {
|
118
|
+
this.showDeleteError = true;
|
119
|
+
}
|
120
|
+
}
|
121
|
+
getFileIcon(document) {
|
122
|
+
switch (document.mime) {
|
123
|
+
case 'application/pdf':
|
124
|
+
return PdfIcon;
|
125
|
+
case 'image/jpeg':
|
126
|
+
return JpgIcon;
|
127
|
+
case 'image/png':
|
128
|
+
return PngIcon;
|
129
|
+
case 'application/msword':
|
130
|
+
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
|
131
|
+
return DocIcon;
|
132
|
+
}
|
133
|
+
return FileIcon$1;
|
134
|
+
}
|
135
|
+
render() {
|
136
|
+
var _a, _b, _c;
|
137
|
+
if (!this.endpoint.session) {
|
138
|
+
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
139
|
+
}
|
140
|
+
const templateState = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state;
|
141
|
+
if (!templateState.isLoaded) {
|
142
|
+
return (h(Host, { class: "loading" }, h("verdocs-loader", null)));
|
143
|
+
}
|
144
|
+
// This is meant to be a companion for larger visual experiences so we just go blank on errors for now.
|
145
|
+
if (!this.endpoint.session || !templateState.profile_id) {
|
146
|
+
return h(Host, { class: "empty" });
|
147
|
+
}
|
148
|
+
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: () => {
|
149
|
+
this.confirmDeleteDocument = null;
|
150
|
+
} }))));
|
151
|
+
}
|
36
152
|
};
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
153
|
+
VerdocsTemplateAttachments.style = verdocsTemplateAttachmentsCss;
|
154
|
+
|
155
|
+
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}";
|
156
|
+
|
157
|
+
const unicodeNBSP = ' ';
|
158
|
+
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>';
|
159
|
+
const VerdocsTemplateCreate = class {
|
160
|
+
constructor(hostRef) {
|
161
|
+
registerInstance(this, hostRef);
|
162
|
+
this.exit = createEvent(this, "exit", 7);
|
163
|
+
this.next = createEvent(this, "next", 7);
|
164
|
+
this.sdkError = createEvent(this, "sdkError", 7);
|
165
|
+
this.endpoint = VerdocsEndpoint.getDefault();
|
166
|
+
this.file = undefined;
|
167
|
+
this.creating = false;
|
168
|
+
this.progressLabel = 'Uploading...';
|
169
|
+
this.progressPercent = 0;
|
170
|
+
}
|
171
|
+
componentWillLoad() {
|
172
|
+
this.endpoint.setTimeout(30000);
|
173
|
+
this.endpoint.loadSession();
|
174
|
+
}
|
175
|
+
handleFileChanged(e) {
|
176
|
+
var _a;
|
177
|
+
this.file = ((_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0]) || null;
|
178
|
+
console.log('[CREATE] Selected file', this.file);
|
179
|
+
// this.filePath = e.target.files?.[0]?.name;
|
180
|
+
}
|
181
|
+
handleUpload(e) {
|
182
|
+
e.stopPropagation();
|
183
|
+
const fileElem = document.getElementById('verdocs-template-create-file');
|
184
|
+
fileElem.click();
|
185
|
+
}
|
186
|
+
handleCancel(e) {
|
187
|
+
e.stopPropagation();
|
188
|
+
this.exit.emit();
|
189
|
+
}
|
190
|
+
async handleSubmit(e) {
|
191
|
+
var _a, _b, _c, _d;
|
192
|
+
e.stopPropagation();
|
193
|
+
console.log('Submitting');
|
194
|
+
// Should be true if we're here because onClick is only enabled then. We're just guarding this for Typescript.
|
195
|
+
if (!this.file) {
|
196
|
+
return;
|
197
|
+
}
|
198
|
+
this.creating = true;
|
199
|
+
this.progressLabel = 'Uploading...';
|
200
|
+
try {
|
201
|
+
const template = await createTemplate(this.endpoint, { name: this.file.name, documents: [this.file] }, percent => {
|
202
|
+
if (percent >= 99) {
|
203
|
+
this.progressLabel = 'Processing...';
|
204
|
+
this.progressPercent = 100;
|
205
|
+
}
|
206
|
+
else {
|
207
|
+
this.progressPercent = percent;
|
208
|
+
}
|
209
|
+
});
|
210
|
+
console.log('[CREATE] Created template', template);
|
211
|
+
(_a = this.next) === null || _a === void 0 ? void 0 : _a.emit(template);
|
212
|
+
this.creating = false;
|
213
|
+
this.progressLabel = '';
|
214
|
+
this.progressPercent = 0;
|
215
|
+
}
|
216
|
+
catch (e) {
|
217
|
+
console.log('[CREATE] Error creating template', e);
|
218
|
+
(_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));
|
219
|
+
this.creating = false;
|
220
|
+
}
|
221
|
+
}
|
222
|
+
render() {
|
223
|
+
if (!this.endpoint.session) {
|
224
|
+
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
225
|
+
}
|
226
|
+
return (h(Host, null, h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("input", { type: "file", id: "verdocs-template-create-file", multiple: true, accept: "application/pdf", style: { display: 'none' }, onChange: e => this.handleFileChanged(e) }), this.creating ? (h("div", { class: "loader-wrapper" }, h("verdocs-loader", null), this.progressLabel && (h("div", { class: "progress-wrapper" }, h("verdocs-progress-bar", { showPercent: true, percent: this.progressPercent, label: this.progressLabel }))))) : (h("div", { class: "upload-box", onDrop: (e) => {
|
227
|
+
e.preventDefault();
|
228
|
+
e.target.classList.remove('drag-over');
|
229
|
+
this.file = e.dataTransfer.files[0];
|
230
|
+
}, onDragOver: (e) => {
|
231
|
+
e.preventDefault();
|
232
|
+
e.dataTransfer.dropEffect = 'copy';
|
233
|
+
}, onDragEnter: (e) => e.target.classList.add('drag-over'), onDragLeave: (e) => e.target.classList.remove('drag-over') }, h("div", null, h("span", { innerHTML: FileIcon })), h("div", { style: { marginTop: '20px', fontSize: '20px', fontWeight: 'bold', overflowWrap: 'anywhere' } }, this.file ? this.file.name : 'Drag a file here'), h("div", { style: {
|
234
|
+
marginTop: '20px',
|
235
|
+
marginBottom: '20px',
|
236
|
+
fontSize: '16px',
|
237
|
+
height: '20px',
|
238
|
+
} }, 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 })))));
|
239
|
+
}
|
41
240
|
};
|
241
|
+
VerdocsTemplateCreate.style = verdocsTemplateCreateCss;
|
42
242
|
|
43
243
|
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}";
|
44
244
|
|
@@ -418,149 +618,6 @@ const VerdocsTemplateFields = class {
|
|
418
618
|
};
|
419
619
|
VerdocsTemplateFields.style = verdocsTemplateFieldsCss;
|
420
620
|
|
421
|
-
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}";
|
422
|
-
|
423
|
-
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>`;
|
424
|
-
const VerdocsTemplateRoleProperties = class {
|
425
|
-
constructor(hostRef) {
|
426
|
-
registerInstance(this, hostRef);
|
427
|
-
this.close = createEvent(this, "close", 7);
|
428
|
-
this.delete = createEvent(this, "delete", 7);
|
429
|
-
this.sdkError = createEvent(this, "sdkError", 7);
|
430
|
-
this.store = null;
|
431
|
-
this.endpoint = VerdocsEndpoint.getDefault();
|
432
|
-
this.templateId = '';
|
433
|
-
this.roleName = '';
|
434
|
-
this.sender = TemplateSenderTypes.EVERYONE;
|
435
|
-
this.dirty = false;
|
436
|
-
this.saving = false;
|
437
|
-
this.name = '';
|
438
|
-
this.type = 'signer';
|
439
|
-
this.fullName = '';
|
440
|
-
this.email = '';
|
441
|
-
this.phone = '';
|
442
|
-
this.allowDelegation = false;
|
443
|
-
}
|
444
|
-
async componentWillLoad() {
|
445
|
-
var _a, _b, _c, _d, _e;
|
446
|
-
try {
|
447
|
-
this.endpoint.loadSession();
|
448
|
-
if (!this.templateId) {
|
449
|
-
console.log(`[ROLE_PROPERTIES] Missing required template ID ${this.templateId}`);
|
450
|
-
return;
|
451
|
-
}
|
452
|
-
if (!this.endpoint.session) {
|
453
|
-
console.log('[ROLE_PROPERTIES] Unable to start builder session, must be authenticated');
|
454
|
-
return;
|
455
|
-
}
|
456
|
-
this.store = await getTemplateStore(this.endpoint, this.templateId, false);
|
457
|
-
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);
|
458
|
-
if (editingRole) {
|
459
|
-
this.name = editingRole.name;
|
460
|
-
this.type = editingRole.type;
|
461
|
-
this.fullName = editingRole.full_name;
|
462
|
-
this.email = editingRole.email;
|
463
|
-
this.phone = editingRole.phone;
|
464
|
-
this.allowDelegation = editingRole.delegator;
|
465
|
-
console.log('[ROLES] Editing role', editingRole);
|
466
|
-
}
|
467
|
-
}
|
468
|
-
catch (e) {
|
469
|
-
console.log('[TEMPLATE ROLE PROPERTIES] Error with preview session', e);
|
470
|
-
(_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));
|
471
|
-
}
|
472
|
-
}
|
473
|
-
handleCancel(e) {
|
474
|
-
var _a, _b, _c;
|
475
|
-
e.stopPropagation();
|
476
|
-
this.name = (_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.name;
|
477
|
-
this.dirty = false;
|
478
|
-
(_c = this.close) === null || _c === void 0 ? void 0 : _c.emit();
|
479
|
-
}
|
480
|
-
async handleSave(e) {
|
481
|
-
e.stopPropagation();
|
482
|
-
this.saving = true;
|
483
|
-
updateRole(this.endpoint, this.templateId, this.roleName, {
|
484
|
-
name: this.name,
|
485
|
-
type: this.type,
|
486
|
-
full_name: this.fullName,
|
487
|
-
email: this.email,
|
488
|
-
phone: this.phone,
|
489
|
-
delegator: this.allowDelegation,
|
490
|
-
})
|
491
|
-
.then(async (r) => {
|
492
|
-
var _a;
|
493
|
-
console.log('[ROLE_PROPERTIES] Update result', r);
|
494
|
-
this.saving = false;
|
495
|
-
this.dirty = false;
|
496
|
-
this.store = await getTemplateStore(this.endpoint, this.templateId, true);
|
497
|
-
// this.sortTemplateRoles();
|
498
|
-
// this.renumberTemplateRoles();
|
499
|
-
// const newRoles = [...this.store.state.roles];
|
500
|
-
// newRoles.forEach(role => {
|
501
|
-
// if (role.name === this.roleName) {
|
502
|
-
// role.name = this.name;
|
503
|
-
// role.type = this.type;
|
504
|
-
// role.full_name = this.fullName;
|
505
|
-
// role.email = this.email;
|
506
|
-
// role.phone = this.phone;
|
507
|
-
// role.delegator = this.allowDelegation;
|
508
|
-
// }
|
509
|
-
// });
|
510
|
-
// this.store.state.roles = newRoles;
|
511
|
-
(_a = this.close) === null || _a === void 0 ? void 0 : _a.emit();
|
512
|
-
})
|
513
|
-
.catch(e => {
|
514
|
-
console.log('Update error', e);
|
515
|
-
this.saving = false;
|
516
|
-
});
|
517
|
-
}
|
518
|
-
async handleDelete(e) {
|
519
|
-
e.stopPropagation();
|
520
|
-
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.')) {
|
521
|
-
deleteRole(this.endpoint, this.templateId, this.roleName)
|
522
|
-
.then(r => {
|
523
|
-
var _a;
|
524
|
-
console.log('Role deleted', r);
|
525
|
-
this.store.state.roles = [...this.store.state.roles.filter(role => role.name !== this.roleName)];
|
526
|
-
(_a = this.delete) === null || _a === void 0 ? void 0 : _a.emit({ templateId: this.templateId, roleName: this.roleName });
|
527
|
-
})
|
528
|
-
.catch(e => {
|
529
|
-
console.log('Deletion error', e);
|
530
|
-
});
|
531
|
-
}
|
532
|
-
}
|
533
|
-
render() {
|
534
|
-
const hasFields = (this.store.state.fields || []).findIndex(field => field.role_name === this.roleName) !== -1;
|
535
|
-
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", disabled: hasFields, helpText: hasFields
|
536
|
-
? 'This role has fields assigned and can no longer be renamed.'
|
537
|
-
: 'A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.', placeholder: "Template Name...", onInput: (e) => {
|
538
|
-
this.name = e.target.value;
|
539
|
-
this.dirty = true;
|
540
|
-
} }), h("div", { class: "row" }, h("div", { class: "input-label" }, "Type:"), h("verdocs-select-input", { value: this.type, options: [
|
541
|
-
{ label: 'Signer', value: 'signer' },
|
542
|
-
{ label: 'CC', value: 'cc' },
|
543
|
-
{ label: 'Approver', value: 'approver' },
|
544
|
-
], onInput: (e) => {
|
545
|
-
this.type = e.target.value;
|
546
|
-
this.dirty = true;
|
547
|
-
} }), 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) => {
|
548
|
-
this.fullName = e.target.value;
|
549
|
-
this.dirty = true;
|
550
|
-
} }), 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) => {
|
551
|
-
this.email = e.target.value;
|
552
|
-
this.dirty = true;
|
553
|
-
} }), 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) => {
|
554
|
-
this.phone = e.target.value;
|
555
|
-
this.dirty = true;
|
556
|
-
} }), h("div", { class: "row" }, h("div", { class: "input-label" }, "May Delegate:"), h("div", { class: "checkbox-wrapper" }, h("verdocs-checkbox", { checked: this.allowDelegation, onInput: (e) => {
|
557
|
-
this.allowDelegation = e.target.checked;
|
558
|
-
this.dirty = true;
|
559
|
-
} })), 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) })))))));
|
560
|
-
}
|
561
|
-
};
|
562
|
-
VerdocsTemplateRoleProperties.style = verdocsTemplateRolePropertiesCss;
|
563
|
-
|
564
621
|
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}";
|
565
622
|
|
566
623
|
const senderLabels = {
|
@@ -824,70 +881,4 @@ const VerdocsTemplateRoles = class {
|
|
824
881
|
};
|
825
882
|
VerdocsTemplateRoles.style = verdocsTemplateRolesCss;
|
826
883
|
|
827
|
-
|
828
|
-
|
829
|
-
const VerdocsTemplateSender = class {
|
830
|
-
constructor(hostRef) {
|
831
|
-
registerInstance(this, hostRef);
|
832
|
-
this.close = createEvent(this, "close", 7);
|
833
|
-
this.sdkError = createEvent(this, "sdkError", 7);
|
834
|
-
this.store = null;
|
835
|
-
this.endpoint = VerdocsEndpoint.getDefault();
|
836
|
-
this.templateId = '';
|
837
|
-
this.sender = TemplateSenderTypes.EVERYONE;
|
838
|
-
this.saving = false;
|
839
|
-
}
|
840
|
-
async componentWillLoad() {
|
841
|
-
var _a, _b, _c, _d, _e;
|
842
|
-
try {
|
843
|
-
this.endpoint.loadSession();
|
844
|
-
if (!this.templateId) {
|
845
|
-
console.log(`[SENDER] Missing required template ID ${this.templateId}`);
|
846
|
-
return;
|
847
|
-
}
|
848
|
-
if (!this.endpoint.session) {
|
849
|
-
console.log('[SENDER] Unable to start builder session, must be authenticated');
|
850
|
-
return;
|
851
|
-
}
|
852
|
-
this.store = await getTemplateStore(this.endpoint, this.templateId, false);
|
853
|
-
this.sender = (_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.sender;
|
854
|
-
}
|
855
|
-
catch (e) {
|
856
|
-
console.log('[SENDER] Error with preview session', e);
|
857
|
-
(_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));
|
858
|
-
}
|
859
|
-
}
|
860
|
-
handleClose() {
|
861
|
-
this.close.emit();
|
862
|
-
}
|
863
|
-
// We need a separate event handler for clicking the background because it can receive events "through" other child components
|
864
|
-
handleDismiss(e) {
|
865
|
-
if (e.target.className === 'background-overlay') {
|
866
|
-
e.preventDefault();
|
867
|
-
this.handleClose();
|
868
|
-
}
|
869
|
-
}
|
870
|
-
async handleSelectSetting(value) {
|
871
|
-
this.saving = true;
|
872
|
-
updateTemplate(this.endpoint, this.templateId, { sender: value })
|
873
|
-
.then(r => {
|
874
|
-
var _a;
|
875
|
-
console.log('Update result', r);
|
876
|
-
if ((_a = this.store) === null || _a === void 0 ? void 0 : _a.state) {
|
877
|
-
this.store.state.sender = value;
|
878
|
-
}
|
879
|
-
this.saving = false;
|
880
|
-
this.sender = value;
|
881
|
-
})
|
882
|
-
.catch(e => {
|
883
|
-
console.log('Error saving', e);
|
884
|
-
this.saving = false;
|
885
|
-
});
|
886
|
-
}
|
887
|
-
render() {
|
888
|
-
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() }))))));
|
889
|
-
}
|
890
|
-
};
|
891
|
-
VerdocsTemplateSender.style = verdocsTemplateSenderCss;
|
892
|
-
|
893
|
-
export { VerdocsTemplateFields as verdocs_template_fields, VerdocsTemplateRoleProperties as verdocs_template_role_properties, VerdocsTemplateRoles as verdocs_template_roles, VerdocsTemplateSender as verdocs_template_sender };
|
884
|
+
export { VerdocsTemplateAttachments as verdocs_template_attachments, VerdocsTemplateCreate as verdocs_template_create, VerdocsTemplateFields as verdocs_template_fields, VerdocsTemplateRoles as verdocs_template_roles };
|
@@ -2,8 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement
|
|
2
2
|
import './Types-5f31149e.js';
|
3
3
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-e447b318.js';
|
4
4
|
import { g as getTemplateDocumentPageDisplayUri } from './TemplateDocuments-6fd2f4e2.js';
|
5
|
-
import { t as throttle } from './utils-
|
6
|
-
import { c as createPopper } from './popper-15e448b4.js';
|
5
|
+
import { t as throttle } from './utils-aa016f33.js';
|
7
6
|
import './_commonjsHelpers-5ec8f9b7.js';
|
8
7
|
import './Envelopes-290f96cc.js';
|
9
8
|
import './Files-70a192df.js';
|
@@ -100,47 +99,4 @@ const VerdocsTemplateDocumentPage = class {
|
|
100
99
|
};
|
101
100
|
VerdocsTemplateDocumentPage.style = verdocsTemplateDocumentPageCss;
|
102
101
|
|
103
|
-
|
104
|
-
|
105
|
-
const VerdocsToolbarIcon = class {
|
106
|
-
constructor(hostRef) {
|
107
|
-
registerInstance(this, hostRef);
|
108
|
-
this.text = '';
|
109
|
-
this.icon = '';
|
110
|
-
this.placement = 'bottom';
|
111
|
-
this.containerId = `verdocs-toolbar-icon-${Math.random().toString(36).substring(2, 11)}`;
|
112
|
-
}
|
113
|
-
componentDidLoad() {
|
114
|
-
this.popperInstance = createPopper(this.iconEl, this.tooltip, {
|
115
|
-
placement: this.placement,
|
116
|
-
modifiers: this.placement === 'left' ? [{ name: 'offset', options: { offset: [0, 20] } }] : [],
|
117
|
-
});
|
118
|
-
// placement: 'top-end',
|
119
|
-
// modifiers: [{name: 'offset', options: {offset: [0, 10]}}],
|
120
|
-
// });
|
121
|
-
}
|
122
|
-
disconnectedCallback() {
|
123
|
-
if (this.popperInstance) {
|
124
|
-
this.popperInstance.destroy();
|
125
|
-
this.popperInstance = null;
|
126
|
-
}
|
127
|
-
}
|
128
|
-
show() {
|
129
|
-
var _a, _b;
|
130
|
-
(_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.setAttribute('data-show', '');
|
131
|
-
(_b = this.popperInstance) === null || _b === void 0 ? void 0 : _b.update().catch(() => { });
|
132
|
-
}
|
133
|
-
hide() {
|
134
|
-
var _a;
|
135
|
-
(_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.removeAttribute('data-show');
|
136
|
-
}
|
137
|
-
// handlePress() {
|
138
|
-
// this.press?.emit();
|
139
|
-
// }
|
140
|
-
render() {
|
141
|
-
return (h(Host, { class: {} }, h("div", { "aria-describedby": this.containerId, class: "icon", innerHTML: this.icon, onMouseEnter: () => this.show(), onFocus: () => this.show(), onMouseLeave: () => this.hide(), onBlur: () => this.hide(), ref: el => (this.iconEl = el) }), h("div", { id: this.containerId, role: "tooltip", class: "tooltip", "data-popper-placement": this.placement, ref: el => (this.tooltip = el) }, this.text, h("div", { "data-popper-arrow": "true", class: "arrow" }))));
|
142
|
-
}
|
143
|
-
};
|
144
|
-
VerdocsToolbarIcon.style = verdocsToolbarIconCss;
|
145
|
-
|
146
|
-
export { VerdocsTemplateDocumentPage as verdocs_template_document_page, VerdocsToolbarIcon as verdocs_toolbar_icon };
|
102
|
+
export { VerdocsTemplateDocumentPage as verdocs_template_document_page };
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-151c0874.js';
|
2
2
|
import './Types-5f31149e.js';
|
3
3
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-e447b318.js';
|
4
|
-
import { u as updateTemplate } from './Templates-
|
5
|
-
import { g as getTemplateStore } from './TemplateStore-
|
4
|
+
import { u as updateTemplate } from './Templates-f90883f7.js';
|
5
|
+
import { g as getTemplateStore } from './TemplateStore-17700116.js';
|
6
6
|
import { S as SDKError } from './errors-9b5498c8.js';
|
7
7
|
import './index-38d7bc0b.js';
|
8
8
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-151c0874.js';
|
2
2
|
import './Types-5f31149e.js';
|
3
3
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-e447b318.js';
|
4
|
-
import { g as getTemplateStore } from './TemplateStore-
|
4
|
+
import { g as getTemplateStore } from './TemplateStore-17700116.js';
|
5
5
|
import { S as SDKError } from './errors-9b5498c8.js';
|
6
6
|
import { V as VerdocsToast } from './Toast-f3b8fd46.js';
|
7
7
|
import './index-38d7bc0b.js';
|
8
|
-
import './Templates-
|
8
|
+
import './Templates-f90883f7.js';
|
9
9
|
|
10
10
|
/**
|
11
11
|
* Enable automatic reminders. setup_time is the number of days after the envelope is sent that the first reminder
|