@everymatrix/general-input 1.10.0 → 1.10.2

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 (35) hide show
  1. package/dist/cjs/checkbox-input_9.cjs.entry.js +27 -90
  2. package/dist/cjs/general-input.cjs.js +1 -1
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/collection/components/checkbox-input/checkbox-input.js +1 -0
  5. package/dist/collection/components/date-input/date-input.js +3 -30
  6. package/dist/collection/components/email-input/email-input.js +5 -37
  7. package/dist/collection/components/number-input/number-input.js +5 -37
  8. package/dist/collection/components/password-input/password-input.js +1 -0
  9. package/dist/collection/components/radio-input/radio-input.js +3 -30
  10. package/dist/collection/components/select-input/select-input.js +3 -33
  11. package/dist/collection/components/tel-input/tel-input.js +5 -37
  12. package/dist/collection/components/text-input/text-input.js +1 -0
  13. package/dist/components/checkbox-input2.js +1 -0
  14. package/dist/components/date-input2.js +3 -12
  15. package/dist/components/email-input2.js +5 -19
  16. package/dist/components/number-input2.js +5 -19
  17. package/dist/components/password-input2.js +1 -0
  18. package/dist/components/radio-input2.js +3 -12
  19. package/dist/components/select-input2.js +3 -15
  20. package/dist/components/tel-input2.js +5 -19
  21. package/dist/components/text-input2.js +1 -0
  22. package/dist/esm/checkbox-input_9.entry.js +27 -90
  23. package/dist/esm/general-input.js +1 -1
  24. package/dist/esm/loader.js +1 -1
  25. package/dist/general-input/general-input.esm.js +1 -1
  26. package/dist/general-input/p-1703fce3.entry.js +1 -0
  27. package/dist/types/components/date-input/date-input.d.ts +0 -5
  28. package/dist/types/components/email-input/email-input.d.ts +0 -5
  29. package/dist/types/components/number-input/number-input.d.ts +0 -5
  30. package/dist/types/components/radio-input/radio-input.d.ts +0 -5
  31. package/dist/types/components/select-input/select-input.d.ts +0 -5
  32. package/dist/types/components/tel-input/tel-input.d.ts +0 -5
  33. package/dist/types/components.d.ts +0 -48
  34. package/package.json +2 -2
  35. package/dist/general-input/p-c9e79656.entry.js +0 -1
@@ -7,17 +7,8 @@ export class SelectInput {
7
7
  */
8
8
  this.options = [];
9
9
  }
10
- checkValidityHandler(newValue) {
11
- if (newValue == true) {
12
- this.isValid = this.setValidity();
13
- this.errorMessage = this.setErrorMessage();
14
- this.validityStateHandler({ valid: this.isValid, name: this.name });
15
- }
16
- }
17
10
  validityChanged() {
18
- if (this.checkValidity == true) {
19
- this.validityStateHandler({ valid: this.isValid, name: this.name });
20
- }
11
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
21
12
  if (this.emitValue == true) {
22
13
  this.valueHandler({ name: this.name, value: this.value });
23
14
  }
@@ -35,10 +26,8 @@ export class SelectInput {
35
26
  }
36
27
  connectedCallback() {
37
28
  this.displayedOptions = this.options;
38
- console.log(this.displayedOptions);
39
29
  }
40
30
  componentWillLoad() {
41
- console.log(this.action, this.options);
42
31
  if (this.action && !this.options.length) {
43
32
  if (this.action.split(" ")[0] == 'GET') {
44
33
  return this.getOptions().then((options) => {
@@ -67,8 +56,9 @@ export class SelectInput {
67
56
  this.value = event.target.value;
68
57
  this.errorMessage = this.setErrorMessage();
69
58
  this.isValid = this.setValidity();
59
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
60
+ this.emitValueHandler(true);
70
61
  this.inputReference.previousElementSibling.classList.remove('select__label--hidden');
71
- console.log(this.action, this.options);
72
62
  }
73
63
  setValidity() {
74
64
  return this.inputReference.validity.valid;
@@ -215,23 +205,6 @@ export class SelectInput {
215
205
  "attribute": "language",
216
206
  "reflect": false
217
207
  },
218
- "checkValidity": {
219
- "type": "boolean",
220
- "mutable": false,
221
- "complexType": {
222
- "original": "boolean",
223
- "resolved": "boolean",
224
- "references": {}
225
- },
226
- "required": false,
227
- "optional": false,
228
- "docs": {
229
- "tags": [],
230
- "text": "State passed down from the parent element. Will trigger the input to check for validity."
231
- },
232
- "attribute": "check-validity",
233
- "reflect": false
234
- },
235
208
  "emitValue": {
236
209
  "type": "boolean",
237
210
  "mutable": false,
@@ -296,9 +269,6 @@ export class SelectInput {
296
269
  }
297
270
  }]; }
298
271
  static get watchers() { return [{
299
- "propName": "checkValidity",
300
- "methodName": "checkValidityHandler"
301
- }, {
302
272
  "propName": "isValid",
303
273
  "methodName": "validityChanged"
304
274
  }, {
@@ -4,17 +4,8 @@ export class TelInput {
4
4
  constructor() {
5
5
  this.validationPattern = '';
6
6
  }
7
- checkValidityHandler(newValue) {
8
- if (newValue == true) {
9
- this.isValid = this.setValidity();
10
- this.errorMessage = this.setErrorMessage();
11
- this.validityStateHandler({ valid: this.isValid, name: this.name });
12
- }
13
- }
14
7
  validityChanged() {
15
- if (this.checkValidity == true) {
16
- this.validityStateHandler({ valid: this.isValid, name: this.name });
17
- }
8
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
18
9
  if (this.emitValue == true) {
19
10
  this.valueHandler({ name: this.name, value: this.value });
20
11
  }
@@ -35,13 +26,10 @@ export class TelInput {
35
26
  }
36
27
  handleInput(event) {
37
28
  this.value = event.target.value;
38
- if (this.debounceTime) {
39
- clearTimeout(this.debounceTime);
40
- }
41
- this.debounceTime = setTimeout(() => {
42
- this.errorMessage = this.setErrorMessage();
43
- this.isValid = this.setValidity();
44
- }, 500);
29
+ this.errorMessage = this.setErrorMessage();
30
+ this.isValid = this.setValidity();
31
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
32
+ this.emitValueHandler(true);
45
33
  }
46
34
  setValidity() {
47
35
  return this.inputReference.validity.valid;
@@ -201,23 +189,6 @@ export class TelInput {
201
189
  "attribute": "language",
202
190
  "reflect": false
203
191
  },
204
- "checkValidity": {
205
- "type": "boolean",
206
- "mutable": false,
207
- "complexType": {
208
- "original": "boolean",
209
- "resolved": "boolean",
210
- "references": {}
211
- },
212
- "required": false,
213
- "optional": false,
214
- "docs": {
215
- "tags": [],
216
- "text": "State passed down from the parent element. Will trigger the input to check for validity."
217
- },
218
- "attribute": "check-validity",
219
- "reflect": false
220
- },
221
192
  "emitValue": {
222
193
  "type": "boolean",
223
194
  "mutable": false,
@@ -282,9 +253,6 @@ export class TelInput {
282
253
  }
283
254
  }]; }
284
255
  static get watchers() { return [{
285
- "propName": "checkValidity",
286
- "methodName": "checkValidityHandler"
287
- }, {
288
256
  "propName": "isValid",
289
257
  "methodName": "validityChanged"
290
258
  }, {
@@ -37,6 +37,7 @@ export class TextInput {
37
37
  this.isValid = this.setValidity();
38
38
  this.errorMessage = this.setErrorMessage();
39
39
  this.validityStateHandler({ valid: this.isValid, name: this.name });
40
+ this.emitValueHandler(true);
40
41
  }
41
42
  setValidity() {
42
43
  return this.inputReference.validity.valid;
@@ -35,6 +35,7 @@ const CheckboxInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
35
35
  this.errorMessage = this.setErrorMessage();
36
36
  this.isValid = this.setValidity();
37
37
  this.validityStateHandler({ valid: this.isValid, name: this.name });
38
+ this.emitValueHandler(true);
38
39
  }
39
40
  setValidity() {
40
41
  return this.inputReference.validity.valid;
@@ -11,17 +11,8 @@ const DateInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
11
11
  this.sendValidityState = createEvent(this, "sendValidityState", 7);
12
12
  this.sendInputValue = createEvent(this, "sendInputValue", 7);
13
13
  }
14
- checkValidityHandler(newValue) {
15
- if (newValue == true) {
16
- this.isValid = this.setValidity();
17
- this.errorMessage = this.setErrorMessage();
18
- this.validityStateHandler({ valid: this.isValid, name: this.name });
19
- }
20
- }
21
14
  validityChanged() {
22
- if (this.checkValidity == true) {
23
- this.validityStateHandler({ valid: this.isValid, name: this.name });
24
- }
15
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
25
16
  if (this.emitValue == true) {
26
17
  this.valueHandler({ name: this.name, value: this.value });
27
18
  }
@@ -41,6 +32,8 @@ const DateInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
41
32
  this.value = event.target.value;
42
33
  this.errorMessage = this.setErrorMessage();
43
34
  this.isValid = this.setValidity();
35
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
36
+ this.emitValueHandler(true);
44
37
  }
45
38
  setValidity() {
46
39
  return this.inputReference.validity.valid;
@@ -57,7 +50,6 @@ const DateInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
57
50
  return h("div", { class: 'date__wrapper' }, h("input", { id: `${this.name}__input`, type: 'date', class: `date__input`, value: this.defaultValue, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, ref: (el) => this.inputReference = el, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onInput: (e) => this.handleInput(e) }), h("label", { class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), h("small", { class: 'date__error-message' }, this.errorMessage));
58
51
  }
59
52
  static get watchers() { return {
60
- "checkValidity": ["checkValidityHandler"],
61
53
  "isValid": ["validityChanged"],
62
54
  "emitValue": ["emitValueHandler"]
63
55
  }; }
@@ -68,7 +60,6 @@ const DateInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
68
60
  "validation": [16],
69
61
  "defaultValue": [1, "default-value"],
70
62
  "language": [1],
71
- "checkValidity": [4, "check-validity"],
72
63
  "emitValue": [4, "emit-value"],
73
64
  "errorMessage": [32],
74
65
  "isValid": [32]
@@ -12,17 +12,8 @@ const EmailInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
12
12
  this.sendInputValue = createEvent(this, "sendInputValue", 7);
13
13
  this.validationPattern = '';
14
14
  }
15
- checkValidityHandler(newValue) {
16
- if (newValue == true) {
17
- this.isValid = this.setValidity();
18
- this.errorMessage = this.setErrorMessage();
19
- this.validityStateHandler({ valid: this.isValid, name: this.name });
20
- }
21
- }
22
15
  validityChanged() {
23
- if (this.checkValidity == true) {
24
- this.validityStateHandler({ valid: this.isValid, name: this.name });
25
- }
16
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
26
17
  if (this.emitValue == true) {
27
18
  this.valueHandler({ name: this.name, value: this.value });
28
19
  }
@@ -43,13 +34,10 @@ const EmailInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
43
34
  }
44
35
  handleInput(event) {
45
36
  this.value = event.target.value;
46
- if (this.debounceTime) {
47
- clearTimeout(this.debounceTime);
48
- }
49
- this.debounceTime = setTimeout(() => {
50
- this.errorMessage = this.setErrorMessage();
51
- this.isValid = this.setValidity();
52
- }, 500);
37
+ this.errorMessage = this.setErrorMessage();
38
+ this.isValid = this.setValidity();
39
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
40
+ this.emitValueHandler(true);
53
41
  }
54
42
  setValidity() {
55
43
  return this.inputReference.validity.valid;
@@ -75,7 +63,6 @@ const EmailInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
75
63
  return h("div", { class: 'email__wrapper' }, h("input", { id: `${this.name}__input`, type: 'email', class: `email__input`, value: this.defaultValue, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, ref: (el) => this.inputReference = el, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: (e) => this.handleInput(e) }), h("label", { class: `email__label ${this.validation.mandatory ? 'email__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("small", { class: 'email__error-message' }, this.errorMessage));
76
64
  }
77
65
  static get watchers() { return {
78
- "checkValidity": ["checkValidityHandler"],
79
66
  "isValid": ["validityChanged"],
80
67
  "emitValue": ["emitValueHandler"]
81
68
  }; }
@@ -87,7 +74,6 @@ const EmailInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
87
74
  "defaultValue": [1, "default-value"],
88
75
  "language": [1],
89
76
  "emitValue": [4, "emit-value"],
90
- "checkValidity": [4, "check-validity"],
91
77
  "errorMessage": [32],
92
78
  "isValid": [32]
93
79
  }]);
@@ -11,17 +11,8 @@ const NumberInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
11
11
  this.sendValidityState = createEvent(this, "sendValidityState", 7);
12
12
  this.sendInputValue = createEvent(this, "sendInputValue", 7);
13
13
  }
14
- checkValidityHandler(newValue) {
15
- if (newValue == true) {
16
- this.isValid = this.setValidity();
17
- this.errorMessage = this.setErrorMessage();
18
- this.validityStateHandler({ valid: this.isValid, name: this.name });
19
- }
20
- }
21
14
  validityChanged() {
22
- if (this.checkValidity == true) {
23
- this.validityStateHandler({ valid: this.isValid, name: this.name });
24
- }
15
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
25
16
  if (this.emitValue == true) {
26
17
  this.valueHandler({ name: this.name, value: this.value });
27
18
  }
@@ -39,13 +30,10 @@ const NumberInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
39
30
  }
40
31
  handleInput(event) {
41
32
  this.value = event.target.value;
42
- if (this.debounceTime) {
43
- clearTimeout(this.debounceTime);
44
- }
45
- this.debounceTime = setTimeout(() => {
46
- this.errorMessage = this.setErrorMessage();
47
- this.isValid = this.setValidity();
48
- }, 500);
33
+ this.errorMessage = this.setErrorMessage();
34
+ this.isValid = this.setValidity();
35
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
36
+ this.emitValueHandler(true);
49
37
  }
50
38
  setValidity() {
51
39
  return this.inputReference.validity.valid;
@@ -63,7 +51,6 @@ const NumberInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
63
51
  return h("div", { class: 'number__wrapper' }, h("input", { ref: (el) => this.inputReference = el, type: "number", value: this.defaultValue, id: `${this.name}__input`, class: `number__input ${invalidClass}`, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onInput: (e) => this.handleInput(e) }), h("label", { class: `number__label ${this.validation.mandatory ? 'number__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("small", { class: 'number__error-message' }, this.errorMessage));
64
52
  }
65
53
  static get watchers() { return {
66
- "checkValidity": ["checkValidityHandler"],
67
54
  "isValid": ["validityChanged"],
68
55
  "emitValue": ["emitValueHandler"]
69
56
  }; }
@@ -74,7 +61,6 @@ const NumberInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
74
61
  "validation": [16],
75
62
  "defaultValue": [2, "default-value"],
76
63
  "language": [1],
77
- "checkValidity": [4, "check-validity"],
78
64
  "emitValue": [4, "emit-value"],
79
65
  "errorMessage": [32],
80
66
  "isValid": [32]
@@ -37,6 +37,7 @@ const PasswordInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
37
37
  this.errorMessage = this.setErrorMessage();
38
38
  this.isValid = this.setValidity();
39
39
  this.validityStateHandler({ valid: this.isValid, name: this.name });
40
+ this.emitValueHandler(true);
40
41
  }
41
42
  setValidity() {
42
43
  return this.inputReference.validity.valid;
@@ -11,17 +11,8 @@ const RadioInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
11
11
  this.sendInputValue = createEvent(this, "sendInputValue", 7);
12
12
  this.sendValidityState = createEvent(this, "sendValidityState", 7);
13
13
  }
14
- checkValidityHandler(newValue) {
15
- if (newValue == true) {
16
- this.isValid = this.setValidity();
17
- this.errorMessage = this.setErrorMessage();
18
- this.validityStateHandler({ valid: this.isValid, name: this.name });
19
- }
20
- }
21
14
  validityChanged() {
22
- if (this.checkValidity == true) {
23
- this.validityStateHandler({ valid: this.isValid, name: this.name });
24
- }
15
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
25
16
  if (this.emitValue == true) {
26
17
  this.valueHandler({ name: this.name, value: this.value });
27
18
  }
@@ -43,6 +34,8 @@ const RadioInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
43
34
  this.value = event.target.value;
44
35
  this.isValid = this.setValidity();
45
36
  this.errorMessage = this.setErrorMessage();
37
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
38
+ this.emitValueHandler(true);
46
39
  }
47
40
  setValidity() {
48
41
  return this.inputReference.validity.valid;
@@ -56,7 +49,6 @@ const RadioInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
56
49
  return h("fieldset", { class: 'radio__fieldset' }, h("legend", { class: 'radio__legend' }, this.displayName, ":"), this.optionsGroup.map(option => h("div", { class: 'radio__wrapper' }, h("input", { type: "radio", class: 'radio__input', id: `${option.label}__input`, ref: (el) => this.inputReference = el, value: option.value, name: this.name, required: this.validation.mandatory, onClick: (e) => this.handleClick(e) }), h("label", { htmlFor: `${option.label}__input` }, option.label))), h("small", { class: 'radio__error-message' }, this.errorMessage));
57
50
  }
58
51
  static get watchers() { return {
59
- "checkValidity": ["checkValidityHandler"],
60
52
  "isValid": ["validityChanged"],
61
53
  "emitValue": ["emitValueHandler"]
62
54
  }; }
@@ -67,7 +59,6 @@ const RadioInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
67
59
  "optionsGroup": [16],
68
60
  "validation": [16],
69
61
  "language": [1],
70
- "checkValidity": [4, "check-validity"],
71
62
  "emitValue": [4, "emit-value"],
72
63
  "errorMessage": [32],
73
64
  "isValid": [32]
@@ -15,17 +15,8 @@ const SelectInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
15
15
  */
16
16
  this.options = [];
17
17
  }
18
- checkValidityHandler(newValue) {
19
- if (newValue == true) {
20
- this.isValid = this.setValidity();
21
- this.errorMessage = this.setErrorMessage();
22
- this.validityStateHandler({ valid: this.isValid, name: this.name });
23
- }
24
- }
25
18
  validityChanged() {
26
- if (this.checkValidity == true) {
27
- this.validityStateHandler({ valid: this.isValid, name: this.name });
28
- }
19
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
29
20
  if (this.emitValue == true) {
30
21
  this.valueHandler({ name: this.name, value: this.value });
31
22
  }
@@ -43,10 +34,8 @@ const SelectInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
43
34
  }
44
35
  connectedCallback() {
45
36
  this.displayedOptions = this.options;
46
- console.log(this.displayedOptions);
47
37
  }
48
38
  componentWillLoad() {
49
- console.log(this.action, this.options);
50
39
  if (this.action && !this.options.length) {
51
40
  if (this.action.split(" ")[0] == 'GET') {
52
41
  return this.getOptions().then((options) => {
@@ -75,8 +64,9 @@ const SelectInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
75
64
  this.value = event.target.value;
76
65
  this.errorMessage = this.setErrorMessage();
77
66
  this.isValid = this.setValidity();
67
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
68
+ this.emitValueHandler(true);
78
69
  this.inputReference.previousElementSibling.classList.remove('select__label--hidden');
79
- console.log(this.action, this.options);
80
70
  }
81
71
  setValidity() {
82
72
  return this.inputReference.validity.valid;
@@ -93,7 +83,6 @@ const SelectInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
93
83
  })), h("small", { class: 'select__error-message' }, this.errorMessage));
94
84
  }
95
85
  static get watchers() { return {
96
- "checkValidity": ["checkValidityHandler"],
97
86
  "isValid": ["validityChanged"],
98
87
  "emitValue": ["emitValueHandler"]
99
88
  }; }
@@ -105,7 +94,6 @@ const SelectInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
105
94
  "options": [16],
106
95
  "validation": [16],
107
96
  "language": [1],
108
- "checkValidity": [4, "check-validity"],
109
97
  "emitValue": [4, "emit-value"],
110
98
  "errorMessage": [32],
111
99
  "isValid": [32]
@@ -12,17 +12,8 @@ const TelInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
12
12
  this.sendInputValue = createEvent(this, "sendInputValue", 7);
13
13
  this.validationPattern = '';
14
14
  }
15
- checkValidityHandler(newValue) {
16
- if (newValue == true) {
17
- this.isValid = this.setValidity();
18
- this.errorMessage = this.setErrorMessage();
19
- this.validityStateHandler({ valid: this.isValid, name: this.name });
20
- }
21
- }
22
15
  validityChanged() {
23
- if (this.checkValidity == true) {
24
- this.validityStateHandler({ valid: this.isValid, name: this.name });
25
- }
16
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
26
17
  if (this.emitValue == true) {
27
18
  this.valueHandler({ name: this.name, value: this.value });
28
19
  }
@@ -43,13 +34,10 @@ const TelInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
43
34
  }
44
35
  handleInput(event) {
45
36
  this.value = event.target.value;
46
- if (this.debounceTime) {
47
- clearTimeout(this.debounceTime);
48
- }
49
- this.debounceTime = setTimeout(() => {
50
- this.errorMessage = this.setErrorMessage();
51
- this.isValid = this.setValidity();
52
- }, 500);
37
+ this.errorMessage = this.setErrorMessage();
38
+ this.isValid = this.setValidity();
39
+ this.validityStateHandler({ valid: this.isValid, name: this.name });
40
+ this.emitValueHandler(true);
53
41
  }
54
42
  setValidity() {
55
43
  return this.inputReference.validity.valid;
@@ -76,7 +64,6 @@ const TelInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
76
64
  return h("div", { class: 'tel__wrapper' }, h("input", { type: "tel", ref: (el) => this.inputReference = el, id: `${this.name}__input`, value: this.defaultValue, class: `tel__input ${invalidClass}`, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, pattern: this.validationPattern, onInput: (e) => this.handleInput(e) }), h("label", { class: `tel__label ${this.validation.mandatory ? 'tel__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("small", { class: 'tel__error-message' }, this.errorMessage));
77
65
  }
78
66
  static get watchers() { return {
79
- "checkValidity": ["checkValidityHandler"],
80
67
  "isValid": ["validityChanged"],
81
68
  "emitValue": ["emitValueHandler"]
82
69
  }; }
@@ -89,7 +76,6 @@ const TelInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
89
76
  "validation": [16],
90
77
  "defaultValue": [8, "default-value"],
91
78
  "language": [1],
92
- "checkValidity": [4, "check-validity"],
93
79
  "emitValue": [4, "emit-value"],
94
80
  "isValid": [32],
95
81
  "errorMessage": [32]
@@ -45,6 +45,7 @@ const TextInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
45
45
  this.isValid = this.setValidity();
46
46
  this.errorMessage = this.setErrorMessage();
47
47
  this.validityStateHandler({ valid: this.isValid, name: this.name });
48
+ this.emitValueHandler(true);
48
49
  }
49
50
  setValidity() {
50
51
  return this.inputReference.validity.valid;