@haiilo/catalyst 5.2.0 → 5.2.1

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.
@@ -3287,7 +3287,13 @@ const CatInput = class {
3287
3287
  ? value.reduce((acc, err) => (Object.assign(Object.assign({}, acc), { [err]: undefined })), {})
3288
3288
  : value === true
3289
3289
  ? {}
3290
- : value || undefined;
3290
+ : Object.assign({}, value) || undefined;
3291
+ if (typeof this.errorUpdate === 'number') {
3292
+ this.showErrorAfterTimeout(this.errorUpdate);
3293
+ }
3294
+ else {
3295
+ this.errorMap = this.errorMapSrc;
3296
+ }
3291
3297
  }
3292
3298
  }
3293
3299
  render() {
@@ -3314,8 +3320,7 @@ const CatInput = class {
3314
3320
  this.value = this.input.value;
3315
3321
  this.catChange.emit(event);
3316
3322
  if (typeof this.errorUpdate === 'number') {
3317
- typeof this.errorUpdateTimeoutId === 'number' && window.clearTimeout(this.errorUpdateTimeoutId);
3318
- this.errorUpdateTimeoutId = window.setTimeout(() => (this.errorMap = this.errorMapSrc), this.errorUpdate);
3323
+ this.showErrorAfterTimeout(this.errorUpdate);
3319
3324
  }
3320
3325
  }
3321
3326
  onFocus(event) {
@@ -3327,6 +3332,10 @@ const CatInput = class {
3327
3332
  this.errorMap = this.errorMapSrc;
3328
3333
  }
3329
3334
  }
3335
+ showErrorAfterTimeout(timeout) {
3336
+ typeof this.errorUpdateTimeoutId === 'number' && window.clearTimeout(this.errorUpdateTimeoutId);
3337
+ this.errorUpdateTimeoutId = window.setTimeout(() => (this.errorMap = this.errorMapSrc), timeout);
3338
+ }
3330
3339
  get hostElement() { return index.getElement(this); }
3331
3340
  static get watchers() { return {
3332
3341
  "errors": ["watchErrorsHandler"]