@verdocs/web-sdk 1.12.35 → 1.12.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{Envelopes-f81d02b1.js → Envelopes-4d03f708.js} +4 -4
- package/dist/cjs/{Templates-ed812768.js → Templates-e258cbd5.js} +2 -2
- package/dist/cjs/{Templates-6705a1ce.js → Templates-f310df2f.js} +1 -1
- package/dist/cjs/{Types-35abf4e8.js → Types-f89f9116.js} +2 -2
- package/dist/cjs/{VerdocsEndpoint-e0d39762.js → VerdocsEndpoint-3e95f87f.js} +1 -1
- package/dist/cjs/{interact.min-29d23a9c.js → interact.min-531805f2.js} +1 -1
- package/dist/cjs/{utils-aa7160e9.js → utils-3a88b566.js} +2 -2
- package/dist/cjs/verdocs-auth.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-build.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-button-panel_3.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-dropdown_2.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-envelope-sidebar.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 +3 -3
- 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 +3 -3
- 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 +3 -3
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-preview.cjs.entry.js +6 -6
- package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-search.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-send.cjs.entry.js +15 -11
- package/dist/cjs/verdocs-sign.cjs.entry.js +20 -4
- package/dist/cjs/verdocs-template-attachments.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-template-create_3.cjs.entry.js +17 -16
- package/dist/cjs/verdocs-template-document-page.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-template-name.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-template-properties.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-template-reminders.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-template-role-properties_2.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-template-visibility.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-view.cjs.entry.js +4 -4
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.css +4 -1
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +30 -4
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +17 -0
- package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.js +7 -4
- package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.js +3 -5
- package/dist/components/Envelopes.js +3 -3
- package/dist/components/Templates2.js +2 -2
- package/dist/components/Types.js +1 -1
- package/dist/components/verdocs-send.js +9 -5
- package/dist/components/verdocs-sign.js +17 -1
- package/dist/components/verdocs-template-create2.js +7 -4
- package/dist/components/verdocs-template-roles2.js +3 -5
- package/dist/docs.json +11 -2
- package/dist/esm/{Envelopes-19a6e456.js → Envelopes-223b2797.js} +4 -4
- package/dist/esm/{Templates-8e4ab976.js → Templates-ca52ef90.js} +2 -2
- package/dist/esm/{Templates-deedf4bd.js → Templates-d94fb9d5.js} +1 -1
- package/dist/esm/{Types-6dc82c14.js → Types-5f31149e.js} +1 -1
- package/dist/esm/{VerdocsEndpoint-d0a126c0.js → VerdocsEndpoint-4367eb13.js} +1 -1
- package/dist/esm/{interact.min-ad5c452f.js → interact.min-e441821e.js} +1 -1
- package/dist/esm/{utils-9628af35.js → utils-c0c6df0c.js} +2 -2
- package/dist/esm/verdocs-auth.entry.js +2 -2
- package/dist/esm/verdocs-build.entry.js +4 -4
- package/dist/esm/verdocs-button-panel_3.entry.js +4 -4
- package/dist/esm/verdocs-contact-picker.entry.js +2 -2
- package/dist/esm/verdocs-dropdown_2.entry.js +4 -4
- package/dist/esm/verdocs-envelope-sidebar.entry.js +3 -3
- package/dist/esm/verdocs-field-checkbox.entry.js +3 -3
- package/dist/esm/verdocs-field-date.entry.js +3 -3
- 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 +3 -3
- 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 +3 -3
- package/dist/esm/verdocs-field-textbox.entry.js +4 -4
- package/dist/esm/verdocs-field-timestamp.entry.js +3 -3
- package/dist/esm/verdocs-preview.entry.js +6 -6
- package/dist/esm/verdocs-quick-functions_3.entry.js +3 -3
- package/dist/esm/verdocs-search.entry.js +2 -2
- package/dist/esm/verdocs-send.entry.js +15 -11
- package/dist/esm/verdocs-sign.entry.js +20 -4
- package/dist/esm/verdocs-template-attachments.entry.js +4 -4
- package/dist/esm/verdocs-template-create_3.entry.js +17 -16
- package/dist/esm/verdocs-template-document-page.entry.js +4 -4
- package/dist/esm/verdocs-template-name.entry.js +4 -4
- package/dist/esm/verdocs-template-properties.entry.js +3 -3
- package/dist/esm/verdocs-template-reminders.entry.js +4 -4
- package/dist/esm/verdocs-template-role-properties_2.entry.js +4 -4
- package/dist/esm/verdocs-template-visibility.entry.js +4 -4
- package/dist/esm/verdocs-view.entry.js +4 -4
- package/dist/esm-es5/Envelopes-223b2797.js +1 -0
- package/dist/esm-es5/Templates-ca52ef90.js +1 -0
- package/dist/esm-es5/{Templates-deedf4bd.js → Templates-d94fb9d5.js} +1 -1
- package/dist/esm-es5/{Types-6dc82c14.js → Types-5f31149e.js} +1 -1
- package/dist/esm-es5/{VerdocsEndpoint-d0a126c0.js → VerdocsEndpoint-4367eb13.js} +1 -1
- package/dist/esm-es5/{interact.min-ad5c452f.js → interact.min-e441821e.js} +1 -1
- package/dist/esm-es5/{utils-9628af35.js → utils-c0c6df0c.js} +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-button-panel_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-dropdown_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-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-preview.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-search.entry.js +1 -1
- package/dist/esm-es5/verdocs-send.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-attachments.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-create_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-properties.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-role-properties_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-visibility.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/types/components/embeds/verdocs-send/verdocs-send.d.ts +9 -0
- package/dist/types/components/templates/verdocs-template-roles/verdocs-template-roles.d.ts +2 -2
- package/dist/types/components.d.ts +5 -0
- package/dist/verdocs-web-sdk/{p-8ac64953.system.js → p-02316241.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fd73ee30.entry.js → p-038e9dfc.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2bc0d9be.js → p-05788c2b.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2fda790b.entry.js → p-07dac8d8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-693c98c5.entry.js → p-08653421.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fdbafc1f.system.entry.js → p-0a40faee.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a4051110.system.entry.js → p-124b98e3.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-992ae721.entry.js → p-14d7da8a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7448182b.js → p-15205501.js} +1 -1
- package/dist/verdocs-web-sdk/p-1c7478f8.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-563d545d.entry.js → p-1e35f143.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-1ec52273.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-a9f19c58.system.entry.js → p-2e0980f3.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ae6303f9.entry.js → p-30c2dfbc.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9a20f533.system.js → p-330a4c7d.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-373cb7c4.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-6316a549.system.entry.js → p-41d9b35b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3f9bea4d.system.entry.js → p-468eee0c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-47714747.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-3867c364.system.entry.js → p-48eb46ed.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-492f465d.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-0d81757b.system.js → p-4aa6b512.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c43c8a31.system.entry.js → p-4c06e243.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b9fc620d.entry.js → p-50b9e7a6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-54498887.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-b8c14498.system.entry.js → p-56ca1b0f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-456969a5.entry.js → p-58176d9d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f6e5de8f.system.entry.js → p-6034f271.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-aeb488e3.system.entry.js → p-614368ee.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-62c7d0c3.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-789d66cd.system.entry.js → p-636602ff.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-58a9048a.system.entry.js → p-645e4723.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-423b6ddf.entry.js → p-67ba3a16.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ed095623.entry.js → p-6870cbcb.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4e46db5b.entry.js → p-6c921148.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-6caf1137.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-06866a49.system.entry.js → p-71d5e053.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1aecc86f.entry.js → p-72b936b3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6e38f3c4.system.entry.js → p-73452912.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-74350c7c.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-c753d960.system.entry.js → p-7a5b9428.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6b3102b2.system.entry.js → p-7ba0c530.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e120905e.entry.js → p-7f13e92e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-76c4d3dd.entry.js → p-808f6a46.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e7e3af7e.system.entry.js → p-88720222.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0739d739.entry.js → p-8b8ad34e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9b2db78f.js → p-8e0b06f0.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1e44ea9c.system.entry.js → p-8ef81ec0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2abbbad7.entry.js → p-90c71302.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-74f6ca70.system.entry.js → p-93780e22.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e62c3c9c.system.entry.js → p-9c0dfec9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f15e84fb.entry.js → p-9c36aaaa.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-98098fad.system.entry.js → p-9cbe4bc7.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a2cd33fd.system.entry.js → p-9e9de6e3.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-85281871.system.entry.js → p-a4b7c9e5.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f4cb1692.entry.js → p-a59ae37d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e2275465.system.entry.js → p-a612d29b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e4b18c52.entry.js → p-b24324f6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d1fbad63.entry.js → p-b2c96afc.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-b86b362a.js +1 -0
- package/dist/verdocs-web-sdk/{p-6685a532.js → p-be25b61f.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2441a163.system.entry.js → p-becc9197.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c58fd28c.js → p-c2c49441.js} +1 -1
- package/dist/verdocs-web-sdk/p-c344f0fd.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-5c043400.system.js → p-c44fd897.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-61338680.entry.js → p-c60c9371.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b87ca18d.entry.js → p-c9705b22.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6cf864e3.entry.js → p-ca7d441a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f92ff2d2.entry.js → p-dc257e34.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-cb583a98.system.entry.js → p-e7a1baaf.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b97237fa.entry.js → p-f19adeb1.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fb86b102.js → p-f3e81f0b.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1ec06377.entry.js → p-fbb50212.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5e3bccd0.system.entry.js → p-fccb4fec.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f3bcd729.entry.js → p-ff784558.entry.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +4 -4
- package/dist/esm-es5/Envelopes-19a6e456.js +0 -1
- package/dist/esm-es5/Templates-8e4ab976.js +0 -1
- package/dist/verdocs-web-sdk/p-5cf14e4c.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-69912cbf.system.js +0 -1
- package/dist/verdocs-web-sdk/p-6e1e787a.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-94a2f261.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b28ef4bb.js +0 -1
- package/dist/verdocs-web-sdk/p-b8bb5a01.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c4229602.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d46a428b.system.js +0 -1
- package/dist/verdocs-web-sdk/p-db003554.system.js +0 -1
- package/dist/verdocs-web-sdk/p-fe2ab7b9.entry.js +0 -1
@@ -1 +1 @@
|
|
1
|
-
import{r as e,c as t,h as i,H as s}from"./p-e035df4b.js";import"./p-2bc0d9be.js";import{u as o,d as l}from"./p-8027431e.js";import{V as r,T as n}from"./p-c58fd28c.js";import{s as a}from"./p-c903c4a7.js";import{l as d}from"./p-6685a532.js";import{S as p}from"./p-7a1b2643.js";import{u as c}from"./p-b28ef4bb.js";import"./p-7291906c.js";const h=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.delete=t(this,"delete",7),this.sdkError=t(this,"sdkError",7),this.endpoint=r.getDefault(),this.templateId="",this.roleName="",this.sender=n.EVERYONE,this.dirty=!1,this.saving=!1,this.name="",this.type="signer",this.fullName="",this.email="",this.phone="",this.allowDelegation=!1}async componentWillLoad(){var e,t,i,s,o,l;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[TEMPLATE ROLE PROPERTIES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[TEMPLATE ROLE PROPERTIES] Unable to start builder session, must be authenticated");try{console.log(`[TEMPLATE ROLE PROPERTIES] Loading template ${this.templateId}`,this.endpoint.session),await d(this.endpoint,this.templateId)}catch(s){console.log("[TEMPLATE ROLE PROPERTIES] Error loading template",s),null===(e=this.sdkError)||void 0===e||e.emit(new p(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}const s=a.template.roles.find((e=>e.name===this.roleName));s&&(this.name=s.name,this.type=s.type,this.fullName=s.full_name,this.email=s.email,this.phone=s.phone,this.allowDelegation=s.delegator,console.log("Got role",s))}catch(e){console.log("[TEMPLATE ROLE PROPERTIES] Error with preview session",e),null===(s=this.sdkError)||void 0===s||s.emit(new p(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(l=e.response)||void 0===l?void 0:l.data))}}handleCancel(e){var t;e.stopPropagation(),this.name=a.template.name,this.dirty=!1,null===(t=this.close)||void 0===t||t.emit()}async handleSave(e){e.stopPropagation(),this.saving=!0,o(this.endpoint,this.templateId,this.roleName,{name:this.name,type:this.type,full_name:this.fullName,email:this.email,phone:this.phone,delegator:this.allowDelegation}).then((e=>{var t;console.log("Update result",e),this.saving=!1,this.dirty=!1,a.template.roles.forEach((e=>{e.name===this.roleName&&(e.name=this.name,e.type=this.type,e.full_name=this.fullName,e.email=this.email,e.phone=this.phone,e.delegator=this.allowDelegation)})),null===(t=this.close)||void 0===t||t.emit()})).catch((e=>{console.log("Uopdate error",e),this.saving=!1}))}async handleDelete(e){e.stopPropagation(),window.confirm("Are you sure you wish to remove this role? All associated fields will be removed as well. This action cannot be undone.")&&l(this.endpoint,this.templateId,this.roleName).then((e=>{var t;console.log("Role deleted",e),a.template.roles=[...a.template.roles.filter((e=>e.name!==this.roleName))],null===(t=this.delete)||void 0===t||t.emit({templateId:this.templateId,roleName:this.roleName})})).catch((e=>{console.log("Deletion error",e)}))}render(){return i(s,null,i("div",{class:"background-overlay",onClick:e=>this.handleCancel(e)},i("div",{class:"dialog"},i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("verdocs-text-input",{id:"verdocs-recipient-name",label:"Role Name",value:this.name,autocomplete:"off",helpText:"A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.",placeholder:"Template Name...",onInput:e=>{this.name=e.target.value,this.dirty=!0}}),i("div",{class:"row"},i("div",{class:"input-label"},"Type:"),i("verdocs-select-input",{value:this.type,options:[{label:"Signer",value:"signer"},{label:"CC",value:"cc"},{label:"Approver",value:"approver"}],onInput:e=>{this.type=e.target.value,this.dirty=!0}}),i("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."})),i("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=>{this.fullName=e.target.value,this.dirty=!0}}),i("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=>{this.email=e.target.value,this.dirty=!0}}),i("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=>{this.phone=e.target.value,this.dirty=!0}}),i("div",{class:"row"},i("div",{class:"input-label"},"May Delegate:"),i("div",{class:"checkbox-wrapper"},i("verdocs-checkbox",{checked:this.allowDelegation,onInput:e=>{this.allowDelegation=e.target.checked,this.dirty=!0}})),i("verdocs-help-icon",{text:"If enabled, this recipient may delegate their actions to another individual."})),i("div",{class:"buttons"},i("button",{class:"delete-button",disabled:this.dirty,onClick:e=>this.handleDelete(e),innerHTML:'<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>'}),i("div",{style:{flex:"1"}}),i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)}))))))}};h.style='verdocs-template-role-properties{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-role-properties .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-role-properties .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-role-properties .buttons verdocs-button{margin-left:16px}verdocs-template-role-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-role-properties verdocs-text-input{margin:0 0 10px 0}verdocs-template-role-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties verdocs-text-input verdocs-text-input{margin:0}verdocs-template-role-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-role-properties .delete-button:active{background:#f3f3f3}verdocs-template-role-properties .delete-button svg{width:24px;height:24px}';const m=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.endpoint=r.getDefault(),this.templateId="",this.sender=n.EVERYONE,this.saving=!1}async componentWillLoad(){var e,t,i,s,o,l;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[TEMPLATE SENDER] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[TEMPLATE SENDER] Unable to start builder session, must be authenticated");try{console.log(`[TEMPLATE SENDER] Loading template ${this.templateId}`,this.endpoint.session),await d(this.endpoint,this.templateId)}catch(s){console.log("[TEMPLATE SENDER] Error loading template",s),null===(e=this.sdkError)||void 0===e||e.emit(new p(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}this.sender=a.template.sender,console.log("s",this.sender)}catch(e){console.log("[TEMPLATE SENDER] Error with preview session",e),null===(s=this.sdkError)||void 0===s||s.emit(new p(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(l=e.response)||void 0===l?void 0:l.data))}}handleClose(){this.close.emit()}handleDismiss(e){"background-overlay"===e.target.className&&(e.preventDefault(),this.handleClose())}async handleSelectSetting(e){this.saving=!0,c(this.endpoint,this.templateId,{sender:e}).then((t=>{console.log("Update result",t),a.template.sender=e,this.saving=!1,this.sender=e})).catch((e=>{console.log("Error saving",e),this.saving=!1}))}render(){return i(s,null,i("div",{class:"background-overlay",onClick:e=>this.handleDismiss(e)},i("div",{class:"dialog"},i("div",{class:"options"},i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:n.EVERYONE,checked:this.sender===n.EVERYONE,onInput:()=>this.handleSelectSetting(n.EVERYONE)}),i("div",{class:"description"},i("div",{class:"name"},"Anyone on the Web"),i("verdocs-help-icon",{text:"Anyone can use this template. (Make its visibility is set to to 'Public' or 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:n.EVERYONE_AS_CREATOR,checked:this.sender===n.EVERYONE_AS_CREATOR,onInput:()=>this.handleSelectSetting(n.EVERYONE_AS_CREATOR)}),i("div",{class:"description"},i("div",{class:"name"},"Anyone on the Web as me"),i("verdocs-help-icon",{text:"Anyone can use this template on my behalf. (Make sure its visibility is set to 'Public' or 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:n.ORGANIZATION_MEMBER,checked:this.sender===n.ORGANIZATION_MEMBER,onInput:()=>this.handleSelectSetting(n.ORGANIZATION_MEMBER)}),i("div",{class:"description"},i("div",{class:"name"},"Anyone in my organization"),i("verdocs-help-icon",{text:"Anyone in my organization can use this template. (Make sure its visibility is set to 'Shared')"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:n.ORGANIZATION_MEMBER_AS_CREATOR,checked:this.sender===n.ORGANIZATION_MEMBER_AS_CREATOR,onInput:()=>this.handleSelectSetting(n.ORGANIZATION_MEMBER_AS_CREATOR)}),i("div",{class:"description"},i("div",{class:"name"},"Anyone in my organization as me"),i("verdocs-help-icon",{text:"Anyone in my organization can use this template on my behalf. (Make sure its visibility is set to to 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:n.CREATOR,checked:this.sender===n.CREATOR,onInput:()=>this.handleSelectSetting(n.CREATOR)}),i("div",{class:"description"},i("div",{class:"name"},"Me"),i("verdocs-help-icon",{text:"Only I can use this template."})))),i("div",{class:"buttons"},i("verdocs-button",{label:"Close",onClick:()=>this.handleClose()})))))}};m.style='verdocs-template-sender{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-sender .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-sender .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-sender .buttons verdocs-button{margin-left:16px}verdocs-template-sender .options{row-gap:10px}verdocs-template-sender .options .option{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .options .option .description{margin-left:10px}verdocs-template-sender .options .option .description .name{display:inline-block;vertical-align:top;margin-top:4px;margin-right:4px}';export{h as verdocs_template_role_properties,m as verdocs_template_sender}
|
1
|
+
import{r as e,c as t,h as i,H as s}from"./p-e035df4b.js";import"./p-05788c2b.js";import{u as o,d as l}from"./p-8027431e.js";import{V as r,T as n}from"./p-c2c49441.js";import{s as a}from"./p-c903c4a7.js";import{l as d}from"./p-be25b61f.js";import{S as p}from"./p-7a1b2643.js";import{u as c}from"./p-b86b362a.js";import"./p-7291906c.js";const h=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.delete=t(this,"delete",7),this.sdkError=t(this,"sdkError",7),this.endpoint=r.getDefault(),this.templateId="",this.roleName="",this.sender=n.EVERYONE,this.dirty=!1,this.saving=!1,this.name="",this.type="signer",this.fullName="",this.email="",this.phone="",this.allowDelegation=!1}async componentWillLoad(){var e,t,i,s,o,l;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[TEMPLATE ROLE PROPERTIES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[TEMPLATE ROLE PROPERTIES] Unable to start builder session, must be authenticated");try{console.log(`[TEMPLATE ROLE PROPERTIES] Loading template ${this.templateId}`,this.endpoint.session),await d(this.endpoint,this.templateId)}catch(s){console.log("[TEMPLATE ROLE PROPERTIES] Error loading template",s),null===(e=this.sdkError)||void 0===e||e.emit(new p(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}const s=a.template.roles.find((e=>e.name===this.roleName));s&&(this.name=s.name,this.type=s.type,this.fullName=s.full_name,this.email=s.email,this.phone=s.phone,this.allowDelegation=s.delegator,console.log("Got role",s))}catch(e){console.log("[TEMPLATE ROLE PROPERTIES] Error with preview session",e),null===(s=this.sdkError)||void 0===s||s.emit(new p(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(l=e.response)||void 0===l?void 0:l.data))}}handleCancel(e){var t;e.stopPropagation(),this.name=a.template.name,this.dirty=!1,null===(t=this.close)||void 0===t||t.emit()}async handleSave(e){e.stopPropagation(),this.saving=!0,o(this.endpoint,this.templateId,this.roleName,{name:this.name,type:this.type,full_name:this.fullName,email:this.email,phone:this.phone,delegator:this.allowDelegation}).then((e=>{var t;console.log("Update result",e),this.saving=!1,this.dirty=!1,a.template.roles.forEach((e=>{e.name===this.roleName&&(e.name=this.name,e.type=this.type,e.full_name=this.fullName,e.email=this.email,e.phone=this.phone,e.delegator=this.allowDelegation)})),null===(t=this.close)||void 0===t||t.emit()})).catch((e=>{console.log("Uopdate error",e),this.saving=!1}))}async handleDelete(e){e.stopPropagation(),window.confirm("Are you sure you wish to remove this role? All associated fields will be removed as well. This action cannot be undone.")&&l(this.endpoint,this.templateId,this.roleName).then((e=>{var t;console.log("Role deleted",e),a.template.roles=[...a.template.roles.filter((e=>e.name!==this.roleName))],null===(t=this.delete)||void 0===t||t.emit({templateId:this.templateId,roleName:this.roleName})})).catch((e=>{console.log("Deletion error",e)}))}render(){return i(s,null,i("div",{class:"background-overlay",onClick:e=>this.handleCancel(e)},i("div",{class:"dialog"},i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("verdocs-text-input",{id:"verdocs-recipient-name",label:"Role Name",value:this.name,autocomplete:"off",helpText:"A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.",placeholder:"Template Name...",onInput:e=>{this.name=e.target.value,this.dirty=!0}}),i("div",{class:"row"},i("div",{class:"input-label"},"Type:"),i("verdocs-select-input",{value:this.type,options:[{label:"Signer",value:"signer"},{label:"CC",value:"cc"},{label:"Approver",value:"approver"}],onInput:e=>{this.type=e.target.value,this.dirty=!0}}),i("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."})),i("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=>{this.fullName=e.target.value,this.dirty=!0}}),i("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=>{this.email=e.target.value,this.dirty=!0}}),i("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=>{this.phone=e.target.value,this.dirty=!0}}),i("div",{class:"row"},i("div",{class:"input-label"},"May Delegate:"),i("div",{class:"checkbox-wrapper"},i("verdocs-checkbox",{checked:this.allowDelegation,onInput:e=>{this.allowDelegation=e.target.checked,this.dirty=!0}})),i("verdocs-help-icon",{text:"If enabled, this recipient may delegate their actions to another individual."})),i("div",{class:"buttons"},i("button",{class:"delete-button",disabled:this.dirty,onClick:e=>this.handleDelete(e),innerHTML:'<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>'}),i("div",{style:{flex:"1"}}),i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)}))))))}};h.style='verdocs-template-role-properties{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-role-properties .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-role-properties .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-role-properties .buttons verdocs-button{margin-left:16px}verdocs-template-role-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-role-properties verdocs-text-input{margin:0 0 10px 0}verdocs-template-role-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties verdocs-text-input verdocs-text-input{margin:0}verdocs-template-role-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-role-properties .delete-button:active{background:#f3f3f3}verdocs-template-role-properties .delete-button svg{width:24px;height:24px}';const m=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.endpoint=r.getDefault(),this.templateId="",this.sender=n.EVERYONE,this.saving=!1}async componentWillLoad(){var e,t,i,s,o,l;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[TEMPLATE SENDER] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[TEMPLATE SENDER] Unable to start builder session, must be authenticated");try{console.log(`[TEMPLATE SENDER] Loading template ${this.templateId}`,this.endpoint.session),await d(this.endpoint,this.templateId)}catch(s){console.log("[TEMPLATE SENDER] Error loading template",s),null===(e=this.sdkError)||void 0===e||e.emit(new p(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}this.sender=a.template.sender,console.log("s",this.sender)}catch(e){console.log("[TEMPLATE SENDER] Error with preview session",e),null===(s=this.sdkError)||void 0===s||s.emit(new p(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(l=e.response)||void 0===l?void 0:l.data))}}handleClose(){this.close.emit()}handleDismiss(e){"background-overlay"===e.target.className&&(e.preventDefault(),this.handleClose())}async handleSelectSetting(e){this.saving=!0,c(this.endpoint,this.templateId,{sender:e}).then((t=>{console.log("Update result",t),a.template.sender=e,this.saving=!1,this.sender=e})).catch((e=>{console.log("Error saving",e),this.saving=!1}))}render(){return i(s,null,i("div",{class:"background-overlay",onClick:e=>this.handleDismiss(e)},i("div",{class:"dialog"},i("div",{class:"options"},i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:n.EVERYONE,checked:this.sender===n.EVERYONE,onInput:()=>this.handleSelectSetting(n.EVERYONE)}),i("div",{class:"description"},i("div",{class:"name"},"Anyone on the Web"),i("verdocs-help-icon",{text:"Anyone can use this template. (Make its visibility is set to to 'Public' or 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:n.EVERYONE_AS_CREATOR,checked:this.sender===n.EVERYONE_AS_CREATOR,onInput:()=>this.handleSelectSetting(n.EVERYONE_AS_CREATOR)}),i("div",{class:"description"},i("div",{class:"name"},"Anyone on the Web as me"),i("verdocs-help-icon",{text:"Anyone can use this template on my behalf. (Make sure its visibility is set to 'Public' or 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:n.ORGANIZATION_MEMBER,checked:this.sender===n.ORGANIZATION_MEMBER,onInput:()=>this.handleSelectSetting(n.ORGANIZATION_MEMBER)}),i("div",{class:"description"},i("div",{class:"name"},"Anyone in my organization"),i("verdocs-help-icon",{text:"Anyone in my organization can use this template. (Make sure its visibility is set to 'Shared')"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:n.ORGANIZATION_MEMBER_AS_CREATOR,checked:this.sender===n.ORGANIZATION_MEMBER_AS_CREATOR,onInput:()=>this.handleSelectSetting(n.ORGANIZATION_MEMBER_AS_CREATOR)}),i("div",{class:"description"},i("div",{class:"name"},"Anyone in my organization as me"),i("verdocs-help-icon",{text:"Anyone in my organization can use this template on my behalf. (Make sure its visibility is set to to 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:n.CREATOR,checked:this.sender===n.CREATOR,onInput:()=>this.handleSelectSetting(n.CREATOR)}),i("div",{class:"description"},i("div",{class:"name"},"Me"),i("verdocs-help-icon",{text:"Only I can use this template."})))),i("div",{class:"buttons"},i("verdocs-button",{label:"Close",onClick:()=>this.handleClose()})))))}};m.style='verdocs-template-sender{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-sender .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-sender .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-sender .buttons verdocs-button{margin-left:16px}verdocs-template-sender .options{row-gap:10px}verdocs-template-sender .options .option{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .options .option .description{margin-left:10px}verdocs-template-sender .options .option .description .name{display:inline-block;vertical-align:top;margin-top:4px;margin-right:4px}';export{h as verdocs_template_role_properties,m as verdocs_template_sender}
|
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,i,r){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,n){function s(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r["throw"](e))}catch(e){n(e)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,o,n,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(i)try{if(r=1,o&&(n=s[0]&2?o["return"]:s[0]?o["throw"]||((n=o["return"])&&n.call(o),0):o.next)&&!(n=n.call(o,s[1])).done)return n;if(o=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;o=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(n=i.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){i.label=s[1];break}if(s[0]===6&&i.label<n[1]){i.label=n[1];n=s;break}if(n&&i.label<n[2]){i.label=n[2];i.ops.push(s);break}if(n[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];o=0}finally{r=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-871407e9.system.js","./p-
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,r){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,n){function s(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r["throw"](e))}catch(e){n(e)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,o,n,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(i)try{if(r=1,o&&(n=s[0]&2?o["return"]:s[0]?o["throw"]||((n=o["return"])&&n.call(o),0):o.next)&&!(n=n.call(o,s[1])).done)return n;if(o=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;o=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(n=i.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){i.label=s[1];break}if(s[0]===6&&i.label<n[1]){i.label=n[1];n=s;break}if(n&&i.label<n[2]){i.label=n[2];i.ops.push(s);break}if(n[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];o=0}finally{r=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-871407e9.system.js","./p-54498887.system.js","./p-47714747.system.js","./p-c44fd897.system.js","./p-187b20b7.system.js","./p-71b8bb54.system.js","./p-d50523fd.system.js"],(function(e){"use strict";var t,i,r,o,n,s,a,l;return{setters:[function(e){t=e.r;i=e.c;r=e.h;o=e.H},function(){},function(e){n=e.g},function(e){s=e.V},function(e){a=e.S},function(e){l=e.s},function(){}],execute:function(){var p='verdocs-template-properties{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-properties form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form h5{font-size:14px;font-weight:400;margin:0 0 6px 0}verdocs-template-properties form .row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form fieldset{width:440px;border:none;max-width:100%;margin:0 0 20px 0;-webkit-box-sizing:border-box;box-sizing:border-box;padding:20px 20px 10px 20px;background-color:#ffffff;-webkit-box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14);box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)}verdocs-template-properties form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-properties form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-properties form input:focus{outline:none}verdocs-template-properties form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-properties form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-properties form .input-row verdocs-text-input input{text-align:center}verdocs-template-properties form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-properties form .radio-row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 10px 0;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties form .radio-row verdocs-radio-button{display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px}verdocs-template-properties form .radio-row label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form .radio-row label .title{font-size:16px;font-weight:500}verdocs-template-properties form .radio-row label .description{font-size:14px;font-weight:400}verdocs-template-properties .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-properties .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-properties ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-moz-placeholder{color:#aaaaaa}verdocs-template-properties :-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::placeholder{color:#aaaaaa}';var d=e("verdocs_template_properties",function(){function e(e){t(this,e);this.exit=i(this,"exit",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.endpoint=s.getDefault();this.templateId="";this.template=null;this.name="";this.visibility="";this.sendReminders=false;this.firstReminderDays="1";this.reminderDays="1"}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,r,o;return __generator(this,(function(s){switch(s.label){case 0:s.trys.push([0,2,,3]);this.endpoint.loadSession();console.log("[PROPERTIES] Loading template ".concat(this.templateId));return[4,n(this.endpoint,this.templateId)];case 1:r=s.sent();if(!r){console.log("[PREVIEW] Unable to load template");return[2]}console.log("[PROPERTIES] Got template",r);this.template=r;l.template=r;this.name=r.name;this.sendReminders=r.reminder_id!==null;return[3,3];case 2:o=s.sent();console.log("[PROPERTIES] Error loading template",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new a(o.message,(t=o.response)===null||t===void 0?void 0:t.status,(i=o.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.exit)===null||t===void 0?void 0:t.emit()};e.prototype.handleSubmit=function(e){var t;e.stopPropagation();(t=this.next)===null||t===void 0?void 0:t.emit({name:this.name,firstReminderDays:+this.firstReminderDays,reminderDays:+this.reminderDays,sendReminders:this.sendReminders})};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return r(o,null,r("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return r("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},r("h5",null,"Template Name"),r("fieldset",null,r("verdocs-text-input",{value:this.name,autocomplete:"off",onInput:function(t){return e.name=t.target.value}})),r("h5",null,"Reminders"),r("fieldset",null,r("div",{class:"input-row"},r("label",null,"Send Automatic Reminders"),r("verdocs-checkbox",{name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:function(t){return e.sendReminders=t.target.checked}})),r("div",{class:"input-row"},r("label",null,"Days Before First Reminder"),r("verdocs-text-input",{value:this.firstReminderDays,onInput:function(t){return e.firstReminderDays=t.target.value}})),r("div",{class:"input-row"},r("label",null,"Days Between Reminders"),r("verdocs-text-input",{value:this.reminderDays,onInput:function(t){return e.reminderDays=t.target.value}}))),r("h5",null,"Template Visibility"),r("fieldset",null,r("div",{class:"radio-row"},r("verdocs-radio-button",{name:"visibility",checked:true,value:"private",onChange:function(){return e.visibility="private"}}),r("label",{htmlFor:"verdocs-radio-button-visibility-private"},r("div",{class:"title"},"Private"),r("div",{class:"description"},"Only you can share and use this template"))),r("div",{class:"radio-row"},r("verdocs-radio-button",{name:"visibility",checked:true,value:"shared",onChange:function(){return e.visibility="shared"}}),r("label",{htmlFor:"verdocs-radio-button-visibility-shared"},r("div",{class:"title"},"Shared to your organization"),r("div",{class:"description"},"Give access to your organization to share and use this template"))),r("div",{class:"radio-row"},r("verdocs-radio-button",{name:"visibility",checked:true,value:"shared_public",onChange:function(){return e.visibility="shared_public"}}),r("label",{htmlFor:"verdocs-radio-button-visibility-shared_public"},r("div",{class:"title"},"Shared to your organization and Public"),r("div",{class:"description"},"Give access to your organization to share this template, and anyone on the Web can find and use this template"))),r("div",{class:"radio-row"},r("verdocs-radio-button",{name:"visibility",checked:this.visibility==="public",value:"public",onChange:function(){return e.visibility="public"}}),r("label",{htmlFor:"verdocs-radio-button-visibility-public"},r("div",{class:"title"},"Public"),r("div",{class:"description"},"Anyone on the Web can find and use this template")))),r("div",{class:"buttons"},r("div",{class:"flex-fill"}),r("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),r("verdocs-button",{label:"OK",size:"small",onClick:function(t){return e.handleSubmit(t)}})))};return e}());d.style=p}}}));
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as e,c as i,h as t,H as s,F as n}from"./p-e035df4b.js";import{b as o,t as r,u as a,c as l,d}from"./p-15205501.js";import{R as c}from"./p-05788c2b.js";import{V as h}from"./p-c2c49441.js";import{a as u,i as p}from"./p-e662f81b.js";import{f as v}from"./p-7291906c.js";import{s as g,u as f,b as m,r as x,d as b}from"./p-f3e81f0b.js";import{S as w}from"./p-7a1b2643.js";import"./p-aa124212.js";import"./p-ab01f71e.js";var y=function(e,i,t,s){return n=void 0,o=void 0,a=function(){return function(e,i){var t,s,n,o,r={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(r=0)),r;)try{if(t=1,s&&(n=2&a[0]?s.return:a[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,a[1])).done)return n;switch(s=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,s=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!((n=(n=r.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){r.label=a[1];break}if(6===a[0]&&r.label<n[1]){r.label=n[1],n=a;break}if(n&&r.label<n[2]){r.label=n[2],r.ops.push(a);break}n[2]&&r.ops.pop(),r.trys.pop();continue}a=i.call(e,r)}catch(e){a=[6,e],s=0}finally{t=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}(this,(function(){return[2,e.api.put("/envelopes/".concat(i,"/recipients/").concat(t),s).then((function(e){return e.data}))]}))},new((r=void 0)||(r=Promise))((function(e,i){function t(e){try{l(a.next(e))}catch(e){i(e)}}function s(e){try{l(a.throw(e))}catch(e){i(e)}}function l(i){var n;i.done?e(i.value):(n=i.value,n instanceof r?n:new r((function(e){e(n)}))).then(t,s)}l((a=a.apply(n,o||[])).next())}));var n,o,r,a};const k=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}],S=[{id:"print",label:"Print"},{id:"download",label:"Download"}],N=class{constructor(t){e(this,t),this.sdkError=i(this,"sdkError",7),this.envelopeLoaded=i(this,"envelopeLoaded",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.endpoint=null,this.recipientIndex=-1,this.envelopeId=null,this.roleId=null,this.inviteCode=null,this.headerTargetId=null,this.envelope=null,this.roleNames=[],this.recipient=null,this.signerToken=null,this.hasSignature=!1,this.nextButtonLabel="Start",this.nextSubmits=!1,this.errorMessage="",this.focusedField="",this.isDone=!1,this.showDone=!1,this.finishLater=!1,this.showFinishLater=!1,this.agreed=!1,this.documentsSingularPlural="document"}componentWillLoad(){this.endpoint=new h({sessionType:"signing"})}async componentWillRender(){var e,i,t,s,n,a,l;if(this.envelopeId)if(this.roleId)if(this.inviteCode)try{console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);const{session:e,recipient:i,signerToken:t}=await o(this.endpoint,{envelopeId:this.envelopeId,roleId:this.roleId,inviteCode:this.inviteCode});console.log(`[SIGN] Loaded signing session ${e.email} / ${e.profile_id}`),this.recipient=i,console.log("[SIGN] We are recipient",this.recipient),this.signerToken=t,this.endpoint.setToken(t),this.agreed&&(this.nextButtonLabel="Next"),this.envelope=await r(this.endpoint,this.envelopeId),this.roleNames=this.envelope.recipients.map((e=>e.role_name)),this.envelope.documents.length>0&&(this.documentsSingularPlural="document(s)"),this.recipientIndex=this.envelope.recipients.findIndex((e=>e.role_name==this.roleId)),this.recipientIndex>-1?(this.recipient=this.envelope.recipients[this.recipientIndex],this.agreed=this.recipient.agreed,console.log("[SIGN] Found our recipient in the envelope",this.recipientIndex,this.recipient)):console.log("[SIGN] Could not find our recipient record",this.roleId,this.envelope.recipients),this.isDone=["submitted","canceled","declined"].includes(this.recipient.status),this.checkRecipientFields(),null===(s=this.envelopeLoaded)||void 0===s||s.emit({endpoint:this.endpoint,envelope:this.envelope})}catch(e){console.log("Error with signing session",e),null===(n=this.sdkError)||void 0===n||n.emit(new w(e.message,null===(a=e.response)||void 0===a?void 0:a.status,null===(l=e.response)||void 0===l?void 0:l.data))}else null===(t=this.sdkError)||void 0===t||t.emit(new w("[SIGN] Missing required inviteCode",500,""));else null===(i=this.sdkError)||void 0===i||i.emit(new w("[SIGN] Missing required roleId",500,""));else null===(e=this.sdkError)||void 0===e||e.emit(new w("[SIGN] Missing required envelopId",500,""))}componentDidRender(){const e=this.headerTargetId?document.getElementById(this.headerTargetId):null,i=document.getElementById("verdocs-sign-header");e&&i&&(console.log("[SIGN] Moving header"),i.remove(),e.append(i))}handleClickAgree(){var e,i,t;(e=this.endpoint,i=this.envelopeId,t=this.roleId,!0,y(e,i,t,{action:"update",agreed:true})).then((()=>{var e;this.nextButtonLabel="Next",this.recipient.agreed=!0,this.agreed=!0,null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:this.envelope,event:"agreed"})})).catch((e=>{var i,t,s;console.log("Update failure",e),null===(i=this.sdkError)||void 0===i||i.emit(new w(e.message,null===(t=e.response)||void 0===t?void 0:t.status,null===(s=e.response)||void 0===s?void 0:s.data))}))}async handleOptionSelected(e){var i,t,s,n,o,r,a,l;switch(e.detail.id){case"later":this.finishLater=!0,this.showFinishLater=!0,null===(i=this.envelopeUpdated)||void 0===i||i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});break;case"claim":window.alert("This feature will be available in an upcoming release."),null===(t=this.envelopeUpdated)||void 0===t||t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"claimed"});break;case"decline":{const e=await(r=this.endpoint,a=this.envelopeId,l=this.roleId,y(r,a,l,{action:"decline"}));console.log("Decline result",e),null===(s=this.envelopeUpdated)||void 0===s||s.emit({endpoint:this.endpoint,envelope:this.envelope,event:"declined"}),this.isDone=!0}break;case"print":window.print(),null===(n=this.envelopeUpdated)||void 0===n||n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download":g(this.endpoint,this.envelope,this.envelope.envelope_document_id).catch((e=>{console.log("Error downloading PDF",e)})),null===(o=this.envelopeUpdated)||void 0===o||o.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})}}updateRecipientFieldValue(e,i){this.recipient.fields.forEach((t=>{t.name===e&&(t.settings=i.settings,f(t),this.checkRecipientFields())}))}saveFieldChange(e,i){a(this.endpoint,this.envelopeId,e,i).then((i=>{this.updateRecipientFieldValue(e,i)})).catch((e=>{var i,t,s,n,o,r;401===(null===(i=e.response)||void 0===i?void 0:i.status)&&"jwt expired"===(null===(s=null===(t=e.response)||void 0===t?void 0:t.data)||void 0===s?void 0:s.error)?(console.log("[SIGN] Signing session expired"),this.errorMessage="Signing session expired. Please reload your browser to continue."):console.log("[SIGN] Server error",e),null===(n=this.sdkError)||void 0===n||n.emit(new w(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(r=e.response)||void 0===r?void 0:r.data))}))}async handleFieldChange(e,i){const{value:t,checked:s}=i.target;switch(e.type){case"textbox":return this.saveFieldChange(e.name,{prepared:!1,value:t});case"checkbox_group":{const t=e.settings.options.map((e=>({id:e.id,checked:i.target.checked})));return this.saveFieldChange(e.name,{prepared:!1,value:{options:t}})}case"radio_button_group":{const t=e.settings.options.map((e=>({id:e.id,selected:i.target.value===e.id})));return this.saveFieldChange(e.name,{prepared:!1,value:{options:t}})}case"dropdown":return this.saveFieldChange(e.name,{prepared:!1,value:i.detail});case"initial":const a=await(await fetch(i.detail)).blob();return(n=this.endpoint,"initial",o=a,r=new FormData,r.append("initial",o,"initial"),n.api.post("/initials",r).then((function(e){return e.data}))).then((async i=>{const t=await d(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t)}));case"signature":const c=await(await fetch(i.detail)).blob();return function(e,i,t){var s=new FormData;return s.append("signature",t,"signature"),e.api.post("/signatures",s).then((function(e){return e.data}))}(this.endpoint,0,c).then((async i=>{const t=await l(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t)}));case"date":const h=i.target.getAttribute("iso");return this.saveFieldChange(e.name,{prepared:!1,value:h});case"timestamp":console.log("Updating timestamp",{value:t,ts:i.target.getAttribute("timestamp")});break;default:console.log("Unhandled field update",{value:t,checked:s},e)}var n,o,r}isFieldValid(e){var i,t,s,n,o,r,a;const{required:l=!1}=e,{result:d="",value:c="",base64:h=""}=e.settings||{};switch(e.type){case"textbox":switch((null===(i=e.settings)||void 0===i?void 0:i.validator)||""){case"email":return p(d);case"phone":return u(d);default:return!l||""!==d}case"signature":case"initial":return!l||""!==h;case"timestamp":return!0;case"textarea":case"date":case"attachment":return!l||""!==d;case"dropdown":return!l||""!==c;case"checkbox_group":const v=((null===(s=null===(t=e.settings)||void 0===t?void 0:t.options)||void 0===s?void 0:s.filter((e=>e.checked)))||[]).length;return!l||v>=((null===(n=e.settings)||void 0===n?void 0:n.minimum_checked)||0)&&v<=((null===(o=e.settings)||void 0===o?void 0:o.maximum_checked)||999);case"radio_button_group":return!l||((null===(a=null===(r=e.settings)||void 0===r?void 0:r.options)||void 0===a?void 0:a.filter((e=>e.selected)))||[]).length>0;default:return!1}}async handleNext(){var e,i,t,s;if(console.log("Next"),this.nextSubmits){console.log("Next submits");try{const e=await(i=this.endpoint,t=this.envelopeId,s=this.roleId,y(i,t,s,{action:"submit"}));console.log("[SIGN] Submitted successfully",e),this.recipient.status="submitted",this.showDone=!0,this.isDone=!0}catch(e){console.log("Error submitting",e)}return}const n=this.recipient.fields.filter((e=>e.required));let o=n.findIndex((e=>e.name===this.focusedField))+1;o>=n.length&&(o=0);let r=n[o],a=0;if(a<n.length&&["signature","initial"].includes(r.type)&&"signed"===(null===(e=r.settings)||void 0===e?void 0:e.result)&&(a++,o++,o>=n.length&&(o=0),r=n[o]),a>=n.length&&(r=null),r){const e=b(r),i=document.getElementById(e);null==i||i.focusField(),this.focusedField=r.name}}checkRecipientFields(){const e=this.recipient.fields.filter((e=>!this.isFieldValid(e)));e.length<1?(this.nextButtonLabel="Finish",this.nextSubmits=!0):(console.log("[SIGN] Remaining invalid fields",e),this.nextButtonLabel="Next",this.nextSubmits=!1)}attachFieldAttributes(e,i,t,s){var n;s.addEventListener("input",(()=>this.checkRecipientFields())),s.addEventListener("focusout",(e=>this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields())))),s.addEventListener("fieldChange",(e=>this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields())))),s.setAttribute("roleindex",t),s.setAttribute("xScale",e.xScale),s.setAttribute("yScale",e.yScale),s.setAttribute("initials",this.recipient?v(this.recipient.full_name):""),s.setAttribute("name",(null===(n=this.recipient)||void 0===n?void 0:n.full_name)||"")}handlePageRendered(e){const i=e.detail,t=m(this.roleNames,this.recipient.role_name),s=this.recipient.fields.filter((e=>e.page===i.pageNumber));console.log("[SIGN] Page rendered, updating fields",{pageInfo:i,roleIndex:t,recipientFields:s}),s.forEach((e=>{const s=x(e,i,t,{disabled:!1,editable:!1,draggable:!1,done:this.isDone});s&&(Array.isArray(s)?s.map((s=>this.attachFieldAttributes(i,e,t,s))):this.attachFieldAttributes(i,e,t,s))})),this.envelope.recipients.filter((e=>e.role_name!==this.recipient.role_name&&(e.status===c.SUBMITTED||e.status===c.CANCELED||e.status===c.DECLINED))).forEach((e=>{e.fields.forEach((e=>{const s=x(e,i,t,{disabled:!0,editable:!1,draggable:!1,done:this.isDone});s&&(Array.isArray(s)?s.map((s=>this.attachFieldAttributes(i,e,t,s))):this.attachFieldAttributes(i,e,t,s))}))})),this.envelope.recipients.filter((e=>e.role_name!==this.recipient.role_name)).forEach((e=>{const t=m(this.roleNames,e.role_name);e.fields.filter((e=>e.page===i.pageNumber)).forEach((e=>{const s=x(e,i,t,{disabled:!0,editable:!1,draggable:!1,done:this.isDone});s&&s.setAttribute&&(s.setAttribute("roleindex",t),s.setAttribute("xScale",i.xScale),s.setAttribute("yScale",i.yScale))}))})),this.checkRecipientFields()}render(){return this.envelope?this.isDone?t(s,{class:{agreed:this.agreed}},t("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:e=>{var i;return null===(i=this.sdkError)||void 0===i?void 0:i.emit(e.detail)}}),this.errorMessage&&t("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:()=>this.errorMessage=""}),this.showDone&&t("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`,onNext:()=>{this.showDone=!1,this.isDone=!0}})):t(s,{class:{agreed:this.agreed}},!this.finishLater&&t("div",{class:"intro"},t("div",{class:"inner"},"Please review and act on these documents.")),t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},this.agreed?t(n,null,t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name),t("div",{style:{flex:"1"}})):t("div",{class:"agree"},t("verdocs-checkbox",{name:"agree",label:"I agree to use electronic records and signatures.",onInput:()=>this.handleClickAgree()})),!this.finishLater&&t("verdocs-button",{size:"small",label:this.nextButtonLabel,disabled:!this.agreed,onClick:()=>this.handleNext()}),t("div",{style:{marginLeft:"10px"}}),t("verdocs-dropdown",{options:this.isDone||this.finishLater?S:k,onOptionSelected:e=>this.handleOptionSelected(e)}))),t("div",this.agreed?{style:{display:"none"}}:{class:"cover"}),t("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(this.envelope.documents||[]).map((e=>{const i=[...(null==e?void 0:e.pages)||[]];return i.sort(((e,i)=>e.sequence-i.sequence)),t(n,null,i.map((i=>t("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,virtualWidth:612,virtualHeight:792,pageNumber:i.sequence,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))))}))),this.showFinishLater&&t("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:`To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`,onNext:()=>this.showFinishLater=!1}),this.errorMessage&&t("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:()=>this.errorMessage=""}),this.showDone&&t("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`,onNext:()=>{this.showDone=!1,this.isDone=!0}})):t(s,null,t("verdocs-loader",null))}};N.style='verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign .intro{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;color:#111111;font-size:18px;font-weight:500;line-height:28px;-ms-flex-direction:row;flex-direction:row;background:#ffffff}verdocs-sign .intro .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;z-index:999;position:absolute;background:rgba(0, 0, 0, 0.5)}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .agree{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0 15px}verdocs-sign .agree .intro{display:none}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;font-size:12px;-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;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;white-space:nowrap;text-overflow:ellipsis}';export{N as verdocs_sign}
|
@@ -1 +1 @@
|
|
1
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++){e=arguments[i];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]}return t};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,o){function a(t){try{d(n.next(t))}catch(t){o(t)}}function s(t){try{d(n["throw"](t))}catch(t){o(t)}}function d(t){t.done?i(t.value):r(t.value).then(a,s)}d((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return d([t,e])}}function d(a){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(a[0]===6&&i.label<o[1]){i.label=o[1];o=a;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(a);break}if(o[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t];r=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,e,i){if(i||arguments.length===2)for(var n=0,r=e.length,o;n<r;n++){if(o||!(n in e)){if(!o)o=Array.prototype.slice.call(e,0,n);o[n]=e[n]}}return t.concat(o||Array.prototype.slice.call(e))};System.register(["./p-871407e9.system.js","./p-e12b7fbc.system.js","./p-
|
1
|
+
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++){e=arguments[i];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]}return t};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,o){function a(t){try{d(n.next(t))}catch(t){o(t)}}function s(t){try{d(n["throw"](t))}catch(t){o(t)}}function d(t){t.done?i(t.value):r(t.value).then(a,s)}d((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return d([t,e])}}function d(a){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(a[0]===6&&i.label<o[1]){i.label=o[1];o=a;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(a);break}if(o[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t];r=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,e,i){if(i||arguments.length===2)for(var n=0,r=e.length,o;n<r;n++){if(o||!(n in e)){if(!o)o=Array.prototype.slice.call(e,0,n);o[n]=e[n]}}return t.concat(o||Array.prototype.slice.call(e))};System.register(["./p-871407e9.system.js","./p-e12b7fbc.system.js","./p-492f465d.system.js","./p-54498887.system.js","./p-c44fd897.system.js","./p-4aa6b512.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js"],(function(t){"use strict";var e,i,n,r,o,a,s,d,c;return{setters:[function(t){e=t.r;i=t.c;n=t.h;r=t.H;o=t.a},function(t){a=t.c},function(t){s=t.f},function(){},function(t){d=t.V},function(t){c=t.t},function(){},function(){}],execute:function(){var l='verdocs-dropdown{font-family:"Barlow", sans-serif;display:block}verdocs-dropdown .arrow{width:32px;height:26px;background:#fff;cursor:pointer;border-radius:4px;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;border:1px solid #cccccc;-ms-flex-pack:center;justify-content:center}verdocs-dropdown .arrow svg{fill:#55bc81;-webkit-transition:0.3s;transition:0.3s}verdocs-dropdown .items{width:200px;display:none;z-index:10000;border-radius:5px;background:#33354c;border:1px solid #654dcb}verdocs-dropdown .items[data-show]{display:block}verdocs-dropdown .option{width:100%;color:#fff;border:none;display:block;text-align:left;background:none;padding:10px 20px}verdocs-dropdown .option:hover{cursor:pointer;background:#55bc81}verdocs-dropdown .option[disabled]{color:#aaaaaa}verdocs-dropdown .option[disabled]:hover{color:#aaaaaa;cursor:inherit;background:transparent}verdocs-dropdown .separator{border-top:1px solid #ffffff5f;height:1px;padding-top:5px;margin-top:5px}verdocs-dropdown.open .items{display:block}verdocs-dropdown.open .arrow{background:#4c56cb;border:1px solid #707ae5}verdocs-dropdown.open .arrow svg{-webkit-transform:scaleY(-1);transform:scaleY(-1);fill:#fff}';var p='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#50BE80"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M7 10l5 5 5-5H7z"/></svg>';var u=t("verdocs_dropdown",function(){function t(t){e(this,t);this.optionSelected=i(this,"optionSelected",7);this.clickListenerSymbol=new AbortController;this.options=[];this.open=undefined}t.prototype.componentDidLoad=function(){this.popper=a(this.dropdownButton,this.dropdownMenu,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,6]}}]});window.addEventListener("click",this.clickListener.bind(this),{signal:this.clickListenerSymbol.signal})};t.prototype.disconnectedCallback=function(){this.clickListenerSymbol.abort()};t.prototype.clickListener=function(t){var e=!(t.target==this.el||this.el.contains(t.target));if(e){this.hide()}};t.prototype.handleSelectOption=function(t,e){t.stopPropagation();this.optionSelected.emit(e);this.hide()};t.prototype.showDropdown=function(){var t,e;this.open=true;this.dropdownMenu.setAttribute("data-show","");this.dropdownMenu.removeAttribute("aria-hidden");(t=this.popper)===null||t===void 0?void 0:t.setOptions((function(t){return __assign(__assign({},t),{modifiers:__spreadArray(__spreadArray([],t.modifiers,true),[{name:"eventListeners",enabled:true}],false)})})).catch((function(){}));(e=this.popper)===null||e===void 0?void 0:e.update().catch((function(){}))};t.prototype.handleHideDropdown=function(t){var e,i;if(((e=t===null||t===void 0?void 0:t.target)===null||e===void 0?void 0:e.localName)==="button"&&((i=t===null||t===void 0?void 0:t.target)===null||i===void 0?void 0:i.className)==="arrow"){return}this.hide()};t.prototype.toggleDropdown=function(t){t.stopPropagation();if(this.open){this.hide()}else{this.showDropdown()}};t.prototype.hide=function(){var t;this.open=false;this.dropdownMenu.removeAttribute("data-show");this.dropdownMenu.setAttribute("aria-hidden","true");(t=this.popper)===null||t===void 0?void 0:t.setOptions((function(t){return __assign(__assign({},t),{modifiers:__spreadArray(__spreadArray([],t.modifiers,true),[{name:"eventListeners",enabled:false}],false)})})).catch((function(){}))};t.prototype.render=function(){var t=this;var e;return n(r,{class:{open:!!this.open}},n("button",{class:"arrow",innerHTML:p,"aria-label":"Open Menu",onClick:function(e){return t.toggleDropdown(e)},onBlur:function(e){return t.handleHideDropdown(e)},ref:function(e){return t.dropdownButton=e}}),n("div",{class:"items","aria-hidden":!this.open,ref:function(e){return t.dropdownMenu=e}},(e=this.options)===null||e===void 0?void 0:e.map((function(e){return e.label?n("button",{onClick:function(i){return t.handleSelectOption(i,e)},class:"option",disabled:e.disabled},e.label):n("div",{class:"separator"})}))))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return t}());u.style=l;var h="verdocs-envelope-document-page{width:100%;position:relative}verdocs-envelope-document-page .verdocs-envelope-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-envelope-document-page .verdocs-envelope-document-page-layer.img{width:100%}";var f=t("verdocs_envelope_document_page",function(){function t(t){e(this,t);this.pageRendered=i(this,"pageRendered",7);this.endpoint=d.getDefault();this.envelopeId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId="verdocs-envelope-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png"}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this;return[4,s(this.endpoint,this.envelopeId,this.documentId,this.pageNumber)];case 1:t.pageDisplayUri=e.sent();return[2]}}))}))};t.prototype.componentDidLoad=function(){var t=this;this.resizeObserver=new ResizeObserver(c((function(e){for(var i=0,n=e;i<n.length;i++){var r=n[i];var o=r.contentRect.width;t.renderedWidth=o;t.renderedHeight=t.virtualHeight*(o/t.virtualWidth)}t.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};t.prototype.disconnectedCallback=function(){var t;(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect()};t.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})};t.prototype.render=function(){var t=this;var e="".concat(this.renderedHeight,"px");return n(r,{id:"".concat(this.containerId),style:{height:e,flex:"0 0 ".concat(e)}},this.layers.map((function(i){return i.type==="div"?n("div",{class:"verdocs-envelope-document-page-layer",id:"".concat(t.containerId,"-").concat(i.name),style:{height:e}}):t.pageDisplayUri?n("img",{class:"verdocs-envelope-document-page-layer img",id:"".concat(t.containerId,"-").concat(i.name),src:t.pageDisplayUri,alt:"Page ".concat(t.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(e){t.naturalWidth=e.target.naturalWidth;t.naturalHeight=e.target.naturalHeight;t.aspectRatio=t.naturalWidth/t.naturalHeight;t.virtualHeight=t.virtualWidth/t.aspectRatio;t.renderedHeight=e.target.offsetWidth/t.aspectRatio}}):n("div",null)})))};Object.defineProperty(t.prototype,"container",{get:function(){return o(this)},enumerable:false,configurable:true});return t}());f.style=h}}}));
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./p-871407e9.system.js","./p-
|
1
|
+
System.register(["./p-871407e9.system.js","./p-54498887.system.js","./p-c44fd897.system.js"],(function(e){"use strict";var s,r,t;return{setters:[function(e){s=e.r;r=e.h},function(){},function(e){t=e.V}],execute:function(){var i='verdocs-search{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;background-color:#1e2031}verdocs-search search-box{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:20px 10px}verdocs-search .boxes{-ms-flex-wrap:wrap;flex-wrap:wrap;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:20px 0}verdocs-search search-recent,verdocs-search search-saved,verdocs-search search-quick-functions,verdocs-search search-starred{display:-ms-flexbox;display:flex;margin:0 20px 20px 0}';var n=e("verdocs_search",function(){function e(e){s(this,e);this.endpoint=t.getDefault()}e.prototype.render=function(){return r("div",{class:"container"},r("verdocs-search-box",{endpoint:this.endpoint}),r("div",{class:"boxes"},r("verdocs-search-activity",{type:"recent",endpoint:this.endpoint}),r("verdocs-search-activity",{type:"saved",endpoint:this.endpoint}),r("verdocs-search-activity",{type:"starred",endpoint:this.endpoint}),r("verdocs-quick-functions",{endpoint:this.endpoint})))};return e}());n.style=i}}}));
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,c as s,h as i}from"./p-e035df4b.js";import{V as e}from"./p-
|
1
|
+
import{r as t,c as s,h as i}from"./p-e035df4b.js";import{V as e}from"./p-c2c49441.js";import"./p-05788c2b.js";import{S as o}from"./p-7a1b2643.js";const n=class{constructor(i){t(this,i),this.authenticated=s(this,"authenticated",7),this.sdkError=s(this,"sdkError",7),this.endpoint=e.getDefault(),this.visible=!0,this.logo="https://verdocs.com/assets/blue-logo.svg",this.isAuthenticated=!1,this.displayMode="login",this.username="",this.password="",this.loggingIn=!1,this.activeSession=null,this.loginError=null}componentWillLoad(){var t,s;this.endpoint.loadSession(),this.endpoint.session?(console.log("[AUTH] Authenticated"),this.isAuthenticated=!0,this.activeSession=this.endpoint.session,null===(t=this.authenticated)||void 0===t||t.emit({authenticated:!0,session:this.endpoint.session})):(console.log("[AUTH] Anonymous"),null===(s=this.authenticated)||void 0===s||s.emit({authenticated:!1,session:null}))}handleLogin(){var t,s;this.loggingIn=!0,(t=this.endpoint,s={username:this.username,password:this.password},t.api.post("/authentication/login",s).then((function(t){return t.data}))).then((t=>{var s;this.loggingIn=!1,this.endpoint.setToken(t.accessToken),this.activeSession=this.endpoint.session,this.isAuthenticated=!0,null===(s=this.authenticated)||void 0===s||s.emit({authenticated:!0,session:this.endpoint.session})})).catch((t=>{var s,i,e,n,l;console.log("[AUTH] Authentication error",t.response,JSON.stringify(t)),this.loggingIn=!1,this.activeSession=null,null===(s=this.authenticated)||void 0===s||s.emit({authenticated:!1,session:null}),null===(i=this.sdkError)||void 0===i||i.emit(new o(t.message,null===(e=t.response)||void 0===e?void 0:e.status,null===(n=t.response)||void 0===n?void 0:n.data)),403===(null===(l=null==t?void 0:t.response)||void 0===l?void 0:l.status)&&(this.loginError="Please check your username and password and try again.")}))}handleLogout(){var t;this.endpoint.clearSession(),this.isAuthenticated=!1,null===(t=this.authenticated)||void 0===t||t.emit({authenticated:!1,session:null})}handleClearError(){this.loginError=null}render(){return this.visible?this.isAuthenticated?i("div",{class:"status-result"},"Authenticated"):"signup"===this.displayMode?i("div",{class:"signup-form"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),i("h3",null,"Sign up for an account"),i("h4",null,"Already have an account?",i("verdocs-button",{label:"Log In",variant:"text",onClick:()=>this.displayMode="login",disabled:this.loggingIn})),i("form",{onSubmit:()=>this.handleLogin()},i("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onInput:t=>this.username=t.target.value,disabled:this.loggingIn}),i("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:t=>this.password=t.target.value,disabled:this.loggingIn}),i("verdocs-button",{label:"Signup",disabled:this.loggingIn,onClick:()=>this.handleLogin(),style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}}))):i("div",{class:"login-form"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),i("h3",null,"Log in to your account"),i("h4",null,"Don't have an account?",i("verdocs-button",{label:"Sign Up",variant:"text",onClick:()=>this.displayMode="signup",disabled:this.loggingIn})),i("form",{onSubmit:()=>this.handleLogin()},i("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onInput:t=>this.username=t.target.value,disabled:this.loggingIn}),i("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:t=>this.password=t.target.value,disabled:this.loggingIn}),i("verdocs-button",{label:"Forgot Your Password?",variant:"text",onClick:()=>this.displayMode="signup",disabled:this.loggingIn,style:{display:"flex",justifyContent:"center",margin:"10px auto 20px"}}),i("verdocs-button",{label:"Login",disabled:this.loggingIn,onClick:()=>this.handleLogin(),style:{display:"flex",justifyContent:"center",margin:"10px auto 0"}})),this.loginError?i("verdocs-ok-dialog",{heading:"Login Error",message:this.loginError,onNext:()=>this.handleClearError()}):i("div",null)):i("div",{style:{display:"none"}},"Verdocs Auth Placeholder")}};n.style='verdocs-auth{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-auth .login-form,verdocs-auth .signup-form{background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;display:-ms-flexbox;display:flex;padding:20px;width:300px;max-width:100%}verdocs-auth .logo{margin:20px 0 30px;width:128px;max-width:100%}verdocs-auth h3{text-align:center;font-weight:400;font-size:16px;line-height:1.75;margin:0}verdocs-auth h4{text-align:center;font-weight:400;font-size:14px;line-height:1.43;margin:0}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}';export{n as verdocs_auth}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e,c as t,h as o,H as i}from"./p-e035df4b.js";import"./p-
|
1
|
+
import{r as e,c as t,h as o,H as i}from"./p-e035df4b.js";import"./p-05788c2b.js";import{g as s}from"./p-b86b362a.js";import{V as r}from"./p-c2c49441.js";import{S as l}from"./p-7a1b2643.js";import{s as a}from"./p-c903c4a7.js";import"./p-7291906c.js";const p=class{constructor(o){e(this,o),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.sdkError=t(this,"sdkError",7),this.endpoint=r.getDefault(),this.templateId="",this.template=null,this.name="",this.visibility="",this.sendReminders=!1,this.firstReminderDays="1",this.reminderDays="1"}async componentWillLoad(){var e,t,o;try{this.endpoint.loadSession(),console.log(`[PROPERTIES] Loading template ${this.templateId}`);const e=await s(this.endpoint,this.templateId);if(!e)return void console.log("[PREVIEW] Unable to load template");console.log("[PROPERTIES] Got template",e),this.template=e,a.template=e,this.name=e.name,this.sendReminders=null!==e.reminder_id}catch(i){console.log("[PROPERTIES] Error loading template",i),null===(e=this.sdkError)||void 0===e||e.emit(new l(i.message,null===(t=i.response)||void 0===t?void 0:t.status,null===(o=i.response)||void 0===o?void 0:o.data))}}handleCancel(e){var t;e.stopPropagation(),null===(t=this.exit)||void 0===t||t.emit()}handleSubmit(e){var t;e.stopPropagation(),null===(t=this.next)||void 0===t||t.emit({name:this.name,firstReminderDays:+this.firstReminderDays,reminderDays:+this.reminderDays,sendReminders:this.sendReminders})}render(){return this.endpoint.session?o("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},o("h5",null,"Template Name"),o("fieldset",null,o("verdocs-text-input",{value:this.name,autocomplete:"off",onInput:e=>this.name=e.target.value})),o("h5",null,"Reminders"),o("fieldset",null,o("div",{class:"input-row"},o("label",null,"Send Automatic Reminders"),o("verdocs-checkbox",{name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:e=>this.sendReminders=e.target.checked})),o("div",{class:"input-row"},o("label",null,"Days Before First Reminder"),o("verdocs-text-input",{value:this.firstReminderDays,onInput:e=>this.firstReminderDays=e.target.value})),o("div",{class:"input-row"},o("label",null,"Days Between Reminders"),o("verdocs-text-input",{value:this.reminderDays,onInput:e=>this.reminderDays=e.target.value}))),o("h5",null,"Template Visibility"),o("fieldset",null,o("div",{class:"radio-row"},o("verdocs-radio-button",{name:"visibility",checked:!0,value:"private",onChange:()=>this.visibility="private"}),o("label",{htmlFor:"verdocs-radio-button-visibility-private"},o("div",{class:"title"},"Private"),o("div",{class:"description"},"Only you can share and use this template"))),o("div",{class:"radio-row"},o("verdocs-radio-button",{name:"visibility",checked:!0,value:"shared",onChange:()=>this.visibility="shared"}),o("label",{htmlFor:"verdocs-radio-button-visibility-shared"},o("div",{class:"title"},"Shared to your organization"),o("div",{class:"description"},"Give access to your organization to share and use this template"))),o("div",{class:"radio-row"},o("verdocs-radio-button",{name:"visibility",checked:!0,value:"shared_public",onChange:()=>this.visibility="shared_public"}),o("label",{htmlFor:"verdocs-radio-button-visibility-shared_public"},o("div",{class:"title"},"Shared to your organization and Public"),o("div",{class:"description"},"Give access to your organization to share this template, and anyone on the Web can find and use this template"))),o("div",{class:"radio-row"},o("verdocs-radio-button",{name:"visibility",checked:"public"===this.visibility,value:"public",onChange:()=>this.visibility="public"}),o("label",{htmlFor:"verdocs-radio-button-visibility-public"},o("div",{class:"title"},"Public"),o("div",{class:"description"},"Anyone on the Web can find and use this template")))),o("div",{class:"buttons"},o("div",{class:"flex-fill"}),o("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e)}),o("verdocs-button",{label:"OK",size:"small",onClick:e=>this.handleSubmit(e)}))):o(i,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};p.style='verdocs-template-properties{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-properties form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form h5{font-size:14px;font-weight:400;margin:0 0 6px 0}verdocs-template-properties form .row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form fieldset{width:440px;border:none;max-width:100%;margin:0 0 20px 0;-webkit-box-sizing:border-box;box-sizing:border-box;padding:20px 20px 10px 20px;background-color:#ffffff;-webkit-box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14);box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)}verdocs-template-properties form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-properties form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-properties form input:focus{outline:none}verdocs-template-properties form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-properties form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-properties form .input-row verdocs-text-input input{text-align:center}verdocs-template-properties form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-properties form .radio-row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 10px 0;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties form .radio-row verdocs-radio-button{display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px}verdocs-template-properties form .radio-row label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form .radio-row label .title{font-size:16px;font-weight:500}verdocs-template-properties form .radio-row label .description{font-size:14px;font-weight:400}verdocs-template-properties .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-properties .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-properties ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-moz-placeholder{color:#aaaaaa}verdocs-template-properties :-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::placeholder{color:#aaaaaa}';export{p as verdocs_template_properties}
|
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i["throw"](e))}catch(e){o(e)}}function l(e){e.done?n(e.value):r(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];r=0}finally{i=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-871407e9.system.js","./p-05eb4fed.system.js","./p-
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i["throw"](e))}catch(e){o(e)}}function l(e){e.done?n(e.value):r(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];r=0}finally{i=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-871407e9.system.js","./p-05eb4fed.system.js","./p-4aa6b512.system.js","./p-71b8bb54.system.js","./p-492f465d.system.js","./p-54498887.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js","./p-d50523fd.system.js"],(function(e){"use strict";var t,n,i,r,o,s,a;return{setters:[function(e){t=e.r;n=e.c;i=e.h;r=e.H},function(e){o=e.g},function(e){s=e.g},function(e){a=e.s},function(){},function(){},function(){},function(){},function(){}],execute:function(){var l='verdocs-field-textarea{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:150px;height:15px;display:block;font-size:11px;position:relative;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-textarea.disabled{opacity:0.5}verdocs-field-textarea textarea{-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-textarea textarea.hide{display:none}verdocs-field-textarea.required{border:1px solid #cc0000}verdocs-field-textarea.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}';var d='<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>';var u=e("verdocs_field_textarea",function(){function e(e){t(this,e);this.settingsChanged=n(this,"settingsChanged",7);this.deleted=n(this,"deleted",7);this.field=null;this.disabled=false;this.editable=false;this.moveable=false;this.done=false;this.roleindex=0;this.rerender=0}e.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.el.focus();return[2]}))}))};e.prototype.showSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.showPanel){e.showPanel()}return[2]}))}))};e.prototype.hideSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.hidePanel){e.hidePanel()}a.updateCount++;return[2]}))}))};e.prototype.render=function(){var e=this;var t,n;var l=s(this.field);var u=(n=(t=this.disabled)!==null&&t!==void 0?t:l.disabled)!==null&&n!==void 0?n:false;var c=this.field["rgba"]||o(this.roleindex);if(this.done){return i(r,{class:{done:this.done}},l.value)}return i(r,{class:{required:l.required,disabled:u},style:{backgroundColor:c}},i("textarea",{placeholder:l.placeholder||"",tabIndex:l.order,value:l.value,disabled:u,required:l.required,ref:function(t){return e.el=t}}),this.editable&&i("verdocs-button-panel",{icon:d,id:"verdocs-settings-panel-".concat(this.field.name)},i("verdocs-template-field-properties",{templateId:a.templateId,fieldName:this.field.name,onClose:function(){return e.hideSettingsPanel()},onDelete:function(){var t;(t=e.deleted)===null||t===void 0?void 0:t.emit({fieldName:e.field.name});return e.hideSettingsPanel()},onSettingsChanged:function(t){var n;(n=e.settingsChanged)===null||n===void 0?void 0:n.emit(t.detail);return e.hideSettingsPanel()}})))};return e}());u.style=l}}}));
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,c as e,h as s,H as i}from"./p-e035df4b.js";import{g as o}from"./p-6de76553.js";import{g as r}from"./p-
|
1
|
+
import{r as t,c as e,h as s,H as i}from"./p-e035df4b.js";import{g as o}from"./p-6de76553.js";import{g as r}from"./p-f3e81f0b.js";import{s as a}from"./p-c903c4a7.js";import"./p-15205501.js";import"./p-05788c2b.js";import"./p-aa124212.js";import"./p-ab01f71e.js";import"./p-7291906c.js";const l=class{constructor(s){t(this,s),this.settingsChanged=e(this,"settingsChanged",7),this.deleted=e(this,"deleted",7),this.field=null,this.disabled=!1,this.editable=!1,this.moveable=!1,this.done=!1,this.roleindex=0,this.rerender=0}async focusField(){this.el.focus()}async showSettingsPanel(){const t=document.getElementById(`verdocs-settings-panel-${this.field.name}`);t&&t.showPanel&&t.showPanel()}async hideSettingsPanel(){const t=document.getElementById(`verdocs-settings-panel-${this.field.name}`);t&&t.hidePanel&&t.hidePanel(),a.updateCount++}render(){var t,e;const l=r(this.field),d=null!==(e=null!==(t=this.disabled)&&void 0!==t?t:l.disabled)&&void 0!==e&&e,n=this.field.rgba||o(this.roleindex);return this.done?s(i,{class:{done:this.done}},l.value):s(i,{class:{required:l.required,disabled:d},style:{backgroundColor:n}},s("textarea",{placeholder:l.placeholder||"",tabIndex:l.order,value:l.value,disabled:d,required:l.required,ref:t=>this.el=t}),this.editable&&s("verdocs-button-panel",{icon:'<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>',id:`verdocs-settings-panel-${this.field.name}`},s("verdocs-template-field-properties",{templateId:a.templateId,fieldName:this.field.name,onClose:()=>this.hideSettingsPanel(),onDelete:()=>{var t;return null===(t=this.deleted)||void 0===t||t.emit({fieldName:this.field.name}),this.hideSettingsPanel()},onSettingsChanged:t=>{var e;return null===(e=this.settingsChanged)||void 0===e||e.emit(t.detail),this.hideSettingsPanel()}})))}};l.style='verdocs-field-textarea{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:150px;height:15px;display:block;font-size:11px;position:relative;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-textarea.disabled{opacity:0.5}verdocs-field-textarea textarea{-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-textarea textarea.hide{display:none}verdocs-field-textarea.required{border:1px solid #cc0000}verdocs-field-textarea.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}';export{l as verdocs_field_textarea}
|