@verdocs/web-sdk 1.12.0 → 1.12.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/{interact.min-272ddfb4.js → interact.min-3fb55faf.js} +1 -1
- package/dist/cjs/{utils-54525087.js → utils-8dcfb4ed.js} +4 -4
- package/dist/cjs/verdocs-build.cjs.entry.js +1 -9
- package/dist/cjs/verdocs-document-page_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-date.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-signature.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-send.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-create_2.cjs.entry.js +62 -32
- package/dist/cjs/verdocs-template-document-page.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-roles.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
- package/dist/collection/components/embeds/verdocs-build/verdocs-build.js +1 -9
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +1 -1
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +60 -30
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.stories.js +2 -2
- package/dist/collection/utils/utils.js +4 -4
- package/dist/components/utils.js +4 -4
- package/dist/components/verdocs-build.js +1 -9
- package/dist/components/verdocs-send.js +1 -1
- package/dist/components/verdocs-template-fields2.js +60 -30
- package/dist/custom-elements.json +1394 -0
- package/dist/docs.json +1 -1
- package/dist/esm/{interact.min-6417b511.js → interact.min-19cd5a3f.js} +1 -1
- package/dist/esm/{utils-e9a6b9e4.js → utils-6d305f47.js} +4 -4
- package/dist/esm/verdocs-build.entry.js +1 -9
- package/dist/esm/verdocs-document-page_2.entry.js +1 -1
- package/dist/esm/verdocs-field-checkbox.entry.js +1 -1
- package/dist/esm/verdocs-field-date.entry.js +1 -1
- package/dist/esm/verdocs-field-dropdown.entry.js +1 -1
- package/dist/esm/verdocs-field-initial.entry.js +1 -1
- package/dist/esm/verdocs-field-payment.entry.js +1 -1
- package/dist/esm/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm/verdocs-field-signature.entry.js +1 -1
- package/dist/esm/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm/verdocs-field-timestamp.entry.js +1 -1
- package/dist/esm/verdocs-preview.entry.js +1 -1
- package/dist/esm/verdocs-send.entry.js +2 -2
- package/dist/esm/verdocs-sign.entry.js +1 -1
- package/dist/esm/verdocs-template-create_2.entry.js +62 -32
- package/dist/esm/verdocs-template-document-page.entry.js +1 -1
- package/dist/esm/verdocs-template-roles.entry.js +2 -2
- package/dist/esm/verdocs-view.entry.js +1 -1
- package/dist/esm-es5/{interact.min-6417b511.js → interact.min-19cd5a3f.js} +1 -1
- package/dist/esm-es5/{utils-e9a6b9e4.js → utils-6d305f47.js} +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-document-page_2.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-dropdown.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-payment.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-preview.entry.js +1 -1
- package/dist/esm-es5/verdocs-send.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-create_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-roles.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/types/components/embeds/verdocs-build/verdocs-build.d.ts +0 -2
- package/dist/typings.d.ts +4 -0
- package/dist/verdocs-web-sdk/{p-2b33748c.entry.js → p-04ca71f3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e8f6d4df.system.entry.js → p-0d1692d0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d50f2d73.entry.js → p-125ed09a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5f286724.entry.js → p-13883644.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-334ee827.system.entry.js → p-23015028.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-dc2efab7.system.js → p-287f83b4.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-582eb800.system.entry.js → p-2e3ad71e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7ecb9259.system.entry.js → p-2ff0bf23.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b367846e.entry.js → p-3d03c50c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-642b2f86.js → p-3ea03e42.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0bb87b59.entry.js → p-402daffb.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-44930c58.js → p-41e463fc.js} +1 -1
- package/dist/verdocs-web-sdk/{p-aacb9e91.system.entry.js → p-457ce7ee.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-dac7b75d.entry.js → p-5a3ad0a2.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c10cfa53.system.entry.js → p-5a5c7806.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5659c4bb.system.entry.js → p-60508155.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3bc39719.entry.js → p-6a2a5175.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0d453b2f.entry.js → p-6c881285.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3903c3c0.system.entry.js → p-6e89c9a9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f9b68c9c.entry.js → p-71b29261.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-7e6d7c07.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-dfe6f5d9.entry.js → p-833cc40b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2a5c1eb7.entry.js → p-95171474.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-70753fe7.entry.js → p-970a4cf0.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a0fd3c9b.system.entry.js → p-98fe1e7a.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7ce3143d.system.entry.js → p-9ae853d2.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-da81a310.system.entry.js → p-a4aad6fa.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9a5570df.entry.js → p-a5528dcd.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8b9175e2.entry.js → p-ad818224.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-10fbb876.system.entry.js → p-ae195531.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-184d875e.system.entry.js → p-be9f3cb4.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-49d0ef15.system.entry.js → p-c05f7f00.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c739f90a.system.js → p-c5e7155b.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-cb619459.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-de5574a9.entry.js → p-cf3e15fa.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4934473f.system.entry.js → p-d090ad0f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-70a6176e.entry.js → p-d2a77a74.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-295be949.entry.js → p-d9108bf5.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e4cc456c.system.entry.js → p-daf52640.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-005572ea.entry.js → p-de57ddbb.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-e897e87a.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-64841d89.system.entry.js → p-f10bdaa0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-85b13093.system.entry.js → p-fc97d696.system.entry.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-75e8cb42.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ecd33c4e.system.entry.js +0 -1
package/dist/docs.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as getDefaultExportFromCjs, d as createCommonjsModule } from './utils-
|
|
1
|
+
import { c as getDefaultExportFromCjs, d as createCommonjsModule } from './utils-6d305f47.js';
|
|
2
2
|
|
|
3
3
|
var interact_min = createCommonjsModule(function (module, exports) {
|
|
4
4
|
/* interact.js 1.10.17 | https://interactjs.io/license */
|
|
@@ -265,19 +265,19 @@ const getFieldSettings = (field) => {
|
|
|
265
265
|
* to be used for order-sensitive components e.g. translate-then-rotate.
|
|
266
266
|
*/
|
|
267
267
|
const updateCssTransform = (el, key, value) => {
|
|
268
|
-
console.log('update', key, value, el.style.transform);
|
|
268
|
+
// console.log('update', key, value, el.style.transform);
|
|
269
269
|
// e.g. 'scale(1.87908, 1.87908) translate(0px, 0px);'
|
|
270
270
|
const currentTransform = el.style.transform || '';
|
|
271
271
|
const newValue = `${key}(${value})`;
|
|
272
272
|
if (currentTransform.includes(key)) {
|
|
273
|
-
console.log('updating', currentTransform, currentTransform.replace(new RegExp(`${key}\(.+?\)`), newValue));
|
|
273
|
+
// console.log('updating', currentTransform, currentTransform.replace(new RegExp(`${key}\(.+?\)`), newValue));
|
|
274
274
|
el.style.transform = currentTransform.replace(new RegExp(`${key}\\(.+?\\)`), newValue);
|
|
275
275
|
}
|
|
276
276
|
else {
|
|
277
|
-
console.log('appending', currentTransform, currentTransform + ' ' + newValue);
|
|
277
|
+
// console.log('appending', currentTransform, currentTransform + ' ' + newValue);
|
|
278
278
|
el.style.transform = currentTransform + ' ' + newValue;
|
|
279
279
|
}
|
|
280
|
-
console.log('now', el.style.transform);
|
|
280
|
+
// console.log('now', el.style.transform);
|
|
281
281
|
};
|
|
282
282
|
const formatLocalDate = (date) => format(date, 'P').replace(/\//g, '-');
|
|
283
283
|
const formatEnvelopeDate = (envelope) => formatLocalDate(new Date(envelope.updated_at));
|
|
@@ -52,19 +52,11 @@ const VerdocsBuild = class {
|
|
|
52
52
|
this.step = 'fields';
|
|
53
53
|
// this.step = 'properties';
|
|
54
54
|
}
|
|
55
|
-
handlePropertiesUpdated(e) {
|
|
56
|
-
console.log('updated', e.detail);
|
|
57
|
-
this.step = 'recipients';
|
|
58
|
-
}
|
|
59
|
-
handleRecipientsUpdated(e) {
|
|
60
|
-
console.log('updated', e.detail);
|
|
61
|
-
this.step = 'fields';
|
|
62
|
-
}
|
|
63
55
|
render() {
|
|
64
56
|
if (!this.endpoint.session) {
|
|
65
57
|
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
|
66
58
|
}
|
|
67
|
-
return (h(Host, null, this.step === 'create' && h("verdocs-template-create", {
|
|
59
|
+
return (h(Host, null, this.step === 'create' && h("verdocs-template-create", { onExit: e => this.handleCancel(e), onNext: e => this.handleTemplateCreated(e) }), this.step === 'fields' && h("verdocs-template-fields", null)));
|
|
68
60
|
}
|
|
69
61
|
};
|
|
70
62
|
VerdocsBuild.style = verdocsBuildCss;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-e64d45e2.js';
|
|
2
|
-
import { t as throttle } from './utils-
|
|
2
|
+
import { t as throttle } from './utils-6d305f47.js';
|
|
3
3
|
import { c as createPopper } from './popper-f860750c.js';
|
|
4
4
|
import './Envelopes-eb3eef02.js';
|
|
5
5
|
import './Token-54690789.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-e64d45e2.js';
|
|
2
2
|
import { g as getRGBA } from './Colors-1b298092.js';
|
|
3
|
-
import { g as getFieldSettings } from './utils-
|
|
3
|
+
import { g as getFieldSettings } from './utils-6d305f47.js';
|
|
4
4
|
import { s as state } from './templateStore-5cb73464.js';
|
|
5
5
|
import './Envelopes-eb3eef02.js';
|
|
6
6
|
import './Token-54690789.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-e64d45e2.js';
|
|
2
|
-
import { g as getFieldSettings } from './utils-
|
|
2
|
+
import { g as getFieldSettings } from './utils-6d305f47.js';
|
|
3
3
|
import { g as getRGBA } from './Colors-1b298092.js';
|
|
4
4
|
import { s as state } from './templateStore-5cb73464.js';
|
|
5
5
|
import { f as format } from './index-d264c496.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-e64d45e2.js';
|
|
2
2
|
import { g as getRGBA } from './Colors-1b298092.js';
|
|
3
|
-
import { g as getFieldSettings } from './utils-
|
|
3
|
+
import { g as getFieldSettings } from './utils-6d305f47.js';
|
|
4
4
|
import { s as state } from './templateStore-5cb73464.js';
|
|
5
5
|
import './Envelopes-eb3eef02.js';
|
|
6
6
|
import './Token-54690789.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-e64d45e2.js';
|
|
2
2
|
import { g as getRGBA } from './Colors-1b298092.js';
|
|
3
|
-
import { g as getFieldSettings } from './utils-
|
|
3
|
+
import { g as getFieldSettings } from './utils-6d305f47.js';
|
|
4
4
|
import { s as state } from './templateStore-5cb73464.js';
|
|
5
5
|
import './Envelopes-eb3eef02.js';
|
|
6
6
|
import './Token-54690789.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-e64d45e2.js';
|
|
2
2
|
import { g as getRGBA } from './Colors-1b298092.js';
|
|
3
|
-
import { g as getFieldSettings } from './utils-
|
|
3
|
+
import { g as getFieldSettings } from './utils-6d305f47.js';
|
|
4
4
|
import { s as state } from './templateStore-5cb73464.js';
|
|
5
5
|
import './Envelopes-eb3eef02.js';
|
|
6
6
|
import './Token-54690789.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-e64d45e2.js';
|
|
2
2
|
import { g as getRGBA } from './Colors-1b298092.js';
|
|
3
|
-
import { g as getFieldSettings } from './utils-
|
|
3
|
+
import { g as getFieldSettings } from './utils-6d305f47.js';
|
|
4
4
|
import { s as state } from './templateStore-5cb73464.js';
|
|
5
5
|
import './Envelopes-eb3eef02.js';
|
|
6
6
|
import './Token-54690789.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-e64d45e2.js';
|
|
2
2
|
import { g as getRGBA } from './Colors-1b298092.js';
|
|
3
|
-
import { g as getFieldSettings } from './utils-
|
|
3
|
+
import { g as getFieldSettings } from './utils-6d305f47.js';
|
|
4
4
|
import { s as state } from './templateStore-5cb73464.js';
|
|
5
5
|
import './Envelopes-eb3eef02.js';
|
|
6
6
|
import './Token-54690789.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-e64d45e2.js';
|
|
2
2
|
import { g as getRGBA } from './Colors-1b298092.js';
|
|
3
|
-
import { g as getFieldSettings } from './utils-
|
|
3
|
+
import { g as getFieldSettings } from './utils-6d305f47.js';
|
|
4
4
|
import { s as state } from './templateStore-5cb73464.js';
|
|
5
5
|
import './Envelopes-eb3eef02.js';
|
|
6
6
|
import './Token-54690789.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-e64d45e2.js';
|
|
2
2
|
import { g as getRGBA } from './Colors-1b298092.js';
|
|
3
3
|
import { s as state } from './templateStore-5cb73464.js';
|
|
4
|
-
import { g as getFieldSettings } from './utils-
|
|
4
|
+
import { g as getFieldSettings } from './utils-6d305f47.js';
|
|
5
5
|
import './index-24fd1580.js';
|
|
6
6
|
import './Primitives-054bc6e5.js';
|
|
7
7
|
import './Envelopes-eb3eef02.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-e64d45e2.js';
|
|
2
2
|
import { g as getRGBA } from './Colors-1b298092.js';
|
|
3
|
-
import { g as getFieldSettings } from './utils-
|
|
3
|
+
import { g as getFieldSettings } from './utils-6d305f47.js';
|
|
4
4
|
import { s as state } from './templateStore-5cb73464.js';
|
|
5
5
|
import { f as format } from './index-d264c496.js';
|
|
6
6
|
import './Envelopes-eb3eef02.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-e64d45e2.js';
|
|
2
2
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d50a8d28.js';
|
|
3
|
-
import { r as renderDocumentField, a as getRoleIndex } from './utils-
|
|
3
|
+
import { r as renderDocumentField, a as getRoleIndex } from './utils-6d305f47.js';
|
|
4
4
|
import { s as state } from './templateStore-5cb73464.js';
|
|
5
5
|
import { l as loadTemplate } from './Templates-f8a6628a.js';
|
|
6
6
|
import { S as SDKError } from './errors-9b5498c8.js';
|
|
@@ -4,7 +4,7 @@ import { i as isValidEmail, a as isValidPhone } from './Validators-f110bae2.js';
|
|
|
4
4
|
import { g as getRGBA } from './Colors-1b298092.js';
|
|
5
5
|
import { s as state } from './templateStore-5cb73464.js';
|
|
6
6
|
import { l as loadTemplate } from './Templates-f8a6628a.js';
|
|
7
|
-
import { a as getRoleIndex } from './utils-
|
|
7
|
+
import { a as getRoleIndex } from './utils-6d305f47.js';
|
|
8
8
|
import { S as SDKError } from './errors-9b5498c8.js';
|
|
9
9
|
import './Token-54690789.js';
|
|
10
10
|
import './index-24fd1580.js';
|
|
@@ -111,7 +111,7 @@ const VerdocsSend = class {
|
|
|
111
111
|
const allRolesAssigned = rolesAssigned.length >= roleNames.length;
|
|
112
112
|
return (h(Host, { class: {} }, h("div", { class: "recipients" }, h("div", { class: "left-line" }), h("div", { class: `level level-start` }, this.getLevelIcon(-1), h("div", { class: "complete" }, "Send Envelope")), this.levels.map(level => (h("div", { class: `level level-${level}` }, this.getLevelIcon(level), this.rolesAtLevel[level].map(role => {
|
|
113
113
|
var _a, _b, _c;
|
|
114
|
-
return (h("div", { class: "recipient", style: { backgroundColor: getRGBA(getRoleIndex(roleNames, role.name)) }, onClick: e => this.handleClickRole(e, role) }, (_b = (_a = this.rolesCompleted[role.id]) === null || _a === void 0 ? void 0 : _a.full_name) !== null && _b !== void 0 ? _b : role.name, h("div", { class: "icon", innerHTML: editIcon }), this.showPickerForId === role.id && (h("verdocs-contact-picker", {
|
|
114
|
+
return (h("div", { class: "recipient", style: { backgroundColor: getRGBA(getRoleIndex(roleNames, role.name)) }, onClick: e => this.handleClickRole(e, role) }, (_b = (_a = this.rolesCompleted[role.id]) === null || _a === void 0 ? void 0 : _a.full_name) !== null && _b !== void 0 ? _b : role.name, h("div", { class: "icon", innerHTML: editIcon }), this.showPickerForId === role.id && (h("verdocs-contact-picker", { onExit: () => (this.showPickerForId = ''), onNext: e => this.handleSelectContact(e, role), contactSuggestions: this.sessionContacts, templateRole: (_c = this.rolesCompleted[role.id]) !== null && _c !== void 0 ? _c : role, onSearchContacts: e => console.log('Search', e.detail) }))));
|
|
115
115
|
})))), h("div", { class: `level level-done` }, this.getLevelIcon(this.levels.length), h("div", { class: "complete" }, "Signing Complete"))), h("div", { class: "buttons" }, h("verdocs-button", { label: "Cancel", size: "small", variant: "outline", onClick: e => this.handleCancel(e) }), h("verdocs-button", { label: "Send", size: "small", disabled: !allRolesAssigned, onClick: e => this.handleSend(e) }))));
|
|
116
116
|
}
|
|
117
117
|
};
|
|
@@ -3,7 +3,7 @@ import { c as getSigningSession, u as updateEnvelopeField, d as updateEnvelopeFi
|
|
|
3
3
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d50a8d28.js';
|
|
4
4
|
import { a as isValidPhone, i as isValidEmail } from './Validators-f110bae2.js';
|
|
5
5
|
import { f as fullNameToInitials } from './Primitives-054bc6e5.js';
|
|
6
|
-
import { s as saveAttachment, u as updateDocumentFieldValue, a as getRoleIndex, r as renderDocumentField, b as getFieldId } from './utils-
|
|
6
|
+
import { s as saveAttachment, u as updateDocumentFieldValue, a as getRoleIndex, r as renderDocumentField, b as getFieldId } from './utils-6d305f47.js';
|
|
7
7
|
import { g as getEnvelopeById, s as state } from './Envelopes-7f3b60de.js';
|
|
8
8
|
import { S as SDKError } from './errors-9b5498c8.js';
|
|
9
9
|
import './Token-54690789.js';
|
|
@@ -3,9 +3,9 @@ import { c as createTemplate, g as getTemplate } from './Templates-8e4ab976.js';
|
|
|
3
3
|
import { c as createTemplateDocument } from './TemplateDocuments-1214b04d.js';
|
|
4
4
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d50a8d28.js';
|
|
5
5
|
import { S as SDKError } from './errors-9b5498c8.js';
|
|
6
|
-
import { i as interact } from './interact.min-
|
|
6
|
+
import { i as interact } from './interact.min-19cd5a3f.js';
|
|
7
7
|
import { u as updateField, c as createField } from './Fields-c82e6df3.js';
|
|
8
|
-
import { a as getRoleIndex, r as renderDocumentField, e as updateCssTransform, f as defaultWidth, h as defaultHeight } from './utils-
|
|
8
|
+
import { a as getRoleIndex, r as renderDocumentField, e as updateCssTransform, f as defaultWidth, h as defaultHeight } from './utils-6d305f47.js';
|
|
9
9
|
import { s as state } from './templateStore-5cb73464.js';
|
|
10
10
|
import { l as loadTemplate } from './Templates-f8a6628a.js';
|
|
11
11
|
import './Token-54690789.js';
|
|
@@ -111,20 +111,24 @@ const iconRadio = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24
|
|
|
111
111
|
const iconDatepicker = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z"/></svg>';
|
|
112
112
|
const iconSignature = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" 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>';
|
|
113
113
|
const iconInitial = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>';
|
|
114
|
-
const iconClock = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5" stroke="
|
|
114
|
+
const iconClock = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5" stroke="none"><path fill="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>';
|
|
115
115
|
const iconBarsDown = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25" /></svg>';
|
|
116
|
+
const separator = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.707 14.707"><g><rect x="6.275" y="0" fill="#ffffff7f" width="1" height="15"/></g></svg>';
|
|
116
117
|
const menuOptions = [
|
|
117
|
-
// {id: 'attachment', tooltip: 'Attachment', icon: 'A'},
|
|
118
|
-
{ id: 'checkbox', tooltip: 'Check Box', icon: iconCheck },
|
|
119
|
-
{ id: 'date', tooltip: 'Date', icon: iconDatepicker },
|
|
120
|
-
{ id: 'dropdown', tooltip: 'Dropdown', icon: iconBarsDown },
|
|
121
|
-
{ id: 'initial', tooltip: 'Initials', icon: iconInitial },
|
|
122
|
-
// {id: 'payment', tooltip: 'Payment', icon: 'P'},
|
|
123
|
-
{ id: 'radio', tooltip: 'Radio Button', icon: iconRadio },
|
|
124
118
|
{ id: 'signature', tooltip: 'Signature', icon: iconSignature },
|
|
125
|
-
{ id: '
|
|
119
|
+
{ id: 'initial', tooltip: 'Initials', icon: iconInitial },
|
|
120
|
+
{ id: 'sep1', tooltip: '', icon: separator },
|
|
126
121
|
{ id: 'textbox', tooltip: 'Text Box', icon: iconSingleline },
|
|
122
|
+
{ id: 'textarea', tooltip: 'Text Area', icon: iconMultiline },
|
|
123
|
+
{ id: 'checkbox', tooltip: 'Check Box', icon: iconCheck },
|
|
124
|
+
{ id: 'radio', tooltip: 'Radio Button', icon: iconRadio },
|
|
125
|
+
{ id: 'dropdown', tooltip: 'Dropdown', icon: iconBarsDown },
|
|
126
|
+
{ id: 'sep2', tooltip: '', icon: separator },
|
|
127
|
+
{ id: 'date', tooltip: 'Date', icon: iconDatepicker },
|
|
127
128
|
{ id: 'timestamp', tooltip: 'Timestamp', icon: iconClock },
|
|
129
|
+
// {id: 'sep3', tooltip: '', icon: separator},
|
|
130
|
+
// {id: 'attachment', tooltip: 'Attachment', icon: 'A'},
|
|
131
|
+
// {id: 'payment', tooltip: 'Payment', icon: 'P'},
|
|
128
132
|
];
|
|
129
133
|
const VerdocsTemplateFields = class {
|
|
130
134
|
constructor(hostRef) {
|
|
@@ -225,30 +229,51 @@ const VerdocsTemplateFields = class {
|
|
|
225
229
|
return;
|
|
226
230
|
}
|
|
227
231
|
if (Array.isArray(el)) {
|
|
228
|
-
el.
|
|
232
|
+
el.forEach(e => {
|
|
233
|
+
this.attachFieldAttributes(pageInfo, field, roleIndex, e);
|
|
234
|
+
interact(e).draggable({
|
|
235
|
+
listeners: {
|
|
236
|
+
start(event) {
|
|
237
|
+
console.log('[FIELDS] Drag started', event.type, event.target);
|
|
238
|
+
},
|
|
239
|
+
move(event) {
|
|
240
|
+
const oldX = +(event.target.getAttribute('posX') || 0);
|
|
241
|
+
const oldY = +(event.target.getAttribute('posY') || 0);
|
|
242
|
+
const xScale = +(event.target.getAttribute('xScale') || 1);
|
|
243
|
+
const yScale = +(event.target.getAttribute('yScale') || 1);
|
|
244
|
+
const newX = event.dx / xScale + oldX;
|
|
245
|
+
const newY = event.dy / yScale + oldY;
|
|
246
|
+
event.target.setAttribute('posX', newX);
|
|
247
|
+
event.target.setAttribute('posy', newY);
|
|
248
|
+
updateCssTransform(event.target, 'translate', `${newX}px, ${newY}px`);
|
|
249
|
+
},
|
|
250
|
+
end: this.handleMoveField.bind(this),
|
|
251
|
+
},
|
|
252
|
+
});
|
|
253
|
+
});
|
|
229
254
|
}
|
|
230
255
|
else {
|
|
231
256
|
this.attachFieldAttributes(pageInfo, field, roleIndex, el);
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
257
|
+
interact(el).draggable({
|
|
258
|
+
listeners: {
|
|
259
|
+
start(event) {
|
|
260
|
+
console.log('[FIELDS] Drag started', event.type, event.target);
|
|
261
|
+
},
|
|
262
|
+
move(event) {
|
|
263
|
+
const oldX = +(event.target.getAttribute('posX') || 0);
|
|
264
|
+
const oldY = +(event.target.getAttribute('posY') || 0);
|
|
265
|
+
const xScale = +(event.target.getAttribute('xScale') || 1);
|
|
266
|
+
const yScale = +(event.target.getAttribute('yScale') || 1);
|
|
267
|
+
const newX = event.dx / xScale + oldX;
|
|
268
|
+
const newY = event.dy / yScale + oldY;
|
|
269
|
+
event.target.setAttribute('posX', newX);
|
|
270
|
+
event.target.setAttribute('posy', newY);
|
|
271
|
+
updateCssTransform(event.target, 'translate', `${newX}px, ${newY}px`);
|
|
272
|
+
},
|
|
273
|
+
end: this.handleMoveField.bind(this),
|
|
248
274
|
},
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
});
|
|
275
|
+
});
|
|
276
|
+
}
|
|
252
277
|
});
|
|
253
278
|
}
|
|
254
279
|
async handleMoveField(e) {
|
|
@@ -368,7 +393,12 @@ const VerdocsTemplateFields = class {
|
|
|
368
393
|
pages.sort((a, b) => a.sequence - b.sequence);
|
|
369
394
|
return (h(Host, { class: this.placing ? { [`placing-${this.placing}`]: true } : {}, "data-r": this.rerender, onSubmit: () => {
|
|
370
395
|
console.log('onSubmit');
|
|
371
|
-
} }, h("div", { id: "verdocs-template-fields-toolbar" }, menuOptions.map(option => (h("verdocs-toolbar-icon", { text: option.tooltip, icon: option.icon, onClick: () =>
|
|
396
|
+
} }, h("div", { id: "verdocs-template-fields-toolbar" }, menuOptions.map(option => (h("verdocs-toolbar-icon", { text: option.tooltip, icon: option.icon, onClick: () => {
|
|
397
|
+
if (option.tooltip) {
|
|
398
|
+
// We have empty tooltips on the separators, quick hack...
|
|
399
|
+
this.placing = option.id;
|
|
400
|
+
}
|
|
401
|
+
} })))), h("div", { class: "pages" }, pages.map(page => {
|
|
372
402
|
return (h("verdocs-template-document-page", { templateId: page.template_id, documentId: page.document_id, pageNumber: page.sequence, virtualWidth: 612, virtualHeight: 792, onClick: (e) => this.handleClickPage(e, page), onPageRendered: e => this.handlePageRendered(e), layers: [
|
|
373
403
|
{ name: 'page', type: 'canvas' },
|
|
374
404
|
{ name: 'controls', type: 'div' },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-e64d45e2.js';
|
|
2
2
|
import { g as getTemplateDocumentPageDisplayUri } from './TemplateDocuments-1214b04d.js';
|
|
3
3
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d50a8d28.js';
|
|
4
|
-
import { t as throttle } from './utils-
|
|
4
|
+
import { t as throttle } from './utils-6d305f47.js';
|
|
5
5
|
import './Token-54690789.js';
|
|
6
6
|
import './Envelopes-eb3eef02.js';
|
|
7
7
|
import './Files-70a192df.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, F as Fragment, a as getElement } from './index-e64d45e2.js';
|
|
2
|
-
import { i as interact } from './interact.min-
|
|
2
|
+
import { i as interact } from './interact.min-19cd5a3f.js';
|
|
3
3
|
import { u as updateRole, c as createRole } from './Roles-6eb459df.js';
|
|
4
4
|
import { V as VerdocsEndpoint, T as TemplateSenderTypes } from './VerdocsEndpoint-d50a8d28.js';
|
|
5
5
|
import { g as getRGBA } from './Colors-1b298092.js';
|
|
6
6
|
import { s as state } from './templateStore-5cb73464.js';
|
|
7
7
|
import { l as loadTemplate } from './Templates-f8a6628a.js';
|
|
8
|
-
import { a as getRoleIndex } from './utils-
|
|
8
|
+
import { a as getRoleIndex } from './utils-6d305f47.js';
|
|
9
9
|
import { S as SDKError } from './errors-9b5498c8.js';
|
|
10
10
|
import './Token-54690789.js';
|
|
11
11
|
import './index-24fd1580.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, F as Fragment, a as getElement } from './index-e64d45e2.js';
|
|
2
2
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d50a8d28.js';
|
|
3
|
-
import { i as saveEnvelopesAsZip, j as saveCertificate, s as saveAttachment } from './utils-
|
|
3
|
+
import { i as saveEnvelopesAsZip, j as saveCertificate, s as saveAttachment } from './utils-6d305f47.js';
|
|
4
4
|
import { g as getEnvelopeById, s as state } from './Envelopes-7f3b60de.js';
|
|
5
5
|
import { S as SDKError } from './errors-9b5498c8.js';
|
|
6
6
|
import './Token-54690789.js';
|