@fuentis/phoenix-ui 0.0.9-alpha.655 → 0.0.9-alpha.657

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.
@@ -37,7 +37,7 @@ import * as i5 from 'primeng/inputicon';
37
37
  import { InputIconModule } from 'primeng/inputicon';
38
38
  import * as i2$5 from 'primeng/message';
39
39
  import { MessageModule } from 'primeng/message';
40
- import { Subject, debounceTime, switchMap, of, catchError, map, BehaviorSubject, combineLatestWith, distinctUntilChanged, combineLatest, merge, firstValueFrom } from 'rxjs';
40
+ import { Subject, debounceTime, switchMap, of, catchError, map, BehaviorSubject, merge, distinctUntilChanged, combineLatest, firstValueFrom } from 'rxjs';
41
41
  import * as i4$3 from '@angular/common/http';
42
42
  import { HttpParams } from '@angular/common/http';
43
43
  import * as i2$1 from '@angular/forms';
@@ -4926,7 +4926,6 @@ class InlineFieldError {
4926
4926
  this.translateService = translateService;
4927
4927
  }
4928
4928
  sub$;
4929
- metaFormService = inject(MetaFormService);
4930
4929
  loaded = false;
4931
4930
  ngOnChanges() {
4932
4931
  if (this.ctrl && !this.loaded) {
@@ -4934,24 +4933,17 @@ class InlineFieldError {
4934
4933
  ///this is only for async validators for name and title. Remove this one, we have this in onChange() method
4935
4934
  this.ctrl.updateValueAndValidity();
4936
4935
  }
4937
- this.sub$ = this.ctrl?.statusChanges
4938
- ?.pipe(combineLatestWith(this.metaFormService.formReadOnlyState))
4939
- .subscribe((arr) => {
4940
- if (arr[0] !== 'VALID') {
4941
- setTimeout(() => {
4942
- this.note = this.getErrorMessage(this.ctrl);
4943
- });
4944
- }
4945
- else {
4946
- setTimeout(() => {
4947
- this.note = null;
4948
- });
4949
- }
4950
- // if (arr[1]) {
4951
- // setTimeout(() => {
4952
- // this.note = null;
4953
- // });
4954
- // }
4936
+ // Recompute on BOTH status and value changes so the message clears as soon
4937
+ // as the input becomes valid — not only on blur/next status transition
4938
+ // (a sync validator like TIMEPERIOD can leave the status unchanged between
4939
+ // keystrokes while the value goes valid).
4940
+ this.sub$ = merge(this.ctrl.statusChanges, this.ctrl.valueChanges).subscribe(() => {
4941
+ setTimeout(() => {
4942
+ this.note =
4943
+ this.ctrl.status === 'VALID'
4944
+ ? null
4945
+ : this.getErrorMessage(this.ctrl);
4946
+ });
4955
4947
  });
4956
4948
  this.loaded = true;
4957
4949
  }