@verdocs/web-sdk 2.2.14 → 2.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/verdocs-build.cjs.entry.js +2 -0
- package/dist/collection/components/embeds/verdocs-build/verdocs-build.js +3 -1
- package/dist/components/verdocs-build.js +2 -0
- package/dist/docs.json +2 -2
- package/dist/esm/verdocs-build.entry.js +2 -0
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/types/components/embeds/verdocs-build/verdocs-build.d.ts +1 -2
- package/dist/types/components.d.ts +1 -1
- package/dist/verdocs-web-sdk/p-126f7528.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-123e5ce9.system.entry.js → p-6d6bbf3b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/custom-elements.json +0 -2021
- package/dist/verdocs-web-sdk/p-c7eeaf5c.entry.js +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
import{r as e,c as t,h as s,H as i}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as l}from"./p-af048fad.js";import{g as o}from"./p-d4d8858f.js";import{S as n}from"./p-7a1b2643.js";import"./p-7648c449.js";import"./p-976ec9e8.js";const d=class{constructor(s){e(this,s),this.sdkError=t(this,"sdkError",7),this.stepChanged=t(this,"stepChanged",7),this.send=t(this,"send",7),this.store=null,this.endpoint=l.getDefault(),this.templateId=null,this.step=null,this.template=null}async componentWillLoad(){var e,t,s;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[BUILD] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[BUILD] Unable to start builder session, must be authenticated");this.step="roles",this.store=await o(this.endpoint,this.templateId,!0)}catch(i){console.log("[BUILD] Error loading template",i),null===(e=this.sdkError)||void 0===e||e.emit(new n(i.message,null===(t=i.response)||void 0===t?void 0:t.status,null===(s=i.response)||void 0===s?void 0:s.data))}}handleCancel(e){var t;console.log("Cancel",e.detail),this.step="preview",null===(t=this.stepChanged)||void 0===t||t.emit("")}handleAttachmentsNext(){var e;this.step="roles",null===(e=this.stepChanged)||void 0===e||e.emit("roles")}handleRolesNext(){var e;this.step="fields",null===(e=this.stepChanged)||void 0===e||e.emit("fields")}setStep(e,t){e.stopPropagation(),e.preventDefault(),this.step=t}render(){return this.endpoint.session?s(i,null,s("div",{class:"steps"},s("button",{class:"step "+("attachments"===this.step?"active":""),onClick:e=>this.setStep(e,"attachments")},"Attachments"),s("button",{class:"step "+("roles"===this.step?"active":""),onClick:e=>this.setStep(e,"roles")},"Roles"),s("button",{class:"step "+("settings"===this.step?"active":""),onClick:e=>this.setStep(e,"settings")},"Settings"),s("button",{class:"step "+("fields"===this.step?"active":""),onClick:e=>this.setStep(e,"fields")},"Fields"),s("button",{class:"step "+("preview"===this.step?"active":""),onClick:e=>this.setStep(e,"preview")},"Preview/Send")),s("div",{class:"content"},"attachments"===this.step&&s("verdocs-template-attachments",{templateId:this.templateId,endpoint:this.endpoint,onExit:e=>this.handleCancel(e),onNext:()=>this.handleAttachmentsNext()}),"roles"===this.step&&s("verdocs-template-roles",{templateId:this.templateId,endpoint:this.endpoint,onExit:e=>this.handleCancel(e),onNext:()=>this.handleRolesNext()}),"settings"===this.step&&s("div",{style:{flexDirection:"column",gap:"20px",display:"flex",maxWidth:"400px",margin:"20px"}},s("verdocs-template-name",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"}}),s("verdocs-template-reminders",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"}}),s("verdocs-template-visibility",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"}})),"fields"===this.step&&s("verdocs-template-fields",{templateId:this.templateId,endpoint:this.endpoint}),"preview"===this.step&&s("div",{style:{flexDirection:"row",display:"flex",width:"100%",backgroundColor:"#eeeeee"}},s("div",{style:{display:"flex",flex:"0"}},s("verdocs-send",{templateId:this.templateId,endpoint:this.endpoint,onSend:e=>{var t;return null===(t=this.send)||void 0===t?void 0:t.emit(e.detail)}})),s("div",{style:{display:"flex",flex:"1",justifyContent:"center"}},s("verdocs-preview",{templateId:this.templateId,endpoint:this.endpoint,style:{display:"flex",flex:"1",maxWidth:"1000px"}}))))):s(i,null,s("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};d.style='verdocs-build{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-build .steps{-ms-flex:0;flex:0;display:-ms-flexbox;display:flex;padding:0 20px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;background-color:#46497d}verdocs-build .steps .step{border:none;height:40px;opacity:0.6;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;padding:0 20px;font-size:13px;font-weight:500;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;background-color:#46497d}verdocs-build .steps .step.active{opacity:1;background-color:#707ae5}verdocs-build .content{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column}verdocs-build verdocs-template-attachments,verdocs-build verdocs-template-roles{margin:20px}verdocs-build verdocs-template-fields{border-top:1px solid #777777}verdocs-build verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-build verdocs-template-fields{width:100%}verdocs-build verdocs-preview{-ms-flex:1;flex:1}';export{d as verdocs_build}
|