@verdocs/web-sdk 2.3.74 → 2.3.75
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/{utils-7fe82705.js → utils-13f8ed3f.js} +1 -1
- package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-attachment_15.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-pagination_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview_8.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +4 -1
- package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +23 -30
- package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +3 -0
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +23 -30
- package/dist/collection/utils/utils.js +1 -1
- package/dist/components/utils.js +1 -1
- package/dist/components/verdocs-sign.js +3 -0
- package/dist/components/verdocs-template-fields2.js +23 -30
- package/dist/docs.json +1 -1
- package/dist/esm/{utils-0943d004.js → utils-a56ee5e9.js} +2 -2
- package/dist/esm/verdocs-contact-picker_2.entry.js +1 -1
- package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm/verdocs-field-attachment_15.entry.js +1 -1
- package/dist/esm/verdocs-field-payment.entry.js +1 -1
- package/dist/esm/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm/verdocs-preview_8.entry.js +1 -1
- package/dist/esm/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +4 -1
- package/dist/esm/verdocs-template-fields_4.entry.js +23 -30
- package/dist/esm/verdocs-view.entry.js +1 -1
- package/dist/esm-es5/{utils-0943d004.js → utils-a56ee5e9.js} +1 -1
- 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-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment_15.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +0 -1
- package/dist/types/utils/utils.d.ts +1 -1
- package/dist/verdocs-web-sdk/{p-1bb19298.system.js → p-0cafdb16.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-bf9f8047.system.entry.js → p-0e6b2f10.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-eadda835.system.entry.js → p-15c88a05.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b47fe83f.system.entry.js → p-28c93a3a.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5a8b3b8f.system.entry.js → p-320a0e0c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6a62eddb.system.entry.js → p-4b84b04e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e848a210.system.entry.js → p-5e8e5761.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7a2d4ffb.entry.js → p-6ca72beb.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-8f36c42a.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-bf751c92.entry.js → p-91e94910.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f4660e16.system.entry.js → p-a12b2c26.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-94587de6.entry.js → p-a9da16c6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ed44db6d.entry.js → p-b2d3ac44.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1ea48b99.js → p-b72328af.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3b679607.entry.js → p-bbf52926.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-c179b3e4.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-45964056.entry.js → p-d0140be2.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4bdbe568.entry.js → p-d11ffc76.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-95bfc8c0.entry.js → p-d151150e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e543e5eb.entry.js → p-d1c52218.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-49dfb0bd.system.entry.js → p-d61bf72b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-086350e1.system.entry.js → p-de5b9b23.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-cc2c6409.system.entry.js → p-e7d7bcae.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-bae72cf4.entry.js → p-ef99042b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/verdocs-web-sdk/p-3fdb08f6.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-fce0d8da.entry.js +0 -1
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
const index = require('./index-5463795e.js');
|
6
6
|
require('./Types-f89f9116.js');
|
7
7
|
const VerdocsEndpoint = require('./VerdocsEndpoint-f4ef9333.js');
|
8
|
-
const utils = require('./utils-
|
8
|
+
const utils = require('./utils-13f8ed3f.js');
|
9
9
|
require('./_commonjsHelpers-0c557e26.js');
|
10
10
|
require('./Envelopes-0b9deb2c.js');
|
11
11
|
require('./Types-f83b8488.js');
|
@@ -6,7 +6,7 @@ const index = require('./index-5463795e.js');
|
|
6
6
|
const Envelopes = require('./Envelopes-0b9deb2c.js');
|
7
7
|
require('./Types-f89f9116.js');
|
8
8
|
const VerdocsEndpoint = require('./VerdocsEndpoint-f4ef9333.js');
|
9
|
-
const utils = require('./utils-
|
9
|
+
const utils = require('./utils-13f8ed3f.js');
|
10
10
|
require('./_commonjsHelpers-0c557e26.js');
|
11
11
|
require('./Types-f83b8488.js');
|
12
12
|
require('./index-7c19ba1d.js');
|
@@ -8,7 +8,7 @@ const Permissions = require('./Permissions-1436f847.js');
|
|
8
8
|
require('./Types-f89f9116.js');
|
9
9
|
const VerdocsEndpoint = require('./VerdocsEndpoint-f4ef9333.js');
|
10
10
|
const Primitives = require('./Primitives-a59870a2.js');
|
11
|
-
const utils = require('./utils-
|
11
|
+
const utils = require('./utils-13f8ed3f.js');
|
12
12
|
const Toast = require('./Toast-06880504.js');
|
13
13
|
const errors = require('./errors-0396da3d.js');
|
14
14
|
require('./_commonjsHelpers-0c557e26.js');
|
@@ -6,7 +6,7 @@ const index = require('./index-5463795e.js');
|
|
6
6
|
const Colors = require('./Colors-e809dcc9.js');
|
7
7
|
const TemplateRoleStore = require('./TemplateRoleStore-94afc2b0.js');
|
8
8
|
const TemplateFieldStore = require('./TemplateFieldStore-3d25fc86.js');
|
9
|
-
const utils = require('./utils-
|
9
|
+
const utils = require('./utils-13f8ed3f.js');
|
10
10
|
const Icons = require('./Icons-3286d014.js');
|
11
11
|
const _commonjsHelpers = require('./_commonjsHelpers-0c557e26.js');
|
12
12
|
const Types = require('./Types-f83b8488.js');
|
@@ -6,7 +6,7 @@ const index = require('./index-5463795e.js');
|
|
6
6
|
const Colors = require('./Colors-e809dcc9.js');
|
7
7
|
const TemplateRoleStore = require('./TemplateRoleStore-94afc2b0.js');
|
8
8
|
const TemplateFieldStore = require('./TemplateFieldStore-3d25fc86.js');
|
9
|
-
const utils = require('./utils-
|
9
|
+
const utils = require('./utils-13f8ed3f.js');
|
10
10
|
require('./index-f712049c.js');
|
11
11
|
require('./_commonjsHelpers-0c557e26.js');
|
12
12
|
require('./Envelopes-0b9deb2c.js');
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-5463795e.js');
|
6
6
|
const Primitives = require('./Primitives-a59870a2.js');
|
7
|
-
const utils = require('./utils-
|
7
|
+
const utils = require('./utils-13f8ed3f.js');
|
8
8
|
const popper = require('./popper-d7adcfc6.js');
|
9
9
|
require('./_commonjsHelpers-0c557e26.js');
|
10
10
|
require('./Envelopes-0b9deb2c.js');
|
@@ -8,7 +8,7 @@ const VerdocsEndpoint = require('./VerdocsEndpoint-f4ef9333.js');
|
|
8
8
|
const TemplateFieldStore = require('./TemplateFieldStore-3d25fc86.js');
|
9
9
|
const TemplateRoleStore = require('./TemplateRoleStore-94afc2b0.js');
|
10
10
|
const TemplateStore = require('./TemplateStore-ae59084b.js');
|
11
|
-
const utils = require('./utils-
|
11
|
+
const utils = require('./utils-13f8ed3f.js');
|
12
12
|
const errors = require('./errors-0396da3d.js');
|
13
13
|
const Envelopes = require('./Envelopes-0b9deb2c.js');
|
14
14
|
const Validators = require('./Validators-16e6d7d1.js');
|
@@ -10,7 +10,7 @@ const Toast = require('./Toast-06880504.js');
|
|
10
10
|
const errors = require('./errors-0396da3d.js');
|
11
11
|
const Profiles = require('./Profiles-1a26e4eb.js');
|
12
12
|
const index$1 = require('./index-7c19ba1d.js');
|
13
|
-
const utils = require('./utils-
|
13
|
+
const utils = require('./utils-13f8ed3f.js');
|
14
14
|
require('./_commonjsHelpers-0c557e26.js');
|
15
15
|
require('./Envelopes-0b9deb2c.js');
|
16
16
|
require('./Types-f83b8488.js');
|
@@ -9,7 +9,7 @@ const Recipients = require('./Recipients-f3d6cf10.js');
|
|
9
9
|
const VerdocsEndpoint = require('./VerdocsEndpoint-f4ef9333.js');
|
10
10
|
const Validators = require('./Validators-16e6d7d1.js');
|
11
11
|
const Primitives = require('./Primitives-a59870a2.js');
|
12
|
-
const utils = require('./utils-
|
12
|
+
const utils = require('./utils-13f8ed3f.js');
|
13
13
|
const TemplateFieldStore = require('./TemplateFieldStore-3d25fc86.js');
|
14
14
|
const Toast = require('./Toast-06880504.js');
|
15
15
|
const errors = require('./errors-0396da3d.js');
|
@@ -452,6 +452,9 @@ const VerdocsSign = class {
|
|
452
452
|
const recipientFields = this.getRecipientFields().filter(field => field.page === pageInfo.pageNumber);
|
453
453
|
// console.log('[SIGN] Page rendered, updating fields', {pageInfo, roleIndex, recipientFields});
|
454
454
|
// First render the fields for the signer
|
455
|
+
// Also show field placeholders for other signers who have yet to act
|
456
|
+
// In template list in Beta, show second date being sorted on
|
457
|
+
// Sign top to bottom left to right
|
455
458
|
recipientFields
|
456
459
|
.filter(field => field.page === pageInfo.pageNumber)
|
457
460
|
.forEach(field => {
|
@@ -9,7 +9,7 @@ const VerdocsEndpoint = require('./VerdocsEndpoint-f4ef9333.js');
|
|
9
9
|
const Fields = require('./Fields-705a2168.js');
|
10
10
|
const Primitives = require('./Primitives-a59870a2.js');
|
11
11
|
const TemplateFieldStore = require('./TemplateFieldStore-3d25fc86.js');
|
12
|
-
const utils = require('./utils-
|
12
|
+
const utils = require('./utils-13f8ed3f.js');
|
13
13
|
const TemplateRoleStore = require('./TemplateRoleStore-94afc2b0.js');
|
14
14
|
const TemplateStore = require('./TemplateStore-ae59084b.js');
|
15
15
|
const errors = require('./errors-0396da3d.js');
|
@@ -106,11 +106,9 @@ const VerdocsTemplateFields = class {
|
|
106
106
|
.then(ts => {
|
107
107
|
var _a, _b;
|
108
108
|
this.templateStore = ts;
|
109
|
-
console.log('[PREVIEW] Loaded Template Store', ts.state);
|
110
109
|
this.fieldStore = TemplateFieldStore.getTemplateFieldStore(this.templateId);
|
111
110
|
this.roleStore = TemplateRoleStore.getTemplateRoleStore(this.templateId);
|
112
111
|
this.selectedRoleName = ((_b = (_a = this.roleStore.get('roles')) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.name) || '';
|
113
|
-
console.log('[PREVIEW] Loaded template', this.templateStore.state, this.roleStore.get('roles'), this.fieldStore.get('fields'));
|
114
112
|
this.loading = false;
|
115
113
|
this.fieldStore.onChange('fields', fields => {
|
116
114
|
var _a;
|
@@ -185,33 +183,31 @@ const VerdocsTemplateFields = class {
|
|
185
183
|
.filter(field => field && field.page_sequence === pageInfo.pageNumber)
|
186
184
|
.forEach(field => {
|
187
185
|
// TODO: Why isn't the attr already on the element carrying through?
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
186
|
+
switch (field.type) {
|
187
|
+
case 'checkbox_group':
|
188
|
+
case 'radio_button_group':
|
189
|
+
(field.settings || field.setting || {}).options.map((_, index) => {
|
190
|
+
const id = utils.getFieldOptionId(field, index);
|
191
|
+
const el = document.getElementById(id);
|
192
|
+
if (el) {
|
193
|
+
el.setAttribute('fieldname', field.name);
|
194
|
+
el.setAttribute('pagenumber', String(field.page_sequence));
|
195
|
+
this.makeDraggable(el);
|
196
|
+
}
|
197
|
+
});
|
198
|
+
break;
|
199
|
+
default:
|
200
|
+
const id = utils.getFieldId(field);
|
201
|
+
const el = document.getElementById(id);
|
202
|
+
if (el) {
|
203
|
+
el.setAttribute('fieldname', field.name);
|
204
|
+
el.setAttribute('pagenumber', String(field.page_sequence));
|
205
|
+
this.makeDraggable(el);
|
206
|
+
}
|
207
|
+
break;
|
194
208
|
}
|
195
209
|
});
|
196
210
|
}
|
197
|
-
reRenderField(field, pageNumber) {
|
198
|
-
const pageInfo = this.cachedPageInfo[pageNumber];
|
199
|
-
// const roleIndex = getRoleIndex(getRoleNames(this.roleStore), field.role_name);
|
200
|
-
const el = utils.renderDocumentField(field, pageInfo, { disabled: true, editable: true, draggable: true });
|
201
|
-
if (!el) {
|
202
|
-
return;
|
203
|
-
}
|
204
|
-
if (Array.isArray(el)) {
|
205
|
-
el.forEach(childEl => {
|
206
|
-
this.attachFieldAttributes(pageInfo, field, childEl);
|
207
|
-
this.makeDraggable(childEl);
|
208
|
-
});
|
209
|
-
}
|
210
|
-
else {
|
211
|
-
this.attachFieldAttributes(pageInfo, field, el);
|
212
|
-
this.makeDraggable(el);
|
213
|
-
}
|
214
|
-
}
|
215
211
|
makeDraggable(el) {
|
216
212
|
interact_min.interact_min(el).draggable({
|
217
213
|
listeners: {
|
@@ -281,10 +277,7 @@ const VerdocsTemplateFields = class {
|
|
281
277
|
TemplateFieldStore.updateStoreField(this.fieldStore, name, newFieldData);
|
282
278
|
event.target.removeAttribute('posX');
|
283
279
|
event.target.removeAttribute('posY');
|
284
|
-
console.log('Will remove CSS transform', event.target.style.transform);
|
285
|
-
// this.reRenderField(newFieldData, pageNumber);
|
286
280
|
utils.removeCssTransform(event.target);
|
287
|
-
console.log('[FIELDS] Updated', name, newFieldData);
|
288
281
|
(_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: (_b = this.templateStore) === null || _b === void 0 ? void 0 : _b.state, event: 'updated-field' });
|
289
282
|
}
|
290
283
|
generateFieldName(type, pageNumber) {
|
@@ -8,7 +8,7 @@ const Permissions = require('./Permissions-1436f847.js');
|
|
8
8
|
require('./Types-f89f9116.js');
|
9
9
|
const VerdocsEndpoint = require('./VerdocsEndpoint-f4ef9333.js');
|
10
10
|
const Primitives = require('./Primitives-a59870a2.js');
|
11
|
-
const utils = require('./utils-
|
11
|
+
const utils = require('./utils-13f8ed3f.js');
|
12
12
|
const errors = require('./errors-0396da3d.js');
|
13
13
|
require('./_commonjsHelpers-0c557e26.js');
|
14
14
|
require('./Types-f83b8488.js');
|
@@ -429,6 +429,9 @@ export class VerdocsSign {
|
|
429
429
|
const recipientFields = this.getRecipientFields().filter(field => field.page === pageInfo.pageNumber);
|
430
430
|
// console.log('[SIGN] Page rendered, updating fields', {pageInfo, roleIndex, recipientFields});
|
431
431
|
// First render the fields for the signer
|
432
|
+
// Also show field placeholders for other signers who have yet to act
|
433
|
+
// In template list in Beta, show second date being sorted on
|
434
|
+
// Sign top to bottom left to right
|
432
435
|
recipientFields
|
433
436
|
.filter(field => field.page === pageInfo.pageNumber)
|
434
437
|
.forEach(field => {
|
package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js
CHANGED
@@ -3,7 +3,7 @@ import { VerdocsEndpoint } from '@verdocs/js-sdk';
|
|
3
3
|
import { integerSequence } from '@verdocs/js-sdk/Utils/Primitives';
|
4
4
|
import { createField, updateField } from '@verdocs/js-sdk/Templates/Fields';
|
5
5
|
import { getTemplateFieldStore, updateStoreField } from '../../../utils/TemplateFieldStore';
|
6
|
-
import { defaultHeight, defaultWidth, getFieldId,
|
6
|
+
import { defaultHeight, defaultWidth, getFieldId, getFieldOptionId, removeCssTransform, updateCssTransform } from '../../../utils/utils';
|
7
7
|
import { h, Host } from '@stencil/core';
|
8
8
|
import { getTemplateRoleStore } from '../../../utils/TemplateRoleStore';
|
9
9
|
import { getTemplateStore } from '../../../utils/TemplateStore';
|
@@ -69,11 +69,9 @@ export class VerdocsTemplateFields {
|
|
69
69
|
.then(ts => {
|
70
70
|
var _a, _b;
|
71
71
|
this.templateStore = ts;
|
72
|
-
console.log('[PREVIEW] Loaded Template Store', ts.state);
|
73
72
|
this.fieldStore = getTemplateFieldStore(this.templateId);
|
74
73
|
this.roleStore = getTemplateRoleStore(this.templateId);
|
75
74
|
this.selectedRoleName = ((_b = (_a = this.roleStore.get('roles')) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.name) || '';
|
76
|
-
console.log('[PREVIEW] Loaded template', this.templateStore.state, this.roleStore.get('roles'), this.fieldStore.get('fields'));
|
77
75
|
this.loading = false;
|
78
76
|
this.fieldStore.onChange('fields', fields => {
|
79
77
|
var _a;
|
@@ -148,33 +146,31 @@ export class VerdocsTemplateFields {
|
|
148
146
|
.filter(field => field && field.page_sequence === pageInfo.pageNumber)
|
149
147
|
.forEach(field => {
|
150
148
|
// TODO: Why isn't the attr already on the element carrying through?
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
149
|
+
switch (field.type) {
|
150
|
+
case 'checkbox_group':
|
151
|
+
case 'radio_button_group':
|
152
|
+
(field.settings || field.setting || {}).options.map((_, index) => {
|
153
|
+
const id = getFieldOptionId(field, index);
|
154
|
+
const el = document.getElementById(id);
|
155
|
+
if (el) {
|
156
|
+
el.setAttribute('fieldname', field.name);
|
157
|
+
el.setAttribute('pagenumber', String(field.page_sequence));
|
158
|
+
this.makeDraggable(el);
|
159
|
+
}
|
160
|
+
});
|
161
|
+
break;
|
162
|
+
default:
|
163
|
+
const id = getFieldId(field);
|
164
|
+
const el = document.getElementById(id);
|
165
|
+
if (el) {
|
166
|
+
el.setAttribute('fieldname', field.name);
|
167
|
+
el.setAttribute('pagenumber', String(field.page_sequence));
|
168
|
+
this.makeDraggable(el);
|
169
|
+
}
|
170
|
+
break;
|
157
171
|
}
|
158
172
|
});
|
159
173
|
}
|
160
|
-
reRenderField(field, pageNumber) {
|
161
|
-
const pageInfo = this.cachedPageInfo[pageNumber];
|
162
|
-
// const roleIndex = getRoleIndex(getRoleNames(this.roleStore), field.role_name);
|
163
|
-
const el = renderDocumentField(field, pageInfo, { disabled: true, editable: true, draggable: true });
|
164
|
-
if (!el) {
|
165
|
-
return;
|
166
|
-
}
|
167
|
-
if (Array.isArray(el)) {
|
168
|
-
el.forEach(childEl => {
|
169
|
-
this.attachFieldAttributes(pageInfo, field, childEl);
|
170
|
-
this.makeDraggable(childEl);
|
171
|
-
});
|
172
|
-
}
|
173
|
-
else {
|
174
|
-
this.attachFieldAttributes(pageInfo, field, el);
|
175
|
-
this.makeDraggable(el);
|
176
|
-
}
|
177
|
-
}
|
178
174
|
makeDraggable(el) {
|
179
175
|
interact(el).draggable({
|
180
176
|
listeners: {
|
@@ -244,10 +240,7 @@ export class VerdocsTemplateFields {
|
|
244
240
|
updateStoreField(this.fieldStore, name, newFieldData);
|
245
241
|
event.target.removeAttribute('posX');
|
246
242
|
event.target.removeAttribute('posY');
|
247
|
-
console.log('Will remove CSS transform', event.target.style.transform);
|
248
|
-
// this.reRenderField(newFieldData, pageNumber);
|
249
243
|
removeCssTransform(event.target);
|
250
|
-
console.log('[FIELDS] Updated', name, newFieldData);
|
251
244
|
(_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: (_b = this.templateStore) === null || _b === void 0 ? void 0 : _b.state, event: 'updated-field' });
|
252
245
|
}
|
253
246
|
generateFieldName(type, pageNumber) {
|
package/dist/components/utils.js
CHANGED
@@ -452,6 +452,9 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
452
452
|
const recipientFields = this.getRecipientFields().filter(field => field.page === pageInfo.pageNumber);
|
453
453
|
// console.log('[SIGN] Page rendered, updating fields', {pageInfo, roleIndex, recipientFields});
|
454
454
|
// First render the fields for the signer
|
455
|
+
// Also show field placeholders for other signers who have yet to act
|
456
|
+
// In template list in Beta, show second date being sorted on
|
457
|
+
// Sign top to bottom left to right
|
455
458
|
recipientFields
|
456
459
|
.filter(field => field.page === pageInfo.pageNumber)
|
457
460
|
.forEach(field => {
|
@@ -5,7 +5,7 @@ import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
|
5
5
|
import { u as updateField, c as createField, d as defineCustomElement$4 } from './verdocs-template-field-properties2.js';
|
6
6
|
import { i as integerSequence } from './Primitives.js';
|
7
7
|
import { g as getTemplateFieldStore, u as updateStoreField } from './TemplateFieldStore.js';
|
8
|
-
import {
|
8
|
+
import { h as updateCssTransform, i as removeCssTransform, b as getFieldId, f as getFieldOptionId, j as defaultWidth, k as defaultHeight } from './utils.js';
|
9
9
|
import { g as getTemplateRoleStore } from './TemplateRoleStore.js';
|
10
10
|
import { g as getTemplateStore } from './TemplateStore.js';
|
11
11
|
import { S as SDKError } from './errors.js';
|
@@ -98,11 +98,9 @@ const VerdocsTemplateFields = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
98
98
|
.then(ts => {
|
99
99
|
var _a, _b;
|
100
100
|
this.templateStore = ts;
|
101
|
-
console.log('[PREVIEW] Loaded Template Store', ts.state);
|
102
101
|
this.fieldStore = getTemplateFieldStore(this.templateId);
|
103
102
|
this.roleStore = getTemplateRoleStore(this.templateId);
|
104
103
|
this.selectedRoleName = ((_b = (_a = this.roleStore.get('roles')) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.name) || '';
|
105
|
-
console.log('[PREVIEW] Loaded template', this.templateStore.state, this.roleStore.get('roles'), this.fieldStore.get('fields'));
|
106
104
|
this.loading = false;
|
107
105
|
this.fieldStore.onChange('fields', fields => {
|
108
106
|
var _a;
|
@@ -177,33 +175,31 @@ const VerdocsTemplateFields = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
177
175
|
.filter(field => field && field.page_sequence === pageInfo.pageNumber)
|
178
176
|
.forEach(field => {
|
179
177
|
// TODO: Why isn't the attr already on the element carrying through?
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
178
|
+
switch (field.type) {
|
179
|
+
case 'checkbox_group':
|
180
|
+
case 'radio_button_group':
|
181
|
+
(field.settings || field.setting || {}).options.map((_, index) => {
|
182
|
+
const id = getFieldOptionId(field, index);
|
183
|
+
const el = document.getElementById(id);
|
184
|
+
if (el) {
|
185
|
+
el.setAttribute('fieldname', field.name);
|
186
|
+
el.setAttribute('pagenumber', String(field.page_sequence));
|
187
|
+
this.makeDraggable(el);
|
188
|
+
}
|
189
|
+
});
|
190
|
+
break;
|
191
|
+
default:
|
192
|
+
const id = getFieldId(field);
|
193
|
+
const el = document.getElementById(id);
|
194
|
+
if (el) {
|
195
|
+
el.setAttribute('fieldname', field.name);
|
196
|
+
el.setAttribute('pagenumber', String(field.page_sequence));
|
197
|
+
this.makeDraggable(el);
|
198
|
+
}
|
199
|
+
break;
|
186
200
|
}
|
187
201
|
});
|
188
202
|
}
|
189
|
-
reRenderField(field, pageNumber) {
|
190
|
-
const pageInfo = this.cachedPageInfo[pageNumber];
|
191
|
-
// const roleIndex = getRoleIndex(getRoleNames(this.roleStore), field.role_name);
|
192
|
-
const el = renderDocumentField(field, pageInfo, { disabled: true, editable: true, draggable: true });
|
193
|
-
if (!el) {
|
194
|
-
return;
|
195
|
-
}
|
196
|
-
if (Array.isArray(el)) {
|
197
|
-
el.forEach(childEl => {
|
198
|
-
this.attachFieldAttributes(pageInfo, field, childEl);
|
199
|
-
this.makeDraggable(childEl);
|
200
|
-
});
|
201
|
-
}
|
202
|
-
else {
|
203
|
-
this.attachFieldAttributes(pageInfo, field, el);
|
204
|
-
this.makeDraggable(el);
|
205
|
-
}
|
206
|
-
}
|
207
203
|
makeDraggable(el) {
|
208
204
|
interact_min(el).draggable({
|
209
205
|
listeners: {
|
@@ -273,10 +269,7 @@ const VerdocsTemplateFields = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
273
269
|
updateStoreField(this.fieldStore, name, newFieldData);
|
274
270
|
event.target.removeAttribute('posX');
|
275
271
|
event.target.removeAttribute('posY');
|
276
|
-
console.log('Will remove CSS transform', event.target.style.transform);
|
277
|
-
// this.reRenderField(newFieldData, pageNumber);
|
278
272
|
removeCssTransform(event.target);
|
279
|
-
console.log('[FIELDS] Updated', name, newFieldData);
|
280
273
|
(_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: (_b = this.templateStore) === null || _b === void 0 ? void 0 : _b.state, event: 'updated-field' });
|
281
274
|
}
|
282
275
|
generateFieldName(type, pageNumber) {
|
package/dist/docs.json
CHANGED
@@ -75,7 +75,7 @@ const defaultWidth = (type) => {
|
|
75
75
|
case 'textbox':
|
76
76
|
return 150;
|
77
77
|
case 'timestamp':
|
78
|
-
return
|
78
|
+
return 105;
|
79
79
|
case 'date':
|
80
80
|
return 75;
|
81
81
|
case 'dropdown':
|
@@ -446,4 +446,4 @@ const convertToE164 = (input) => {
|
|
446
446
|
return `+1${temp}`;
|
447
447
|
};
|
448
448
|
|
449
|
-
export { saveAttachment as a, getFieldId as b, convertToE164 as c, renderedTextWidth as d, updateCssTransform as e, removeCssTransform as f, getFieldSettings as g,
|
449
|
+
export { saveAttachment as a, getFieldId as b, convertToE164 as c, renderedTextWidth as d, updateCssTransform as e, removeCssTransform as f, getFieldSettings as g, getFieldOptionId as h, defaultWidth as i, defaultHeight as j, getControlStyles as k, fileToDataUrl as l, renderDocumentField as r, saveEnvelopesAsZip as s, throttle as t, updateDocumentFieldValue as u };
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-172625c5.js';
|
2
2
|
import './Types-5f31149e.js';
|
3
3
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-eab308f6.js';
|
4
|
-
import { c as convertToE164 } from './utils-
|
4
|
+
import { c as convertToE164 } from './utils-a56ee5e9.js';
|
5
5
|
import './_commonjsHelpers-5ec8f9b7.js';
|
6
6
|
import './Envelopes-627c5239.js';
|
7
7
|
import './Types-086facf7.js';
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement
|
|
2
2
|
import { m as getEnvelopeDocumentPageDisplayUri } from './Envelopes-627c5239.js';
|
3
3
|
import './Types-5f31149e.js';
|
4
4
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-eab308f6.js';
|
5
|
-
import { t as throttle } from './utils-
|
5
|
+
import { t as throttle } from './utils-a56ee5e9.js';
|
6
6
|
import './_commonjsHelpers-5ec8f9b7.js';
|
7
7
|
import './Types-086facf7.js';
|
8
8
|
import './index-914ed6f7.js';
|
@@ -4,7 +4,7 @@ import { g as getRecipientsWithActions, a as userCanAct, b as userCanCancelEnvel
|
|
4
4
|
import './Types-5f31149e.js';
|
5
5
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-eab308f6.js';
|
6
6
|
import { i as integerSequence } from './Primitives-8fe93caf.js';
|
7
|
-
import { s as saveEnvelopesAsZip } from './utils-
|
7
|
+
import { s as saveEnvelopesAsZip } from './utils-a56ee5e9.js';
|
8
8
|
import { V as VerdocsToast } from './Toast-f3b8fd46.js';
|
9
9
|
import { S as SDKError } from './errors-9b5498c8.js';
|
10
10
|
import './_commonjsHelpers-5ec8f9b7.js';
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host, a
|
|
2
2
|
import { g as getRGBA } from './Colors-1b298092.js';
|
3
3
|
import { g as getTemplateRoleStore, a as getRoleIndex } from './TemplateRoleStore-447f2cb6.js';
|
4
4
|
import { g as getTemplateFieldStore, u as updateStoreField } from './TemplateFieldStore-6e67e86b.js';
|
5
|
-
import { g as getFieldSettings, t as throttle,
|
5
|
+
import { g as getFieldSettings, t as throttle, k as getControlStyles, b as getFieldId, h as getFieldOptionId, l as fileToDataUrl } from './utils-a56ee5e9.js';
|
6
6
|
import { S as SettingsIcon } from './Icons-ddea87bf.js';
|
7
7
|
import { c as createCommonjsModule, a as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers-5ec8f9b7.js';
|
8
8
|
import { a as FORMAT_DATE, F as FORMAT_TIMESTAMP } from './Types-086facf7.js';
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host, F as Fragment }
|
|
2
2
|
import { g as getRGBA } from './Colors-1b298092.js';
|
3
3
|
import { g as getTemplateRoleStore, a as getRoleIndex } from './TemplateRoleStore-447f2cb6.js';
|
4
4
|
import { g as getTemplateFieldStore } from './TemplateFieldStore-6e67e86b.js';
|
5
|
-
import { g as getFieldSettings } from './utils-
|
5
|
+
import { g as getFieldSettings } from './utils-a56ee5e9.js';
|
6
6
|
import './index-4439b0d1.js';
|
7
7
|
import './_commonjsHelpers-5ec8f9b7.js';
|
8
8
|
import './Envelopes-627c5239.js';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-172625c5.js';
|
2
2
|
import { i as integerSequence } from './Primitives-8fe93caf.js';
|
3
|
-
import { d as renderedTextWidth } from './utils-
|
3
|
+
import { d as renderedTextWidth } from './utils-a56ee5e9.js';
|
4
4
|
import { c as createPopper } from './popper-15e448b4.js';
|
5
5
|
import './_commonjsHelpers-5ec8f9b7.js';
|
6
6
|
import './Envelopes-627c5239.js';
|
@@ -4,7 +4,7 @@ import { V as VerdocsEndpoint, b as createTemplatev2, u as updateTemplate } from
|
|
4
4
|
import { g as getTemplateFieldStore } from './TemplateFieldStore-6e67e86b.js';
|
5
5
|
import { g as getTemplateRoleStore, b as getRoleNames, a as getRoleIndex } from './TemplateRoleStore-447f2cb6.js';
|
6
6
|
import { g as getTemplateStore } from './TemplateStore-99bf97f0.js';
|
7
|
-
import { r as renderDocumentField } from './utils-
|
7
|
+
import { r as renderDocumentField } from './utils-a56ee5e9.js';
|
8
8
|
import { S as SDKError } from './errors-9b5498c8.js';
|
9
9
|
import { j as createEnvelope } from './Envelopes-627c5239.js';
|
10
10
|
import { a as isValidEmail, i as isValidPhone } from './Validators-16a2a43b.js';
|
@@ -6,7 +6,7 @@ import { V as VerdocsToast } from './Toast-f3b8fd46.js';
|
|
6
6
|
import { S as SDKError } from './errors-9b5498c8.js';
|
7
7
|
import { g as getRoles, a as getCurrentProfile, u as updateProfile } from './Profiles-d4df4d1c.js';
|
8
8
|
import { f as format } from './index-914ed6f7.js';
|
9
|
-
import { c as convertToE164 } from './utils-
|
9
|
+
import { c as convertToE164 } from './utils-a56ee5e9.js';
|
10
10
|
import './_commonjsHelpers-5ec8f9b7.js';
|
11
11
|
import './Envelopes-627c5239.js';
|
12
12
|
import './Types-086facf7.js';
|
@@ -5,7 +5,7 @@ import { e as envelopeRecipientAgree, a as envelopeRecipientDecline, b as envelo
|
|
5
5
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-eab308f6.js';
|
6
6
|
import { i as isValidPhone, a as isValidEmail } from './Validators-16a2a43b.js';
|
7
7
|
import { f as fullNameToInitials, i as integerSequence } from './Primitives-8fe93caf.js';
|
8
|
-
import { a as saveAttachment, u as updateDocumentFieldValue, r as renderDocumentField, b as getFieldId } from './utils-
|
8
|
+
import { a as saveAttachment, u as updateDocumentFieldValue, r as renderDocumentField, b as getFieldId } from './utils-a56ee5e9.js';
|
9
9
|
import { a as createTemplateFieldStoreFromEnvelope } from './TemplateFieldStore-6e67e86b.js';
|
10
10
|
import { V as VerdocsToast } from './Toast-f3b8fd46.js';
|
11
11
|
import { S as SDKError } from './errors-9b5498c8.js';
|
@@ -448,6 +448,9 @@ const VerdocsSign = class {
|
|
448
448
|
const recipientFields = this.getRecipientFields().filter(field => field.page === pageInfo.pageNumber);
|
449
449
|
// console.log('[SIGN] Page rendered, updating fields', {pageInfo, roleIndex, recipientFields});
|
450
450
|
// First render the fields for the signer
|
451
|
+
// Also show field placeholders for other signers who have yet to act
|
452
|
+
// In template list in Beta, show second date being sorted on
|
453
|
+
// Sign top to bottom left to right
|
451
454
|
recipientFields
|
452
455
|
.filter(field => field.page === pageInfo.pageNumber)
|
453
456
|
.forEach(field => {
|