@verdocs/web-sdk 1.10.10 → 1.11.0
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-68058bbe.js → Envelopes-7381bd9a.js} +11 -0
- package/dist/cjs/{Envelopes-4cc18551.js → Envelopes-9886af0f.js} +4 -1
- package/dist/cjs/{interact.min-3e3c03a5.js → interact.min-d223d04b.js} +3 -19
- package/dist/cjs/utils-f4cfa1fb.js +349 -0
- package/dist/cjs/verdocs-document-page_2.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +6 -3
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-field-date.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-field-signature.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-preview.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-send.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-sign.cjs.entry.js +12 -5
- package/dist/cjs/verdocs-template-create_2.cjs.entry.js +10 -4
- package/dist/cjs/verdocs-template-recipients.cjs.entry.js +5 -3
- package/dist/cjs/verdocs-view.cjs.entry.js +51 -11
- package/dist/collection/components/controls/verdocs-dropdown/verdocs-dropdown.css +6 -0
- package/dist/collection/components/controls/verdocs-dropdown/verdocs-dropdown.js +4 -2
- package/dist/collection/components/controls/verdocs-dropdown/verdocs-dropdown.stories.js +1 -1
- package/dist/collection/components/elements/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +27 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +10 -4
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +70 -8
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +29 -1
- package/dist/collection/components/templates/verdocs-template-recipients/verdocs-template-recipients.js +24 -0
- package/dist/collection/utils/envelopeStore.js +3 -0
- package/dist/collection/utils/utils.js +44 -3
- package/dist/components/Envelopes.js +4 -1
- package/dist/components/Envelopes2.js +11 -1
- package/dist/components/interact.min.js +1 -17
- package/dist/components/utils.js +80 -4
- package/dist/components/verdocs-dropdown2.js +2 -2
- package/dist/components/verdocs-envelope-sidebar.js +4 -1
- package/dist/components/verdocs-sign.js +9 -3
- package/dist/components/verdocs-template-fields2.js +6 -1
- package/dist/components/verdocs-template-recipients.js +1 -0
- package/dist/components/verdocs-view2.js +47 -8
- package/dist/custom-elements.json +1361 -0
- package/dist/docs.json +39 -3
- package/dist/esm/{Envelopes-91d7e139.js → Envelopes-b8945309.js} +4 -1
- package/dist/esm/{Envelopes-130fd6ea.js → Envelopes-eb3eef02.js} +11 -1
- package/dist/esm/{interact.min-32c1c1e4.js → interact.min-e472871a.js} +1 -17
- package/dist/esm/utils-8065a62d.js +334 -0
- package/dist/esm/verdocs-document-page_2.entry.js +3 -2
- package/dist/esm/verdocs-dropdown.entry.js +2 -2
- package/dist/esm/verdocs-envelope-sidebar.entry.js +6 -3
- package/dist/esm/verdocs-field-checkbox.entry.js +3 -2
- package/dist/esm/verdocs-field-date.entry.js +2 -2
- package/dist/esm/verdocs-field-dropdown.entry.js +3 -2
- package/dist/esm/verdocs-field-initial.entry.js +3 -2
- package/dist/esm/verdocs-field-payment.entry.js +3 -2
- package/dist/esm/verdocs-field-radio-button.entry.js +3 -2
- package/dist/esm/verdocs-field-signature.entry.js +3 -2
- package/dist/esm/verdocs-field-textarea.entry.js +3 -2
- package/dist/esm/verdocs-field-textbox.entry.js +3 -2
- package/dist/esm/verdocs-field-timestamp.entry.js +2 -2
- package/dist/esm/verdocs-preview.entry.js +3 -2
- package/dist/esm/verdocs-send.entry.js +3 -2
- package/dist/esm/verdocs-sign.entry.js +12 -5
- package/dist/esm/verdocs-template-create_2.entry.js +10 -4
- package/dist/esm/verdocs-template-recipients.entry.js +5 -3
- package/dist/esm/verdocs-view.entry.js +51 -11
- package/dist/esm-es5/Envelopes-b8945309.js +1 -0
- package/dist/esm-es5/{Envelopes-130fd6ea.js → Envelopes-eb3eef02.js} +1 -1
- package/dist/esm-es5/interact.min-e472871a.js +1 -0
- package/dist/esm-es5/utils-8065a62d.js +13 -0
- package/dist/esm-es5/verdocs-document-page_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-dropdown.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-send.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-create_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-recipients.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/types/components/controls/verdocs-dropdown/verdocs-dropdown.d.ts +3 -1
- package/dist/types/components/elements/verdocs-envelope-sidebar/verdocs-envelope-sidebar.d.ts +9 -1
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +1 -1
- package/dist/types/components/embeds/verdocs-view/verdocs-view.d.ts +9 -0
- package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +9 -1
- package/dist/types/components/templates/verdocs-template-recipients/verdocs-template-recipients.d.ts +10 -1
- package/dist/types/components.d.ts +17 -1
- package/dist/types/utils/envelopeStore.d.ts +1 -0
- package/dist/types/utils/utils.d.ts +4 -1
- package/dist/verdocs-web-sdk/p-085d66a2.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-19763c4d.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-19d13aca.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-25fa36d7.js +13 -0
- package/dist/verdocs-web-sdk/p-2faa3f2e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-32f9b201.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-388b771c.js +1 -0
- package/dist/verdocs-web-sdk/p-38d00c38.system.js +13 -0
- package/dist/verdocs-web-sdk/p-3bed244c.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-42a82518.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-433a7bb3.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-4e521971.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-5ced004c.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-5d29152f.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-63c55bc3.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-b39df234.system.entry.js → p-64f197a8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-6619bc62.js +1 -0
- package/dist/verdocs-web-sdk/{p-abffbbaf.entry.js → p-68743993.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-695c2ea8.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-6c4d28a2.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-b40a50a8.system.entry.js → p-6d295ee1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-6d84b99c.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-6e15a51e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-7ac87084.system.js → p-6f53c098.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-7149f974.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-76bdb162.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-79514d21.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-7a26ed4a.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-80fe8ac3.system.js +1 -0
- package/dist/verdocs-web-sdk/p-8b20b903.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-93b857b6.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-9dfcc6d4.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-a892d5b4.js +1 -0
- package/dist/verdocs-web-sdk/p-af2957cc.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-b3fd9575.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-b7740fe7.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-bea9fe06.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-c08b737c.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-c16b6ca4.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-8c53e0ff.system.entry.js → p-c317702e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-caaf2702.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-9345346d.entry.js → p-cb006a7e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0eb992eb.entry.js → p-d3e25ad3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-d5836d39.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-dd06fb2a.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-e58ab5ca.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-e0cfad01.system.js → p-e764098e.system.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +3 -2
- package/dist/cjs/utils-865fd657.js +0 -269
- package/dist/esm/utils-274e2e93.js +0 -258
- package/dist/esm-es5/Envelopes-91d7e139.js +0 -1
- package/dist/esm-es5/interact.min-32c1c1e4.js +0 -1
- package/dist/esm-es5/utils-274e2e93.js +0 -1
- package/dist/verdocs-web-sdk/p-0214eab8.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-07dfda29.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-19f6e8c8.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-1b58f506.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-1c92741b.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2037252b.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-242647c0.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-25256749.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-36fd1c28.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-46cfb904.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-47dfcf69.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4f12a8a7.js +0 -1
- package/dist/verdocs-web-sdk/p-50c9771e.js +0 -1
- package/dist/verdocs-web-sdk/p-628aef1d.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6790f267.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-72f4b40b.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7a05d4ac.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-875f9455.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-880b619d.js +0 -1
- package/dist/verdocs-web-sdk/p-996008f6.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-af65650c.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b22a2c9a.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b981d415.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-bda7353b.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c11a7c7e.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c73998d3.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c86a40a3.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-cd4270a9.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d122cadd.system.js +0 -1
- package/dist/verdocs-web-sdk/p-d6e07c20.js +0 -1
- package/dist/verdocs-web-sdk/p-d88f7d5e.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e090d5e1.system.js +0 -1
- package/dist/verdocs-web-sdk/p-e1754b47.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e6f3735e.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e845dc2c.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ef4603fd.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f81a559c.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ff2816cf.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,r,o){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function i(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o["throw"](e))}catch(e){s(e)}}function l(e){e.done?r(e.value):n(e.value).then(i,a)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},o,n,s,i;return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(e){return function(t){return l([e,t])}}function l(i){if(o)throw new TypeError("Generator is already executing.");while(r)try{if(o=1,n&&(s=i[0]&2?n["return"]:i[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,i[1])).done)return s;if(n=0,s)i=[i[0]&2,s.value];switch(i[0]){case 0:case 1:s=i;break;case 4:r.label++;return{value:i[1],done:false};case 5:r.label++;n=i[1];i=[0];continue;case 7:i=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!s||i[1]>s[0]&&i[1]<s[3])){r.label=i[1];break}if(i[0]===6&&r.label<s[1]){r.label=s[1];s=i;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(i);break}if(s[2])r.ops.pop();r.trys.pop();continue}i=t.call(e,r)}catch(e){i=[6,e];n=0}finally{o=s=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};var _g;import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host,a as getElement}from"./index-f78d163d.js";import{i as interact}from"./interact.min-32c1c1e4.js";import{u as updateRole,c as createRole}from"./Roles-2488d047.js";import{V as VerdocsEndpoint,T as TemplateSenderTypes}from"./VerdocsEndpoint-7f17b088.js";import{g as getRGBA}from"./Colors-1b298092.js";import{s as state}from"./templateStore-fd4beaae.js";import{l as loadTemplate}from"./Templates-a7530314.js";import{a as getRoleIndex}from"./utils-274e2e93.js";import{S as SDKError}from"./errors-9b5498c8.js";import"./Token-54690789.js";import"./index-fd7b8a34.js";import"./Primitives-054bc6e5.js";import"./Templates-8e4ab976.js";import"./Envelopes-130fd6ea.js";import"./Files-70a192df.js";var verdocsTemplateRecipientsCss='verdocs-template-recipients{display:block;min-width:400px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-recipients>form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;padding:12px}verdocs-template-recipients>form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 10px 0}verdocs-template-recipients>form .participants{position:relative}verdocs-template-recipients>form .left-line{top:32px;left:11px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-template-recipients>form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:0;-moz-column-gap:0;column-gap:0;margin-left:40px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:6px 0 4px 0}verdocs-template-recipients>form .row .row-recipients{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;-ms-flex-direction:row;flex-direction:row}verdocs-template-recipients>form .row .icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-template-recipients>form .row .sender{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 5px 0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;border:1px solid #c6c9cc;background-color:#f5f5fa}verdocs-template-recipients>form .row .complete{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;background-color:#f5f5fa;border:1px solid #aeb4bf}verdocs-template-recipients>form .row .label{font-weight:bold;margin-right:6px;color:#33364b}verdocs-template-recipients>form .row .settings-button{margin:4px 0 0 9px;cursor:pointer}verdocs-template-recipients>form .row .recipient{height:30px;display:-ms-flexbox;display:flex;font-size:14px;line-height:30px;border-radius:30px;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 6px;white-space:nowrap;border:1px solid #aeb4bf}verdocs-template-recipients>form .row .recipient .type-icon{width:24px;height:24px;-webkit-transform:scale(0.8);transform:scale(0.8);opacity:0.6;margin:4px 12px 0 0}verdocs-template-recipients>form .row .recipient.dragging{position:absolute}verdocs-template-recipients>form .row .recipient.dragging+.dropzone{display:none !important}verdocs-template-recipients>form .row .dropzone{width:14px;height:30px;display:none}verdocs-template-recipients>form .row .dropzone svg{fill:#cccccc}verdocs-template-recipients>form .row .dropzone.visible{margin:0 7px;display:-ms-flexbox;display:flex;-ms-flex:0 0 14px;flex:0 0 14px}verdocs-template-recipients>form .row .dropzone.active{-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;background:#654dcb7f;border:1px dashed #654dcb}verdocs-template-recipients>form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-recipients>form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-recipients>form input:focus{outline:none}verdocs-template-recipients .row.add-sequence{display:none}verdocs-template-recipients .add-role{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-recipients .add-role:hover{opacity:1}verdocs-template-recipients .add-role svg{width:32px;height:32px}verdocs-template-recipients.dragging .add-role{display:none}verdocs-template-recipients.dragging form .row .recipient+.dropzone{display:-ms-flexbox;display:flex}verdocs-template-recipients.dragging .row.add-sequence{display:-ms-flexbox;display:flex}verdocs-template-recipients.dragging .row.add-sequence .dropzone{opacity:0.5;-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;-ms-flex-align:center;align-items:center;background:#654dcb7f;-ms-flex-pack:center;justify-content:center;border:1px dashed #654dcb}verdocs-template-recipients.dragging .row.add-sequence .dropzone.active{opacity:1}verdocs-template-recipients .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-recipients .empty{font-size:13px;margin-top:15px;margin-bottom:5px}verdocs-template-recipients .empty svg{width:20px;height:20px;stroke:#666666;margin-bottom:-5px}verdocs-template-recipients ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-recipients ::-moz-placeholder{color:#aaaaaa}verdocs-template-recipients :-ms-input-placeholder{color:#aaaaaa}verdocs-template-recipients ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-recipients ::placeholder{color:#aaaaaa}';var senderLabels=(_g={},_g[TemplateSenderTypes.EVERYONE]="Everyone",_g[TemplateSenderTypes.EVERYONE_AS_CREATOR]="Everyone as Me",_g[TemplateSenderTypes.ORGANIZATION_MEMBER]="Organization member",_g[TemplateSenderTypes.ORGANIZATION_MEMBER_AS_CREATOR]="Organization Member as Me",_g[TemplateSenderTypes.CREATOR]="Me",_g);var settingsIcon='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20" fill="#00000089"><path d="m8.021 17.917-.313-2.5q-.27-.125-.625-.334-.354-.208-.625-.395l-2.312.979-1.979-3.438 1.979-1.5q-.021-.167-.031-.364-.011-.198-.011-.365 0-.146.011-.344.01-.198.031-.385l-1.979-1.5 1.979-3.417 2.312.958q.271-.187.615-.385t.635-.344l.313-2.5h3.958l.313 2.5q.312.167.625.344.312.177.604.385l2.333-.958 1.979 3.417-1.979 1.521q.021.187.021.364V10q0 .146-.01.333-.011.188-.011.396l1.958 1.5-1.979 3.438-2.312-.979q-.292.208-.615.395-.323.188-.614.334l-.313 2.5Zm1.937-5.355q1.063 0 1.813-.75t.75-1.812q0-1.062-.75-1.812t-1.813-.75q-1.041 0-1.802.75-.76.75-.76 1.812t.76 1.812q.761.75 1.802.75Zm0-1.333q-.5 0-.864-.364-.365-.365-.365-.865t.365-.865q.364-.364.864-.364t.865.364q.365.365.365.865t-.365.865q-.365.364-.865.364ZM10.021 10Zm-.854 6.583h1.666l.25-2.187q.605-.167 1.136-.49.531-.323 1.031-.802l2.021.875.854-1.375-1.792-1.354q.105-.333.136-.635.031-.303.031-.615 0-.292-.031-.573-.031-.281-.115-.635l1.792-1.396-.834-1.375-2.062.875q-.438-.438-1.021-.781-.583-.344-1.125-.49l-.271-2.208H9.167l-.271 2.208q-.584.146-1.125.458-.542.313-1.042.792l-2.021-.854-.833 1.375 1.75 1.354q-.083.333-.125.646-.042.312-.042.604t.042.594q.042.302.125.635l-1.75 1.375.833 1.375 2.021-.854q.479.458 1.021.771.542.312 1.146.479Z"/></svg>';var startIcon='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>';var stepIcon='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>';var doneIcon='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>';var plusIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="#ffffff" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" d="M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>';var iconSigner='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';var iconApprover='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>';var iconCC='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z" /><path d="M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z" /></svg>';var VerdocsTemplateRecipients=function(){function e(e){registerInstance(this,e);this.next=createEvent(this,"next",7);this.cancel=createEvent(this,"cancel",7);this.sdkError=createEvent(this,"sdkError",7);this.sequences=[];this.endpoint=VerdocsEndpoint.getDefault();this.templateId="";this.showingRoleDialog=null;this.showingSenderDialog=false;this.sender=null;this.forceRerender=1}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,r,o,n,s,i,a;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,5,,6]);this.endpoint.loadSession();if(!this.templateId){console.log("[RECIPIENTS] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start builder session, must be authenticated");return[2]}l.label=1;case 1:l.trys.push([1,3,,4]);console.log("[RECIPIENTS] Loading template ".concat(this.templateId),this.endpoint.session);return[4,loadTemplate(this.endpoint,this.templateId,true)];case 2:l.sent();return[3,4];case 3:i=l.sent();console.log("[RECIPIENTS] Error loading template",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(r=i.response)===null||r===void 0?void 0:r.data));return[3,4];case 4:this.sortTemplateRoles();this.renumberTemplateRoles();return[3,6];case 5:a=l.sent();console.log("[FIELDS] Error with preview session",a);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new SDKError(a.message,(n=a.response)===null||n===void 0?void 0:n.status,(s=a.response)===null||s===void 0?void 0:s.data));return[3,6];case 6:return[2]}}))}))};e.prototype.componentDidRender=function(){interact.dynamicDrop(true);interact(".recipient").draggable({listeners:{start:function e(t){t.target.classList.add("dragging");this.el.classList.add("dragging")}.bind(this),move:function e(t){var r=+(t.target.getAttribute("posX")||0);var o=+(t.target.getAttribute("posY")||0);var n=t.dx+r;var s=t.dy+o;t.target.setAttribute("posX",n);t.target.setAttribute("posy",s);t.target.style.transform="translate(".concat(n+100,"px, ").concat(s-40,"px)")}.bind(this),end:function e(t){t.target.classList.remove("dragging");this.el.classList.remove("dragging");t.target.setAttribute("posX",0);t.target.setAttribute("posy",0);t.target.style.transform="translate(0px, 0px)"}.bind(this)}});interact(".dropzone").dropzone({overlap:.05,ondrop:function e(t){var r=this;t.target.classList.remove("active");var o=t.relatedTarget.dataset.rolename;var n=+t.target.dataset.sequence;var s=+t.target.dataset.order;var i=state.template.roles.find((function(e){return e.name===o}));if(i){i.sequence=n;i.order=s;this.sortTemplateRoles();this.renumberTemplateRoles();this.forceRerender++;Promise.all(state.template.roles.map((function(e){return updateRole(r.endpoint,r.templateId,e.name,{sequence:e.sequence,order:e.order})}))).then((function(){return console.log("[RECIPIENTS] Updated roles")})).catch((function(e){return console.log("[RECIPIENTS] Role updates failed",e)}))}}.bind(this),ondropactivate:function(e){e.target.classList.add("visible")},ondropdeactivate:function(e){e.target.classList.remove("visible")},ondragenter:function(e){e.target.classList.add("active")},ondragleave:function(e){e.target.classList.remove("active")}})};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.cancel)===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()};e.prototype.sortTemplateRoles=function(){state.template.roles.sort((function(e,t){return e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence}))};e.prototype.extractSequenceNumbers=function(){var e=this;this.sequences=[];state.template.roles.forEach((function(t){if(!e.sequences.includes(t.sequence)){e.sequences.push(t.sequence)}}))};e.prototype.renumberTemplateRoles=function(){this.extractSequenceNumbers();var e=[];this.sequences.sort((function(e,t){return e-t}));this.sequences.forEach((function(t,r){state.template.roles.filter((function(e){return e.sequence===t})).forEach((function(t,o){if(!e.includes(t.name)){t.sequence=r+1;t.order=o+1;e.push(t.name)}}))}));this.extractSequenceNumbers()};e.prototype.handleAddRole=function(e,t){var r=this;e.stopPropagation();var o=state.template.roles.filter((function(e){return e.sequence===t})).length+1;var n="";var s=state.template.roles.length;do{s++;n="Recipient ".concat(s)}while(!n||state.template.roles.some((function(e){return e.name===n})));console.log("Will create",n,t,o);createRole(this.endpoint,this.templateId,{template_id:this.templateId,name:n,full_name:"",email:"",phone:"",sequence:t,order:o,type:"signer",delegator:false}).then((function(e){console.log("Created role",e);state.template.roles.push(e);r.renumberTemplateRoles();r.forceRerender++})).catch((function(e){console.log("Error creating role",e)}))};e.prototype.render=function(){var e=this;var t=state.template.roles.map((function(e){return e.name}));return h(Host,null,h("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off","data-r":this.forceRerender},h("h5",null,"Roles"),h("div",{class:"participants"},h("div",{class:"left-line"}),h("div",{class:"row"},h("div",{class:"icon",innerHTML:startIcon}),h("div",{class:"row-recipients"},h("div",{class:"sender"},h("span",{class:"label"},"Sender:")," ",senderLabels[state.template.sender]," ",h("div",{class:"settings-button",innerHTML:settingsIcon,onClick:function(){return e.showingSenderDialog=true},"aria-role":"button"})))),h("div",{class:"row add-sequence","data-sequence":0},h("div",{class:"icon",innerHTML:plusIcon}),h("div",{class:"row-recipients"},h("div",{class:"dropzone","data-sequence":0,"data-order":1},"Add Step"))),this.sequences.map((function(r){return h(Fragment,null,h("div",{class:"row"},h("div",{class:"icon",innerHTML:stepIcon}),h("div",{class:"row-recipients"},h("div",{class:"dropzone","data-order":.5,"data-sequence":r}),state.template.roles.filter((function(e){return e.sequence===r})).map((function(o){return h(Fragment,null,h("div",{class:"recipient",style:{backgroundColor:getRGBA(getRoleIndex(t,o.name))},"data-rolename":o.name},h("span",{class:"type-icon",innerHTML:o.type==="signer"?iconSigner:o.type==="cc"?iconCC:iconApprover}),o.name," ",h("div",{class:"settings-button",innerHTML:settingsIcon,onClick:function(){return e.showingRoleDialog=o.name},"aria-role":"button"})),h("div",{class:"dropzone","data-order":o.order+.5,"data-sequence":r}))})),h("button",{class:"add-role",innerHTML:plusIcon,onClick:function(t){return e.handleAddRole(t,r)}}))),h("div",{class:"row add-sequence","data-sequence":r},h("div",{class:"row-recipients"},h("div",{class:"icon",innerHTML:plusIcon}),h("div",{class:"dropzone","data-sequence":r+1,"data-order":1},"Add Step"))))})),this.sequences.length<1&&h(Fragment,null,h("div",{class:"row"},h("div",{class:"icon",innerHTML:stepIcon}),h("div",{class:"row-recipients"},h("button",{class:"add-role",innerHTML:plusIcon,onClick:function(t){return e.handleAddRole(t,1)}})))),h("div",{class:"row"},h("div",{class:"icon",innerHTML:doneIcon}),h("div",{class:"row-recipients"},h("div",{class:"complete"},"Document Complete")))),t.length<1&&h("div",{class:"empty"},"You must add at least one Role before proceeding.",h("br",null)," Click the ",h("span",{innerHTML:plusIcon})," Add button above to get started."),h("div",{class:"buttons"},h("div",{class:"flex-fill"}),h("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),h("verdocs-button",{label:"OK",size:"small",onClick:function(t){return e.handleSubmit(t)},disabled:t.length<1}))),this.showingRoleDialog&&h("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:function(){e.showingRoleDialog=null;e.forceRerender++},onDelete:function(t){console.log("deleted",t.detail);e.renumberTemplateRoles();e.showingRoleDialog=null;e.forceRerender++}}),this.showingSenderDialog&&h("verdocs-template-sender",{endpoint:this.endpoint,templateId:this.templateId,onClose:function(){return e.showingSenderDialog=false}}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsTemplateRecipients.style=verdocsTemplateRecipientsCss;export{VerdocsTemplateRecipients as verdocs_template_recipients};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,r,o){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function i(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o["throw"](e))}catch(e){s(e)}}function l(e){e.done?r(e.value):n(e.value).then(i,a)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},o,n,s,i;return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(e){return function(t){return l([e,t])}}function l(i){if(o)throw new TypeError("Generator is already executing.");while(r)try{if(o=1,n&&(s=i[0]&2?n["return"]:i[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,i[1])).done)return s;if(n=0,s)i=[i[0]&2,s.value];switch(i[0]){case 0:case 1:s=i;break;case 4:r.label++;return{value:i[1],done:false};case 5:r.label++;n=i[1];i=[0];continue;case 7:i=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!s||i[1]>s[0]&&i[1]<s[3])){r.label=i[1];break}if(i[0]===6&&r.label<s[1]){r.label=s[1];s=i;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(i);break}if(s[2])r.ops.pop();r.trys.pop();continue}i=t.call(e,r)}catch(e){i=[6,e];n=0}finally{o=s=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};var _g;import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host,a as getElement}from"./index-f78d163d.js";import{i as interact}from"./interact.min-e472871a.js";import{u as updateRole,c as createRole}from"./Roles-2488d047.js";import{V as VerdocsEndpoint,T as TemplateSenderTypes}from"./VerdocsEndpoint-7f17b088.js";import{g as getRGBA}from"./Colors-1b298092.js";import{s as state}from"./templateStore-fd4beaae.js";import{l as loadTemplate}from"./Templates-a7530314.js";import{a as getRoleIndex}from"./utils-8065a62d.js";import{S as SDKError}from"./errors-9b5498c8.js";import"./Token-54690789.js";import"./index-fd7b8a34.js";import"./Primitives-054bc6e5.js";import"./Templates-8e4ab976.js";import"./Envelopes-eb3eef02.js";import"./Files-70a192df.js";import"./index-d264c496.js";var verdocsTemplateRecipientsCss='verdocs-template-recipients{display:block;min-width:400px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-recipients>form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;padding:12px}verdocs-template-recipients>form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 10px 0}verdocs-template-recipients>form .participants{position:relative}verdocs-template-recipients>form .left-line{top:32px;left:11px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-template-recipients>form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:0;-moz-column-gap:0;column-gap:0;margin-left:40px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:6px 0 4px 0}verdocs-template-recipients>form .row .row-recipients{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;-ms-flex-direction:row;flex-direction:row}verdocs-template-recipients>form .row .icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-template-recipients>form .row .sender{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 5px 0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;border:1px solid #c6c9cc;background-color:#f5f5fa}verdocs-template-recipients>form .row .complete{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;background-color:#f5f5fa;border:1px solid #aeb4bf}verdocs-template-recipients>form .row .label{font-weight:bold;margin-right:6px;color:#33364b}verdocs-template-recipients>form .row .settings-button{margin:4px 0 0 9px;cursor:pointer}verdocs-template-recipients>form .row .recipient{height:30px;display:-ms-flexbox;display:flex;font-size:14px;line-height:30px;border-radius:30px;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 6px;white-space:nowrap;border:1px solid #aeb4bf}verdocs-template-recipients>form .row .recipient .type-icon{width:24px;height:24px;-webkit-transform:scale(0.8);transform:scale(0.8);opacity:0.6;margin:4px 12px 0 0}verdocs-template-recipients>form .row .recipient.dragging{position:absolute}verdocs-template-recipients>form .row .recipient.dragging+.dropzone{display:none !important}verdocs-template-recipients>form .row .dropzone{width:14px;height:30px;display:none}verdocs-template-recipients>form .row .dropzone svg{fill:#cccccc}verdocs-template-recipients>form .row .dropzone.visible{margin:0 7px;display:-ms-flexbox;display:flex;-ms-flex:0 0 14px;flex:0 0 14px}verdocs-template-recipients>form .row .dropzone.active{-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;background:#654dcb7f;border:1px dashed #654dcb}verdocs-template-recipients>form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-recipients>form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-recipients>form input:focus{outline:none}verdocs-template-recipients .row.add-sequence{display:none}verdocs-template-recipients .add-role{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-recipients .add-role:hover{opacity:1}verdocs-template-recipients .add-role svg{width:32px;height:32px}verdocs-template-recipients.dragging .add-role{display:none}verdocs-template-recipients.dragging form .row .recipient+.dropzone{display:-ms-flexbox;display:flex}verdocs-template-recipients.dragging .row.add-sequence{display:-ms-flexbox;display:flex}verdocs-template-recipients.dragging .row.add-sequence .dropzone{opacity:0.5;-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;-ms-flex-align:center;align-items:center;background:#654dcb7f;-ms-flex-pack:center;justify-content:center;border:1px dashed #654dcb}verdocs-template-recipients.dragging .row.add-sequence .dropzone.active{opacity:1}verdocs-template-recipients .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-recipients .empty{font-size:13px;margin-top:15px;margin-bottom:5px}verdocs-template-recipients .empty svg{width:20px;height:20px;stroke:#666666;margin-bottom:-5px}verdocs-template-recipients ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-recipients ::-moz-placeholder{color:#aaaaaa}verdocs-template-recipients :-ms-input-placeholder{color:#aaaaaa}verdocs-template-recipients ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-recipients ::placeholder{color:#aaaaaa}';var senderLabels=(_g={},_g[TemplateSenderTypes.EVERYONE]="Everyone",_g[TemplateSenderTypes.EVERYONE_AS_CREATOR]="Everyone as Me",_g[TemplateSenderTypes.ORGANIZATION_MEMBER]="Organization member",_g[TemplateSenderTypes.ORGANIZATION_MEMBER_AS_CREATOR]="Organization Member as Me",_g[TemplateSenderTypes.CREATOR]="Me",_g);var settingsIcon='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20" fill="#00000089"><path d="m8.021 17.917-.313-2.5q-.27-.125-.625-.334-.354-.208-.625-.395l-2.312.979-1.979-3.438 1.979-1.5q-.021-.167-.031-.364-.011-.198-.011-.365 0-.146.011-.344.01-.198.031-.385l-1.979-1.5 1.979-3.417 2.312.958q.271-.187.615-.385t.635-.344l.313-2.5h3.958l.313 2.5q.312.167.625.344.312.177.604.385l2.333-.958 1.979 3.417-1.979 1.521q.021.187.021.364V10q0 .146-.01.333-.011.188-.011.396l1.958 1.5-1.979 3.438-2.312-.979q-.292.208-.615.395-.323.188-.614.334l-.313 2.5Zm1.937-5.355q1.063 0 1.813-.75t.75-1.812q0-1.062-.75-1.812t-1.813-.75q-1.041 0-1.802.75-.76.75-.76 1.812t.76 1.812q.761.75 1.802.75Zm0-1.333q-.5 0-.864-.364-.365-.365-.365-.865t.365-.865q.364-.364.864-.364t.865.364q.365.365.365.865t-.365.865q-.365.364-.865.364ZM10.021 10Zm-.854 6.583h1.666l.25-2.187q.605-.167 1.136-.49.531-.323 1.031-.802l2.021.875.854-1.375-1.792-1.354q.105-.333.136-.635.031-.303.031-.615 0-.292-.031-.573-.031-.281-.115-.635l1.792-1.396-.834-1.375-2.062.875q-.438-.438-1.021-.781-.583-.344-1.125-.49l-.271-2.208H9.167l-.271 2.208q-.584.146-1.125.458-.542.313-1.042.792l-2.021-.854-.833 1.375 1.75 1.354q-.083.333-.125.646-.042.312-.042.604t.042.594q.042.302.125.635l-1.75 1.375.833 1.375 2.021-.854q.479.458 1.021.771.542.312 1.146.479Z"/></svg>';var startIcon='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>';var stepIcon='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>';var doneIcon='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>';var plusIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="#ffffff" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" d="M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>';var iconSigner='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';var iconApprover='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>';var iconCC='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z" /><path d="M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z" /></svg>';var VerdocsTemplateRecipients=function(){function e(e){registerInstance(this,e);this.next=createEvent(this,"next",7);this.cancel=createEvent(this,"cancel",7);this.sdkError=createEvent(this,"sdkError",7);this.templateUpdated=createEvent(this,"templateUpdated",7);this.sequences=[];this.endpoint=VerdocsEndpoint.getDefault();this.templateId="";this.showingRoleDialog=null;this.showingSenderDialog=false;this.sender=null;this.forceRerender=1}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,r,o,n,s,i,a;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,5,,6]);this.endpoint.loadSession();if(!this.templateId){console.log("[RECIPIENTS] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start builder session, must be authenticated");return[2]}l.label=1;case 1:l.trys.push([1,3,,4]);console.log("[RECIPIENTS] Loading template ".concat(this.templateId),this.endpoint.session);return[4,loadTemplate(this.endpoint,this.templateId,true)];case 2:l.sent();return[3,4];case 3:i=l.sent();console.log("[RECIPIENTS] Error loading template",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(r=i.response)===null||r===void 0?void 0:r.data));return[3,4];case 4:this.sortTemplateRoles();this.renumberTemplateRoles();return[3,6];case 5:a=l.sent();console.log("[FIELDS] Error with preview session",a);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new SDKError(a.message,(n=a.response)===null||n===void 0?void 0:n.status,(s=a.response)===null||s===void 0?void 0:s.data));return[3,6];case 6:return[2]}}))}))};e.prototype.componentDidRender=function(){interact.dynamicDrop(true);interact(".recipient").draggable({listeners:{start:function e(t){t.target.classList.add("dragging");this.el.classList.add("dragging")}.bind(this),move:function e(t){var r=+(t.target.getAttribute("posX")||0);var o=+(t.target.getAttribute("posY")||0);var n=t.dx+r;var s=t.dy+o;t.target.setAttribute("posX",n);t.target.setAttribute("posy",s);t.target.style.transform="translate(".concat(n+100,"px, ").concat(s-40,"px)")}.bind(this),end:function e(t){t.target.classList.remove("dragging");this.el.classList.remove("dragging");t.target.setAttribute("posX",0);t.target.setAttribute("posy",0);t.target.style.transform="translate(0px, 0px)"}.bind(this)}});interact(".dropzone").dropzone({overlap:.05,ondrop:function e(t){var r=this;t.target.classList.remove("active");var o=t.relatedTarget.dataset.rolename;var n=+t.target.dataset.sequence;var s=+t.target.dataset.order;var i=state.template.roles.find((function(e){return e.name===o}));if(i){i.sequence=n;i.order=s;this.sortTemplateRoles();this.renumberTemplateRoles();this.forceRerender++;Promise.all(state.template.roles.map((function(e){return updateRole(r.endpoint,r.templateId,e.name,{sequence:e.sequence,order:e.order})}))).then((function(){return console.log("[RECIPIENTS] Updated roles")})).catch((function(e){return console.log("[RECIPIENTS] Role updates failed",e)}))}}.bind(this),ondropactivate:function(e){e.target.classList.add("visible")},ondropdeactivate:function(e){e.target.classList.remove("visible")},ondragenter:function(e){e.target.classList.add("active")},ondragleave:function(e){e.target.classList.remove("active")}})};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.cancel)===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()};e.prototype.sortTemplateRoles=function(){state.template.roles.sort((function(e,t){return e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence}))};e.prototype.extractSequenceNumbers=function(){var e=this;this.sequences=[];state.template.roles.forEach((function(t){if(!e.sequences.includes(t.sequence)){e.sequences.push(t.sequence)}}))};e.prototype.renumberTemplateRoles=function(){this.extractSequenceNumbers();var e=[];this.sequences.sort((function(e,t){return e-t}));this.sequences.forEach((function(t,r){state.template.roles.filter((function(e){return e.sequence===t})).forEach((function(t,o){if(!e.includes(t.name)){t.sequence=r+1;t.order=o+1;e.push(t.name)}}))}));this.extractSequenceNumbers()};e.prototype.handleAddRole=function(e,t){var r=this;e.stopPropagation();var o=state.template.roles.filter((function(e){return e.sequence===t})).length+1;var n="";var s=state.template.roles.length;do{s++;n="Recipient ".concat(s)}while(!n||state.template.roles.some((function(e){return e.name===n})));console.log("Will create",n,t,o);createRole(this.endpoint,this.templateId,{template_id:this.templateId,name:n,full_name:"",email:"",phone:"",sequence:t,order:o,type:"signer",delegator:false}).then((function(e){console.log("Created role",e);state.template.roles.push(e);r.renumberTemplateRoles();r.forceRerender++})).catch((function(e){console.log("Error creating role",e)}))};e.prototype.render=function(){var e=this;var t=state.template.roles.map((function(e){return e.name}));return h(Host,null,h("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off","data-r":this.forceRerender},h("h5",null,"Roles"),h("div",{class:"participants"},h("div",{class:"left-line"}),h("div",{class:"row"},h("div",{class:"icon",innerHTML:startIcon}),h("div",{class:"row-recipients"},h("div",{class:"sender"},h("span",{class:"label"},"Sender:")," ",senderLabels[state.template.sender]," ",h("div",{class:"settings-button",innerHTML:settingsIcon,onClick:function(){return e.showingSenderDialog=true},"aria-role":"button"})))),h("div",{class:"row add-sequence","data-sequence":0},h("div",{class:"icon",innerHTML:plusIcon}),h("div",{class:"row-recipients"},h("div",{class:"dropzone","data-sequence":0,"data-order":1},"Add Step"))),this.sequences.map((function(r){return h(Fragment,null,h("div",{class:"row"},h("div",{class:"icon",innerHTML:stepIcon}),h("div",{class:"row-recipients"},h("div",{class:"dropzone","data-order":.5,"data-sequence":r}),state.template.roles.filter((function(e){return e.sequence===r})).map((function(o){return h(Fragment,null,h("div",{class:"recipient",style:{backgroundColor:getRGBA(getRoleIndex(t,o.name))},"data-rolename":o.name},h("span",{class:"type-icon",innerHTML:o.type==="signer"?iconSigner:o.type==="cc"?iconCC:iconApprover}),o.name," ",h("div",{class:"settings-button",innerHTML:settingsIcon,onClick:function(){return e.showingRoleDialog=o.name},"aria-role":"button"})),h("div",{class:"dropzone","data-order":o.order+.5,"data-sequence":r}))})),h("button",{class:"add-role",innerHTML:plusIcon,onClick:function(t){return e.handleAddRole(t,r)}}))),h("div",{class:"row add-sequence","data-sequence":r},h("div",{class:"row-recipients"},h("div",{class:"icon",innerHTML:plusIcon}),h("div",{class:"dropzone","data-sequence":r+1,"data-order":1},"Add Step"))))})),this.sequences.length<1&&h(Fragment,null,h("div",{class:"row"},h("div",{class:"icon",innerHTML:stepIcon}),h("div",{class:"row-recipients"},h("button",{class:"add-role",innerHTML:plusIcon,onClick:function(t){return e.handleAddRole(t,1)}})))),h("div",{class:"row"},h("div",{class:"icon",innerHTML:doneIcon}),h("div",{class:"row-recipients"},h("div",{class:"complete"},"Document Complete")))),t.length<1&&h("div",{class:"empty"},"You must add at least one Role before proceeding.",h("br",null)," Click the ",h("span",{innerHTML:plusIcon})," Add button above to get started."),h("div",{class:"buttons"},h("div",{class:"flex-fill"}),h("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),h("verdocs-button",{label:"OK",size:"small",onClick:function(t){return e.handleSubmit(t)},disabled:t.length<1}))),this.showingRoleDialog&&h("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:function(){e.showingRoleDialog=null;e.forceRerender++},onDelete:function(t){console.log("deleted",t.detail);e.renumberTemplateRoles();e.showingRoleDialog=null;e.forceRerender++}}),this.showingSenderDialog&&h("verdocs-template-sender",{endpoint:this.endpoint,templateId:this.templateId,onClose:function(){return e.showingSenderDialog=false}}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsTemplateRecipients.style=verdocsTemplateRecipientsCss;export{VerdocsTemplateRecipients as verdocs_template_recipients};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,n,
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,o){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o["throw"](e))}catch(e){i(e)}}function l(e){e.done?n(e.value):r(e.value).then(a,s)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(o)throw new TypeError("Generator is already executing.");while(n)try{if(o=1,r&&(i=a[0]&2?r["return"]:a[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;if(r=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;r=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){n.label=a[1];break}if(a[0]===6&&n.label<i[1]){n.label=i[1];i=a;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(a);break}if(i[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];r=0}finally{o=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,i;o<r;o++){if(i||!(o in t)){if(!i)i=Array.prototype.slice.call(t,0,o);i[o]=t[o]}}return e.concat(i||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,H as Host,F as Fragment,a as getElement}from"./index-f78d163d.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-7f17b088.js";import{i as saveEnvelopesAsZip,j as saveCertificate,s as saveAttachment}from"./utils-8065a62d.js";import{g as getEnvelopeById,s as state}from"./Envelopes-b8945309.js";import{S as SDKError}from"./errors-9b5498c8.js";import"./Token-54690789.js";import"./Envelopes-eb3eef02.js";import"./Files-70a192df.js";import"./index-d264c496.js";import"./index-fd7b8a34.js";import"./Templates-8e4ab976.js";var verdocsViewCss='verdocs-view{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-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .header{color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 15px;font-size:12px;-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-view .header .logo{width:80px;display:none;margin:-6px 0 0 10px}verdocs-view .header .title{padding-left:16px;font-size:18px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}verdocs-view .document{-ms-flex:1;flex:1;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;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;-ms-flex-pack:center;justify-content:center}verdocs-view .document .inner{width:100%;max-width:1028px}';var VerdocsView=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.envelopeUpdated=createEvent(this,"envelopeUpdated",7);this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId=""}e.prototype.componentWillLoad=function(){this.endpoint.loadSession()};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,o;return __generator(this,(function(r){switch(r.label){case 0:if(!this.envelopeId){console.error("[VIEW] Missing required envelopeId");return[2]}r.label=1;case 1:r.trys.push([1,3,,4]);return[4,getEnvelopeById(this.endpoint,this.envelopeId)];case 2:r.sent();return[3,4];case 3:o=r.sent();(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(o.message,(t=o.response)===null||t===void 0?void 0:t.status,(n=o.response)===null||n===void 0?void 0:n.data));return[3,4];case 4:return[2]}}))}))};e.prototype.handlePageRendered=function(e){var t=e.detail;console.log("[VIEW] Page rendered",t)};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var t;var n=this;return __generator(this,(function(o){switch(e.detail.id){case"print":window.print();(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:state.envelope,event:"printed"});break;case"download-attachments":saveAttachment(this.endpoint,state.envelope,state.envelope.envelope_document_id).then((function(){var e;(e=n.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:n.endpoint,envelope:state.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading PDF",e)}));break;case"download-certificate":saveCertificate(this.endpoint,state.envelope,state.envelope.certificate_document_id).then((function(){var e;(e=n.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:n.endpoint,envelope:state.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading PDF",e)}));break;case"download-all":saveEnvelopesAsZip(this.endpoint,[state.envelope]).then((function(){var e;(e=n.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:n.endpoint,envelope:state.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading Zip",e)}));break}return[2]}))}))};e.prototype.render=function(){var e=this;var t;console.log("[VIEW] Rendering",state.error,state.loading,state.envelope);if(state.loading||!state.envelope){return h(Host,null,h("verdocs-loader",null))}if(state.error){return h(Host,null,h("div",null,state.error))}var n=[{id:"print",label:"Print"}];var o=state.envelope.documents.length>0;var r=!!state.envelope.certificate;if(o||r){n.push({label:""})}if(o){n.push({id:"download-attachments",label:"Download Attachment(s)"})}if(r){n.push({id:"download-certificate",label:"Download Certificate"})}if(o&&r){n.push({id:"download-all",label:"Download All Files"})}return h(Host,{"data-r":state.updateCount},h("div",{class:"header"},h(Fragment,null,h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},state.envelope.name),h("div",{style:{flex:"1"}}),h("div",{style:{marginLeft:"10px"}}),h("verdocs-dropdown",{options:n,onOptionSelected:function(t){return e.handleOptionSelected(t)}}))),h("div",{class:"document"},(((t=state.envelope)===null||t===void 0?void 0:t.documents)||[]).filter((function(e){return e.type!=="certificate"})).map((function(t){var n=__spreadArray([],(t===null||t===void 0?void 0:t.pages)||[],true);n.sort((function(e,t){return e.sequence-t.sequence}));return h(Fragment,null,n.map((function(t){return h("verdocs-document-page",{pageImageUri:t.display_uri,virtualWidth:612,virtualHeight:792,pageNumber:t.sequence,onPageRendered:function(t){return e.handlePageRendered(t)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))))};Object.defineProperty(e.prototype,"component",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsView.style=verdocsViewCss;export{VerdocsView as verdocs_view};
|
|
@@ -7,13 +7,15 @@ export interface IMenuOption {
|
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* Display a drop-down menu button. A menu of the specified options will be displayed when the button is pressed. The menu will be hidden
|
|
10
|
-
* when the button is pressed again, or an option is selected.
|
|
10
|
+
* when the button is pressed again, or an option is selected. Separators may be created by supplying an entry with an empty label.
|
|
11
11
|
*
|
|
12
12
|
* ```html
|
|
13
13
|
* <verdocs-dropdown
|
|
14
14
|
* options={[
|
|
15
15
|
* {label: 'Option 1', disabled: true},
|
|
16
16
|
* {label: 'Option 2', id: '2'}
|
|
17
|
+
* {label: ''}
|
|
18
|
+
* {label: 'Option 3', id: '2'}
|
|
17
19
|
* ]}
|
|
18
20
|
* label="OK" onClick={() => (console.log('OK clicked'))}
|
|
19
21
|
* />
|
package/dist/types/components/elements/verdocs-envelope-sidebar/verdocs-envelope-sidebar.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VerdocsEndpoint } from '@verdocs/js-sdk';
|
|
2
2
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
3
3
|
import { SDKError } from '../../../utils/errors';
|
|
4
|
-
import { IRecipient } from '@verdocs/js-sdk/Envelopes/Types';
|
|
4
|
+
import { IEnvelope, IRecipient } from '@verdocs/js-sdk/Envelopes/Types';
|
|
5
5
|
interface IHistoryEntry {
|
|
6
6
|
icon: string;
|
|
7
7
|
message: string;
|
|
@@ -25,6 +25,14 @@ export declare class VerdocsEnvelopeSidebar {
|
|
|
25
25
|
* terminate the process, and the calling application should correct the condition and re-render the component.
|
|
26
26
|
*/
|
|
27
27
|
sdkError: EventEmitter<SDKError>;
|
|
28
|
+
/**
|
|
29
|
+
* Event fired when the envelope is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.
|
|
30
|
+
*/
|
|
31
|
+
envelopeUpdated: EventEmitter<{
|
|
32
|
+
endpoint: VerdocsEndpoint;
|
|
33
|
+
envelope: IEnvelope;
|
|
34
|
+
event: string;
|
|
35
|
+
}>;
|
|
28
36
|
activeTab: number;
|
|
29
37
|
panelOpen: boolean;
|
|
30
38
|
componentWillLoad(): void;
|
|
@@ -46,7 +46,7 @@ export declare class VerdocsSign {
|
|
|
46
46
|
envelope: IEnvelope;
|
|
47
47
|
}>;
|
|
48
48
|
/**
|
|
49
|
-
* Event fired when the envelope is updated in any way.
|
|
49
|
+
* Event fired when the envelope is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.
|
|
50
50
|
*/
|
|
51
51
|
envelopeUpdated: EventEmitter<{
|
|
52
52
|
endpoint: VerdocsEndpoint;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { VerdocsEndpoint } from '@verdocs/js-sdk';
|
|
2
|
+
import { IEnvelope } from '@verdocs/js-sdk/Envelopes/Types';
|
|
2
3
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
3
4
|
import { SDKError } from '../../../utils/errors';
|
|
4
5
|
/**
|
|
@@ -19,6 +20,14 @@ export declare class VerdocsView {
|
|
|
19
20
|
* terminate the process, and the calling application should correct the condition and re-render the component.
|
|
20
21
|
*/
|
|
21
22
|
sdkError: EventEmitter<SDKError>;
|
|
23
|
+
/**
|
|
24
|
+
* Event fired when the envelope is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.
|
|
25
|
+
*/
|
|
26
|
+
envelopeUpdated: EventEmitter<{
|
|
27
|
+
endpoint: VerdocsEndpoint;
|
|
28
|
+
envelope: IEnvelope;
|
|
29
|
+
event: string;
|
|
30
|
+
}>;
|
|
22
31
|
componentWillLoad(): void;
|
|
23
32
|
componentDidLoad(): Promise<void>;
|
|
24
33
|
handlePageRendered(e: any): void;
|
package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { VerdocsEndpoint } from '@verdocs/js-sdk';
|
|
2
|
+
import { TDocumentFieldType } from '@verdocs/js-sdk/Envelopes/Types';
|
|
2
3
|
import { IPage, ITemplate, ITemplateField } from '@verdocs/js-sdk/Templates/Types';
|
|
3
4
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
4
5
|
import { IDocumentPageInfo } from '../../../utils/Types';
|
|
5
6
|
import { SDKError } from '../../../utils/errors';
|
|
6
|
-
import { TDocumentFieldType } from '@verdocs/js-sdk/Envelopes/Types';
|
|
7
7
|
/**
|
|
8
8
|
* Displays a builder experience for laying out fields in a template. Note that this experience requires a large display area to
|
|
9
9
|
* present all of the required controls, so it is primarily intended to be used in desktop environments.
|
|
@@ -30,6 +30,14 @@ export declare class VerdocsTemplateFields {
|
|
|
30
30
|
* terminate the process, and the calling application should correct the condition and re-render the component.
|
|
31
31
|
*/
|
|
32
32
|
sdkError: EventEmitter<SDKError>;
|
|
33
|
+
/**
|
|
34
|
+
* Event fired when the template is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.
|
|
35
|
+
*/
|
|
36
|
+
templateUpdated: EventEmitter<{
|
|
37
|
+
endpoint: VerdocsEndpoint;
|
|
38
|
+
template: ITemplate;
|
|
39
|
+
event: string;
|
|
40
|
+
}>;
|
|
33
41
|
placing: TDocumentFieldType | null;
|
|
34
42
|
selectedRoleName: string;
|
|
35
43
|
pageHeights: Record<number, number>;
|
package/dist/types/components/templates/verdocs-template-recipients/verdocs-template-recipients.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { VerdocsEndpoint } from '@verdocs/js-sdk';
|
|
2
|
+
import { ITemplate } from '@verdocs/js-sdk/Templates/Types';
|
|
2
3
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
3
4
|
import { SDKError } from '../../../utils/errors';
|
|
4
5
|
/**
|
|
@@ -22,16 +23,24 @@ export declare class VerdocsTemplateRecipients {
|
|
|
22
23
|
* Event fired when the user cancels the dialog.
|
|
23
24
|
*/
|
|
24
25
|
cancel: EventEmitter;
|
|
25
|
-
sequences: number[];
|
|
26
26
|
/**
|
|
27
27
|
* Event fired if an error occurs. The event details will contain information about the error. Most errors will
|
|
28
28
|
* terminate the process, and the calling application should correct the condition and re-render the component.
|
|
29
29
|
*/
|
|
30
30
|
sdkError: EventEmitter<SDKError>;
|
|
31
|
+
/**
|
|
32
|
+
* Event fired when the template is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.
|
|
33
|
+
*/
|
|
34
|
+
templateUpdated: EventEmitter<{
|
|
35
|
+
endpoint: VerdocsEndpoint;
|
|
36
|
+
template: ITemplate;
|
|
37
|
+
event: string;
|
|
38
|
+
}>;
|
|
31
39
|
showingRoleDialog: string | null;
|
|
32
40
|
showingSenderDialog: boolean;
|
|
33
41
|
sender: any;
|
|
34
42
|
forceRerender: number;
|
|
43
|
+
sequences: number[];
|
|
35
44
|
componentWillLoad(): Promise<void>;
|
|
36
45
|
componentDidRender(): void;
|
|
37
46
|
handleCancel(e: any): void;
|
|
@@ -1668,6 +1668,10 @@ declare namespace LocalJSX {
|
|
|
1668
1668
|
* The envelope ID to render. Set ONE OF templateId or envelopeId. If both are set, envelopeId will be ignored.
|
|
1669
1669
|
*/
|
|
1670
1670
|
"envelopeId"?: string;
|
|
1671
|
+
/**
|
|
1672
|
+
* Event fired when the envelope is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.
|
|
1673
|
+
*/
|
|
1674
|
+
"onEnvelopeUpdated"?: (event: VerdocsEnvelopeSidebarCustomEvent<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>) => void;
|
|
1671
1675
|
/**
|
|
1672
1676
|
* Event fired if an error occurs. The event details will contain information about the error. Most errors will terminate the process, and the calling application should correct the condition and re-render the component.
|
|
1673
1677
|
*/
|
|
@@ -2286,7 +2290,7 @@ declare namespace LocalJSX {
|
|
|
2286
2290
|
*/
|
|
2287
2291
|
"onEnvelopeLoaded"?: (event: VerdocsSignCustomEvent<{endpoint: VerdocsEndpoint; envelope: IEnvelope}>) => void;
|
|
2288
2292
|
/**
|
|
2289
|
-
* Event fired when the envelope is updated in any way.
|
|
2293
|
+
* Event fired when the envelope is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.
|
|
2290
2294
|
*/
|
|
2291
2295
|
"onEnvelopeUpdated"?: (event: VerdocsSignCustomEvent<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>) => void;
|
|
2292
2296
|
/**
|
|
@@ -2419,6 +2423,10 @@ declare namespace LocalJSX {
|
|
|
2419
2423
|
* Event fired if an error occurs. The event details will contain information about the error. Most errors will terminate the process, and the calling application should correct the condition and re-render the component.
|
|
2420
2424
|
*/
|
|
2421
2425
|
"onSdkError"?: (event: VerdocsTemplateFieldsCustomEvent<SDKError>) => void;
|
|
2426
|
+
/**
|
|
2427
|
+
* Event fired when the template is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.
|
|
2428
|
+
*/
|
|
2429
|
+
"onTemplateUpdated"?: (event: VerdocsTemplateFieldsCustomEvent<{endpoint: VerdocsEndpoint; template: ITemplate; event: string}>) => void;
|
|
2422
2430
|
/**
|
|
2423
2431
|
* The ID of the template to create the document from.
|
|
2424
2432
|
*/
|
|
@@ -2481,6 +2489,10 @@ declare namespace LocalJSX {
|
|
|
2481
2489
|
* Event fired if an error occurs. The event details will contain information about the error. Most errors will terminate the process, and the calling application should correct the condition and re-render the component.
|
|
2482
2490
|
*/
|
|
2483
2491
|
"onSdkError"?: (event: VerdocsTemplateRecipientsCustomEvent<SDKError>) => void;
|
|
2492
|
+
/**
|
|
2493
|
+
* Event fired when the template is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.
|
|
2494
|
+
*/
|
|
2495
|
+
"onTemplateUpdated"?: (event: VerdocsTemplateRecipientsCustomEvent<{endpoint: VerdocsEndpoint; template: ITemplate; event: string}>) => void;
|
|
2484
2496
|
/**
|
|
2485
2497
|
* The template ID to edit.
|
|
2486
2498
|
*/
|
|
@@ -2672,6 +2684,10 @@ declare namespace LocalJSX {
|
|
|
2672
2684
|
* The envelope ID to render. Set ONE OF templateId or envelopeId. If both are set, envelopeId will be ignored.
|
|
2673
2685
|
*/
|
|
2674
2686
|
"envelopeId"?: string;
|
|
2687
|
+
/**
|
|
2688
|
+
* Event fired when the envelope is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.
|
|
2689
|
+
*/
|
|
2690
|
+
"onEnvelopeUpdated"?: (event: VerdocsViewCustomEvent<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>) => void;
|
|
2675
2691
|
/**
|
|
2676
2692
|
* Event fired if an error occurs. The event details will contain information about the error. Most errors will terminate the process, and the calling application should correct the condition and re-render the component.
|
|
2677
2693
|
*/
|
|
@@ -25,7 +25,10 @@ export declare const getFieldSettings: (field: ITemplateField | IDocumentField)
|
|
|
25
25
|
* to be used for order-sensitive components e.g. translate-then-rotate.
|
|
26
26
|
*/
|
|
27
27
|
export declare const updateCssTransform: (el: HTMLElement, key: string, value: string) => void;
|
|
28
|
-
export declare const
|
|
28
|
+
export declare const formatLocalDate: (date: Date) => string;
|
|
29
|
+
export declare const saveAttachment: (endpoint: VerdocsEndpoint, envelope: IEnvelope, documentId: string) => Promise<void>;
|
|
30
|
+
export declare const saveCertificate: (endpoint: VerdocsEndpoint, envelope: IEnvelope, documentId: string) => Promise<void>;
|
|
31
|
+
export declare const saveEnvelopesAsZip: (endpoint: VerdocsEndpoint, envelopes: IEnvelope[]) => Promise<void>;
|
|
29
32
|
/**
|
|
30
33
|
* Throttle a given function by a delay value. Useful for things like resizeObserver.
|
|
31
34
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as i,h as t,H as s}from"./p-ff1278ed.js";import{V as n}from"./p-2d4712ea.js";import{g as a,s as o}from"./p-6619bc62.js";import{S as l}from"./p-7a1b2643.js";import{f as c}from"./p-ab01f71e.js";import"./p-21603661.js";import"./p-388b771c.js";import"./p-5ea05a1d.js";import"./p-b28ef4bb.js";const d={visibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>',pencil:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>',mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',done:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>',send:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>',gesture:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>',clear:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',check_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',cancel:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>',done_all:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>',create:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',perm_identity:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',people:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>',contact_email:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></svg>',textsms:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></svg>',verified_user:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M12.516 2.17a.75.75 0 00-1.032 0 11.209 11.209 0 01-7.877 3.08.75.75 0 00-.722.515A12.74 12.74 0 002.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 00.374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 00-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08zm3.094 8.016a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>',account_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>'},r=class{constructor(t){e(this,t),this.sdkError=i(this,"sdkError",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.endpoint=n.getDefault(),this.envelopeId="",this.activeTab=1,this.panelOpen=!1}componentWillLoad(){this.endpoint.loadSession()}async componentDidLoad(){var e,i,t;if(this.envelopeId)try{await a(this.endpoint,this.envelopeId)}catch(s){null===(e=this.sdkError)||void 0===e||e.emit(new l(s.message,null===(i=s.response)||void 0===i?void 0:i.status,null===(t=s.response)||void 0===t?void 0:t.data))}else console.error("[SIDEBAR] Missing required envelopeId")}setTab(e){this.panelOpen=e!==this.activeTab||!this.panelOpen,this.activeTab=e}canResendRecipient(e){return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(o.envelope.status)}canModifyRecipient(e){return!e.claimed&&!["declined","signed","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(o.envelope.status)}handleRecipientAction(e,i){var t;console.log("recipient action",i,e),null===(t=this.envelopeUpdated)||void 0===t||t.emit({endpoint:this.endpoint,envelope:o.envelope,event:i})}prepareHistoryEntries(){const e=[],i=o.envelope.histories||[];e.push({icon:"pencil",message:"Envelope created.",date:new Date(o.envelope.created_at)}),"complete"===o.envelope.status&&e.push({icon:"pencil",message:"Envelope completed.",date:new Date(o.envelope.updated_at)});const t=i.some((e=>"owner:canceled"===e.event));return"canceled"!==o.envelope.status||t||e.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date(o.envelope.canceled_at)}),i.forEach((i=>{const t=o.envelope.recipients.find((e=>e.role_name===i.role_name)),s=(null==t?void 0:t.full_name)||"";switch(i.event.toLowerCase()){case"recipient:signed":e.push({icon:"gesture",message:`Signed by ${s}.`,date:new Date(i.created_at)});break;case"recipient:declined":e.push({icon:"clear",message:`Declined by ${s}.`,date:new Date(i.created_at)});break;case"recipient:opened":switch(i.event_detail){case"email":case"mail":e.push({icon:"visibility",message:`Opened by ${s}, via email.`,date:new Date(i.created_at)});break;case"sms":e.push({icon:"visibility",message:`Opened by ${s}, via SMS.`,date:new Date(i.created_at)});break;case"in_person_link":e.push({icon:"visibility",message:`Opened by ${s}, via In-person link.`,date:new Date(i.created_at)});break;case"in_app":e.push({icon:"visibility",message:`Opened by ${s}, via dashboard.`,date:new Date(i.created_at)});break;default:e.push({icon:"visibility",message:`Opened by ${s}.`,date:new Date(i.created_at)})}break;case"recipient:submitted":switch(i.event_detail){case"approver":e.push({icon:"check_circle",message:`Approved by ${s}.`,date:new Date(i.created_at)});break;default:e.push({icon:"send",message:`Submitted by ${s}.`,date:new Date(i.created_at)})}break;case"recipient:prepared":e.push({icon:"send",message:`Prepared by ${s}.`,date:new Date(i.created_at)});break;case"recipient:claimed":"guest"===i.event_detail?e.push({icon:"account_circle",message:`${s} claimed the Verdoc as a guest.`,date:new Date(i.created_at)}):"profile"===i.event_detail&&e.push({icon:"verified_user",message:`${s} claimed the Verdoc as a verified user.`,date:new Date(i.created_at)});break;case"recipient:agreed":e.push({icon:"done",message:`${s} agreed to use electronic records and signatures.`,date:new Date(i.created_at)});break;case"recipient:invited":e.push("sms"===i.event_detail?{icon:"textsms",message:`${s} has been invited via SMS.`,date:new Date(i.created_at)}:{icon:"mail",message:`${s} has been invited via email.`,date:new Date(i.created_at)});break;case"invitation:resent":e.push({icon:"mail",message:`Invitation was resent to ${s} ${"reminder"===i.event_detail?" by reminder":""}.`,date:new Date(i.created_at)});break;case"envelope:cc":e.push({icon:"contact_mail",message:`A copy has been sent to ${s}.`,date:new Date(i.created_at)});break;case"recipient:delegated":e.push({icon:"people",message:i.event_detail,date:new Date(i.created_at)});break;case"recipient:updated_info":case"owner:updated_recipient_info":e.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"created":e.push({icon:"create",message:"Envelope was created.",date:new Date(i.created_at)});break;case"completed":e.push({icon:"done_all",message:"Envelope was completed.",date:new Date(i.created_at)});break;case"canceled":case"owner:canceled":e.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(i.created_at)});break;case"owner:get_in_person_link":e.push({icon:"link",message:`Owner accessed the In-person link for ${t}.`,date:new Date(i.created_at)});break;default:console.log("unknown",i)}})),e.sort(((e,i)=>i.date.getTime()-e.date.getTime())),e}render(){var e,i,n;if(!o.envelope)return t(s,null);const a=this.endpoint.getSession().profile_id===o.envelope.profile_id,l=this.prepareHistoryEntries();return t(s,{class:this.panelOpen?"open":"","data-r":o.updateCount},t("div",{class:"buttons"},t("button",{class:1===this.activeTab?"active":"",onClick:()=>this.setTab(1),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>'}),t("button",{class:2===this.activeTab?"active":"",onClick:()=>this.setTab(2),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>'}),t("button",{class:3===this.activeTab?"active":"",onClick:()=>this.setTab(3),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>'})),1===this.activeTab&&t("div",{class:"content"},t("div",{class:"title"},"Details"),t("div",{class:"label"},"Envelope ID"),t("div",{class:"value"},o.envelope.id),t("div",{class:"label"},"Date Created"),t("div",{class:"value"},c(new Date(o.envelope.created_at),"PP pp")),t("div",{class:"label"},"Last Modified"),t("div",{class:"value"},c(new Date(o.envelope.updated_at),"PP pp")),t("div",{class:"label"},"Status"),t("div",{class:"value"},o.envelope.status),t("div",{class:"label"},"Verdoc Owner UUID"),t("div",{class:"value"},o.envelope.profile_id),t("div",{class:"label"},"Verdoc Owner Name"),t("div",{class:"value"},null===(e=o.envelope.profile)||void 0===e?void 0:e.first_name," ",null===(i=o.envelope.profile)||void 0===i?void 0:i.last_name),t("div",{class:"label"},"Verdoc Owner Email"),t("div",{class:"value"},null===(n=o.envelope.profile)||void 0===n?void 0:n.email)),2===this.activeTab&&t("div",{class:"content"},t("div",{class:"title"},"Recipients"),o.envelope.recipients.map(((e,i)=>t("div",{class:"recipient-detail"},t("div",{class:"recipient-header"},t("div",{class:"recipient-number"},i+1),t("div",{class:"recipient-type"},e.type),t("div",{class:{"recipient-status":!0,[e.status]:!0}},e.status),a&&t("verdocs-dropdown",{onOptionSelected:i=>this.handleRecipientAction(e,i.detail.id),options:[{id:"reminder",label:"Send Reminder",disabled:!this.canResendRecipient(e)},{id:"modify",label:"Modify Recipient",disabled:!this.canModifyRecipient(e)},{id:"inperson",label:"Get In-Person Link",disabled:!this.canModifyRecipient(e)||!["invited","opened"].includes(e.status)}]})),t("dic",{class:"recipient-content"},t("div",{class:"recipient-name"},e.full_name),t("div",{class:"recipient-name"},e.email),t("div",{class:"recipient-name"},e.phone)))))),3===this.activeTab&&t("div",{class:"content"},t("div",{class:"title"},"History"),l.map((e=>t("div",{class:"history-entry"},t("div",{class:"activity-icon",innerHTML:d[e.icon]||e.icon}),t("div",{class:"activity-details"},t("div",{class:"activity-text"},e.message),t("div",{class:"activity-date"},c(e.date,"PP pp"))))))))}};r.style='verdocs-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;width:400px}verdocs-envelope-sidebar .buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .buttons button{height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .title{margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400;-ms-flex:0;flex:0}verdocs-envelope-sidebar .label{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54);-ms-flex:0;flex:0}verdocs-envelope-sidebar .value{margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff;-ms-flex:0;flex:0}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}';export{r as verdocs_envelope_sidebar}
|
|
@@ -0,0 +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-97329951.system.js","./p-05eb4fed.system.js","./p-38d00c38.system.js","./p-5b62f239.system.js","./p-e764098e.system.js","./p-af2c2f79.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js","./p-0f6da8c7.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(){},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.field=null;this.disabled=false;this.editable=false;this.moveable=false;this.done=false;this.roleindex=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("h6",null,"Field Settings"),i("verdocs-template-field-properties",{templateId:a.templateId,fieldName:this.field.name,onClose:function(){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}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r["throw"](e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,o&&(i=a[0]&2?o["return"]:a[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;if(o=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;o=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){n.label=a[1];break}if(a[0]===6&&n.label<i[1]){n.label=i[1];i=a;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(a);break}if(i[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];o=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-97329951.system.js","./p-05eb4fed.system.js","./p-38d00c38.system.js","./p-5b62f239.system.js","./p-e764098e.system.js","./p-af2c2f79.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js","./p-0f6da8c7.system.js","./p-d50523fd.system.js"],(function(e){"use strict";var t,n,r,o,i,a,s;return{setters:[function(e){t=e.r;n=e.c;r=e.h;o=e.H},function(e){i=e.g},function(e){a=e.g},function(e){s=e.s},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var l='verdocs-field-dropdown{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:85px;height:20px;display:block;font-size:11px;position:relative;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-dropdown.disabled{opacity:0.5}verdocs-field-dropdown select{position:absolute;background:linear-gradient(55deg, transparent 50%, #333 50%), linear-gradient(125deg, #333 50%, transparent 50%), linear-gradient(to right, transparent, transparent);background-position:calc(100% - 7px) 4px, calc(100% - 3px) 4px, 100% 0;background-size:5px 5px, 5px 5px, 2.5em 2.5em;background-repeat:no-repeat;-webkit-appearance:none;-moz-appearance:none;appearance:none;-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%;font-size:11px;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-dropdown select:focus{outline:none}verdocs-field-dropdown select.hide{display:none}verdocs-field-dropdown.required select{border:1px solid #cc0000}verdocs-field-dropdown.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}';var d=e("verdocs_field_dropdown",function(){function e(e){t(this,e);this.fieldChange=n(this,"fieldChange",7);this.settingsChanged=n(this,"settingsChanged",7);this.field=null;this.disabled=false;this.roleindex=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.handleChange=function(e){this.fieldChange.emit(e.target.value)};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()}s.updateCount++;return[2]}))}))};e.prototype.render=function(){var e=this;var t,n;var s=a(this.field);var l=(n=(t=this.disabled)!==null&&t!==void 0?t:s.disabled)!==null&&n!==void 0?n:false;var d=this.field["rgba"]||i(this.roleindex);return r(o,{class:{required:s.required,disabled:l},style:{backgroundColor:d}},r("select",{tabIndex:s.order,disabled:l,ref:function(t){return e.el=t},onChange:function(t){return e.handleChange(t)}},r("option",{value:""},"Select..."),(s.options||[]).map((function(e){return r("option",{value:e.id,selected:e.value===s.value},e.value)}))))};return e}());d.style=l}}}));
|