@verdocs/web-sdk 1.11.0 → 1.11.1
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/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-checkbox_4.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +5 -1
- package/dist/cjs/verdocs-field-date.cjs.entry.js +5 -1
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +5 -1
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +5 -1
- package/dist/cjs/verdocs-field-signature.cjs.entry.js +5 -1
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +5 -1
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +5 -1
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +5 -1
- package/dist/cjs/verdocs-template-attachments.cjs.entry.js +3 -0
- package/dist/cjs/verdocs-template-create_2.cjs.entry.js +7 -4
- package/dist/cjs/verdocs-template-name.cjs.entry.js +3 -4
- package/dist/cjs/verdocs-template-recipients.cjs.entry.js +42 -8
- package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/elements/verdocs-component-error/verdocs-component-error.css +2 -0
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +1 -1
- package/dist/collection/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.js +5 -1
- package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js +5 -1
- package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.js +5 -1
- package/dist/collection/components/fields/verdocs-field-radio-button-group/verdocs-field-radio-button.js +5 -1
- package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.js +5 -1
- package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.js +5 -1
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +5 -1
- package/dist/collection/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.js +5 -1
- package/dist/collection/components/templates/verdocs-template-attachments/verdocs-template-attachments.js +3 -0
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +9 -5
- package/dist/collection/components/templates/verdocs-template-name/verdocs-template-name.js +3 -4
- package/dist/collection/components/templates/verdocs-template-recipients/verdocs-template-recipients.css +16 -0
- package/dist/collection/components/templates/verdocs-template-recipients/verdocs-template-recipients.js +41 -7
- package/dist/components/verdocs-component-error2.js +1 -1
- package/dist/components/verdocs-field-checkbox.js +5 -1
- package/dist/components/verdocs-field-date.js +5 -1
- package/dist/components/verdocs-field-initial.js +5 -1
- package/dist/components/verdocs-field-radio-button.js +5 -1
- package/dist/components/verdocs-field-signature.js +5 -1
- package/dist/components/verdocs-field-textarea.js +5 -1
- package/dist/components/verdocs-field-textbox.js +5 -1
- package/dist/components/verdocs-field-timestamp.js +5 -1
- package/dist/components/verdocs-template-attachments.js +10 -1
- package/dist/components/verdocs-template-fields2.js +9 -5
- package/dist/components/verdocs-template-name.js +11 -6
- package/dist/components/verdocs-template-recipients.js +52 -12
- package/dist/components/verdocs-view2.js +1 -1
- package/dist/docs.json +19 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-checkbox_4.entry.js +1 -1
- package/dist/esm/verdocs-field-checkbox.entry.js +5 -1
- package/dist/esm/verdocs-field-date.entry.js +5 -1
- package/dist/esm/verdocs-field-initial.entry.js +5 -1
- package/dist/esm/verdocs-field-radio-button.entry.js +5 -1
- package/dist/esm/verdocs-field-signature.entry.js +5 -1
- package/dist/esm/verdocs-field-textarea.entry.js +5 -1
- package/dist/esm/verdocs-field-textbox.entry.js +5 -1
- package/dist/esm/verdocs-field-timestamp.entry.js +5 -1
- package/dist/esm/verdocs-template-attachments.entry.js +3 -0
- package/dist/esm/verdocs-template-create_2.entry.js +7 -4
- package/dist/esm/verdocs-template-name.entry.js +3 -4
- package/dist/esm/verdocs-template-recipients.entry.js +43 -9
- package/dist/esm/verdocs-view.entry.js +1 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/verdocs-checkbox_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-attachments.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-create_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-recipients.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +1 -0
- package/dist/types/components/templates/verdocs-template-recipients/verdocs-template-recipients.d.ts +2 -0
- package/dist/verdocs-web-sdk/{p-64f197a8.system.entry.js → p-0c393c2b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-af2957cc.system.entry.js → p-0d7db907.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-113a45d3.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-2faa3f2e.system.entry.js → p-127a569c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-caaf2702.system.entry.js → p-1fe9560f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-28620067.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-4086a15a.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-6d295ee1.system.entry.js → p-41122f38.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-56196fad.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-e58ab5ca.entry.js → p-5dc58d34.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7149f974.system.entry.js → p-5fda1fe8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7a26ed4a.entry.js → p-68eb0ad8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9dfcc6d4.system.entry.js → p-6c231fe6.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-32f9b201.system.entry.js → p-7d8de5d6.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-8a430554.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-8e5065af.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-8ff15619.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-695c2ea8.entry.js → p-b225dcfb.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-cdff8cba.system.entry.js → p-b430f3d0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d06946ca.entry.js → p-bc24fcdc.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-bde3d383.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-c16b6ca4.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-bea9fe06.system.entry.js → p-c6406e1d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-19763c4d.system.entry.js → p-cf27d3ce.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6d84b99c.entry.js → p-d78594bb.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-cb006a7e.entry.js → p-e079768b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5ced004c.entry.js → p-e53a7969.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-e65ec569.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-68743993.entry.js → p-ec913a97.entry.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/custom-elements.json +0 -1361
- package/dist/verdocs-web-sdk/p-00307be5.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-29df733a.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-3bed244c.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4e521971.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-587f4405.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5d29152f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b3fd9575.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c9eb3771.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-dd06fb2a.entry.js +0 -1
|
@@ -7,15 +7,16 @@ import { s as state } from './templateStore.js';
|
|
|
7
7
|
import { l as loadTemplate } from './Templates.js';
|
|
8
8
|
import { a as getRoleIndex } from './utils.js';
|
|
9
9
|
import { S as SDKError } from './errors.js';
|
|
10
|
-
import { d as defineCustomElement$
|
|
11
|
-
import { d as defineCustomElement$
|
|
10
|
+
import { d as defineCustomElement$a } from './verdocs-button2.js';
|
|
11
|
+
import { d as defineCustomElement$9 } from './verdocs-checkbox2.js';
|
|
12
|
+
import { d as defineCustomElement$8 } from './verdocs-component-error2.js';
|
|
12
13
|
import { d as defineCustomElement$7 } from './verdocs-help-icon2.js';
|
|
13
14
|
import { d as defineCustomElement$6 } from './verdocs-radio-button2.js';
|
|
14
15
|
import { d as defineCustomElement$5 } from './verdocs-select-input2.js';
|
|
15
16
|
import { d as defineCustomElement$3 } from './verdocs-template-sender2.js';
|
|
16
17
|
import { d as defineCustomElement$2 } from './verdocs-text-input2.js';
|
|
17
18
|
|
|
18
|
-
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}";
|
|
19
|
+
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;min-height:35px;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 .add-step{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-recipients .add-step:hover{opacity:1}verdocs-template-recipients .add-step 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}";
|
|
19
20
|
|
|
20
21
|
const senderLabels = {
|
|
21
22
|
[TemplateSenderTypes.EVERYONE]: 'Everyone',
|
|
@@ -197,17 +198,47 @@ const VerdocsTemplateRecipients$1 = /*@__PURE__*/ proxyCustomElement(class exten
|
|
|
197
198
|
// Now re-extract them to get our final result e.g. [1, 2, 3]
|
|
198
199
|
this.extractSequenceNumbers();
|
|
199
200
|
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
// We don't need to look for a unique order number because we're already working with a sorted/renumbered set by now.
|
|
203
|
-
const order = state.template.roles.filter(role => role.sequence === sequence).length + 1;
|
|
204
|
-
// We do need to look for name conflicts because they're UGC and can be anything, regardless of order.
|
|
201
|
+
// Look for name conflicts, because they're UGC and can be anything, regardless of order.
|
|
202
|
+
getNextRecipientName() {
|
|
205
203
|
let name = '';
|
|
206
204
|
let nextNumber = state.template.roles.length;
|
|
207
205
|
do {
|
|
208
206
|
nextNumber++;
|
|
209
207
|
name = `Recipient ${nextNumber}`;
|
|
210
208
|
} while (!name || state.template.roles.some(role => role.name === name));
|
|
209
|
+
return name;
|
|
210
|
+
}
|
|
211
|
+
handleAddRole(e, sequence) {
|
|
212
|
+
e.stopPropagation();
|
|
213
|
+
// We don't need to look for a unique order number because we're already working with a sorted/renumbered set by now.
|
|
214
|
+
const order = state.template.roles.filter(role => role.sequence === sequence).length + 1;
|
|
215
|
+
const name = this.getNextRecipientName();
|
|
216
|
+
console.log('Will create', name, sequence, order);
|
|
217
|
+
createRole(this.endpoint, this.templateId, {
|
|
218
|
+
template_id: this.templateId,
|
|
219
|
+
name,
|
|
220
|
+
full_name: '',
|
|
221
|
+
email: '',
|
|
222
|
+
phone: '',
|
|
223
|
+
sequence,
|
|
224
|
+
order,
|
|
225
|
+
type: 'signer',
|
|
226
|
+
delegator: false,
|
|
227
|
+
})
|
|
228
|
+
.then(r => {
|
|
229
|
+
console.log('Created role', r);
|
|
230
|
+
state.template.roles.push(r);
|
|
231
|
+
this.renumberTemplateRoles();
|
|
232
|
+
this.forceRerender++;
|
|
233
|
+
})
|
|
234
|
+
.catch(e => {
|
|
235
|
+
console.log('Error creating role', e);
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
handleAddStep(e, sequence) {
|
|
239
|
+
e.stopPropagation();
|
|
240
|
+
const order = 1;
|
|
241
|
+
const name = this.getNextRecipientName();
|
|
211
242
|
console.log('Will create', name, sequence, order);
|
|
212
243
|
createRole(this.endpoint, this.templateId, {
|
|
213
244
|
template_id: this.templateId,
|
|
@@ -231,12 +262,16 @@ const VerdocsTemplateRecipients$1 = /*@__PURE__*/ proxyCustomElement(class exten
|
|
|
231
262
|
});
|
|
232
263
|
}
|
|
233
264
|
render() {
|
|
234
|
-
|
|
265
|
+
var _a;
|
|
266
|
+
if (!this.endpoint.session) {
|
|
267
|
+
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
|
268
|
+
}
|
|
269
|
+
const roleNames = (((_a = state.template) === null || _a === void 0 ? void 0 : _a.roles) || []).map(role => role.name);
|
|
235
270
|
return (h(Host, null, h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off", "data-r": this.forceRerender }, h("h5", null, "Roles"), h("div", { class: "participants" }, h("div", { class: "left-line" }), h("div", { class: "row" }, h("div", { class: "icon", innerHTML: startIcon }), h("div", { class: "row-recipients" }, h("div", { class: "sender" }, h("span", { class: "label" }, "Sender:"), " ", senderLabels[state.template.sender], ' ', h("div", { class: "settings-button", innerHTML: settingsIcon, onClick: () => (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
|
|
236
271
|
.filter(role => role.sequence === sequence)
|
|
237
272
|
.map(role => {
|
|
238
273
|
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 })));
|
|
239
|
-
}), 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: () => {
|
|
274
|
+
}), 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", "data-sequence": this.sequences.length + 1 }, h("div", { class: "row-recipients" }, h("div", { class: "icon", innerHTML: plusIcon }), h("button", { class: "add-step", innerHTML: plusIcon, onClick: e => this.handleAddStep(e, this.sequences.length + 1) }))), 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: () => {
|
|
240
275
|
this.showingRoleDialog = null;
|
|
241
276
|
this.forceRerender++;
|
|
242
277
|
}, onDelete: e => {
|
|
@@ -260,7 +295,7 @@ function defineCustomElement$1() {
|
|
|
260
295
|
if (typeof customElements === "undefined") {
|
|
261
296
|
return;
|
|
262
297
|
}
|
|
263
|
-
const components = ["verdocs-template-recipients", "verdocs-button", "verdocs-checkbox", "verdocs-help-icon", "verdocs-radio-button", "verdocs-select-input", "verdocs-template-role-properties", "verdocs-template-sender", "verdocs-text-input"];
|
|
298
|
+
const components = ["verdocs-template-recipients", "verdocs-button", "verdocs-checkbox", "verdocs-component-error", "verdocs-help-icon", "verdocs-radio-button", "verdocs-select-input", "verdocs-template-role-properties", "verdocs-template-sender", "verdocs-text-input"];
|
|
264
299
|
components.forEach(tagName => { switch (tagName) {
|
|
265
300
|
case "verdocs-template-recipients":
|
|
266
301
|
if (!customElements.get(tagName)) {
|
|
@@ -269,10 +304,15 @@ function defineCustomElement$1() {
|
|
|
269
304
|
break;
|
|
270
305
|
case "verdocs-button":
|
|
271
306
|
if (!customElements.get(tagName)) {
|
|
272
|
-
defineCustomElement$
|
|
307
|
+
defineCustomElement$a();
|
|
273
308
|
}
|
|
274
309
|
break;
|
|
275
310
|
case "verdocs-checkbox":
|
|
311
|
+
if (!customElements.get(tagName)) {
|
|
312
|
+
defineCustomElement$9();
|
|
313
|
+
}
|
|
314
|
+
break;
|
|
315
|
+
case "verdocs-component-error":
|
|
276
316
|
if (!customElements.get(tagName)) {
|
|
277
317
|
defineCustomElement$8();
|
|
278
318
|
}
|
|
@@ -110,7 +110,7 @@ const VerdocsView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
110
110
|
menuOptions.push({ label: '' });
|
|
111
111
|
}
|
|
112
112
|
if (hasAttachments) {
|
|
113
|
-
menuOptions.push({ id: 'download-attachments', label: 'Download
|
|
113
|
+
menuOptions.push({ id: 'download-attachments', label: 'Download Documents(s)' });
|
|
114
114
|
}
|
|
115
115
|
if (hasCertificate) {
|
|
116
116
|
menuOptions.push({ id: 'download-certificate', label: 'Download Certificate' });
|
package/dist/docs.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2023-02-
|
|
2
|
+
"timestamp": "2023-02-20T16:32:03",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "2.20.0",
|
|
@@ -727,10 +727,13 @@
|
|
|
727
727
|
"parts": [],
|
|
728
728
|
"dependents": [
|
|
729
729
|
"verdocs-build",
|
|
730
|
+
"verdocs-template-attachments",
|
|
730
731
|
"verdocs-template-create",
|
|
731
732
|
"verdocs-template-field-properties",
|
|
732
733
|
"verdocs-template-fields",
|
|
734
|
+
"verdocs-template-name",
|
|
733
735
|
"verdocs-template-properties",
|
|
736
|
+
"verdocs-template-recipients",
|
|
734
737
|
"verdocs-template-reminders",
|
|
735
738
|
"verdocs-template-visibility"
|
|
736
739
|
],
|
|
@@ -739,6 +742,9 @@
|
|
|
739
742
|
"verdocs-build": [
|
|
740
743
|
"verdocs-component-error"
|
|
741
744
|
],
|
|
745
|
+
"verdocs-template-attachments": [
|
|
746
|
+
"verdocs-component-error"
|
|
747
|
+
],
|
|
742
748
|
"verdocs-template-create": [
|
|
743
749
|
"verdocs-component-error"
|
|
744
750
|
],
|
|
@@ -748,9 +754,15 @@
|
|
|
748
754
|
"verdocs-template-fields": [
|
|
749
755
|
"verdocs-component-error"
|
|
750
756
|
],
|
|
757
|
+
"verdocs-template-name": [
|
|
758
|
+
"verdocs-component-error"
|
|
759
|
+
],
|
|
751
760
|
"verdocs-template-properties": [
|
|
752
761
|
"verdocs-component-error"
|
|
753
762
|
],
|
|
763
|
+
"verdocs-template-recipients": [
|
|
764
|
+
"verdocs-component-error"
|
|
765
|
+
],
|
|
754
766
|
"verdocs-template-reminders": [
|
|
755
767
|
"verdocs-component-error"
|
|
756
768
|
],
|
|
@@ -5017,10 +5029,12 @@
|
|
|
5017
5029
|
"parts": [],
|
|
5018
5030
|
"dependents": [],
|
|
5019
5031
|
"dependencies": [
|
|
5032
|
+
"verdocs-component-error",
|
|
5020
5033
|
"verdocs-loader"
|
|
5021
5034
|
],
|
|
5022
5035
|
"dependencyGraph": {
|
|
5023
5036
|
"verdocs-template-attachments": [
|
|
5037
|
+
"verdocs-component-error",
|
|
5024
5038
|
"verdocs-loader"
|
|
5025
5039
|
]
|
|
5026
5040
|
}
|
|
@@ -5471,12 +5485,14 @@
|
|
|
5471
5485
|
"parts": [],
|
|
5472
5486
|
"dependents": [],
|
|
5473
5487
|
"dependencies": [
|
|
5488
|
+
"verdocs-component-error",
|
|
5474
5489
|
"verdocs-loader",
|
|
5475
5490
|
"verdocs-text-input",
|
|
5476
5491
|
"verdocs-button"
|
|
5477
5492
|
],
|
|
5478
5493
|
"dependencyGraph": {
|
|
5479
5494
|
"verdocs-template-name": [
|
|
5495
|
+
"verdocs-component-error",
|
|
5480
5496
|
"verdocs-loader",
|
|
5481
5497
|
"verdocs-text-input",
|
|
5482
5498
|
"verdocs-button"
|
|
@@ -5670,12 +5686,14 @@
|
|
|
5670
5686
|
"parts": [],
|
|
5671
5687
|
"dependents": [],
|
|
5672
5688
|
"dependencies": [
|
|
5689
|
+
"verdocs-component-error",
|
|
5673
5690
|
"verdocs-button",
|
|
5674
5691
|
"verdocs-template-role-properties",
|
|
5675
5692
|
"verdocs-template-sender"
|
|
5676
5693
|
],
|
|
5677
5694
|
"dependencyGraph": {
|
|
5678
5695
|
"verdocs-template-recipients": [
|
|
5696
|
+
"verdocs-component-error",
|
|
5679
5697
|
"verdocs-button",
|
|
5680
5698
|
"verdocs-template-role-properties",
|
|
5681
5699
|
"verdocs-template-sender"
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["verdocs-field-initial",[[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]}]]],["verdocs-field-signature",[[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]}]]],["verdocs-build",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1,"template-id"],"step":[32],"pdfUrl":[32],"template":[32]}]]],["verdocs-field-checkbox",[[0,"verdocs-field-checkbox",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-date",[[0,"verdocs-field-date",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"containerId":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-radio-button",[[0,"verdocs-field-radio-button",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-textarea",[[0,"verdocs-field-textarea",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-textbox",[[0,"verdocs-field-textbox",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-timestamp",[[0,"verdocs-field-timestamp",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-
|
|
13
|
+
return bootstrapLazy([["verdocs-button",[[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["verdocs-field-initial",[[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]}]]],["verdocs-field-signature",[[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]}]]],["verdocs-template-recipients",[[0,"verdocs-template-recipients",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"showingSenderDialog":[32],"sender":[32],"forceRerender":[32]}]]],["verdocs-build",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1,"template-id"],"step":[32],"pdfUrl":[32],"template":[32]}]]],["verdocs-field-checkbox",[[0,"verdocs-field-checkbox",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-date",[[0,"verdocs-field-date",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"containerId":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-radio-button",[[0,"verdocs-field-radio-button",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-textarea",[[0,"verdocs-field-textarea",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-textbox",[[0,"verdocs-field-textbox",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-timestamp",[[0,"verdocs-field-timestamp",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-sign",[[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]}]]],["verdocs-template-properties",[[0,"verdocs-template-properties",{"endpoint":[16],"templateId":[1,"template-id"],"template":[32],"name":[32],"visibility":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32]}]]],["verdocs-template-reminders",[[0,"verdocs-template-reminders",{"endpoint":[16],"templateId":[1,"template-id"],"showPlanBlocker":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32],"dirty":[32],"loading":[32]}]]],["verdocs-template-name",[[0,"verdocs-template-name",{"endpoint":[16],"templateId":[1,"template-id"],"name":[32],"dirty":[32],"loading":[32]}]]],["verdocs-auth",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"isAuthenticated":[32],"displayMode":[32],"username":[32],"password":[32],"loggingIn":[32],"activeSession":[32],"loginError":[32]}]]],["verdocs-search",[[0,"verdocs-search",{"endpoint":[16]}]]],["verdocs-send",[[0,"verdocs-send",{"endpoint":[16],"templateId":[1,"template-id"],"containerId":[32],"rolesAtLevel":[32],"showPickerForId":[32],"sessionContacts":[32],"rolesCompleted":[32],"reset":[64]}]]],["verdocs-template-visibility",[[0,"verdocs-template-visibility",{"endpoint":[16],"templateId":[1,"template-id"],"dirty":[32],"loading":[32],"personal":[32],"public":[32]}]]],["verdocs-upload-dialog",[[0,"verdocs-upload-dialog",{"draggingOver":[32],"decodedFiles":[32]}]]],["verdocs-field-attachment",[[0,"verdocs-field-attachment",{"field":[16],"disabled":[4],"roleIndex":[2,"role-index"],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-preview",[[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"]}]]],["verdocs-template-attachments",[[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32]}]]],["verdocs-envelope-sidebar",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32]}]]],["verdocs-kba-dialog",[[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"choices":[16],"response":[32]}]]],["verdocs-field-dropdown",[[0,"verdocs-field-dropdown",{"field":[16],"disabled":[4],"roleindex":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-payment",[[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]}]]],["verdocs-organization-card",[[0,"verdocs-organization-card",{"organization":[16]}]]],["verdocs-search-tabs",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["verdocs-status-indicator",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"recipientStatusIcons":[32],"containerId":[32]}]]],["verdocs-template-card",[[0,"verdocs-template-card",{"template":[16]}]]],["verdocs-template-tags",[[0,"verdocs-template-tags",{"tags":[16]}]]],["verdocs-toggle",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["verdocs-initial-dialog",[[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}]]],["verdocs-signature-dialog",[[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}]]],["verdocs-view",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"]}]]],["verdocs-toggle-button",[[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["verdocs-contact-picker",[[0,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"name":[32],"email":[32],"phone":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32]}]]],["verdocs-radio-button",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["verdocs-template-role-properties_2",[[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]}]]],["verdocs-floating-menu_2",[[0,"verdocs-floating-menu",{"options":[16]}],[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}]]],["verdocs-template-create_2",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1,"template-id"],"placing":[32],"selectedRoleName":[32],"rerender":[32]}],[0,"verdocs-template-create",{"endpoint":[16],"file":[32],"creating":[32]}]]],["verdocs-ok-dialog",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"showCancel":[4,"show-cancel"]}]]],["verdocs-quick-functions_3",[[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]}]]],["verdocs-dropdown",[[0,"verdocs-dropdown",{"options":[16],"open":[32]}]]],["verdocs-document-page_2",[[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"]]],["verdocs-checkbox_4",[[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-text-input",{"value":[1],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"type":[1],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-help-icon",{"text":[1],"containerId":[32]}]]],["verdocs-button-panel_3",[[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]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -19,7 +19,7 @@ const VerdocsCheckbox = class {
|
|
|
19
19
|
};
|
|
20
20
|
VerdocsCheckbox.style = verdocsCheckboxCss;
|
|
21
21
|
|
|
22
|
-
const verdocsComponentErrorCss = "verdocs-component-error{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;display:-ms-flexbox;display:flex;padding:15px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-component-error .inner{-ms-flex:1;flex:1;height:300px;display:-ms-flexbox;display:flex;font-size:18px;background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}";
|
|
22
|
+
const verdocsComponentErrorCss = "verdocs-component-error{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;display:-ms-flexbox;display:flex;padding:15px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-component-error .inner{-ms-flex:1;flex:1;height:300px;display:-ms-flexbox;display:flex;font-size:18px;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 20px;background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}";
|
|
23
23
|
|
|
24
24
|
const VerdocsComponentError = class {
|
|
25
25
|
constructor(hostRef) {
|
|
@@ -46,7 +46,11 @@ const VerdocsFieldCheckbox = class {
|
|
|
46
46
|
if (this.done) {
|
|
47
47
|
return h(Host, { class: { done: this.done } }, option.checked ? '✓' : '☐');
|
|
48
48
|
}
|
|
49
|
-
return (h(Host, { class: { required: settings.required, disabled }, style: { backgroundColor } }, h("label", null, h("input", { type: "checkbox", tabIndex: settings.order, checked: option.checked, disabled: disabled, required: settings.required, value: option.id }), h("span", null), this.editable && (h("verdocs-button-panel", { icon: settingsIcon, id: `verdocs-settings-panel-${this.field.name}` }, h("h6", null, "Field Settings"), h("verdocs-template-field-properties", { templateId: state.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(),
|
|
49
|
+
return (h(Host, { class: { required: settings.required, disabled }, style: { backgroundColor } }, h("label", null, h("input", { type: "checkbox", tabIndex: settings.order, checked: option.checked, disabled: disabled, required: settings.required, value: option.id }), h("span", null), this.editable && (h("verdocs-button-panel", { icon: settingsIcon, id: `verdocs-settings-panel-${this.field.name}` }, h("h6", null, "Field Settings"), h("verdocs-template-field-properties", { templateId: state.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
|
50
|
+
var _a;
|
|
51
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
52
|
+
return this.hideSettingsPanel();
|
|
53
|
+
}, onSettingsChanged: e => {
|
|
50
54
|
var _a;
|
|
51
55
|
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
52
56
|
return this.hideSettingsPanel();
|
|
@@ -2617,7 +2617,11 @@ const VerdocsFieldDate = class {
|
|
|
2617
2617
|
const formatted = (settings === null || settings === void 0 ? void 0 : settings.result) ? format(new Date(settings === null || settings === void 0 ? void 0 : settings.result), 'MMM d, y') : '';
|
|
2618
2618
|
return h(Host, { class: { done: this.done } }, formatted);
|
|
2619
2619
|
}
|
|
2620
|
-
return (h(Host, { class: { required: settings.required, disabled }, style: { backgroundColor } }, h("input", { type: "text", value: "", id: this.containerId, disabled: disabled, placeholder: settings.placeholder, required: settings.required, ref: el => (this.el = el) }), this.editable && (h("verdocs-button-panel", { icon: settingsIcon, id: `verdocs-settings-panel-${this.field.name}` }, h("h6", null, "Field Settings"), h("verdocs-template-field-properties", { templateId: state.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(),
|
|
2620
|
+
return (h(Host, { class: { required: settings.required, disabled }, style: { backgroundColor } }, h("input", { type: "text", value: "", id: this.containerId, disabled: disabled, placeholder: settings.placeholder, required: settings.required, ref: el => (this.el = el) }), this.editable && (h("verdocs-button-panel", { icon: settingsIcon, id: `verdocs-settings-panel-${this.field.name}` }, h("h6", null, "Field Settings"), h("verdocs-template-field-properties", { templateId: state.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
|
2621
|
+
var _a;
|
|
2622
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
2623
|
+
return this.hideSettingsPanel();
|
|
2624
|
+
}, onSettingsChanged: e => {
|
|
2621
2625
|
var _a;
|
|
2622
2626
|
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
2623
2627
|
return this.hideSettingsPanel();
|
|
@@ -74,7 +74,11 @@ const VerdocsFieldInitial = class {
|
|
|
74
74
|
if (this.done) {
|
|
75
75
|
return h(Host, { class: { done: this.done } }, value && h("img", { src: value, alt: "Initials" }));
|
|
76
76
|
}
|
|
77
|
-
return (h(Host, { class: { required: settings.required, disabled }, style: { backgroundColor } }, value ? (h("img", { src: value, alt: "Initials" })) : (h("button", { class: {}, onClick: () => !disabled && this.handleShow() }, "Initials")), this.editable && (h("verdocs-button-panel", { icon: settingsIcon, id: `verdocs-settings-panel-${this.field.name}` }, h("h6", null, "Field Settings"), h("verdocs-template-field-properties", { templateId: state.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(),
|
|
77
|
+
return (h(Host, { class: { required: settings.required, disabled }, style: { backgroundColor } }, value ? (h("img", { src: value, alt: "Initials" })) : (h("button", { class: {}, onClick: () => !disabled && this.handleShow() }, "Initials")), this.editable && (h("verdocs-button-panel", { icon: settingsIcon, id: `verdocs-settings-panel-${this.field.name}` }, h("h6", null, "Field Settings"), h("verdocs-template-field-properties", { templateId: state.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
|
78
|
+
var _a;
|
|
79
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
80
|
+
return this.hideSettingsPanel();
|
|
81
|
+
}, onSettingsChanged: e => {
|
|
78
82
|
var _a;
|
|
79
83
|
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
80
84
|
return this.hideSettingsPanel();
|
|
@@ -50,7 +50,11 @@ const VerdocsFieldRadioButton = class {
|
|
|
50
50
|
if (this.done) {
|
|
51
51
|
return (h(Host, { class: { done: this.done }, style: { maxWidth: '10px' } }, h("span", { innerHTML: !!option.selected ? RadioIconSelected : RadioIconUnselected })));
|
|
52
52
|
}
|
|
53
|
-
return (h(Host, { class: { required, disabled }, style: { backgroundColor } }, h("input", { id: id, type: "radio", value: option.id, tabIndex: settings.order, name: this.field.name, checked: !!option.selected, disabled: disabled, required: settings.required }), h("label", { htmlFor: id }), this.editable && (h("verdocs-button-panel", { icon: settingsIcon, id: `verdocs-settings-panel-${this.field.name}` }, h("h6", null, "Field Settings"), h("verdocs-template-field-properties", { templateId: state.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(),
|
|
53
|
+
return (h(Host, { class: { required, disabled }, style: { backgroundColor } }, h("input", { id: id, type: "radio", value: option.id, tabIndex: settings.order, name: this.field.name, checked: !!option.selected, disabled: disabled, required: settings.required }), h("label", { htmlFor: id }), this.editable && (h("verdocs-button-panel", { icon: settingsIcon, id: `verdocs-settings-panel-${this.field.name}` }, h("h6", null, "Field Settings"), h("verdocs-template-field-properties", { templateId: state.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
|
54
|
+
var _a;
|
|
55
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
56
|
+
return this.hideSettingsPanel();
|
|
57
|
+
}, onSettingsChanged: e => {
|
|
54
58
|
var _a;
|
|
55
59
|
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
56
60
|
return this.hideSettingsPanel();
|
|
@@ -73,7 +73,11 @@ const VerdocsFieldSignature = class {
|
|
|
73
73
|
if (this.done) {
|
|
74
74
|
return h(Host, { class: { done: this.done } }, value && h("img", { src: value, alt: "Signature" }));
|
|
75
75
|
}
|
|
76
|
-
return (h(Host, { class: { required: (_c = this.field) === null || _c === void 0 ? void 0 : _c.required, disabled }, style: { backgroundColor } }, value ? h("img", { src: value, alt: "Signature" }) : h("button", { onClick: () => !disabled && this.handleShow() }, "Signature"), this.editable && (h("verdocs-button-panel", { icon: settingsIcon, id: `verdocs-settings-panel-${this.field.name}` }, h("h6", null, "Field Settings"), h("verdocs-template-field-properties", { templateId: state.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(),
|
|
76
|
+
return (h(Host, { class: { required: (_c = this.field) === null || _c === void 0 ? void 0 : _c.required, disabled }, style: { backgroundColor } }, value ? h("img", { src: value, alt: "Signature" }) : h("button", { onClick: () => !disabled && this.handleShow() }, "Signature"), this.editable && (h("verdocs-button-panel", { icon: settingsIcon, id: `verdocs-settings-panel-${this.field.name}` }, h("h6", null, "Field Settings"), h("verdocs-template-field-properties", { templateId: state.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
|
77
|
+
var _a;
|
|
78
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
79
|
+
return this.hideSettingsPanel();
|
|
80
|
+
}, onSettingsChanged: e => {
|
|
77
81
|
var _a;
|
|
78
82
|
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
79
83
|
return this.hideSettingsPanel();
|
|
@@ -47,7 +47,11 @@ const VerdocsFieldTextarea = class {
|
|
|
47
47
|
if (this.done) {
|
|
48
48
|
return h(Host, { class: { done: this.done } }, settings.value);
|
|
49
49
|
}
|
|
50
|
-
return (h(Host, { class: { required: settings.required, disabled }, style: { backgroundColor } }, h("textarea", { placeholder: settings.placeholder || '', tabIndex: settings.order, value: settings.value, disabled: disabled, required: settings.required, ref: el => (this.el = el) }), this.editable && (h("verdocs-button-panel", { icon: settingsIcon, id: `verdocs-settings-panel-${this.field.name}` }, h("h6", null, "Field Settings"), h("verdocs-template-field-properties", { templateId: state.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(),
|
|
50
|
+
return (h(Host, { class: { required: settings.required, disabled }, style: { backgroundColor } }, h("textarea", { placeholder: settings.placeholder || '', tabIndex: settings.order, value: settings.value, disabled: disabled, required: settings.required, ref: el => (this.el = el) }), this.editable && (h("verdocs-button-panel", { icon: settingsIcon, id: `verdocs-settings-panel-${this.field.name}` }, h("h6", null, "Field Settings"), h("verdocs-template-field-properties", { templateId: state.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
|
51
|
+
var _a;
|
|
52
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
53
|
+
return this.hideSettingsPanel();
|
|
54
|
+
}, onSettingsChanged: e => {
|
|
51
55
|
var _a;
|
|
52
56
|
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
53
57
|
return this.hideSettingsPanel();
|
|
@@ -48,7 +48,11 @@ const VerdocsFieldTextbox = class {
|
|
|
48
48
|
if (this.done) {
|
|
49
49
|
return h(Host, { class: { done: this.done } }, value);
|
|
50
50
|
}
|
|
51
|
-
return (h(Host, { class: { required: (_c = this.field) === null || _c === void 0 ? void 0 : _c.required, disabled, done: this.done }, style: { backgroundColor } }, h("input", { type: "text", placeholder: settings === null || settings === void 0 ? void 0 : settings.placeholder, tabIndex: settings === null || settings === void 0 ? void 0 : settings.order, value: value, disabled: disabled, required: (_d = this.field) === null || _d === void 0 ? void 0 : _d.required, ref: el => (this.el = el) }), this.editable && (h("verdocs-button-panel", { icon: settingsIcon, id: `verdocs-settings-panel-${this.field.name}` }, h("h6", null, "Field Settings"), h("verdocs-template-field-properties", { templateId: state.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(),
|
|
51
|
+
return (h(Host, { class: { required: (_c = this.field) === null || _c === void 0 ? void 0 : _c.required, disabled, done: this.done }, style: { backgroundColor } }, h("input", { type: "text", placeholder: settings === null || settings === void 0 ? void 0 : settings.placeholder, tabIndex: settings === null || settings === void 0 ? void 0 : settings.order, value: value, disabled: disabled, required: (_d = this.field) === null || _d === void 0 ? void 0 : _d.required, ref: el => (this.el = el) }), this.editable && (h("verdocs-button-panel", { icon: settingsIcon, id: `verdocs-settings-panel-${this.field.name}` }, h("h6", null, "Field Settings"), h("verdocs-template-field-properties", { templateId: state.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
|
52
|
+
var _a;
|
|
53
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
54
|
+
return this.hideSettingsPanel();
|
|
55
|
+
}, onSettingsChanged: e => {
|
|
52
56
|
var _a;
|
|
53
57
|
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
54
58
|
return this.hideSettingsPanel();
|
|
@@ -53,7 +53,11 @@ const VerdocsFieldTimestamp = class {
|
|
|
53
53
|
return (h(Host, { class: { required: (_c = this.field) === null || _c === void 0 ? void 0 : _c.required, disabled }, style: { backgroundColor } }, h("input", { type: "text", placeholder: settings === null || settings === void 0 ? void 0 : settings.placeholder, tabIndex: settings === null || settings === void 0 ? void 0 : settings.order,
|
|
54
54
|
// TODO: It would really make more sense to show the date and time but the default width of 64px for this field
|
|
55
55
|
// is encoded in a ton of existing entries in the database and is hard to change.
|
|
56
|
-
value: formatted, disabled: true, ref: el => (this.el = el) }), this.editable && (h("verdocs-button-panel", { icon: settingsIcon, id: `verdocs-settings-panel-${this.field.name}` }, h("h6", null, "Field Settings"), h("verdocs-template-field-properties", { templateId: state.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(),
|
|
56
|
+
value: formatted, disabled: true, ref: el => (this.el = el) }), this.editable && (h("verdocs-button-panel", { icon: settingsIcon, id: `verdocs-settings-panel-${this.field.name}` }, h("h6", null, "Field Settings"), h("verdocs-template-field-properties", { templateId: state.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
|
57
|
+
var _a;
|
|
58
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
59
|
+
return this.hideSettingsPanel();
|
|
60
|
+
}, onSettingsChanged: e => {
|
|
57
61
|
var _a;
|
|
58
62
|
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
59
63
|
return this.hideSettingsPanel();
|
|
@@ -34,6 +34,9 @@ const VerdocsTemplateAttachments = class {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
render() {
|
|
37
|
+
if (!this.endpoint.session) {
|
|
38
|
+
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
|
39
|
+
}
|
|
37
40
|
if (this.loading) {
|
|
38
41
|
return (h(Host, { class: "loading" }, h("verdocs-loader", null)));
|
|
39
42
|
}
|
|
@@ -125,12 +125,12 @@ const iconDatepicker = '<svg xmlns="http://www.w3.org/2000/svg" height="24" widt
|
|
|
125
125
|
const iconSignature = '<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>';
|
|
126
126
|
const iconInitial = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>';
|
|
127
127
|
const menuOptions = [
|
|
128
|
-
{
|
|
128
|
+
// {id: 'attachment', tooltip: 'Attachment', icon: 'A'},
|
|
129
129
|
{ id: 'checkbox', tooltip: 'Check Box', icon: iconCheck },
|
|
130
130
|
{ id: 'date', tooltip: 'Date', icon: iconDatepicker },
|
|
131
131
|
{ id: 'dropdown', tooltip: 'Dropdown', icon: 'O' },
|
|
132
132
|
{ id: 'initial', tooltip: 'Initials', icon: iconInitial },
|
|
133
|
-
{
|
|
133
|
+
// {id: 'payment', tooltip: 'Payment', icon: 'P'},
|
|
134
134
|
{ id: 'radio', tooltip: 'Radio Button', icon: iconRadio },
|
|
135
135
|
{ id: 'signature', tooltip: 'Signature', icon: iconSignature },
|
|
136
136
|
{ id: 'textarea', tooltip: 'Text Area', icon: iconMultiline },
|
|
@@ -150,6 +150,7 @@ const VerdocsTemplateFields = class {
|
|
|
150
150
|
this.templateId = null;
|
|
151
151
|
this.placing = null;
|
|
152
152
|
this.selectedRoleName = '';
|
|
153
|
+
this.rerender = 1;
|
|
153
154
|
}
|
|
154
155
|
async componentWillLoad() {
|
|
155
156
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -184,12 +185,15 @@ const VerdocsTemplateFields = class {
|
|
|
184
185
|
}
|
|
185
186
|
async handleFieldChange(field, e, optionId) {
|
|
186
187
|
console.log('[FIELDS] handleFieldChange', field, e, optionId);
|
|
188
|
+
this.rerender++;
|
|
187
189
|
}
|
|
188
190
|
attachFieldAttributes(pageInfo, field, roleIndex, el) {
|
|
189
191
|
el.addEventListener('input', e => this.handleFieldChange(field, e));
|
|
190
192
|
el.addEventListener('settingsChanged', () => {
|
|
191
193
|
var _a;
|
|
194
|
+
console.log('settings changed', this, field);
|
|
192
195
|
el.setAttribute('roleindex', getRoleIndex(state.roleNames, field.role_name));
|
|
196
|
+
this.rerender++;
|
|
193
197
|
(_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: state.template, event: 'updated-field' });
|
|
194
198
|
});
|
|
195
199
|
el.setAttribute('roleindex', roleIndex);
|
|
@@ -338,7 +342,6 @@ const VerdocsTemplateFields = class {
|
|
|
338
342
|
}
|
|
339
343
|
}
|
|
340
344
|
render() {
|
|
341
|
-
console.log('rendering', state.updateCount);
|
|
342
345
|
if (!this.endpoint.session) {
|
|
343
346
|
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
|
344
347
|
}
|
|
@@ -348,7 +351,7 @@ const VerdocsTemplateFields = class {
|
|
|
348
351
|
}
|
|
349
352
|
const pages = [...state.template.pages];
|
|
350
353
|
pages.sort((a, b) => a.sequence - b.sequence);
|
|
351
|
-
return (h(Host, { class: this.placing ? { [`placing-${this.placing}`]: true } : {}, "data-r":
|
|
354
|
+
return (h(Host, { class: this.placing ? { [`placing-${this.placing}`]: true } : {}, "data-r": this.rerender, onSubmit: () => {
|
|
352
355
|
console.log('onSubmit');
|
|
353
356
|
} }, h("div", { class: "pages" }, pages.map(page => {
|
|
354
357
|
// console.log('rendering page', page);
|
|
@@ -52,13 +52,12 @@ const VerdocsTemplateName = class {
|
|
|
52
52
|
(_a = this.close) === null || _a === void 0 ? void 0 : _a.emit();
|
|
53
53
|
}
|
|
54
54
|
render() {
|
|
55
|
+
if (!this.endpoint.session) {
|
|
56
|
+
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
|
57
|
+
}
|
|
55
58
|
if (this.loading) {
|
|
56
59
|
return (h(Host, { class: "loading" }, h("verdocs-loader", null)));
|
|
57
60
|
}
|
|
58
|
-
// This is meant to be a companion for larger visual experiences so we just go blank on errors for now.
|
|
59
|
-
if (!this.endpoint.session || !state.template) {
|
|
60
|
-
return h(Host, { class: "empty" });
|
|
61
|
-
}
|
|
62
61
|
return (h(Host, null, h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("label", { htmlFor: "verdocs-template-name" }, "Template Name"), h("verdocs-text-input", { id: "verdocs-template-name", value: this.name, autocomplete: "off", placeholder: "Template Name...", onInput: (e) => {
|
|
63
62
|
this.name = e.target.value;
|
|
64
63
|
this.dirty = this.name !== state.template.name;
|