@verdocs/web-sdk 2.3.30 → 2.3.32
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/{Icons-a11fb3fc.js → Icons-3286d014.js} +2 -0
- package/dist/cjs/TemplateRoleStore-e17bb006.js +44 -0
- package/dist/cjs/{TemplateStore-78b8944b.js → TemplateStore-e62c16a8.js} +2 -39
- package/dist/cjs/ipc-test.cjs.entry.js +2 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-aeaf4a31.js → utils-ac526133.js} +1 -7
- package/dist/cjs/verdocs-build.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-attachment.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-date.cjs.entry.js +5 -5
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-signature.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +9 -5
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +5 -5
- package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-pagination_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-portal_2.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-preview_8.cjs.entry.js +29 -24
- package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +10 -12
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +18 -16
- package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/embeds/verdocs-preview/verdocs-preview.js +11 -8
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +16 -14
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +10 -12
- package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.js +2 -2
- package/dist/collection/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.js +2 -2
- package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js +3 -3
- package/dist/collection/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.js +2 -2
- package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.js +2 -2
- package/dist/collection/components/fields/verdocs-field-radio-button-group/verdocs-field-radio-button.js +2 -2
- package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.js +2 -2
- package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.js +3 -3
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +8 -22
- package/dist/collection/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.js +3 -3
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +10 -9
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.stories.js +1 -1
- package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.js +2 -3
- package/dist/collection/utils/Icons.js +1 -0
- package/dist/collection/utils/TemplateRoleStore.js +2 -0
- package/dist/collection/utils/TemplateStore.js +1 -2
- package/dist/collection/utils/utils.js +1 -15
- package/dist/{esm/Icons-c29eb0fa.js → components/Icons.js} +2 -1
- package/dist/components/TemplateStore.js +3 -2
- package/dist/components/utils.js +2 -7
- package/dist/components/verdocs-contact-picker2.js +1 -1
- package/dist/components/verdocs-field-attachment.js +2 -2
- package/dist/components/verdocs-field-checkbox.js +2 -2
- package/dist/components/verdocs-field-date.js +3 -3
- package/dist/components/verdocs-field-dropdown.js +2 -2
- package/dist/components/verdocs-field-initial.js +2 -2
- package/dist/components/verdocs-field-radio-button.js +2 -2
- package/dist/components/verdocs-field-signature.js +2 -2
- package/dist/components/verdocs-field-textarea.js +3 -3
- package/dist/components/verdocs-field-textbox.js +8 -5
- package/dist/components/verdocs-field-timestamp.js +3 -3
- package/dist/components/verdocs-file-chooser2.js +2 -75
- package/dist/components/verdocs-preview2.js +10 -8
- package/dist/components/verdocs-quick-filter2.js +1 -1
- package/dist/components/verdocs-send2.js +16 -15
- package/dist/components/verdocs-settings-organization2.js +1 -1
- package/dist/components/verdocs-settings-profile2.js +1 -1
- package/dist/components/verdocs-sign.js +10 -12
- package/dist/components/verdocs-template-attachments2.js +2 -1
- package/dist/components/verdocs-template-field-properties2.js +1 -1
- package/dist/components/verdocs-template-fields2.js +9 -8
- package/dist/components/verdocs-template-role-properties2.js +1 -1
- package/dist/components/verdocs-template-roles2.js +2 -3
- package/dist/docs.json +1 -18
- package/dist/esm/Icons-ddea87bf.js +76 -0
- package/dist/esm/TemplateRoleStore-bbb2b098.js +37 -0
- package/dist/esm/{TemplateStore-618fb47f.js → TemplateStore-adbf68a0.js} +2 -34
- package/dist/esm/ipc-test.entry.js +2 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-f76f3448.js → utils-d081a2b9.js} +2 -7
- package/dist/esm/verdocs-build.entry.js +2 -1
- package/dist/esm/verdocs-contact-picker_2.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-attachment.entry.js +3 -3
- package/dist/esm/verdocs-field-checkbox.entry.js +3 -3
- package/dist/esm/verdocs-field-date.entry.js +5 -5
- package/dist/esm/verdocs-field-dropdown.entry.js +3 -3
- package/dist/esm/verdocs-field-initial.entry.js +3 -3
- package/dist/esm/verdocs-field-payment.entry.js +1 -1
- package/dist/esm/verdocs-field-radio-button.entry.js +3 -3
- package/dist/esm/verdocs-field-signature.entry.js +3 -3
- package/dist/esm/verdocs-field-textarea.entry.js +4 -4
- package/dist/esm/verdocs-field-textbox.entry.js +9 -5
- package/dist/esm/verdocs-field-timestamp.entry.js +5 -5
- package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm/verdocs-portal_2.entry.js +2 -1
- package/dist/esm/verdocs-preview_8.entry.js +29 -24
- package/dist/esm/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +10 -12
- package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm/verdocs-template-fields_4.entry.js +12 -10
- package/dist/esm/verdocs-view.entry.js +1 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/{Icons-c29eb0fa.js → Icons-ddea87bf.js} +1 -1
- package/dist/esm-es5/TemplateRoleStore-bbb2b098.js +1 -0
- package/dist/esm-es5/TemplateStore-adbf68a0.js +1 -0
- package/dist/esm-es5/ipc-test.entry.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{utils-f76f3448.js → utils-d081a2b9.js} +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker_2.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-attachment.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
- package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-portal_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/embeds/verdocs-preview/verdocs-preview.d.ts +4 -2
- package/dist/types/components/embeds/verdocs-send/verdocs-send.d.ts +3 -1
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +1 -1
- package/dist/types/components/fields/verdocs-field-textbox/verdocs-field-textbox.d.ts +2 -4
- package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +3 -3
- package/dist/types/components.d.ts +0 -8
- package/dist/types/utils/Icons.d.ts +1 -0
- package/dist/types/utils/TemplateRoleStore.d.ts +2 -0
- package/dist/types/utils/TemplateStore.d.ts +0 -1
- package/dist/types/utils/utils.d.ts +1 -6
- package/dist/verdocs-web-sdk/{p-637fee9b.js → p-029ae656.js} +1 -1
- package/dist/verdocs-web-sdk/p-0636b55c.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-9b6f0565.entry.js → p-07c30f7e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-0a93ada5.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-0ae4f771.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-0b990f13.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-0ef84cfe.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-0f7191aa.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-13ec5610.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-3898a9b0.entry.js → p-140b8c97.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-1426c74b.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-72dc5fb4.system.entry.js → p-15259f81.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-18248415.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-3c5240df.system.entry.js → p-1a70513e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-1ef103df.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-242a7d5f.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-24796ebc.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-2dddc88a.js +1 -0
- package/dist/verdocs-web-sdk/p-2f6b653e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-e65e9d24.js → p-34f03fee.js} +1 -1
- package/dist/verdocs-web-sdk/{p-62ec3db9.system.entry.js → p-3d946a89.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-455d16dc.system.js → p-3f628837.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-94009f45.entry.js → p-4861684b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-4e2534a8.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-3f7aa186.system.entry.js → p-56da687c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9542e890.system.entry.js → p-5a6581cc.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0685d939.system.entry.js → p-6384f444.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-73aea1fa.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-7664525d.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-77649962.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-c1f51f1b.system.entry.js → p-7ae877b4.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-7bddea08.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-7dc5daed.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-86573e6d.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-e96924b5.system.entry.js → p-8b111775.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-8bbe0209.system.js +1 -0
- package/dist/verdocs-web-sdk/p-93aa6f6e.js +1 -0
- package/dist/verdocs-web-sdk/{p-3b1711df.entry.js → p-a3326659.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-a7580374.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-623fe013.system.entry.js → p-a91615c2.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-77ca800b.entry.js → p-ac6d0fb0.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5cd0b997.entry.js → p-b0747977.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-126c423d.entry.js → p-ba2aa74b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-bac777b3.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-bd8918e3.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-4be3b251.entry.js → p-c3c142f0.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-c67f893d.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-7a47fcd9.system.js → p-c90481a4.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-cd7bd84e.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-cff1b0e9.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d0c0571b.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-cbe7b8c8.system.entry.js → p-d72dc783.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-d8054e31.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d87c1330.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-bfdbd210.entry.js → p-da9462c7.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-e7ce7a48.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
- package/dist/verdocs-web-sdk/p-f9efd9ae.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-fc9067c0.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/custom-elements.json +0 -2175
- package/dist/esm-es5/TemplateStore-618fb47f.js +0 -1
- package/dist/verdocs-web-sdk/p-058f0e56.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-093f593d.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-09babc77.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-0a5b8a89.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-14a9619f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-18cb9ef7.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-1aa865af.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-1b661190.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-350f1ca4.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-35720475.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-371effb1.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-3930ee22.js +0 -1
- package/dist/verdocs-web-sdk/p-3989e584.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-3d9adca7.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-413a5b21.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-591b695c.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6d42921b.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6d81d774.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6e45e610.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-71faa59f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7c8419d7.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-961ee618.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a97512f6.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-aa29c7ec.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c11c841c.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c82a2a4e.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d32278c8.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-df621f8d.system.js +0 -1
- package/dist/verdocs-web-sdk/p-ea52b891.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ebc1c670.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-fda04bb0.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ff473972.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ffa4091d.entry.js +0 -1
@@ -4,8 +4,10 @@ import './Types-5f31149e.js';
|
|
4
4
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-56fa3371.js';
|
5
5
|
import { u as updateField } from './Fields-c82e6df3.js';
|
6
6
|
import { g as getRGBA } from './Colors-1b298092.js';
|
7
|
+
import { g as getTemplateRoleStore, a as getRoleIndex } from './TemplateRoleStore-bbb2b098.js';
|
7
8
|
import { g as getTemplateFieldStore } from './TemplateFieldStore-0516a7ec.js';
|
8
|
-
import { g as getFieldSettings } from './utils-
|
9
|
+
import { g as getFieldSettings } from './utils-d081a2b9.js';
|
10
|
+
import { S as SettingsIcon } from './Icons-ddea87bf.js';
|
9
11
|
import './_commonjsHelpers-8a9f3b18.js';
|
10
12
|
import './index-4439b0d1.js';
|
11
13
|
import './Envelopes-627c5239.js';
|
@@ -15,13 +17,13 @@ import './index-914ed6f7.js';
|
|
15
17
|
|
16
18
|
const verdocsFieldTextboxCss = "verdocs-field-textbox{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;width:150px;height:15px;display:block;font-size:11px;letter-spacing:-0.2px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-textbox.disabled{opacity:0.5}verdocs-field-textbox input{cursor:inherit;width:100%;height:100%;border:none;outline:none;padding:0 3px;font-size:11px;background:none;font-weight:500;position:absolute;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0, 0, 0, 0.87)}verdocs-field-textbox input.hide{display:none}verdocs-field-textbox.required{border:1px solid #cc0000}verdocs-field-textbox.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-textbox verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-textbox verdocs-button-panel[data-active],verdocs-field-textbox verdocs-button-panel:hover{opacity:1}verdocs-field-textbox verdocs-button-panel .icon svg{fill:#333333}verdocs-field-textbox verdocs-button-panel .icon:hover svg{fill:#000000}verdocs-field-textbox [data-lastpass-icon-root]{display:none !important}verdocs-field-textbox .settings-icon{position:absolute;top:-4px;left:-20px;display:inline-block;cursor:pointer;opacity:0.6}verdocs-field-textbox .settings-icon svg{fill:#707ae5}verdocs-field-textbox .settings-icon:hover{opacity:1}";
|
17
19
|
|
18
|
-
const settingsIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M7.84 1.804A1 1 0 0 1 8.82 1h2.36a1 1 0 0 1 .98.804l.331 1.652a6.993 6.993 0 0 1 1.929 1.115l1.598-.54a1 1 0 0 1 1.186.447l1.18 2.044a1 1 0 0 1-.205 1.251l-1.267 1.113a7.047 7.047 0 0 1 0 2.228l1.267 1.113a1 1 0 0 1 .206 1.25l-1.18 2.045a1 1 0 0 1-1.187.447l-1.598-.54a6.993 6.993 0 0 1-1.929 1.115l-.33 1.652a1 1 0 0 1-.98.804H8.82a1 1 0 0 1-.98-.804l-.331-1.652a6.993 6.993 0 0 1-1.929-1.115l-1.598.54a1 1 0 0 1-1.186-.447l-1.18-2.044a1 1 0 0 1 .205-1.251l1.267-1.114a7.05 7.05 0 0 1 0-2.227L1.821 7.773a1 1 0 0 1-.206-1.25l1.18-2.045a1 1 0 0 1 1.187-.447l1.598.54A6.992 6.992 0 0 1 7.51 3.456l.33-1.652ZM10 13a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" clip-rule="evenodd" /></svg>';
|
19
20
|
const VerdocsFieldTextbox = class {
|
20
21
|
constructor(hostRef) {
|
21
22
|
registerInstance(this, hostRef);
|
22
23
|
this.settingsChanged = createEvent(this, "settingsChanged", 7);
|
23
24
|
this.deleted = createEvent(this, "deleted", 7);
|
24
25
|
this.fieldStore = null;
|
26
|
+
this.roleStore = null;
|
25
27
|
this.endpoint = VerdocsEndpoint.getDefault();
|
26
28
|
this.templateid = '';
|
27
29
|
this.fieldname = '';
|
@@ -29,7 +31,6 @@ const VerdocsFieldTextbox = class {
|
|
29
31
|
this.editable = false;
|
30
32
|
this.moveable = false;
|
31
33
|
this.done = false;
|
32
|
-
this.roleindex = 0;
|
33
34
|
this.xscale = 1;
|
34
35
|
this.yscale = 1;
|
35
36
|
this.rerender = 0;
|
@@ -52,6 +53,7 @@ const VerdocsFieldTextbox = class {
|
|
52
53
|
}
|
53
54
|
async componentWillLoad() {
|
54
55
|
this.fieldStore = getTemplateFieldStore(this.templateid);
|
56
|
+
this.roleStore = getTemplateRoleStore(this.templateid);
|
55
57
|
}
|
56
58
|
componentDidRender() {
|
57
59
|
interact_min.dynamicDrop(true);
|
@@ -103,12 +105,14 @@ const VerdocsFieldTextbox = class {
|
|
103
105
|
render() {
|
104
106
|
var _a, _b;
|
105
107
|
const field = this.fieldStore.get('fields').find(field => field.name === this.fieldname);
|
108
|
+
const roleIndex = getRoleIndex(this.roleStore, field.role_name);
|
109
|
+
const backgroundColor = field['rgba'] || getRGBA(roleIndex);
|
110
|
+
console.log('rendering tb', field.name, roleIndex, backgroundColor);
|
106
111
|
if (!field) {
|
107
112
|
return h(Fragment, null);
|
108
113
|
}
|
109
114
|
const settings = getFieldSettings(field);
|
110
115
|
let disabled = (_b = (_a = this.disabled) !== null && _a !== void 0 ? _a : settings.disabled) !== null && _b !== void 0 ? _b : false;
|
111
|
-
const backgroundColor = field['rgba'] || getRGBA(this.roleindex);
|
112
116
|
const value = (settings === null || settings === void 0 ? void 0 : settings.result) || '';
|
113
117
|
const width = settings.width || 150;
|
114
118
|
// TODO: This is an outdated technique from the old system. We should compute it.
|
@@ -116,7 +120,7 @@ const VerdocsFieldTextbox = class {
|
|
116
120
|
if (this.done) {
|
117
121
|
return h(Host, { class: { done: this.done } }, value);
|
118
122
|
}
|
119
|
-
return (h(Host, { class: { required: field.required, disabled, done: this.done }, style: { backgroundColor } }, h("input", { type: "text", name: field.name, placeholder: settings === null || settings === void 0 ? void 0 : settings.placeholder, tabIndex: settings === null || settings === void 0 ? void 0 : settings.order, value: value, disabled: disabled, required: field === null || field === void 0 ? void 0 : field.required, ref: el => (this.inputEl = el), maxlength: maxlength }), this.editable && (h(Fragment, null, h("div", { id: `verdocs-settings-panel-trigger-${field.name}`, style: { transform: `scale(${Math.floor((1 / this.xscale) * 1000) / 1000}, ${Math.floor((1 / this.yscale) * 1000) / 1000})` }, class: "settings-icon", innerHTML:
|
123
|
+
return (h(Host, { class: { required: field.required, disabled, done: this.done }, style: { backgroundColor } }, h("input", { type: "text", name: field.name, placeholder: settings === null || settings === void 0 ? void 0 : settings.placeholder, tabIndex: settings === null || settings === void 0 ? void 0 : settings.order, value: value, disabled: disabled, required: field === null || field === void 0 ? void 0 : field.required, ref: el => (this.inputEl = el), maxlength: maxlength }), this.editable && (h(Fragment, null, h("div", { id: `verdocs-settings-panel-trigger-${field.name}`, style: { transform: `scale(${Math.floor((1 / this.xscale) * 1000) / 1000}, ${Math.floor((1 / this.yscale) * 1000) / 1000})` }, class: "settings-icon", innerHTML: SettingsIcon, onClick: (e) => {
|
120
124
|
e.stopPropagation();
|
121
125
|
this.showingProperties = !this.showingProperties;
|
122
126
|
} }), this.showingProperties && (h("verdocs-portal", { anchor: `verdocs-settings-panel-trigger-${field.name}`, onClickAway: () => (this.showingProperties = false) }, h("verdocs-template-field-properties", { templateId: this.templateid, fieldName: field.name, onClose: () => (this.showingProperties = false), onDelete: () => {
|
@@ -1,18 +1,18 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host } from './index-172625c5.js';
|
2
2
|
import { g as getRGBA } from './Colors-1b298092.js';
|
3
|
-
import { g as getFieldSettings } from './utils-f76f3448.js';
|
4
|
-
import { F as FORMAT_TIMESTAMP } from './Types-1628dc71.js';
|
5
3
|
import { g as getTemplateFieldStore } from './TemplateFieldStore-0516a7ec.js';
|
4
|
+
import { g as getFieldSettings } from './utils-d081a2b9.js';
|
5
|
+
import { F as FORMAT_TIMESTAMP } from './Types-1628dc71.js';
|
6
|
+
import { S as SettingsIcon } from './Icons-ddea87bf.js';
|
6
7
|
import { f as format } from './index-914ed6f7.js';
|
8
|
+
import './index-4439b0d1.js';
|
7
9
|
import './_commonjsHelpers-8a9f3b18.js';
|
8
10
|
import './Envelopes-627c5239.js';
|
9
11
|
import './Types-5f31149e.js';
|
10
12
|
import './Files-70a192df.js';
|
11
|
-
import './index-4439b0d1.js';
|
12
13
|
|
13
14
|
const verdocsFieldTimestampCss = "verdocs-field-timestamp{width:160px;height:15px;opacity:0.5;display:block;font-size:9px;position:relative;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-field-timestamp.done{opacity:1}verdocs-field-timestamp input{position:absolute;cursor:inherit;width:100%;height:100%;font-size:9px;background:none;font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0, 0, 0, 0.87);border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-timestamp input.hide{display:none}verdocs-field-timestamp.required{border:1px solid #cc0000}verdocs-field-timestamp.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-timestamp verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-timestamp verdocs-button-panel[data-active],verdocs-field-timestamp verdocs-button-panel:hover{opacity:1}verdocs-field-timestamp verdocs-button-panel .icon svg{fill:#333333}verdocs-field-timestamp verdocs-button-panel .icon:hover svg{fill:#000000}verdocs-field-timestamp .settings-icon{position:absolute;top:-3px;left:-20px;display:inline-block;cursor:pointer;opacity:0.6}verdocs-field-timestamp .settings-icon svg{fill:#707ae5}verdocs-field-timestamp .settings-icon:hover{opacity:1}";
|
14
15
|
|
15
|
-
const settingsIcon = '<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20"><path d="m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z"/></svg>';
|
16
16
|
const VerdocsFieldTimestamp = class {
|
17
17
|
constructor(hostRef) {
|
18
18
|
registerInstance(this, hostRef);
|
@@ -67,7 +67,7 @@ const VerdocsFieldTimestamp = class {
|
|
67
67
|
return (h(Host, { class: { required: field === null || field === void 0 ? void 0 : field.required, disabled }, style: { backgroundColor } }, h("input", { type: "text", placeholder: settings === null || settings === void 0 ? void 0 : settings.placeholder, tabIndex: settings === null || settings === void 0 ? void 0 : settings.order,
|
68
68
|
// TODO: It would really make more sense to show the date and time but the default width of 64px for this field
|
69
69
|
// is encoded in a ton of existing entries in the database and is hard to change.
|
70
|
-
value: formatted, disabled: true, ref: el => (this.el = el) }), this.editable && (h(Fragment, null, h("div", { id: `verdocs-settings-panel-trigger-${field.name}`, style: { transform: `scale(${Math.floor((1 / this.xscale) * 1000) / 1000}, ${Math.floor((1 / this.yscale) * 1000) / 1000})` }, class: "settings-icon", innerHTML:
|
70
|
+
value: formatted, disabled: true, ref: el => (this.el = el) }), this.editable && (h(Fragment, null, h("div", { id: `verdocs-settings-panel-trigger-${field.name}`, style: { transform: `scale(${Math.floor((1 / this.xscale) * 1000) / 1000}, ${Math.floor((1 / this.yscale) * 1000) / 1000})` }, class: "settings-icon", innerHTML: SettingsIcon, onClick: (e) => {
|
71
71
|
e.stopPropagation();
|
72
72
|
this.showingProperties = !this.showingProperties;
|
73
73
|
} }), this.showingProperties && (h("verdocs-portal", { anchor: `verdocs-settings-panel-trigger-${field.name}`, onClickAway: () => (this.showingProperties = false) }, h("verdocs-template-field-properties", { templateId: this.templateid, fieldName: field.name, onClose: () => (this.showingProperties = false), onDelete: () => {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-172625c5.js';
|
2
2
|
import './Types-5f31149e.js';
|
3
3
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-56fa3371.js';
|
4
|
-
import { u as unicodeNBSP } from './Icons-
|
4
|
+
import { u as unicodeNBSP } from './Icons-ddea87bf.js';
|
5
5
|
|
6
6
|
const verdocsFileChooserCss = "verdocs-file-chooser{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-file-chooser .upload-box{text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;padding:40px 15px;color:rgba(0, 0, 0, 0.54)}verdocs-file-chooser .upload-box svg{width:64px;height:64px;fill:#5c6575}verdocs-file-chooser .selected-filename{font-size:20px;font-weight:bold;overflow-wrap:anywhere}verdocs-file-chooser .or-prefer{height:20px;margin:20px 0;font-size:16px}";
|
7
7
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-172625c5.js';
|
2
2
|
import { i as integerSequence } from './Primitives-8fe93caf.js';
|
3
|
-
import {
|
3
|
+
import { d as renderedTextWidth } from './utils-d081a2b9.js';
|
4
4
|
import { c as createPopper } from './popper-15e448b4.js';
|
5
5
|
import './_commonjsHelpers-8a9f3b18.js';
|
6
6
|
import './Envelopes-627c5239.js';
|
@@ -4,7 +4,8 @@ import './Types-5f31149e.js';
|
|
4
4
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-56fa3371.js';
|
5
5
|
import { u as updateField, d as deleteField } from './Fields-c82e6df3.js';
|
6
6
|
import { g as getTemplateFieldStore, u as updateStoreField } from './TemplateFieldStore-0516a7ec.js';
|
7
|
-
import { g as
|
7
|
+
import { g as getTemplateRoleStore } from './TemplateRoleStore-bbb2b098.js';
|
8
|
+
import { g as getTemplateStore } from './TemplateStore-adbf68a0.js';
|
8
9
|
import { S as SDKError } from './errors-9b5498c8.js';
|
9
10
|
import './index-4439b0d1.js';
|
10
11
|
|
@@ -1,21 +1,22 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-172625c5.js';
|
2
2
|
import './Types-5f31149e.js';
|
3
3
|
import { V as VerdocsEndpoint, b as createTemplatev2, u as updateTemplate } from './VerdocsEndpoint-56fa3371.js';
|
4
|
-
import {
|
5
|
-
import { g as getTemplateStore
|
4
|
+
import { g as getTemplateRoleStore, b as getRoleNames, a as getRoleIndex } from './TemplateRoleStore-bbb2b098.js';
|
5
|
+
import { g as getTemplateStore } from './TemplateStore-adbf68a0.js';
|
6
|
+
import { r as renderDocumentField } from './utils-d081a2b9.js';
|
6
7
|
import { S as SDKError } from './errors-9b5498c8.js';
|
7
8
|
import { j as createEnvelope } from './Envelopes-627c5239.js';
|
8
9
|
import { a as isValidEmail, i as isValidPhone } from './Validators-16a2a43b.js';
|
9
10
|
import { g as getRGBA } from './Colors-1b298092.js';
|
10
11
|
import { c as createTemplateDocument, d as deleteTemplateDocument } from './TemplateDocuments-6fd2f4e2.js';
|
11
|
-
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-
|
12
|
+
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-ddea87bf.js';
|
12
13
|
import { V as VerdocsToast } from './Toast-f3b8fd46.js';
|
14
|
+
import './index-4439b0d1.js';
|
15
|
+
import './TemplateFieldStore-0516a7ec.js';
|
13
16
|
import './_commonjsHelpers-8a9f3b18.js';
|
14
17
|
import './Files-70a192df.js';
|
15
18
|
import './Types-1628dc71.js';
|
16
19
|
import './index-914ed6f7.js';
|
17
|
-
import './index-4439b0d1.js';
|
18
|
-
import './TemplateFieldStore-0516a7ec.js';
|
19
20
|
|
20
21
|
/**
|
21
22
|
* Enable automatic reminders. setup_time is the number of days after the envelope is sent that the first reminder
|
@@ -49,7 +50,8 @@ const VerdocsPreview = class {
|
|
49
50
|
constructor(hostRef) {
|
50
51
|
registerInstance(this, hostRef);
|
51
52
|
this.sdkError = createEvent(this, "sdkError", 7);
|
52
|
-
this.
|
53
|
+
this.templateStore = null;
|
54
|
+
this.roleStore = null;
|
53
55
|
this.endpoint = VerdocsEndpoint.getDefault();
|
54
56
|
this.templateId = null;
|
55
57
|
}
|
@@ -65,7 +67,8 @@ const VerdocsPreview = class {
|
|
65
67
|
console.log('[PREVIEW] Unable to start builder session, must be authenticated');
|
66
68
|
return;
|
67
69
|
}
|
68
|
-
this.
|
70
|
+
this.templateStore = await getTemplateStore(this.endpoint, this.templateId, false);
|
71
|
+
this.roleStore = getTemplateRoleStore(this.templateId);
|
69
72
|
console.log(`[PREVIEW] Loading template ${this.templateId}`, this.endpoint.session);
|
70
73
|
}
|
71
74
|
catch (e) {
|
@@ -76,17 +79,17 @@ const VerdocsPreview = class {
|
|
76
79
|
handlePageRendered(e) {
|
77
80
|
var _a, _b;
|
78
81
|
const pageInfo = e.detail;
|
79
|
-
const fields = (_b = (_a = this.
|
82
|
+
const fields = (_b = (_a = this.templateStore) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.fields.filter(field => field.page_sequence === pageInfo.pageNumber);
|
80
83
|
console.log('[PREVIEW] Page rendered', pageInfo, fields);
|
81
|
-
fields.forEach(field => renderDocumentField(field, pageInfo,
|
84
|
+
fields.forEach(field => renderDocumentField(field, pageInfo, { disabled: true, editable: false, draggable: false }));
|
82
85
|
}
|
83
86
|
render() {
|
84
87
|
var _a, _b, _c, _d;
|
85
88
|
// TODO: Render a better error
|
86
|
-
if (!((_b = (_a = this.
|
89
|
+
if (!((_b = (_a = this.templateStore) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.isLoaded)) {
|
87
90
|
return (h(Host, null, h("verdocs-loader", null)));
|
88
91
|
}
|
89
|
-
const pages = [...(_d = (_c = this.
|
92
|
+
const pages = [...(_d = (_c = this.templateStore) === null || _c === void 0 ? void 0 : _c.state) === null || _d === void 0 ? void 0 : _d.pages];
|
90
93
|
pages.sort((a, b) => a.sequence - b.sequence);
|
91
94
|
return (h(Host, null, pages.map(page => {
|
92
95
|
return (h("verdocs-template-document-page", { templateId: page.template_id, documentId: page.document_id, pageNumber: page.sequence, virtualWidth: 612, virtualHeight: 792, onPageRendered: e => this.handlePageRendered(e), layers: [
|
@@ -112,7 +115,8 @@ const VerdocsSend = class {
|
|
112
115
|
this.sdkError = createEvent(this, "sdkError", 7);
|
113
116
|
this.searchContacts = createEvent(this, "searchContacts", 7);
|
114
117
|
this.levels = [];
|
115
|
-
this.
|
118
|
+
this.templateStore = null;
|
119
|
+
this.roleStore = null;
|
116
120
|
this.endpoint = VerdocsEndpoint.getDefault();
|
117
121
|
this.templateId = null;
|
118
122
|
this.environment = 'web';
|
@@ -127,7 +131,7 @@ const VerdocsSend = class {
|
|
127
131
|
this.rolesCompleted = {};
|
128
132
|
}
|
129
133
|
async componentWillLoad() {
|
130
|
-
var _a, _b, _c, _d, _e, _f
|
134
|
+
var _a, _b, _c, _d, _e, _f;
|
131
135
|
try {
|
132
136
|
const loadSessionResult = this.endpoint.loadSession();
|
133
137
|
if (!this.templateId) {
|
@@ -138,14 +142,15 @@ const VerdocsSend = class {
|
|
138
142
|
console.log('[SEND] Unable to start builder session, must be authenticated');
|
139
143
|
return;
|
140
144
|
}
|
141
|
-
this.
|
142
|
-
|
145
|
+
this.templateStore = await getTemplateStore(this.endpoint, this.templateId, false);
|
146
|
+
this.roleStore = getTemplateRoleStore(this.templateId);
|
147
|
+
if (!((_b = (_a = this.templateStore) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.is_sendable)) {
|
143
148
|
console.warn(`[SEND] Template is not sendable`, this.templateId);
|
144
149
|
}
|
145
|
-
if (
|
150
|
+
if (this.roleStore.get('roles')) {
|
146
151
|
const rolesAtLevel = {};
|
147
152
|
this.rolesCompleted = {};
|
148
|
-
|
153
|
+
this.roleStore.get('roles').forEach(role => {
|
149
154
|
const level = role.sequence - 1;
|
150
155
|
rolesAtLevel[level] || (rolesAtLevel[level] = []);
|
151
156
|
const id = `r-${level}-${rolesAtLevel[level].length}`;
|
@@ -158,7 +163,7 @@ const VerdocsSend = class {
|
|
158
163
|
this.levels = Object.keys(rolesAtLevel).map(levelStr => +levelStr);
|
159
164
|
this.levels.sort((a, b) => a - b);
|
160
165
|
}
|
161
|
-
if ((
|
166
|
+
if ((_c = loadSessionResult === null || loadSessionResult === void 0 ? void 0 : loadSessionResult.session) === null || _c === void 0 ? void 0 : _c.profile) {
|
162
167
|
this.sessionContacts.push({
|
163
168
|
id: loadSessionResult.session.profile.id,
|
164
169
|
name: `${loadSessionResult.session.profile.first_name} ${loadSessionResult.session.profile.last_name}`,
|
@@ -169,7 +174,7 @@ const VerdocsSend = class {
|
|
169
174
|
}
|
170
175
|
catch (e) {
|
171
176
|
console.log('[SEND] Error with preview session', e);
|
172
|
-
(
|
177
|
+
(_d = this.sdkError) === null || _d === void 0 ? void 0 : _d.emit(new SDKError(e.message, (_e = e.response) === null || _e === void 0 ? void 0 : _e.status, (_f = e.response) === null || _f === void 0 ? void 0 : _f.data));
|
173
178
|
}
|
174
179
|
}
|
175
180
|
getLevelIcon(level) {
|
@@ -204,7 +209,7 @@ const VerdocsSend = class {
|
|
204
209
|
this.sending = true;
|
205
210
|
const details = {
|
206
211
|
template_id: this.templateId,
|
207
|
-
name: (_b = (_a = this.
|
212
|
+
name: (_b = (_a = this.templateStore) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.name,
|
208
213
|
environment: this.environment,
|
209
214
|
roles: Object.values(this.rolesCompleted),
|
210
215
|
// TODO
|
@@ -231,15 +236,15 @@ const VerdocsSend = class {
|
|
231
236
|
(_a = this.exit) === null || _a === void 0 ? void 0 : _a.emit();
|
232
237
|
}
|
233
238
|
render() {
|
234
|
-
var _a, _b
|
235
|
-
const roleNames = (
|
239
|
+
var _a, _b;
|
240
|
+
const roleNames = getRoleNames(this.roleStore);
|
236
241
|
const rolesAssigned = Object.values(this.rolesCompleted).filter(recipient => isValidEmail(recipient.email) || isValidPhone(recipient.phone));
|
237
242
|
const allRolesAssigned = rolesAssigned.length >= roleNames.length;
|
238
|
-
return (h(Host, { class: { sendable: (
|
243
|
+
return (h(Host, { class: { sendable: (_b = (_a = this.templateStore) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.is_sendable } }, h("div", { class: "recipients" }, h("div", { class: "left-line" }), h("div", { class: `level level-start` }, this.getLevelIcon(-1), h("div", { class: "complete" }, "Send Envelope")), this.levels.map(level => (h("div", { class: `level level-${level}` }, this.getLevelIcon(level), this.rolesAtLevel[level].map(role => {
|
239
244
|
var _a, _b, _c, _d, _e, _f;
|
240
245
|
const unknown = !role.email;
|
241
246
|
const elId = `verdocs-send-recipient-${role.name}`;
|
242
|
-
return unknown ? (h("div", { class: "recipient", style: { backgroundColor: getRGBA(getRoleIndex(
|
247
|
+
return unknown ? (h("div", { class: "recipient", style: { backgroundColor: getRGBA(getRoleIndex(this.roleStore, role.name)) }, onClick: e => this.handleClickRole(e, role), id: elId }, (_b = (_a = this.rolesCompleted[role.id]) === null || _a === void 0 ? void 0 : _a.full_name) !== null && _b !== void 0 ? _b : role.name, h("div", { class: "icon", innerHTML: editIcon }), this.showPickerForId === role.id && (h("verdocs-portal", { anchor: elId, onClickAway: () => (this.showPickerForId = '') }, h("verdocs-contact-picker", { onExit: () => (this.showPickerForId = ''), onNext: e => this.handleSelectContact(e, role), contactSuggestions: this.sessionContacts, templateRole: (_c = this.rolesCompleted[role.id]) !== null && _c !== void 0 ? _c : role, onSearchContacts: e => { var _a; return (_a = this.searchContacts) === null || _a === void 0 ? void 0 : _a.emit(e.detail); } }))))) : (h("div", { class: "recipient", style: { borderColor: getRGBA(getRoleIndex(this.roleStore, role.name)) }, onClick: e => this.handleClickRole(e, role), id: elId }, (_e = (_d = this.rolesCompleted[role.id]) === null || _d === void 0 ? void 0 : _d.full_name) !== null && _e !== void 0 ? _e : role.full_name, h("div", { class: "icon", innerHTML: editIcon }), this.showPickerForId === role.id && (h("verdocs-portal", { anchor: elId, onClickAway: () => (this.showPickerForId = '') }, h("verdocs-contact-picker", { onExit: () => (this.showPickerForId = ''), onNext: e => this.handleSelectContact(e, role), contactSuggestions: this.sessionContacts, templateRole: (_f = this.rolesCompleted[role.id]) !== null && _f !== void 0 ? _f : role, onSearchContacts: e => { var _a; return (_a = this.searchContacts) === null || _a === void 0 ? void 0 : _a.emit(e.detail); } })))));
|
243
248
|
})))), h("div", { class: `level level-done` }, this.getLevelIcon(this.levels.length), h("div", { class: "complete" }, "Signing Complete"))), h("div", { class: "buttons" }, h("verdocs-button", { label: "Cancel", size: "small", variant: "outline", onClick: e => this.handleCancel(e), disabled: this.sending }), h("verdocs-button", { label: "Send", size: "small", disabled: !allRolesAssigned || this.sending, onClick: e => this.handleSend(e) }), this.sending && h("verdocs-spinner", null))));
|
244
249
|
}
|
245
250
|
};
|
@@ -6,7 +6,7 @@ import { V as VerdocsToast } from './Toast-f3b8fd46.js';
|
|
6
6
|
import { S as SDKError } from './errors-9b5498c8.js';
|
7
7
|
import { g as getRoles, a as getCurrentProfile, u as updateProfile } from './Profiles-d4df4d1c.js';
|
8
8
|
import { f as format } from './index-914ed6f7.js';
|
9
|
-
import {
|
9
|
+
import { c as convertToE164 } from './utils-d081a2b9.js';
|
10
10
|
import './_commonjsHelpers-8a9f3b18.js';
|
11
11
|
import './Envelopes-627c5239.js';
|
12
12
|
import './Files-70a192df.js';
|
@@ -5,7 +5,7 @@ import { e as envelopeRecipientAgree, a as envelopeRecipientDecline, b as envelo
|
|
5
5
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-56fa3371.js';
|
6
6
|
import { i as isValidPhone, a as isValidEmail } from './Validators-16a2a43b.js';
|
7
7
|
import { f as fullNameToInitials, i as integerSequence } from './Primitives-8fe93caf.js';
|
8
|
-
import { a as saveAttachment, u as updateDocumentFieldValue,
|
8
|
+
import { a as saveAttachment, u as updateDocumentFieldValue, r as renderDocumentField, b as getFieldId } from './utils-d081a2b9.js';
|
9
9
|
import { a as createTemplateFieldStoreFromEnvelope } from './TemplateFieldStore-0516a7ec.js';
|
10
10
|
import { a as FORMAT_DATE } from './Types-1628dc71.js';
|
11
11
|
import { V as VerdocsToast } from './Toast-f3b8fd46.js';
|
@@ -411,7 +411,7 @@ const VerdocsSign = class {
|
|
411
411
|
this.nextSubmits = false;
|
412
412
|
}
|
413
413
|
}
|
414
|
-
attachFieldAttributes(pageInfo, field,
|
414
|
+
attachFieldAttributes(pageInfo, field, el) {
|
415
415
|
var _a;
|
416
416
|
el.addEventListener('input', (e) => {
|
417
417
|
console.log('[SIGN] onfieldInput', e.detail, e.target.value);
|
@@ -439,7 +439,6 @@ const VerdocsSign = class {
|
|
439
439
|
el.setAttribute('templateid', this.envelope.template_id);
|
440
440
|
el.setAttribute('fieldname', field.name);
|
441
441
|
el.setAttribute('page', pageInfo.pageNumber);
|
442
|
-
el.setAttribute('roleindex', roleIndex);
|
443
442
|
el.setAttribute('xScale', pageInfo.xScale);
|
444
443
|
el.setAttribute('yScale', pageInfo.yScale);
|
445
444
|
el.setAttribute('initials', this.recipient ? fullNameToInitials(this.recipient.full_name) : '');
|
@@ -447,7 +446,7 @@ const VerdocsSign = class {
|
|
447
446
|
}
|
448
447
|
handlePageRendered(e) {
|
449
448
|
const pageInfo = e.detail;
|
450
|
-
const roleIndex = getRoleIndex(this.
|
449
|
+
// const roleIndex = getRoleIndex(this.roleStore, this.recipient.role_name);
|
451
450
|
console.log('hpr', this.recipient, this.envelope.fields.filter(field => field.recipient_role === this.recipient.role_name));
|
452
451
|
const recipientFields = this.getRecipientFields().filter(field => field.page === pageInfo.pageNumber);
|
453
452
|
// console.log('[SIGN] Page rendered, updating fields', {pageInfo, roleIndex, recipientFields});
|
@@ -455,34 +454,33 @@ const VerdocsSign = class {
|
|
455
454
|
recipientFields
|
456
455
|
.filter(field => field.page === pageInfo.pageNumber)
|
457
456
|
.forEach(field => {
|
458
|
-
const el = renderDocumentField(field, pageInfo,
|
457
|
+
const el = renderDocumentField(field, pageInfo, { disabled: false, editable: false, draggable: false, done: this.isDone });
|
459
458
|
if (!el) {
|
460
459
|
return;
|
461
460
|
}
|
462
461
|
if (Array.isArray(el)) {
|
463
|
-
el.map(e => this.attachFieldAttributes(pageInfo, field,
|
462
|
+
el.map(e => this.attachFieldAttributes(pageInfo, field, e));
|
464
463
|
}
|
465
464
|
else {
|
466
|
-
this.attachFieldAttributes(pageInfo, field,
|
465
|
+
this.attachFieldAttributes(pageInfo, field, el);
|
467
466
|
}
|
468
467
|
});
|
469
468
|
// Now render the fields for other signers who have yet to act
|
470
469
|
this.sortedRecipients
|
471
470
|
.filter(r => r.role_name !== this.recipient.role_name && (r.status === RecipientStates.INVITED || r.status === RecipientStates.OPENED || r.status === RecipientStates.PENDING))
|
472
|
-
.forEach(
|
473
|
-
const otherIndex = getRoleIndex(this.roleNames, recipient.role_name);
|
471
|
+
.forEach(() => {
|
474
472
|
this.getRecipientFields()
|
475
473
|
.filter(field => field.page === pageInfo.pageNumber)
|
476
474
|
.forEach(field => {
|
477
|
-
const el = renderDocumentField(field, pageInfo,
|
475
|
+
const el = renderDocumentField(field, pageInfo, { disabled: true, editable: false, draggable: false, done: this.isDone });
|
478
476
|
if (!el) {
|
479
477
|
return;
|
480
478
|
}
|
481
479
|
if (Array.isArray(el)) {
|
482
|
-
el.map(e => this.attachFieldAttributes(pageInfo, field,
|
480
|
+
el.map(e => this.attachFieldAttributes(pageInfo, field, e));
|
483
481
|
}
|
484
482
|
else {
|
485
|
-
this.attachFieldAttributes(pageInfo, field,
|
483
|
+
this.attachFieldAttributes(pageInfo, field, el);
|
486
484
|
}
|
487
485
|
});
|
488
486
|
});
|
@@ -2,7 +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-56fa3371.js';
|
4
4
|
import { g as getTemplateDocumentPageDisplayUri } from './TemplateDocuments-6fd2f4e2.js';
|
5
|
-
import { t as throttle } from './utils-
|
5
|
+
import { t as throttle } from './utils-d081a2b9.js';
|
6
6
|
import { c as createPopper } from './popper-15e448b4.js';
|
7
7
|
import './_commonjsHelpers-8a9f3b18.js';
|
8
8
|
import './Envelopes-627c5239.js';
|
@@ -4,17 +4,18 @@ import './Types-5f31149e.js';
|
|
4
4
|
import { V as VerdocsEndpoint, T as TemplateSenderTypes, u as updateTemplate } from './VerdocsEndpoint-56fa3371.js';
|
5
5
|
import { u as updateField, c as createField } from './Fields-c82e6df3.js';
|
6
6
|
import { i as integerSequence } from './Primitives-8fe93caf.js';
|
7
|
-
import { b as getRoleIndex, r as renderDocumentField, f as updateCssTransform, h as defaultWidth, i as defaultHeight } from './utils-f76f3448.js';
|
8
|
-
import { g as getTemplateStore, b as getTemplateRoleStore, a as getRoleNames, c as createTemplateRoleStore, u as updateStoreRole, d as deleteStoreRole } from './TemplateStore-618fb47f.js';
|
9
7
|
import { g as getTemplateFieldStore, u as updateStoreField } from './TemplateFieldStore-0516a7ec.js';
|
8
|
+
import { r as renderDocumentField, e as updateCssTransform, f as defaultWidth, h as defaultHeight } from './utils-d081a2b9.js';
|
9
|
+
import { g as getTemplateRoleStore, c as createTemplateRoleStore, u as updateStoreRole, d as deleteStoreRole, a as getRoleIndex } from './TemplateRoleStore-bbb2b098.js';
|
10
|
+
import { g as getTemplateStore } from './TemplateStore-adbf68a0.js';
|
10
11
|
import { S as SDKError } from './errors-9b5498c8.js';
|
11
12
|
import { g as getRGBA } from './Colors-1b298092.js';
|
12
13
|
import './_commonjsHelpers-8a9f3b18.js';
|
14
|
+
import './index-4439b0d1.js';
|
13
15
|
import './Envelopes-627c5239.js';
|
14
16
|
import './Files-70a192df.js';
|
15
17
|
import './Types-1628dc71.js';
|
16
18
|
import './index-914ed6f7.js';
|
17
|
-
import './index-4439b0d1.js';
|
18
19
|
|
19
20
|
/**
|
20
21
|
* A "role" is an individual participant in a signing flow, such as a signer or CC contact. Roles are identified by
|
@@ -135,7 +136,7 @@ const VerdocsTemplateFields = class {
|
|
135
136
|
async handleFieldChange(field, e, optionId) {
|
136
137
|
console.log('[FIELDS] handleFieldChange', field, e, optionId);
|
137
138
|
}
|
138
|
-
attachFieldAttributes(pageInfo, field,
|
139
|
+
attachFieldAttributes(pageInfo, field, el) {
|
139
140
|
el.addEventListener('input', e => this.handleFieldChange(field, e));
|
140
141
|
el.addEventListener('settingsChanged', () => {
|
141
142
|
var _a, _b;
|
@@ -149,7 +150,6 @@ const VerdocsTemplateFields = class {
|
|
149
150
|
});
|
150
151
|
el.setAttribute('templateid', this.templateId);
|
151
152
|
el.setAttribute('fieldname', field.name);
|
152
|
-
el.setAttribute('roleindex', roleIndex);
|
153
153
|
el.setAttribute('pageNumber', pageInfo.pageNumber);
|
154
154
|
el.setAttribute('xScale', pageInfo.xScale);
|
155
155
|
el.setAttribute('yScale', pageInfo.yScale);
|
@@ -166,19 +166,19 @@ const VerdocsTemplateFields = class {
|
|
166
166
|
}
|
167
167
|
reRenderField(field, pageNumber) {
|
168
168
|
const pageInfo = this.cachedPageInfo[pageNumber];
|
169
|
-
const roleIndex = getRoleIndex(getRoleNames(this.
|
170
|
-
const el = renderDocumentField(field, pageInfo,
|
169
|
+
// const roleIndex = getRoleIndex(getRoleNames(this.roleStore), field.role_name);
|
170
|
+
const el = renderDocumentField(field, pageInfo, { disabled: true, editable: true, draggable: true });
|
171
171
|
if (!el) {
|
172
172
|
return;
|
173
173
|
}
|
174
174
|
if (Array.isArray(el)) {
|
175
175
|
el.forEach(childEl => {
|
176
|
-
this.attachFieldAttributes(pageInfo, field,
|
176
|
+
this.attachFieldAttributes(pageInfo, field, childEl);
|
177
177
|
this.makeDraggable(childEl);
|
178
178
|
});
|
179
179
|
}
|
180
180
|
else {
|
181
|
-
this.attachFieldAttributes(pageInfo, field,
|
181
|
+
this.attachFieldAttributes(pageInfo, field, el);
|
182
182
|
this.makeDraggable(el);
|
183
183
|
}
|
184
184
|
}
|
@@ -251,6 +251,8 @@ const VerdocsTemplateFields = class {
|
|
251
251
|
updateStoreField(this.fieldStore, name, newFieldData);
|
252
252
|
event.target.removeAttribute('posX');
|
253
253
|
event.target.removeAttribute('posY');
|
254
|
+
// this.reRenderField(newFieldData, pageNumber);
|
255
|
+
console.log('[FIELDS] Updated', name, newFieldData);
|
254
256
|
(_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: (_b = this.templateStore) === null || _b === void 0 ? void 0 : _b.state, event: 'updated-field' });
|
255
257
|
}
|
256
258
|
generateFieldName(type, pageNumber) {
|
@@ -768,7 +770,7 @@ const VerdocsTemplateRoles = class {
|
|
768
770
|
console.log('Rendering', roleNames, sequences);
|
769
771
|
return (h(Host, null, h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("h5", null, "Roles and Workflow"), h("div", { class: "participants" }, h("div", { class: "left-line" }), h("div", { class: "row" }, h("div", { class: "icon", innerHTML: startIcon }), h("div", { class: "row-roles" }, h("div", { class: "sender" }, h("span", { class: "label" }, "Sender:"), " ", senderLabels[(_c = (_b = this.templateStore) === null || _b === void 0 ? void 0 : _b.state) === null || _c === void 0 ? void 0 : _c.sender], ' ', h("div", { class: "settings-button", innerHTML: settingsIcon, onClick: () => (this.showingSenderDialog = true), "aria-role": "button" })))), h("div", { class: "row add-sequence", "data-sequence": 0 }, h("div", { class: "icon", innerHTML: plusIcon }), h("div", { class: "row-roles" }, h("div", { class: "dropzone", "data-sequence": 0, "data-order": 1 }, "Add Step"))), sequences.map(sequence => (h(Fragment, null, h("div", { class: "row" }, h("div", { class: "icon", innerHTML: stepIcon }), h("div", { class: "row-roles" }, h("div", { class: "dropzone", "data-order": 0.5, "data-sequence": sequence }), this.getRolesAtSequence(sequence).map(role => {
|
770
772
|
const unknown = !role.email;
|
771
|
-
return unknown ? (h(Fragment, null, h("div", { class: "recipient", style: { backgroundColor: getRGBA(getRoleIndex(
|
773
|
+
return unknown ? (h(Fragment, null, h("div", { class: "recipient", style: { backgroundColor: getRGBA(getRoleIndex(this.roleStore, role.name)) }, "data-rolename": role.name, "data-sequence": sequence, "data-order": role.order }, h("span", { class: "type-icon", innerHTML: role.type === 'signer' ? iconSigner : role.type === 'cc' ? iconCC : iconApprover }), role.name, " ", h("div", { class: "settings-button", innerHTML: settingsIcon, onClick: () => (this.showingRoleDialog = role.name), "aria-role": "button" })), h("div", { class: "dropzone", "data-order": role.order + 0.5, "data-sequence": sequence }))) : (h(Fragment, null, h("div", { class: "recipient", style: { borderColor: getRGBA(getRoleIndex(this.roleStore, role.name)) }, "data-rolename": role.name, "data-sequence": sequence, "data-order": role.order }, h("span", { class: "type-icon", innerHTML: role.type === 'signer' ? iconSigner : role.type === 'cc' ? iconCC : iconApprover }), role.full_name, " ", h("div", { class: "settings-button", innerHTML: settingsIcon, onClick: () => (this.showingRoleDialog = role.name), "aria-role": "button" })), h("div", { class: "dropzone", "data-order": role.order + 0.5, "data-sequence": sequence })));
|
772
774
|
}), h("button", { class: "add-role", innerHTML: plusIcon, onClick: e => this.handleAddRole(e, sequence) }))), sequences.length > 0 && (h("div", { class: "row add-sequence", "data-sequence": sequence }, h("div", { class: "row-roles" }, h("div", { class: "icon", innerHTML: plusIcon }), h("div", { class: "dropzone", "data-sequence": sequence + 1, "data-order": 1 }, "Add Step"))))))), h("div", { class: "row", "data-sequence": sequences.length + 1 }, h("div", { class: "row-roles" }, h("div", { class: "icon", innerHTML: plusIcon }), h("button", { class: "add-step", innerHTML: plusIcon, onClick: e => this.handleAddStep(e, sequences.length + 1) }))), h("div", { class: "row" }, h("div", { class: "icon", innerHTML: doneIcon }), h("div", { class: "row-roles" }, h("div", { class: "complete" }, "Document Complete")))), roleNames.length < 1 && (h("div", { class: "empty" }, "You must add at least one Role before proceeding.", h("br", null), " Click the ", h("span", { innerHTML: plusIcon }), " Add button above to get started.")), h("div", { class: "buttons" }, h("div", { class: "flex-fill" }), h("verdocs-button", { variant: "outline", label: "Cancel", size: "small", onClick: () => this.handleCancel() }), h("verdocs-button", { label: "OK", size: "small", onClick: () => this.handleSubmit(), disabled: roleNames.length < 1 }))), this.showingRoleDialog && (h("verdocs-template-role-properties", { endpoint: this.endpoint, templateId: this.templateId, roleName: this.showingRoleDialog, onClose: () => {
|
773
775
|
this.showingRoleDialog = null;
|
774
776
|
}, onDelete: async () => {
|
@@ -4,7 +4,7 @@ import { b as userCanCancelEnvelope } from './Permissions-f2eb0421.js';
|
|
4
4
|
import './Types-5f31149e.js';
|
5
5
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-56fa3371.js';
|
6
6
|
import { i as integerSequence } from './Primitives-8fe93caf.js';
|
7
|
-
import { s as saveEnvelopesAsZip } from './utils-
|
7
|
+
import { s as saveEnvelopesAsZip } from './utils-d081a2b9.js';
|
8
8
|
import { S as SDKError } from './errors-9b5498c8.js';
|
9
9
|
import './_commonjsHelpers-8a9f3b18.js';
|
10
10
|
import './Files-70a192df.js';
|