@verdocs/web-sdk 1.11.0 → 1.11.2
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 +23 -15
- package/dist/cjs/verdocs-template-name.cjs.entry.js +5 -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-create/verdocs-template-create.css +14 -0
- package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.js +14 -9
- 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 +5 -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-create2.js +26 -15
- package/dist/components/verdocs-template-fields2.js +9 -5
- package/dist/components/verdocs-template-name.js +13 -6
- package/dist/components/verdocs-template-recipients.js +52 -12
- package/dist/components/verdocs-view2.js +1 -1
- package/dist/docs.json +26 -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 +23 -15
- package/dist/esm/verdocs-template-name.entry.js +5 -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-70ad917b.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-32f9b201.system.entry.js → p-7d8de5d6.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-80d98971.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-cdff8cba.system.entry.js → p-8644dd0f.system.entry.js} +1 -1
- 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-bde3d383.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-c16b6ca4.system.js +1 -1
- package/dist/verdocs-web-sdk/p-c95c8e1f.system.entry.js +1 -0
- 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 +2 -2
- 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-bea9fe06.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c9eb3771.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d06946ca.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-dd06fb2a.entry.js +0 -1
|
@@ -104,7 +104,7 @@ export class VerdocsView {
|
|
|
104
104
|
menuOptions.push({ label: '' });
|
|
105
105
|
}
|
|
106
106
|
if (hasAttachments) {
|
|
107
|
-
menuOptions.push({ id: 'download-attachments', label: 'Download
|
|
107
|
+
menuOptions.push({ id: 'download-attachments', label: 'Download Documents(s)' });
|
|
108
108
|
}
|
|
109
109
|
if (hasCertificate) {
|
|
110
110
|
menuOptions.push({ id: 'download-certificate', label: 'Download Certificate' });
|
|
@@ -38,7 +38,11 @@ export class VerdocsFieldCheckbox {
|
|
|
38
38
|
if (this.done) {
|
|
39
39
|
return h(Host, { class: { done: this.done } }, option.checked ? '✓' : '☐');
|
|
40
40
|
}
|
|
41
|
-
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: TemplateStore.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(),
|
|
41
|
+
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: TemplateStore.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
|
42
|
+
var _a;
|
|
43
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
44
|
+
return this.hideSettingsPanel();
|
|
45
|
+
}, onSettingsChanged: e => {
|
|
42
46
|
var _a;
|
|
43
47
|
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
44
48
|
return this.hideSettingsPanel();
|
|
@@ -61,7 +61,11 @@ export class VerdocsFieldDate {
|
|
|
61
61
|
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') : '';
|
|
62
62
|
return h(Host, { class: { done: this.done } }, formatted);
|
|
63
63
|
}
|
|
64
|
-
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: TemplateStore.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(),
|
|
64
|
+
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: TemplateStore.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
|
65
|
+
var _a;
|
|
66
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
67
|
+
return this.hideSettingsPanel();
|
|
68
|
+
}, onSettingsChanged: e => {
|
|
65
69
|
var _a;
|
|
66
70
|
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
67
71
|
return this.hideSettingsPanel();
|
|
@@ -63,7 +63,11 @@ export class VerdocsFieldInitial {
|
|
|
63
63
|
if (this.done) {
|
|
64
64
|
return h(Host, { class: { done: this.done } }, value && h("img", { src: value, alt: "Initials" }));
|
|
65
65
|
}
|
|
66
|
-
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: TemplateStore.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(),
|
|
66
|
+
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: TemplateStore.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
|
67
|
+
var _a;
|
|
68
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
69
|
+
return this.hideSettingsPanel();
|
|
70
|
+
}, onSettingsChanged: e => {
|
|
67
71
|
var _a;
|
|
68
72
|
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
69
73
|
return this.hideSettingsPanel();
|
|
@@ -42,7 +42,11 @@ export class VerdocsFieldRadioButton {
|
|
|
42
42
|
if (this.done) {
|
|
43
43
|
return (h(Host, { class: { done: this.done }, style: { maxWidth: '10px' } }, h("span", { innerHTML: !!option.selected ? RadioIconSelected : RadioIconUnselected })));
|
|
44
44
|
}
|
|
45
|
-
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: TemplateStore.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(),
|
|
45
|
+
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: TemplateStore.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
|
46
|
+
var _a;
|
|
47
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
48
|
+
return this.hideSettingsPanel();
|
|
49
|
+
}, onSettingsChanged: e => {
|
|
46
50
|
var _a;
|
|
47
51
|
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
48
52
|
return this.hideSettingsPanel();
|
package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.js
CHANGED
|
@@ -64,7 +64,11 @@ export class VerdocsFieldSignature {
|
|
|
64
64
|
if (this.done) {
|
|
65
65
|
return h(Host, { class: { done: this.done } }, value && h("img", { src: value, alt: "Signature" }));
|
|
66
66
|
}
|
|
67
|
-
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: TemplateStore.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(),
|
|
67
|
+
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: TemplateStore.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
|
68
|
+
var _a;
|
|
69
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
70
|
+
return this.hideSettingsPanel();
|
|
71
|
+
}, onSettingsChanged: e => {
|
|
68
72
|
var _a;
|
|
69
73
|
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
70
74
|
return this.hideSettingsPanel();
|
|
@@ -39,7 +39,11 @@ export class VerdocsFieldTextarea {
|
|
|
39
39
|
if (this.done) {
|
|
40
40
|
return h(Host, { class: { done: this.done } }, settings.value);
|
|
41
41
|
}
|
|
42
|
-
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: TemplateStore.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(),
|
|
42
|
+
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: TemplateStore.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
|
43
|
+
var _a;
|
|
44
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
45
|
+
return this.hideSettingsPanel();
|
|
46
|
+
}, onSettingsChanged: e => {
|
|
43
47
|
var _a;
|
|
44
48
|
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
45
49
|
return this.hideSettingsPanel();
|
|
@@ -40,7 +40,11 @@ export class VerdocsFieldTextbox {
|
|
|
40
40
|
if (this.done) {
|
|
41
41
|
return h(Host, { class: { done: this.done } }, value);
|
|
42
42
|
}
|
|
43
|
-
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: TemplateStore.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(),
|
|
43
|
+
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: TemplateStore.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
|
44
|
+
var _a;
|
|
45
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
46
|
+
return this.hideSettingsPanel();
|
|
47
|
+
}, onSettingsChanged: e => {
|
|
44
48
|
var _a;
|
|
45
49
|
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
46
50
|
return this.hideSettingsPanel();
|
package/dist/collection/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.js
CHANGED
|
@@ -46,7 +46,11 @@ export class VerdocsFieldTimestamp {
|
|
|
46
46
|
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,
|
|
47
47
|
// TODO: It would really make more sense to show the date and time but the default width of 64px for this field
|
|
48
48
|
// is encoded in a ton of existing entries in the database and is hard to change.
|
|
49
|
-
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: TemplateStore.templateId, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(),
|
|
49
|
+
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: TemplateStore.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();
|
|
@@ -28,6 +28,9 @@ export class VerdocsTemplateAttachments {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
|
+
if (!this.endpoint.session) {
|
|
32
|
+
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
|
33
|
+
}
|
|
31
34
|
if (this.loading) {
|
|
32
35
|
return (h(Host, { class: "loading" }, h("verdocs-loader", null)));
|
|
33
36
|
}
|
package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.css
CHANGED
|
@@ -8,6 +8,7 @@ verdocs-template-create form {
|
|
|
8
8
|
flex-direction: column;
|
|
9
9
|
}
|
|
10
10
|
verdocs-template-create form .upload-box {
|
|
11
|
+
box-sizing: border-box;
|
|
11
12
|
max-width: 320px;
|
|
12
13
|
text-align: center;
|
|
13
14
|
padding: 44px 18px 66px;
|
|
@@ -18,6 +19,19 @@ verdocs-template-create form .upload-box svg {
|
|
|
18
19
|
width: 64px;
|
|
19
20
|
fill: #5c6575;
|
|
20
21
|
}
|
|
22
|
+
verdocs-template-create .loader-wrapper {
|
|
23
|
+
background-color: #ffffff;
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
position: relative;
|
|
28
|
+
width: 320px;
|
|
29
|
+
height: 320px;
|
|
30
|
+
text-align: center;
|
|
31
|
+
border: 2px dashed #979797;
|
|
32
|
+
justify-content: flex-end;
|
|
33
|
+
padding: 0 0 30px 0;
|
|
34
|
+
}
|
|
21
35
|
verdocs-template-create .buttons {
|
|
22
36
|
display: flex;
|
|
23
37
|
column-gap: 8px;
|
package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.js
CHANGED
|
@@ -3,8 +3,6 @@ import { h, Host } from '@stencil/core';
|
|
|
3
3
|
import { createTemplateDocument } from '@verdocs/js-sdk/Templates/TemplateDocuments';
|
|
4
4
|
import { createTemplate, getTemplate } from '@verdocs/js-sdk/Templates/Templates';
|
|
5
5
|
import { SDKError } from '../../../utils/errors';
|
|
6
|
-
// import {ITemplate, ITemplateDocument} from '@verdocs/js-sdk/Templates/Types';
|
|
7
|
-
// import {createPage} from '@verdocs/js-sdk/Templates/Pages';
|
|
8
6
|
const unicodeNBSP = ' ';
|
|
9
7
|
const FileIcon = '<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>';
|
|
10
8
|
/**
|
|
@@ -23,9 +21,8 @@ export class VerdocsTemplateCreate {
|
|
|
23
21
|
}
|
|
24
22
|
handleFileChanged(e) {
|
|
25
23
|
var _a;
|
|
26
|
-
console.log('files', e.target.files);
|
|
27
24
|
this.file = ((_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0]) || null;
|
|
28
|
-
console.log('Selected file', this.file);
|
|
25
|
+
console.log('[CREATE] Selected file', this.file);
|
|
29
26
|
// this.filePath = e.target.files?.[0]?.name;
|
|
30
27
|
}
|
|
31
28
|
handleUpload(e) {
|
|
@@ -45,30 +42,38 @@ export class VerdocsTemplateCreate {
|
|
|
45
42
|
if (!this.file) {
|
|
46
43
|
return;
|
|
47
44
|
}
|
|
45
|
+
this.creating = true;
|
|
48
46
|
try {
|
|
49
47
|
const template = await createTemplate(this.endpoint, { name: this.file.name });
|
|
50
|
-
console.log('
|
|
48
|
+
console.log('[CREATE] Created template', template);
|
|
51
49
|
const template_document = await createTemplateDocument(this.endpoint, template.id, this.file);
|
|
52
|
-
console.log('
|
|
50
|
+
console.log('[CREATE] Created document', template_document);
|
|
53
51
|
const finalTemplate = await getTemplate(this.endpoint, template.id);
|
|
54
|
-
console.log('[CREATE]
|
|
52
|
+
console.log('[CREATE] Retrieved new template', finalTemplate);
|
|
55
53
|
// for await (let pageNumber of Array.from(Array(template_document.page_numbers).keys(), n => n + 1)) {
|
|
56
54
|
// console.log('Updating page', pageNumber);
|
|
57
55
|
// const page = await createPage(this.endpoint, template.id, {sequence: pageNumber, page_number: pageNumber, document_id: template_document.id});
|
|
58
56
|
// console.log('Created page', page);
|
|
59
57
|
// }
|
|
60
58
|
(_a = this.next) === null || _a === void 0 ? void 0 : _a.emit(finalTemplate);
|
|
59
|
+
this.creating = false;
|
|
61
60
|
}
|
|
62
61
|
catch (e) {
|
|
63
|
-
console.log('[
|
|
62
|
+
console.log('[CREATE] Error creating template', e);
|
|
64
63
|
(_b = this.sdkError) === null || _b === void 0 ? void 0 : _b.emit(new SDKError(e.message, (_c = e.response) === null || _c === void 0 ? void 0 : _c.status, (_d = e.response) === null || _d === void 0 ? void 0 : _d.data));
|
|
64
|
+
this.creating = false;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
render() {
|
|
68
68
|
if (!this.endpoint.session) {
|
|
69
69
|
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
|
70
70
|
}
|
|
71
|
-
return (h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("input", { type: "file", id: "verdocs-template-create-file", multiple: true, accept: "application/pdf", style: { display: 'none' }, onChange: e => this.handleFileChanged(e) }), h("div", { class: "
|
|
71
|
+
return (h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("input", { type: "file", id: "verdocs-template-create-file", multiple: true, accept: "application/pdf", style: { display: 'none' }, onChange: e => this.handleFileChanged(e) }), this.creating ? (h("div", { class: "loader-wrapper" }, h("verdocs-loader", null), h("div", { class: "loading-text" }, "Uploading, please wait..."))) : (h("div", { class: "upload-box" }, h("div", null, h("span", { innerHTML: FileIcon })), h("div", { style: { marginTop: '20px', fontSize: '20px', fontWeight: 'bold' } }, this.file ? this.file.name : 'Drag a file here'), h("div", { style: {
|
|
72
|
+
marginTop: '20px',
|
|
73
|
+
marginBottom: '20px',
|
|
74
|
+
fontSize: '16px',
|
|
75
|
+
height: '20px',
|
|
76
|
+
} }, this.file ? unicodeNBSP : 'Or, if you prefer...'), h("verdocs-button", { label: this.file ? 'Select a different file' : 'Select a file from your computer', size: "small", onClick: e => this.handleUpload(e) }))), h("div", { class: "buttons" }, h("verdocs-button", { variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e), disabled: this.creating }), h("verdocs-button", { label: "Next", size: "small", onClick: e => this.handleSubmit(e), disabled: !this.file || this.creating }))));
|
|
72
77
|
}
|
|
73
78
|
static get is() { return "verdocs-template-create"; }
|
|
74
79
|
static get originalStyleUrls() {
|
package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js
CHANGED
|
@@ -14,12 +14,12 @@ const iconDatepicker = '<svg xmlns="http://www.w3.org/2000/svg" height="24" widt
|
|
|
14
14
|
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>';
|
|
15
15
|
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>';
|
|
16
16
|
const menuOptions = [
|
|
17
|
-
{
|
|
17
|
+
// {id: 'attachment', tooltip: 'Attachment', icon: 'A'},
|
|
18
18
|
{ id: 'checkbox', tooltip: 'Check Box', icon: iconCheck },
|
|
19
19
|
{ id: 'date', tooltip: 'Date', icon: iconDatepicker },
|
|
20
20
|
{ id: 'dropdown', tooltip: 'Dropdown', icon: 'O' },
|
|
21
21
|
{ id: 'initial', tooltip: 'Initials', icon: iconInitial },
|
|
22
|
-
{
|
|
22
|
+
// {id: 'payment', tooltip: 'Payment', icon: 'P'},
|
|
23
23
|
{ id: 'radio', tooltip: 'Radio Button', icon: iconRadio },
|
|
24
24
|
{ id: 'signature', tooltip: 'Signature', icon: iconSignature },
|
|
25
25
|
{ id: 'textarea', tooltip: 'Text Area', icon: iconMultiline },
|
|
@@ -38,6 +38,7 @@ export class VerdocsTemplateFields {
|
|
|
38
38
|
this.templateId = null;
|
|
39
39
|
this.placing = null;
|
|
40
40
|
this.selectedRoleName = '';
|
|
41
|
+
this.rerender = 1;
|
|
41
42
|
}
|
|
42
43
|
async componentWillLoad() {
|
|
43
44
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -72,12 +73,15 @@ export class VerdocsTemplateFields {
|
|
|
72
73
|
}
|
|
73
74
|
async handleFieldChange(field, e, optionId) {
|
|
74
75
|
console.log('[FIELDS] handleFieldChange', field, e, optionId);
|
|
76
|
+
this.rerender++;
|
|
75
77
|
}
|
|
76
78
|
attachFieldAttributes(pageInfo, field, roleIndex, el) {
|
|
77
79
|
el.addEventListener('input', e => this.handleFieldChange(field, e));
|
|
78
80
|
el.addEventListener('settingsChanged', () => {
|
|
79
81
|
var _a;
|
|
82
|
+
console.log('settings changed', this, field);
|
|
80
83
|
el.setAttribute('roleindex', getRoleIndex(TemplateStore.roleNames, field.role_name));
|
|
84
|
+
this.rerender++;
|
|
81
85
|
(_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: TemplateStore.template, event: 'updated-field' });
|
|
82
86
|
});
|
|
83
87
|
el.setAttribute('roleindex', roleIndex);
|
|
@@ -226,7 +230,6 @@ export class VerdocsTemplateFields {
|
|
|
226
230
|
}
|
|
227
231
|
}
|
|
228
232
|
render() {
|
|
229
|
-
console.log('rendering', TemplateStore.updateCount);
|
|
230
233
|
if (!this.endpoint.session) {
|
|
231
234
|
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
|
232
235
|
}
|
|
@@ -236,7 +239,7 @@ export class VerdocsTemplateFields {
|
|
|
236
239
|
}
|
|
237
240
|
const pages = [...TemplateStore.template.pages];
|
|
238
241
|
pages.sort((a, b) => a.sequence - b.sequence);
|
|
239
|
-
return (h(Host, { class: this.placing ? { [`placing-${this.placing}`]: true } : {}, "data-r":
|
|
242
|
+
return (h(Host, { class: this.placing ? { [`placing-${this.placing}`]: true } : {}, "data-r": this.rerender, onSubmit: () => {
|
|
240
243
|
console.log('onSubmit');
|
|
241
244
|
} }, h("div", { class: "pages" }, pages.map(page => {
|
|
242
245
|
// console.log('rendering page', page);
|
|
@@ -305,7 +308,8 @@ export class VerdocsTemplateFields {
|
|
|
305
308
|
static get states() {
|
|
306
309
|
return {
|
|
307
310
|
"placing": {},
|
|
308
|
-
"selectedRoleName": {}
|
|
311
|
+
"selectedRoleName": {},
|
|
312
|
+
"rerender": {}
|
|
309
313
|
};
|
|
310
314
|
}
|
|
311
315
|
static get events() {
|
|
@@ -35,6 +35,7 @@ export class VerdocsTemplateName {
|
|
|
35
35
|
e.stopPropagation();
|
|
36
36
|
this.name = TemplateStore.template.name;
|
|
37
37
|
this.dirty = false;
|
|
38
|
+
console.log('Closing');
|
|
38
39
|
(_a = this.close) === null || _a === void 0 ? void 0 : _a.emit();
|
|
39
40
|
}
|
|
40
41
|
async handleSave(e) {
|
|
@@ -43,16 +44,16 @@ export class VerdocsTemplateName {
|
|
|
43
44
|
await updateTemplate(this.endpoint, this.templateId, { name: this.name });
|
|
44
45
|
TemplateStore.template.name = this.name;
|
|
45
46
|
this.dirty = false;
|
|
47
|
+
console.log('Closing');
|
|
46
48
|
(_a = this.close) === null || _a === void 0 ? void 0 : _a.emit();
|
|
47
49
|
}
|
|
48
50
|
render() {
|
|
51
|
+
if (!this.endpoint.session) {
|
|
52
|
+
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
|
53
|
+
}
|
|
49
54
|
if (this.loading) {
|
|
50
55
|
return (h(Host, { class: "loading" }, h("verdocs-loader", null)));
|
|
51
56
|
}
|
|
52
|
-
// This is meant to be a companion for larger visual experiences so we just go blank on errors for now.
|
|
53
|
-
if (!this.endpoint.session || !TemplateStore.template) {
|
|
54
|
-
return h(Host, { class: "empty" });
|
|
55
|
-
}
|
|
56
57
|
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) => {
|
|
57
58
|
this.name = e.target.value;
|
|
58
59
|
this.dirty = this.name !== TemplateStore.template.name;
|
|
@@ -31,6 +31,7 @@ verdocs-template-recipients > form .left-line {
|
|
|
31
31
|
verdocs-template-recipients > form .row {
|
|
32
32
|
display: flex;
|
|
33
33
|
column-gap: 0;
|
|
34
|
+
min-height: 35px;
|
|
34
35
|
margin-left: 40px;
|
|
35
36
|
position: relative;
|
|
36
37
|
flex-direction: row;
|
|
@@ -160,6 +161,21 @@ verdocs-template-recipients .add-role svg {
|
|
|
160
161
|
width: 32px;
|
|
161
162
|
height: 32px;
|
|
162
163
|
}
|
|
164
|
+
verdocs-template-recipients .add-step {
|
|
165
|
+
margin: 0;
|
|
166
|
+
padding: 0;
|
|
167
|
+
border: none;
|
|
168
|
+
opacity: 0.5;
|
|
169
|
+
cursor: pointer;
|
|
170
|
+
background: none;
|
|
171
|
+
}
|
|
172
|
+
verdocs-template-recipients .add-step:hover {
|
|
173
|
+
opacity: 1;
|
|
174
|
+
}
|
|
175
|
+
verdocs-template-recipients .add-step svg {
|
|
176
|
+
width: 32px;
|
|
177
|
+
height: 32px;
|
|
178
|
+
}
|
|
163
179
|
verdocs-template-recipients.dragging .add-role {
|
|
164
180
|
display: none;
|
|
165
181
|
}
|
|
@@ -185,17 +185,47 @@ export class VerdocsTemplateRecipients {
|
|
|
185
185
|
// Now re-extract them to get our final result e.g. [1, 2, 3]
|
|
186
186
|
this.extractSequenceNumbers();
|
|
187
187
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
// We don't need to look for a unique order number because we're already working with a sorted/renumbered set by now.
|
|
191
|
-
const order = TemplateStore.template.roles.filter(role => role.sequence === sequence).length + 1;
|
|
192
|
-
// We do need to look for name conflicts because they're UGC and can be anything, regardless of order.
|
|
188
|
+
// Look for name conflicts, because they're UGC and can be anything, regardless of order.
|
|
189
|
+
getNextRecipientName() {
|
|
193
190
|
let name = '';
|
|
194
191
|
let nextNumber = TemplateStore.template.roles.length;
|
|
195
192
|
do {
|
|
196
193
|
nextNumber++;
|
|
197
194
|
name = `Recipient ${nextNumber}`;
|
|
198
195
|
} while (!name || TemplateStore.template.roles.some(role => role.name === name));
|
|
196
|
+
return name;
|
|
197
|
+
}
|
|
198
|
+
handleAddRole(e, sequence) {
|
|
199
|
+
e.stopPropagation();
|
|
200
|
+
// We don't need to look for a unique order number because we're already working with a sorted/renumbered set by now.
|
|
201
|
+
const order = TemplateStore.template.roles.filter(role => role.sequence === sequence).length + 1;
|
|
202
|
+
const name = this.getNextRecipientName();
|
|
203
|
+
console.log('Will create', name, sequence, order);
|
|
204
|
+
createRole(this.endpoint, this.templateId, {
|
|
205
|
+
template_id: this.templateId,
|
|
206
|
+
name,
|
|
207
|
+
full_name: '',
|
|
208
|
+
email: '',
|
|
209
|
+
phone: '',
|
|
210
|
+
sequence,
|
|
211
|
+
order,
|
|
212
|
+
type: 'signer',
|
|
213
|
+
delegator: false,
|
|
214
|
+
})
|
|
215
|
+
.then(r => {
|
|
216
|
+
console.log('Created role', r);
|
|
217
|
+
TemplateStore.template.roles.push(r);
|
|
218
|
+
this.renumberTemplateRoles();
|
|
219
|
+
this.forceRerender++;
|
|
220
|
+
})
|
|
221
|
+
.catch(e => {
|
|
222
|
+
console.log('Error creating role', e);
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
handleAddStep(e, sequence) {
|
|
226
|
+
e.stopPropagation();
|
|
227
|
+
const order = 1;
|
|
228
|
+
const name = this.getNextRecipientName();
|
|
199
229
|
console.log('Will create', name, sequence, order);
|
|
200
230
|
createRole(this.endpoint, this.templateId, {
|
|
201
231
|
template_id: this.templateId,
|
|
@@ -219,12 +249,16 @@ export class VerdocsTemplateRecipients {
|
|
|
219
249
|
});
|
|
220
250
|
}
|
|
221
251
|
render() {
|
|
222
|
-
|
|
252
|
+
var _a;
|
|
253
|
+
if (!this.endpoint.session) {
|
|
254
|
+
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
|
255
|
+
}
|
|
256
|
+
const roleNames = (((_a = TemplateStore.template) === null || _a === void 0 ? void 0 : _a.roles) || []).map(role => role.name);
|
|
223
257
|
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[TemplateStore.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 }), TemplateStore.template.roles
|
|
224
258
|
.filter(role => role.sequence === sequence)
|
|
225
259
|
.map(role => {
|
|
226
260
|
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 })));
|
|
227
|
-
}), 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: () => {
|
|
261
|
+
}), 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: () => {
|
|
228
262
|
this.showingRoleDialog = null;
|
|
229
263
|
this.forceRerender++;
|
|
230
264
|
}, onDelete: e => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
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}";
|
|
3
|
+
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}";
|
|
4
4
|
|
|
5
5
|
const VerdocsComponentError = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
@@ -49,7 +49,11 @@ const VerdocsFieldCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
|
49
49
|
if (this.done) {
|
|
50
50
|
return h(Host, { class: { done: this.done } }, option.checked ? '✓' : '☐');
|
|
51
51
|
}
|
|
52
|
-
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(),
|
|
52
|
+
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: () => {
|
|
53
|
+
var _a;
|
|
54
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
55
|
+
return this.hideSettingsPanel();
|
|
56
|
+
}, onSettingsChanged: e => {
|
|
53
57
|
var _a;
|
|
54
58
|
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
55
59
|
return this.hideSettingsPanel();
|
|
@@ -2621,7 +2621,11 @@ const VerdocsFieldDate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
2621
2621
|
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') : '';
|
|
2622
2622
|
return h(Host, { class: { done: this.done } }, formatted);
|
|
2623
2623
|
}
|
|
2624
|
-
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(),
|
|
2624
|
+
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: () => {
|
|
2625
|
+
var _a;
|
|
2626
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
2627
|
+
return this.hideSettingsPanel();
|
|
2628
|
+
}, onSettingsChanged: e => {
|
|
2625
2629
|
var _a;
|
|
2626
2630
|
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
2627
2631
|
return this.hideSettingsPanel();
|
|
@@ -78,7 +78,11 @@ const VerdocsFieldInitial$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
78
78
|
if (this.done) {
|
|
79
79
|
return h(Host, { class: { done: this.done } }, value && h("img", { src: value, alt: "Initials" }));
|
|
80
80
|
}
|
|
81
|
-
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(),
|
|
81
|
+
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: () => {
|
|
82
|
+
var _a;
|
|
83
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
84
|
+
return this.hideSettingsPanel();
|
|
85
|
+
}, onSettingsChanged: e => {
|
|
82
86
|
var _a;
|
|
83
87
|
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
84
88
|
return this.hideSettingsPanel();
|
|
@@ -53,7 +53,11 @@ const VerdocsFieldRadioButton$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
53
53
|
if (this.done) {
|
|
54
54
|
return (h(Host, { class: { done: this.done }, style: { maxWidth: '10px' } }, h("span", { innerHTML: !!option.selected ? RadioIconSelected : RadioIconUnselected })));
|
|
55
55
|
}
|
|
56
|
-
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(),
|
|
56
|
+
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: () => {
|
|
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();
|
|
@@ -77,7 +77,11 @@ const VerdocsFieldSignature$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
77
77
|
if (this.done) {
|
|
78
78
|
return h(Host, { class: { done: this.done } }, value && h("img", { src: value, alt: "Signature" }));
|
|
79
79
|
}
|
|
80
|
-
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(),
|
|
80
|
+
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: () => {
|
|
81
|
+
var _a;
|
|
82
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
83
|
+
return this.hideSettingsPanel();
|
|
84
|
+
}, onSettingsChanged: e => {
|
|
81
85
|
var _a;
|
|
82
86
|
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
83
87
|
return this.hideSettingsPanel();
|
|
@@ -50,7 +50,11 @@ const VerdocsFieldTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
|
50
50
|
if (this.done) {
|
|
51
51
|
return h(Host, { class: { done: this.done } }, settings.value);
|
|
52
52
|
}
|
|
53
|
-
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(),
|
|
53
|
+
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: () => {
|
|
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();
|
|
@@ -51,7 +51,11 @@ const VerdocsFieldTextbox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
51
51
|
if (this.done) {
|
|
52
52
|
return h(Host, { class: { done: this.done } }, value);
|
|
53
53
|
}
|
|
54
|
-
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(),
|
|
54
|
+
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: () => {
|
|
55
|
+
var _a;
|
|
56
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
57
|
+
return this.hideSettingsPanel();
|
|
58
|
+
}, onSettingsChanged: e => {
|
|
55
59
|
var _a;
|
|
56
60
|
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
57
61
|
return this.hideSettingsPanel();
|
|
@@ -57,7 +57,11 @@ const VerdocsFieldTimestamp$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
57
57
|
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,
|
|
58
58
|
// TODO: It would really make more sense to show the date and time but the default width of 64px for this field
|
|
59
59
|
// is encoded in a ton of existing entries in the database and is hard to change.
|
|
60
|
-
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(),
|
|
60
|
+
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: () => {
|
|
61
|
+
var _a;
|
|
62
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
|
63
|
+
return this.hideSettingsPanel();
|
|
64
|
+
}, onSettingsChanged: e => {
|
|
61
65
|
var _a;
|
|
62
66
|
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
|
63
67
|
return this.hideSettingsPanel();
|