@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.
- package/dist/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/p-da9b125a.entry.js +10 -0
- package/dist/catalyst/p-da9b125a.entry.js.map +1 -0
- package/dist/cjs/cat-alert_24.cjs.entry.js +12 -3
- package/dist/cjs/cat-alert_24.cjs.entry.js.map +1 -1
- package/dist/collection/components/cat-input/cat-input.js +12 -3
- package/dist/collection/components/cat-input/cat-input.js.map +1 -1
- package/dist/components/cat-input.js +12 -3
- package/dist/components/cat-input.js.map +1 -1
- package/dist/esm/cat-alert_24.entry.js +12 -3
- package/dist/esm/cat-alert_24.entry.js.map +1 -1
- package/dist/types/components/cat-input/cat-input.d.ts +2 -1
- package/package.json +2 -2
- package/dist/catalyst/p-f5ab9cae.entry.js +0 -10
- package/dist/catalyst/p-f5ab9cae.entry.js.map +0 -1
|
@@ -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
|
-
|
|
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"]
|