@verdocs/web-sdk 4.2.108 → 4.2.109

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.
@@ -58,9 +58,8 @@ const VerdocsContactPicker = class {
58
58
  this.message = this.templateRole.message || '';
59
59
  this.showMessage = this.message !== '';
60
60
  this.kbaMethod = this.templateRole.kba_method || '';
61
+ this.pinCode = this.templateRole.kba_pin || '';
61
62
  this.showKba = !!this.kbaMethod;
62
- // TODO
63
- this.pinCode = '';
64
63
  }
65
64
  }
66
65
  handleFirstNameChange(e) {
@@ -90,6 +89,8 @@ const VerdocsContactPicker = class {
90
89
  phone: this.phone,
91
90
  message: this.message,
92
91
  delegator: this.delegator,
92
+ kba_method: this.kbaMethod,
93
+ kba_pin: this.pinCode,
93
94
  });
94
95
  }
95
96
  handleSelectSuggestion(e, suggestion) {
@@ -103,26 +104,26 @@ const VerdocsContactPicker = class {
103
104
  // The reason for the random names/IDs is to disable browser autocomplete. We set the autocomplete tags but many browsers ignore them
104
105
  // and show a duplicate autocomplete picker on top of our own.
105
106
  render() {
106
- return (index.h("form", { key: '8c7cb46336302d309187ca68d7e38ebb3d001468', onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, index.h("div", { key: '8bc7c876bb89ee84dc14978560c6198d31983261', class: "row" }, index.h("label", { key: 'b57ac6d694661a48397afc6ab37fbf5cbca8cbc6', htmlFor: this.nameFieldId }, "Name:"), index.h("div", { key: '197fbb1e998f52d0df3fe9040fd5d9d640b0237a', class: "names-row" }, index.h("input", { key: '343aa3e3c8bb31edfc43c4bd51bed1928ea29d49', id: this.firstNameFieldId, name: this.firstNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.first_name, placeholder: "First...", onFocus: () => { var _a; return (this.showSuggestions = ((_a = this.contactSuggestions) === null || _a === void 0 ? void 0 : _a.length) > 0); }, onInput: e => this.handleFirstNameChange(e) }), index.h("input", { key: '78e830e80650f52d72e5c35523fa111df228c86b', id: this.lastNameFieldId, name: this.lastNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.last_name, placeholder: "Last...", onFocus: () => (this.showSuggestions = false), onInput: e => this.handleLastNameChange(e) })), this.showSuggestions && (index.h("div", { key: '9b35e34eba14d6ff17c29b7bb334e5a5d8080595', class: "dropdown" }, this.contactSuggestions
107
+ return (index.h("form", { key: '7ed697ee6acfcb2062280a820496aa1b186bcea9', onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, index.h("div", { key: 'f15d572ec332e405250d6c477f127e2d8a82fd25', class: "row" }, index.h("label", { key: 'fe0bcdd7753f1c966afa60c1571bb7a7eca5b867', htmlFor: this.nameFieldId }, "Name:"), index.h("div", { key: '8867d1d70cce8fa44af315a0f6b960f42e009836', class: "names-row" }, index.h("input", { key: '1fe63076788f4d19541755cb577cc7afca222d69', id: this.firstNameFieldId, name: this.firstNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.first_name, placeholder: "First...", onFocus: () => { var _a; return (this.showSuggestions = ((_a = this.contactSuggestions) === null || _a === void 0 ? void 0 : _a.length) > 0); }, onInput: e => this.handleFirstNameChange(e) }), index.h("input", { key: 'a6817292e059865c633be5ab4afba63a561fb07d', id: this.lastNameFieldId, name: this.lastNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.last_name, placeholder: "Last...", onFocus: () => (this.showSuggestions = false), onInput: e => this.handleLastNameChange(e) })), this.showSuggestions && (index.h("div", { key: '6cb90ca5096cc3573873de6e59f77cb88a792047', class: "dropdown" }, this.contactSuggestions
107
108
  .filter(suggestion => !this.first_name || suggestion.first_name.toLowerCase().includes(this.first_name.toLowerCase()))
108
109
  .map(suggestion => {
109
110
  var _a;
110
111
  return (index.h("div", { key: (_a = suggestion.id) !== null && _a !== void 0 ? _a : suggestion.email, class: "suggestion", onClick: e => this.handleSelectSuggestion(e, suggestion) }, suggestion.picture ? index.h("img", { alt: "Avatar", class: "avatar", src: suggestion.picture }) : index.h("div", { class: "avatar", innerHTML: addrBookIcon }), index.h("div", { class: "details" }, index.h("div", { class: "name" }, jsSdk.formatFullName(suggestion)), suggestion.email && index.h("div", { class: "destination" }, suggestion.email), suggestion.phone && index.h("div", { class: "destination" }, suggestion.phone))));
111
- })))), index.h("div", { key: '4e37f340b40e14e1469742856b9d9f2ea79add97', class: "row" }, index.h("label", { key: '0778e1b56c175a1a5077726fbba30280e5052773', htmlFor: this.emailFieldId }, "Email:"), index.h("input", { key: '9f6806efb77821579c5eee7bf020e0219212761a', id: this.emailFieldId, name: this.emailFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", value: this.email, placeholder: "Email address...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.email = e.target.value) })), index.h("div", { key: '6e99f4b3a76f5696f39d721784be7ca0350a42bb', class: "row" }, index.h("label", { key: 'cdbfcb45cb531b203d4417f21daffe82a2b4974a', htmlFor: this.phoneFieldId }, "Phone:"), index.h("input", { key: '384b2d948efacbdbb44bad6e8da4174035a63ad3', id: this.phoneFieldId, name: this.phoneFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", value: this.phone, placeholder: "Phone (SMS)...", onFocus: () => (this.showSuggestions = false), onInput: (e) => utils.convertToE164(e.target.value) })), this.showKba && (index.h(index.Fragment, { key: '3824ab85ac446ee579279c034d44c9c7d9f80f44' }, index.h("div", { key: '253b5ce372f405f20dda62f889eb791dbc958d8c', class: "kba-row" }, index.h("label", { key: '6714f992e2f7710d1fe93ed34596f99c54d8e9b0' }, "KBA:"), index.h("verdocs-select-input", { key: '06107cc54709178c007a5416d0c8dcf9c206a1ca', value: this.kbaMethod, onInput: (e) => (this.kbaMethod = e.target.value), options: [
112
+ })))), index.h("div", { key: 'f60a340ab55e8415452e85f833e284de8237aa08', class: "row" }, index.h("label", { key: 'f0c0370b4cd9900f7fce27a1ced2d45e97475ed5', htmlFor: this.emailFieldId }, "Email:"), index.h("input", { key: '32d1e8768de34ba305a44bfafd9642f9587cb1a8', id: this.emailFieldId, name: this.emailFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", value: this.email, placeholder: "Email address...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.email = e.target.value) })), index.h("div", { key: '5be8b8e7b42c344a4fe18761b561e634b05ae718', class: "row" }, index.h("label", { key: 'f19e5ea6f3639dc28e2776e6f447b901f3ab3a31', htmlFor: this.phoneFieldId }, "Phone:"), index.h("input", { key: '3d910de57ae8dcf5e5ad9bd9ba4cb164de47eaad', id: this.phoneFieldId, name: this.phoneFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", value: this.phone, placeholder: "Phone (SMS)...", onFocus: () => (this.showSuggestions = false), onInput: (e) => utils.convertToE164(e.target.value) })), this.showKba && (index.h(index.Fragment, { key: '7f905e47123df6733b4abcf4b5f4b1951a8abb04' }, index.h("div", { key: '8eb65bd012848e33f7c485a5059879fb71d05db2', class: "kba-row" }, index.h("label", { key: '16a4024baf3b7316e8a9f3320b710783e2feb1d4' }, "KBA:"), index.h("verdocs-select-input", { key: '889100e6e474fd750b566d60eec5a0f87c9c33a9', value: this.kbaMethod, onInput: (e) => (this.kbaMethod = e.target.value), options: [
112
113
  { label: 'None', value: '' },
113
114
  { label: 'PIN Code', value: 'pin' },
114
115
  { label: 'Full Verification', value: 'kba' },
115
- ] }), index.h("div", { key: '2d898124db289daada4f174e3fe4b557716ef563', style: { flex: '1' } }), index.h("verdocs-help-icon", { key: '17c58ed5bedaffa1a0bc1f72f7830076dd46502e', text: "Knowledge-Based Authentication adds additional authentication for this user either via a simple PIN code or full address validation. NOTE: There may be a fee for using this feature." })), this.kbaMethod === 'pin' && (index.h("div", { key: 'caf64fae166a136aebfcce7ed96bfe015a3cdeb4', class: "row pin-code" }, index.h("input", { key: '545918a43fbb7464dcf5f1aa19a7654899071017', id: "verdocs-pin-code", name: "verdocs-pin-code", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.pinCode, placeholder: "KBA PIN Code...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.pinCode = e.target.value) }))))), this.showMessage && (index.h("div", { key: 'a747e2260ae8224b5b871ddbf1e8423d0da5e0be', class: "row message" }, index.h("label", { key: '2ff918a32677e81887639120cc5ab09be09e27f3', htmlFor: "verdocs-contact-picker-message" }, "Message:"), index.h("input", { key: '9c4c90117ca81c97f359e4b66dfde17d77506b98', id: "verdocs-contact-picker-message", name: "verdocs-contact-picker-message", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.message, placeholder: "Message shown in invitation...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.message = e.target.value) }))), index.h("div", { key: '3c043c21f0fd8e202de82782ed5d9beec1fa9f2f', class: "buttons" }, index.h("verdocs-toggle-button", { key: 'e4e7261482091d4ba73ca11ee0f5b1f738562339', icon: kbaIcon, size: "small", active: this.showKba, onToggle: e => {
116
+ ] }), index.h("div", { key: '5b80e6e7a249229363b78fea8529a6d5dfa299d7', style: { flex: '1' } }), index.h("verdocs-help-icon", { key: 'cb8be539954343749053aacb2d8b97f331d58ef2', text: "Knowledge-Based Authentication adds additional authentication for this user either via a simple PIN code or full address validation. NOTE: There may be a fee for using this feature." })), this.kbaMethod === 'pin' && (index.h("div", { key: 'ea1604394bcbdc74485f393f732f56cd72b16456', class: "row pin-code" }, index.h("input", { key: '220a6ecc193996b8324fc0857fdbedc5e0c9180c', id: "verdocs-pin-code", name: "verdocs-pin-code", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.pinCode, placeholder: "KBA PIN Code...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.pinCode = e.target.value) }))))), this.showMessage && (index.h("div", { key: '1b28ed1eaa9f4b9732047f1310201e62dba098bb', class: "row message" }, index.h("label", { key: 'f0b2a337ad490405ac0d077519a9b716fbf6d8d1', htmlFor: "verdocs-contact-picker-message" }, "Message:"), index.h("input", { key: '4f06ae76980ad130f064d6d4e69312aa9384b15f', id: "verdocs-contact-picker-message", name: "verdocs-contact-picker-message", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.message, placeholder: "Message shown in invitation...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.message = e.target.value) }))), index.h("div", { key: 'f81cff9b0ff13ba4a643aba20c3b9d4a2c4f9876', class: "buttons" }, index.h("verdocs-toggle-button", { key: '038477d4a09c003ee888d5fd6bf50cd1e412fe81', icon: kbaIcon, size: "small", active: this.showKba, onToggle: e => {
116
117
  this.showKba = e.detail.active;
117
118
  if (!e.detail.active) {
118
119
  this.pinCode = '';
119
120
  this.kbaMethod = '';
120
121
  }
121
122
  this.showSuggestions = false;
122
- } }), index.h("verdocs-toggle-button", { key: 'd4fb36d6031a641bf056ee8ef022665bd1655e27', icon: messageIcon, size: "small", active: this.showMessage, onToggle: e => {
123
+ } }), index.h("verdocs-toggle-button", { key: '689ac4fbbcae076aa2b23e4552ee8e9ffde3e3f1', icon: messageIcon, size: "small", active: this.showMessage, onToggle: e => {
123
124
  this.showMessage = e.detail.active;
124
125
  this.showSuggestions = false;
125
- } }), index.h("div", { key: '954cbf03867afb74ba9589f0c817541e410dd20c', class: "flex-fill" }), index.h("verdocs-button", { key: '1b02d3280ab090332a31cd200eed4f2d76d3df4e', variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e) }), index.h("verdocs-button", { key: '6213ec5d1b337771d53ab8daee0818662666df9f', label: "OK", size: "small", onClick: e => this.handleSubmit(e) }))));
126
+ } }), index.h("div", { key: '79acd11f45019554126cb2dca15c30e3b8bfe86c', class: "flex-fill" }), index.h("verdocs-button", { key: '63ce6fb6c58955c19dddfc7ca7187ff5ad4ea86a', variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e) }), index.h("verdocs-button", { key: 'e1523687c11224c74a6235adcc23e9e53eb995bc', label: "OK", size: "small", onClick: e => this.handleSubmit(e) }))));
126
127
  }
127
128
  };
128
129
  VerdocsContactPicker.style = VerdocsContactPickerStyle0;
@@ -52,9 +52,8 @@ export class VerdocsContactPicker {
52
52
  this.message = this.templateRole.message || '';
53
53
  this.showMessage = this.message !== '';
54
54
  this.kbaMethod = this.templateRole.kba_method || '';
55
+ this.pinCode = this.templateRole.kba_pin || '';
55
56
  this.showKba = !!this.kbaMethod;
56
- // TODO
57
- this.pinCode = '';
58
57
  }
59
58
  }
60
59
  handleFirstNameChange(e) {
@@ -84,6 +83,8 @@ export class VerdocsContactPicker {
84
83
  phone: this.phone,
85
84
  message: this.message,
86
85
  delegator: this.delegator,
86
+ kba_method: this.kbaMethod,
87
+ kba_pin: this.pinCode,
87
88
  });
88
89
  }
89
90
  handleSelectSuggestion(e, suggestion) {
@@ -97,26 +98,26 @@ export class VerdocsContactPicker {
97
98
  // The reason for the random names/IDs is to disable browser autocomplete. We set the autocomplete tags but many browsers ignore them
98
99
  // and show a duplicate autocomplete picker on top of our own.
99
100
  render() {
100
- return (h("form", { key: '8c7cb46336302d309187ca68d7e38ebb3d001468', onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("div", { key: '8bc7c876bb89ee84dc14978560c6198d31983261', class: "row" }, h("label", { key: 'b57ac6d694661a48397afc6ab37fbf5cbca8cbc6', htmlFor: this.nameFieldId }, "Name:"), h("div", { key: '197fbb1e998f52d0df3fe9040fd5d9d640b0237a', class: "names-row" }, h("input", { key: '343aa3e3c8bb31edfc43c4bd51bed1928ea29d49', id: this.firstNameFieldId, name: this.firstNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.first_name, placeholder: "First...", onFocus: () => { var _a; return (this.showSuggestions = ((_a = this.contactSuggestions) === null || _a === void 0 ? void 0 : _a.length) > 0); }, onInput: e => this.handleFirstNameChange(e) }), h("input", { key: '78e830e80650f52d72e5c35523fa111df228c86b', id: this.lastNameFieldId, name: this.lastNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.last_name, placeholder: "Last...", onFocus: () => (this.showSuggestions = false), onInput: e => this.handleLastNameChange(e) })), this.showSuggestions && (h("div", { key: '9b35e34eba14d6ff17c29b7bb334e5a5d8080595', class: "dropdown" }, this.contactSuggestions
101
+ return (h("form", { key: '7ed697ee6acfcb2062280a820496aa1b186bcea9', onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("div", { key: 'f15d572ec332e405250d6c477f127e2d8a82fd25', class: "row" }, h("label", { key: 'fe0bcdd7753f1c966afa60c1571bb7a7eca5b867', htmlFor: this.nameFieldId }, "Name:"), h("div", { key: '8867d1d70cce8fa44af315a0f6b960f42e009836', class: "names-row" }, h("input", { key: '1fe63076788f4d19541755cb577cc7afca222d69', id: this.firstNameFieldId, name: this.firstNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.first_name, placeholder: "First...", onFocus: () => { var _a; return (this.showSuggestions = ((_a = this.contactSuggestions) === null || _a === void 0 ? void 0 : _a.length) > 0); }, onInput: e => this.handleFirstNameChange(e) }), h("input", { key: 'a6817292e059865c633be5ab4afba63a561fb07d', id: this.lastNameFieldId, name: this.lastNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.last_name, placeholder: "Last...", onFocus: () => (this.showSuggestions = false), onInput: e => this.handleLastNameChange(e) })), this.showSuggestions && (h("div", { key: '6cb90ca5096cc3573873de6e59f77cb88a792047', class: "dropdown" }, this.contactSuggestions
101
102
  .filter(suggestion => !this.first_name || suggestion.first_name.toLowerCase().includes(this.first_name.toLowerCase()))
102
103
  .map(suggestion => {
103
104
  var _a;
104
105
  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))));
105
- })))), h("div", { key: '4e37f340b40e14e1469742856b9d9f2ea79add97', class: "row" }, h("label", { key: '0778e1b56c175a1a5077726fbba30280e5052773', htmlFor: this.emailFieldId }, "Email:"), h("input", { key: '9f6806efb77821579c5eee7bf020e0219212761a', id: this.emailFieldId, name: this.emailFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", value: this.email, placeholder: "Email address...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.email = e.target.value) })), h("div", { key: '6e99f4b3a76f5696f39d721784be7ca0350a42bb', class: "row" }, h("label", { key: 'cdbfcb45cb531b203d4417f21daffe82a2b4974a', htmlFor: this.phoneFieldId }, "Phone:"), h("input", { key: '384b2d948efacbdbb44bad6e8da4174035a63ad3', id: this.phoneFieldId, name: this.phoneFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", value: this.phone, placeholder: "Phone (SMS)...", onFocus: () => (this.showSuggestions = false), onInput: (e) => convertToE164(e.target.value) })), this.showKba && (h(Fragment, { key: '3824ab85ac446ee579279c034d44c9c7d9f80f44' }, h("div", { key: '253b5ce372f405f20dda62f889eb791dbc958d8c', class: "kba-row" }, h("label", { key: '6714f992e2f7710d1fe93ed34596f99c54d8e9b0' }, "KBA:"), h("verdocs-select-input", { key: '06107cc54709178c007a5416d0c8dcf9c206a1ca', value: this.kbaMethod, onInput: (e) => (this.kbaMethod = e.target.value), options: [
106
+ })))), h("div", { key: 'f60a340ab55e8415452e85f833e284de8237aa08', class: "row" }, h("label", { key: 'f0c0370b4cd9900f7fce27a1ced2d45e97475ed5', htmlFor: this.emailFieldId }, "Email:"), h("input", { key: '32d1e8768de34ba305a44bfafd9642f9587cb1a8', id: this.emailFieldId, name: this.emailFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", value: this.email, placeholder: "Email address...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.email = e.target.value) })), h("div", { key: '5be8b8e7b42c344a4fe18761b561e634b05ae718', class: "row" }, h("label", { key: 'f19e5ea6f3639dc28e2776e6f447b901f3ab3a31', htmlFor: this.phoneFieldId }, "Phone:"), h("input", { key: '3d910de57ae8dcf5e5ad9bd9ba4cb164de47eaad', id: this.phoneFieldId, name: this.phoneFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", value: this.phone, placeholder: "Phone (SMS)...", onFocus: () => (this.showSuggestions = false), onInput: (e) => convertToE164(e.target.value) })), this.showKba && (h(Fragment, { key: '7f905e47123df6733b4abcf4b5f4b1951a8abb04' }, h("div", { key: '8eb65bd012848e33f7c485a5059879fb71d05db2', class: "kba-row" }, h("label", { key: '16a4024baf3b7316e8a9f3320b710783e2feb1d4' }, "KBA:"), h("verdocs-select-input", { key: '889100e6e474fd750b566d60eec5a0f87c9c33a9', value: this.kbaMethod, onInput: (e) => (this.kbaMethod = e.target.value), options: [
106
107
  { label: 'None', value: '' },
107
108
  { label: 'PIN Code', value: 'pin' },
108
109
  { label: 'Full Verification', value: 'kba' },
109
- ] }), h("div", { key: '2d898124db289daada4f174e3fe4b557716ef563', style: { flex: '1' } }), h("verdocs-help-icon", { key: '17c58ed5bedaffa1a0bc1f72f7830076dd46502e', text: "Knowledge-Based Authentication adds additional authentication for this user either via a simple PIN code or full address validation. NOTE: There may be a fee for using this feature." })), this.kbaMethod === 'pin' && (h("div", { key: 'caf64fae166a136aebfcce7ed96bfe015a3cdeb4', class: "row pin-code" }, h("input", { key: '545918a43fbb7464dcf5f1aa19a7654899071017', id: "verdocs-pin-code", name: "verdocs-pin-code", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.pinCode, placeholder: "KBA PIN Code...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.pinCode = e.target.value) }))))), this.showMessage && (h("div", { key: 'a747e2260ae8224b5b871ddbf1e8423d0da5e0be', class: "row message" }, h("label", { key: '2ff918a32677e81887639120cc5ab09be09e27f3', htmlFor: "verdocs-contact-picker-message" }, "Message:"), h("input", { key: '9c4c90117ca81c97f359e4b66dfde17d77506b98', id: "verdocs-contact-picker-message", name: "verdocs-contact-picker-message", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.message, placeholder: "Message shown in invitation...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.message = e.target.value) }))), h("div", { key: '3c043c21f0fd8e202de82782ed5d9beec1fa9f2f', class: "buttons" }, h("verdocs-toggle-button", { key: 'e4e7261482091d4ba73ca11ee0f5b1f738562339', icon: kbaIcon, size: "small", active: this.showKba, onToggle: e => {
110
+ ] }), h("div", { key: '5b80e6e7a249229363b78fea8529a6d5dfa299d7', style: { flex: '1' } }), h("verdocs-help-icon", { key: 'cb8be539954343749053aacb2d8b97f331d58ef2', text: "Knowledge-Based Authentication adds additional authentication for this user either via a simple PIN code or full address validation. NOTE: There may be a fee for using this feature." })), this.kbaMethod === 'pin' && (h("div", { key: 'ea1604394bcbdc74485f393f732f56cd72b16456', class: "row pin-code" }, h("input", { key: '220a6ecc193996b8324fc0857fdbedc5e0c9180c', id: "verdocs-pin-code", name: "verdocs-pin-code", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.pinCode, placeholder: "KBA PIN Code...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.pinCode = e.target.value) }))))), this.showMessage && (h("div", { key: '1b28ed1eaa9f4b9732047f1310201e62dba098bb', class: "row message" }, h("label", { key: 'f0b2a337ad490405ac0d077519a9b716fbf6d8d1', htmlFor: "verdocs-contact-picker-message" }, "Message:"), h("input", { key: '4f06ae76980ad130f064d6d4e69312aa9384b15f', id: "verdocs-contact-picker-message", name: "verdocs-contact-picker-message", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.message, placeholder: "Message shown in invitation...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.message = e.target.value) }))), h("div", { key: 'f81cff9b0ff13ba4a643aba20c3b9d4a2c4f9876', class: "buttons" }, h("verdocs-toggle-button", { key: '038477d4a09c003ee888d5fd6bf50cd1e412fe81', icon: kbaIcon, size: "small", active: this.showKba, onToggle: e => {
110
111
  this.showKba = e.detail.active;
111
112
  if (!e.detail.active) {
112
113
  this.pinCode = '';
113
114
  this.kbaMethod = '';
114
115
  }
115
116
  this.showSuggestions = false;
116
- } }), h("verdocs-toggle-button", { key: 'd4fb36d6031a641bf056ee8ef022665bd1655e27', icon: messageIcon, size: "small", active: this.showMessage, onToggle: e => {
117
+ } }), h("verdocs-toggle-button", { key: '689ac4fbbcae076aa2b23e4552ee8e9ffde3e3f1', icon: messageIcon, size: "small", active: this.showMessage, onToggle: e => {
117
118
  this.showMessage = e.detail.active;
118
119
  this.showSuggestions = false;
119
- } }), h("div", { key: '954cbf03867afb74ba9589f0c817541e410dd20c', class: "flex-fill" }), h("verdocs-button", { key: '1b02d3280ab090332a31cd200eed4f2d76d3df4e', variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e) }), h("verdocs-button", { key: '6213ec5d1b337771d53ab8daee0818662666df9f', label: "OK", size: "small", onClick: e => this.handleSubmit(e) }))));
120
+ } }), h("div", { key: '79acd11f45019554126cb2dca15c30e3b8bfe86c', class: "flex-fill" }), h("verdocs-button", { key: '63ce6fb6c58955c19dddfc7ca7187ff5ad4ea86a', variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e) }), h("verdocs-button", { key: 'e1523687c11224c74a6235adcc23e9e53eb995bc', label: "OK", size: "small", onClick: e => this.handleSubmit(e) }))));
120
121
  }
121
122
  static get is() { return "verdocs-contact-picker"; }
122
123
  static get originalStyleUrls() {
@@ -56,9 +56,8 @@ const VerdocsContactPicker = /*@__PURE__*/ proxyCustomElement(class VerdocsConta
56
56
  this.message = this.templateRole.message || '';
57
57
  this.showMessage = this.message !== '';
58
58
  this.kbaMethod = this.templateRole.kba_method || '';
59
+ this.pinCode = this.templateRole.kba_pin || '';
59
60
  this.showKba = !!this.kbaMethod;
60
- // TODO
61
- this.pinCode = '';
62
61
  }
63
62
  }
64
63
  handleFirstNameChange(e) {
@@ -88,6 +87,8 @@ const VerdocsContactPicker = /*@__PURE__*/ proxyCustomElement(class VerdocsConta
88
87
  phone: this.phone,
89
88
  message: this.message,
90
89
  delegator: this.delegator,
90
+ kba_method: this.kbaMethod,
91
+ kba_pin: this.pinCode,
91
92
  });
92
93
  }
93
94
  handleSelectSuggestion(e, suggestion) {
@@ -101,26 +102,26 @@ const VerdocsContactPicker = /*@__PURE__*/ proxyCustomElement(class VerdocsConta
101
102
  // The reason for the random names/IDs is to disable browser autocomplete. We set the autocomplete tags but many browsers ignore them
102
103
  // and show a duplicate autocomplete picker on top of our own.
103
104
  render() {
104
- return (h("form", { key: '8c7cb46336302d309187ca68d7e38ebb3d001468', onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("div", { key: '8bc7c876bb89ee84dc14978560c6198d31983261', class: "row" }, h("label", { key: 'b57ac6d694661a48397afc6ab37fbf5cbca8cbc6', htmlFor: this.nameFieldId }, "Name:"), h("div", { key: '197fbb1e998f52d0df3fe9040fd5d9d640b0237a', class: "names-row" }, h("input", { key: '343aa3e3c8bb31edfc43c4bd51bed1928ea29d49', id: this.firstNameFieldId, name: this.firstNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.first_name, placeholder: "First...", onFocus: () => { var _a; return (this.showSuggestions = ((_a = this.contactSuggestions) === null || _a === void 0 ? void 0 : _a.length) > 0); }, onInput: e => this.handleFirstNameChange(e) }), h("input", { key: '78e830e80650f52d72e5c35523fa111df228c86b', id: this.lastNameFieldId, name: this.lastNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.last_name, placeholder: "Last...", onFocus: () => (this.showSuggestions = false), onInput: e => this.handleLastNameChange(e) })), this.showSuggestions && (h("div", { key: '9b35e34eba14d6ff17c29b7bb334e5a5d8080595', class: "dropdown" }, this.contactSuggestions
105
+ return (h("form", { key: '7ed697ee6acfcb2062280a820496aa1b186bcea9', onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("div", { key: 'f15d572ec332e405250d6c477f127e2d8a82fd25', class: "row" }, h("label", { key: 'fe0bcdd7753f1c966afa60c1571bb7a7eca5b867', htmlFor: this.nameFieldId }, "Name:"), h("div", { key: '8867d1d70cce8fa44af315a0f6b960f42e009836', class: "names-row" }, h("input", { key: '1fe63076788f4d19541755cb577cc7afca222d69', id: this.firstNameFieldId, name: this.firstNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.first_name, placeholder: "First...", onFocus: () => { var _a; return (this.showSuggestions = ((_a = this.contactSuggestions) === null || _a === void 0 ? void 0 : _a.length) > 0); }, onInput: e => this.handleFirstNameChange(e) }), h("input", { key: 'a6817292e059865c633be5ab4afba63a561fb07d', id: this.lastNameFieldId, name: this.lastNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.last_name, placeholder: "Last...", onFocus: () => (this.showSuggestions = false), onInput: e => this.handleLastNameChange(e) })), this.showSuggestions && (h("div", { key: '6cb90ca5096cc3573873de6e59f77cb88a792047', class: "dropdown" }, this.contactSuggestions
105
106
  .filter(suggestion => !this.first_name || suggestion.first_name.toLowerCase().includes(this.first_name.toLowerCase()))
106
107
  .map(suggestion => {
107
108
  var _a;
108
109
  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))));
109
- })))), h("div", { key: '4e37f340b40e14e1469742856b9d9f2ea79add97', class: "row" }, h("label", { key: '0778e1b56c175a1a5077726fbba30280e5052773', htmlFor: this.emailFieldId }, "Email:"), h("input", { key: '9f6806efb77821579c5eee7bf020e0219212761a', id: this.emailFieldId, name: this.emailFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", value: this.email, placeholder: "Email address...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.email = e.target.value) })), h("div", { key: '6e99f4b3a76f5696f39d721784be7ca0350a42bb', class: "row" }, h("label", { key: 'cdbfcb45cb531b203d4417f21daffe82a2b4974a', htmlFor: this.phoneFieldId }, "Phone:"), h("input", { key: '384b2d948efacbdbb44bad6e8da4174035a63ad3', id: this.phoneFieldId, name: this.phoneFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", value: this.phone, placeholder: "Phone (SMS)...", onFocus: () => (this.showSuggestions = false), onInput: (e) => convertToE164(e.target.value) })), this.showKba && (h(Fragment, { key: '3824ab85ac446ee579279c034d44c9c7d9f80f44' }, h("div", { key: '253b5ce372f405f20dda62f889eb791dbc958d8c', class: "kba-row" }, h("label", { key: '6714f992e2f7710d1fe93ed34596f99c54d8e9b0' }, "KBA:"), h("verdocs-select-input", { key: '06107cc54709178c007a5416d0c8dcf9c206a1ca', value: this.kbaMethod, onInput: (e) => (this.kbaMethod = e.target.value), options: [
110
+ })))), h("div", { key: 'f60a340ab55e8415452e85f833e284de8237aa08', class: "row" }, h("label", { key: 'f0c0370b4cd9900f7fce27a1ced2d45e97475ed5', htmlFor: this.emailFieldId }, "Email:"), h("input", { key: '32d1e8768de34ba305a44bfafd9642f9587cb1a8', id: this.emailFieldId, name: this.emailFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", value: this.email, placeholder: "Email address...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.email = e.target.value) })), h("div", { key: '5be8b8e7b42c344a4fe18761b561e634b05ae718', class: "row" }, h("label", { key: 'f19e5ea6f3639dc28e2776e6f447b901f3ab3a31', htmlFor: this.phoneFieldId }, "Phone:"), h("input", { key: '3d910de57ae8dcf5e5ad9bd9ba4cb164de47eaad', id: this.phoneFieldId, name: this.phoneFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", value: this.phone, placeholder: "Phone (SMS)...", onFocus: () => (this.showSuggestions = false), onInput: (e) => convertToE164(e.target.value) })), this.showKba && (h(Fragment, { key: '7f905e47123df6733b4abcf4b5f4b1951a8abb04' }, h("div", { key: '8eb65bd012848e33f7c485a5059879fb71d05db2', class: "kba-row" }, h("label", { key: '16a4024baf3b7316e8a9f3320b710783e2feb1d4' }, "KBA:"), h("verdocs-select-input", { key: '889100e6e474fd750b566d60eec5a0f87c9c33a9', value: this.kbaMethod, onInput: (e) => (this.kbaMethod = e.target.value), options: [
110
111
  { label: 'None', value: '' },
111
112
  { label: 'PIN Code', value: 'pin' },
112
113
  { label: 'Full Verification', value: 'kba' },
113
- ] }), h("div", { key: '2d898124db289daada4f174e3fe4b557716ef563', style: { flex: '1' } }), h("verdocs-help-icon", { key: '17c58ed5bedaffa1a0bc1f72f7830076dd46502e', text: "Knowledge-Based Authentication adds additional authentication for this user either via a simple PIN code or full address validation. NOTE: There may be a fee for using this feature." })), this.kbaMethod === 'pin' && (h("div", { key: 'caf64fae166a136aebfcce7ed96bfe015a3cdeb4', class: "row pin-code" }, h("input", { key: '545918a43fbb7464dcf5f1aa19a7654899071017', id: "verdocs-pin-code", name: "verdocs-pin-code", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.pinCode, placeholder: "KBA PIN Code...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.pinCode = e.target.value) }))))), this.showMessage && (h("div", { key: 'a747e2260ae8224b5b871ddbf1e8423d0da5e0be', class: "row message" }, h("label", { key: '2ff918a32677e81887639120cc5ab09be09e27f3', htmlFor: "verdocs-contact-picker-message" }, "Message:"), h("input", { key: '9c4c90117ca81c97f359e4b66dfde17d77506b98', id: "verdocs-contact-picker-message", name: "verdocs-contact-picker-message", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.message, placeholder: "Message shown in invitation...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.message = e.target.value) }))), h("div", { key: '3c043c21f0fd8e202de82782ed5d9beec1fa9f2f', class: "buttons" }, h("verdocs-toggle-button", { key: 'e4e7261482091d4ba73ca11ee0f5b1f738562339', icon: kbaIcon, size: "small", active: this.showKba, onToggle: e => {
114
+ ] }), h("div", { key: '5b80e6e7a249229363b78fea8529a6d5dfa299d7', style: { flex: '1' } }), h("verdocs-help-icon", { key: 'cb8be539954343749053aacb2d8b97f331d58ef2', text: "Knowledge-Based Authentication adds additional authentication for this user either via a simple PIN code or full address validation. NOTE: There may be a fee for using this feature." })), this.kbaMethod === 'pin' && (h("div", { key: 'ea1604394bcbdc74485f393f732f56cd72b16456', class: "row pin-code" }, h("input", { key: '220a6ecc193996b8324fc0857fdbedc5e0c9180c', id: "verdocs-pin-code", name: "verdocs-pin-code", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.pinCode, placeholder: "KBA PIN Code...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.pinCode = e.target.value) }))))), this.showMessage && (h("div", { key: '1b28ed1eaa9f4b9732047f1310201e62dba098bb', class: "row message" }, h("label", { key: 'f0b2a337ad490405ac0d077519a9b716fbf6d8d1', htmlFor: "verdocs-contact-picker-message" }, "Message:"), h("input", { key: '4f06ae76980ad130f064d6d4e69312aa9384b15f', id: "verdocs-contact-picker-message", name: "verdocs-contact-picker-message", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.message, placeholder: "Message shown in invitation...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.message = e.target.value) }))), h("div", { key: 'f81cff9b0ff13ba4a643aba20c3b9d4a2c4f9876', class: "buttons" }, h("verdocs-toggle-button", { key: '038477d4a09c003ee888d5fd6bf50cd1e412fe81', icon: kbaIcon, size: "small", active: this.showKba, onToggle: e => {
114
115
  this.showKba = e.detail.active;
115
116
  if (!e.detail.active) {
116
117
  this.pinCode = '';
117
118
  this.kbaMethod = '';
118
119
  }
119
120
  this.showSuggestions = false;
120
- } }), h("verdocs-toggle-button", { key: 'd4fb36d6031a641bf056ee8ef022665bd1655e27', icon: messageIcon, size: "small", active: this.showMessage, onToggle: e => {
121
+ } }), h("verdocs-toggle-button", { key: '689ac4fbbcae076aa2b23e4552ee8e9ffde3e3f1', icon: messageIcon, size: "small", active: this.showMessage, onToggle: e => {
121
122
  this.showMessage = e.detail.active;
122
123
  this.showSuggestions = false;
123
- } }), h("div", { key: '954cbf03867afb74ba9589f0c817541e410dd20c', class: "flex-fill" }), h("verdocs-button", { key: '1b02d3280ab090332a31cd200eed4f2d76d3df4e', variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e) }), h("verdocs-button", { key: '6213ec5d1b337771d53ab8daee0818662666df9f', label: "OK", size: "small", onClick: e => this.handleSubmit(e) }))));
124
+ } }), h("div", { key: '79acd11f45019554126cb2dca15c30e3b8bfe86c', class: "flex-fill" }), h("verdocs-button", { key: '63ce6fb6c58955c19dddfc7ca7187ff5ad4ea86a', variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e) }), h("verdocs-button", { key: 'e1523687c11224c74a6235adcc23e9e53eb995bc', label: "OK", size: "small", onClick: e => this.handleSubmit(e) }))));
124
125
  }
125
126
  static get style() { return VerdocsContactPickerStyle0; }
126
127
  }, [0, "verdocs-contact-picker", {