@verdocs/web-sdk 4.2.55 → 4.2.57

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.
Files changed (47) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/verdocs-checkbox_4.cjs.entry.js +1 -13
  3. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +18 -15
  4. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +12 -5
  5. package/dist/cjs/verdocs-preview_10.cjs.entry.js +0 -1
  6. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  7. package/dist/collection/components/embeds/verdocs-preview/verdocs-preview.js +0 -1
  8. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.css +8 -0
  9. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js +17 -15
  10. package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +12 -5
  11. package/dist/collection/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.js +2 -15
  12. package/dist/components/verdocs-contact-picker2.js +18 -16
  13. package/dist/components/verdocs-field-textbox2.js +12 -5
  14. package/dist/components/verdocs-preview2.js +0 -1
  15. package/dist/components/verdocs-template-field-properties2.js +2 -15
  16. package/dist/custom-elements.json +2030 -0
  17. package/dist/esm/loader.js +1 -1
  18. package/dist/esm/verdocs-checkbox_4.entry.js +2 -14
  19. package/dist/esm/verdocs-contact-picker_2.entry.js +18 -15
  20. package/dist/esm/verdocs-field-attachment_13.entry.js +12 -5
  21. package/dist/esm/verdocs-preview_10.entry.js +0 -1
  22. package/dist/esm/verdocs-web-sdk.js +1 -1
  23. package/dist/esm-es5/loader.js +1 -1
  24. package/dist/esm-es5/verdocs-checkbox_4.entry.js +1 -1
  25. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
  26. package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
  27. package/dist/esm-es5/verdocs-preview_10.entry.js +1 -1
  28. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  29. package/dist/types/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.d.ts +2 -3
  30. package/dist/types/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.d.ts +0 -1
  31. package/dist/verdocs-web-sdk/p-028f7781.entry.js +1 -0
  32. package/dist/verdocs-web-sdk/p-03a228e4.system.js +1 -1
  33. package/dist/verdocs-web-sdk/p-25ee52fd.system.entry.js +1 -0
  34. package/dist/verdocs-web-sdk/{p-5748c40c.system.entry.js → p-51ecab4b.system.entry.js} +1 -1
  35. package/dist/verdocs-web-sdk/p-68ff6623.system.entry.js +1 -0
  36. package/dist/verdocs-web-sdk/{p-11deb411.entry.js → p-8bedbce7.entry.js} +1 -1
  37. package/dist/verdocs-web-sdk/p-a9199a21.system.entry.js +1 -0
  38. package/dist/verdocs-web-sdk/p-b7ef23c9.entry.js +1 -0
  39. package/dist/verdocs-web-sdk/p-f493d459.entry.js +1 -0
  40. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  41. package/package.json +5 -5
  42. package/dist/verdocs-web-sdk/p-216f335e.system.entry.js +0 -1
  43. package/dist/verdocs-web-sdk/p-887e1f05.entry.js +0 -1
  44. package/dist/verdocs-web-sdk/p-8bfdaa86.system.entry.js +0 -1
  45. package/dist/verdocs-web-sdk/p-a3cf8f1b.system.entry.js +0 -1
  46. package/dist/verdocs-web-sdk/p-b551b4ec.entry.js +0 -1
  47. package/dist/verdocs-web-sdk/p-c78aeff3.entry.js +0 -1
@@ -46,11 +46,14 @@ export class VerdocsFieldTextbox {
46
46
  }
47
47
  componentDidRender() {
48
48
  interact.dynamicDrop(true);
49
- const field = this.fieldStore.get('fields').find(field => field.name === this.fieldname);
50
- let { multiline = false } = field || {};
51
49
  if (this.editable) {
52
50
  interact(this.el).resizable({
53
- edges: { top: multiline, bottom: multiline, left: true, right: true },
51
+ edges: { top: true, bottom: false, left: true, right: true },
52
+ modifiers: [
53
+ interact.modifiers.restrictSize({
54
+ min: { width: 30, height: 15 },
55
+ }),
56
+ ],
54
57
  listeners: {
55
58
  start: this.handleResizeStart.bind(this),
56
59
  move: this.handleResize.bind(this),
@@ -81,8 +84,12 @@ export class VerdocsFieldTextbox {
81
84
  handleResizeEnd(e) {
82
85
  const { fieldname = '' } = this;
83
86
  const width = Math.round(parseFloat(e.target.style.width));
84
- const height = Math.round(parseFloat(e.target.style.height));
85
- updateField(this.endpoint, this.templateid, this.fieldname, { width, height })
87
+ let height = Math.round(parseFloat(e.target.style.height));
88
+ if (height < 20) {
89
+ height = 15;
90
+ }
91
+ const multiline = height > 15;
92
+ updateField(this.endpoint, this.templateid, this.fieldname, { width, height, multiline })
86
93
  .then(field => {
87
94
  var _a;
88
95
  updateStoreField(this.fieldStore, this.fieldname, field);
@@ -1,5 +1,5 @@
1
1
  import { h, Host } from "@stencil/core";
2
- import { DEFAULT_FIELD_HEIGHTS, DEFAULT_FIELD_WIDTHS, deleteField, updateField, VerdocsEndpoint } from "@verdocs/js-sdk";
2
+ import { deleteField, updateField, VerdocsEndpoint } from "@verdocs/js-sdk";
3
3
  import { getTemplateFieldStore, updateStoreField } from "../../../utils/TemplateFieldStore";
4
4
  import { getTemplateRoleStore } from "../../../utils/TemplateRoleStore";
5
5
  import { getTemplateStore } from "../../../utils/TemplateStore";
@@ -25,7 +25,6 @@ export class VerdocsTemplateFieldProperties {
25
25
  this.type = 'textbox';
26
26
  this.name = '';
27
27
  this.required = false;
28
- this.multiline = false;
29
28
  this.roleName = '';
30
29
  this.group = '';
31
30
  this.fieldType = '';
@@ -79,7 +78,6 @@ export class VerdocsTemplateFieldProperties {
79
78
  this.options = field.options || [];
80
79
  this.placeholder = field.placeholder || '';
81
80
  this.defaultValue = field.default || '';
82
- this.multiline = field.multiline || false;
83
81
  this.dirty = false;
84
82
  this.loading = false;
85
83
  this.cleanupOptions();
@@ -99,17 +97,10 @@ export class VerdocsTemplateFieldProperties {
99
97
  required: this.required,
100
98
  label: this.label,
101
99
  group: this.group,
102
- multiline: this.multiline,
103
100
  placeholder: this.placeholder,
104
101
  default: this.defaultValue,
105
102
  options: this.options,
106
103
  };
107
- const field = this.fieldStore.get('fields').find(field => field.name === this.fieldName);
108
- if (!newProperties.multiline && field.multiline) {
109
- console.log('Switching off multiline');
110
- newProperties.width = DEFAULT_FIELD_WIDTHS.textbox;
111
- newProperties.height = DEFAULT_FIELD_HEIGHTS.textbox;
112
- }
113
104
  console.log('[FIELD PROPERTIES] Will update', this.fieldName, newProperties);
114
105
  updateField(this.endpoint, this.templateId, this.fieldName, newProperties)
115
106
  .then(updated => {
@@ -186,10 +177,7 @@ export class VerdocsTemplateFieldProperties {
186
177
  } }))), h("div", { class: "row", style: { marginTop: '15px', marginBottom: '15px' } }, h("label", { htmlFor: "verdocs-is-required", class: "input-label" }, "Required"), h("verdocs-checkbox", { id: "verdocs-is-required", name: "is-required", checked: this.required, value: "on", onInput: (e) => {
187
178
  this.required = e.target.checked;
188
179
  this.dirty = true;
189
- } })), this.type === 'textbox' && (h("div", { class: "row", style: { marginTop: '15px', marginBottom: '15px' } }, h("label", { htmlFor: "verdocs-is-multline", class: "input-label" }, "Multi-Line"), h("verdocs-checkbox", { id: "verdocs-is-multiline", name: "is-multiline", checked: this.multiline, value: "on", onInput: (e) => {
190
- this.multiline = e.target.checked;
191
- this.dirty = true;
192
- } }))), this.type === 'dropdown' && (h("div", { class: "row", style: { marginTop: '15px', marginBottom: '15px' } }, h("label", { htmlFor: "verdocs-is-required", class: "input-label" }, "Options"))), this.type === 'dropdown' && (h("div", { class: "options" }, h("div", { class: "options-header" }, h("div", { class: "options-header-label" }, "ID"), h("dev", { class: "options-header-label" }, "Label")), this.options.map((option, index) => (h("div", { class: "row option-row", key: index }, h("verdocs-text-input", { id: `verdocs-option-id-${option.id}`, value: option.id, placeholder: "Unique ID", onInput: (e) => {
180
+ } })), this.type === 'dropdown' && (h("div", { class: "row", style: { marginTop: '15px', marginBottom: '15px' } }, h("label", { htmlFor: "verdocs-is-required", class: "input-label" }, "Options"))), this.type === 'dropdown' && (h("div", { class: "options" }, h("div", { class: "options-header" }, h("div", { class: "options-header-label" }, "ID"), h("dev", { class: "options-header-label" }, "Label")), this.options.map((option, index) => (h("div", { class: "row option-row", key: index }, h("verdocs-text-input", { id: `verdocs-option-id-${option.id}`, value: option.id, placeholder: "Unique ID", onInput: (e) => {
193
181
  this.options[index].id = e.target.value;
194
182
  this.dirty = true;
195
183
  this.cleanupOptions();
@@ -302,7 +290,6 @@ export class VerdocsTemplateFieldProperties {
302
290
  "type": {},
303
291
  "name": {},
304
292
  "required": {},
305
- "multiline": {},
306
293
  "roleName": {},
307
294
  "group": {},
308
295
  "fieldType": {},
@@ -6,7 +6,7 @@ import { d as defineCustomElement$3 } from './verdocs-help-icon2.js';
6
6
  import { d as defineCustomElement$2 } from './verdocs-select-input2.js';
7
7
  import { d as defineCustomElement$1 } from './verdocs-toggle-button2.js';
8
8
 
9
- const verdocsContactPickerCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-contact-picker{display:block;border:1px solid #ebebeb;background-color:#ffffff;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form{background-color:#f5f5fa;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .row{width:300px;display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-contact-picker form .label-with-icon{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}verdocs-contact-picker form .label-with-icon verdocs-help-icon svg{-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-contact-picker form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker form .dropdown{left:0;right:0;top:49px;z-index:1000000;position:absolute;background:#ffffff;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form .dropdown .suggestion{display:-ms-flexbox;display:flex;padding:6px 12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .dropdown .suggestion svg{fill:#666666}verdocs-contact-picker form .dropdown .suggestion .avatar{width:48px;height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin-right:8px;border-radius:100%}verdocs-contact-picker form .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}verdocs-contact-picker form .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}verdocs-contact-picker form .dropdown .suggestion:hover{background:#eee;cursor:pointer}verdocs-contact-picker .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-contact-picker ::-webkit-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-moz-placeholder{color:#aaaaaa}verdocs-contact-picker :-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::placeholder{color:#aaaaaa}verdocs-contact-picker [data-lastpass-icon-root]{display:none !important}";
9
+ const verdocsContactPickerCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-contact-picker{display:block;border:1px solid #ebebeb;background-color:#ffffff;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form{background-color:#f5f5fa;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .row{width:300px;display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .names-row{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:8px}verdocs-contact-picker form .names-row>input{min-width:0}verdocs-contact-picker form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-contact-picker form .label-with-icon{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}verdocs-contact-picker form .label-with-icon verdocs-help-icon svg{-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-contact-picker form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker form .dropdown{left:0;right:0;top:49px;z-index:1000000;position:absolute;background:#ffffff;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form .dropdown .suggestion{display:-ms-flexbox;display:flex;padding:6px 12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .dropdown .suggestion svg{fill:#666666}verdocs-contact-picker form .dropdown .suggestion .avatar{width:48px;height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin-right:8px;border-radius:100%}verdocs-contact-picker form .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}verdocs-contact-picker form .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}verdocs-contact-picker form .dropdown .suggestion:hover{background:#eee;cursor:pointer}verdocs-contact-picker .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-contact-picker ::-webkit-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-moz-placeholder{color:#aaaaaa}verdocs-contact-picker :-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::placeholder{color:#aaaaaa}verdocs-contact-picker [data-lastpass-icon-root]{display:none !important}";
10
10
  const VerdocsContactPickerStyle0 = verdocsContactPickerCss;
11
11
 
12
12
  const messageIcon = '<svg focusable="false" viewBox="0 0 24 24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path></svg>';
@@ -24,7 +24,6 @@ const VerdocsContactPicker = /*@__PURE__*/ proxyCustomElement(class VerdocsConta
24
24
  this.endpoint = VerdocsEndpoint.getDefault();
25
25
  this.templateRole = null;
26
26
  this.contactSuggestions = [];
27
- this.name = undefined;
28
27
  this.first_name = undefined;
29
28
  this.last_name = undefined;
30
29
  this.email = undefined;
@@ -44,10 +43,10 @@ const VerdocsContactPicker = /*@__PURE__*/ proxyCustomElement(class VerdocsConta
44
43
  }
45
44
  componentWillLoad() {
46
45
  if (this.templateRole) {
46
+ // TODO: For backwards compatibility, may be removed once templateRole no longer has a full_name
47
47
  const nameComponents = (this.templateRole.full_name || '').split(' ');
48
- const firstName = nameComponents.shift() || '';
49
- const lastName = nameComponents.join(' ');
50
- this.name = this.templateRole.full_name || '';
48
+ const firstName = this.templateRole.first_name || nameComponents.shift() || '';
49
+ const lastName = this.templateRole.last_name || nameComponents.join(' ') || '';
51
50
  this.first_name = firstName;
52
51
  this.last_name = lastName;
53
52
  this.email = this.templateRole.email || '';
@@ -61,10 +60,15 @@ const VerdocsContactPicker = /*@__PURE__*/ proxyCustomElement(class VerdocsConta
61
60
  this.pinCode = '';
62
61
  }
63
62
  }
64
- handleNameChange(e) {
63
+ handleFirstNameChange(e) {
65
64
  var _a;
66
- this.name = e.target.value;
67
- (_a = this.searchContacts) === null || _a === void 0 ? void 0 : _a.emit({ query: this.name });
65
+ this.first_name = e.target.value;
66
+ (_a = this.searchContacts) === null || _a === void 0 ? void 0 : _a.emit({ query: this.first_name });
67
+ }
68
+ handleLastNameChange(e) {
69
+ var _a;
70
+ this.last_name = e.target.value;
71
+ (_a = this.searchContacts) === null || _a === void 0 ? void 0 : _a.emit({ query: this.last_name });
68
72
  }
69
73
  handleEmailChange(e) {
70
74
  this.email = e.target.value;
@@ -86,7 +90,6 @@ const VerdocsContactPicker = /*@__PURE__*/ proxyCustomElement(class VerdocsConta
86
90
  e.stopPropagation();
87
91
  this.showSuggestions = false;
88
92
  (_a = this.next) === null || _a === void 0 ? void 0 : _a.emit({
89
- full_name: this.name,
90
93
  first_name: this.first_name,
91
94
  last_name: this.last_name,
92
95
  email: this.email,
@@ -97,7 +100,7 @@ const VerdocsContactPicker = /*@__PURE__*/ proxyCustomElement(class VerdocsConta
97
100
  }
98
101
  handleSelectSuggestion(e, suggestion) {
99
102
  e.stopPropagation();
100
- this.name = suggestion.name;
103
+ console.log('Selected', suggestion);
101
104
  this.first_name = suggestion.first_name;
102
105
  this.last_name = suggestion.last_name;
103
106
  this.email = suggestion.email;
@@ -107,31 +110,30 @@ const VerdocsContactPicker = /*@__PURE__*/ proxyCustomElement(class VerdocsConta
107
110
  // The reason for the random names/IDs is to disable browser autocomplete. We set the autocomplete tags but many browsers ignore them
108
111
  // and show a duplicate autocomplete picker on top of our own.
109
112
  render() {
110
- return (h("form", { key: 'd4a74d3f95d9c13bf7b4afdc0391aafdc504b053', onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("div", { key: '329611e08994741cc94d01d62ab563ad182243ba', class: "row" }, h("label", { key: 'fd235b92d011939bbc20cf4efbe6428d953c454d', htmlFor: this.nameFieldId }, "Name:"), h("div", { key: 'e3531ddf8308a1be0a3fd43205fde1e99bca5dbc', style: { display: 'flex', flexDirection: 'row', gap: '8px;' } }, h("input", { key: 'b8bf71e3f6ce8e5aad6ee9cb03d1119935206f0c', id: this.firstNameFieldId, name: this.firstNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.first_name, placeholder: "First Name...", onFocus: () => { var _a; return (this.showSuggestions = ((_a = this.contactSuggestions) === null || _a === void 0 ? void 0 : _a.length) > 0); }, onInput: e => this.handleNameChange(e) }), h("input", { key: '9d53c8d43ed0ca4d3f17d39b6d90bece9afd68a7', id: this.lastNameFieldId, name: this.lastNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.last_name, placeholder: "Last Name...", onFocus: () => { var _a; return (this.showSuggestions = ((_a = this.contactSuggestions) === null || _a === void 0 ? void 0 : _a.length) > 0); }, onInput: e => this.handleNameChange(e) })), this.showSuggestions && (h("div", { key: 'f53fc8a9ec12e31401afc4d22c98269ba96d0048', class: "dropdown" }, this.contactSuggestions.map(suggestion => {
113
+ return (h("form", { key: '8af5dbd2e066184e5bcafaa8ce88607b3c45eb3c', onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("div", { key: '866df17f478ea88eebd4066b37dbc2633e9a3125', class: "row" }, h("label", { key: 'e9218a81ae6c5b14ce3eb6362b5b2a32de918e25', htmlFor: this.nameFieldId }, "Name:"), h("div", { key: '655c9a8bfca059dc3e0a3cedf2a59138d255248f', class: "names-row" }, h("input", { key: '6f2451ab980513e7fb840b2e2c3f3a51a6fc2bfb', id: this.firstNameFieldId, name: this.firstNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.first_name, placeholder: "First Name...", 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: '187fc2767904dd61a853786c2571c4a9bf6a5377', id: this.lastNameFieldId, name: this.lastNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.last_name, placeholder: "Last Name...", onFocus: () => { var _a; return (this.showSuggestions = ((_a = this.contactSuggestions) === null || _a === void 0 ? void 0 : _a.length) > 0); }, onInput: e => this.handleLastNameChange(e) })), this.showSuggestions && (h("div", { key: '4bea4ff52a5824336f769aa71fd9d07357f9bcc4', class: "dropdown" }, this.contactSuggestions.map(suggestion => {
111
114
  var _a;
112
115
  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))));
113
- })))), h("div", { key: '29211a4aeccb45c1f6ce4581ce89eef56fd0efa0', class: "row" }, h("label", { key: '32fb4eaa0599ea08364af828e93dd182ee36b42b', htmlFor: this.emailFieldId }, "Email:"), h("input", { key: '9a75b49d558dab786d4cec8e74e1d4970da63467', 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.handleEmailChange(e) })), h("div", { key: 'd5e07b3b8b24283acb158a8b44a981b1281c0964', class: "row" }, h("label", { key: '0d76a478038a18d4b16f73c14fe8ec53a014ca37', htmlFor: this.phoneFieldId }, "Phone:"), h("input", { key: '7c957fa5584d100e08bcb4ef808ec21ef507df32', id: this.phoneFieldId, name: this.phoneFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", value: this.phone, placeholder: "Phone Number...", onFocus: () => (this.showSuggestions = false), onInput: e => this.handlePhoneChange(e) })), this.showKba && (h("div", { key: '3d48f1e8c4941700ecbc07a57fa3a8e22e866c26', class: "row" }, h("div", { key: '94f76f6449c8939dbd989507d03f8c7323b0487d', class: "label-with-icon" }, h("label", { key: '516dd082ac4cd08e881bffc1ab22d14ed3cc4c52' }, "KBA:"), h("verdocs-help-icon", { key: 'e12ca24140bbcfb1645c14c2bfcf3e7326d3033a', 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." })), h("verdocs-select-input", { key: 'eadc53ce819c1ff21a9a3c51e4771a8dd7076eee', value: this.kbaMethod, onInput: (e) => (this.kbaMethod = e.target.value), options: [
116
+ })))), h("div", { key: '11be90948242134e109d1e2d0bc8ed99abbcbf76', class: "row" }, h("label", { key: '06745e80fb6cac8f7f94a13dd03cb88bcf9176bf', htmlFor: this.emailFieldId }, "Email:"), h("input", { key: '41f636a6b44ca22d7f7766f7034cf6c7eab95a64', 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.handleEmailChange(e) })), h("div", { key: '4af9e4f820a6a2d0a3daf9264797b193718122a8', class: "row" }, h("label", { key: '1c35261e9941adbc584e03fcd26f1c85d3c594b1', htmlFor: this.phoneFieldId }, "Phone:"), h("input", { key: 'e7b0010c8047785f7ccdf1c5b69114a79077baf5', id: this.phoneFieldId, name: this.phoneFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", value: this.phone, placeholder: "Phone Number...", onFocus: () => (this.showSuggestions = false), onInput: e => this.handlePhoneChange(e) })), this.showKba && (h("div", { key: '6f0a224dbf3ee2a269f4e9506dbe4d570bcd7fbf', class: "row" }, h("div", { key: '64dbfdec97ba55010a44dd7e8504b1457be8e852', class: "label-with-icon" }, h("label", { key: '33fe672a3ba66fc3dc95d1fcf6694c3ee0e73785' }, "KBA:"), h("verdocs-help-icon", { key: 'f42c59f44000a76b6dd5b457f966bdb72f0fdc99', 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." })), h("verdocs-select-input", { key: '89d90d77187246062073084c38ab16fd6388bc9a', value: this.kbaMethod, onInput: (e) => (this.kbaMethod = e.target.value), options: [
114
117
  { label: 'None', value: '' },
115
118
  { label: 'PIN Code', value: 'pin' },
116
119
  { label: 'Full Verification', value: 'kba' },
117
- ] }), this.kbaMethod === 'pin' && (h("input", { key: 'db7162ba5935448fdf6b335b57c2ac91283563b6', 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.handleMessageChange(e) })))), this.showMessage && (h("div", { key: '2ff18d49d7bd4181ba6fbf1ecacb64ba458b66d2', class: "row" }, h("label", { key: '2c22e7f0c17c5e86e4c920399ba3d4b0500a495e', htmlFor: "verdocs-contact-picker-message" }, "Message:"), h("input", { key: 'ff3a0a753f1cb6418e02cb0f4abffbe540fd4213', 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", { key: 'cec56a872a810a5cedc49e57f3afe1ecf3c3ade6', class: "buttons" }, h("verdocs-toggle-button", { key: '6f9e177a3e8d077144b5d4382a18a95b44616d12', icon: kbaIcon, size: "small", active: this.showKba, onToggle: e => {
120
+ ] }), this.kbaMethod === 'pin' && (h("input", { key: 'e53128bbc3732379e0bf98e8ae70151e55b2ff64', 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.handleMessageChange(e) })))), this.showMessage && (h("div", { key: '5ff8d72b8da46eb6adbf712bd87571613b7b5d81', class: "row" }, h("label", { key: '8f18c67eb9bb51dc138da21068c1d05bd714e5fc', htmlFor: "verdocs-contact-picker-message" }, "Message:"), h("input", { key: '9c0d81f831335a1a712d097c57e79fdd3b901465', 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", { key: 'fda4e846bddb572c9a8baa7cd009bdb2ff6c5814', class: "buttons" }, h("verdocs-toggle-button", { key: 'faf34cacb6a7f21d98d266113e230e58c3673a72', icon: kbaIcon, size: "small", active: this.showKba, onToggle: e => {
118
121
  this.showKba = e.detail.active;
119
122
  if (!e.detail.active) {
120
123
  this.pinCode = '';
121
124
  this.kbaMethod = '';
122
125
  }
123
126
  this.showSuggestions = false;
124
- } }), h("verdocs-toggle-button", { key: '8d7468bdc795eff356f4636bff62b9536c0a2d59', icon: messageIcon, size: "small", active: this.showMessage, onToggle: e => {
127
+ } }), h("verdocs-toggle-button", { key: 'c7790cc8c9beb9ad8f3e69dfe62436fe9365463e', icon: messageIcon, size: "small", active: this.showMessage, onToggle: e => {
125
128
  this.showMessage = e.detail.active;
126
129
  this.showSuggestions = false;
127
- } }), h("div", { key: 'a902c45f33e944655d42f758b67c082fa57c93ca', class: "flex-fill" }), h("verdocs-button", { key: 'b24bce7779c3049c5f578cc55b2dec550258c57a', variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e) }), h("verdocs-button", { key: '6445645ad05e49aa28c149bed65ee95ce6889e2a', label: "OK", size: "small", onClick: e => this.handleSubmit(e) }))));
130
+ } }), h("div", { key: '0c12444bf7ce9bbaa2ddac54f2d219b9b86157a4', class: "flex-fill" }), h("verdocs-button", { key: '3f7f3356cfd19f407ea7fcb8c2e8e641b69bf03a', variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e) }), h("verdocs-button", { key: '598bff5040b18bb4eff4e35b848b7a99fe536953', label: "OK", size: "small", onClick: e => this.handleSubmit(e) }))));
128
131
  }
129
132
  static get style() { return VerdocsContactPickerStyle0; }
130
133
  }, [0, "verdocs-contact-picker", {
131
134
  "endpoint": [16],
132
135
  "templateRole": [16],
133
136
  "contactSuggestions": [16],
134
- "name": [32],
135
137
  "first_name": [32],
136
138
  "last_name": [32],
137
139
  "email": [32],
@@ -59,11 +59,14 @@ const VerdocsFieldTextbox = /*@__PURE__*/ proxyCustomElement(class VerdocsFieldT
59
59
  }
60
60
  componentDidRender() {
61
61
  interact.dynamicDrop(true);
62
- const field = this.fieldStore.get('fields').find(field => field.name === this.fieldname);
63
- let { multiline = false } = field || {};
64
62
  if (this.editable) {
65
63
  interact(this.el).resizable({
66
- edges: { top: multiline, bottom: multiline, left: true, right: true },
64
+ edges: { top: true, bottom: false, left: true, right: true },
65
+ modifiers: [
66
+ interact.modifiers.restrictSize({
67
+ min: { width: 30, height: 15 },
68
+ }),
69
+ ],
67
70
  listeners: {
68
71
  start: this.handleResizeStart.bind(this),
69
72
  move: this.handleResize.bind(this),
@@ -94,8 +97,12 @@ const VerdocsFieldTextbox = /*@__PURE__*/ proxyCustomElement(class VerdocsFieldT
94
97
  handleResizeEnd(e) {
95
98
  const { fieldname = '' } = this;
96
99
  const width = Math.round(parseFloat(e.target.style.width));
97
- const height = Math.round(parseFloat(e.target.style.height));
98
- updateField(this.endpoint, this.templateid, this.fieldname, { width, height })
100
+ let height = Math.round(parseFloat(e.target.style.height));
101
+ if (height < 20) {
102
+ height = 15;
103
+ }
104
+ const multiline = height > 15;
105
+ updateField(this.endpoint, this.templateid, this.fieldname, { width, height, multiline })
99
106
  .then(field => {
100
107
  var _a;
101
108
  updateStoreField(this.fieldStore, this.fieldname, field);
@@ -68,7 +68,6 @@ const VerdocsPreview = /*@__PURE__*/ proxyCustomElement(class VerdocsPreview ext
68
68
  }
69
69
  async loadTemplate(templateId) {
70
70
  if (templateId) {
71
- console.log('lt', templateId);
72
71
  getTemplateStore(this.endpoint, templateId, false)
73
72
  .then(ts => {
74
73
  this.templateStore = ts;
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { VerdocsEndpoint, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, updateField, deleteField } from '@verdocs/js-sdk';
2
+ import { VerdocsEndpoint, updateField, deleteField } from '@verdocs/js-sdk';
3
3
  import { g as getTemplateFieldStore, u as updateStoreField } from './TemplateFieldStore.js';
4
4
  import { g as getTemplateRoleStore } from './TemplateRoleStore.js';
5
5
  import { g as getTemplateStore } from './TemplateStore.js';
@@ -38,7 +38,6 @@ const VerdocsTemplateFieldProperties = /*@__PURE__*/ proxyCustomElement(class Ve
38
38
  this.type = 'textbox';
39
39
  this.name = '';
40
40
  this.required = false;
41
- this.multiline = false;
42
41
  this.roleName = '';
43
42
  this.group = '';
44
43
  this.fieldType = '';
@@ -92,7 +91,6 @@ const VerdocsTemplateFieldProperties = /*@__PURE__*/ proxyCustomElement(class Ve
92
91
  this.options = field.options || [];
93
92
  this.placeholder = field.placeholder || '';
94
93
  this.defaultValue = field.default || '';
95
- this.multiline = field.multiline || false;
96
94
  this.dirty = false;
97
95
  this.loading = false;
98
96
  this.cleanupOptions();
@@ -112,17 +110,10 @@ const VerdocsTemplateFieldProperties = /*@__PURE__*/ proxyCustomElement(class Ve
112
110
  required: this.required,
113
111
  label: this.label,
114
112
  group: this.group,
115
- multiline: this.multiline,
116
113
  placeholder: this.placeholder,
117
114
  default: this.defaultValue,
118
115
  options: this.options,
119
116
  };
120
- const field = this.fieldStore.get('fields').find(field => field.name === this.fieldName);
121
- if (!newProperties.multiline && field.multiline) {
122
- console.log('Switching off multiline');
123
- newProperties.width = DEFAULT_FIELD_WIDTHS.textbox;
124
- newProperties.height = DEFAULT_FIELD_HEIGHTS.textbox;
125
- }
126
117
  console.log('[FIELD PROPERTIES] Will update', this.fieldName, newProperties);
127
118
  updateField(this.endpoint, this.templateId, this.fieldName, newProperties)
128
119
  .then(updated => {
@@ -199,10 +190,7 @@ const VerdocsTemplateFieldProperties = /*@__PURE__*/ proxyCustomElement(class Ve
199
190
  } }))), h("div", { class: "row", style: { marginTop: '15px', marginBottom: '15px' } }, h("label", { htmlFor: "verdocs-is-required", class: "input-label" }, "Required"), h("verdocs-checkbox", { id: "verdocs-is-required", name: "is-required", checked: this.required, value: "on", onInput: (e) => {
200
191
  this.required = e.target.checked;
201
192
  this.dirty = true;
202
- } })), this.type === 'textbox' && (h("div", { class: "row", style: { marginTop: '15px', marginBottom: '15px' } }, h("label", { htmlFor: "verdocs-is-multline", class: "input-label" }, "Multi-Line"), h("verdocs-checkbox", { id: "verdocs-is-multiline", name: "is-multiline", checked: this.multiline, value: "on", onInput: (e) => {
203
- this.multiline = e.target.checked;
204
- this.dirty = true;
205
- } }))), this.type === 'dropdown' && (h("div", { class: "row", style: { marginTop: '15px', marginBottom: '15px' } }, h("label", { htmlFor: "verdocs-is-required", class: "input-label" }, "Options"))), this.type === 'dropdown' && (h("div", { class: "options" }, h("div", { class: "options-header" }, h("div", { class: "options-header-label" }, "ID"), h("dev", { class: "options-header-label" }, "Label")), this.options.map((option, index) => (h("div", { class: "row option-row", key: index }, h("verdocs-text-input", { id: `verdocs-option-id-${option.id}`, value: option.id, placeholder: "Unique ID", onInput: (e) => {
193
+ } })), this.type === 'dropdown' && (h("div", { class: "row", style: { marginTop: '15px', marginBottom: '15px' } }, h("label", { htmlFor: "verdocs-is-required", class: "input-label" }, "Options"))), this.type === 'dropdown' && (h("div", { class: "options" }, h("div", { class: "options-header" }, h("div", { class: "options-header-label" }, "ID"), h("dev", { class: "options-header-label" }, "Label")), this.options.map((option, index) => (h("div", { class: "row option-row", key: index }, h("verdocs-text-input", { id: `verdocs-option-id-${option.id}`, value: option.id, placeholder: "Unique ID", onInput: (e) => {
206
194
  this.options[index].id = e.target.value;
207
195
  this.dirty = true;
208
196
  this.cleanupOptions();
@@ -229,7 +217,6 @@ const VerdocsTemplateFieldProperties = /*@__PURE__*/ proxyCustomElement(class Ve
229
217
  "type": [32],
230
218
  "name": [32],
231
219
  "required": [32],
232
- "multiline": [32],
233
220
  "roleName": [32],
234
221
  "group": [32],
235
222
  "fieldType": [32],