@verdocs/web-sdk 1.12.41 → 1.12.43
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/_commonjsHelpers-0c557e26.js +26 -0
- package/dist/cjs/{interact.min-fdb8d65c.js → interact.min-ba5cc513.js} +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/utils-c218d9c7.js +365 -0
- package/dist/cjs/verdocs-button-panel_3.cjs.entry.js +246 -9
- package/dist/cjs/verdocs-dropdown_2.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-date.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-signature.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-preview.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-send.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +11 -7
- package/dist/cjs/verdocs-template-create_3.cjs.entry.js +47 -39
- package/dist/cjs/verdocs-template-document-page.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-view.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/controls/verdocs-button-panel/verdocs-button-panel.js +6 -3
- package/dist/collection/components/embeds/verdocs-preview/verdocs-preview.stories.js +0 -3
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.css +10 -0
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +9 -5
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.stories.js +3 -3
- package/dist/collection/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.js +51 -6
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +44 -37
- package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.stories.js +1 -2
- package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.stories.js +1 -2
- package/dist/collection/utils/utils.js +3 -3
- package/dist/components/_commonjsHelpers.js +21 -0
- package/dist/components/interact.min.js +1 -1
- package/dist/components/utils.js +5 -24
- package/dist/components/verdocs-button-panel2.js +6 -3
- package/dist/components/verdocs-sign.js +10 -6
- package/dist/components/verdocs-template-field-properties2.js +240 -6
- package/dist/components/verdocs-template-fields2.js +44 -37
- package/dist/custom-elements.json +1502 -0
- package/dist/docs.json +1 -1
- package/dist/esm/_commonjsHelpers-5ec8f9b7.js +21 -0
- package/dist/esm/{interact.min-2d48f507.js → interact.min-cf83fa88.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-218600d6.js → utils-78a752e0.js} +5 -24
- package/dist/esm/verdocs-button-panel_3.entry.js +246 -9
- package/dist/esm/verdocs-dropdown_2.entry.js +2 -1
- package/dist/esm/verdocs-field-checkbox.entry.js +2 -1
- package/dist/esm/verdocs-field-date.entry.js +2 -1
- package/dist/esm/verdocs-field-dropdown.entry.js +2 -1
- package/dist/esm/verdocs-field-initial.entry.js +2 -1
- package/dist/esm/verdocs-field-payment.entry.js +2 -1
- package/dist/esm/verdocs-field-radio-button.entry.js +2 -1
- package/dist/esm/verdocs-field-signature.entry.js +2 -1
- package/dist/esm/verdocs-field-textarea.entry.js +2 -1
- package/dist/esm/verdocs-field-textbox.entry.js +3 -2
- package/dist/esm/verdocs-field-timestamp.entry.js +2 -1
- package/dist/esm/verdocs-preview.entry.js +2 -1
- package/dist/esm/verdocs-send.entry.js +2 -1
- package/dist/esm/verdocs-sign.entry.js +11 -7
- package/dist/esm/verdocs-template-create_3.entry.js +47 -39
- package/dist/esm/verdocs-template-document-page.entry.js +2 -1
- package/dist/esm/verdocs-view.entry.js +2 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/_commonjsHelpers-5ec8f9b7.js +1 -0
- package/dist/esm-es5/interact.min-cf83fa88.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{utils-218600d6.js → utils-78a752e0.js} +2 -2
- package/dist/esm-es5/verdocs-button-panel_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-dropdown_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_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page.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/embeds/verdocs-sign/verdocs-sign.d.ts +1 -0
- package/dist/types/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.d.ts +1 -0
- package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +1 -0
- package/dist/types/utils/utils.d.ts +2 -2
- package/dist/verdocs-web-sdk/{p-06b63e19.js → p-0d28cf05.js} +1 -1
- package/dist/verdocs-web-sdk/p-0e727b1c.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-0fd75d91.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-1abcf29d.js +13 -0
- package/dist/verdocs-web-sdk/p-1cfb7ff5.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-8c4ccdcf.system.js → p-201f27f6.system.js} +2 -2
- package/dist/verdocs-web-sdk/p-28976191.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-32fb9679.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-5a7ccee3.system.js → p-3305a941.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-36f78b1f.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3751d683.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3ba4df31.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-519127ef.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-530e47e2.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-552441c6.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-66158f86.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-667cbdb4.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-6caf1137.system.js +1 -1
- package/dist/verdocs-web-sdk/p-6ec15fc0.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-753a6e4a.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-77e616b7.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-81b24500.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-89963a6e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-8be51136.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-8cba983e.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-94fa2efb.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-9eb2690b.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-b355484e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-bbee73c8.system.js +1 -0
- package/dist/verdocs-web-sdk/p-beb19fae.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-bf8cc58c.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-c0c4cbe6.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-c83042ac.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-cae4a96e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-ce14f118.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-cf09e52c.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-dca6db47.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-eab67c09.js +1 -0
- package/dist/verdocs-web-sdk/p-f3206b9e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-f6f1eb46.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-f7910b66.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-fd463970.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-fd5d31ad.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +4 -3
- package/dist/cjs/utils-173073b5.js +0 -386
- package/dist/esm-es5/interact.min-2d48f507.js +0 -1
- package/dist/verdocs-web-sdk/p-06431b48.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-07837642.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-0a40faee.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-15a98f93.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-17ce2ecb.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-1e7791de.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-1f83efb6.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-1fadb008.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2ec93d4f.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-31c3e708.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-33f518fe.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-34327c86.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-36e04ce1.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-53b657ae.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5637ad60.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-58616494.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-61622a60.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-67ba3a16.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7b39af7f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-9131d247.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-977fbaf7.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-986d86f4.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-9ac9f634.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a746d24f.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-af8d400f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b270f99a.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-beb76dac.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c1037597.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c181315f.js +0 -13
- package/dist/verdocs-web-sdk/p-cd3ee92f.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-cf5e07d6.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ddf2b4d4.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e4bbfd3f.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ec121c9e.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f5b2c369.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f907648c.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ff7aef68.entry.js +0 -1
@@ -7,6 +7,7 @@ const popper = require('./popper-11d5f714.js');
|
|
7
7
|
require('./Types-f89f9116.js');
|
8
8
|
const Fields = require('./Fields-705a2168.js');
|
9
9
|
const VerdocsEndpoint = require('./VerdocsEndpoint-3e95f87f.js');
|
10
|
+
const _commonjsHelpers = require('./_commonjsHelpers-0c557e26.js');
|
10
11
|
const templateStore = require('./templateStore-1862f03c.js');
|
11
12
|
const Templates = require('./Templates-f310df2f.js');
|
12
13
|
const errors = require('./errors-0396da3d.js');
|
@@ -47,6 +48,7 @@ const VerdocsButtonPanel = class {
|
|
47
48
|
(_b = this.popperInstance) === null || _b === void 0 ? void 0 : _b.update().catch(() => { });
|
48
49
|
this.showing = true;
|
49
50
|
this.hiderEl = document.createElement('div');
|
51
|
+
this.hiderEl.id = 'verdocs-button-panel-hider';
|
50
52
|
this.hiderEl.style.zIndex = '100';
|
51
53
|
this.hiderEl.style.position = 'absolute';
|
52
54
|
this.hiderEl.style.top = '0px';
|
@@ -60,9 +62,11 @@ const VerdocsButtonPanel = class {
|
|
60
62
|
document.body.appendChild(this.hiderEl);
|
61
63
|
}
|
62
64
|
async hidePanel() {
|
63
|
-
var _a
|
64
|
-
(
|
65
|
-
|
65
|
+
var _a;
|
66
|
+
Array.from(document.getElementsByClassName('verdocs-button-panel-content')).forEach(el => {
|
67
|
+
el.removeAttribute('data-show');
|
68
|
+
});
|
69
|
+
(_a = document.getElementById('verdocs-button-panel-hider')) === null || _a === void 0 ? void 0 : _a.remove();
|
66
70
|
this.showing = false;
|
67
71
|
}
|
68
72
|
async toggle() {
|
@@ -98,6 +102,195 @@ const VerdocsSelectInput = class {
|
|
98
102
|
};
|
99
103
|
VerdocsSelectInput.style = verdocsSelectInputCss;
|
100
104
|
|
105
|
+
// Unique ID creation requires a high quality random # generator. In the
|
106
|
+
// browser this is a little complicated due to unknown quality of Math.random()
|
107
|
+
// and inconsistent support for the `crypto` API. We do the best we can via
|
108
|
+
// feature-detection
|
109
|
+
var rng;
|
110
|
+
|
111
|
+
var crypto = typeof _commonjsHelpers.commonjsGlobal !== 'undefined' && (_commonjsHelpers.commonjsGlobal.crypto || _commonjsHelpers.commonjsGlobal.msCrypto); // for IE 11
|
112
|
+
if (crypto && crypto.getRandomValues) {
|
113
|
+
// WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
|
114
|
+
var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
|
115
|
+
rng = function whatwgRNG() {
|
116
|
+
crypto.getRandomValues(rnds8);
|
117
|
+
return rnds8;
|
118
|
+
};
|
119
|
+
}
|
120
|
+
|
121
|
+
if (!rng) {
|
122
|
+
// Math.random()-based (RNG)
|
123
|
+
//
|
124
|
+
// If all else fails, use Math.random(). It's fast, but is of unspecified
|
125
|
+
// quality.
|
126
|
+
var rnds = new Array(16);
|
127
|
+
rng = function() {
|
128
|
+
for (var i = 0, r; i < 16; i++) {
|
129
|
+
if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
|
130
|
+
rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
|
131
|
+
}
|
132
|
+
|
133
|
+
return rnds;
|
134
|
+
};
|
135
|
+
}
|
136
|
+
|
137
|
+
var rngBrowser = rng;
|
138
|
+
|
139
|
+
/**
|
140
|
+
* Convert array of 16 byte values to UUID string format of the form:
|
141
|
+
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
142
|
+
*/
|
143
|
+
var byteToHex = [];
|
144
|
+
for (var i = 0; i < 256; ++i) {
|
145
|
+
byteToHex[i] = (i + 0x100).toString(16).substr(1);
|
146
|
+
}
|
147
|
+
|
148
|
+
function bytesToUuid(buf, offset) {
|
149
|
+
var i = offset || 0;
|
150
|
+
var bth = byteToHex;
|
151
|
+
return bth[buf[i++]] + bth[buf[i++]] +
|
152
|
+
bth[buf[i++]] + bth[buf[i++]] + '-' +
|
153
|
+
bth[buf[i++]] + bth[buf[i++]] + '-' +
|
154
|
+
bth[buf[i++]] + bth[buf[i++]] + '-' +
|
155
|
+
bth[buf[i++]] + bth[buf[i++]] + '-' +
|
156
|
+
bth[buf[i++]] + bth[buf[i++]] +
|
157
|
+
bth[buf[i++]] + bth[buf[i++]] +
|
158
|
+
bth[buf[i++]] + bth[buf[i++]];
|
159
|
+
}
|
160
|
+
|
161
|
+
var bytesToUuid_1 = bytesToUuid;
|
162
|
+
|
163
|
+
// **`v1()` - Generate time-based UUID**
|
164
|
+
//
|
165
|
+
// Inspired by https://github.com/LiosK/UUID.js
|
166
|
+
// and http://docs.python.org/library/uuid.html
|
167
|
+
|
168
|
+
// random #'s we need to init node and clockseq
|
169
|
+
var _seedBytes = rngBrowser();
|
170
|
+
|
171
|
+
// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
|
172
|
+
var _nodeId = [
|
173
|
+
_seedBytes[0] | 0x01,
|
174
|
+
_seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5]
|
175
|
+
];
|
176
|
+
|
177
|
+
// Per 4.2.2, randomize (14 bit) clockseq
|
178
|
+
var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff;
|
179
|
+
|
180
|
+
// Previous uuid creation time
|
181
|
+
var _lastMSecs = 0, _lastNSecs = 0;
|
182
|
+
|
183
|
+
// See https://github.com/broofa/node-uuid for API details
|
184
|
+
function v1(options, buf, offset) {
|
185
|
+
var i = buf && offset || 0;
|
186
|
+
var b = buf || [];
|
187
|
+
|
188
|
+
options = options || {};
|
189
|
+
|
190
|
+
var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
|
191
|
+
|
192
|
+
// UUID timestamps are 100 nano-second units since the Gregorian epoch,
|
193
|
+
// (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
|
194
|
+
// time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
|
195
|
+
// (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
|
196
|
+
var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
|
197
|
+
|
198
|
+
// Per 4.2.1.2, use count of uuid's generated during the current clock
|
199
|
+
// cycle to simulate higher resolution clock
|
200
|
+
var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
|
201
|
+
|
202
|
+
// Time since last uuid creation (in msecs)
|
203
|
+
var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
|
204
|
+
|
205
|
+
// Per 4.2.1.2, Bump clockseq on clock regression
|
206
|
+
if (dt < 0 && options.clockseq === undefined) {
|
207
|
+
clockseq = clockseq + 1 & 0x3fff;
|
208
|
+
}
|
209
|
+
|
210
|
+
// Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
|
211
|
+
// time interval
|
212
|
+
if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
|
213
|
+
nsecs = 0;
|
214
|
+
}
|
215
|
+
|
216
|
+
// Per 4.2.1.2 Throw error if too many uuids are requested
|
217
|
+
if (nsecs >= 10000) {
|
218
|
+
throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
|
219
|
+
}
|
220
|
+
|
221
|
+
_lastMSecs = msecs;
|
222
|
+
_lastNSecs = nsecs;
|
223
|
+
_clockseq = clockseq;
|
224
|
+
|
225
|
+
// Per 4.1.4 - Convert from unix epoch to Gregorian epoch
|
226
|
+
msecs += 12219292800000;
|
227
|
+
|
228
|
+
// `time_low`
|
229
|
+
var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
|
230
|
+
b[i++] = tl >>> 24 & 0xff;
|
231
|
+
b[i++] = tl >>> 16 & 0xff;
|
232
|
+
b[i++] = tl >>> 8 & 0xff;
|
233
|
+
b[i++] = tl & 0xff;
|
234
|
+
|
235
|
+
// `time_mid`
|
236
|
+
var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
|
237
|
+
b[i++] = tmh >>> 8 & 0xff;
|
238
|
+
b[i++] = tmh & 0xff;
|
239
|
+
|
240
|
+
// `time_high_and_version`
|
241
|
+
b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
|
242
|
+
b[i++] = tmh >>> 16 & 0xff;
|
243
|
+
|
244
|
+
// `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
|
245
|
+
b[i++] = clockseq >>> 8 | 0x80;
|
246
|
+
|
247
|
+
// `clock_seq_low`
|
248
|
+
b[i++] = clockseq & 0xff;
|
249
|
+
|
250
|
+
// `node`
|
251
|
+
var node = options.node || _nodeId;
|
252
|
+
for (var n = 0; n < 6; ++n) {
|
253
|
+
b[i + n] = node[n];
|
254
|
+
}
|
255
|
+
|
256
|
+
return buf ? buf : bytesToUuid_1(b);
|
257
|
+
}
|
258
|
+
|
259
|
+
var v1_1 = v1;
|
260
|
+
|
261
|
+
function v4(options, buf, offset) {
|
262
|
+
var i = buf && offset || 0;
|
263
|
+
|
264
|
+
if (typeof(options) == 'string') {
|
265
|
+
buf = options == 'binary' ? new Array(16) : null;
|
266
|
+
options = null;
|
267
|
+
}
|
268
|
+
options = options || {};
|
269
|
+
|
270
|
+
var rnds = options.random || (options.rng || rngBrowser)();
|
271
|
+
|
272
|
+
// Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
273
|
+
rnds[6] = (rnds[6] & 0x0f) | 0x40;
|
274
|
+
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
275
|
+
|
276
|
+
// Copy bytes to buffer, if provided
|
277
|
+
if (buf) {
|
278
|
+
for (var ii = 0; ii < 16; ++ii) {
|
279
|
+
buf[i + ii] = rnds[ii];
|
280
|
+
}
|
281
|
+
}
|
282
|
+
|
283
|
+
return buf || bytesToUuid_1(rnds);
|
284
|
+
}
|
285
|
+
|
286
|
+
var v4_1 = v4;
|
287
|
+
|
288
|
+
var uuid = v4_1;
|
289
|
+
uuid.v1 = v1_1;
|
290
|
+
uuid.v4 = v4_1;
|
291
|
+
|
292
|
+
var uuidBrowser = uuid;
|
293
|
+
|
101
294
|
const verdocsTemplateFieldPropertiesCss = "verdocs-template-field-properties{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-template-field-properties .buttons{display:-ms-flexbox;display:flex;margin-top:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-field-properties .buttons verdocs-button{margin-left:16px}verdocs-template-field-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-field-properties verdocs-text-input{margin:0;-ms-flex:1;flex:1}verdocs-template-field-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .delete-button:active{background:#f3f3f3}verdocs-template-field-properties .delete-button svg{width:24px;height:24px}verdocs-template-field-properties h6{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:bold;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;color:#092c4c}verdocs-template-field-properties h6 .help-icon{opacity:0.5}verdocs-template-field-properties h6 .help-icon:hover{opacity:1;cursor:pointer}verdocs-template-field-properties .row-header{gap:15px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties .row-header h6{margin-bottom:0}verdocs-template-field-properties .row-header verdocs-help-icon{-webkit-transform:scale(0.85);transform:scale(0.85)}verdocs-template-field-properties .row-header verdocs-help-icon svg{margin-bottom:-5px}verdocs-template-field-properties .row-header .add-button{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-field-properties .row-header .add-button:hover{opacity:1}verdocs-template-field-properties .row-header .add-button svg{width:32px;height:32px}verdocs-template-field-properties .option-row{margin:15px 0}verdocs-template-field-properties .option-row .remove-button{height:28px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .option-row .remove-button:active{background:#f3f3f3}verdocs-template-field-properties .option-row .remove-button:hover svg{stroke:#a50021}verdocs-template-field-properties .option-row .remove-button svg{width:20px;height:20px;stroke:#333333}verdocs-template-field-properties .options{background:#f3f3f3;padding:0 0 10px 0}verdocs-template-field-properties .options .row-header,verdocs-template-field-properties .options .option-row{padding:0 10px}verdocs-template-field-properties .options .add-option-button{border-radius:5px;border:1px solid #cccccc;background:#46497d;color:#ffffff;padding:3px 8px}verdocs-template-field-properties .options .option-row .input-element{font-size:14px}verdocs-template-field-properties .options verdocs-help-icon{opacity:1;-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-field-properties .options verdocs-help-icon svg{fill:#ffffff}";
|
102
295
|
|
103
296
|
const capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
@@ -172,7 +365,6 @@ const VerdocsTemplateFieldProperties = class {
|
|
172
365
|
var _a, _b;
|
173
366
|
e.stopPropagation();
|
174
367
|
const field = templateStore.state.fields.find(field => field.name === this.fieldName);
|
175
|
-
console.log('hc', e, field);
|
176
368
|
if (field) {
|
177
369
|
this.name = field.name;
|
178
370
|
this.roleName = field.role_name;
|
@@ -202,6 +394,53 @@ const VerdocsTemplateFieldProperties = class {
|
|
202
394
|
options: this.options,
|
203
395
|
};
|
204
396
|
}
|
397
|
+
Fields.updateField(this.endpoint, this.templateId, this.fieldName, newProperties)
|
398
|
+
.then(() => {
|
399
|
+
var _a, _b;
|
400
|
+
this.dirty = false;
|
401
|
+
const field = templateStore.state.fields.find(field => field.name === this.fieldName);
|
402
|
+
if (field) {
|
403
|
+
field.name = this.name;
|
404
|
+
field.role_name = this.roleName;
|
405
|
+
field.required = this.required;
|
406
|
+
field.label = this.placeholder;
|
407
|
+
field.setting.result = this.defaultValue;
|
408
|
+
if (field.setting.options) {
|
409
|
+
field.setting.options = this.options;
|
410
|
+
}
|
411
|
+
}
|
412
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.fieldName });
|
413
|
+
(_b = this.close) === null || _b === void 0 ? void 0 : _b.emit();
|
414
|
+
})
|
415
|
+
.catch(() => {
|
416
|
+
console.log('Field update failed', e);
|
417
|
+
});
|
418
|
+
}
|
419
|
+
handleAddOption(e) {
|
420
|
+
e.stopPropagation();
|
421
|
+
const newProperties = {
|
422
|
+
name: this.name,
|
423
|
+
required: this.required,
|
424
|
+
role_name: this.roleName,
|
425
|
+
// TODO: Default value in setting?
|
426
|
+
};
|
427
|
+
this.options.push(this.type === 'radio_button_group'
|
428
|
+
? {
|
429
|
+
id: uuidBrowser(),
|
430
|
+
value: `Option ${this.options.length + 1}`,
|
431
|
+
selected: false,
|
432
|
+
x: this.options.length > 0 ? this.options[this.options.length - 1].x : 20,
|
433
|
+
y: this.options.length > 0 ? this.options[this.options.length - 1].y - 25 : 20,
|
434
|
+
}
|
435
|
+
: {
|
436
|
+
id: uuidBrowser(),
|
437
|
+
value: `Option ${this.options.length + 1}`,
|
438
|
+
checked: false,
|
439
|
+
x: this.options.length > 0 ? this.options[this.options.length - 1].x : 20,
|
440
|
+
y: this.options.length > 0 ? this.options[this.options.length - 1].y - 25 : 20,
|
441
|
+
});
|
442
|
+
newProperties.setting = this.setting;
|
443
|
+
newProperties.setting.options = this.options;
|
205
444
|
Fields.updateField(this.endpoint, this.templateId, this.fieldName, newProperties)
|
206
445
|
.then(() => {
|
207
446
|
var _a, _b;
|
@@ -216,6 +455,7 @@ const VerdocsTemplateFieldProperties = class {
|
|
216
455
|
}
|
217
456
|
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.fieldName });
|
218
457
|
(_b = this.close) === null || _b === void 0 ? void 0 : _b.emit();
|
458
|
+
templateStore.state.updateCount++;
|
219
459
|
})
|
220
460
|
.catch(() => {
|
221
461
|
console.log('Field update failed', e);
|
@@ -250,7 +490,7 @@ const VerdocsTemplateFieldProperties = class {
|
|
250
490
|
if (this.helpText && this.showingHelp) {
|
251
491
|
return (index.h(index.Host, null, index.h("h6", null, capitalize(this.fieldType), " Settings ", index.h("div", { style: { flex: '1' } }), index.h("div", { class: "help-icon", innerHTML: HelpIcon, onClick: () => (this.showingHelp = false) })), index.h("p", { class: "instructions", innerHTML: this.helpText })));
|
252
492
|
}
|
253
|
-
return (index.h(index.Host, null, index.h("h6", null, capitalize(this.fieldType.replace(
|
493
|
+
return (index.h(index.Host, null, index.h("h6", null, capitalize(this.fieldType.replace(/_/g, ' ')), " Settings ", index.h("div", { style: { flex: '1' } }), this.helpText && index.h("div", { class: "help-icon", innerHTML: HelpIcon, onClick: () => (this.showingHelp = true) })), index.h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, index.h("div", { class: "row" }, index.h("verdocs-text-input", { id: "verdocs-field-name", label: "Field Name", value: this.name, autocomplete: "off",
|
254
494
|
// helpText="The internal name of the field. Must be unique, and contain only letters, numbers, and dashes. After an envelope is completed, the value entered by the signer will be tagged with this key."
|
255
495
|
placeholder: "Field Name...", onInput: (e) => {
|
256
496
|
this.name = e.target.value;
|
@@ -258,9 +498,6 @@ const VerdocsTemplateFieldProperties = class {
|
|
258
498
|
} })), index.h("div", { class: "row" }, index.h("div", { class: "input-label" }, "Role:"), index.h("verdocs-select-input", { value: this.roleName, options: templateStore.state.template.roles.map(role => ({ label: role.name, value: role.name })), onInput: (e) => {
|
259
499
|
this.roleName = e.target.value;
|
260
500
|
this.dirty = true;
|
261
|
-
} })), ['checkbox_group', 'radio_button_group'].includes(this.type) && (index.h("verdocs-text-input", { id: "verdocs-field-group", label: "Group Name", value: this.group, autocomplete: "off", placeholder: "Group Name...", onInput: (e) => {
|
262
|
-
this.group = e.target.value;
|
263
|
-
this.dirty = true;
|
264
501
|
} })), ['textbox', 'textarea'].includes(this.type) && (index.h("verdocs-text-input", { id: "verdocs-field-placeholder", label: "Placeholder", value: this.name, autocomplete: "off",
|
265
502
|
// helpText="Placeholder to display if the field is empty."
|
266
503
|
placeholder: "Placeholder...", onInput: (e) => {
|
@@ -269,7 +506,7 @@ const VerdocsTemplateFieldProperties = class {
|
|
269
506
|
} })), index.h("div", { class: "row", style: { marginTop: '15px', marginBottom: '15px' } }, index.h("label", { htmlFor: "verdocs-is-required", class: "input-label" }, "Required"), index.h("verdocs-checkbox", { id: "verdocs-is-required", name: "is-required", checked: this.required, value: "on", onInput: (e) => {
|
270
507
|
this.required = e.target.checked;
|
271
508
|
this.dirty = true;
|
272
|
-
} })), ['dropdown'].includes(this.type) && (index.h("div", { class: "options" }, index.h("div", { class: "row", style: {
|
509
|
+
} })), ['checkbox_group', 'radio_button_group'].includes(this.type) && index.h("verdocs-button", { size: "small", onClick: e => this.handleAddOption(e), label: "Add Option" }), ['dropdown'].includes(this.type) && (index.h("div", { class: "options" }, index.h("div", { class: "row", style: {
|
273
510
|
marginTop: '15px',
|
274
511
|
marginBottom: '15px',
|
275
512
|
textAlign: 'center',
|
@@ -7,7 +7,8 @@ const popper = require('./popper-11d5f714.js');
|
|
7
7
|
const Envelopes = require('./Envelopes-699531b7.js');
|
8
8
|
require('./Types-f89f9116.js');
|
9
9
|
const VerdocsEndpoint = require('./VerdocsEndpoint-3e95f87f.js');
|
10
|
-
const utils = require('./utils-
|
10
|
+
const utils = require('./utils-c218d9c7.js');
|
11
|
+
require('./_commonjsHelpers-0c557e26.js');
|
11
12
|
require('./Files-4bdc0c0f.js');
|
12
13
|
require('./index-6528b430.js');
|
13
14
|
|
@@ -4,8 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-67233b76.js');
|
6
6
|
const Colors = require('./Colors-e809dcc9.js');
|
7
|
-
const utils = require('./utils-
|
7
|
+
const utils = require('./utils-c218d9c7.js');
|
8
8
|
const templateStore = require('./templateStore-1862f03c.js');
|
9
|
+
require('./_commonjsHelpers-0c557e26.js');
|
9
10
|
require('./Envelopes-699531b7.js');
|
10
11
|
require('./Types-f89f9116.js');
|
11
12
|
require('./Files-4bdc0c0f.js');
|
@@ -3,10 +3,11 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-67233b76.js');
|
6
|
-
const utils = require('./utils-
|
6
|
+
const utils = require('./utils-c218d9c7.js');
|
7
7
|
const Colors = require('./Colors-e809dcc9.js');
|
8
8
|
const templateStore = require('./templateStore-1862f03c.js');
|
9
9
|
const index$1 = require('./index-6528b430.js');
|
10
|
+
require('./_commonjsHelpers-0c557e26.js');
|
10
11
|
require('./Envelopes-699531b7.js');
|
11
12
|
require('./Types-f89f9116.js');
|
12
13
|
require('./Files-4bdc0c0f.js');
|
@@ -4,8 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-67233b76.js');
|
6
6
|
const Colors = require('./Colors-e809dcc9.js');
|
7
|
-
const utils = require('./utils-
|
7
|
+
const utils = require('./utils-c218d9c7.js');
|
8
8
|
const templateStore = require('./templateStore-1862f03c.js');
|
9
|
+
require('./_commonjsHelpers-0c557e26.js');
|
9
10
|
require('./Envelopes-699531b7.js');
|
10
11
|
require('./Types-f89f9116.js');
|
11
12
|
require('./Files-4bdc0c0f.js');
|
@@ -4,8 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-67233b76.js');
|
6
6
|
const Colors = require('./Colors-e809dcc9.js');
|
7
|
-
const utils = require('./utils-
|
7
|
+
const utils = require('./utils-c218d9c7.js');
|
8
8
|
const templateStore = require('./templateStore-1862f03c.js');
|
9
|
+
require('./_commonjsHelpers-0c557e26.js');
|
9
10
|
require('./Envelopes-699531b7.js');
|
10
11
|
require('./Types-f89f9116.js');
|
11
12
|
require('./Files-4bdc0c0f.js');
|
@@ -4,8 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-67233b76.js');
|
6
6
|
const Colors = require('./Colors-e809dcc9.js');
|
7
|
-
const utils = require('./utils-
|
7
|
+
const utils = require('./utils-c218d9c7.js');
|
8
8
|
const templateStore = require('./templateStore-1862f03c.js');
|
9
|
+
require('./_commonjsHelpers-0c557e26.js');
|
9
10
|
require('./Envelopes-699531b7.js');
|
10
11
|
require('./Types-f89f9116.js');
|
11
12
|
require('./Files-4bdc0c0f.js');
|
@@ -4,8 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-67233b76.js');
|
6
6
|
const Colors = require('./Colors-e809dcc9.js');
|
7
|
-
const utils = require('./utils-
|
7
|
+
const utils = require('./utils-c218d9c7.js');
|
8
8
|
const templateStore = require('./templateStore-1862f03c.js');
|
9
|
+
require('./_commonjsHelpers-0c557e26.js');
|
9
10
|
require('./Envelopes-699531b7.js');
|
10
11
|
require('./Types-f89f9116.js');
|
11
12
|
require('./Files-4bdc0c0f.js');
|
@@ -4,8 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-67233b76.js');
|
6
6
|
const Colors = require('./Colors-e809dcc9.js');
|
7
|
-
const utils = require('./utils-
|
7
|
+
const utils = require('./utils-c218d9c7.js');
|
8
8
|
const templateStore = require('./templateStore-1862f03c.js');
|
9
|
+
require('./_commonjsHelpers-0c557e26.js');
|
9
10
|
require('./Envelopes-699531b7.js');
|
10
11
|
require('./Types-f89f9116.js');
|
11
12
|
require('./Files-4bdc0c0f.js');
|
@@ -4,8 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-67233b76.js');
|
6
6
|
const Colors = require('./Colors-e809dcc9.js');
|
7
|
-
const utils = require('./utils-
|
7
|
+
const utils = require('./utils-c218d9c7.js');
|
8
8
|
const templateStore = require('./templateStore-1862f03c.js');
|
9
|
+
require('./_commonjsHelpers-0c557e26.js');
|
9
10
|
require('./Envelopes-699531b7.js');
|
10
11
|
require('./Types-f89f9116.js');
|
11
12
|
require('./Files-4bdc0c0f.js');
|
@@ -3,10 +3,11 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-67233b76.js');
|
6
|
-
const interact_min = require('./interact.min-
|
6
|
+
const interact_min = require('./interact.min-ba5cc513.js');
|
7
7
|
const Colors = require('./Colors-e809dcc9.js');
|
8
8
|
const templateStore = require('./templateStore-1862f03c.js');
|
9
|
-
const utils = require('./utils-
|
9
|
+
const utils = require('./utils-c218d9c7.js');
|
10
|
+
require('./_commonjsHelpers-0c557e26.js');
|
10
11
|
require('./Primitives-be5088cb.js');
|
11
12
|
require('./Envelopes-699531b7.js');
|
12
13
|
require('./Types-f89f9116.js');
|
@@ -4,9 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-67233b76.js');
|
6
6
|
const Colors = require('./Colors-e809dcc9.js');
|
7
|
-
const utils = require('./utils-
|
7
|
+
const utils = require('./utils-c218d9c7.js');
|
8
8
|
const templateStore = require('./templateStore-1862f03c.js');
|
9
9
|
const index$1 = require('./index-6528b430.js');
|
10
|
+
require('./_commonjsHelpers-0c557e26.js');
|
10
11
|
require('./Envelopes-699531b7.js');
|
11
12
|
require('./Types-f89f9116.js');
|
12
13
|
require('./Files-4bdc0c0f.js');
|
@@ -5,10 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
const index = require('./index-67233b76.js');
|
6
6
|
require('./Types-f89f9116.js');
|
7
7
|
const VerdocsEndpoint = require('./VerdocsEndpoint-3e95f87f.js');
|
8
|
-
const utils = require('./utils-
|
8
|
+
const utils = require('./utils-c218d9c7.js');
|
9
9
|
const templateStore = require('./templateStore-1862f03c.js');
|
10
10
|
const Templates = require('./Templates-f310df2f.js');
|
11
11
|
const errors = require('./errors-0396da3d.js');
|
12
|
+
require('./_commonjsHelpers-0c557e26.js');
|
12
13
|
require('./Envelopes-699531b7.js');
|
13
14
|
require('./Files-4bdc0c0f.js');
|
14
15
|
require('./index-6528b430.js');
|
@@ -9,10 +9,11 @@ const Validators = require('./Validators-16e6d7d1.js');
|
|
9
9
|
const Colors = require('./Colors-e809dcc9.js');
|
10
10
|
const templateStore = require('./templateStore-1862f03c.js');
|
11
11
|
const Templates = require('./Templates-f310df2f.js');
|
12
|
-
const utils = require('./utils-
|
12
|
+
const utils = require('./utils-c218d9c7.js');
|
13
13
|
const errors = require('./errors-0396da3d.js');
|
14
14
|
require('./Primitives-be5088cb.js');
|
15
15
|
require('./Templates-e258cbd5.js');
|
16
|
+
require('./_commonjsHelpers-0c557e26.js');
|
16
17
|
require('./Envelopes-699531b7.js');
|
17
18
|
require('./Files-4bdc0c0f.js');
|
18
19
|
require('./index-6528b430.js');
|
@@ -8,8 +8,9 @@ const Types = require('./Types-f89f9116.js');
|
|
8
8
|
const VerdocsEndpoint = require('./VerdocsEndpoint-3e95f87f.js');
|
9
9
|
const Validators = require('./Validators-16e6d7d1.js');
|
10
10
|
const Primitives = require('./Primitives-be5088cb.js');
|
11
|
-
const utils = require('./utils-
|
11
|
+
const utils = require('./utils-c218d9c7.js');
|
12
12
|
const errors = require('./errors-0396da3d.js');
|
13
|
+
require('./_commonjsHelpers-0c557e26.js');
|
13
14
|
require('./Files-4bdc0c0f.js');
|
14
15
|
require('./index-6528b430.js');
|
15
16
|
|
@@ -106,7 +107,7 @@ var createInitials = function (endpoint, name, initials) {
|
|
106
107
|
.then(function (r) { return r.data; });
|
107
108
|
};
|
108
109
|
|
109
|
-
const verdocsSignCss = "verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign .intro{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;color:#111111;font-size:18px;font-weight:500;line-height:28px;-ms-flex-direction:row;flex-direction:row;background:#ffffff}verdocs-sign .intro .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;z-index:999;position:absolute;background:rgba(0, 0, 0, 0.5)}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .agree{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0 15px}verdocs-sign .agree .intro{display:none}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;white-space:nowrap;text-overflow:ellipsis}";
|
110
|
+
const verdocsSignCss = "verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign .intro{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;color:#111111;font-size:18px;font-weight:500;line-height:28px;-ms-flex-direction:row;flex-direction:row;background:#ffffff}verdocs-sign .intro .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;z-index:999;position:absolute;background:rgba(0, 0, 0, 0.5)}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .agree{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0 15px}verdocs-sign .agree .intro{display:none}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;white-space:nowrap;text-overflow:ellipsis}";
|
110
111
|
|
111
112
|
const inProgressMenuOptions = [
|
112
113
|
{ id: 'later', label: 'Finish Later' },
|
@@ -140,6 +141,7 @@ const VerdocsSign = class {
|
|
140
141
|
this.nextSubmits = false;
|
141
142
|
this.errorMessage = '';
|
142
143
|
this.focusedField = '';
|
144
|
+
this.submitting = false;
|
143
145
|
this.isDone = false;
|
144
146
|
this.showDone = false;
|
145
147
|
this.finishLater = false;
|
@@ -243,9 +245,11 @@ const VerdocsSign = class {
|
|
243
245
|
break;
|
244
246
|
case 'decline':
|
245
247
|
{
|
248
|
+
this.submitting = true;
|
246
249
|
const declineResult = await envelopeRecipientDecline(this.endpoint, this.envelopeId, this.roleId);
|
247
250
|
console.log('Decline result', declineResult);
|
248
251
|
(_c = this.envelopeUpdated) === null || _c === void 0 ? void 0 : _c.emit({ endpoint: this.endpoint, envelope: this.envelope, event: 'declined' });
|
252
|
+
this.submitting = false;
|
249
253
|
this.isDone = true;
|
250
254
|
}
|
251
255
|
break;
|
@@ -371,10 +375,9 @@ const VerdocsSign = class {
|
|
371
375
|
}
|
372
376
|
async handleNext() {
|
373
377
|
var _a;
|
374
|
-
console.log('Next');
|
375
378
|
if (this.nextSubmits) {
|
376
|
-
console.log('Next submits');
|
377
379
|
try {
|
380
|
+
this.submitting = true;
|
378
381
|
const result = await envelopeRecipientSubmit(this.endpoint, this.envelopeId, this.roleId);
|
379
382
|
console.log('[SIGN] Submitted successfully', result);
|
380
383
|
this.recipient.status = 'submitted';
|
@@ -382,8 +385,9 @@ const VerdocsSign = class {
|
|
382
385
|
this.isDone = true;
|
383
386
|
}
|
384
387
|
catch (e) {
|
385
|
-
console.log('Error submitting', e);
|
388
|
+
console.log('[SIGN] Error submitting', e);
|
386
389
|
}
|
390
|
+
this.submitting = false;
|
387
391
|
return;
|
388
392
|
}
|
389
393
|
// Find and focus the next incomplete required field
|
@@ -537,7 +541,7 @@ const VerdocsSign = class {
|
|
537
541
|
return (index.h(index.Host, { class: { agreed: this.agreed } }, this.isDone ? (index.h("verdocs-view", { endpoint: this.endpoint, envelopeId: this.envelopeId, onSdkError: e => { var _a; return (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(e.detail); } })) : (index.h("verdocs-view", { endpoint: this.endpoint, envelopeId: this.envelopeId, onSdkError: e => { var _a; return (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(e.detail); } })), this.errorMessage && index.h("verdocs-ok-dialog", { heading: "Network Error", message: this.errorMessage, onNext: () => (this.errorMessage = '') }), this.showDone && (index.h("verdocs-ok-dialog", { heading: "You're Done!", message: `You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`, onNext: () => {
|
538
542
|
this.showDone = false;
|
539
543
|
this.isDone = true;
|
540
|
-
} }))));
|
544
|
+
} })), this.submitting && (index.h("div", { class: "loading-indicator" }, index.h("verdocs-loader", null)))));
|
541
545
|
}
|
542
546
|
return (index.h(index.Host, { class: { agreed: this.agreed } }, !this.finishLater && (index.h("div", { class: "intro" }, index.h("div", { class: "inner" }, "Please review and act on these documents."))), index.h("div", { id: "verdocs-sign-header" }, index.h("div", { class: "inner" }, !this.agreed ? (index.h("div", { class: "agree" }, index.h("verdocs-checkbox", { name: "agree", label: "I agree to use electronic records and signatures.", onInput: () => this.handleClickAgree() }))) : (index.h(index.Fragment, null, index.h("img", { src: "https://verdocs.com/assets/white-logo.svg", alt: "Verdocs Logo", class: "logo" }), index.h("div", { class: "title" }, this.envelope.name), index.h("div", { style: { flex: '1' } }))), !this.finishLater && index.h("verdocs-button", { size: "small", label: this.nextButtonLabel, disabled: !this.agreed, onClick: () => this.handleNext() }), index.h("div", { style: { marginLeft: '10px' } }), index.h("verdocs-dropdown", { options: !this.isDone && !this.finishLater ? inProgressMenuOptions : doneMenuOptions, onOptionSelected: e => this.handleOptionSelected(e) }))), !this.agreed ? index.h("div", { class: "cover" }) : index.h("div", { style: { display: 'none' } }), index.h("div", { class: "document", style: { paddingTop: this.headerTargetId ? '70px' : '15px' } }, (this.envelope.documents || []).map(envelopeDocument => {
|
543
547
|
const pageNumbers = Primitives.integerSequence(1, envelopeDocument.page_numbers);
|
@@ -558,7 +562,7 @@ const VerdocsSign = class {
|
|
558
562
|
})), this.showFinishLater && (index.h("verdocs-ok-dialog", { heading: "You've saved your document to finish later.", message: `To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`, onNext: () => (this.showFinishLater = false) })), this.errorMessage && index.h("verdocs-ok-dialog", { heading: "Network Error", message: this.errorMessage, onNext: () => (this.errorMessage = '') }), this.showDone && (index.h("verdocs-ok-dialog", { heading: "You're Done!", message: `You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`, onNext: () => {
|
559
563
|
this.showDone = false;
|
560
564
|
this.isDone = true;
|
561
|
-
} }))));
|
565
|
+
} })), this.submitting && (index.h("div", { class: "loading-indicator" }, index.h("verdocs-loader", null)))));
|
562
566
|
}
|
563
567
|
};
|
564
568
|
VerdocsSign.style = verdocsSignCss;
|