@verdocs/web-sdk 1.10.4 → 1.10.5
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/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-send.cjs.entry.js +37 -40
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/elements/verdocs-contact-picker/verdocs-contact-picker.js +2 -2
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +57 -47
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.stories.js +2 -1
- package/dist/components/verdocs-contact-picker2.js +2 -2
- package/dist/components/verdocs-send.js +36 -43
- package/dist/docs.json +16 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-contact-picker.entry.js +2 -2
- package/dist/esm/verdocs-send.entry.js +37 -40
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-send.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/embeds/verdocs-send/verdocs-send.d.ts +10 -8
- package/dist/types/components/embeds/verdocs-send/verdocs-send.stories.d.ts +2 -1
- package/dist/types/components.d.ts +2 -1
- package/dist/verdocs-web-sdk/p-489a657e.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-57d14138.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-7b111f2b.system.entry.js → p-85336769.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-c16b6ca4.system.js +1 -1
- package/dist/verdocs-web-sdk/p-fc208e71.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/verdocs-web-sdk/p-7d31be81.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d5a95369.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ea0d2a5a.system.entry.js +0 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["verdocs-field-initial.cjs",[[0,"verdocs-field-initial",{"field":[16],"disabled":[4],"initials":[1],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-signature.cjs",[[0,"verdocs-field-signature",{"field":[16],"name":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-build.cjs",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1,"template-id"],"step":[32],"pdfUrl":[32],"template":[32]}]]],["verdocs-field-checkbox.cjs",[[0,"verdocs-field-checkbox",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-date.cjs",[[0,"verdocs-field-date",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"containerId":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-radio-button.cjs",[[0,"verdocs-field-radio-button",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-textarea.cjs",[[0,"verdocs-field-textarea",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-textbox.cjs",[[0,"verdocs-field-textbox",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-timestamp.cjs",[[0,"verdocs-field-timestamp",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-template-recipients.cjs",[[0,"verdocs-template-recipients",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"showingSenderDialog":[32],"sender":[32],"forceRerender":[32]}]]],["verdocs-sign.cjs",[[0,"verdocs-sign",{"envelopeId":[1,"envelope-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"recipient":[32],"signerToken":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"errorMessage":[32],"focusedField":[32],"isDone":[32],"showDone":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32]}]]],["verdocs-template-properties.cjs",[[0,"verdocs-template-properties",{"endpoint":[16],"templateId":[1,"template-id"],"template":[32],"name":[32],"visibility":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32]}]]],["verdocs-template-reminders.cjs",[[0,"verdocs-template-reminders",{"endpoint":[16],"templateId":[1,"template-id"],"showPlanBlocker":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32],"dirty":[32],"loading":[32]}]]],["verdocs-auth.cjs",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"isAuthenticated":[32],"displayMode":[32],"username":[32],"password":[32],"loggingIn":[32],"activeSession":[32],"loginError":[32]}]]],["verdocs-template-name.cjs",[[0,"verdocs-template-name",{"endpoint":[16],"templateId":[1,"template-id"],"name":[32],"dirty":[32],"loading":[32]}]]],["verdocs-search.cjs",[[0,"verdocs-search",{"endpoint":[16]}]]],["verdocs-send.cjs",[[0,"verdocs-send",{"endpoint":[16],"templateId":[1,"template-id"],"
|
|
17
|
+
return index.bootstrapLazy([["verdocs-field-initial.cjs",[[0,"verdocs-field-initial",{"field":[16],"disabled":[4],"initials":[1],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-signature.cjs",[[0,"verdocs-field-signature",{"field":[16],"name":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-build.cjs",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1,"template-id"],"step":[32],"pdfUrl":[32],"template":[32]}]]],["verdocs-field-checkbox.cjs",[[0,"verdocs-field-checkbox",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-date.cjs",[[0,"verdocs-field-date",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"containerId":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-radio-button.cjs",[[0,"verdocs-field-radio-button",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-textarea.cjs",[[0,"verdocs-field-textarea",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-textbox.cjs",[[0,"verdocs-field-textbox",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-timestamp.cjs",[[0,"verdocs-field-timestamp",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-template-recipients.cjs",[[0,"verdocs-template-recipients",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"showingSenderDialog":[32],"sender":[32],"forceRerender":[32]}]]],["verdocs-sign.cjs",[[0,"verdocs-sign",{"envelopeId":[1,"envelope-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"recipient":[32],"signerToken":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"errorMessage":[32],"focusedField":[32],"isDone":[32],"showDone":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32]}]]],["verdocs-template-properties.cjs",[[0,"verdocs-template-properties",{"endpoint":[16],"templateId":[1,"template-id"],"template":[32],"name":[32],"visibility":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32]}]]],["verdocs-template-reminders.cjs",[[0,"verdocs-template-reminders",{"endpoint":[16],"templateId":[1,"template-id"],"showPlanBlocker":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32],"dirty":[32],"loading":[32]}]]],["verdocs-auth.cjs",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"isAuthenticated":[32],"displayMode":[32],"username":[32],"password":[32],"loggingIn":[32],"activeSession":[32],"loginError":[32]}]]],["verdocs-template-name.cjs",[[0,"verdocs-template-name",{"endpoint":[16],"templateId":[1,"template-id"],"name":[32],"dirty":[32],"loading":[32]}]]],["verdocs-search.cjs",[[0,"verdocs-search",{"endpoint":[16]}]]],["verdocs-send.cjs",[[0,"verdocs-send",{"endpoint":[16],"templateId":[1,"template-id"],"containerId":[32],"rolesAtLevel":[32],"showPickerForId":[32],"sessionContacts":[32],"rolesCompleted":[32],"reset":[64]}]]],["verdocs-template-visibility.cjs",[[0,"verdocs-template-visibility",{"endpoint":[16],"templateId":[1,"template-id"],"dirty":[32],"loading":[32],"personal":[32],"public":[32]}]]],["verdocs-upload-dialog.cjs",[[0,"verdocs-upload-dialog",{"draggingOver":[32],"decodedFiles":[32]}]]],["verdocs-field-attachment.cjs",[[0,"verdocs-field-attachment",{"field":[16],"disabled":[4],"roleIndex":[2,"role-index"],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-preview.cjs",[[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"]}]]],["verdocs-envelope-sidebar.cjs",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32]}]]],["verdocs-kba-dialog.cjs",[[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"choices":[16],"response":[32]}]]],["verdocs-template-attachments.cjs",[[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32]}]]],["verdocs-field-dropdown.cjs",[[0,"verdocs-field-dropdown",{"field":[16],"disabled":[4],"roleindex":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-payment.cjs",[[0,"verdocs-field-payment",{"field":[16],"disabled":[4],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"focused":[4],"signed":[4],"roleindex":[2],"preparedMessage":[32],"signatureUrl":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-organization-card.cjs",[[0,"verdocs-organization-card",{"organization":[16]}]]],["verdocs-search-tabs.cjs",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["verdocs-status-indicator.cjs",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"recipientStatusIcons":[32],"containerId":[32]}]]],["verdocs-template-card.cjs",[[0,"verdocs-template-card",{"template":[16]}]]],["verdocs-template-tags.cjs",[[0,"verdocs-template-tags",{"tags":[16]}]]],["verdocs-toggle.cjs",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["verdocs-initial-dialog.cjs",[[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}]]],["verdocs-signature-dialog.cjs",[[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}]]],["verdocs-view.cjs",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"]}]]],["verdocs-toggle-button.cjs",[[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["verdocs-contact-picker.cjs",[[0,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"name":[32],"email":[32],"phone":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32]}]]],["verdocs-radio-button.cjs",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["verdocs-button.cjs",[[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["verdocs-template-role-properties_2.cjs",[[0,"verdocs-template-role-properties",{"endpoint":[16],"templateId":[1,"template-id"],"roleName":[1,"role-name"],"sender":[1],"dirty":[32],"saving":[32],"name":[32],"type":[32],"fullName":[32],"email":[32],"phone":[32],"allowDelegation":[32]}],[0,"verdocs-template-sender",{"endpoint":[16],"templateId":[1,"template-id"],"sender":[1],"saving":[32]}]]],["verdocs-floating-menu_2.cjs",[[0,"verdocs-floating-menu",{"options":[16]}],[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}]]],["verdocs-template-create_2.cjs",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1,"template-id"],"placing":[32],"selectedRoleName":[32]}],[0,"verdocs-template-create",{"endpoint":[16],"file":[32]}]]],["verdocs-ok-dialog.cjs",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"showCancel":[4,"show-cancel"]}]]],["verdocs-quick-functions_3.cjs",[[0,"verdocs-quick-functions",{"endpoint":[16]}],[0,"verdocs-search-activity",{"endpoint":[16],"type":[1],"options":[8],"emptyMessage":[32],"authFailure":[32],"title":[32],"recent":[32],"saved":[32],"starred":[32]}],[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["verdocs-dropdown.cjs",[[0,"verdocs-dropdown",{"options":[16],"open":[32]}]]],["verdocs-document-page_2.cjs",[[0,"verdocs-document-page",{"pageImageUri":[1,"page-image-uri"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32]}],[0,"verdocs-loader"]]],["verdocs-checkbox_4.cjs",[[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-text-input",{"value":[1],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"type":[1],"disabled":[4]}],[0,"verdocs-help-icon",{"text":[1],"containerId":[32]}]]],["verdocs-button-panel_3.cjs",[[0,"verdocs-template-field-properties",{"endpoint":[16],"templateId":[1,"template-id"],"fieldName":[1,"field-name"],"dirty":[32],"loading":[32],"type":[32],"name":[32],"roleName":[32],"required":[32],"placeholder":[32],"defaultValue":[32]}],[4,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -78,12 +78,12 @@ const VerdocsContactPicker = class {
|
|
|
78
78
|
this.showSuggestions = false;
|
|
79
79
|
}
|
|
80
80
|
render() {
|
|
81
|
-
return (index.h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, index.h("div", { class: "row" }, index.h("label", { htmlFor: "verdocs-contact-picker-name" }, "Name:"), index.h("input", { id: "verdocs-contact-picker-name", name: "verdocs-contact-picker-name", type: "text", "data-lpignore": "true", autocomplete: "
|
|
81
|
+
return (index.h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, index.h("div", { class: "row" }, index.h("label", { htmlFor: "verdocs-contact-picker-name" }, "Name:"), index.h("input", { id: "verdocs-contact-picker-name", name: "verdocs-contact-picker-name", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.name, placeholder: "Recipient Name...", onFocus: () => { var _a; return (this.showSuggestions = ((_a = this.contactSuggestions) === null || _a === void 0 ? void 0 : _a.length) > 0); },
|
|
82
82
|
// onBlur={() => (this.showSuggestions = false)}
|
|
83
83
|
onInput: e => this.handleNameChange(e) }), this.showSuggestions && (index.h("div", { class: "dropdown" }, this.contactSuggestions.map(suggestion => {
|
|
84
84
|
var _a;
|
|
85
85
|
return (index.h("div", { key: (_a = suggestion.id) !== null && _a !== void 0 ? _a : suggestion.name, class: "suggestion", onClick: e => this.handleSelectSuggestion(e, suggestion) }, suggestion.avatar ? index.h("img", { alt: "Avatar", class: "avatar", src: suggestion.avatar }) : index.h("div", { class: "avatar", innerHTML: placeholderIcon }), index.h("div", { class: "details" }, index.h("div", { class: "name" }, suggestion.name), suggestion.email && index.h("div", { class: "destination" }, suggestion.email), suggestion.phone && index.h("div", { class: "destination" }, suggestion.phone))));
|
|
86
|
-
})))), index.h("div", { class: "row" }, index.h("label", { htmlFor: "verdocs-contact-picker-email" }, "Email:"), index.h("input", { id: "verdocs-contact-picker-email", name: "verdocs-contact-picker-email", type: "text", "data-lpignore": "true",
|
|
86
|
+
})))), index.h("div", { class: "row" }, index.h("label", { htmlFor: "verdocs-contact-picker-email" }, "Email:"), index.h("input", { id: "verdocs-contact-picker-email", name: "verdocs-contact-picker-email", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.email, placeholder: "Email Address...", onFocus: () => (this.showSuggestions = false), onInput: e => this.handleEmailChange(e) })), index.h("div", { class: "row" }, index.h("label", { htmlFor: "verdocs-contact-picker-phone" }, "Phone:"), index.h("input", { id: "verdocs-contact-picker-phone", name: "verdocs-contact-picker-phone", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.phone, placeholder: "Phone Number...", onFocus: () => (this.showSuggestions = false), onInput: e => this.handlePhoneChange(e) })), this.showMessage && (index.h("div", { class: "row" }, index.h("label", { htmlFor: "verdocs-contact-picker-message" }, "Message:"), index.h("input", { id: "verdocs-contact-picker-message", name: "verdocs-contact-picker-message", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.message, placeholder: "Invitation Message...", onFocus: () => (this.showSuggestions = false), onInput: e => this.handleMessageChange(e) }))), index.h("div", { class: "buttons" }, index.h("verdocs-toggle-button", { icon: messageIcon, size: "small", active: this.showMessage, onToggle: e => {
|
|
87
87
|
this.showMessage = e.detail.active;
|
|
88
88
|
this.showSuggestions = false;
|
|
89
89
|
} }), index.h("verdocs-toggle-button", { icon: delegateIcon, size: "small", active: this.delegator, onToggle: e => {
|
|
@@ -3,12 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1329d89c.js');
|
|
6
|
-
const Templates = require('./Templates-ed812768.js');
|
|
7
6
|
const VerdocsEndpoint = require('./VerdocsEndpoint-25056c73.js');
|
|
8
7
|
const Validators = require('./Validators-16e6d7d1.js');
|
|
9
8
|
const Colors = require('./Colors-e809dcc9.js');
|
|
9
|
+
const templateStore = require('./templateStore-97e17e58.js');
|
|
10
|
+
const Templates = require('./Templates-a46d2fe8.js');
|
|
10
11
|
const utils = require('./utils-865fd657.js');
|
|
12
|
+
const errors = require('./errors-0396da3d.js');
|
|
11
13
|
require('./Token-576f0e8a.js');
|
|
14
|
+
require('./index-eb130f52.js');
|
|
15
|
+
require('./Primitives-be5088cb.js');
|
|
16
|
+
require('./Templates-ed812768.js');
|
|
12
17
|
require('./Envelopes-68058bbe.js');
|
|
13
18
|
require('./Files-4bdc0c0f.js');
|
|
14
19
|
|
|
@@ -27,42 +32,29 @@ const VerdocsSend = class {
|
|
|
27
32
|
this.levels = [];
|
|
28
33
|
this.endpoint = VerdocsEndpoint.VerdocsEndpoint.getDefault();
|
|
29
34
|
this.templateId = null;
|
|
30
|
-
this.template = null;
|
|
31
|
-
this.pdfUrl = null;
|
|
32
35
|
this.containerId = `verdocs-send-${Math.random().toString(36).substring(2, 11)}`;
|
|
33
36
|
this.rolesAtLevel = {};
|
|
34
37
|
this.showPickerForId = '';
|
|
35
38
|
this.sessionContacts = [];
|
|
36
|
-
this.
|
|
39
|
+
this.rolesCompleted = {};
|
|
40
|
+
}
|
|
41
|
+
reset() {
|
|
42
|
+
this.rolesCompleted = {};
|
|
37
43
|
}
|
|
38
44
|
async componentWillLoad() {
|
|
39
|
-
var _a;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
this.sessionContacts.push({
|
|
45
|
-
id: result.session.profile.id,
|
|
46
|
-
name: `${result.session.profile.first_name} ${result.session.profile.last_name}`,
|
|
47
|
-
email: result.session.profile.email,
|
|
48
|
-
phone: result.session.profile.phone,
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
catch (e) {
|
|
53
|
-
console.log('Error loading session', e);
|
|
45
|
+
var _a, _b, _c, _d, _e;
|
|
46
|
+
const loadSessionResult = this.endpoint.loadSession();
|
|
47
|
+
if (!this.templateId) {
|
|
48
|
+
console.log(`[SEND] Missing required template ID ${this.templateId}`);
|
|
49
|
+
return;
|
|
54
50
|
}
|
|
55
|
-
}
|
|
56
|
-
async componentDidLoad() {
|
|
57
|
-
console.log('[SEND] Showing template', this.templateId);
|
|
58
51
|
try {
|
|
59
52
|
console.log(`[SEND] Loading template ${this.templateId}`);
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
this.template = template;
|
|
63
|
-
if (template === null || template === void 0 ? void 0 : template.roles) {
|
|
53
|
+
await Templates.loadTemplate(this.endpoint, this.templateId);
|
|
54
|
+
if ((_a = templateStore.state.template) === null || _a === void 0 ? void 0 : _a.roles) {
|
|
64
55
|
const rolesAtLevel = {};
|
|
65
|
-
|
|
56
|
+
this.rolesCompleted = {};
|
|
57
|
+
templateStore.state.template.roles.forEach(role => {
|
|
66
58
|
const level = role.sequence - 1;
|
|
67
59
|
rolesAtLevel[level] || (rolesAtLevel[level] = []);
|
|
68
60
|
const id = `r-${level}-${rolesAtLevel[level].length}`;
|
|
@@ -74,7 +66,16 @@ const VerdocsSend = class {
|
|
|
74
66
|
}
|
|
75
67
|
}
|
|
76
68
|
catch (e) {
|
|
77
|
-
console.log('[SEND] Error
|
|
69
|
+
console.log('[SEND] Error loading template', e);
|
|
70
|
+
(_b = this.sdkError) === null || _b === void 0 ? void 0 : _b.emit(new errors.SDKError(e.message, (_c = e.response) === null || _c === void 0 ? void 0 : _c.status, (_d = e.response) === null || _d === void 0 ? void 0 : _d.data));
|
|
71
|
+
}
|
|
72
|
+
if ((_e = loadSessionResult.session) === null || _e === void 0 ? void 0 : _e.profile) {
|
|
73
|
+
this.sessionContacts.push({
|
|
74
|
+
id: loadSessionResult.session.profile.id,
|
|
75
|
+
name: `${loadSessionResult.session.profile.first_name} ${loadSessionResult.session.profile.last_name}`,
|
|
76
|
+
email: loadSessionResult.session.profile.email,
|
|
77
|
+
phone: loadSessionResult.session.profile.phone,
|
|
78
|
+
});
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
81
|
getLevelIcon(level) {
|
|
@@ -90,7 +91,7 @@ const VerdocsSend = class {
|
|
|
90
91
|
}
|
|
91
92
|
handleSelectContact(e, role) {
|
|
92
93
|
e.preventDefault();
|
|
93
|
-
this.
|
|
94
|
+
this.rolesCompleted[role.id] = { ...role, ...e.detail };
|
|
94
95
|
this.showPickerForId = '';
|
|
95
96
|
}
|
|
96
97
|
handleClickRole(e, role) {
|
|
@@ -100,7 +101,7 @@ const VerdocsSend = class {
|
|
|
100
101
|
handleSend(e) {
|
|
101
102
|
var _a;
|
|
102
103
|
e.stopPropagation();
|
|
103
|
-
(_a = this.send) === null || _a === void 0 ? void 0 : _a.emit({
|
|
104
|
+
(_a = this.send) === null || _a === void 0 ? void 0 : _a.emit({ roles: Object.values(this.rolesCompleted), name: templateStore.state.template.name, template_id: this.templateId });
|
|
104
105
|
}
|
|
105
106
|
handleCancel(e) {
|
|
106
107
|
var _a;
|
|
@@ -108,18 +109,14 @@ const VerdocsSend = class {
|
|
|
108
109
|
(_a = this.cancel) === null || _a === void 0 ? void 0 : _a.emit();
|
|
109
110
|
}
|
|
110
111
|
render() {
|
|
111
|
-
|
|
112
|
-
const
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
console.log('valid phone', Validators.isValidPhone(recipient.phone), recipient.phone);
|
|
116
|
-
return Validators.isValidEmail(recipient.email) || Validators.isValidPhone(recipient.phone);
|
|
117
|
-
}).length >= ((_c = this.template) === null || _c === void 0 ? void 0 : _c.roles.length);
|
|
118
|
-
console.log('assigned', allRecipientsAssigned);
|
|
112
|
+
const roleNames = templateStore.state.template.roles.map(role => role.name) || [];
|
|
113
|
+
const rolesAssigned = Object.values(this.rolesCompleted).filter(recipient => Validators.isValidEmail(recipient.email) || Validators.isValidPhone(recipient.phone));
|
|
114
|
+
const allRolesAssigned = rolesAssigned.length >= roleNames.length;
|
|
115
|
+
console.log('r', this.rolesCompleted, allRolesAssigned, rolesAssigned);
|
|
119
116
|
return (index.h(index.Host, { class: {} }, index.h("div", { class: "recipients" }, index.h("div", { class: "left-line" }), index.h("div", { class: `level level-start` }, this.getLevelIcon(-1), index.h("div", { class: "complete" }, "Send Envelope")), this.levels.map(level => (index.h("div", { class: `level level-${level}` }, this.getLevelIcon(level), this.rolesAtLevel[level].map(role => {
|
|
120
117
|
var _a, _b, _c;
|
|
121
|
-
return (index.h("div", { class: "recipient", style: { backgroundColor: Colors.getRGBA(utils.getRoleIndex(roleNames, role.name)) }, onClick: e => this.handleClickRole(e, role) }, (_b = (_a = this.
|
|
122
|
-
})))), index.h("div", { class: `level level-done` }, this.getLevelIcon(this.levels.length), index.h("div", { class: "complete" }, "Signing Complete"))), index.h("div", { class: "buttons" }, index.h("verdocs-button", { label: "Cancel", size: "small", variant: "outline", onClick: e => this.handleCancel(e) }), index.h("verdocs-button", { label: "Send", size: "small", disabled: !
|
|
118
|
+
return (index.h("div", { class: "recipient", style: { backgroundColor: Colors.getRGBA(utils.getRoleIndex(roleNames, role.name)) }, onClick: e => this.handleClickRole(e, role) }, (_b = (_a = this.rolesCompleted[role.id]) === null || _a === void 0 ? void 0 : _a.full_name) !== null && _b !== void 0 ? _b : role.name, index.h("div", { class: "icon", innerHTML: editIcon }), this.showPickerForId === role.id && (index.h("verdocs-contact-picker", { onCancel: () => (this.showPickerForId = ''), onNext: e => this.handleSelectContact(e, role), contactSuggestions: this.sessionContacts, templateRole: (_c = this.rolesCompleted[role.id]) !== null && _c !== void 0 ? _c : role, onSearchContacts: e => console.log('Search', e.detail) }))));
|
|
119
|
+
})))), index.h("div", { class: `level level-done` }, this.getLevelIcon(this.levels.length), index.h("div", { class: "complete" }, "Signing Complete"))), index.h("div", { class: "buttons" }, index.h("verdocs-button", { label: "Cancel", size: "small", variant: "outline", onClick: e => this.handleCancel(e) }), index.h("verdocs-button", { label: "Send", size: "small", disabled: !allRolesAssigned, onClick: e => this.handleSend(e) }))));
|
|
123
120
|
}
|
|
124
121
|
};
|
|
125
122
|
VerdocsSend.style = verdocsSendCss;
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["verdocs-field-initial.cjs",[[0,"verdocs-field-initial",{"field":[16],"disabled":[4],"initials":[1],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-signature.cjs",[[0,"verdocs-field-signature",{"field":[16],"name":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-build.cjs",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1,"template-id"],"step":[32],"pdfUrl":[32],"template":[32]}]]],["verdocs-field-checkbox.cjs",[[0,"verdocs-field-checkbox",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-date.cjs",[[0,"verdocs-field-date",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"containerId":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-radio-button.cjs",[[0,"verdocs-field-radio-button",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-textarea.cjs",[[0,"verdocs-field-textarea",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-textbox.cjs",[[0,"verdocs-field-textbox",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-timestamp.cjs",[[0,"verdocs-field-timestamp",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-template-recipients.cjs",[[0,"verdocs-template-recipients",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"showingSenderDialog":[32],"sender":[32],"forceRerender":[32]}]]],["verdocs-sign.cjs",[[0,"verdocs-sign",{"envelopeId":[1,"envelope-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"recipient":[32],"signerToken":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"errorMessage":[32],"focusedField":[32],"isDone":[32],"showDone":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32]}]]],["verdocs-template-properties.cjs",[[0,"verdocs-template-properties",{"endpoint":[16],"templateId":[1,"template-id"],"template":[32],"name":[32],"visibility":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32]}]]],["verdocs-template-reminders.cjs",[[0,"verdocs-template-reminders",{"endpoint":[16],"templateId":[1,"template-id"],"showPlanBlocker":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32],"dirty":[32],"loading":[32]}]]],["verdocs-auth.cjs",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"isAuthenticated":[32],"displayMode":[32],"username":[32],"password":[32],"loggingIn":[32],"activeSession":[32],"loginError":[32]}]]],["verdocs-template-name.cjs",[[0,"verdocs-template-name",{"endpoint":[16],"templateId":[1,"template-id"],"name":[32],"dirty":[32],"loading":[32]}]]],["verdocs-search.cjs",[[0,"verdocs-search",{"endpoint":[16]}]]],["verdocs-send.cjs",[[0,"verdocs-send",{"endpoint":[16],"templateId":[1,"template-id"],"
|
|
18
|
+
return index.bootstrapLazy([["verdocs-field-initial.cjs",[[0,"verdocs-field-initial",{"field":[16],"disabled":[4],"initials":[1],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-signature.cjs",[[0,"verdocs-field-signature",{"field":[16],"name":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-build.cjs",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1,"template-id"],"step":[32],"pdfUrl":[32],"template":[32]}]]],["verdocs-field-checkbox.cjs",[[0,"verdocs-field-checkbox",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-date.cjs",[[0,"verdocs-field-date",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"containerId":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-radio-button.cjs",[[0,"verdocs-field-radio-button",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-textarea.cjs",[[0,"verdocs-field-textarea",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-textbox.cjs",[[0,"verdocs-field-textbox",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-timestamp.cjs",[[0,"verdocs-field-timestamp",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-template-recipients.cjs",[[0,"verdocs-template-recipients",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"showingSenderDialog":[32],"sender":[32],"forceRerender":[32]}]]],["verdocs-sign.cjs",[[0,"verdocs-sign",{"envelopeId":[1,"envelope-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"recipient":[32],"signerToken":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"errorMessage":[32],"focusedField":[32],"isDone":[32],"showDone":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32]}]]],["verdocs-template-properties.cjs",[[0,"verdocs-template-properties",{"endpoint":[16],"templateId":[1,"template-id"],"template":[32],"name":[32],"visibility":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32]}]]],["verdocs-template-reminders.cjs",[[0,"verdocs-template-reminders",{"endpoint":[16],"templateId":[1,"template-id"],"showPlanBlocker":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32],"dirty":[32],"loading":[32]}]]],["verdocs-auth.cjs",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"isAuthenticated":[32],"displayMode":[32],"username":[32],"password":[32],"loggingIn":[32],"activeSession":[32],"loginError":[32]}]]],["verdocs-template-name.cjs",[[0,"verdocs-template-name",{"endpoint":[16],"templateId":[1,"template-id"],"name":[32],"dirty":[32],"loading":[32]}]]],["verdocs-search.cjs",[[0,"verdocs-search",{"endpoint":[16]}]]],["verdocs-send.cjs",[[0,"verdocs-send",{"endpoint":[16],"templateId":[1,"template-id"],"containerId":[32],"rolesAtLevel":[32],"showPickerForId":[32],"sessionContacts":[32],"rolesCompleted":[32],"reset":[64]}]]],["verdocs-template-visibility.cjs",[[0,"verdocs-template-visibility",{"endpoint":[16],"templateId":[1,"template-id"],"dirty":[32],"loading":[32],"personal":[32],"public":[32]}]]],["verdocs-upload-dialog.cjs",[[0,"verdocs-upload-dialog",{"draggingOver":[32],"decodedFiles":[32]}]]],["verdocs-field-attachment.cjs",[[0,"verdocs-field-attachment",{"field":[16],"disabled":[4],"roleIndex":[2,"role-index"],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-preview.cjs",[[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"]}]]],["verdocs-envelope-sidebar.cjs",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32]}]]],["verdocs-kba-dialog.cjs",[[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"choices":[16],"response":[32]}]]],["verdocs-template-attachments.cjs",[[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32]}]]],["verdocs-field-dropdown.cjs",[[0,"verdocs-field-dropdown",{"field":[16],"disabled":[4],"roleindex":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-payment.cjs",[[0,"verdocs-field-payment",{"field":[16],"disabled":[4],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"focused":[4],"signed":[4],"roleindex":[2],"preparedMessage":[32],"signatureUrl":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-organization-card.cjs",[[0,"verdocs-organization-card",{"organization":[16]}]]],["verdocs-search-tabs.cjs",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["verdocs-status-indicator.cjs",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"recipientStatusIcons":[32],"containerId":[32]}]]],["verdocs-template-card.cjs",[[0,"verdocs-template-card",{"template":[16]}]]],["verdocs-template-tags.cjs",[[0,"verdocs-template-tags",{"tags":[16]}]]],["verdocs-toggle.cjs",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["verdocs-initial-dialog.cjs",[[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}]]],["verdocs-signature-dialog.cjs",[[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}]]],["verdocs-view.cjs",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"]}]]],["verdocs-toggle-button.cjs",[[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["verdocs-contact-picker.cjs",[[0,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"name":[32],"email":[32],"phone":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32]}]]],["verdocs-radio-button.cjs",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["verdocs-button.cjs",[[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["verdocs-template-role-properties_2.cjs",[[0,"verdocs-template-role-properties",{"endpoint":[16],"templateId":[1,"template-id"],"roleName":[1,"role-name"],"sender":[1],"dirty":[32],"saving":[32],"name":[32],"type":[32],"fullName":[32],"email":[32],"phone":[32],"allowDelegation":[32]}],[0,"verdocs-template-sender",{"endpoint":[16],"templateId":[1,"template-id"],"sender":[1],"saving":[32]}]]],["verdocs-floating-menu_2.cjs",[[0,"verdocs-floating-menu",{"options":[16]}],[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}]]],["verdocs-template-create_2.cjs",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1,"template-id"],"placing":[32],"selectedRoleName":[32]}],[0,"verdocs-template-create",{"endpoint":[16],"file":[32]}]]],["verdocs-ok-dialog.cjs",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"showCancel":[4,"show-cancel"]}]]],["verdocs-quick-functions_3.cjs",[[0,"verdocs-quick-functions",{"endpoint":[16]}],[0,"verdocs-search-activity",{"endpoint":[16],"type":[1],"options":[8],"emptyMessage":[32],"authFailure":[32],"title":[32],"recent":[32],"saved":[32],"starred":[32]}],[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["verdocs-dropdown.cjs",[[0,"verdocs-dropdown",{"options":[16],"open":[32]}]]],["verdocs-document-page_2.cjs",[[0,"verdocs-document-page",{"pageImageUri":[1,"page-image-uri"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32]}],[0,"verdocs-loader"]]],["verdocs-checkbox_4.cjs",[[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-text-input",{"value":[1],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"type":[1],"disabled":[4]}],[0,"verdocs-help-icon",{"text":[1],"containerId":[32]}]]],["verdocs-button-panel_3.cjs",[[0,"verdocs-template-field-properties",{"endpoint":[16],"templateId":[1,"template-id"],"fieldName":[1,"field-name"],"dirty":[32],"loading":[32],"type":[32],"name":[32],"roleName":[32],"required":[32],"placeholder":[32],"defaultValue":[32]}],[4,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}]]]], options);
|
|
19
19
|
});
|
package/dist/collection/components/elements/verdocs-contact-picker/verdocs-contact-picker.js
CHANGED
|
@@ -75,12 +75,12 @@ export class VerdocsContactPicker {
|
|
|
75
75
|
this.showSuggestions = false;
|
|
76
76
|
}
|
|
77
77
|
render() {
|
|
78
|
-
return (h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("div", { class: "row" }, h("label", { htmlFor: "verdocs-contact-picker-name" }, "Name:"), h("input", { id: "verdocs-contact-picker-name", name: "verdocs-contact-picker-name", type: "text", "data-lpignore": "true", autocomplete: "
|
|
78
|
+
return (h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("div", { class: "row" }, h("label", { htmlFor: "verdocs-contact-picker-name" }, "Name:"), h("input", { id: "verdocs-contact-picker-name", name: "verdocs-contact-picker-name", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.name, placeholder: "Recipient Name...", onFocus: () => { var _a; return (this.showSuggestions = ((_a = this.contactSuggestions) === null || _a === void 0 ? void 0 : _a.length) > 0); },
|
|
79
79
|
// onBlur={() => (this.showSuggestions = false)}
|
|
80
80
|
onInput: e => this.handleNameChange(e) }), this.showSuggestions && (h("div", { class: "dropdown" }, this.contactSuggestions.map(suggestion => {
|
|
81
81
|
var _a;
|
|
82
82
|
return (h("div", { key: (_a = suggestion.id) !== null && _a !== void 0 ? _a : suggestion.name, class: "suggestion", onClick: e => this.handleSelectSuggestion(e, suggestion) }, suggestion.avatar ? h("img", { alt: "Avatar", class: "avatar", src: suggestion.avatar }) : h("div", { class: "avatar", innerHTML: placeholderIcon }), h("div", { class: "details" }, h("div", { class: "name" }, suggestion.name), suggestion.email && h("div", { class: "destination" }, suggestion.email), suggestion.phone && h("div", { class: "destination" }, suggestion.phone))));
|
|
83
|
-
})))), h("div", { class: "row" }, h("label", { htmlFor: "verdocs-contact-picker-email" }, "Email:"), h("input", { id: "verdocs-contact-picker-email", name: "verdocs-contact-picker-email", type: "text", "data-lpignore": "true",
|
|
83
|
+
})))), h("div", { class: "row" }, h("label", { htmlFor: "verdocs-contact-picker-email" }, "Email:"), h("input", { id: "verdocs-contact-picker-email", name: "verdocs-contact-picker-email", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.email, placeholder: "Email Address...", onFocus: () => (this.showSuggestions = false), onInput: e => this.handleEmailChange(e) })), h("div", { class: "row" }, h("label", { htmlFor: "verdocs-contact-picker-phone" }, "Phone:"), h("input", { id: "verdocs-contact-picker-phone", name: "verdocs-contact-picker-phone", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.phone, placeholder: "Phone Number...", onFocus: () => (this.showSuggestions = false), onInput: e => this.handlePhoneChange(e) })), this.showMessage && (h("div", { class: "row" }, h("label", { htmlFor: "verdocs-contact-picker-message" }, "Message:"), h("input", { id: "verdocs-contact-picker-message", name: "verdocs-contact-picker-message", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.message, placeholder: "Invitation Message...", onFocus: () => (this.showSuggestions = false), onInput: e => this.handleMessageChange(e) }))), h("div", { class: "buttons" }, h("verdocs-toggle-button", { icon: messageIcon, size: "small", active: this.showMessage, onToggle: e => {
|
|
84
84
|
this.showMessage = e.detail.active;
|
|
85
85
|
this.showSuggestions = false;
|
|
86
86
|
} }), h("verdocs-toggle-button", { icon: delegateIcon, size: "small", active: this.delegator, onToggle: e => {
|
|
@@ -1,58 +1,49 @@
|
|
|
1
1
|
import { VerdocsEndpoint } from '@verdocs/js-sdk';
|
|
2
2
|
import { getRGBA } from '@verdocs/js-sdk/Utils/Colors';
|
|
3
|
-
import { getTemplate } from '@verdocs/js-sdk/Templates/Templates';
|
|
4
3
|
import { isValidEmail, isValidPhone } from '@verdocs/js-sdk/Templates/Validators';
|
|
5
4
|
import { h, Host } from '@stencil/core';
|
|
5
|
+
import TemplateStore from '../../../utils/templateStore';
|
|
6
|
+
import { loadTemplate } from '../../../utils/Templates';
|
|
6
7
|
import { getRoleIndex } from '../../../utils/utils';
|
|
8
|
+
import { SDKError } from '../../../utils/errors';
|
|
7
9
|
const editIcon = '<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>';
|
|
8
10
|
const startIcon = '<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>';
|
|
9
11
|
const stepIcon = '<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>';
|
|
10
12
|
const doneIcon = '<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>';
|
|
11
13
|
/**
|
|
12
|
-
* Display a form to collect recipient information for a new
|
|
13
|
-
*
|
|
14
|
+
* Display a form to collect recipient information for a new Envelope. If used anonymously, the specified `templateId` must be public.
|
|
15
|
+
* Because most applications have custom workflow requirements to trigger after sending an Envelope, this component does not actually
|
|
16
|
+
* perform that operation. Parent applications should listen for the `onSend` event, and can pass the contents of `event.detail`
|
|
17
|
+
* directly to the `createEnvelope()` call in JS-SDK.
|
|
14
18
|
*/
|
|
15
19
|
export class VerdocsSend {
|
|
16
20
|
constructor() {
|
|
17
21
|
this.levels = [];
|
|
18
22
|
this.endpoint = VerdocsEndpoint.getDefault();
|
|
19
23
|
this.templateId = null;
|
|
20
|
-
this.template = null;
|
|
21
|
-
this.pdfUrl = null;
|
|
22
24
|
this.containerId = `verdocs-send-${Math.random().toString(36).substring(2, 11)}`;
|
|
23
25
|
this.rolesAtLevel = {};
|
|
24
26
|
this.showPickerForId = '';
|
|
25
27
|
this.sessionContacts = [];
|
|
26
|
-
this.
|
|
28
|
+
this.rolesCompleted = {};
|
|
29
|
+
}
|
|
30
|
+
reset() {
|
|
31
|
+
this.rolesCompleted = {};
|
|
27
32
|
}
|
|
28
33
|
async componentWillLoad() {
|
|
29
|
-
var _a;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
this.sessionContacts.push({
|
|
35
|
-
id: result.session.profile.id,
|
|
36
|
-
name: `${result.session.profile.first_name} ${result.session.profile.last_name}`,
|
|
37
|
-
email: result.session.profile.email,
|
|
38
|
-
phone: result.session.profile.phone,
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
catch (e) {
|
|
43
|
-
console.log('Error loading session', e);
|
|
34
|
+
var _a, _b, _c, _d, _e;
|
|
35
|
+
const loadSessionResult = this.endpoint.loadSession();
|
|
36
|
+
if (!this.templateId) {
|
|
37
|
+
console.log(`[SEND] Missing required template ID ${this.templateId}`);
|
|
38
|
+
return;
|
|
44
39
|
}
|
|
45
|
-
}
|
|
46
|
-
async componentDidLoad() {
|
|
47
|
-
console.log('[SEND] Showing template', this.templateId);
|
|
48
40
|
try {
|
|
49
41
|
console.log(`[SEND] Loading template ${this.templateId}`);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
this.template = template;
|
|
53
|
-
if (template === null || template === void 0 ? void 0 : template.roles) {
|
|
42
|
+
await loadTemplate(this.endpoint, this.templateId);
|
|
43
|
+
if ((_a = TemplateStore.template) === null || _a === void 0 ? void 0 : _a.roles) {
|
|
54
44
|
const rolesAtLevel = {};
|
|
55
|
-
|
|
45
|
+
this.rolesCompleted = {};
|
|
46
|
+
TemplateStore.template.roles.forEach(role => {
|
|
56
47
|
const level = role.sequence - 1;
|
|
57
48
|
rolesAtLevel[level] || (rolesAtLevel[level] = []);
|
|
58
49
|
const id = `r-${level}-${rolesAtLevel[level].length}`;
|
|
@@ -64,7 +55,16 @@ export class VerdocsSend {
|
|
|
64
55
|
}
|
|
65
56
|
}
|
|
66
57
|
catch (e) {
|
|
67
|
-
console.log('[SEND] Error
|
|
58
|
+
console.log('[SEND] Error loading template', e);
|
|
59
|
+
(_b = this.sdkError) === null || _b === void 0 ? void 0 : _b.emit(new SDKError(e.message, (_c = e.response) === null || _c === void 0 ? void 0 : _c.status, (_d = e.response) === null || _d === void 0 ? void 0 : _d.data));
|
|
60
|
+
}
|
|
61
|
+
if ((_e = loadSessionResult.session) === null || _e === void 0 ? void 0 : _e.profile) {
|
|
62
|
+
this.sessionContacts.push({
|
|
63
|
+
id: loadSessionResult.session.profile.id,
|
|
64
|
+
name: `${loadSessionResult.session.profile.first_name} ${loadSessionResult.session.profile.last_name}`,
|
|
65
|
+
email: loadSessionResult.session.profile.email,
|
|
66
|
+
phone: loadSessionResult.session.profile.phone,
|
|
67
|
+
});
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
getLevelIcon(level) {
|
|
@@ -81,7 +81,7 @@ export class VerdocsSend {
|
|
|
81
81
|
handleSelectContact(e, role) {
|
|
82
82
|
e.preventDefault();
|
|
83
83
|
e.detail; // IContactSelectEvent
|
|
84
|
-
this.
|
|
84
|
+
this.rolesCompleted[role.id] = { ...role, ...e.detail };
|
|
85
85
|
this.showPickerForId = '';
|
|
86
86
|
}
|
|
87
87
|
handleClickRole(e, role) {
|
|
@@ -91,7 +91,7 @@ export class VerdocsSend {
|
|
|
91
91
|
handleSend(e) {
|
|
92
92
|
var _a;
|
|
93
93
|
e.stopPropagation();
|
|
94
|
-
(_a = this.send) === null || _a === void 0 ? void 0 : _a.emit({
|
|
94
|
+
(_a = this.send) === null || _a === void 0 ? void 0 : _a.emit({ roles: Object.values(this.rolesCompleted), name: TemplateStore.template.name, template_id: this.templateId });
|
|
95
95
|
}
|
|
96
96
|
handleCancel(e) {
|
|
97
97
|
var _a;
|
|
@@ -99,18 +99,14 @@ export class VerdocsSend {
|
|
|
99
99
|
(_a = this.cancel) === null || _a === void 0 ? void 0 : _a.emit();
|
|
100
100
|
}
|
|
101
101
|
render() {
|
|
102
|
-
|
|
103
|
-
const
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
console.log('valid phone', isValidPhone(recipient.phone), recipient.phone);
|
|
107
|
-
return isValidEmail(recipient.email) || isValidPhone(recipient.phone);
|
|
108
|
-
}).length >= ((_c = this.template) === null || _c === void 0 ? void 0 : _c.roles.length);
|
|
109
|
-
console.log('assigned', allRecipientsAssigned);
|
|
102
|
+
const roleNames = TemplateStore.template.roles.map(role => role.name) || [];
|
|
103
|
+
const rolesAssigned = Object.values(this.rolesCompleted).filter(recipient => isValidEmail(recipient.email) || isValidPhone(recipient.phone));
|
|
104
|
+
const allRolesAssigned = rolesAssigned.length >= roleNames.length;
|
|
105
|
+
console.log('r', this.rolesCompleted, allRolesAssigned, rolesAssigned);
|
|
110
106
|
return (h(Host, { class: {} }, h("div", { class: "recipients" }, h("div", { class: "left-line" }), h("div", { class: `level level-start` }, this.getLevelIcon(-1), h("div", { class: "complete" }, "Send Envelope")), this.levels.map(level => (h("div", { class: `level level-${level}` }, this.getLevelIcon(level), this.rolesAtLevel[level].map(role => {
|
|
111
107
|
var _a, _b, _c;
|
|
112
|
-
return (h("div", { class: "recipient", style: { backgroundColor: getRGBA(getRoleIndex(roleNames, role.name)) }, onClick: e => this.handleClickRole(e, role) }, (_b = (_a = this.
|
|
113
|
-
})))), h("div", { class: `level level-done` }, this.getLevelIcon(this.levels.length), h("div", { class: "complete" }, "Signing Complete"))), h("div", { class: "buttons" }, h("verdocs-button", { label: "Cancel", size: "small", variant: "outline", onClick: e => this.handleCancel(e) }), h("verdocs-button", { label: "Send", size: "small", disabled: !
|
|
108
|
+
return (h("div", { class: "recipient", style: { backgroundColor: getRGBA(getRoleIndex(roleNames, role.name)) }, onClick: e => this.handleClickRole(e, role) }, (_b = (_a = this.rolesCompleted[role.id]) === null || _a === void 0 ? void 0 : _a.full_name) !== null && _b !== void 0 ? _b : role.name, h("div", { class: "icon", innerHTML: editIcon }), this.showPickerForId === role.id && (h("verdocs-contact-picker", { onCancel: () => (this.showPickerForId = ''), onNext: e => this.handleSelectContact(e, role), contactSuggestions: this.sessionContacts, templateRole: (_c = this.rolesCompleted[role.id]) !== null && _c !== void 0 ? _c : role, onSearchContacts: e => console.log('Search', e.detail) }))));
|
|
109
|
+
})))), h("div", { class: `level level-done` }, this.getLevelIcon(this.levels.length), h("div", { class: "complete" }, "Signing Complete"))), h("div", { class: "buttons" }, h("verdocs-button", { label: "Cancel", size: "small", variant: "outline", onClick: e => this.handleCancel(e) }), h("verdocs-button", { label: "Send", size: "small", disabled: !allRolesAssigned, onClick: e => this.handleSend(e) }))));
|
|
114
110
|
}
|
|
115
111
|
static get is() { return "verdocs-send"; }
|
|
116
112
|
static get originalStyleUrls() {
|
|
@@ -168,13 +164,11 @@ export class VerdocsSend {
|
|
|
168
164
|
}
|
|
169
165
|
static get states() {
|
|
170
166
|
return {
|
|
171
|
-
"template": {},
|
|
172
|
-
"pdfUrl": {},
|
|
173
167
|
"containerId": {},
|
|
174
168
|
"rolesAtLevel": {},
|
|
175
169
|
"showPickerForId": {},
|
|
176
170
|
"sessionContacts": {},
|
|
177
|
-
"
|
|
171
|
+
"rolesCompleted": {}
|
|
178
172
|
};
|
|
179
173
|
}
|
|
180
174
|
static get events() {
|
|
@@ -189,8 +183,8 @@ export class VerdocsSend {
|
|
|
189
183
|
"text": "The user completed the form and clicked send."
|
|
190
184
|
},
|
|
191
185
|
"complexType": {
|
|
192
|
-
"original": "{
|
|
193
|
-
"resolved": "{
|
|
186
|
+
"original": "{roles: IRole[]; name: string; template_id: string}",
|
|
187
|
+
"resolved": "{ roles: IRole[]; name: string; template_id: string; }",
|
|
194
188
|
"references": {
|
|
195
189
|
"IRole": {
|
|
196
190
|
"location": "import",
|
|
@@ -235,4 +229,20 @@ export class VerdocsSend {
|
|
|
235
229
|
}
|
|
236
230
|
}];
|
|
237
231
|
}
|
|
232
|
+
static get methods() {
|
|
233
|
+
return {
|
|
234
|
+
"reset": {
|
|
235
|
+
"complexType": {
|
|
236
|
+
"signature": "() => Promise<void>",
|
|
237
|
+
"parameters": [],
|
|
238
|
+
"references": {},
|
|
239
|
+
"return": "Promise<void>"
|
|
240
|
+
},
|
|
241
|
+
"docs": {
|
|
242
|
+
"text": "",
|
|
243
|
+
"tags": []
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
}
|
|
238
248
|
}
|
|
@@ -7,9 +7,10 @@ export default {
|
|
|
7
7
|
},
|
|
8
8
|
argTypes: {
|
|
9
9
|
templateId: { control: { type: 'string' } },
|
|
10
|
+
onSend: { action: 'send' },
|
|
10
11
|
},
|
|
11
12
|
parameters: {
|
|
12
13
|
layout: 'fullscreen',
|
|
13
14
|
},
|
|
14
15
|
};
|
|
15
|
-
export const Send = ({ templateId }) => html `<verdocs-send .templateId=${templateId} />`;
|
|
16
|
+
export const Send = ({ templateId, onSend }) => html `<verdocs-send .templateId=${templateId} @send=${onSend} />`;
|
|
@@ -76,12 +76,12 @@ const VerdocsContactPicker = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
76
76
|
this.showSuggestions = false;
|
|
77
77
|
}
|
|
78
78
|
render() {
|
|
79
|
-
return (h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("div", { class: "row" }, h("label", { htmlFor: "verdocs-contact-picker-name" }, "Name:"), h("input", { id: "verdocs-contact-picker-name", name: "verdocs-contact-picker-name", type: "text", "data-lpignore": "true", autocomplete: "
|
|
79
|
+
return (h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("div", { class: "row" }, h("label", { htmlFor: "verdocs-contact-picker-name" }, "Name:"), h("input", { id: "verdocs-contact-picker-name", name: "verdocs-contact-picker-name", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.name, placeholder: "Recipient Name...", onFocus: () => { var _a; return (this.showSuggestions = ((_a = this.contactSuggestions) === null || _a === void 0 ? void 0 : _a.length) > 0); },
|
|
80
80
|
// onBlur={() => (this.showSuggestions = false)}
|
|
81
81
|
onInput: e => this.handleNameChange(e) }), this.showSuggestions && (h("div", { class: "dropdown" }, this.contactSuggestions.map(suggestion => {
|
|
82
82
|
var _a;
|
|
83
83
|
return (h("div", { key: (_a = suggestion.id) !== null && _a !== void 0 ? _a : suggestion.name, class: "suggestion", onClick: e => this.handleSelectSuggestion(e, suggestion) }, suggestion.avatar ? h("img", { alt: "Avatar", class: "avatar", src: suggestion.avatar }) : h("div", { class: "avatar", innerHTML: placeholderIcon }), h("div", { class: "details" }, h("div", { class: "name" }, suggestion.name), suggestion.email && h("div", { class: "destination" }, suggestion.email), suggestion.phone && h("div", { class: "destination" }, suggestion.phone))));
|
|
84
|
-
})))), h("div", { class: "row" }, h("label", { htmlFor: "verdocs-contact-picker-email" }, "Email:"), h("input", { id: "verdocs-contact-picker-email", name: "verdocs-contact-picker-email", type: "text", "data-lpignore": "true",
|
|
84
|
+
})))), h("div", { class: "row" }, h("label", { htmlFor: "verdocs-contact-picker-email" }, "Email:"), h("input", { id: "verdocs-contact-picker-email", name: "verdocs-contact-picker-email", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.email, placeholder: "Email Address...", onFocus: () => (this.showSuggestions = false), onInput: e => this.handleEmailChange(e) })), h("div", { class: "row" }, h("label", { htmlFor: "verdocs-contact-picker-phone" }, "Phone:"), h("input", { id: "verdocs-contact-picker-phone", name: "verdocs-contact-picker-phone", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.phone, placeholder: "Phone Number...", onFocus: () => (this.showSuggestions = false), onInput: e => this.handlePhoneChange(e) })), this.showMessage && (h("div", { class: "row" }, h("label", { htmlFor: "verdocs-contact-picker-message" }, "Message:"), h("input", { id: "verdocs-contact-picker-message", name: "verdocs-contact-picker-message", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.message, placeholder: "Invitation Message...", onFocus: () => (this.showSuggestions = false), onInput: e => this.handleMessageChange(e) }))), h("div", { class: "buttons" }, h("verdocs-toggle-button", { icon: messageIcon, size: "small", active: this.showMessage, onToggle: e => {
|
|
85
85
|
this.showMessage = e.detail.active;
|
|
86
86
|
this.showSuggestions = false;
|
|
87
87
|
} }), h("verdocs-toggle-button", { icon: delegateIcon, size: "small", active: this.delegator, onToggle: e => {
|