@verdocs/web-sdk 6.10.4 → 6.10.6
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/Environment-CUCX3aWX.js +17 -0
- package/dist/cjs/Environment-CUCX3aWX.js.map +1 -0
- package/dist/cjs/{interact.min-CGi6ndGs.js → interact.min-CPZxI9Hv.js} +4 -4
- package/dist/cjs/interact.min-CPZxI9Hv.js.map +1 -0
- package/dist/cjs/verdocs-adopt-signature-dialog_7.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +18 -11
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-field-attachment_11.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview_6.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-sign.cjs.entry.js +8 -4
- package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-status-indicator.cjs.entry.js +135 -85
- package/dist/cjs/verdocs-status-indicator.cjs.entry.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +8 -4
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
- package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js +18 -11
- package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js.map +1 -1
- package/dist/collection/utils/Environment.js +8 -1
- package/dist/collection/utils/Environment.js.map +1 -1
- package/dist/components/{p-v9WkIq1Z.js → p-B6aUlIQe.js} +2 -2
- package/dist/components/{p-BUKCOnKs.js → p-BELGzhZw.js} +2 -2
- package/dist/components/{p-C1VW_3fv.js → p-BQUZjuoP.js} +2 -2
- package/dist/components/p-C1iHkDUH.js +2 -0
- package/dist/components/p-C1iHkDUH.js.map +1 -0
- package/dist/components/{p-CC7jlZnx.js → p-C43B3SP_.js} +2 -2
- package/dist/components/{p-C4ygd3v_.js → p-COaijEV0.js} +2 -2
- package/dist/components/p-COaijEV0.js.map +1 -0
- package/dist/components/{p-DEhaAbKn.js → p-CYvB5bYX.js} +2 -2
- package/dist/components/{p-Bi94seCl.js → p-D-TexkaT.js} +2 -2
- package/dist/components/{p-DP_N7u8w.js → p-D1cSgqut.js} +2 -2
- package/dist/components/{p-B3nCB2u5.js → p-D7oMWhqM.js} +2 -2
- package/dist/components/p-DCZz2B7h.js +2 -0
- package/dist/components/p-DCZz2B7h.js.map +1 -0
- package/dist/components/{p-CHzNcBIz.js → p-DKKsPZnz.js} +2 -2
- package/dist/components/{p-BA3SxsdQ.js → p-DZa0rMk2.js} +2 -2
- package/dist/components/{p-CqVkL8_m.js → p-DfIxVX8-.js} +2 -2
- package/dist/components/{p-C_mtaGHG.js → p-DiYuPnJJ.js} +2 -2
- package/dist/components/{p-RvR1j0oO.js → p-DiwfOWXt.js} +2 -2
- package/dist/components/p-Dy2CRiH8.js +2 -0
- package/dist/components/p-Dy2CRiH8.js.map +1 -0
- package/dist/components/{p-5fVPVL_Z.js → p-K_PKw6bs.js} +2 -2
- package/dist/components/{p-ohuuh9ZE.js → p-bPe0_Dsn.js} +2 -2
- package/dist/components/{p-B3UP88BP.js → p-i3o08M2d.js} +2 -2
- package/dist/components/{p-DnqXAqmP.js → p-zTcSNwsp.js} +2 -2
- package/dist/components/verdocs-build.js +1 -1
- package/dist/components/verdocs-contact-picker.js +1 -1
- package/dist/components/verdocs-delegate-dialog.js +1 -1
- package/dist/components/verdocs-envelopes-list.js +1 -1
- package/dist/components/verdocs-field-attachment.js +1 -1
- package/dist/components/verdocs-field-checkbox.js +1 -1
- package/dist/components/verdocs-field-date.js +1 -1
- package/dist/components/verdocs-field-dropdown.js +1 -1
- package/dist/components/verdocs-field-initial.js +1 -1
- package/dist/components/verdocs-field-payment.js +1 -1
- package/dist/components/verdocs-field-radio.js +1 -1
- package/dist/components/verdocs-field-signature.js +1 -1
- package/dist/components/verdocs-field-textarea.js +1 -1
- package/dist/components/verdocs-field-textbox.js +1 -1
- package/dist/components/verdocs-field-timestamp.js +1 -1
- package/dist/components/verdocs-otp-dialog.js +1 -1
- package/dist/components/verdocs-passcode-dialog.js +1 -1
- package/dist/components/verdocs-preview.js +1 -1
- package/dist/components/verdocs-send.js +1 -1
- package/dist/components/verdocs-sign.js +1 -1
- package/dist/components/verdocs-sign.js.map +1 -1
- package/dist/components/verdocs-status-indicator.js +1 -1
- package/dist/components/verdocs-template-document-page.js +1 -1
- package/dist/components/verdocs-template-fields.js +1 -1
- package/dist/esm/Environment-Dy2CRiH8.js +15 -0
- package/dist/esm/Environment-Dy2CRiH8.js.map +1 -0
- package/dist/esm/{interact.min-BO_a_7pQ.js → interact.min-Bf1WXbdg.js} +4 -4
- package/dist/esm/interact.min-Bf1WXbdg.js.map +1 -0
- package/dist/esm/verdocs-adopt-signature-dialog_7.entry.js +1 -1
- package/dist/esm/verdocs-contact-picker.entry.js +18 -11
- package/dist/esm/verdocs-contact-picker.entry.js.map +1 -1
- package/dist/esm/verdocs-field-attachment_11.entry.js +1 -1
- package/dist/esm/verdocs-field-payment.entry.js +1 -1
- package/dist/esm/verdocs-preview_6.entry.js +2 -2
- package/dist/esm/verdocs-sign.entry.js +8 -4
- package/dist/esm/verdocs-sign.entry.js.map +1 -1
- package/dist/esm/verdocs-status-indicator.entry.js +135 -85
- package/dist/esm/verdocs-status-indicator.entry.js.map +1 -1
- package/dist/esm-es5/Environment-Dy2CRiH8.js +2 -0
- package/dist/esm-es5/Environment-Dy2CRiH8.js.map +1 -0
- package/dist/esm-es5/{interact.min-BO_a_7pQ.js → interact.min-Bf1WXbdg.js} +2 -2
- package/dist/esm-es5/interact.min-Bf1WXbdg.js.map +1 -0
- package/dist/esm-es5/verdocs-adopt-signature-dialog_7.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-field-attachment_11.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_6.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
- package/dist/esm-es5/verdocs-status-indicator.entry.js.map +1 -1
- package/dist/verdocs-web-sdk/{p-addd303e.system.entry.js → p-006f051b.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-006f051b.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-9c481477.entry.js → p-10d47bbd.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-4471c1b4.entry.js → p-1df29abb.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-255e1915.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-255e1915.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-46e52384.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-46e52384.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-d06d9cfd.entry.js → p-4aee15e6.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-5f58b4cd.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-5f58b4cd.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-b3ac740e.system.entry.js → p-62464041.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-4f9bd0bd.system.entry.js → p-6e8ce989.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-734c8a8b.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-734c8a8b.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-BdZ5Ghsa.system.js +1 -1
- package/dist/verdocs-web-sdk/p-C96xjMgt.system.js +2 -0
- package/dist/verdocs-web-sdk/p-C96xjMgt.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-C4ygd3v_.js → p-COaijEV0.js} +2 -2
- package/dist/verdocs-web-sdk/p-COaijEV0.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-DQMNv-mt.system.js → p-CQwimGbQ.system.js} +2 -2
- package/dist/{cjs/interact.min-CGi6ndGs.js.map → verdocs-web-sdk/p-CQwimGbQ.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-Dy2CRiH8.js +2 -0
- package/dist/verdocs-web-sdk/p-Dy2CRiH8.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-1273627b.system.entry.js → p-c3527f3e.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-c86111fd.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-c86111fd.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-5c2025ca.entry.js → p-d95705c6.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-6af0110a.system.entry.js → p-e87a29a3.system.entry.js} +3 -3
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +4 -4
- package/dist/cjs/Environment-CP-XG6Lt.js +0 -13
- package/dist/cjs/Environment-CP-XG6Lt.js.map +0 -1
- package/dist/components/p-29evahil.js +0 -2
- package/dist/components/p-29evahil.js.map +0 -1
- package/dist/components/p-C4ygd3v_.js.map +0 -1
- package/dist/components/p-CA8hWmuL.js +0 -2
- package/dist/components/p-CA8hWmuL.js.map +0 -1
- package/dist/components/p-DtHLJ-XO.js +0 -2
- package/dist/components/p-DtHLJ-XO.js.map +0 -1
- package/dist/esm/Environment-29evahil.js +0 -11
- package/dist/esm/Environment-29evahil.js.map +0 -1
- package/dist/esm/interact.min-BO_a_7pQ.js.map +0 -1
- package/dist/esm-es5/Environment-29evahil.js +0 -2
- package/dist/esm-es5/Environment-29evahil.js.map +0 -1
- package/dist/esm-es5/interact.min-BO_a_7pQ.js.map +0 -1
- package/dist/verdocs-web-sdk/p-0eaeb487.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-0eaeb487.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-1a06dffb.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-1a06dffb.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-2636ac4d.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-2636ac4d.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-29evahil.js +0 -2
- package/dist/verdocs-web-sdk/p-29evahil.js.map +0 -1
- package/dist/verdocs-web-sdk/p-4a2d69b9.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-4a2d69b9.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-C4ygd3v_.js.map +0 -1
- package/dist/verdocs-web-sdk/p-CHg64SCg.system.js +0 -2
- package/dist/verdocs-web-sdk/p-CHg64SCg.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-DQMNv-mt.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-addd303e.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-f9ef8d34.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-f9ef8d34.entry.js.map +0 -1
- /package/dist/components/{p-v9WkIq1Z.js.map → p-B6aUlIQe.js.map} +0 -0
- /package/dist/components/{p-BUKCOnKs.js.map → p-BELGzhZw.js.map} +0 -0
- /package/dist/components/{p-C1VW_3fv.js.map → p-BQUZjuoP.js.map} +0 -0
- /package/dist/components/{p-CC7jlZnx.js.map → p-C43B3SP_.js.map} +0 -0
- /package/dist/components/{p-DEhaAbKn.js.map → p-CYvB5bYX.js.map} +0 -0
- /package/dist/components/{p-Bi94seCl.js.map → p-D-TexkaT.js.map} +0 -0
- /package/dist/components/{p-DP_N7u8w.js.map → p-D1cSgqut.js.map} +0 -0
- /package/dist/components/{p-B3nCB2u5.js.map → p-D7oMWhqM.js.map} +0 -0
- /package/dist/components/{p-CHzNcBIz.js.map → p-DKKsPZnz.js.map} +0 -0
- /package/dist/components/{p-BA3SxsdQ.js.map → p-DZa0rMk2.js.map} +0 -0
- /package/dist/components/{p-CqVkL8_m.js.map → p-DfIxVX8-.js.map} +0 -0
- /package/dist/components/{p-C_mtaGHG.js.map → p-DiYuPnJJ.js.map} +0 -0
- /package/dist/components/{p-RvR1j0oO.js.map → p-DiwfOWXt.js.map} +0 -0
- /package/dist/components/{p-5fVPVL_Z.js.map → p-K_PKw6bs.js.map} +0 -0
- /package/dist/components/{p-ohuuh9ZE.js.map → p-bPe0_Dsn.js.map} +0 -0
- /package/dist/components/{p-B3UP88BP.js.map → p-i3o08M2d.js.map} +0 -0
- /package/dist/components/{p-DnqXAqmP.js.map → p-zTcSNwsp.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-9c481477.entry.js.map → p-10d47bbd.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-4471c1b4.entry.js.map → p-1df29abb.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-d06d9cfd.entry.js.map → p-4aee15e6.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-b3ac740e.system.entry.js.map → p-62464041.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-4f9bd0bd.system.entry.js.map → p-6e8ce989.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-1273627b.system.entry.js.map → p-c3527f3e.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-5c2025ca.entry.js.map → p-d95705c6.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-6af0110a.system.entry.js.map → p-e87a29a3.system.entry.js.map} +0 -0
package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js
CHANGED
|
@@ -66,7 +66,14 @@ export class VerdocsContactPicker {
|
|
|
66
66
|
this.auth_methods = this.templateRole.auth_methods || [];
|
|
67
67
|
this.passcode = this.templateRole.passcode || '';
|
|
68
68
|
}
|
|
69
|
-
|
|
69
|
+
// Entitlements only gate the OPTIONAL methods (SMS, KBA, ID). Passcode and Email are always
|
|
70
|
+
// offered, so a failure here must not block them: without this catch the await rejects,
|
|
71
|
+
// authMethodsLoading stays true forever, and the user sees a spinner where every verification
|
|
72
|
+
// option should be. Degrade to "no optional entitlements" instead.
|
|
73
|
+
this.activeEntitlements = await getActiveEntitlements(this.endpoint).catch(e => {
|
|
74
|
+
console.warn('[CONTACT PICKER] Unable to load entitlements, continuing with base auth methods only', e);
|
|
75
|
+
return {};
|
|
76
|
+
});
|
|
70
77
|
this.authMethodsLoading = false;
|
|
71
78
|
console.log('[CONTACT PICKER] Loaded entitlements', this.activeEntitlements);
|
|
72
79
|
}
|
|
@@ -136,46 +143,46 @@ export class VerdocsContactPicker {
|
|
|
136
143
|
if (!!this.activeEntitlements.id_auth) {
|
|
137
144
|
verificationOptions.push({ label: 'ID Check', value: 'id' });
|
|
138
145
|
}
|
|
139
|
-
return (h("form", { key: '
|
|
146
|
+
return (h("form", { key: '70e2a9e4eb9e9da4bd9f491648d81fd30f9a34a6', onSubmit: e => e.preventDefault(),
|
|
140
147
|
// onClick={e => e.stopPropagation()}
|
|
141
|
-
autocomplete: "off" }, h("div", { key: '
|
|
148
|
+
autocomplete: "off" }, h("div", { key: '9134b3e8bcd2c59f8773ad3db7bdd04d52d9cbf7', class: "row" }, h("label", { key: '455c784b89b96afddb46dcde9bd760e3b36c890d', htmlFor: this.firstNameFieldId }, "Name:"), h("div", { key: '802e5786743df37c017f6aab4061b01db4207988', class: "names-row" }, h("input", { key: '5ee405fd8487c8f2539ede7ccf26e76bb96c3932', id: this.firstNameFieldId, name: this.firstNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", "aria-autocomplete": "none", value: this.first_name, placeholder: "First...", onFocus: () => {
|
|
142
149
|
// Give the blur event a chance to hide it first if going between first/last
|
|
143
150
|
setTimeout(() => {
|
|
144
151
|
var _a;
|
|
145
152
|
this.showSuggestions = ((_a = this.contactSuggestions) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
146
153
|
}, 100);
|
|
147
|
-
}, onInput: e => this.handleFirstNameChange(e) }), h("input", { key: '
|
|
154
|
+
}, onInput: e => this.handleFirstNameChange(e) }), h("input", { key: '2de6301b850c7d0986b0418bbb737b0f9e04849f', id: this.lastNameFieldId, name: this.lastNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", "aria-autocomplete": "none", value: this.last_name, placeholder: "Last...", onFocus: () => {
|
|
148
155
|
// Give the blur event a chance to hide it first if going between first/last
|
|
149
156
|
setTimeout(() => {
|
|
150
157
|
var _a;
|
|
151
158
|
this.showSuggestions = ((_a = this.contactSuggestions) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
152
159
|
}, 100);
|
|
153
|
-
}, onInput: e => this.handleLastNameChange(e) })), this.showSuggestions && (h("verdocs-portal", { key: '
|
|
160
|
+
}, onInput: e => this.handleLastNameChange(e) })), this.showSuggestions && (h("verdocs-portal", { key: '39c6ccb8a231fe9e01fbd99aebc3e7625dfeef17', anchor: this.firstNameFieldId, onClickAway: () => {
|
|
154
161
|
this.showSuggestions = false;
|
|
155
162
|
document.querySelectorAll(`.verdocs-portal-wrapper`).forEach(el => el.remove());
|
|
156
|
-
}, id: "verdocs-contact-picker-suggestions" }, h("div", { key: '
|
|
163
|
+
}, id: "verdocs-contact-picker-suggestions" }, h("div", { key: 'bbabbff5428faeb5cef999f422d441d3e66fdf62', class: "dropdown" }, this.contactSuggestions
|
|
157
164
|
.filter(suggestion => { var _a; return !this.first_name || ((_a = suggestion.first_name) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(this.first_name.toLowerCase())); })
|
|
158
165
|
.map(suggestion => {
|
|
159
166
|
var _a;
|
|
160
167
|
return (h("div", { key: (_a = suggestion.id) !== null && _a !== void 0 ? _a : suggestion.email, class: "suggestion", onClick: e => this.handleSelectSuggestion(e, suggestion) }, suggestion.picture ? h("img", { alt: "Avatar", class: "avatar", src: suggestion.picture }) : h("div", { class: "avatar", innerHTML: addrBookIcon }), h("div", { class: "details" }, h("div", { class: "name" }, formatFullName(suggestion)), suggestion.email && h("div", { class: "destination" }, suggestion.email), suggestion.phone && h("div", { class: "destination" }, suggestion.phone))));
|
|
161
|
-
}))))), h("div", { key: '
|
|
168
|
+
}))))), h("div", { key: '31c843f59d029535c1006c682f76d8b18f885dc3', class: "row" }, h("label", { key: '540a430d827ec0b44fc2d56d4f2cb5938d663236', htmlFor: this.emailFieldId }, "Email:"), h("input", { key: '055b0ecaee8f361a4f222cbaeedcdcfbf536a5cb', id: this.emailFieldId, name: this.emailFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", "aria-autocomplete": "none", value: this.email, placeholder: "Invite/verify via email...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.email = e.target.value) })), hasSMSAuth && (h("div", { key: 'b9c6dd3118c6eba736add88b35e68ff79715e44d', class: "row" }, h("label", { key: 'ff687e318625a8cde98b208bf72b111d48659acc', htmlFor: this.phoneFieldId }, "Phone:"), h("input", { key: '3c6f09760be62cedde15b43a1d34bbd8c2960600', id: this.phoneFieldId, name: this.phoneFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", "aria-autocomplete": "none", value: this.phone, placeholder: "Invite/verify via SMS...", onFocus: () => (this.showSuggestions = false), onInput: (e) => {
|
|
162
169
|
this.phone = convertToE164(e.target.value);
|
|
163
|
-
} }))), h(Fragment, { key: '
|
|
170
|
+
} }))), h(Fragment, { key: '2b652dbfb48a4b0360c2b6e536158492ef06125b' }, verificationOptions.length > 0 && (h("div", { key: '589c42562ec9e834680969803d747f6e94d00ec2', class: "row pin-code" }, h("label", { key: '189c3562f5e0ed7599a816d0300b5fe3c96741cb' }, "Verification Methods:"), this.authMethodsLoading ? (h("verdocs-spinner", { size: 10, mode: "dark", style: { margin: 'auto' } })) : (h("div", null, verificationOptions.map((option, i) => (h("div", { class: "option" }, h("verdocs-checkbox", { size: "small", id: `verdocs-multi-select-opt-${i}`, value: option.value, checked: this.auth_methods.includes(option.value), onInput: (e) => {
|
|
164
171
|
if (e.target.checked) {
|
|
165
172
|
this.auth_methods = [...this.auth_methods, option.value];
|
|
166
173
|
}
|
|
167
174
|
else {
|
|
168
175
|
this.auth_methods = this.auth_methods.filter(selected => selected !== option.value);
|
|
169
176
|
}
|
|
170
|
-
} }), h("label", { htmlFor: `verdocs-multi-select-option-${i}` }, option.label)))))))), this.auth_methods.includes('passcode') && (h("div", { key: '
|
|
177
|
+
} }), h("label", { htmlFor: `verdocs-multi-select-option-${i}` }, option.label)))))))), this.auth_methods.includes('passcode') && (h("div", { key: '6e12581d825a0c8089e20015d1d96fb6a182cdb5', class: "row pin-code" }, h("label", { key: 'e728bc75adcf8f8a322628c1a38f612d3dd2d2dc', htmlFor: this.phoneFieldId }, "Passcode:"), h("input", { key: '59afa58c6563d4fa9a1cb7e65409370fb685d1db', id: "verdocs-passcode", name: "verdocs-passcode", type: "text", "data-lpignore": "true", autocomplete: "blocked", "aria-autocomplete": "none", value: this.passcode, placeholder: "4-8 digits recommended...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.passcode = e.target.value) })))), h("div", { key: 'eca3f9921286dba2e5d3ba02f0b886e3d179a23f', class: "row pin-code" }, h("label", { key: '04e26414864324205e2ee71173aac15b46350b7e', style: { marginTop: '6px' } }, "Options:"), h("div", { key: 'f8df70196098a3462df02933d7d7c51cac5c856b' }, h("div", { key: '09f4d4f88a355d19ae560203020c9639fe88280e', class: "option" }, h("verdocs-checkbox", { key: 'e71d71be949fc96c1c074dcbb58ff121c4c3fd05', size: "small", id: "verdocs-delegator", checked: this.delegator, disabled: this.name_locked, onInput: (e) => {
|
|
171
178
|
this.delegator = e.target.checked;
|
|
172
179
|
if (this.delegator)
|
|
173
180
|
this.name_locked = false;
|
|
174
|
-
} }), h("label", { key: '
|
|
181
|
+
} }), h("label", { key: 'b83381a0c733b2fc19502ee1fb64462c77eb20f2', htmlFor: "verdocs-delegator" }, "May delegate signing")), h("div", { key: 'd3f59732383cded91c3c9d0431001ce27b1998b8', class: "option" }, h("verdocs-checkbox", { key: '9c0acbf0601728bf4498e2fe3c89232ee4e9448c', size: "small", id: "verdocs-name-locked", checked: this.name_locked, disabled: this.delegator, onInput: (e) => {
|
|
175
182
|
this.name_locked = e.target.checked;
|
|
176
183
|
if (this.name_locked)
|
|
177
184
|
this.delegator = false;
|
|
178
|
-
} }), h("label", { key: '
|
|
185
|
+
} }), h("label", { key: 'df906c6274917b04c471aa00eedf8fad9b9c15a1', htmlFor: "verdocs-name-locked" }, "Name locked")))), h("div", { key: '74e5e6004872803e50c315540c6dc66957d6b9b0', class: "row message" }, h("label", { key: '36557fd5a7ccd14cd5fae192bf3bfaaf9f39c136', htmlFor: "verdocs-contact-picker-message" }, "Message:"), h("textarea", { key: 'c362c8a6b1953330f128bfc5083749060d17727c', id: "verdocs-contact-picker-message", name: "verdocs-contact-picker-message", "data-lpignore": "true", autocomplete: "blocked", placeholder: "Optional message to include in invitation...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.message = e.target.value) }, this.message)), h("div", { key: '8864df6dba12af9cc9e476398368f3482ab4982f', class: "buttons" }, h("div", { key: 'f09409d3f75a7f04dcb4a93189d098dbc68177c4', class: "flex-fill" }), h("verdocs-button", { key: '17a564f49e64ec50a3ef201e0aa5b662ab0f0522', variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e) }), h("verdocs-button", { key: 'c731fb4642166fc0b682894cb71f4e41fe7b48e7', label: "OK", size: "small", disabled: !canSubmit, onClick: !canSubmit ? () => { } : e => this.handleSubmit(e) }))));
|
|
179
186
|
}
|
|
180
187
|
static get is() { return "verdocs-contact-picker"; }
|
|
181
188
|
static get originalStyleUrls() {
|
package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verdocs-contact-picker.js","sourceRoot":"","sources":["../../../../src/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,CAAC,EAAE,KAAK,EAAgB,QAAQ,EAAE,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AAW,EAAC,8CAA8C,EAC1D,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,EAC7C,OAAO,EAAE,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAEnD,IAAI,CAAC,OAAO,CACJ,CACP;YAEN,4DAAK,KAAK,EAAC,SAAS;gBAClB,4DAAK,KAAK,EAAC,WAAW,GAAG;gBAEzB,uEAAgB,OAAO,EAAC,SAAS,EAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,GAAI;gBACpG,uEAAgB,KAAK,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,GAAI,CACxH,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, h, Event, EventEmitter, Fragment, Prop, State} from '@stencil/core';\nimport {formatFullName, getActiveEntitlements, IEntitlement, IProfile, IRecipient, isValidEmail, TEntitlement, TRecipientAuthMethod, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {convertToE164} from '../../../utils/utils';\n\nconst addrBookIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-book-user\"><path d=\"M15 13a3 3 0 1 0-6 0\"/><path d=\"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20\"/><circle cx=\"12\" cy=\"8\" r=\"2\"/></svg>`;\n\nexport interface IContactSearchEvent {\n query: string;\n}\n\nexport interface IContactSelectEvent {\n first_name: string;\n last_name: string;\n email: string;\n phone: string;\n message: string;\n delegator: boolean;\n name_locked: boolean;\n auth_methods: TRecipientAuthMethod[];\n passcode: string;\n address: string;\n zip: string;\n}\n\nexport type TPickerContact = Partial<IProfile>;\n\n/**\n * Display a contact picker suitable for filling out Recipient objects when sending Envelopes.\n *\n * This picker can also be integrated with a backend to provide contact list / suggestion / address-book style behavior. As the\n * user interacts with the component, the text entered in the name fields is sent back to the parent via the `searchContacts` event.\n * The parent can use that text as a query string to call a backend to obtain appropriate contacts to show. This list may also be\n * hard-coded ahead of time to provide the user with smart suggestions on initial display, such as \"Recently Used\" contacts, or\n * to always display the user's own contact record.\n *\n * ```ts\n * <verdocs-contact-picker\n * templateRole={role}\n * contactSuggestions={[]}\n * onNext={e => console.log('Contact completed', e.detail)}\n * />\n * ```\n */\n@Component({\n tag: 'verdocs-contact-picker',\n styleUrl: 'verdocs-contact-picker.scss',\n shadow: false,\n})\nexport class VerdocsContactPicker {\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The role that this contact will be assigned to.\n */\n @Prop() templateRole: Partial<IRecipient> | null = null;\n\n /**\n * If set, suggestions will be displayed in a drop-down list to the user. It is recommended that the number\n * of suggestions be limited to the 5 best matching records.\n */\n @Prop() contactSuggestions: TPickerContact[] = [];\n\n /**\n * Event fired when the user enters text in the search field. The calling application may use this to update\n * the `contactSuggestions` property.\n */\n @Event({composed: true}) searchContacts: EventEmitter<IContactSearchEvent>;\n\n /**\n * Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n /**\n * Event fired when the user changes the type.\n */\n @Event({composed: true}) next: EventEmitter<IContactSelectEvent>;\n\n @State() first_name: string;\n @State() last_name: string;\n @State() email: string;\n @State() phone: string;\n @State() zip: string;\n @State() address: string;\n @State() message: string;\n @State() showSuggestions: boolean = false;\n @State() showMessage: boolean = false;\n @State() delegator: boolean = false;\n @State() name_locked: boolean = false;\n @State() auth_methods: TRecipientAuthMethod[] = [];\n @State() passcode: string = '';\n\n @State() firstNameFieldId = `verdocs-contact-picker-firstname-${Math.random().toString(36).substring(2, 11)}`;\n @State() lastNameFieldId = `verdocs-contact-picker-lastname-${Math.random().toString(36).substring(2, 11)}`;\n @State() emailFieldId = `verdocs-contact-picker-email-${Math.random().toString(36).substring(2, 11)}`;\n @State() phoneFieldId = `verdocs-contact-picker-phone-${Math.random().toString(36).substring(2, 11)}`;\n\n @State() activeEntitlements: Partial<Record<TEntitlement, IEntitlement>> = {};\n @State() authMethodsLoading: boolean = true\n\n async componentWillLoad() {\n this.endpoint.loadSession();\n\n if (this.templateRole) {\n const fullName = formatFullName(this.templateRole);\n const nameComponents = fullName.split(' ');\n const firstName = this.templateRole.first_name || nameComponents.shift() || '';\n const lastName = this.templateRole.last_name || nameComponents.join(' ') || '';\n this.first_name = firstName;\n this.last_name = lastName;\n\n this.email = this.templateRole.email || '';\n this.phone = this.templateRole.phone || '';\n // delegator and name_locked are mutually exclusive; delegator takes precedence if both are somehow set\n this.delegator = this.templateRole.delegator || false;\n this.name_locked = this.delegator ? false : (this.templateRole.name_locked || false);\n this.message = this.templateRole.message || '';\n this.showMessage = this.message !== '';\n this.auth_methods = this.templateRole.auth_methods || [];\n this.passcode = this.templateRole.passcode || '';\n }\n\n this.activeEntitlements = await getActiveEntitlements(this.endpoint)\n this.authMethodsLoading = false\n console.log('[CONTACT PICKER] Loaded entitlements', this.activeEntitlements)\n }\n\n handleFirstNameChange(e: any) {\n this.first_name = e.target.value;\n this.searchContacts?.emit({query: this.first_name});\n }\n\n handleLastNameChange(e: any) {\n this.last_name = e.target.value;\n this.searchContacts?.emit({query: this.last_name});\n }\n\n handleCancel(e: any) {\n e.stopPropagation();\n this.showSuggestions = false;\n this.exit?.emit();\n }\n\n handleSubmit(e: any) {\n e.stopPropagation();\n\n this.showSuggestions = false;\n this.next?.emit({\n first_name: this.first_name,\n last_name: this.last_name,\n email: this.email,\n phone: this.phone,\n message: this.message,\n delegator: this.delegator,\n name_locked: this.name_locked,\n auth_methods: this.auth_methods,\n passcode: this.passcode,\n address: this.address,\n zip: this.zip,\n });\n }\n\n handleSelectSuggestion(e: any, suggestion: TPickerContact) {\n e.stopPropagation();\n\n this.first_name = suggestion.first_name;\n this.last_name = suggestion.last_name;\n this.email = suggestion.email;\n this.phone = suggestion.phone;\n this.showSuggestions = false;\n }\n\n // The reason for the random names/IDs is to disable browser autocomplete. We set the autocomplete tags but many browsers ignore them\n // and show a duplicate autocomplete picker on top of our own.\n render() {\n // const hasBasics = this.first_name && this.last_name && (isValidEmail(this.email) || isValidPhone(this.phone));\n const hasBasics = this.first_name && this.last_name && isValidEmail(this.email);\n const hasAuthRequirements =\n !this.auth_methods.length ||\n (this.auth_methods.includes('passcode') && !!this.passcode) ||\n (this.auth_methods.includes('kba') && !!this.first_name && !!this.last_name) ||\n (this.auth_methods.includes('email') && !!this.email) ||\n (this.auth_methods.includes('sms') && !!this.phone);\n const canSubmit = hasBasics && hasAuthRequirements;\n const hasSMSAuth = !!this.activeEntitlements.sms_auth\n\n const verificationOptions = [];\n\n verificationOptions.push({label: 'Passcode', value: 'passcode'});\n verificationOptions.push({label: 'Email', value: 'email'});\n\n if (hasSMSAuth) {\n verificationOptions.push({label: 'SMS (One-Time Code)', value: 'sms'});\n }\n\n if (!!this.activeEntitlements.kba_auth) {\n verificationOptions.push({label: 'Knowledge-Based (KBA)', value: 'kba'});\n }\n\n if (!!this.activeEntitlements.id_auth) {\n verificationOptions.push({label: 'ID Check', value: 'id'});\n }\n\n return (\n <form\n onSubmit={e => e.preventDefault()}\n // onClick={e => e.stopPropagation()}\n autocomplete=\"off\"\n >\n <div class=\"row\">\n <label htmlFor={this.firstNameFieldId}>Name:</label>\n <div class=\"names-row\">\n <input\n id={this.firstNameFieldId}\n name={this.firstNameFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.first_name}\n placeholder=\"First...\"\n onFocus={() => {\n // Give the blur event a chance to hide it first if going between first/last\n setTimeout(() => {\n this.showSuggestions = this.contactSuggestions?.length > 0;\n }, 100);\n }}\n onInput={e => this.handleFirstNameChange(e)}\n />\n <input\n id={this.lastNameFieldId}\n name={this.lastNameFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.last_name}\n placeholder=\"Last...\"\n onFocus={() => {\n // Give the blur event a chance to hide it first if going between first/last\n setTimeout(() => {\n this.showSuggestions = this.contactSuggestions?.length > 0;\n }, 100);\n }}\n onInput={e => this.handleLastNameChange(e)}\n />\n </div>\n\n {this.showSuggestions && (\n <verdocs-portal\n anchor={this.firstNameFieldId}\n onClickAway={() => {\n this.showSuggestions = false;\n document.querySelectorAll(`.verdocs-portal-wrapper`).forEach(el => el.remove());\n }}\n id=\"verdocs-contact-picker-suggestions\"\n >\n <div class=\"dropdown\">\n {this.contactSuggestions\n .filter(suggestion => !this.first_name || suggestion.first_name?.toLowerCase().includes(this.first_name.toLowerCase()))\n .map(suggestion => (\n <div key={suggestion.id ?? suggestion.email} class=\"suggestion\" onClick={e => this.handleSelectSuggestion(e, suggestion)}>\n {suggestion.picture ? <img alt=\"Avatar\" class=\"avatar\" src={suggestion.picture} /> : <div class=\"avatar\" innerHTML={addrBookIcon} />}\n <div class=\"details\">\n <div class=\"name\">{formatFullName(suggestion)}</div>\n {suggestion.email && <div class=\"destination\">{suggestion.email}</div>}\n {suggestion.phone && <div class=\"destination\">{suggestion.phone}</div>}\n </div>\n </div>\n ))}\n </div>\n </verdocs-portal>\n )}\n </div>\n\n <div class=\"row\">\n <label htmlFor={this.emailFieldId}>Email:</label>\n <input\n id={this.emailFieldId}\n name={this.emailFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autoComplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.email}\n placeholder=\"Invite/verify via email...\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => (this.email = e.target.value)}\n />\n </div>\n\n {hasSMSAuth && (\n <div class=\"row\">\n <label htmlFor={this.phoneFieldId}>Phone:</label>\n <input\n id={this.phoneFieldId}\n name={this.phoneFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autoComplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.phone}\n placeholder=\"Invite/verify via SMS...\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => {\n this.phone = convertToE164(e.target.value);\n }}\n />\n </div>\n )}\n\n <Fragment>\n {verificationOptions.length > 0 && (\n <div class=\"row pin-code\">\n <label>Verification Methods:</label>\n {this.authMethodsLoading ? (\n <verdocs-spinner size={10} mode=\"dark\" style={{margin: 'auto'}} />\n ) : (\n <div>\n {verificationOptions.map((option, i) => (\n <div class=\"option\">\n <verdocs-checkbox\n size=\"small\"\n id={`verdocs-multi-select-opt-${i}`}\n value={option.value}\n checked={this.auth_methods.includes(option.value)}\n onInput={(e: any) => {\n if (e.target.checked) {\n this.auth_methods = [...this.auth_methods, option.value];\n } else {\n this.auth_methods = this.auth_methods.filter(selected => selected !== option.value);\n }\n }}\n />\n <label htmlFor={`verdocs-multi-select-option-${i}`}>{option.label}</label>\n </div>\n ))}\n </div>\n )} \n </div>\n )}\n\n {this.auth_methods.includes('passcode') && (\n <div class=\"row pin-code\">\n <label htmlFor={this.phoneFieldId}>Passcode:</label>\n <input\n id=\"verdocs-passcode\"\n name=\"verdocs-passcode\"\n type=\"text\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.passcode}\n placeholder=\"4-8 digits recommended...\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => (this.passcode = e.target.value)}\n />\n </div>\n )}\n </Fragment>\n\n <div class=\"row pin-code\">\n <label style={{marginTop: '6px'}}>Options:</label>\n <div>\n <div class=\"option\">\n <verdocs-checkbox\n size=\"small\"\n id=\"verdocs-delegator\"\n checked={this.delegator}\n disabled={this.name_locked}\n onInput={(e: any) => {\n this.delegator = e.target.checked;\n if (this.delegator) this.name_locked = false;\n }}\n />\n <label htmlFor=\"verdocs-delegator\">May delegate signing</label>\n </div>\n <div class=\"option\">\n <verdocs-checkbox\n size=\"small\"\n id=\"verdocs-name-locked\"\n checked={this.name_locked}\n disabled={this.delegator}\n onInput={(e: any) => {\n this.name_locked = e.target.checked;\n if (this.name_locked) this.delegator = false;\n }}\n />\n <label htmlFor=\"verdocs-name-locked\">Name locked</label>\n </div>\n </div>\n </div>\n\n <div class=\"row message\">\n <label htmlFor=\"verdocs-contact-picker-message\">Message:</label>\n <textarea\n id=\"verdocs-contact-picker-message\"\n name=\"verdocs-contact-picker-message\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n placeholder=\"Optional message to include in invitation...\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => (this.message = e.target.value)}\n >\n {this.message}\n </textarea>\n </div>\n\n <div class=\"buttons\">\n <div class=\"flex-fill\" />\n\n <verdocs-button variant=\"outline\" label=\"Cancel\" size=\"small\" onClick={e => this.handleCancel(e)} />\n <verdocs-button label=\"OK\" size=\"small\" disabled={!canSubmit} onClick={!canSubmit ? () => {} : e => this.handleSubmit(e)} />\n </div>\n </form>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"verdocs-contact-picker.js","sourceRoot":"","sources":["../../../../src/components/envelopes/verdocs-contact-picker/verdocs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;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, h, Event, EventEmitter, Fragment, Prop, State} from '@stencil/core';\nimport {formatFullName, getActiveEntitlements, IEntitlement, IProfile, IRecipient, isValidEmail, TEntitlement, TRecipientAuthMethod, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {convertToE164} from '../../../utils/utils';\n\nconst addrBookIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-book-user\"><path d=\"M15 13a3 3 0 1 0-6 0\"/><path d=\"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20\"/><circle cx=\"12\" cy=\"8\" r=\"2\"/></svg>`;\n\nexport interface IContactSearchEvent {\n query: string;\n}\n\nexport interface IContactSelectEvent {\n first_name: string;\n last_name: string;\n email: string;\n phone: string;\n message: string;\n delegator: boolean;\n name_locked: boolean;\n auth_methods: TRecipientAuthMethod[];\n passcode: string;\n address: string;\n zip: string;\n}\n\nexport type TPickerContact = Partial<IProfile>;\n\n/**\n * Display a contact picker suitable for filling out Recipient objects when sending Envelopes.\n *\n * This picker can also be integrated with a backend to provide contact list / suggestion / address-book style behavior. As the\n * user interacts with the component, the text entered in the name fields is sent back to the parent via the `searchContacts` event.\n * The parent can use that text as a query string to call a backend to obtain appropriate contacts to show. This list may also be\n * hard-coded ahead of time to provide the user with smart suggestions on initial display, such as \"Recently Used\" contacts, or\n * to always display the user's own contact record.\n *\n * ```ts\n * <verdocs-contact-picker\n * templateRole={role}\n * contactSuggestions={[]}\n * onNext={e => console.log('Contact completed', e.detail)}\n * />\n * ```\n */\n@Component({\n tag: 'verdocs-contact-picker',\n styleUrl: 'verdocs-contact-picker.scss',\n shadow: false,\n})\nexport class VerdocsContactPicker {\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The role that this contact will be assigned to.\n */\n @Prop() templateRole: Partial<IRecipient> | null = null;\n\n /**\n * If set, suggestions will be displayed in a drop-down list to the user. It is recommended that the number\n * of suggestions be limited to the 5 best matching records.\n */\n @Prop() contactSuggestions: TPickerContact[] = [];\n\n /**\n * Event fired when the user enters text in the search field. The calling application may use this to update\n * the `contactSuggestions` property.\n */\n @Event({composed: true}) searchContacts: EventEmitter<IContactSearchEvent>;\n\n /**\n * Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n /**\n * Event fired when the user changes the type.\n */\n @Event({composed: true}) next: EventEmitter<IContactSelectEvent>;\n\n @State() first_name: string;\n @State() last_name: string;\n @State() email: string;\n @State() phone: string;\n @State() zip: string;\n @State() address: string;\n @State() message: string;\n @State() showSuggestions: boolean = false;\n @State() showMessage: boolean = false;\n @State() delegator: boolean = false;\n @State() name_locked: boolean = false;\n @State() auth_methods: TRecipientAuthMethod[] = [];\n @State() passcode: string = '';\n\n @State() firstNameFieldId = `verdocs-contact-picker-firstname-${Math.random().toString(36).substring(2, 11)}`;\n @State() lastNameFieldId = `verdocs-contact-picker-lastname-${Math.random().toString(36).substring(2, 11)}`;\n @State() emailFieldId = `verdocs-contact-picker-email-${Math.random().toString(36).substring(2, 11)}`;\n @State() phoneFieldId = `verdocs-contact-picker-phone-${Math.random().toString(36).substring(2, 11)}`;\n\n @State() activeEntitlements: Partial<Record<TEntitlement, IEntitlement>> = {};\n @State() authMethodsLoading: boolean = true\n\n async componentWillLoad() {\n this.endpoint.loadSession();\n\n if (this.templateRole) {\n const fullName = formatFullName(this.templateRole);\n const nameComponents = fullName.split(' ');\n const firstName = this.templateRole.first_name || nameComponents.shift() || '';\n const lastName = this.templateRole.last_name || nameComponents.join(' ') || '';\n this.first_name = firstName;\n this.last_name = lastName;\n\n this.email = this.templateRole.email || '';\n this.phone = this.templateRole.phone || '';\n // delegator and name_locked are mutually exclusive; delegator takes precedence if both are somehow set\n this.delegator = this.templateRole.delegator || false;\n this.name_locked = this.delegator ? false : (this.templateRole.name_locked || false);\n this.message = this.templateRole.message || '';\n this.showMessage = this.message !== '';\n this.auth_methods = this.templateRole.auth_methods || [];\n this.passcode = this.templateRole.passcode || '';\n }\n\n // Entitlements only gate the OPTIONAL methods (SMS, KBA, ID). Passcode and Email are always\n // offered, so a failure here must not block them: without this catch the await rejects,\n // authMethodsLoading stays true forever, and the user sees a spinner where every verification\n // option should be. Degrade to \"no optional entitlements\" instead.\n this.activeEntitlements = await getActiveEntitlements(this.endpoint).catch(e => {\n console.warn('[CONTACT PICKER] Unable to load entitlements, continuing with base auth methods only', e);\n return {} as Partial<Record<TEntitlement, IEntitlement>>;\n });\n this.authMethodsLoading = false;\n console.log('[CONTACT PICKER] Loaded entitlements', this.activeEntitlements);\n }\n\n handleFirstNameChange(e: any) {\n this.first_name = e.target.value;\n this.searchContacts?.emit({query: this.first_name});\n }\n\n handleLastNameChange(e: any) {\n this.last_name = e.target.value;\n this.searchContacts?.emit({query: this.last_name});\n }\n\n handleCancel(e: any) {\n e.stopPropagation();\n this.showSuggestions = false;\n this.exit?.emit();\n }\n\n handleSubmit(e: any) {\n e.stopPropagation();\n\n this.showSuggestions = false;\n this.next?.emit({\n first_name: this.first_name,\n last_name: this.last_name,\n email: this.email,\n phone: this.phone,\n message: this.message,\n delegator: this.delegator,\n name_locked: this.name_locked,\n auth_methods: this.auth_methods,\n passcode: this.passcode,\n address: this.address,\n zip: this.zip,\n });\n }\n\n handleSelectSuggestion(e: any, suggestion: TPickerContact) {\n e.stopPropagation();\n\n this.first_name = suggestion.first_name;\n this.last_name = suggestion.last_name;\n this.email = suggestion.email;\n this.phone = suggestion.phone;\n this.showSuggestions = false;\n }\n\n // The reason for the random names/IDs is to disable browser autocomplete. We set the autocomplete tags but many browsers ignore them\n // and show a duplicate autocomplete picker on top of our own.\n render() {\n // const hasBasics = this.first_name && this.last_name && (isValidEmail(this.email) || isValidPhone(this.phone));\n const hasBasics = this.first_name && this.last_name && isValidEmail(this.email);\n const hasAuthRequirements =\n !this.auth_methods.length ||\n (this.auth_methods.includes('passcode') && !!this.passcode) ||\n (this.auth_methods.includes('kba') && !!this.first_name && !!this.last_name) ||\n (this.auth_methods.includes('email') && !!this.email) ||\n (this.auth_methods.includes('sms') && !!this.phone);\n const canSubmit = hasBasics && hasAuthRequirements;\n const hasSMSAuth = !!this.activeEntitlements.sms_auth\n\n const verificationOptions = [];\n\n verificationOptions.push({label: 'Passcode', value: 'passcode'});\n verificationOptions.push({label: 'Email', value: 'email'});\n\n if (hasSMSAuth) {\n verificationOptions.push({label: 'SMS (One-Time Code)', value: 'sms'});\n }\n\n if (!!this.activeEntitlements.kba_auth) {\n verificationOptions.push({label: 'Knowledge-Based (KBA)', value: 'kba'});\n }\n\n if (!!this.activeEntitlements.id_auth) {\n verificationOptions.push({label: 'ID Check', value: 'id'});\n }\n\n return (\n <form\n onSubmit={e => e.preventDefault()}\n // onClick={e => e.stopPropagation()}\n autocomplete=\"off\"\n >\n <div class=\"row\">\n <label htmlFor={this.firstNameFieldId}>Name:</label>\n <div class=\"names-row\">\n <input\n id={this.firstNameFieldId}\n name={this.firstNameFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.first_name}\n placeholder=\"First...\"\n onFocus={() => {\n // Give the blur event a chance to hide it first if going between first/last\n setTimeout(() => {\n this.showSuggestions = this.contactSuggestions?.length > 0;\n }, 100);\n }}\n onInput={e => this.handleFirstNameChange(e)}\n />\n <input\n id={this.lastNameFieldId}\n name={this.lastNameFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.last_name}\n placeholder=\"Last...\"\n onFocus={() => {\n // Give the blur event a chance to hide it first if going between first/last\n setTimeout(() => {\n this.showSuggestions = this.contactSuggestions?.length > 0;\n }, 100);\n }}\n onInput={e => this.handleLastNameChange(e)}\n />\n </div>\n\n {this.showSuggestions && (\n <verdocs-portal\n anchor={this.firstNameFieldId}\n onClickAway={() => {\n this.showSuggestions = false;\n document.querySelectorAll(`.verdocs-portal-wrapper`).forEach(el => el.remove());\n }}\n id=\"verdocs-contact-picker-suggestions\"\n >\n <div class=\"dropdown\">\n {this.contactSuggestions\n .filter(suggestion => !this.first_name || suggestion.first_name?.toLowerCase().includes(this.first_name.toLowerCase()))\n .map(suggestion => (\n <div key={suggestion.id ?? suggestion.email} class=\"suggestion\" onClick={e => this.handleSelectSuggestion(e, suggestion)}>\n {suggestion.picture ? <img alt=\"Avatar\" class=\"avatar\" src={suggestion.picture} /> : <div class=\"avatar\" innerHTML={addrBookIcon} />}\n <div class=\"details\">\n <div class=\"name\">{formatFullName(suggestion)}</div>\n {suggestion.email && <div class=\"destination\">{suggestion.email}</div>}\n {suggestion.phone && <div class=\"destination\">{suggestion.phone}</div>}\n </div>\n </div>\n ))}\n </div>\n </verdocs-portal>\n )}\n </div>\n\n <div class=\"row\">\n <label htmlFor={this.emailFieldId}>Email:</label>\n <input\n id={this.emailFieldId}\n name={this.emailFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autoComplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.email}\n placeholder=\"Invite/verify via email...\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => (this.email = e.target.value)}\n />\n </div>\n\n {hasSMSAuth && (\n <div class=\"row\">\n <label htmlFor={this.phoneFieldId}>Phone:</label>\n <input\n id={this.phoneFieldId}\n name={this.phoneFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autoComplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.phone}\n placeholder=\"Invite/verify via SMS...\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => {\n this.phone = convertToE164(e.target.value);\n }}\n />\n </div>\n )}\n\n <Fragment>\n {verificationOptions.length > 0 && (\n <div class=\"row pin-code\">\n <label>Verification Methods:</label>\n {this.authMethodsLoading ? (\n <verdocs-spinner size={10} mode=\"dark\" style={{margin: 'auto'}} />\n ) : (\n <div>\n {verificationOptions.map((option, i) => (\n <div class=\"option\">\n <verdocs-checkbox\n size=\"small\"\n id={`verdocs-multi-select-opt-${i}`}\n value={option.value}\n checked={this.auth_methods.includes(option.value)}\n onInput={(e: any) => {\n if (e.target.checked) {\n this.auth_methods = [...this.auth_methods, option.value];\n } else {\n this.auth_methods = this.auth_methods.filter(selected => selected !== option.value);\n }\n }}\n />\n <label htmlFor={`verdocs-multi-select-option-${i}`}>{option.label}</label>\n </div>\n ))}\n </div>\n )} \n </div>\n )}\n\n {this.auth_methods.includes('passcode') && (\n <div class=\"row pin-code\">\n <label htmlFor={this.phoneFieldId}>Passcode:</label>\n <input\n id=\"verdocs-passcode\"\n name=\"verdocs-passcode\"\n type=\"text\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.passcode}\n placeholder=\"4-8 digits recommended...\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => (this.passcode = e.target.value)}\n />\n </div>\n )}\n </Fragment>\n\n <div class=\"row pin-code\">\n <label style={{marginTop: '6px'}}>Options:</label>\n <div>\n <div class=\"option\">\n <verdocs-checkbox\n size=\"small\"\n id=\"verdocs-delegator\"\n checked={this.delegator}\n disabled={this.name_locked}\n onInput={(e: any) => {\n this.delegator = e.target.checked;\n if (this.delegator) this.name_locked = false;\n }}\n />\n <label htmlFor=\"verdocs-delegator\">May delegate signing</label>\n </div>\n <div class=\"option\">\n <verdocs-checkbox\n size=\"small\"\n id=\"verdocs-name-locked\"\n checked={this.name_locked}\n disabled={this.delegator}\n onInput={(e: any) => {\n this.name_locked = e.target.checked;\n if (this.name_locked) this.delegator = false;\n }}\n />\n <label htmlFor=\"verdocs-name-locked\">Name locked</label>\n </div>\n </div>\n </div>\n\n <div class=\"row message\">\n <label htmlFor=\"verdocs-contact-picker-message\">Message:</label>\n <textarea\n id=\"verdocs-contact-picker-message\"\n name=\"verdocs-contact-picker-message\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n placeholder=\"Optional message to include in invitation...\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => (this.message = e.target.value)}\n >\n {this.message}\n </textarea>\n </div>\n\n <div class=\"buttons\">\n <div class=\"flex-fill\" />\n\n <verdocs-button variant=\"outline\" label=\"Cancel\" size=\"small\" onClick={e => this.handleCancel(e)} />\n <verdocs-button label=\"OK\" size=\"small\" disabled={!canSubmit} onClick={!canSubmit ? () => {} : e => this.handleSubmit(e)} />\n </div>\n </form>\n );\n }\n}\n"]}
|
|
@@ -2,5 +2,12 @@ import { VerdocsEndpoint } from "@verdocs/js-sdk";
|
|
|
2
2
|
export const BETA_ORIGINS = ['https://beta.verdocs.com', 'https://stage.verdocs.com', 'http://localhost:6006', 'http://localhost:5173'];
|
|
3
3
|
export const IS_BETA = BETA_ORIGINS.includes(window.location.origin);
|
|
4
4
|
export const API_URL = IS_BETA ? 'https://stage-api.verdocs.com' : 'https://api.verdocs.com';
|
|
5
|
-
|
|
5
|
+
// NOTE: deliberately does NOT call setBaseURL(). VerdocsEndpoint's constructor already applies this
|
|
6
|
+
// exact origin-based default (same BETA_ORIGINS list), so setting it here was redundant — and
|
|
7
|
+
// harmful: the default endpoint is a global singleton (Symbol.for('verdocs-default-endpoint')), and
|
|
8
|
+
// this module is a lazily-loaded chunk that evaluates the first time a component renders. That
|
|
9
|
+
// meant it silently overwrote whatever baseURL the host app had configured at startup. Apps
|
|
10
|
+
// embedded on origins we don't recognize (e.g. the Verdocs Teams tab, served from
|
|
11
|
+
// *.azurestaticapps.net) were repointed at production even after explicitly selecting stage.
|
|
12
|
+
export const DefaultEndpoint = VerdocsEndpoint.getDefault();
|
|
6
13
|
//# sourceMappingURL=Environment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Environment.js","sourceRoot":"","sources":["../../src/utils/Environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,0BAA0B,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,uBAAuB,CAAC,CAAC;AAExI,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,yBAAyB,CAAC;AAE7F,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC,UAAU,EAAE,CAAC
|
|
1
|
+
{"version":3,"file":"Environment.js","sourceRoot":"","sources":["../../src/utils/Environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,0BAA0B,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,uBAAuB,CAAC,CAAC;AAExI,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,yBAAyB,CAAC;AAE7F,oGAAoG;AACpG,8FAA8F;AAC9F,oGAAoG;AACpG,+FAA+F;AAC/F,4FAA4F;AAC5F,kFAAkF;AAClF,6FAA6F;AAC7F,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC,UAAU,EAAE,CAAC","sourcesContent":["import {VerdocsEndpoint} from '@verdocs/js-sdk';\n\nexport const BETA_ORIGINS = ['https://beta.verdocs.com', 'https://stage.verdocs.com', 'http://localhost:6006', 'http://localhost:5173'];\n\nexport const IS_BETA = BETA_ORIGINS.includes(window.location.origin);\n\nexport const API_URL = IS_BETA ? 'https://stage-api.verdocs.com' : 'https://api.verdocs.com';\n\n// NOTE: deliberately does NOT call setBaseURL(). VerdocsEndpoint's constructor already applies this\n// exact origin-based default (same BETA_ORIGINS list), so setting it here was redundant — and\n// harmful: the default endpoint is a global singleton (Symbol.for('verdocs-default-endpoint')), and\n// this module is a lazily-loaded chunk that evaluates the first time a component renders. That\n// meant it silently overwrote whatever baseURL the host app had configured at startup. Apps\n// embedded on origins we don't recognize (e.g. the Verdocs Teams tab, served from\n// *.azurestaticapps.net) were repointed at production even after explicitly selecting stage.\nexport const DefaultEndpoint = VerdocsEndpoint.getDefault();\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as s,c as t,h as o,d as r,F as i,t as a}from"./p-yZBlG3YQ.js";import{i as d}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as s,c as t,h as o,d as r,F as i,t as a}from"./p-yZBlG3YQ.js";import{i as d}from"./p-COaijEV0.js";import{VerdocsEndpoint as c,getTemplate as l,integerSequence as m}from"@verdocs/js-sdk";import{a as n}from"./p-BCwFpXpV.js";import{S as p}from"./p-C1sRVZWv.js";import{S as f}from"./p-C7hFgM52.js";import{d as v}from"./p-C0SHIuoK.js";import{d as u}from"./p-DVx4efoX.js";import{d as h}from"./p--jRXEN0c.js";import{d as b}from"./p-JGWMBIGy.js";import{d as g}from"./p-D1cSgqut.js";import{d as E}from"./p-K_PKw6bs.js";import{d as k}from"./p-DiYuPnJJ.js";import{d as x}from"./p-DKKsPZnz.js";import{d as j}from"./p-D-TexkaT.js";import{d as w}from"./p-D7oMWhqM.js";import{d as I}from"./p-BQUZjuoP.js";import{d as y}from"./p-DfIxVX8-.js";import{d as D}from"./p-BELGzhZw.js";import{d as C}from"./p-bPe0_Dsn.js";import{d as P}from"./p-D9yawpPk.js";import{d as B}from"./p-CxIhMndz.js";import{d as R}from"./p-vimrvRye.js";import{d as T}from"./p-Dc3BDcaU.js";import{d as V}from"./p-CIgqf7hj.js";import{d as W}from"./p-u9H54zUE.js";import{d as z}from"./p-CYvB5bYX.js";import{d as M}from"./p-BWrwPDuU.js";import{d as U}from"./p-BMGs9CCD.js";import{d as q}from"./p-LYpUmpqf.js";const G=()=>`verdocs-preview{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-preview div,verdocs-preview canvas{-webkit-box-sizing:border-box;box-sizing:border-box}`;const K=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.sdkError=t(this,"sdkError");this.templateListenerId=null;this.renderedPages={};this.endpoint=c.getDefault();this.templateId=null;this.loading=true;this.template=null}disconnectedCallback(){this.unlistenToTemplate()}async listenToTemplate(){this.unlistenToTemplate();f.subscribe("templates",this.templateId,(()=>l(this.endpoint,this.templateId)),false,(e=>{this.template=e;this.loading=false}))}unlistenToTemplate(){if(this.templateListenerId){f.store.delListener(this.templateListenerId);this.templateListenerId=null}}onTemplateIdChanged(e){console.log("[PREVIEW] Template ID changed",e);this.listenToTemplate()}async componentWillLoad(){var e,s,t;try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[PREVIEW] Unable to start builder session, must be authenticated");return}if(!this.templateId){console.log(`[PREVIEW] Missing required template ID ${this.templateId}`);return}this.listenToTemplate()}catch(o){console.log("[PREVIEW] Error with preview session",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new p(o.message,(s=o.response)===null||s===void 0?void 0:s.status,(t=o.response)===null||t===void 0?void 0:t.data))}}componentDidRender(){var e;(e=this.hostEl)===null||e===void 0?void 0:e.querySelectorAll(".verdocs-field").forEach((e=>{d(e).unset()}))}handlePageRendered(e){var s;const t=e.detail;this.renderedPages[`${t.documentId}:${t.pageNumber}`]=t;const o=(((s=this.template)===null||s===void 0?void 0:s.fields)||[]).filter((e=>{if(e["document_id"]){return e["document_id"]===t.documentId&&e.page===t.pageNumber}return e.page===t.pageNumber}));o.forEach((e=>n("template",e,t,{disabled:true,editable:false,draggable:false})))}render(){var e;if(this.loading){return o(r,null,o("verdocs-loader",null))}return o(r,null,(((e=this.template)===null||e===void 0?void 0:e.documents)||[]).map((e=>{const s=m(1,e.pages);return o(i,null,s.map((s=>{var t;const r=((t=e.page_sizes)===null||t===void 0?void 0:t[s])||{width:612,height:792};return o("verdocs-template-document-page",{templateId:e.template_id,documentId:e.id,pageNumber:s,disabled:true,editable:false,done:false,virtualWidth:r.width,virtualHeight:r.height,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))})))}get hostEl(){return this}static get watchers(){return{templateId:[{onTemplateIdChanged:0}]}}static get style(){return G()}},[0,"verdocs-preview",{endpoint:[16],templateId:[1,"template-id"],loading:[32],template:[32]},undefined,{templateId:[{onTemplateIdChanged:0}]}]);function X(){if(typeof customElements==="undefined"){return}const e=["verdocs-preview","verdocs-button","verdocs-checkbox","verdocs-component-error","verdocs-dialog","verdocs-field-attachment","verdocs-field-checkbox","verdocs-field-date","verdocs-field-dropdown","verdocs-field-initial","verdocs-field-radio","verdocs-field-signature","verdocs-field-textarea","verdocs-field-textbox","verdocs-field-timestamp","verdocs-flag","verdocs-help-icon","verdocs-loader","verdocs-ok-dialog","verdocs-portal","verdocs-select-input","verdocs-template-document-page","verdocs-template-field-properties","verdocs-text-input","verdocs-upload-dialog"];e.forEach((e=>{switch(e){case"verdocs-preview":if(!customElements.get(a(e))){customElements.define(a(e),K)}break;case"verdocs-button":if(!customElements.get(a(e))){v()}break;case"verdocs-checkbox":if(!customElements.get(a(e))){u()}break;case"verdocs-component-error":if(!customElements.get(a(e))){h()}break;case"verdocs-dialog":if(!customElements.get(a(e))){b()}break;case"verdocs-field-attachment":if(!customElements.get(a(e))){g()}break;case"verdocs-field-checkbox":if(!customElements.get(a(e))){E()}break;case"verdocs-field-date":if(!customElements.get(a(e))){k()}break;case"verdocs-field-dropdown":if(!customElements.get(a(e))){x()}break;case"verdocs-field-initial":if(!customElements.get(a(e))){j()}break;case"verdocs-field-radio":if(!customElements.get(a(e))){w()}break;case"verdocs-field-signature":if(!customElements.get(a(e))){I()}break;case"verdocs-field-textarea":if(!customElements.get(a(e))){y()}break;case"verdocs-field-textbox":if(!customElements.get(a(e))){D()}break;case"verdocs-field-timestamp":if(!customElements.get(a(e))){C()}break;case"verdocs-flag":if(!customElements.get(a(e))){P()}break;case"verdocs-help-icon":if(!customElements.get(a(e))){B()}break;case"verdocs-loader":if(!customElements.get(a(e))){R()}break;case"verdocs-ok-dialog":if(!customElements.get(a(e))){T()}break;case"verdocs-portal":if(!customElements.get(a(e))){V()}break;case"verdocs-select-input":if(!customElements.get(a(e))){W()}break;case"verdocs-template-document-page":if(!customElements.get(a(e))){z()}break;case"verdocs-template-field-properties":if(!customElements.get(a(e))){M()}break;case"verdocs-text-input":if(!customElements.get(a(e))){U()}break;case"verdocs-upload-dialog":if(!customElements.get(a(e))){q()}break}}))}export{K as V,X as d};
|
|
2
|
+
//# sourceMappingURL=p-B6aUlIQe.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as t,c as o,h as s,F as i,d as r,t as d}from"./p-yZBlG3YQ.js";import{i as l}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as t,c as o,h as s,F as i,d as r,t as d}from"./p-yZBlG3YQ.js";import{i as l}from"./p-COaijEV0.js";import{VerdocsEndpoint as a,updateField as n}from"@verdocs/js-sdk";import{S as c}from"./p-BDv5kBUR.js";import{S as p}from"./p-C7hFgM52.js";import{d as f}from"./p-C0SHIuoK.js";import{d as h}from"./p-DVx4efoX.js";import{d as b}from"./p--jRXEN0c.js";import{d as x}from"./p-CxIhMndz.js";import{d as u}from"./p-vimrvRye.js";import{d as v}from"./p-CIgqf7hj.js";import{d as m}from"./p-u9H54zUE.js";import{d as g}from"./p-BWrwPDuU.js";import{d as w}from"./p-BMGs9CCD.js";const k=()=>`verdocs-field-textbox{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);-webkit-box-sizing:border-box;box-sizing:border-box;width:150px;height:15px;display:block;font-size:11px;position:relative;scroll-margin:20px 0;letter-spacing:-0.2px;background-color:var(--verdocs-field-background, transparent);-webkit-transform-origin:bottom left;transform-origin:bottom left;border:var(--verdocs-field-border, 1px solid rgba(0, 0, 0, 0.2));border-radius:var(--verdocs-field-radius)}verdocs-field-textbox.small input,verdocs-field-textbox.small textarea{font-size:8px}verdocs-field-textbox .edge-top,verdocs-field-textbox .edge-right,verdocs-field-textbox .edge-left,verdocs-field-textbox .edge-bottom{position:absolute;z-index:10}verdocs-field-textbox .edge-top{top:-2px;left:0;right:0;height:5px}verdocs-field-textbox .edge-right{top:0;bottom:0;right:-2px;width:5px}verdocs-field-textbox .edge-left{top:0;left:-2px;bottom:0;width:5px}verdocs-field-textbox .edge-bottom{bottom:-2px;left:0;right:0;height:5px}verdocs-field-textbox input{cursor:inherit;width:100%;height:100%;border:none;outline:none;padding:0 3px;font-size:11px;background:none;font-weight:500;position:absolute;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--verdocs-field-text-color, rgba(0, 0, 0, 0.87))}verdocs-field-textbox input.hide{display:none}verdocs-field-textbox.disabled input{opacity:0.5}verdocs-field-textbox textarea{cursor:inherit;width:100%;height:100%;resize:none;border:none;outline:none;padding:0 3px;font-size:11px;background:none;font-weight:500;line-height:13px;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--verdocs-field-text-color, rgba(0, 0, 0, 0.87))}verdocs-field-textbox textarea.hide{display:none}verdocs-field-textbox.disabled textarea{opacity:0.5}verdocs-field-textbox label{top:-14px;left:-1px;height:14px;color:white;padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-textbox.required.required{border:1px solid var(--verdocs-required-field-border)}verdocs-field-textbox verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-textbox verdocs-button-panel[data-active],verdocs-field-textbox verdocs-button-panel:hover{opacity:1}verdocs-field-textbox verdocs-button-panel .icon svg{fill:#333333}verdocs-field-textbox verdocs-button-panel .icon:hover svg{fill:#000000}verdocs-field-textbox [data-lastpass-icon-root]{display:none !important}verdocs-field-textbox .settings-icon{position:absolute;top:-4px;left:-18px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-textbox .settings-icon svg{fill:#707ae5}verdocs-field-textbox .settings-icon:hover{opacity:1}`;const y=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.settingsChanged=o(this,"settingsChanged");this.deleted=o(this,"deleted");this.source="template";this.sourceid="";this.fieldname="";this.field=null;this.disabled=false;this.multiline=false;this.editable=false;this.moveable=false;this.done=false;this.xscale=1;this.yscale=1;this.pagenumber=1;this.showingProperties=false;this.focused=false}handleBlur(){this.focused=false}async focusField(){this.inputEl.focus();this.focused=true}async showSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.showPanel){e.showPanel()}}async hideSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.hidePanel){e.hidePanel()}this.showingProperties=false}onEditableChanged(e,t){if(t&&!e){l(this.el).unset()}}disconnectedCallback(){l(this.el).unset()}componentDidRender(){l.dynamicDrop(true);if(this.editable){l(this.el).resizable({edges:{top:".edge-top",left:".edge-left",bottom:".edge-bottom",right:".edge-right"},modifiers:[l.modifiers.restrictSize({min:{width:30,height:10}})],listeners:{start:this.handleResizeStart.bind(this),move:this.handleResize.bind(this),end:this.handleResizeEnd.bind(this)}})}}handleResizeStart(e){e.preventDefault();e.stopPropagation();e.target.dataset.originalBottom=e.target.style.bottom}handleResize(e){let{width:t,height:o}=e.rect;const s=e.deltaRect.left;const i=e.deltaRect.bottom;const r=parseFloat(e.target.style.left);const d=parseFloat(e.target.style.bottom);t/=this.xscale;o/=this.yscale;Object.assign(e.target.style,{width:`${t}px`,height:`${o}px`,left:`${r+s}px`,bottom:`${d-i}px`})}async handleResizeEnd(e){const{sourceid:t,fieldname:o}=this;const s=Math.round(parseFloat(e.target.style.width));let i=Math.round(parseFloat(e.target.style.height));if(i<10){i=10}const r=i>15;const d=parseFloat(e.target.style.bottom);const l=parseFloat(e.target.dataset.originalBottom);const c=await p.getTemplate(a.getDefault(),this.sourceid);const f=c.fields.find((e=>e.name===o));const h=d!==l?d/this.yscale:f===null||f===void 0?void 0:f.y;n(a.getDefault(),t,o,{width:s,height:i,y:h,multiline:r}).then((async t=>{var s;const i=await p.getTemplate(a.getDefault(),this.sourceid);const r=JSON.parse(JSON.stringify(i));const d=r.fields.findIndex((e=>e.name===o));if(d>-1){r.fields[d]=t}p.updateTemplate(this.sourceid,r);(s=this.settingsChanged)===null||s===void 0?void 0:s.emit({fieldName:o,field:t});Object.assign(e.target.dataset,{x:0,y:0,h:0})})).catch((e=>console.log("Field update failed",e)))}render(){const{source:e,sourceid:t,fieldname:o,editable:d=false,done:l=false,disabled:a=false,focused:n,xscale:f=1,yscale:h=1}=this;const{index:b,field:x}=p.getField(e,t,o,this.field);let{required:u=false,placeholder:v="",label:m="",width:g=150,height:w=15,readonly:k=false,default:y="",multiline:j=false}=x||{};const z=`signer-${b%10+1}`;const E=w<15;if(x===null||x===void 0?void 0:x.value){y=x===null||x===void 0?void 0:x.value}const C=g/5;if(l){return s(r,{class:{"verdocs-field":true,done:l}},y)}return s(r,{class:{"verdocs-field":true,required:u,disabled:a,done:l,focused:n,small:E,[z]:true}},d&&s("div",{class:"edge-top"}),d&&s("div",{class:"edge-right"}),d&&s("div",{class:"edge-left"}),d&&s("div",{class:"edge-bottom"}),m&&s("label",null,m),j?s("textarea",{name:o,required:u,placeholder:v,disabled:k||a,ref:e=>this.inputEl=e,onFocus:()=>this.focused=true,onBlur:()=>this.focused=false},y):s("input",{type:"text",value:y,name:o,required:u,maxlength:C,placeholder:v,disabled:k||a,ref:e=>this.inputEl=e,onFocus:()=>this.focused=true,onBlur:()=>this.focused=false}),d&&s(i,null,s("div",{id:`verdocs-settings-panel-trigger-${o}`,style:{transform:`scale(${Math.floor(1/f*1e3)/1e3}, ${Math.floor(1/h*1e3)/1e3})`},class:"settings-icon",innerHTML:c,onClick:e=>{e.stopPropagation();this.showingProperties=!this.showingProperties}}),this.showingProperties&&s("verdocs-portal",{anchor:`verdocs-settings-panel-trigger-${o}`,onClickAway:()=>this.showingProperties=false},s("verdocs-template-field-properties",{templateId:t,fieldName:o,onClose:()=>this.hideSettingsPanel(),onDelete:()=>{var e;(e=this.deleted)===null||e===void 0?void 0:e.emit({fieldName:o});return this.hideSettingsPanel()},onSettingsChanged:e=>{var t;(t=this.settingsChanged)===null||t===void 0?void 0:t.emit(e.detail);return this.hideSettingsPanel()},helpText:'Text boxes may be used to capture simple text input. Participant-entered values will be stored for later retrieval via the "name" field.<br /><br />If marked required, the participant must complete the field before proceeding.'}))))}get el(){return this}static get watchers(){return{editable:[{onEditableChanged:0}]}}static get style(){return k()}},[0,"verdocs-field-textbox",{source:[513],sourceid:[513],fieldname:[513],field:[16],isPreview:[516,"is-preview"],disabled:[516],multiline:[516],editable:[516],moveable:[516],done:[516],xscale:[514],yscale:[514],pagenumber:[514],showingProperties:[32],focused:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]},[[2,"blur","handleBlur"]],{editable:[{onEditableChanged:0}]}]);function j(){if(typeof customElements==="undefined"){return}const e=["verdocs-field-textbox","verdocs-button","verdocs-checkbox","verdocs-component-error","verdocs-help-icon","verdocs-loader","verdocs-portal","verdocs-select-input","verdocs-template-field-properties","verdocs-text-input"];e.forEach((e=>{switch(e){case"verdocs-field-textbox":if(!customElements.get(d(e))){customElements.define(d(e),y)}break;case"verdocs-button":if(!customElements.get(d(e))){f()}break;case"verdocs-checkbox":if(!customElements.get(d(e))){h()}break;case"verdocs-component-error":if(!customElements.get(d(e))){b()}break;case"verdocs-help-icon":if(!customElements.get(d(e))){x()}break;case"verdocs-loader":if(!customElements.get(d(e))){u()}break;case"verdocs-portal":if(!customElements.get(d(e))){v()}break;case"verdocs-select-input":if(!customElements.get(d(e))){m()}break;case"verdocs-template-field-properties":if(!customElements.get(d(e))){g()}break;case"verdocs-text-input":if(!customElements.get(d(e))){w()}break}}))}export{y as V,j as d};
|
|
2
|
+
//# sourceMappingURL=p-BELGzhZw.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as t,c as i,h as s,d as o,F as r,t as n}from"./p-yZBlG3YQ.js";import{i as a}from"./p-C4ygd3v_.js";import{VerdocsEndpoint as d,updateField as l}from"@verdocs/js-sdk";import{S as c}from"./p-BDv5kBUR.js";import{S as h}from"./p-C7hFgM52.js";import{d as u}from"./p-C0SHIuoK.js";import{d as f}from"./p-DVx4efoX.js";import{d as p}from"./p--jRXEN0c.js";import{d as g}from"./p-CxIhMndz.js";import{d as m}from"./p-vimrvRye.js";import{d as v}from"./p-CIgqf7hj.js";import{d as b}from"./p-u9H54zUE.js";import{d as x}from"./p-BWrwPDuU.js";import{d as w}from"./p-BMGs9CCD.js";const k=()=>`verdocs-field-signature{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);width:83px;height:36px;display:block;font-size:11px;position:relative;scroll-margin:20px 0;letter-spacing:0.3px;background-color:var(--verdocs-field-background, transparent);-webkit-transform-origin:bottom left;transform-origin:bottom left;border:var(--verdocs-field-border, 1px solid rgba(0, 0, 0, 0.2));border-radius:var(--verdocs-field-radius);cursor:pointer;caret-color:transparent}verdocs-field-signature label{top:-14px;left:-1px;height:14px;color:var(--verdocs-field-text-color, white);padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-signature.done{border:none;opacity:1}verdocs-field-signature.menu-open{z-index:50}verdocs-field-signature .signature-container{width:100%;height:100%;position:relative}verdocs-field-signature .signature-container img{display:block;height:100%;width:auto;max-width:none;max-height:none}verdocs-field-signature .signature-container .action-menu{position:absolute;top:calc(100% + 4px);left:0;min-width:90px;background:#ffffff;border:1px solid rgba(0, 0, 0, 0.15);border-radius:6px;-webkit-box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden;font-size:12px;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-field-signature .signature-container .action-menu .menu-item{background:#ffffff;border:none;padding:8px 12px;color:#333333;cursor:pointer;text-align:left;width:100%;font-size:12px;line-height:1.2;height:auto;font-family:inherit}verdocs-field-signature .signature-container .action-menu .menu-item:hover{background-color:#f0f0f0;color:#000000}verdocs-field-signature .signature-container .action-menu .menu-item:not(:last-child){border-bottom:1px solid rgba(0, 0, 0, 0.08)}verdocs-field-signature.disabled .signature-container{opacity:0.5;pointer-events:none}verdocs-field-signature button{cursor:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;border:none;color:var(--verdocs-field-text-color, rgba(0, 0, 0, 0.87));font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-signature button.hide{display:none}verdocs-field-signature.required{border:1px solid var(--verdocs-required-field-border)}verdocs-field-signature.filled{border:none !important;background-color:transparent !important}verdocs-field-signature verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-signature verdocs-button-panel[data-active],verdocs-field-signature verdocs-button-panel:hover{opacity:1}verdocs-field-signature verdocs-button-panel .icon svg{fill:#333333}verdocs-field-signature verdocs-button-panel .icon:hover svg{fill:#000000}verdocs-field-signature .settings-icon{position:absolute;top:-3px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-signature .settings-icon svg{fill:#707ae5}verdocs-field-signature .settings-icon:hover{opacity:1}verdocs-field-signature .edge-top,verdocs-field-signature .edge-right,verdocs-field-signature .edge-left,verdocs-field-signature .edge-bottom{position:absolute;z-index:10}verdocs-field-signature .edge-top{top:-2px;left:0;right:0;height:5px}verdocs-field-signature .edge-right{top:0;bottom:0;right:-2px;width:5px}verdocs-field-signature .edge-left{top:0;left:-2px;bottom:0;width:5px}verdocs-field-signature .edge-bottom{bottom:-2px;left:0;right:0;height:5px}`;const y=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.fieldChange=i(this,"fieldChange");this.settingsPress=i(this,"settingsPress");this.settingsChanged=i(this,"settingsChanged");this.deleted=i(this,"deleted");this.adopt=i(this,"adopt");this.source="template";this.sourceid="";this.fieldname="";this.field=null;this.name="";this.disabled=false;this.editable=false;this.moveable=false;this.done=false;this.xscale=1;this.yscale=1;this.pagenumber=1;this.showingProperties=false;this.focused=false;this.menuOpen=false;this.closeMenuTimer=null;this.outsideMenuHandler=null;this.tempSignature="";this.openMenu=()=>{if(this.closeMenuTimer){clearTimeout(this.closeMenuTimer);this.closeMenuTimer=null}this.menuOpen=true};this.scheduleCloseMenu=()=>{if(this.closeMenuTimer){clearTimeout(this.closeMenuTimer)}this.closeMenuTimer=setTimeout((()=>{this.menuOpen=false;this.closeMenuTimer=null}),150)};this.closeMenu=()=>{if(this.closeMenuTimer){clearTimeout(this.closeMenuTimer);this.closeMenuTimer=null}this.menuOpen=false}}handleBlur(){this.focused=false}async focusField(){this.el.focus();this.focused=true}componentDidLoad(){this.outsideMenuHandler=e=>{if(this.menuOpen&&!this.el.contains(e.target)){this.closeMenu()}};document.addEventListener("pointerdown",this.outsideMenuHandler)}disconnectedCallback(){if(this.closeMenuTimer){clearTimeout(this.closeMenuTimer);this.closeMenuTimer=null}if(this.outsideMenuHandler){document.removeEventListener("pointerdown",this.outsideMenuHandler);this.outsideMenuHandler=null}a(this.el).unset()}onEditableChanged(e,t){if(t&&!e){a(this.el).unset()}}componentDidRender(){a.dynamicDrop(true);if(this.editable){a(this.el).resizable({edges:{top:".edge-top",left:".edge-left",bottom:".edge-bottom",right:".edge-right"},modifiers:[a.modifiers.restrictSize({min:{width:71,height:36}})],listeners:{start:this.handleResizeStart.bind(this),move:this.handleResize.bind(this),end:this.handleResizeEnd.bind(this)}})}}onBlur(){this.focused=false}handleResizeStart(e){e.preventDefault();e.stopPropagation();e.target.dataset.originalBottom=e.target.style.bottom}handleResize(e){let{width:t,height:i}=e.rect;const s=e.deltaRect.left;const o=e.deltaRect.bottom;const r=parseFloat(e.target.style.left);const n=parseFloat(e.target.style.bottom);t/=this.xscale;i/=this.yscale;Object.assign(e.target.style,{width:`${t}px`,height:`${i}px`,left:`${r+s}px`,bottom:`${n-o}px`})}async handleResizeEnd(e){const{sourceid:t,fieldname:i}=this;const s=Math.round(parseFloat(e.target.style.width));let o=Math.round(parseFloat(e.target.style.height));if(o<20){o=15}const r=parseFloat(e.target.style.bottom);const n=parseFloat(e.target.dataset.originalBottom);const a=await h.getTemplate(d.getDefault(),this.sourceid);const c=a.fields.find((e=>e.name===i));const u=r!==n?r/this.yscale:c===null||c===void 0?void 0:c.y;l(d.getDefault(),t,i,{width:s,height:o,y:u}).then((async t=>{var s;const o=await h.getTemplate(d.getDefault(),this.sourceid);const r=JSON.parse(JSON.stringify(o));const n=r.fields.findIndex((e=>e.name===i));if(n>-1){r.fields[n]=t}h.updateTemplate(this.sourceid,r);(s=this.settingsChanged)===null||s===void 0?void 0:s.emit({fieldName:i,field:t});Object.assign(e.target.dataset,{x:0,y:0,h:0})})).catch((e=>console.log("Field update failed",e)))}async showSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.showPanel){e.showPanel()}}async hideSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.hidePanel){e.hidePanel()}this.showingProperties=false}render(){const{source:e,sourceid:t,fieldname:i,editable:n=false,done:a=false,disabled:d=false,focused:l,xscale:u=1,yscale:f=1}=this;const{index:p,field:g}=h.getField(e,t,i,this.field);const{required:m=false,value:v="",label:b="",settings:x={}}=g||{};const{base64:w}=x;const k=`signer-${p%10+1}`;if(a){return s(o,{class:{"verdocs-field":true,done:a}},v&&s("img",{src:w,alt:""}))}return s(o,{class:{"verdocs-field":true,required:m,disabled:d,done:a,focused:l,filled:!!w,"menu-open":this.menuOpen,[k]:true}},n&&s("div",{class:"edge-right"}),n&&s("div",{class:"edge-left"}),n&&s("div",{class:"edge-top"}),n&&s("div",{class:"edge-bottom"}),b&&s("label",null,b),w?s("div",{class:{"signature-container":true,"menu-open":this.menuOpen},onMouseEnter:()=>!d&&this.openMenu(),onMouseLeave:()=>this.scheduleCloseMenu(),onClick:e=>{e.stopPropagation();if(d)return;this.menuOpen?this.closeMenu():this.openMenu()}},s("img",{src:w,alt:"Signature"}),this.menuOpen&&s("div",{class:"action-menu",onMouseEnter:()=>this.openMenu(),onMouseLeave:()=>this.scheduleCloseMenu()},s("button",{type:"button",class:"menu-item",onClick:e=>{e.stopPropagation();if(d)return;console.log("[SIGNATURE] Editing signature");this.closeMenu();this.adopt.emit()}},"Edit"),s("button",{type:"button",class:"menu-item",onClick:e=>{var t;e.stopPropagation();if(d)return;console.log("[SIGNATURE] Clearing signature");this.closeMenu();(t=this.fieldChange)===null||t===void 0?void 0:t.emit(null)}},"Clear"))):s("button",{onClick:()=>{var e;if(d)return;if(this.signatureid){console.log("[SIGNATURE] Reusing existing signature",this.signatureid);(e=this.fieldChange)===null||e===void 0?void 0:e.emit(this.signatureid)}else{this.adopt.emit()}}},"Signature"),n&&s(r,null,s("div",{id:`verdocs-settings-panel-trigger-${i}`,style:{transform:`scale(${Math.floor(1/u*1e3)/1e3}, ${Math.floor(1/f*1e3)/1e3})`},class:"settings-icon",innerHTML:c,onClick:e=>{e.stopPropagation();this.showingProperties=!this.showingProperties}}),this.showingProperties&&s("verdocs-portal",{anchor:`verdocs-settings-panel-trigger-${i}`,onClickAway:()=>this.showingProperties=false},s("verdocs-template-field-properties",{templateId:t,fieldName:i,onClose:()=>this.hideSettingsPanel(),onDelete:()=>{var e;(e=this.deleted)===null||e===void 0?void 0:e.emit({fieldName:i});return this.hideSettingsPanel()},onSettingsChanged:e=>{var t;(t=this.settingsChanged)===null||t===void 0?void 0:t.emit(e.detail);return this.hideSettingsPanel()},helpText:"Signature fields capture a recipient's signature on a document."}))))}get el(){return this}static get watchers(){return{editable:[{onEditableChanged:0}]}}static get style(){return k()}},[0,"verdocs-field-signature",{source:[513],sourceid:[513],fieldname:[513],field:[16],name:[513],disabled:[516],editable:[516],moveable:[516],done:[516],xscale:[514],yscale:[514],pagenumber:[514],signatureid:[513],isPreview:[516,"is-preview"],showingProperties:[32],focused:[32],menuOpen:[32],tempSignature:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]},[[0,"blur","handleBlur"],[0,"blur","onBlur"]],{editable:[{onEditableChanged:0}]}]);function E(){if(typeof customElements==="undefined"){return}const e=["verdocs-field-signature","verdocs-button","verdocs-checkbox","verdocs-component-error","verdocs-help-icon","verdocs-loader","verdocs-portal","verdocs-select-input","verdocs-template-field-properties","verdocs-text-input"];e.forEach((e=>{switch(e){case"verdocs-field-signature":if(!customElements.get(n(e))){customElements.define(n(e),y)}break;case"verdocs-button":if(!customElements.get(n(e))){u()}break;case"verdocs-checkbox":if(!customElements.get(n(e))){f()}break;case"verdocs-component-error":if(!customElements.get(n(e))){p()}break;case"verdocs-help-icon":if(!customElements.get(n(e))){g()}break;case"verdocs-loader":if(!customElements.get(n(e))){m()}break;case"verdocs-portal":if(!customElements.get(n(e))){v()}break;case"verdocs-select-input":if(!customElements.get(n(e))){b()}break;case"verdocs-template-field-properties":if(!customElements.get(n(e))){x()}break;case"verdocs-text-input":if(!customElements.get(n(e))){w()}break}}))}export{y as V,E as d};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as t,c as i,h as s,d as o,F as r,t as n}from"./p-yZBlG3YQ.js";import{i as a}from"./p-COaijEV0.js";import{VerdocsEndpoint as d,updateField as l}from"@verdocs/js-sdk";import{S as c}from"./p-BDv5kBUR.js";import{S as h}from"./p-C7hFgM52.js";import{d as u}from"./p-C0SHIuoK.js";import{d as f}from"./p-DVx4efoX.js";import{d as p}from"./p--jRXEN0c.js";import{d as g}from"./p-CxIhMndz.js";import{d as m}from"./p-vimrvRye.js";import{d as v}from"./p-CIgqf7hj.js";import{d as b}from"./p-u9H54zUE.js";import{d as x}from"./p-BWrwPDuU.js";import{d as w}from"./p-BMGs9CCD.js";const k=()=>`verdocs-field-signature{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);width:83px;height:36px;display:block;font-size:11px;position:relative;scroll-margin:20px 0;letter-spacing:0.3px;background-color:var(--verdocs-field-background, transparent);-webkit-transform-origin:bottom left;transform-origin:bottom left;border:var(--verdocs-field-border, 1px solid rgba(0, 0, 0, 0.2));border-radius:var(--verdocs-field-radius);cursor:pointer;caret-color:transparent}verdocs-field-signature label{top:-14px;left:-1px;height:14px;color:var(--verdocs-field-text-color, white);padding:0 4px;font-size:9px;line-height:13px;position:absolute;background:#4a4a99;border-top-left-radius:2px;border-top-right-radius:2px}verdocs-field-signature.done{border:none;opacity:1}verdocs-field-signature.menu-open{z-index:50}verdocs-field-signature .signature-container{width:100%;height:100%;position:relative}verdocs-field-signature .signature-container img{display:block;height:100%;width:auto;max-width:none;max-height:none}verdocs-field-signature .signature-container .action-menu{position:absolute;top:calc(100% + 4px);left:0;min-width:90px;background:#ffffff;border:1px solid rgba(0, 0, 0, 0.15);border-radius:6px;-webkit-box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden;font-size:12px;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-field-signature .signature-container .action-menu .menu-item{background:#ffffff;border:none;padding:8px 12px;color:#333333;cursor:pointer;text-align:left;width:100%;font-size:12px;line-height:1.2;height:auto;font-family:inherit}verdocs-field-signature .signature-container .action-menu .menu-item:hover{background-color:#f0f0f0;color:#000000}verdocs-field-signature .signature-container .action-menu .menu-item:not(:last-child){border-bottom:1px solid rgba(0, 0, 0, 0.08)}verdocs-field-signature.disabled .signature-container{opacity:0.5;pointer-events:none}verdocs-field-signature button{cursor:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;border:none;color:var(--verdocs-field-text-color, rgba(0, 0, 0, 0.87));font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-signature button.hide{display:none}verdocs-field-signature.required{border:1px solid var(--verdocs-required-field-border)}verdocs-field-signature.filled{border:none !important;background-color:transparent !important}verdocs-field-signature verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-signature verdocs-button-panel[data-active],verdocs-field-signature verdocs-button-panel:hover{opacity:1}verdocs-field-signature verdocs-button-panel .icon svg{fill:#333333}verdocs-field-signature verdocs-button-panel .icon:hover svg{fill:#000000}verdocs-field-signature .settings-icon{position:absolute;top:-3px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-signature .settings-icon svg{fill:#707ae5}verdocs-field-signature .settings-icon:hover{opacity:1}verdocs-field-signature .edge-top,verdocs-field-signature .edge-right,verdocs-field-signature .edge-left,verdocs-field-signature .edge-bottom{position:absolute;z-index:10}verdocs-field-signature .edge-top{top:-2px;left:0;right:0;height:5px}verdocs-field-signature .edge-right{top:0;bottom:0;right:-2px;width:5px}verdocs-field-signature .edge-left{top:0;left:-2px;bottom:0;width:5px}verdocs-field-signature .edge-bottom{bottom:-2px;left:0;right:0;height:5px}`;const y=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.fieldChange=i(this,"fieldChange");this.settingsPress=i(this,"settingsPress");this.settingsChanged=i(this,"settingsChanged");this.deleted=i(this,"deleted");this.adopt=i(this,"adopt");this.source="template";this.sourceid="";this.fieldname="";this.field=null;this.name="";this.disabled=false;this.editable=false;this.moveable=false;this.done=false;this.xscale=1;this.yscale=1;this.pagenumber=1;this.showingProperties=false;this.focused=false;this.menuOpen=false;this.closeMenuTimer=null;this.outsideMenuHandler=null;this.tempSignature="";this.openMenu=()=>{if(this.closeMenuTimer){clearTimeout(this.closeMenuTimer);this.closeMenuTimer=null}this.menuOpen=true};this.scheduleCloseMenu=()=>{if(this.closeMenuTimer){clearTimeout(this.closeMenuTimer)}this.closeMenuTimer=setTimeout((()=>{this.menuOpen=false;this.closeMenuTimer=null}),150)};this.closeMenu=()=>{if(this.closeMenuTimer){clearTimeout(this.closeMenuTimer);this.closeMenuTimer=null}this.menuOpen=false}}handleBlur(){this.focused=false}async focusField(){this.el.focus();this.focused=true}componentDidLoad(){this.outsideMenuHandler=e=>{if(this.menuOpen&&!this.el.contains(e.target)){this.closeMenu()}};document.addEventListener("pointerdown",this.outsideMenuHandler)}disconnectedCallback(){if(this.closeMenuTimer){clearTimeout(this.closeMenuTimer);this.closeMenuTimer=null}if(this.outsideMenuHandler){document.removeEventListener("pointerdown",this.outsideMenuHandler);this.outsideMenuHandler=null}a(this.el).unset()}onEditableChanged(e,t){if(t&&!e){a(this.el).unset()}}componentDidRender(){a.dynamicDrop(true);if(this.editable){a(this.el).resizable({edges:{top:".edge-top",left:".edge-left",bottom:".edge-bottom",right:".edge-right"},modifiers:[a.modifiers.restrictSize({min:{width:71,height:36}})],listeners:{start:this.handleResizeStart.bind(this),move:this.handleResize.bind(this),end:this.handleResizeEnd.bind(this)}})}}onBlur(){this.focused=false}handleResizeStart(e){e.preventDefault();e.stopPropagation();e.target.dataset.originalBottom=e.target.style.bottom}handleResize(e){let{width:t,height:i}=e.rect;const s=e.deltaRect.left;const o=e.deltaRect.bottom;const r=parseFloat(e.target.style.left);const n=parseFloat(e.target.style.bottom);t/=this.xscale;i/=this.yscale;Object.assign(e.target.style,{width:`${t}px`,height:`${i}px`,left:`${r+s}px`,bottom:`${n-o}px`})}async handleResizeEnd(e){const{sourceid:t,fieldname:i}=this;const s=Math.round(parseFloat(e.target.style.width));let o=Math.round(parseFloat(e.target.style.height));if(o<20){o=15}const r=parseFloat(e.target.style.bottom);const n=parseFloat(e.target.dataset.originalBottom);const a=await h.getTemplate(d.getDefault(),this.sourceid);const c=a.fields.find((e=>e.name===i));const u=r!==n?r/this.yscale:c===null||c===void 0?void 0:c.y;l(d.getDefault(),t,i,{width:s,height:o,y:u}).then((async t=>{var s;const o=await h.getTemplate(d.getDefault(),this.sourceid);const r=JSON.parse(JSON.stringify(o));const n=r.fields.findIndex((e=>e.name===i));if(n>-1){r.fields[n]=t}h.updateTemplate(this.sourceid,r);(s=this.settingsChanged)===null||s===void 0?void 0:s.emit({fieldName:i,field:t});Object.assign(e.target.dataset,{x:0,y:0,h:0})})).catch((e=>console.log("Field update failed",e)))}async showSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.showPanel){e.showPanel()}}async hideSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.hidePanel){e.hidePanel()}this.showingProperties=false}render(){const{source:e,sourceid:t,fieldname:i,editable:n=false,done:a=false,disabled:d=false,focused:l,xscale:u=1,yscale:f=1}=this;const{index:p,field:g}=h.getField(e,t,i,this.field);const{required:m=false,value:v="",label:b="",settings:x={}}=g||{};const{base64:w}=x;const k=`signer-${p%10+1}`;if(a){return s(o,{class:{"verdocs-field":true,done:a}},v&&s("img",{src:w,alt:""}))}return s(o,{class:{"verdocs-field":true,required:m,disabled:d,done:a,focused:l,filled:!!w,"menu-open":this.menuOpen,[k]:true}},n&&s("div",{class:"edge-right"}),n&&s("div",{class:"edge-left"}),n&&s("div",{class:"edge-top"}),n&&s("div",{class:"edge-bottom"}),b&&s("label",null,b),w?s("div",{class:{"signature-container":true,"menu-open":this.menuOpen},onMouseEnter:()=>!d&&this.openMenu(),onMouseLeave:()=>this.scheduleCloseMenu(),onClick:e=>{e.stopPropagation();if(d)return;this.menuOpen?this.closeMenu():this.openMenu()}},s("img",{src:w,alt:"Signature"}),this.menuOpen&&s("div",{class:"action-menu",onMouseEnter:()=>this.openMenu(),onMouseLeave:()=>this.scheduleCloseMenu()},s("button",{type:"button",class:"menu-item",onClick:e=>{e.stopPropagation();if(d)return;console.log("[SIGNATURE] Editing signature");this.closeMenu();this.adopt.emit()}},"Edit"),s("button",{type:"button",class:"menu-item",onClick:e=>{var t;e.stopPropagation();if(d)return;console.log("[SIGNATURE] Clearing signature");this.closeMenu();(t=this.fieldChange)===null||t===void 0?void 0:t.emit(null)}},"Clear"))):s("button",{onClick:()=>{var e;if(d)return;if(this.signatureid){console.log("[SIGNATURE] Reusing existing signature",this.signatureid);(e=this.fieldChange)===null||e===void 0?void 0:e.emit(this.signatureid)}else{this.adopt.emit()}}},"Signature"),n&&s(r,null,s("div",{id:`verdocs-settings-panel-trigger-${i}`,style:{transform:`scale(${Math.floor(1/u*1e3)/1e3}, ${Math.floor(1/f*1e3)/1e3})`},class:"settings-icon",innerHTML:c,onClick:e=>{e.stopPropagation();this.showingProperties=!this.showingProperties}}),this.showingProperties&&s("verdocs-portal",{anchor:`verdocs-settings-panel-trigger-${i}`,onClickAway:()=>this.showingProperties=false},s("verdocs-template-field-properties",{templateId:t,fieldName:i,onClose:()=>this.hideSettingsPanel(),onDelete:()=>{var e;(e=this.deleted)===null||e===void 0?void 0:e.emit({fieldName:i});return this.hideSettingsPanel()},onSettingsChanged:e=>{var t;(t=this.settingsChanged)===null||t===void 0?void 0:t.emit(e.detail);return this.hideSettingsPanel()},helpText:"Signature fields capture a recipient's signature on a document."}))))}get el(){return this}static get watchers(){return{editable:[{onEditableChanged:0}]}}static get style(){return k()}},[0,"verdocs-field-signature",{source:[513],sourceid:[513],fieldname:[513],field:[16],name:[513],disabled:[516],editable:[516],moveable:[516],done:[516],xscale:[514],yscale:[514],pagenumber:[514],signatureid:[513],isPreview:[516,"is-preview"],showingProperties:[32],focused:[32],menuOpen:[32],tempSignature:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]},[[0,"blur","handleBlur"],[0,"blur","onBlur"]],{editable:[{onEditableChanged:0}]}]);function E(){if(typeof customElements==="undefined"){return}const e=["verdocs-field-signature","verdocs-button","verdocs-checkbox","verdocs-component-error","verdocs-help-icon","verdocs-loader","verdocs-portal","verdocs-select-input","verdocs-template-field-properties","verdocs-text-input"];e.forEach((e=>{switch(e){case"verdocs-field-signature":if(!customElements.get(n(e))){customElements.define(n(e),y)}break;case"verdocs-button":if(!customElements.get(n(e))){u()}break;case"verdocs-checkbox":if(!customElements.get(n(e))){f()}break;case"verdocs-component-error":if(!customElements.get(n(e))){p()}break;case"verdocs-help-icon":if(!customElements.get(n(e))){g()}break;case"verdocs-loader":if(!customElements.get(n(e))){m()}break;case"verdocs-portal":if(!customElements.get(n(e))){v()}break;case"verdocs-select-input":if(!customElements.get(n(e))){b()}break;case"verdocs-template-field-properties":if(!customElements.get(n(e))){x()}break;case"verdocs-text-input":if(!customElements.get(n(e))){w()}break}}))}export{y as V,E as d};
|
|
2
|
+
//# sourceMappingURL=p-BQUZjuoP.js.map
|