@verdocs/web-sdk 2.2.16 → 2.2.19
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 +19 -4
- package/dist/collection/components/embeds/verdocs-build/verdocs-build.css +1 -1
- package/dist/collection/components/embeds/verdocs-build/verdocs-build.js +4 -4
- package/dist/components/verdocs-build.js +19 -4
- package/dist/docs.json +1 -1
- package/dist/esm/verdocs-build.entry.js +19 -4
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/verdocs-web-sdk/p-a6da1726.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-c16cca3d.entry.js +1 -0
- 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-30b1f8e9.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-8e026703.entry.js +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,n,s){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function r(e){try{a(s.next(e))}catch(e){o(e)}}function l(e){try{a(s["throw"](e))}catch(e){o(e)}}function a(e){e.done?n(e.value):i(e.value).then(r,l)}a((s=s.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:[]},s,i,o,r;return r={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function l(e){return function(t){return a([e,t])}}function a(r){if(s)throw new TypeError("Generator is already executing.");while(n)try{if(s=1,i&&(o=r[0]&2?i["return"]:r[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;if(i=0,o)r=[r[0]&2,o.value];switch(r[0]){case 0:case 1:o=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;i=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!o||r[1]>o[0]&&r[1]<o[3])){n.label=r[1];break}if(r[0]===6&&n.label<o[1]){n.label=o[1];o=r;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(r);break}if(o[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];i=0}finally{s=o=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-9e15bdda.system.js","./p-724d4efa.system.js","./p-187b20b7.system.js","./p-3af6b910.system.js","./p-2fdb7348.system.js"],(function(e){"use strict";var t,n,s,i,o,r,l,a;return{setters:[function(e){t=e.r;n=e.c;s=e.h;i=e.H},function(){},function(e){o=e.P;r=e.V},function(e){l=e.g},function(e){a=e.S},function(){},function(){}],execute:function(){var d=function(e,t){return t.every((function(t){return((e===null||e===void 0?void 0:e.permissions)||[]).includes(t)}))};var c=function(e,t){return e&&t&&e.profile_id===t.profile_id};var p=function(e,t){return e&&t&&!t.is_personal&&e.organization_id===t.organization_id};var u=function(e,t){return t.is_public||c(e,t)||p(e,t)&&d(e,[o.TEMPLATE_MEMBER_READ])};var f=function(e,t){var n=u(e,t);var s=(t.roles||[]).filter((function(e){return e.type==="signer"}));return n&&s.length>0&&s.every((function(e){return(e.fields||[]).length>0}))};var h='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;gap:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:5px 20px 0 10px;background-color:#f2f5fa;border-bottom:1px solid #cccccc}verdocs-build .steps .step{border:none;height:40px;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;padding:0 20px;font-size:13px;font-weight:600;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;border-top-left-radius:5px;border-top-right-radius:5px;background-color:#666666}verdocs-build .steps .step.disabled{cursor:inherit;background-color:#aaaaaa}verdocs-build .steps .step.active{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;-webkit-box-shadow:0 0 7px -3px #000000cc;box-shadow:0 0 7px -3px #000000cc}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}';var m=e("verdocs_build",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.stepChanged=n(this,"stepChanged",7);this.send=n(this,"send",7);this.store=null;this.endpoint=r.getDefault();this.templateId=null;this.step=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,s,i;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[BUILD] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return[2]}this.step="roles";s=this;return[4,l(this.endpoint,this.templateId,true)];case 1:s.store=o.sent();return[3,3];case 2:i=o.sent();console.log("[BUILD] Error loading template",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new a(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(n=i.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){console.log("Cancel",e.detail);this.step="preview"};e.prototype.handleAttachmentsNext=function(){var e;this.step="roles";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("roles")};e.prototype.handleRolesNext=function(){var e;this.step="fields";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("fields")};e.prototype.setStep=function(e,t){var n;e.stopPropagation();e.preventDefault();this.step=t;(n=this.stepChanged)===null||n===void 0?void 0:n.emit(t)};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return s(i,null,s("verdocs-component-error",{message:"You must be authenticated to use this module."}))}var t=f(this.endpoint.session,this.store.state);var n=false;var o=false;return s(i,null,s("div",{class:"steps"},s("button",{class:"step ".concat(this.step==="attachments"?"active":""),onClick:function(t){return e.setStep(t,"attachments")}},"Attachments"),s("button",{class:"step ".concat(this.step==="roles"?"active":""),onClick:function(t){return e.setStep(t,"roles")},disabled:!o},"Roles"),s("button",{class:"step ".concat(this.step==="settings"?"active":""),onClick:function(t){return e.setStep(t,"settings")},disabled:!n},"Settings"),s("button",{class:"step ".concat(this.step==="fields"?"active":""),onClick:function(t){return e.setStep(t,"fields")},disabled:!n},"Fields"),s("button",{class:"step ".concat(this.step==="preview"?"active":""),onClick:function(t){return e.setStep(t,"preview")},disabled:!t},"Preview/Send")),s("div",{class:"content"},this.step==="attachments"&&s("verdocs-template-attachments",{templateId:this.templateId,endpoint:this.endpoint,onExit:function(t){return e.handleCancel(t)},onNext:function(){return e.handleAttachmentsNext()}}),this.step==="roles"&&s("verdocs-template-roles",{templateId:this.templateId,endpoint:this.endpoint,onExit:function(t){return e.handleCancel(t)},onNext:function(){return e.handleRolesNext()}}),this.step==="settings"&&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"}})),this.step==="fields"&&s("verdocs-template-fields",{templateId:this.templateId,endpoint:this.endpoint}),this.step==="preview"&&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:function(t){var n;return(n=e.send)===null||n===void 0?void 0:n.emit(t.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"}})))))};return e}());m.style=h}}}));
|
@@ -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{P as o,V as l}from"./p-53276c5b.js";import{g as n}from"./p-2c5e2d73.js";import{S as r}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}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 n(this.endpoint,this.templateId,!0)}catch(i){console.log("[BUILD] Error loading template",i),null===(e=this.sdkError)||void 0===e||e.emit(new r(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){console.log("Cancel",e.detail),this.step="preview"}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){var s;e.stopPropagation(),e.preventDefault(),this.step=t,null===(s=this.stepChanged)||void 0===s||s.emit(t)}render(){if(!this.endpoint.session)return s(i,null,s("verdocs-component-error",{message:"You must be authenticated to use this module."}));const e=(l=function(e,t){return t.is_public||function(e,t){return e&&t&&e.profile_id===t.profile_id}(e,t)||function(e,t){return e&&t&&!t.is_personal&&e.organization_id===t.organization_id}(e,t)&&function(e){return[o.TEMPLATE_MEMBER_READ].every((function(t){return((null==e?void 0:e.permissions)||[]).includes(t)}))}(e)}(this.endpoint.session,t=this.store.state),n=(t.roles||[]).filter((function(e){return"signer"===e.type})),l&&n.length>0&&n.every((function(e){return(e.fields||[]).length>0})));var t,l,n;return 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"),disabled:!0},"Roles"),s("button",{class:"step "+("settings"===this.step?"active":""),onClick:e=>this.setStep(e,"settings"),disabled:!0},"Settings"),s("button",{class:"step "+("fields"===this.step?"active":""),onClick:e=>this.setStep(e,"fields"),disabled:!0},"Fields"),s("button",{class:"step "+("preview"===this.step?"active":""),onClick:e=>this.setStep(e,"preview"),disabled:!e},"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"}})))))}};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;gap:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:5px 20px 0 10px;background-color:#f2f5fa;border-bottom:1px solid #cccccc}verdocs-build .steps .step{border:none;height:40px;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;padding:0 20px;font-size:13px;font-weight:600;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;border-top-left-radius:5px;border-top-right-radius:5px;background-color:#666666}verdocs-build .steps .step.disabled{cursor:inherit;background-color:#aaaaaa}verdocs-build .steps .step.active{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;-webkit-box-shadow:0 0 7px -3px #000000cc;box-shadow:0 0 7px -3px #000000cc}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}
|