@verdocs/web-sdk 1.10.6 → 1.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/verdocs-template-recipients.cjs.entry.js +5 -3
- package/dist/collection/components/templates/verdocs-template-recipients/verdocs-template-recipients.css +11 -0
- package/dist/collection/components/templates/verdocs-template-recipients/verdocs-template-recipients.js +18 -2
- package/dist/collection/components/templates/verdocs-template-recipients/verdocs-template-recipients.stories.js +5 -4
- package/dist/components/verdocs-template-recipients.js +5 -3
- package/dist/custom-elements.json +1361 -0
- package/dist/docs.json +10 -1
- package/dist/esm/verdocs-template-recipients.entry.js +5 -3
- package/dist/esm-es5/verdocs-template-recipients.entry.js +1 -1
- package/dist/types/components/templates/verdocs-template-recipients/verdocs-template-recipients.d.ts +4 -0
- package/dist/types/components/templates/verdocs-template-recipients/verdocs-template-recipients.stories.d.ts +3 -2
- package/dist/types/components.d.ts +4 -0
- package/dist/verdocs-web-sdk/p-53198827.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-7bc5fc1e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-c16b6ca4.system.js +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/verdocs-web-sdk/p-e179e3de.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f69cdc41.entry.js +0 -1
package/dist/docs.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2023-02-
|
|
2
|
+
"timestamp": "2023-02-10T14:29:02",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "2.20.0",
|
|
@@ -5618,6 +5618,15 @@
|
|
|
5618
5618
|
"docs": "Event fired when the user cancels the dialog.",
|
|
5619
5619
|
"docsTags": []
|
|
5620
5620
|
},
|
|
5621
|
+
{
|
|
5622
|
+
"event": "next",
|
|
5623
|
+
"detail": "any",
|
|
5624
|
+
"bubbles": true,
|
|
5625
|
+
"cancelable": true,
|
|
5626
|
+
"composed": true,
|
|
5627
|
+
"docs": "Event fired when the user clicks to proceed.",
|
|
5628
|
+
"docsTags": []
|
|
5629
|
+
},
|
|
5621
5630
|
{
|
|
5622
5631
|
"event": "sdkError",
|
|
5623
5632
|
"detail": "SDKError",
|
|
@@ -14,7 +14,7 @@ import './Templates-8e4ab976.js';
|
|
|
14
14
|
import './Envelopes-130fd6ea.js';
|
|
15
15
|
import './Files-70a192df.js';
|
|
16
16
|
|
|
17
|
-
const 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 ::-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}";
|
|
17
|
+
const 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}";
|
|
18
18
|
|
|
19
19
|
const senderLabels = {
|
|
20
20
|
[TemplateSenderTypes.EVERYONE]: 'Everyone',
|
|
@@ -34,6 +34,7 @@ const iconCC = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill
|
|
|
34
34
|
const VerdocsTemplateRecipients = class {
|
|
35
35
|
constructor(hostRef) {
|
|
36
36
|
registerInstance(this, hostRef);
|
|
37
|
+
this.next = createEvent(this, "next", 7);
|
|
37
38
|
this.cancel = createEvent(this, "cancel", 7);
|
|
38
39
|
this.sdkError = createEvent(this, "sdkError", 7);
|
|
39
40
|
this.sequences = [];
|
|
@@ -155,7 +156,9 @@ const VerdocsTemplateRecipients = class {
|
|
|
155
156
|
(_a = this.cancel) === null || _a === void 0 ? void 0 : _a.emit();
|
|
156
157
|
}
|
|
157
158
|
handleSubmit(e) {
|
|
159
|
+
var _a;
|
|
158
160
|
e.stopPropagation();
|
|
161
|
+
(_a = this.next) === null || _a === void 0 ? void 0 : _a.emit();
|
|
159
162
|
}
|
|
160
163
|
sortTemplateRoles() {
|
|
161
164
|
state.template.roles.sort((a, b) => {
|
|
@@ -225,13 +228,12 @@ const VerdocsTemplateRecipients = class {
|
|
|
225
228
|
});
|
|
226
229
|
}
|
|
227
230
|
render() {
|
|
228
|
-
// console.log('Roles', JSON.parse(JSON.stringify(TemplateStore.template.roles)));
|
|
229
231
|
const roleNames = state.template.roles.map(role => role.name);
|
|
230
232
|
return (h(Host, null, h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off", "data-r": this.forceRerender }, h("h5", null, "Recipients"), 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: () => (this.showingSenderDialog = true), "aria-role": "button" })))), h("div", { class: "row add-sequence", "data-sequence": 0 }, h("div", { class: "icon", innerHTML: plusIcon }), h("div", { class: "row-recipients" }, h("div", { class: "dropzone", "data-sequence": 0, "data-order": 1 }, "Add Step"))), this.sequences.map(sequence => (h(Fragment, null, h("div", { class: "row" }, h("div", { class: "icon", innerHTML: stepIcon }), h("div", { class: "row-recipients" }, h("div", { class: "dropzone", "data-order": 0.5, "data-sequence": sequence }), state.template.roles
|
|
231
233
|
.filter(role => role.sequence === sequence)
|
|
232
234
|
.map(role => {
|
|
233
235
|
return (h(Fragment, null, h("div", { class: "recipient", style: { backgroundColor: getRGBA(getRoleIndex(roleNames, role.name)) }, "data-rolename": role.name }, h("span", { class: "type-icon", innerHTML: role.type === 'signer' ? iconSigner : role.type === 'cc' ? iconCC : iconApprover }), role.name, " ", h("div", { class: "settings-button", innerHTML: settingsIcon, onClick: () => (this.showingRoleDialog = role.name), "aria-role": "button" })), h("div", { class: "dropzone", "data-order": role.order + 0.5, "data-sequence": sequence })));
|
|
234
|
-
}), h("button", { class: "add-role", innerHTML: plusIcon, onClick: e => this.handleAddRole(e, sequence) }))), h("div", { class: "row add-sequence", "data-sequence": sequence }, h("div", { class: "row-recipients" }, h("div", { class: "icon", innerHTML: plusIcon }), h("div", { class: "dropzone", "data-sequence": sequence + 1, "data-order": 1 }, "Add Step")))))), h("div", { class: "row" }, h("div", { class: "icon", innerHTML: doneIcon }), h("div", { class: "row-recipients" }, h("div", { class: "complete" }, "Document Complete")))), h("div", { class: "buttons" }, h("div", { class: "flex-fill" }), h("verdocs-button", { variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e) }), h("verdocs-button", { label: "OK", size: "small", onClick: e => this.handleSubmit(e) }))), this.showingRoleDialog && (h("verdocs-template-role-properties", { endpoint: this.endpoint, templateId: this.templateId, roleName: this.showingRoleDialog, onClose: () => {
|
|
236
|
+
}), h("button", { class: "add-role", innerHTML: plusIcon, onClick: e => this.handleAddRole(e, sequence) }))), h("div", { class: "row add-sequence", "data-sequence": sequence }, h("div", { class: "row-recipients" }, h("div", { class: "icon", innerHTML: plusIcon }), h("div", { class: "dropzone", "data-sequence": sequence + 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: e => this.handleAddRole(e, 1) }))))), h("div", { class: "row" }, h("div", { class: "icon", innerHTML: doneIcon }), h("div", { class: "row-recipients" }, h("div", { class: "complete" }, "Document Complete")))), roleNames.length < 1 && (h("div", { class: "empty" }, "You must add at least one Role before proceeding.", h("br", null), " Click the ", h("span", { innerHTML: plusIcon }), " Add button above to get started.")), h("div", { class: "buttons" }, h("div", { class: "flex-fill" }), h("verdocs-button", { variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e) }), h("verdocs-button", { label: "OK", size: "small", onClick: e => this.handleSubmit(e), disabled: roleNames.length < 1 }))), this.showingRoleDialog && (h("verdocs-template-role-properties", { endpoint: this.endpoint, templateId: this.templateId, roleName: this.showingRoleDialog, onClose: () => {
|
|
235
237
|
this.showingRoleDialog = null;
|
|
236
238
|
this.forceRerender++;
|
|
237
239
|
}, onDelete: e => {
|
|
@@ -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-7595bdbf.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 ::-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.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)];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){e.stopPropagation()};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,"Recipients"),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"))))})),h("div",{class:"row"},h("div",{class:"icon",innerHTML:doneIcon}),h("div",{class:"row-recipients"},h("div",{class:"complete"},"Document Complete")))),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)}}))),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-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-7595bdbf.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)];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,"Recipients"),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};
|
package/dist/types/components/templates/verdocs-template-recipients/verdocs-template-recipients.d.ts
CHANGED
|
@@ -14,6 +14,10 @@ export declare class VerdocsTemplateRecipients {
|
|
|
14
14
|
* The template ID to edit.
|
|
15
15
|
*/
|
|
16
16
|
templateId: string;
|
|
17
|
+
/**
|
|
18
|
+
* Event fired when the user clicks to proceed.
|
|
19
|
+
*/
|
|
20
|
+
next: EventEmitter;
|
|
17
21
|
/**
|
|
18
22
|
* Event fired when the user cancels the dialog.
|
|
19
23
|
*/
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Meta } from '@storybook/web-components';
|
|
2
2
|
declare const _default: Meta<import("@storybook/web-components").Args>;
|
|
3
3
|
export default _default;
|
|
4
|
-
export declare const Recipients: ({ templateId,
|
|
4
|
+
export declare const Recipients: ({ templateId, onCancel, onSave }: {
|
|
5
5
|
templateId: any;
|
|
6
|
-
|
|
6
|
+
onCancel: any;
|
|
7
|
+
onSave: any;
|
|
7
8
|
}) => import("lit-html").TemplateResult<1>;
|
|
@@ -2473,6 +2473,10 @@ declare namespace LocalJSX {
|
|
|
2473
2473
|
* Event fired when the user cancels the dialog.
|
|
2474
2474
|
*/
|
|
2475
2475
|
"onCancel"?: (event: VerdocsTemplateRecipientsCustomEvent<any>) => void;
|
|
2476
|
+
/**
|
|
2477
|
+
* Event fired when the user clicks to proceed.
|
|
2478
|
+
*/
|
|
2479
|
+
"onNext"?: (event: VerdocsTemplateRecipientsCustomEvent<any>) => void;
|
|
2476
2480
|
/**
|
|
2477
2481
|
* 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.
|
|
2478
2482
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as i,F as o,H as s,a as r}from"./p-ff1278ed.js";import{i as a}from"./p-4f12a8a7.js";import{u as l,c as n}from"./p-ffe60abd.js";import{V as p,T as d}from"./p-2d4712ea.js";import{g as c}from"./p-6de76553.js";import{s as m}from"./p-3cb8a7f4.js";import{l as f}from"./p-d1393a1a.js";import{a as h}from"./p-d6e07c20.js";import{S as x}from"./p-7a1b2643.js";import"./p-21603661.js";import"./p-5ea05a1d.js";import"./p-7291906c.js";import"./p-b28ef4bb.js";import"./p-880b619d.js";import"./p-aa124212.js";const v={[d.EVERYONE]:"Everyone",[d.EVERYONE_AS_CREATOR]:"Everyone as Me",[d.ORGANIZATION_MEMBER]:"Organization member",[d.ORGANIZATION_MEMBER_AS_CREATOR]:"Organization Member as Me",[d.CREATOR]:"Me"},g='<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>',u='<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>',b='<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>',w=class{constructor(i){e(this,i),this.next=t(this,"next",7),this.cancel=t(this,"cancel",7),this.sdkError=t(this,"sdkError",7),this.sequences=[],this.endpoint=p.getDefault(),this.templateId="",this.showingRoleDialog=null,this.showingSenderDialog=!1,this.sender=null,this.forceRerender=1}async componentWillLoad(){var e,t,i,o,s,r;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[RECIPIENTS] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[RECIPIENTS] Unable to start builder session, must be authenticated");try{console.log(`[RECIPIENTS] Loading template ${this.templateId}`,this.endpoint.session),await f(this.endpoint,this.templateId)}catch(o){console.log("[RECIPIENTS] Error loading template",o),null===(e=this.sdkError)||void 0===e||e.emit(new x(o.message,null===(t=o.response)||void 0===t?void 0:t.status,null===(i=o.response)||void 0===i?void 0:i.data))}this.sortTemplateRoles(),this.renumberTemplateRoles()}catch(e){console.log("[FIELDS] Error with preview session",e),null===(o=this.sdkError)||void 0===o||o.emit(new x(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(r=e.response)||void 0===r?void 0:r.data))}}componentDidRender(){a.dynamicDrop(!0),a(".recipient").draggable({listeners:{start:function(e){e.target.classList.add("dragging"),this.el.classList.add("dragging")}.bind(this),move:function(e){const t=+(e.target.getAttribute("posX")||0),i=+(e.target.getAttribute("posY")||0),o=e.dx+t,s=e.dy+i;e.target.setAttribute("posX",o),e.target.setAttribute("posy",s),e.target.style.transform=`translate(${o+100}px, ${s-40}px)`}.bind(this),end:function(e){e.target.classList.remove("dragging"),this.el.classList.remove("dragging"),e.target.setAttribute("posX",0),e.target.setAttribute("posy",0),e.target.style.transform="translate(0px, 0px)"}.bind(this)}}),a(".dropzone").dropzone({overlap:.05,ondrop:function(e){e.target.classList.remove("active");const t=e.relatedTarget.dataset.rolename,i=+e.target.dataset.sequence,o=+e.target.dataset.order,s=m.template.roles.find((e=>e.name===t));s&&(s.sequence=i,s.order=o,this.sortTemplateRoles(),this.renumberTemplateRoles(),this.forceRerender++,Promise.all(m.template.roles.map((e=>l(this.endpoint,this.templateId,e.name,{sequence:e.sequence,order:e.order})))).then((()=>console.log("[RECIPIENTS] Updated roles"))).catch((e=>console.log("[RECIPIENTS] Role updates failed",e))))}.bind(this),ondropactivate:e=>{e.target.classList.add("visible")},ondropdeactivate:e=>{e.target.classList.remove("visible")},ondragenter:e=>{e.target.classList.add("active")},ondragleave:e=>{e.target.classList.remove("active")}})}handleCancel(e){var t;e.stopPropagation(),null===(t=this.cancel)||void 0===t||t.emit()}handleSubmit(e){var t;e.stopPropagation(),null===(t=this.next)||void 0===t||t.emit()}sortTemplateRoles(){m.template.roles.sort(((e,t)=>e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence))}extractSequenceNumbers(){this.sequences=[],m.template.roles.forEach((e=>{this.sequences.includes(e.sequence)||this.sequences.push(e.sequence)}))}renumberTemplateRoles(){this.extractSequenceNumbers();const e=[];this.sequences.sort(((e,t)=>e-t)),this.sequences.forEach(((t,i)=>{m.template.roles.filter((e=>e.sequence===t)).forEach(((t,o)=>{e.includes(t.name)||(t.sequence=i+1,t.order=o+1,e.push(t.name))}))})),this.extractSequenceNumbers()}handleAddRole(e,t){e.stopPropagation();const i=m.template.roles.filter((e=>e.sequence===t)).length+1;let o="",s=m.template.roles.length;do{s++,o=`Recipient ${s}`}while(!o||m.template.roles.some((e=>e.name===o)));console.log("Will create",o,t,i),n(this.endpoint,this.templateId,{template_id:this.templateId,name:o,full_name:"",email:"",phone:"",sequence:t,order:i,type:"signer",delegator:!1}).then((e=>{console.log("Created role",e),m.template.roles.push(e),this.renumberTemplateRoles(),this.forceRerender++})).catch((e=>{console.log("Error creating role",e)}))}render(){const e=m.template.roles.map((e=>e.name));return i(s,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off","data-r":this.forceRerender},i("h5",null,"Recipients"),i("div",{class:"participants"},i("div",{class:"left-line"}),i("div",{class:"row"},i("div",{class:"icon",innerHTML:'<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>'}),i("div",{class:"row-recipients"},i("div",{class:"sender"},i("span",{class:"label"},"Sender:")," ",v[m.template.sender]," ",i("div",{class:"settings-button",innerHTML:g,onClick:()=>this.showingSenderDialog=!0,"aria-role":"button"})))),i("div",{class:"row add-sequence","data-sequence":0},i("div",{class:"icon",innerHTML:b}),i("div",{class:"row-recipients"},i("div",{class:"dropzone","data-sequence":0,"data-order":1},"Add Step"))),this.sequences.map((t=>i(o,null,i("div",{class:"row"},i("div",{class:"icon",innerHTML:u}),i("div",{class:"row-recipients"},i("div",{class:"dropzone","data-order":.5,"data-sequence":t}),m.template.roles.filter((e=>e.sequence===t)).map((s=>i(o,null,i("div",{class:"recipient",style:{backgroundColor:c(h(e,s.name))},"data-rolename":s.name},i("span",{class:"type-icon",innerHTML:"signer"===s.type?'<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>':"cc"===s.type?'<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>':'<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>'}),s.name," ",i("div",{class:"settings-button",innerHTML:g,onClick:()=>this.showingRoleDialog=s.name,"aria-role":"button"})),i("div",{class:"dropzone","data-order":s.order+.5,"data-sequence":t})))),i("button",{class:"add-role",innerHTML:b,onClick:e=>this.handleAddRole(e,t)}))),i("div",{class:"row add-sequence","data-sequence":t},i("div",{class:"row-recipients"},i("div",{class:"icon",innerHTML:b}),i("div",{class:"dropzone","data-sequence":t+1,"data-order":1},"Add Step")))))),this.sequences.length<1&&i(o,null,i("div",{class:"row"},i("div",{class:"icon",innerHTML:u}),i("div",{class:"row-recipients"},i("button",{class:"add-role",innerHTML:b,onClick:e=>this.handleAddRole(e,1)})))),i("div",{class:"row"},i("div",{class:"icon",innerHTML:'<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>'}),i("div",{class:"row-recipients"},i("div",{class:"complete"},"Document Complete")))),e.length<1&&i("div",{class:"empty"},"You must add at least one Role before proceeding.",i("br",null)," Click the ",i("span",{innerHTML:b})," Add button above to get started."),i("div",{class:"buttons"},i("div",{class:"flex-fill"}),i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e)}),i("verdocs-button",{label:"OK",size:"small",onClick:e=>this.handleSubmit(e),disabled:e.length<1}))),this.showingRoleDialog&&i("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:()=>{this.showingRoleDialog=null,this.forceRerender++},onDelete:e=>{console.log("deleted",e.detail),this.renumberTemplateRoles(),this.showingRoleDialog=null,this.forceRerender++}}),this.showingSenderDialog&&i("verdocs-template-sender",{endpoint:this.endpoint,templateId:this.templateId,onClose:()=>this.showingSenderDialog=!1}))}get el(){return r(this)}};w.style='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}';export{w as verdocs_template_recipients}
|
|
@@ -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 s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r["throw"](e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}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,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;o=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){n.label=s[1];break}if(s[0]===6&&n.label<i[1]){n.label=i[1];i=s;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(s);break}if(i[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];o=0}finally{r=i=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-d122cadd.system.js","./p-fbc81799.system.js","./p-261dcea1.system.js","./p-05eb4fed.system.js","./p-5b62f239.system.js","./p-7067adce.system.js","./p-e090d5e1.system.js","./p-187b20b7.system.js","./p-af2c2f79.system.js","./p-0f6da8c7.system.js","./p-d50523fd.system.js","./p-69912cbf.system.js","./p-e0cfad01.system.js","./p-327858f0.system.js"],(function(e){"use strict";var t,n,r,o,i,s,a,l,c,p,d,u,f,m,g,v;return{setters:[function(e){t=e.r;n=e.c;r=e.h;o=e.F;i=e.H;s=e.a},function(e){a=e.i},function(e){l=e.u;c=e.c},function(e){p=e.V;d=e.T},function(e){u=e.g},function(e){f=e.s},function(e){m=e.l},function(e){g=e.a},function(e){v=e.S},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var h;var x='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 b=(h={},h[d.EVERYONE]="Everyone",h[d.EVERYONE_AS_CREATOR]="Everyone as Me",h[d.ORGANIZATION_MEMBER]="Organization member",h[d.ORGANIZATION_MEMBER_AS_CREATOR]="Organization Member as Me",h[d.CREATOR]="Me",h);var w='<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 y='<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 q='<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 R='<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 z='<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 k='<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 E='<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 L='<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 T=e("verdocs_template_recipients",function(){function e(e){t(this,e);this.next=n(this,"next",7);this.cancel=n(this,"cancel",7);this.sdkError=n(this,"sdkError",7);this.sequences=[];this.endpoint=p.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,n,r,o,i,s,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,m(this.endpoint,this.templateId)];case 2:l.sent();return[3,4];case 3:s=l.sent();console.log("[RECIPIENTS] Error loading template",s);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new v(s.message,(t=s.response)===null||t===void 0?void 0:t.status,(n=s.response)===null||n===void 0?void 0:n.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);(r=this.sdkError)===null||r===void 0?void 0:r.emit(new v(a.message,(o=a.response)===null||o===void 0?void 0:o.status,(i=a.response)===null||i===void 0?void 0:i.data));return[3,6];case 6:return[2]}}))}))};e.prototype.componentDidRender=function(){a.dynamicDrop(true);a(".recipient").draggable({listeners:{start:function e(t){t.target.classList.add("dragging");this.el.classList.add("dragging")}.bind(this),move:function e(t){var n=+(t.target.getAttribute("posX")||0);var r=+(t.target.getAttribute("posY")||0);var o=t.dx+n;var i=t.dy+r;t.target.setAttribute("posX",o);t.target.setAttribute("posy",i);t.target.style.transform="translate(".concat(o+100,"px, ").concat(i-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)}});a(".dropzone").dropzone({overlap:.05,ondrop:function e(t){var n=this;t.target.classList.remove("active");var r=t.relatedTarget.dataset.rolename;var o=+t.target.dataset.sequence;var i=+t.target.dataset.order;var s=f.template.roles.find((function(e){return e.name===r}));if(s){s.sequence=o;s.order=i;this.sortTemplateRoles();this.renumberTemplateRoles();this.forceRerender++;Promise.all(f.template.roles.map((function(e){return l(n.endpoint,n.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(){f.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=[];f.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,n){f.template.roles.filter((function(e){return e.sequence===t})).forEach((function(t,r){if(!e.includes(t.name)){t.sequence=n+1;t.order=r+1;e.push(t.name)}}))}));this.extractSequenceNumbers()};e.prototype.handleAddRole=function(e,t){var n=this;e.stopPropagation();var r=f.template.roles.filter((function(e){return e.sequence===t})).length+1;var o="";var i=f.template.roles.length;do{i++;o="Recipient ".concat(i)}while(!o||f.template.roles.some((function(e){return e.name===o})));console.log("Will create",o,t,r);c(this.endpoint,this.templateId,{template_id:this.templateId,name:o,full_name:"",email:"",phone:"",sequence:t,order:r,type:"signer",delegator:false}).then((function(e){console.log("Created role",e);f.template.roles.push(e);n.renumberTemplateRoles();n.forceRerender++})).catch((function(e){console.log("Error creating role",e)}))};e.prototype.render=function(){var e=this;var t=f.template.roles.map((function(e){return e.name}));return r(i,null,r("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off","data-r":this.forceRerender},r("h5",null,"Recipients"),r("div",{class:"participants"},r("div",{class:"left-line"}),r("div",{class:"row"},r("div",{class:"icon",innerHTML:y}),r("div",{class:"row-recipients"},r("div",{class:"sender"},r("span",{class:"label"},"Sender:")," ",b[f.template.sender]," ",r("div",{class:"settings-button",innerHTML:w,onClick:function(){return e.showingSenderDialog=true},"aria-role":"button"})))),r("div",{class:"row add-sequence","data-sequence":0},r("div",{class:"icon",innerHTML:z}),r("div",{class:"row-recipients"},r("div",{class:"dropzone","data-sequence":0,"data-order":1},"Add Step"))),this.sequences.map((function(n){return r(o,null,r("div",{class:"row"},r("div",{class:"icon",innerHTML:q}),r("div",{class:"row-recipients"},r("div",{class:"dropzone","data-order":.5,"data-sequence":n}),f.template.roles.filter((function(e){return e.sequence===n})).map((function(i){return r(o,null,r("div",{class:"recipient",style:{backgroundColor:u(g(t,i.name))},"data-rolename":i.name},r("span",{class:"type-icon",innerHTML:i.type==="signer"?k:i.type==="cc"?L:E}),i.name," ",r("div",{class:"settings-button",innerHTML:w,onClick:function(){return e.showingRoleDialog=i.name},"aria-role":"button"})),r("div",{class:"dropzone","data-order":i.order+.5,"data-sequence":n}))})),r("button",{class:"add-role",innerHTML:z,onClick:function(t){return e.handleAddRole(t,n)}}))),r("div",{class:"row add-sequence","data-sequence":n},r("div",{class:"row-recipients"},r("div",{class:"icon",innerHTML:z}),r("div",{class:"dropzone","data-sequence":n+1,"data-order":1},"Add Step"))))})),this.sequences.length<1&&r(o,null,r("div",{class:"row"},r("div",{class:"icon",innerHTML:q}),r("div",{class:"row-recipients"},r("button",{class:"add-role",innerHTML:z,onClick:function(t){return e.handleAddRole(t,1)}})))),r("div",{class:"row"},r("div",{class:"icon",innerHTML:R}),r("div",{class:"row-recipients"},r("div",{class:"complete"},"Document Complete")))),t.length<1&&r("div",{class:"empty"},"You must add at least one Role before proceeding.",r("br",null)," Click the ",r("span",{innerHTML:z})," Add button above to get started."),r("div",{class:"buttons"},r("div",{class:"flex-fill"}),r("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),r("verdocs-button",{label:"OK",size:"small",onClick:function(t){return e.handleSubmit(t)},disabled:t.length<1}))),this.showingRoleDialog&&r("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&&r("verdocs-template-sender",{endpoint:this.endpoint,templateId:this.templateId,onClose:function(){return e.showingSenderDialog=false}}))};Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());T.style=x}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-97329951.system.js"],(function(e,t){"use strict";var s,d;return{setters:[function(e){s=e.p;d=e.b}],execute:function(){var e=function(){var e=t.meta.url;var d={};if(e!==""){d.resourcesUrl=new URL(".",e).href}return s(d)};e().then((function(e){return d([["p-875f9455.system",[[0,"verdocs-field-initial",{field:[16],disabled:[4],initials:[1],editable:[4],moveable:[4],done:[4],roleindex:[2],tempInitials:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-996008f6.system",[[0,"verdocs-field-signature",{field:[16],name:[1],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],tempSignature:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-34efc869.system",[[0,"verdocs-build",{endpoint:[16],templateId:[1,"template-id"],step:[32],pdfUrl:[32],template:[32]}]]],["p-c86a40a3.system",[[0,"verdocs-field-checkbox",{field:[16],option:[2],disabled:[4],done:[4],roleindex:[2],editable:[4],moveable:[4],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-b39df234.system",[[0,"verdocs-field-date",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],containerId:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-36fd1c28.system",[[0,"verdocs-field-radio-button",{field:[16],option:[2],disabled:[4],done:[4],roleindex:[2],editable:[4],moveable:[4],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-19f6e8c8.system",[[0,"verdocs-field-textarea",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-628aef1d.system",[[0,"verdocs-field-textbox",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-b40a50a8.system",[[0,"verdocs-field-timestamp",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-
|
|
1
|
+
System.register(["./p-97329951.system.js"],(function(e,t){"use strict";var s,d;return{setters:[function(e){s=e.p;d=e.b}],execute:function(){var e=function(){var e=t.meta.url;var d={};if(e!==""){d.resourcesUrl=new URL(".",e).href}return s(d)};e().then((function(e){return d([["p-875f9455.system",[[0,"verdocs-field-initial",{field:[16],disabled:[4],initials:[1],editable:[4],moveable:[4],done:[4],roleindex:[2],tempInitials:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-996008f6.system",[[0,"verdocs-field-signature",{field:[16],name:[1],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],tempSignature:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-34efc869.system",[[0,"verdocs-build",{endpoint:[16],templateId:[1,"template-id"],step:[32],pdfUrl:[32],template:[32]}]]],["p-c86a40a3.system",[[0,"verdocs-field-checkbox",{field:[16],option:[2],disabled:[4],done:[4],roleindex:[2],editable:[4],moveable:[4],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-b39df234.system",[[0,"verdocs-field-date",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],containerId:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-36fd1c28.system",[[0,"verdocs-field-radio-button",{field:[16],option:[2],disabled:[4],done:[4],roleindex:[2],editable:[4],moveable:[4],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-19f6e8c8.system",[[0,"verdocs-field-textarea",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-628aef1d.system",[[0,"verdocs-field-textbox",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-b40a50a8.system",[[0,"verdocs-field-timestamp",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-7bc5fc1e.system",[[0,"verdocs-template-recipients",{endpoint:[16],templateId:[1,"template-id"],showingRoleDialog:[32],showingSenderDialog:[32],sender:[32],forceRerender:[32]}]]],["p-c73998d3.system",[[0,"verdocs-sign",{envelopeId:[1,"envelope-id"],roleId:[1,"role-id"],inviteCode:[1,"invite-code"],recipient:[32],signerToken:[32],hasSignature:[32],nextButtonLabel:[32],nextSubmits:[32],errorMessage:[32],focusedField:[32],isDone:[32],showDone:[32],finishLater:[32],showFinishLater:[32],agreed:[32],documentsSingularPlural:[32]}]]],["p-ccaa35ac.system",[[0,"verdocs-template-properties",{endpoint:[16],templateId:[1,"template-id"],template:[32],name:[32],visibility:[32],sendReminders:[32],firstReminderDays:[32],reminderDays:[32]}]]],["p-d95b1215.system",[[0,"verdocs-template-reminders",{endpoint:[16],templateId:[1,"template-id"],showPlanBlocker:[32],sendReminders:[32],firstReminderDays:[32],reminderDays:[32],dirty:[32],loading:[32]}]]],["p-cd70bb21.system",[[0,"verdocs-auth",{endpoint:[16],visible:[4],logo:[1],isAuthenticated:[32],displayMode:[32],username:[32],password:[32],loggingIn:[32],activeSession:[32],loginError:[32]}]]],["p-9f52748a.system",[[0,"verdocs-template-name",{endpoint:[16],templateId:[1,"template-id"],name:[32],dirty:[32],loading:[32]}]]],["p-285eaf3c.system",[[0,"verdocs-search",{endpoint:[16]}]]],["p-6c2d3b0f.system",[[0,"verdocs-send",{endpoint:[16],templateId:[1,"template-id"],containerId:[32],rolesAtLevel:[32],showPickerForId:[32],sessionContacts:[32],rolesCompleted:[32],reset:[64]}]]],["p-efa9bfa2.system",[[0,"verdocs-template-visibility",{endpoint:[16],templateId:[1,"template-id"],dirty:[32],loading:[32],personal:[32],public:[32]}]]],["p-d85e61ee.system",[[0,"verdocs-upload-dialog",{draggingOver:[32],decodedFiles:[32]}]]],["p-0e5274d0.system",[[0,"verdocs-field-attachment",{field:[16],disabled:[4],roleIndex:[2,"role-index"],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-c9216df9.system",[[0,"verdocs-preview",{endpoint:[16],templateId:[1,"template-id"]}]]],["p-8c53e0ff.system",[[0,"verdocs-envelope-sidebar",{endpoint:[16],envelopeId:[1,"envelope-id"],activeTab:[32],panelOpen:[32]}]]],["p-353b8e87.system",[[0,"verdocs-kba-dialog",{step:[2],steps:[2],helptitle:[1],helptext:[1],mode:[1],label:[1],placeholder:[1],choices:[16],response:[32]}]]],["p-3a04acf4.system",[[0,"verdocs-template-attachments",{endpoint:[16],templateId:[1,"template-id"],loading:[32]}]]],["p-cd4270a9.system",[[0,"verdocs-field-dropdown",{field:[16],disabled:[4],roleindex:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-b22a2c9a.system",[[0,"verdocs-field-payment",{field:[16],disabled:[4],fields:[16],pageNum:[2,"page-num"],roleName:[1,"role-name"],fieldId:[1,"field-id"],recipients:[8],selectedRoleName:[1,"selected-role-name"],pdfPages:[16],currentSignature:[1,"current-signature"],currentSignatureId:[1,"current-signature-id"],currentInitial:[1,"current-initial"],currentInitialId:[1,"current-initial-id"],focused:[4],signed:[4],roleindex:[2],preparedMessage:[32],signatureUrl:[32],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-150a172e.system",[[0,"verdocs-organization-card",{organization:[16]}]]],["p-a6c3fcb6.system",[[0,"verdocs-search-tabs",{selected:[32]}]]],["p-9fc9596b.system",[[0,"verdocs-status-indicator",{size:[1],theme:[1],status:[1],envelope:[16],isOpen:[32],recipientStatusIcons:[32],containerId:[32]}]]],["p-67f1cc29.system",[[0,"verdocs-template-card",{template:[16]}]]],["p-49bc1855.system",[[0,"verdocs-template-tags",{tags:[16]}]]],["p-37a75b0e.system",[[0,"verdocs-toggle",{options:[16],theme:[1],selectedOption:[32]}]]],["p-4125b8e7.system",[[0,"verdocs-initial-dialog",{initials:[1],fontLoaded:[32],enteredInitials:[32],mode:[32]}]]],["p-5b114f68.system",[[0,"verdocs-signature-dialog",{name:[1],fontLoaded:[32],enteredName:[32],mode:[32]}]]],["p-1c92741b.system",[[0,"verdocs-view",{endpoint:[16],envelopeId:[1,"envelope-id"]}]]],["p-74207eb0.system",[[0,"verdocs-toggle-button",{active:[4],icon:[1],label:[1],size:[1],_active:[32]}]]],["p-85336769.system",[[0,"verdocs-contact-picker",{endpoint:[16],templateRole:[16],contactSuggestions:[16],name:[32],email:[32],phone:[32],message:[32],showSuggestions:[32],showMessage:[32],delegator:[32]}]]],["p-6121f103.system",[[0,"verdocs-radio-button",{checked:[4],name:[1],value:[1],disabled:[4]}]]],["p-7ede7934.system",[[0,"verdocs-button",{label:[1],startIcon:[1,"start-icon"],endIcon:[1,"end-icon"],size:[1],type:[1],variant:[1],disabled:[4]}]]],["p-50892057.system",[[0,"verdocs-template-role-properties",{endpoint:[16],templateId:[1,"template-id"],roleName:[1,"role-name"],sender:[1],dirty:[32],saving:[32],name:[32],type:[32],fullName:[32],email:[32],phone:[32],allowDelegation:[32]}],[0,"verdocs-template-sender",{endpoint:[16],templateId:[1,"template-id"],sender:[1],saving:[32]}]]],["p-1be43032.system",[[0,"verdocs-floating-menu",{options:[16]}],[0,"verdocs-toolbar-icon",{text:[1],icon:[1],placement:[1],containerId:[32]}]]],["p-cf9883c7.system",[[0,"verdocs-template-fields",{endpoint:[16],templateId:[1,"template-id"],placing:[32],selectedRoleName:[32]}],[0,"verdocs-template-create",{endpoint:[16],file:[32],creating:[32]}]]],["p-74401f2e.system",[[0,"verdocs-ok-dialog",{heading:[1],message:[1],showCancel:[4,"show-cancel"]}]]],["p-3fbe602a.system",[[0,"verdocs-quick-functions",{endpoint:[16]}],[0,"verdocs-search-activity",{endpoint:[16],type:[1],options:[8],emptyMessage:[32],authFailure:[32],title:[32],recent:[32],saved:[32],starred:[32]}],[0,"verdocs-search-box",{endpoint:[16],placeholder:[1],type:[1],query:[1],grabsFocus:[4,"grabs-focus"],focusField:[64]}]]],["p-47dfcf69.system",[[0,"verdocs-dropdown",{options:[16],open:[32]}]]],["p-242647c0.system",[[0,"verdocs-document-page",{pageImageUri:[1,"page-image-uri"],pageNumber:[2,"page-number"],virtualWidth:[2,"virtual-width"],virtualHeight:[1026,"virtual-height"],layers:[16],containerId:[32],renderedWidth:[32],renderedHeight:[32],naturalWidth:[32],naturalHeight:[32],aspectRatio:[32],skipFirstNotification:[32]}],[0,"verdocs-loader"]]],["p-29df733a.system",[[0,"verdocs-checkbox",{checked:[4],name:[1],label:[1],value:[1],theme:[1],disabled:[4]}],[0,"verdocs-component-error",{message:[1]}],[0,"verdocs-text-input",{value:[1],label:[1],placeholder:[1],autocomplete:[1],helpText:[1,"help-text"],type:[1],disabled:[4]}],[0,"verdocs-help-icon",{text:[1],containerId:[32]}]]],["p-51a99eed.system",[[0,"verdocs-template-field-properties",{endpoint:[16],templateId:[1,"template-id"],fieldName:[1,"field-name"],dirty:[32],loading:[32],type:[32],name:[32],roleName:[32],required:[32],placeholder:[32],defaultValue:[32]}],[4,"verdocs-button-panel",{icon:[1],showPanel:[64],hidePanel:[64],toggle:[64]}],[0,"verdocs-select-input",{value:[1],label:[1],options:[16],disabled:[4]}]]]],e)}))}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-ff1278ed.js";(()=>{const t=import.meta.url,d={};return""!==t&&(d.resourcesUrl=new URL(".",t).href),e(d)})().then((e=>t([["p-c11a7c7e",[[0,"verdocs-field-initial",{field:[16],disabled:[4],initials:[1],editable:[4],moveable:[4],done:[4],roleindex:[2],tempInitials:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-1b58f506",[[0,"verdocs-field-signature",{field:[16],name:[1],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],tempSignature:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-584e4fca",[[0,"verdocs-build",{endpoint:[16],templateId:[1,"template-id"],step:[32],pdfUrl:[32],template:[32]}]]],["p-2037252b",[[0,"verdocs-field-checkbox",{field:[16],option:[2],disabled:[4],done:[4],roleindex:[2],editable:[4],moveable:[4],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-9345346d",[[0,"verdocs-field-date",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],containerId:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-e845dc2c",[[0,"verdocs-field-radio-button",{field:[16],option:[2],disabled:[4],done:[4],roleindex:[2],editable:[4],moveable:[4],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-e6f3735e",[[0,"verdocs-field-textarea",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-ef4603fd",[[0,"verdocs-field-textbox",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-abffbbaf",[[0,"verdocs-field-timestamp",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-
|
|
1
|
+
import{p as e,b as t}from"./p-ff1278ed.js";(()=>{const t=import.meta.url,d={};return""!==t&&(d.resourcesUrl=new URL(".",t).href),e(d)})().then((e=>t([["p-c11a7c7e",[[0,"verdocs-field-initial",{field:[16],disabled:[4],initials:[1],editable:[4],moveable:[4],done:[4],roleindex:[2],tempInitials:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-1b58f506",[[0,"verdocs-field-signature",{field:[16],name:[1],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],tempSignature:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-584e4fca",[[0,"verdocs-build",{endpoint:[16],templateId:[1,"template-id"],step:[32],pdfUrl:[32],template:[32]}]]],["p-2037252b",[[0,"verdocs-field-checkbox",{field:[16],option:[2],disabled:[4],done:[4],roleindex:[2],editable:[4],moveable:[4],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-9345346d",[[0,"verdocs-field-date",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],containerId:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-e845dc2c",[[0,"verdocs-field-radio-button",{field:[16],option:[2],disabled:[4],done:[4],roleindex:[2],editable:[4],moveable:[4],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-e6f3735e",[[0,"verdocs-field-textarea",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-ef4603fd",[[0,"verdocs-field-textbox",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-abffbbaf",[[0,"verdocs-field-timestamp",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-53198827",[[0,"verdocs-template-recipients",{endpoint:[16],templateId:[1,"template-id"],showingRoleDialog:[32],showingSenderDialog:[32],sender:[32],forceRerender:[32]}]]],["p-25256749",[[0,"verdocs-sign",{envelopeId:[1,"envelope-id"],roleId:[1,"role-id"],inviteCode:[1,"invite-code"],recipient:[32],signerToken:[32],hasSignature:[32],nextButtonLabel:[32],nextSubmits:[32],errorMessage:[32],focusedField:[32],isDone:[32],showDone:[32],finishLater:[32],showFinishLater:[32],agreed:[32],documentsSingularPlural:[32]}]]],["p-d27a02b5",[[0,"verdocs-template-properties",{endpoint:[16],templateId:[1,"template-id"],template:[32],name:[32],visibility:[32],sendReminders:[32],firstReminderDays:[32],reminderDays:[32]}]]],["p-a7c75902",[[0,"verdocs-template-reminders",{endpoint:[16],templateId:[1,"template-id"],showPlanBlocker:[32],sendReminders:[32],firstReminderDays:[32],reminderDays:[32],dirty:[32],loading:[32]}]]],["p-37a493a6",[[0,"verdocs-auth",{endpoint:[16],visible:[4],logo:[1],isAuthenticated:[32],displayMode:[32],username:[32],password:[32],loggingIn:[32],activeSession:[32],loginError:[32]}]]],["p-0e1f1b27",[[0,"verdocs-template-name",{endpoint:[16],templateId:[1,"template-id"],name:[32],dirty:[32],loading:[32]}]]],["p-34db97b7",[[0,"verdocs-search",{endpoint:[16]}]]],["p-26bfe095",[[0,"verdocs-send",{endpoint:[16],templateId:[1,"template-id"],containerId:[32],rolesAtLevel:[32],showPickerForId:[32],sessionContacts:[32],rolesCompleted:[32],reset:[64]}]]],["p-f2ae6ed5",[[0,"verdocs-template-visibility",{endpoint:[16],templateId:[1,"template-id"],dirty:[32],loading:[32],personal:[32],public:[32]}]]],["p-fedfe011",[[0,"verdocs-upload-dialog",{draggingOver:[32],decodedFiles:[32]}]]],["p-af657dd3",[[0,"verdocs-field-attachment",{field:[16],disabled:[4],roleIndex:[2,"role-index"],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-a802a598",[[0,"verdocs-preview",{endpoint:[16],templateId:[1,"template-id"]}]]],["p-bda7353b",[[0,"verdocs-envelope-sidebar",{endpoint:[16],envelopeId:[1,"envelope-id"],activeTab:[32],panelOpen:[32]}]]],["p-b365612a",[[0,"verdocs-kba-dialog",{step:[2],steps:[2],helptitle:[1],helptext:[1],mode:[1],label:[1],placeholder:[1],choices:[16],response:[32]}]]],["p-7417cdc7",[[0,"verdocs-template-attachments",{endpoint:[16],templateId:[1,"template-id"],loading:[32]}]]],["p-e1754b47",[[0,"verdocs-field-dropdown",{field:[16],disabled:[4],roleindex:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-72f4b40b",[[0,"verdocs-field-payment",{field:[16],disabled:[4],fields:[16],pageNum:[2,"page-num"],roleName:[1,"role-name"],fieldId:[1,"field-id"],recipients:[8],selectedRoleName:[1,"selected-role-name"],pdfPages:[16],currentSignature:[1,"current-signature"],currentSignatureId:[1,"current-signature-id"],currentInitial:[1,"current-initial"],currentInitialId:[1,"current-initial-id"],focused:[4],signed:[4],roleindex:[2],preparedMessage:[32],signatureUrl:[32],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-2783520a",[[0,"verdocs-organization-card",{organization:[16]}]]],["p-dc8aa1f0",[[0,"verdocs-search-tabs",{selected:[32]}]]],["p-9f6b4f8c",[[0,"verdocs-status-indicator",{size:[1],theme:[1],status:[1],envelope:[16],isOpen:[32],recipientStatusIcons:[32],containerId:[32]}]]],["p-896f1614",[[0,"verdocs-template-card",{template:[16]}]]],["p-7efc60cc",[[0,"verdocs-template-tags",{tags:[16]}]]],["p-2b86f106",[[0,"verdocs-toggle",{options:[16],theme:[1],selectedOption:[32]}]]],["p-40dfb545",[[0,"verdocs-initial-dialog",{initials:[1],fontLoaded:[32],enteredInitials:[32],mode:[32]}]]],["p-d36ae684",[[0,"verdocs-signature-dialog",{name:[1],fontLoaded:[32],enteredName:[32],mode:[32]}]]],["p-f81a559c",[[0,"verdocs-view",{endpoint:[16],envelopeId:[1,"envelope-id"]}]]],["p-b859bbb4",[[0,"verdocs-toggle-button",{active:[4],icon:[1],label:[1],size:[1],_active:[32]}]]],["p-fc208e71",[[0,"verdocs-contact-picker",{endpoint:[16],templateRole:[16],contactSuggestions:[16],name:[32],email:[32],phone:[32],message:[32],showSuggestions:[32],showMessage:[32],delegator:[32]}]]],["p-7d909ce4",[[0,"verdocs-radio-button",{checked:[4],name:[1],value:[1],disabled:[4]}]]],["p-fba99ad6",[[0,"verdocs-button",{label:[1],startIcon:[1,"start-icon"],endIcon:[1,"end-icon"],size:[1],type:[1],variant:[1],disabled:[4]}]]],["p-01117b44",[[0,"verdocs-template-role-properties",{endpoint:[16],templateId:[1,"template-id"],roleName:[1,"role-name"],sender:[1],dirty:[32],saving:[32],name:[32],type:[32],fullName:[32],email:[32],phone:[32],allowDelegation:[32]}],[0,"verdocs-template-sender",{endpoint:[16],templateId:[1,"template-id"],sender:[1],saving:[32]}]]],["p-d946b1b6",[[0,"verdocs-floating-menu",{options:[16]}],[0,"verdocs-toolbar-icon",{text:[1],icon:[1],placement:[1],containerId:[32]}]]],["p-8c3d48c1",[[0,"verdocs-template-fields",{endpoint:[16],templateId:[1,"template-id"],placing:[32],selectedRoleName:[32]}],[0,"verdocs-template-create",{endpoint:[16],file:[32],creating:[32]}]]],["p-d250b3b4",[[0,"verdocs-ok-dialog",{heading:[1],message:[1],showCancel:[4,"show-cancel"]}]]],["p-205027db",[[0,"verdocs-quick-functions",{endpoint:[16]}],[0,"verdocs-search-activity",{endpoint:[16],type:[1],options:[8],emptyMessage:[32],authFailure:[32],title:[32],recent:[32],saved:[32],starred:[32]}],[0,"verdocs-search-box",{endpoint:[16],placeholder:[1],type:[1],query:[1],grabsFocus:[4,"grabs-focus"],focusField:[64]}]]],["p-0eb992eb",[[0,"verdocs-dropdown",{options:[16],open:[32]}]]],["p-b981d415",[[0,"verdocs-document-page",{pageImageUri:[1,"page-image-uri"],pageNumber:[2,"page-number"],virtualWidth:[2,"virtual-width"],virtualHeight:[1026,"virtual-height"],layers:[16],containerId:[32],renderedWidth:[32],renderedHeight:[32],naturalWidth:[32],naturalHeight:[32],aspectRatio:[32],skipFirstNotification:[32]}],[0,"verdocs-loader"]]],["p-587f4405",[[0,"verdocs-checkbox",{checked:[4],name:[1],label:[1],value:[1],theme:[1],disabled:[4]}],[0,"verdocs-component-error",{message:[1]}],[0,"verdocs-text-input",{value:[1],label:[1],placeholder:[1],autocomplete:[1],helpText:[1,"help-text"],type:[1],disabled:[4]}],[0,"verdocs-help-icon",{text:[1],containerId:[32]}]]],["p-6cb274e3",[[0,"verdocs-template-field-properties",{endpoint:[16],templateId:[1,"template-id"],fieldName:[1,"field-name"],dirty:[32],loading:[32],type:[32],name:[32],roleName:[32],required:[32],placeholder:[32],defaultValue:[32]}],[4,"verdocs-button-panel",{icon:[1],showPanel:[64],hidePanel:[64],toggle:[64]}],[0,"verdocs-select-input",{value:[1],label:[1],options:[16],disabled:[4]}]]]],e)));
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
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,i){function s(e){try{l(o.next(e))}catch(e){i(e)}}function a(e){try{l(o["throw"](e))}catch(e){i(e)}}function l(e){e.done?r(e.value):n(e.value).then(s,a)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,n,i,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(o)throw new TypeError("Generator is already executing.");while(r)try{if(o=1,n&&(i=s[0]&2?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;if(n=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;n=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];n=0}finally{o=i=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-d122cadd.system.js","./p-fbc81799.system.js","./p-261dcea1.system.js","./p-05eb4fed.system.js","./p-5b62f239.system.js","./p-7067adce.system.js","./p-e090d5e1.system.js","./p-187b20b7.system.js","./p-af2c2f79.system.js","./p-0f6da8c7.system.js","./p-d50523fd.system.js","./p-69912cbf.system.js","./p-e0cfad01.system.js","./p-327858f0.system.js"],(function(e){"use strict";var t,r,o,n,i,s,a,l,c,p,d,u,f,m,g,v;return{setters:[function(e){t=e.r;r=e.c;o=e.h;n=e.F;i=e.H;s=e.a},function(e){a=e.i},function(e){l=e.u;c=e.c},function(e){p=e.V;d=e.T},function(e){u=e.g},function(e){f=e.s},function(e){m=e.l},function(e){g=e.a},function(e){v=e.S},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var h;var x='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 ::-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 b=(h={},h[d.EVERYONE]="Everyone",h[d.EVERYONE_AS_CREATOR]="Everyone as Me",h[d.ORGANIZATION_MEMBER]="Organization member",h[d.ORGANIZATION_MEMBER_AS_CREATOR]="Organization Member as Me",h[d.CREATOR]="Me",h);var w='<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 y='<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 q='<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 R='<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 z='<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 E='<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 k='<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 I='<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 L=e("verdocs_template_recipients",function(){function e(e){t(this,e);this.cancel=r(this,"cancel",7);this.sdkError=r(this,"sdkError",7);this.sequences=[];this.endpoint=p.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,i,s,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,m(this.endpoint,this.templateId)];case 2:l.sent();return[3,4];case 3:s=l.sent();console.log("[RECIPIENTS] Error loading template",s);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new v(s.message,(t=s.response)===null||t===void 0?void 0:t.status,(r=s.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 v(a.message,(n=a.response)===null||n===void 0?void 0:n.status,(i=a.response)===null||i===void 0?void 0:i.data));return[3,6];case 6:return[2]}}))}))};e.prototype.componentDidRender=function(){a.dynamicDrop(true);a(".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 i=t.dy+o;t.target.setAttribute("posX",n);t.target.setAttribute("posy",i);t.target.style.transform="translate(".concat(n+100,"px, ").concat(i-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)}});a(".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 i=+t.target.dataset.order;var s=f.template.roles.find((function(e){return e.name===o}));if(s){s.sequence=n;s.order=i;this.sortTemplateRoles();this.renumberTemplateRoles();this.forceRerender++;Promise.all(f.template.roles.map((function(e){return l(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){e.stopPropagation()};e.prototype.sortTemplateRoles=function(){f.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=[];f.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){f.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=f.template.roles.filter((function(e){return e.sequence===t})).length+1;var n="";var i=f.template.roles.length;do{i++;n="Recipient ".concat(i)}while(!n||f.template.roles.some((function(e){return e.name===n})));console.log("Will create",n,t,o);c(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);f.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=f.template.roles.map((function(e){return e.name}));return o(i,null,o("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off","data-r":this.forceRerender},o("h5",null,"Recipients"),o("div",{class:"participants"},o("div",{class:"left-line"}),o("div",{class:"row"},o("div",{class:"icon",innerHTML:y}),o("div",{class:"row-recipients"},o("div",{class:"sender"},o("span",{class:"label"},"Sender:")," ",b[f.template.sender]," ",o("div",{class:"settings-button",innerHTML:w,onClick:function(){return e.showingSenderDialog=true},"aria-role":"button"})))),o("div",{class:"row add-sequence","data-sequence":0},o("div",{class:"icon",innerHTML:z}),o("div",{class:"row-recipients"},o("div",{class:"dropzone","data-sequence":0,"data-order":1},"Add Step"))),this.sequences.map((function(r){return o(n,null,o("div",{class:"row"},o("div",{class:"icon",innerHTML:q}),o("div",{class:"row-recipients"},o("div",{class:"dropzone","data-order":.5,"data-sequence":r}),f.template.roles.filter((function(e){return e.sequence===r})).map((function(i){return o(n,null,o("div",{class:"recipient",style:{backgroundColor:u(g(t,i.name))},"data-rolename":i.name},o("span",{class:"type-icon",innerHTML:i.type==="signer"?E:i.type==="cc"?I:k}),i.name," ",o("div",{class:"settings-button",innerHTML:w,onClick:function(){return e.showingRoleDialog=i.name},"aria-role":"button"})),o("div",{class:"dropzone","data-order":i.order+.5,"data-sequence":r}))})),o("button",{class:"add-role",innerHTML:z,onClick:function(t){return e.handleAddRole(t,r)}}))),o("div",{class:"row add-sequence","data-sequence":r},o("div",{class:"row-recipients"},o("div",{class:"icon",innerHTML:z}),o("div",{class:"dropzone","data-sequence":r+1,"data-order":1},"Add Step"))))})),o("div",{class:"row"},o("div",{class:"icon",innerHTML:R}),o("div",{class:"row-recipients"},o("div",{class:"complete"},"Document Complete")))),o("div",{class:"buttons"},o("div",{class:"flex-fill"}),o("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),o("verdocs-button",{label:"OK",size:"small",onClick:function(t){return e.handleSubmit(t)}}))),this.showingRoleDialog&&o("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&&o("verdocs-template-sender",{endpoint:this.endpoint,templateId:this.templateId,onClose:function(){return e.showingSenderDialog=false}}))};Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());L.style=x}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,c as i,h as t,F as o,H as s,a as r}from"./p-ff1278ed.js";import{i as a}from"./p-4f12a8a7.js";import{u as l,c as n}from"./p-ffe60abd.js";import{V as p,T as d}from"./p-2d4712ea.js";import{g as c}from"./p-6de76553.js";import{s as m}from"./p-3cb8a7f4.js";import{l as f}from"./p-d1393a1a.js";import{a as h}from"./p-d6e07c20.js";import{S as x}from"./p-7a1b2643.js";import"./p-21603661.js";import"./p-5ea05a1d.js";import"./p-7291906c.js";import"./p-b28ef4bb.js";import"./p-880b619d.js";import"./p-aa124212.js";const v={[d.EVERYONE]:"Everyone",[d.EVERYONE_AS_CREATOR]:"Everyone as Me",[d.ORGANIZATION_MEMBER]:"Organization member",[d.ORGANIZATION_MEMBER_AS_CREATOR]:"Organization Member as Me",[d.CREATOR]:"Me"},g='<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>',u='<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>',b=class{constructor(t){e(this,t),this.cancel=i(this,"cancel",7),this.sdkError=i(this,"sdkError",7),this.sequences=[],this.endpoint=p.getDefault(),this.templateId="",this.showingRoleDialog=null,this.showingSenderDialog=!1,this.sender=null,this.forceRerender=1}async componentWillLoad(){var e,i,t,o,s,r;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[RECIPIENTS] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[RECIPIENTS] Unable to start builder session, must be authenticated");try{console.log(`[RECIPIENTS] Loading template ${this.templateId}`,this.endpoint.session),await f(this.endpoint,this.templateId)}catch(o){console.log("[RECIPIENTS] Error loading template",o),null===(e=this.sdkError)||void 0===e||e.emit(new x(o.message,null===(i=o.response)||void 0===i?void 0:i.status,null===(t=o.response)||void 0===t?void 0:t.data))}this.sortTemplateRoles(),this.renumberTemplateRoles()}catch(e){console.log("[FIELDS] Error with preview session",e),null===(o=this.sdkError)||void 0===o||o.emit(new x(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(r=e.response)||void 0===r?void 0:r.data))}}componentDidRender(){a.dynamicDrop(!0),a(".recipient").draggable({listeners:{start:function(e){e.target.classList.add("dragging"),this.el.classList.add("dragging")}.bind(this),move:function(e){const i=+(e.target.getAttribute("posX")||0),t=+(e.target.getAttribute("posY")||0),o=e.dx+i,s=e.dy+t;e.target.setAttribute("posX",o),e.target.setAttribute("posy",s),e.target.style.transform=`translate(${o+100}px, ${s-40}px)`}.bind(this),end:function(e){e.target.classList.remove("dragging"),this.el.classList.remove("dragging"),e.target.setAttribute("posX",0),e.target.setAttribute("posy",0),e.target.style.transform="translate(0px, 0px)"}.bind(this)}}),a(".dropzone").dropzone({overlap:.05,ondrop:function(e){e.target.classList.remove("active");const i=e.relatedTarget.dataset.rolename,t=+e.target.dataset.sequence,o=+e.target.dataset.order,s=m.template.roles.find((e=>e.name===i));s&&(s.sequence=t,s.order=o,this.sortTemplateRoles(),this.renumberTemplateRoles(),this.forceRerender++,Promise.all(m.template.roles.map((e=>l(this.endpoint,this.templateId,e.name,{sequence:e.sequence,order:e.order})))).then((()=>console.log("[RECIPIENTS] Updated roles"))).catch((e=>console.log("[RECIPIENTS] Role updates failed",e))))}.bind(this),ondropactivate:e=>{e.target.classList.add("visible")},ondropdeactivate:e=>{e.target.classList.remove("visible")},ondragenter:e=>{e.target.classList.add("active")},ondragleave:e=>{e.target.classList.remove("active")}})}handleCancel(e){var i;e.stopPropagation(),null===(i=this.cancel)||void 0===i||i.emit()}handleSubmit(e){e.stopPropagation()}sortTemplateRoles(){m.template.roles.sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence))}extractSequenceNumbers(){this.sequences=[],m.template.roles.forEach((e=>{this.sequences.includes(e.sequence)||this.sequences.push(e.sequence)}))}renumberTemplateRoles(){this.extractSequenceNumbers();const e=[];this.sequences.sort(((e,i)=>e-i)),this.sequences.forEach(((i,t)=>{m.template.roles.filter((e=>e.sequence===i)).forEach(((i,o)=>{e.includes(i.name)||(i.sequence=t+1,i.order=o+1,e.push(i.name))}))})),this.extractSequenceNumbers()}handleAddRole(e,i){e.stopPropagation();const t=m.template.roles.filter((e=>e.sequence===i)).length+1;let o="",s=m.template.roles.length;do{s++,o=`Recipient ${s}`}while(!o||m.template.roles.some((e=>e.name===o)));console.log("Will create",o,i,t),n(this.endpoint,this.templateId,{template_id:this.templateId,name:o,full_name:"",email:"",phone:"",sequence:i,order:t,type:"signer",delegator:!1}).then((e=>{console.log("Created role",e),m.template.roles.push(e),this.renumberTemplateRoles(),this.forceRerender++})).catch((e=>{console.log("Error creating role",e)}))}render(){const e=m.template.roles.map((e=>e.name));return t(s,null,t("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off","data-r":this.forceRerender},t("h5",null,"Recipients"),t("div",{class:"participants"},t("div",{class:"left-line"}),t("div",{class:"row"},t("div",{class:"icon",innerHTML:'<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>'}),t("div",{class:"row-recipients"},t("div",{class:"sender"},t("span",{class:"label"},"Sender:")," ",v[m.template.sender]," ",t("div",{class:"settings-button",innerHTML:g,onClick:()=>this.showingSenderDialog=!0,"aria-role":"button"})))),t("div",{class:"row add-sequence","data-sequence":0},t("div",{class:"icon",innerHTML:u}),t("div",{class:"row-recipients"},t("div",{class:"dropzone","data-sequence":0,"data-order":1},"Add Step"))),this.sequences.map((i=>t(o,null,t("div",{class:"row"},t("div",{class:"icon",innerHTML:'<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>'}),t("div",{class:"row-recipients"},t("div",{class:"dropzone","data-order":.5,"data-sequence":i}),m.template.roles.filter((e=>e.sequence===i)).map((s=>t(o,null,t("div",{class:"recipient",style:{backgroundColor:c(h(e,s.name))},"data-rolename":s.name},t("span",{class:"type-icon",innerHTML:"signer"===s.type?'<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>':"cc"===s.type?'<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>':'<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>'}),s.name," ",t("div",{class:"settings-button",innerHTML:g,onClick:()=>this.showingRoleDialog=s.name,"aria-role":"button"})),t("div",{class:"dropzone","data-order":s.order+.5,"data-sequence":i})))),t("button",{class:"add-role",innerHTML:u,onClick:e=>this.handleAddRole(e,i)}))),t("div",{class:"row add-sequence","data-sequence":i},t("div",{class:"row-recipients"},t("div",{class:"icon",innerHTML:u}),t("div",{class:"dropzone","data-sequence":i+1,"data-order":1},"Add Step")))))),t("div",{class:"row"},t("div",{class:"icon",innerHTML:'<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>'}),t("div",{class:"row-recipients"},t("div",{class:"complete"},"Document Complete")))),t("div",{class:"buttons"},t("div",{class:"flex-fill"}),t("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e)}),t("verdocs-button",{label:"OK",size:"small",onClick:e=>this.handleSubmit(e)}))),this.showingRoleDialog&&t("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:()=>{this.showingRoleDialog=null,this.forceRerender++},onDelete:e=>{console.log("deleted",e.detail),this.renumberTemplateRoles(),this.showingRoleDialog=null,this.forceRerender++}}),this.showingSenderDialog&&t("verdocs-template-sender",{endpoint:this.endpoint,templateId:this.templateId,onClose:()=>this.showingSenderDialog=!1}))}get el(){return r(this)}};b.style='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 ::-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}';export{b as verdocs_template_recipients}
|