@verdocs/web-sdk 4.2.94 → 4.2.95
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/{Types-db1bd1d8.js → Types-7a726ff3.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-b7682f9b.js → utils-2da37620.js} +3 -7
- package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +4 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +61 -41
- package/dist/cjs/verdocs-pagination_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-preview_9.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-sign.cjs.entry.js +25 -23
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-view.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.css +1 -1
- package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.js +44 -30
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +23 -21
- package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +3 -0
- package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.js +1 -0
- package/dist/collection/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.css +6 -3
- package/dist/collection/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.js +35 -8
- package/dist/collection/components/fields/verdocs-field-radio/verdocs-field-radio.css +2 -2
- package/dist/collection/components/fields/verdocs-field-radio/verdocs-field-radio.js +5 -6
- package/dist/collection/utils/Types.js +1 -1
- package/dist/collection/utils/utils.js +2 -6
- package/dist/components/Types.js +1 -1
- package/dist/components/utils.js +2 -6
- package/dist/components/verdocs-envelope-sidebar.js +3 -0
- package/dist/components/verdocs-field-attachment2.js +1 -0
- package/dist/components/verdocs-field-checkbox2.js +19 -8
- package/dist/components/verdocs-field-radio2.js +6 -7
- package/dist/components/verdocs-sign.js +23 -21
- package/dist/components/verdocs-upload-dialog2.js +37 -27
- package/dist/esm/{Types-e4a6eba5.js → Types-95d86a44.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-7b0b77d8.js → utils-a79aa5dd.js} +3 -7
- package/dist/esm/verdocs-contact-picker_2.entry.js +2 -2
- package/dist/esm/verdocs-envelope-document-page.entry.js +2 -2
- package/dist/esm/verdocs-envelope-sidebar.entry.js +4 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +2 -2
- package/dist/esm/verdocs-field-attachment_13.entry.js +62 -42
- package/dist/esm/verdocs-pagination_2.entry.js +2 -2
- package/dist/esm/verdocs-preview_9.entry.js +2 -2
- package/dist/esm/verdocs-sign.entry.js +25 -23
- package/dist/esm/verdocs-template-document-page_2.entry.js +2 -2
- package/dist/esm/verdocs-view.entry.js +2 -2
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/Types-95d86a44.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{utils-7b0b77d8.js → utils-a79aa5dd.js} +2 -2
- package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_9.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page_2.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/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.d.ts +2 -3
- package/dist/types/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.d.ts +2 -0
- package/dist/types/components.d.ts +5 -4
- package/dist/types/utils/Types.d.ts +1 -1
- package/dist/types/utils/utils.d.ts +0 -1
- package/dist/verdocs-web-sdk/{p-04e53cb3.entry.js → p-01199d7a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-18dd4952.system.entry.js → p-143f1bdf.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-185dac12.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-c8e439cc.entry.js → p-1c04628f.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-dc4a5bc3.entry.js → p-2531fcad.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-267df026.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-44ef8fc5.system.entry.js → p-35ca7ec1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0833c8d4.system.entry.js → p-39453c48.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9cde1db5.entry.js → p-4e97fc5c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-38ab701b.entry.js → p-61860777.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-965631d9.entry.js → p-61a3e6ab.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7f52a1c4.entry.js → p-85aaa229.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-8b707999.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-8ef13092.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-6589d38a.system.entry.js → p-96276131.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a4a60476.system.entry.js → p-9d383fad.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5c50ce79.system.entry.js → p-a5b56406.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-86ccc8c9.system.js → p-ae347813.system.js} +2 -2
- package/dist/verdocs-web-sdk/{p-e8dd697f.system.entry.js → p-be7fa476.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-bf698049.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-2c2a9483.entry.js → p-c6549055.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-c7ee88c7.js +1 -0
- package/dist/verdocs-web-sdk/{p-1289c3d5.js → p-ca7ef3ff.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1a180595.system.js → p-d738b5db.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a324eeca.system.entry.js → p-fe1b68ae.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +3 -3
- package/dist/esm-es5/Types-e4a6eba5.js +0 -1
- package/dist/verdocs-web-sdk/p-251c4106.js +0 -1
- package/dist/verdocs-web-sdk/p-7778c24f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c74b4f50.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d9e1e5dc.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ddb7eb02.system.entry.js +0 -1
@@ -42,16 +42,19 @@ verdocs-field-checkbox label {
|
|
42
42
|
verdocs-field-checkbox.disabled label {
|
43
43
|
opacity: 0.5;
|
44
44
|
}
|
45
|
+
verdocs-field-checkbox.focused {
|
46
|
+
animation: verdocs-field-pulse 0.4s 1;
|
47
|
+
}
|
45
48
|
verdocs-field-checkbox label > input[type=checkbox] {
|
46
49
|
display: none;
|
47
50
|
}
|
48
51
|
verdocs-field-checkbox label > input[type=checkbox] + *::before {
|
49
52
|
margin: 0;
|
50
53
|
content: "";
|
51
|
-
width:
|
52
|
-
height:
|
54
|
+
width: 12px;
|
55
|
+
height: 12px;
|
53
56
|
display: block;
|
54
|
-
line-height:
|
57
|
+
line-height: 12px;
|
55
58
|
border-radius: 2px;
|
56
59
|
box-sizing: border-box;
|
57
60
|
border: 1px solid #aeb4bf;
|
@@ -20,6 +20,16 @@ export class VerdocsFieldCheckbox {
|
|
20
20
|
this.yscale = 1;
|
21
21
|
this.pagenumber = 1;
|
22
22
|
this.showingProperties = false;
|
23
|
+
this.focused = false;
|
24
|
+
}
|
25
|
+
async focusField() {
|
26
|
+
// We don't have a visible input that we can actually focus on, so we fake it
|
27
|
+
console.log('Focusing me', this.fieldname);
|
28
|
+
this.focused = false;
|
29
|
+
this.focused = true;
|
30
|
+
setTimeout(() => {
|
31
|
+
this.focused = false;
|
32
|
+
}, 500);
|
23
33
|
}
|
24
34
|
async showSettingsPanel() {
|
25
35
|
const settingsPanel = document.getElementById(`verdocs-settings-panel-${this.fieldname}`);
|
@@ -38,18 +48,17 @@ export class VerdocsFieldCheckbox {
|
|
38
48
|
this.roleStore = getTemplateRoleStore(this.templateid);
|
39
49
|
}
|
40
50
|
render() {
|
41
|
-
const { templateid, fieldname = '', editable = false, done = false, disabled = false, xscale = 1, yscale = 1 } = this;
|
51
|
+
const { templateid, fieldname = '', editable = false, done = false, disabled = false, xscale = 1, yscale = 1, focused } = this;
|
42
52
|
const field = this.fieldStore.get('fields').find(field => field.name === fieldname);
|
43
|
-
const { required = false, role_name = '', label = '' } = field || {};
|
53
|
+
const { required = false, role_name = '', label = '', value = false } = field || {};
|
44
54
|
const backgroundColor = getRGBA(getRoleIndex(this.roleStore, role_name));
|
45
|
-
|
46
|
-
const
|
47
|
-
|
48
|
-
const fieldId = `${fieldname}-${id}`;
|
55
|
+
const fieldId = `${fieldname}`;
|
56
|
+
// const fieldId = `${fieldname}-${id}`;
|
57
|
+
const checked = value === 'true';
|
49
58
|
if (done) {
|
50
59
|
return h(Host, { class: { done } }, checked ? '✓' : '☐');
|
51
60
|
}
|
52
|
-
return (h(Host, { class: { required, disabled, done }, style: { backgroundColor } }, label && h("div", { class: "label" }, label), h("label", { htmlFor: fieldId }, h("input", { id: fieldId, name: fieldname, type: "checkbox", checked: checked, disabled: disabled, required: required
|
61
|
+
return (h(Host, { class: { required, disabled, done, focused }, style: { backgroundColor } }, label && h("div", { class: "label" }, label), h("label", { htmlFor: fieldId }, h("input", { id: fieldId, name: fieldname, type: "checkbox", checked: checked, disabled: disabled, required: required }), h("span", null), editable && (h(Fragment, null, h("div", { id: `verdocs-settings-panel-trigger-${fieldname}`, style: { transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})` }, class: "settings-icon", innerHTML: SettingsIcon, onClick: (e) => {
|
53
62
|
e.stopPropagation();
|
54
63
|
this.showingProperties = !this.showingProperties;
|
55
64
|
} }), this.showingProperties && (h("verdocs-portal", { anchor: `verdocs-settings-panel-trigger-${field.name}`, onClickAway: () => (this.showingProperties = false) }, h("verdocs-template-field-properties", { templateId: templateid, fieldName: field.name, onClose: () => (this.showingProperties = false), onDelete: () => {
|
@@ -241,7 +250,8 @@ export class VerdocsFieldCheckbox {
|
|
241
250
|
}
|
242
251
|
static get states() {
|
243
252
|
return {
|
244
|
-
"showingProperties": {}
|
253
|
+
"showingProperties": {},
|
254
|
+
"focused": {}
|
245
255
|
};
|
246
256
|
}
|
247
257
|
static get events() {
|
@@ -285,6 +295,23 @@ export class VerdocsFieldCheckbox {
|
|
285
295
|
}
|
286
296
|
static get methods() {
|
287
297
|
return {
|
298
|
+
"focusField": {
|
299
|
+
"complexType": {
|
300
|
+
"signature": "() => Promise<void>",
|
301
|
+
"parameters": [],
|
302
|
+
"references": {
|
303
|
+
"Promise": {
|
304
|
+
"location": "global",
|
305
|
+
"id": "global::Promise"
|
306
|
+
}
|
307
|
+
},
|
308
|
+
"return": "Promise<void>"
|
309
|
+
},
|
310
|
+
"docs": {
|
311
|
+
"text": "",
|
312
|
+
"tags": []
|
313
|
+
}
|
314
|
+
},
|
288
315
|
"showSettingsPanel": {
|
289
316
|
"complexType": {
|
290
317
|
"signature": "() => Promise<void>",
|
@@ -73,8 +73,8 @@ verdocs-field-radio:not(.done) input[type=radio] + label:before {
|
|
73
73
|
border-radius: 100%;
|
74
74
|
border: 1px solid rgba(0, 0, 0, 0.6);
|
75
75
|
display: inline-block;
|
76
|
-
width:
|
77
|
-
height:
|
76
|
+
width: 12px;
|
77
|
+
height: 12px;
|
78
78
|
position: absolute;
|
79
79
|
left: 1px;
|
80
80
|
top: 1px;
|
@@ -42,16 +42,15 @@ export class VerdocsFieldRadio {
|
|
42
42
|
render() {
|
43
43
|
const { templateid, fieldname = '', editable = false, done = false, disabled = false, xscale = 1, yscale = 1 } = this;
|
44
44
|
const field = this.fieldStore.get('fields').find(field => field.name === fieldname);
|
45
|
-
const { required = false, role_name = '', label = '', group = '' } = field || {};
|
45
|
+
const { name, required = false, role_name = '', label = '', group = '', value = false } = field || {};
|
46
46
|
const backgroundColor = getRGBA(getRoleIndex(this.roleStore, role_name));
|
47
|
-
|
48
|
-
const
|
49
|
-
|
50
|
-
const fieldId = `${fieldname}-${id}`;
|
47
|
+
const fieldId = `${fieldname}`;
|
48
|
+
// const fieldId = `${fieldname}-${id}`;
|
49
|
+
const selected = value === 'true';
|
51
50
|
if (done) {
|
52
51
|
return (h(Host, { class: { done }, style: { maxWidth: '10px' } }, h("span", { innerHTML: selected ? RadioIconSelected : RadioIconUnselected })));
|
53
52
|
}
|
54
|
-
return (h(Host, { class: { required, disabled, done }, style: { backgroundColor } }, label && h("div", { class: "label" }, label), editable && group && h("div", { class: "group" }, group), h("input", { id: fieldId, type: "radio", name: fieldname, value:
|
53
|
+
return (h(Host, { class: { required, disabled, done }, style: { backgroundColor } }, label && h("div", { class: "label" }, label), editable && group && h("div", { class: "group" }, group), h("input", { id: fieldId, type: "radio", name: group || fieldname, value: name, checked: !!selected, disabled: disabled, required: required }), h("label", { htmlFor: fieldId }), editable && (h(Fragment, null, h("div", { id: `verdocs-settings-panel-trigger-${fieldname}`, style: { transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})` }, class: "settings-icon", innerHTML: SettingsIcon, onClick: (e) => {
|
55
54
|
e.stopPropagation();
|
56
55
|
this.showingProperties = !this.showingProperties;
|
57
56
|
} }), this.showingProperties && (h("verdocs-portal", { anchor: `verdocs-settings-panel-trigger-${fieldname}`, onClickAway: () => (this.showingProperties = false) }, h("verdocs-template-field-properties", { templateId: templateid, fieldName: fieldname, onClose: () => (this.showingProperties = false), onDelete: () => {
|
@@ -78,9 +78,6 @@ export const getControlStyles = (field, xScale, yScale) => {
|
|
78
78
|
export const getFieldId = (field) => {
|
79
79
|
return `verdocs-doc-fld-${field.name}`;
|
80
80
|
};
|
81
|
-
export const getFieldOptionId = (field, index) => {
|
82
|
-
return `verdocs-doc-fld-${field.name}-${index}`;
|
83
|
-
};
|
84
81
|
export const updateDocumentFieldValue = (field) => {
|
85
82
|
const id = getFieldId(field);
|
86
83
|
const existingField = document.getElementById(id);
|
@@ -134,7 +131,6 @@ export const renderDocumentField = (field, docPage, fieldOptions, tabIndex = 1)
|
|
134
131
|
else {
|
135
132
|
el.setAttribute('tabIndex', tabIndex);
|
136
133
|
}
|
137
|
-
console.log(field.name, 'editable', editable);
|
138
134
|
el.setAttribute('editable', editable);
|
139
135
|
el.setAttribute('draggable', draggable);
|
140
136
|
el.setAttribute('done', done);
|
@@ -143,7 +139,7 @@ export const renderDocumentField = (field, docPage, fieldOptions, tabIndex = 1)
|
|
143
139
|
return el;
|
144
140
|
}
|
145
141
|
case 'checkbox': {
|
146
|
-
const id =
|
142
|
+
const id = getFieldId(field);
|
147
143
|
const existingField = document.getElementById(id);
|
148
144
|
if (existingField) {
|
149
145
|
setControlStyles(existingField, field, docPage.xScale, docPage.yScale);
|
@@ -170,7 +166,7 @@ export const renderDocumentField = (field, docPage, fieldOptions, tabIndex = 1)
|
|
170
166
|
return cbEl;
|
171
167
|
}
|
172
168
|
case 'radio': {
|
173
|
-
const id =
|
169
|
+
const id = getFieldId(field);
|
174
170
|
const existingField = document.getElementById(id);
|
175
171
|
if (existingField) {
|
176
172
|
setControlStyles(existingField, field, docPage.xScale, docPage.yScale);
|
package/dist/components/Types.js
CHANGED
package/dist/components/utils.js
CHANGED
@@ -99,9 +99,6 @@ const getControlStyles = (field, xScale, yScale) => {
|
|
99
99
|
const getFieldId = (field) => {
|
100
100
|
return `verdocs-doc-fld-${field.name}`;
|
101
101
|
};
|
102
|
-
const getFieldOptionId = (field, index) => {
|
103
|
-
return `verdocs-doc-fld-${field.name}-${index}`;
|
104
|
-
};
|
105
102
|
const updateDocumentFieldValue = (field) => {
|
106
103
|
const id = getFieldId(field);
|
107
104
|
const existingField = document.getElementById(id);
|
@@ -155,7 +152,6 @@ const renderDocumentField = (field, docPage, fieldOptions, tabIndex = 1) => {
|
|
155
152
|
else {
|
156
153
|
el.setAttribute('tabIndex', tabIndex);
|
157
154
|
}
|
158
|
-
console.log(field.name, 'editable', editable);
|
159
155
|
el.setAttribute('editable', editable);
|
160
156
|
el.setAttribute('draggable', draggable);
|
161
157
|
el.setAttribute('done', done);
|
@@ -164,7 +160,7 @@ const renderDocumentField = (field, docPage, fieldOptions, tabIndex = 1) => {
|
|
164
160
|
return el;
|
165
161
|
}
|
166
162
|
case 'checkbox': {
|
167
|
-
const id =
|
163
|
+
const id = getFieldId(field);
|
168
164
|
const existingField = document.getElementById(id);
|
169
165
|
if (existingField) {
|
170
166
|
setControlStyles(existingField, field, docPage.xScale, docPage.yScale);
|
@@ -191,7 +187,7 @@ const renderDocumentField = (field, docPage, fieldOptions, tabIndex = 1) => {
|
|
191
187
|
return cbEl;
|
192
188
|
}
|
193
189
|
case 'radio': {
|
194
|
-
const id =
|
190
|
+
const id = getFieldId(field);
|
195
191
|
const existingField = document.getElementById(id);
|
196
192
|
if (existingField) {
|
197
193
|
setControlStyles(existingField, field, docPage.xScale, docPage.yScale);
|
@@ -148,6 +148,8 @@ const VerdocsEnvelopeSidebar$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsE
|
|
148
148
|
if (((_f = (_e = this.store) === null || _e === void 0 ? void 0 : _e.state) === null || _f === void 0 ? void 0 : _f.status) === 'complete') {
|
149
149
|
entries.push({ icon: 'pencil', message: 'Envelope completed.', date: new Date((_h = (_g = this.store) === null || _g === void 0 ? void 0 : _g.state) === null || _h === void 0 ? void 0 : _h.updated_at) });
|
150
150
|
}
|
151
|
+
// TODO: Shift back to server-side generating these events? We'll still need
|
152
|
+
// to tolerate both cases here for a while.
|
151
153
|
const ownerCanceled = histories.some(history => history.event === 'owner:canceled');
|
152
154
|
if (((_k = (_j = this.store) === null || _j === void 0 ? void 0 : _j.state) === null || _k === void 0 ? void 0 : _k.status) === 'canceled' && !ownerCanceled) {
|
153
155
|
entries.push({ icon: 'pencil', message: 'Envelope Cancelled.', date: new Date((_m = (_l = this.store) === null || _l === void 0 ? void 0 : _l.state) === null || _m === void 0 ? void 0 : _m.canceled_at) });
|
@@ -249,6 +251,7 @@ const VerdocsEnvelopeSidebar$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsE
|
|
249
251
|
case 'completed':
|
250
252
|
entries.push({ icon: 'done_all', message: `Envelope was completed.`, date: new Date(history.created_at) });
|
251
253
|
break;
|
254
|
+
case 'envelope_canceled':
|
252
255
|
case 'canceled':
|
253
256
|
case 'owner:canceled':
|
254
257
|
entries.push({ icon: 'cancel', message: `Envelope was canceled by the creator.`, date: new Date(history.created_at) });
|
@@ -65,6 +65,7 @@ const VerdocsFieldAttachment = /*@__PURE__*/ proxyCustomElement(class VerdocsFie
|
|
65
65
|
this.dialog.addEventListener('exit', () => { var _a; return (_a = this.dialog) === null || _a === void 0 ? void 0 : _a.remove(); });
|
66
66
|
document.addEventListener('next', (e) => {
|
67
67
|
var _a, _b;
|
68
|
+
console.log('attach onNext', e.detail[0]);
|
68
69
|
this.selectedFile = e.detail[0];
|
69
70
|
(_a = this.attached) === null || _a === void 0 ? void 0 : _a.emit(e.detail[0]);
|
70
71
|
(_b = this.dialog) === null || _b === void 0 ? void 0 : _b.remove();
|
@@ -12,7 +12,7 @@ import { d as defineCustomElement$3 } from './verdocs-select-input2.js';
|
|
12
12
|
import { d as defineCustomElement$2 } from './verdocs-template-field-properties2.js';
|
13
13
|
import { d as defineCustomElement$1 } from './verdocs-text-input2.js';
|
14
14
|
|
15
|
-
const verdocsFieldCheckboxCss = "@charset \"UTF-8\";@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-checkbox{padding:0;width:16px;height:16px;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transform-origin:bottom left;transform-origin:bottom left;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-field-checkbox div.label{top:-14px;left:-1px;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-checkbox label{cursor:inherit;width:14px;height:14px;display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-field-checkbox.disabled label{opacity:0.5}verdocs-field-checkbox label>input[type=checkbox]{display:none}verdocs-field-checkbox label>input[type=checkbox]+*::before{margin:0;content:\"\";width:
|
15
|
+
const verdocsFieldCheckboxCss = "@charset \"UTF-8\";@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-checkbox{padding:0;width:16px;height:16px;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transform-origin:bottom left;transform-origin:bottom left;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-field-checkbox div.label{top:-14px;left:-1px;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-checkbox label{cursor:inherit;width:14px;height:14px;display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-field-checkbox.disabled label{opacity:0.5}verdocs-field-checkbox.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-checkbox label>input[type=checkbox]{display:none}verdocs-field-checkbox label>input[type=checkbox]+*::before{margin:0;content:\"\";width:12px;height:12px;display:block;line-height:12px;border-radius:2px;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #aeb4bf}verdocs-field-checkbox label>input[type=checkbox]:checked+*{color:#55bc81}verdocs-field-checkbox label>input[type=checkbox]:checked+*::before{content:\"✓\";color:white;font-size:12px;text-align:center;background:#55bc81;border-color:#55bc81}verdocs-field-checkbox.required{border:1px solid #cc0000}verdocs-field-checkbox.hide{display:none}verdocs-field-checkbox.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-checkbox verdocs-button-panel{display:block;margin-left:-20px;margin-top:-17px;-webkit-transform:scale(0.7);transform:scale(0.7)}verdocs-field-checkbox .settings-icon{position:absolute;top:-5px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-checkbox .settings-icon svg{fill:#707ae5}verdocs-field-checkbox .settings-icon:hover{opacity:1}";
|
16
16
|
const VerdocsFieldCheckboxStyle0 = verdocsFieldCheckboxCss;
|
17
17
|
|
18
18
|
const VerdocsFieldCheckbox = /*@__PURE__*/ proxyCustomElement(class VerdocsFieldCheckbox extends HTMLElement {
|
@@ -33,6 +33,16 @@ const VerdocsFieldCheckbox = /*@__PURE__*/ proxyCustomElement(class VerdocsField
|
|
33
33
|
this.yscale = 1;
|
34
34
|
this.pagenumber = 1;
|
35
35
|
this.showingProperties = false;
|
36
|
+
this.focused = false;
|
37
|
+
}
|
38
|
+
async focusField() {
|
39
|
+
// We don't have a visible input that we can actually focus on, so we fake it
|
40
|
+
console.log('Focusing me', this.fieldname);
|
41
|
+
this.focused = false;
|
42
|
+
this.focused = true;
|
43
|
+
setTimeout(() => {
|
44
|
+
this.focused = false;
|
45
|
+
}, 500);
|
36
46
|
}
|
37
47
|
async showSettingsPanel() {
|
38
48
|
const settingsPanel = document.getElementById(`verdocs-settings-panel-${this.fieldname}`);
|
@@ -51,18 +61,17 @@ const VerdocsFieldCheckbox = /*@__PURE__*/ proxyCustomElement(class VerdocsField
|
|
51
61
|
this.roleStore = getTemplateRoleStore(this.templateid);
|
52
62
|
}
|
53
63
|
render() {
|
54
|
-
const { templateid, fieldname = '', editable = false, done = false, disabled = false, xscale = 1, yscale = 1 } = this;
|
64
|
+
const { templateid, fieldname = '', editable = false, done = false, disabled = false, xscale = 1, yscale = 1, focused } = this;
|
55
65
|
const field = this.fieldStore.get('fields').find(field => field.name === fieldname);
|
56
|
-
const { required = false, role_name = '', label = '' } = field || {};
|
66
|
+
const { required = false, role_name = '', label = '', value = false } = field || {};
|
57
67
|
const backgroundColor = getRGBA(getRoleIndex(this.roleStore, role_name));
|
58
|
-
|
59
|
-
const
|
60
|
-
|
61
|
-
const fieldId = `${fieldname}-${id}`;
|
68
|
+
const fieldId = `${fieldname}`;
|
69
|
+
// const fieldId = `${fieldname}-${id}`;
|
70
|
+
const checked = value === 'true';
|
62
71
|
if (done) {
|
63
72
|
return h(Host, { class: { done } }, checked ? '✓' : '☐');
|
64
73
|
}
|
65
|
-
return (h(Host, { class: { required, disabled, done }, style: { backgroundColor } }, label && h("div", { class: "label" }, label), h("label", { htmlFor: fieldId }, h("input", { id: fieldId, name: fieldname, type: "checkbox", checked: checked, disabled: disabled, required: required
|
74
|
+
return (h(Host, { class: { required, disabled, done, focused }, style: { backgroundColor } }, label && h("div", { class: "label" }, label), h("label", { htmlFor: fieldId }, h("input", { id: fieldId, name: fieldname, type: "checkbox", checked: checked, disabled: disabled, required: required }), h("span", null), editable && (h(Fragment, null, h("div", { id: `verdocs-settings-panel-trigger-${fieldname}`, style: { transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})` }, class: "settings-icon", innerHTML: SettingsIcon, onClick: (e) => {
|
66
75
|
e.stopPropagation();
|
67
76
|
this.showingProperties = !this.showingProperties;
|
68
77
|
} }), this.showingProperties && (h("verdocs-portal", { anchor: `verdocs-settings-panel-trigger-${field.name}`, onClickAway: () => (this.showingProperties = false) }, h("verdocs-template-field-properties", { templateId: templateid, fieldName: field.name, onClose: () => (this.showingProperties = false), onDelete: () => {
|
@@ -87,6 +96,8 @@ const VerdocsFieldCheckbox = /*@__PURE__*/ proxyCustomElement(class VerdocsField
|
|
87
96
|
"yscale": [514],
|
88
97
|
"pagenumber": [514],
|
89
98
|
"showingProperties": [32],
|
99
|
+
"focused": [32],
|
100
|
+
"focusField": [64],
|
90
101
|
"showSettingsPanel": [64],
|
91
102
|
"hideSettingsPanel": [64]
|
92
103
|
}]);
|
@@ -12,7 +12,7 @@ import { d as defineCustomElement$3 } from './verdocs-select-input2.js';
|
|
12
12
|
import { d as defineCustomElement$2 } from './verdocs-template-field-properties2.js';
|
13
13
|
import { d as defineCustomElement$1 } from './verdocs-text-input2.js';
|
14
14
|
|
15
|
-
const verdocsFieldRadioCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-radio{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;width:12px;height:12px;display:block;font-size:11px;position:relative;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border-radius:100%}verdocs-field-radio svg{margin-top:4px}verdocs-field-radio.disabled.done{opacity:1}verdocs-field-radio div.label{top:-14px;left:-1px;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-radio div.group{top:14px;left:-1px;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#bb0589;border-bottom-left-radius:2px;border-bottom-right-radius:2px}verdocs-field-radio input{cursor:inherit}verdocs-field-radio.disabled input{opacity:0.5}verdocs-field-radio.done input[type=radio]{margin:0;padding:0;width:10px;height:10px}verdocs-field-radio:not(.done) input[type=radio]{position:absolute;opacity:0}verdocs-field-radio:not(.done) input[type=radio]+label:before{content:\"\";border-radius:100%;border:1px solid rgba(0, 0, 0, 0.6);display:inline-block;width:
|
15
|
+
const verdocsFieldRadioCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-field-radio{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;width:12px;height:12px;display:block;font-size:11px;position:relative;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border-radius:100%}verdocs-field-radio svg{margin-top:4px}verdocs-field-radio.disabled.done{opacity:1}verdocs-field-radio div.label{top:-14px;left:-1px;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-radio div.group{top:14px;left:-1px;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#bb0589;border-bottom-left-radius:2px;border-bottom-right-radius:2px}verdocs-field-radio input{cursor:inherit}verdocs-field-radio.disabled input{opacity:0.5}verdocs-field-radio.done input[type=radio]{margin:0;padding:0;width:10px;height:10px}verdocs-field-radio:not(.done) input[type=radio]{position:absolute;opacity:0}verdocs-field-radio:not(.done) input[type=radio]+label:before{content:\"\";border-radius:100%;border:1px solid rgba(0, 0, 0, 0.6);display:inline-block;width:12px;height:12px;position:absolute;left:1px;top:1px;cursor:pointer;text-align:center;-webkit-transition:all 250ms ease;transition:all 250ms ease}verdocs-field-radio:not(.done) input[type=radio]:checked+label:before{background-color:#55bc81;-webkit-box-shadow:inset 0 0 0 2px #f5f5fa;box-shadow:inset 0 0 0 2px #f5f5fa}verdocs-field-radio:not(.done) input[type=radio]:focus+label:before{outline:none;border-color:#55bc81}verdocs-field-radio:not(.done) input[type=radio]:disabled+label:before{-webkit-box-shadow:inset 0 0 0 4px #f5f5fa;box-shadow:inset 0 0 0 4px #f5f5fa;border-color:#a0a0d0;background:#a0a0d0}verdocs-field-radio:not(.done) input[type=radio]+label:empty:before{margin-right:0}verdocs-field-radio.required{border:1px solid #cc0000}verdocs-field-radio.hide{display:none}verdocs-field-radio.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-radio verdocs-button-panel{margin-left:-20px;margin-top:-7px;-webkit-transform:scale(0.7);transform:scale(0.7)}verdocs-field-radio .settings-icon{position:absolute;top:-6px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-radio .settings-icon svg{fill:#707ae5}verdocs-field-radio .settings-icon:hover{opacity:1}";
|
16
16
|
const VerdocsFieldRadioStyle0 = verdocsFieldRadioCss;
|
17
17
|
|
18
18
|
const RadioIconUnselected = `<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></svg>`;
|
@@ -55,16 +55,15 @@ const VerdocsFieldRadio = /*@__PURE__*/ proxyCustomElement(class VerdocsFieldRad
|
|
55
55
|
render() {
|
56
56
|
const { templateid, fieldname = '', editable = false, done = false, disabled = false, xscale = 1, yscale = 1 } = this;
|
57
57
|
const field = this.fieldStore.get('fields').find(field => field.name === fieldname);
|
58
|
-
const { required = false, role_name = '', label = '', group = '' } = field || {};
|
58
|
+
const { name, required = false, role_name = '', label = '', group = '', value = false } = field || {};
|
59
59
|
const backgroundColor = getRGBA(getRoleIndex(this.roleStore, role_name));
|
60
|
-
|
61
|
-
const
|
62
|
-
|
63
|
-
const fieldId = `${fieldname}-${id}`;
|
60
|
+
const fieldId = `${fieldname}`;
|
61
|
+
// const fieldId = `${fieldname}-${id}`;
|
62
|
+
const selected = value === 'true';
|
64
63
|
if (done) {
|
65
64
|
return (h(Host, { class: { done }, style: { maxWidth: '10px' } }, h("span", { innerHTML: selected ? RadioIconSelected : RadioIconUnselected })));
|
66
65
|
}
|
67
|
-
return (h(Host, { class: { required, disabled, done }, style: { backgroundColor } }, label && h("div", { class: "label" }, label), editable && group && h("div", { class: "group" }, group), h("input", { id: fieldId, type: "radio", name: fieldname, value:
|
66
|
+
return (h(Host, { class: { required, disabled, done }, style: { backgroundColor } }, label && h("div", { class: "label" }, label), editable && group && h("div", { class: "group" }, group), h("input", { id: fieldId, type: "radio", name: group || fieldname, value: name, checked: !!selected, disabled: disabled, required: required }), h("label", { htmlFor: fieldId }), editable && (h(Fragment, null, h("div", { id: `verdocs-settings-panel-trigger-${fieldname}`, style: { transform: `scale(${Math.floor((1 / xscale) * 1000) / 1000}, ${Math.floor((1 / yscale) * 1000) / 1000})` }, class: "settings-icon", innerHTML: SettingsIcon, onClick: (e) => {
|
68
67
|
e.stopPropagation();
|
69
68
|
this.showingProperties = !this.showingProperties;
|
70
69
|
} }), this.showingProperties && (h("verdocs-portal", { anchor: `verdocs-settings-panel-trigger-${fieldname}`, onClickAway: () => (this.showingProperties = false) }, h("verdocs-template-field-properties", { templateId: templateid, fieldName: fieldname, onClose: () => (this.showingProperties = false), onDelete: () => {
|
@@ -108,7 +108,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
108
108
|
(_d = this.envelopeLoaded) === null || _d === void 0 ? void 0 : _d.emit({ endpoint: this.endpoint, envelope: this.envelope });
|
109
109
|
}
|
110
110
|
catch (e) {
|
111
|
-
console.log('Error with signing session', e);
|
111
|
+
console.log('[SIGN] Error with signing session', e);
|
112
112
|
(_e = this.sdkError) === null || _e === void 0 ? void 0 : _e.emit(new SDKError(e.message, (_f = e.response) === null || _f === void 0 ? void 0 : _f.status, (_g = e.response) === null || _g === void 0 ? void 0 : _g.data));
|
113
113
|
this.showLoadError = true;
|
114
114
|
}
|
@@ -135,7 +135,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
135
135
|
})
|
136
136
|
.catch(e => {
|
137
137
|
var _a, _b, _c;
|
138
|
-
console.log('Update failure', e);
|
138
|
+
console.log('[SIGN] Update failure', e);
|
139
139
|
this.submitting = false;
|
140
140
|
(_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(new SDKError(e.message, (_b = e.response) === null || _b === void 0 ? void 0 : _b.status, (_c = e.response) === null || _c === void 0 ? void 0 : _c.data));
|
141
141
|
});
|
@@ -156,7 +156,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
156
156
|
{
|
157
157
|
this.submitting = true;
|
158
158
|
const declineResult = await envelopeRecipientDecline(this.endpoint, this.envelopeId, this.roleId);
|
159
|
-
console.log('Decline result', declineResult);
|
159
|
+
console.log('[SIGN] Decline result', declineResult);
|
160
160
|
(_c = this.envelopeUpdated) === null || _c === void 0 ? void 0 : _c.emit({ endpoint: this.endpoint, envelope: this.envelope, event: 'declined' });
|
161
161
|
this.submitting = false;
|
162
162
|
this.isDone = true;
|
@@ -171,7 +171,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
171
171
|
const firstDoc = this.envelope.documents.find(doc => doc.type === 'attachment');
|
172
172
|
if (firstDoc) {
|
173
173
|
saveAttachment(this.endpoint, this.envelope, firstDoc.id).catch(e => {
|
174
|
-
console.log('Error downloading PDF', e);
|
174
|
+
console.log('[SIGN] Error downloading PDF', e);
|
175
175
|
});
|
176
176
|
(_e = this.envelopeUpdated) === null || _e === void 0 ? void 0 : _e.emit({ endpoint: this.endpoint, envelope: this.envelope, event: 'downloaded' });
|
177
177
|
}
|
@@ -215,7 +215,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
215
215
|
return this.saveFieldChange(field.name, { prepared: false, value: e.target.checked });
|
216
216
|
}
|
217
217
|
case 'radio': {
|
218
|
-
return this.saveFieldChange(field.name, { prepared: false, value: e.target.
|
218
|
+
return this.saveFieldChange(field.name, { prepared: false, value: e.target.checked });
|
219
219
|
}
|
220
220
|
case 'dropdown':
|
221
221
|
return this.saveFieldChange(field.name, { prepared: false, value: e.detail });
|
@@ -247,20 +247,19 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
247
247
|
this.updateRecipientFieldValue(field.name, updateResult);
|
248
248
|
})
|
249
249
|
.catch(e => {
|
250
|
-
console.warn('Error updating signature', e);
|
250
|
+
console.warn('[SIGN] Error updating signature', e);
|
251
251
|
});
|
252
252
|
case 'date':
|
253
|
-
const {
|
253
|
+
const { formattedDate } = e.detail;
|
254
254
|
if (formattedDate) {
|
255
|
-
console.log('dt', { date, formattedDate });
|
256
255
|
return this.saveFieldChange(field.name, { prepared: false, value: formattedDate });
|
257
256
|
}
|
258
257
|
break;
|
259
258
|
case 'timestamp':
|
260
|
-
console.log('Updating timestamp', { value, ts: e.target.getAttribute('timestamp') });
|
259
|
+
console.log('[SIGN] Updating timestamp', { value, ts: e.target.getAttribute('timestamp') });
|
261
260
|
break;
|
262
261
|
default:
|
263
|
-
console.log('Unhandled field update', { value, checked }, field);
|
262
|
+
console.log('[SIGN] Unhandled field update', { value, checked }, field);
|
264
263
|
break;
|
265
264
|
}
|
266
265
|
}
|
@@ -285,21 +284,26 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
285
284
|
return true;
|
286
285
|
case 'textarea':
|
287
286
|
case 'date':
|
288
|
-
case 'attachment':
|
289
287
|
return value !== '';
|
288
|
+
case 'attachment':
|
289
|
+
return value === 'attached';
|
290
290
|
case 'dropdown':
|
291
291
|
return value !== '';
|
292
292
|
case 'checkbox':
|
293
|
-
return
|
293
|
+
return value === 'true';
|
294
294
|
case 'radio':
|
295
|
-
|
295
|
+
if (!!field.group) {
|
296
|
+
return this.getRecipientFields()
|
297
|
+
.filter(f => f.group === field.group)
|
298
|
+
.some(field => field.value === 'true');
|
299
|
+
}
|
300
|
+
return field.value === 'true';
|
296
301
|
default:
|
297
302
|
return false;
|
298
303
|
}
|
299
304
|
}
|
300
305
|
isFieldValid(field) {
|
301
|
-
|
302
|
-
return !required || this.isFieldFilled(field);
|
306
|
+
return !field.required || this.isFieldFilled(field);
|
303
307
|
}
|
304
308
|
getSortedFillableFields() {
|
305
309
|
const recipientFields = this.getRecipientFields().filter(field => field.type !== 'timestamp');
|
@@ -374,7 +378,6 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
374
378
|
if (nextRequiredField) {
|
375
379
|
const id = getFieldId(nextRequiredField);
|
376
380
|
const el = document.getElementById(id);
|
377
|
-
console.log('Jumping to next field', nextRequiredField);
|
378
381
|
el === null || el === void 0 ? void 0 : el.focusField();
|
379
382
|
el === null || el === void 0 ? void 0 : el.scrollTo({ behavior: 'smooth', top: 0 });
|
380
383
|
this.focusedField = nextRequiredField.name;
|
@@ -403,7 +406,9 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
403
406
|
// console.log('[SIGN] onfieldInput', e.detail, e.target.value);
|
404
407
|
// These field types don't emit fieldChange. Should we standardize on that? We don't tap "input" for fields like
|
405
408
|
// text boxes because we'd be updating the field on every keystroke. We do those on blur which fires fieldChange.
|
406
|
-
|
409
|
+
console.log('onInput', e.target.type, e.target.name);
|
410
|
+
if (e.target.type === 'radio' || e.target.type === 'checkbox') {
|
411
|
+
// if (e.target.type === 'radio' || e.target.name.includes('date') || e.target.name.includes('checkbox')) {
|
407
412
|
this.handleFieldChange(field, e).finally(() => this.checkRecipientFields());
|
408
413
|
}
|
409
414
|
else {
|
@@ -412,7 +417,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
412
417
|
});
|
413
418
|
el.addEventListener('attached', async (e) => {
|
414
419
|
console.log('[SIGN] onAttached', e.detail, e.target.value);
|
415
|
-
const r = await uploadEnvelopeFieldAttachment(this.endpoint, this.envelopeId,
|
420
|
+
const r = await uploadEnvelopeFieldAttachment(this.endpoint, this.envelopeId, field.name, e.detail);
|
416
421
|
console.log('upload result', r);
|
417
422
|
this.checkRecipientFields();
|
418
423
|
});
|
@@ -445,9 +450,6 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
|
|
445
450
|
if (field.page !== pageInfo.pageNumber) {
|
446
451
|
return;
|
447
452
|
}
|
448
|
-
if (field.type === 'signature') {
|
449
|
-
console.log('rendering', field);
|
450
|
-
}
|
451
453
|
const el = renderDocumentField(field, pageInfo, { disabled: false, editable: false, draggable: false, done: this.isDone }, tabIndex);
|
452
454
|
if (!el) {
|
453
455
|
return;
|