ngx-eiffage-material 0.1.3 → 0.1.5

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/index.d.ts CHANGED
@@ -710,6 +710,9 @@ declare class NgxBasicSelect<T> implements ControlValueAccessor {
710
710
  * y para no fallar cuando el componente se usa sin formulario.
711
711
  */
712
712
  private readonly _ngControl;
713
+ /** Formulario contenedor, para saber si ya se intentó enviar (reactive o template-driven). */
714
+ private readonly _parentFormGroup;
715
+ private readonly _parentForm;
713
716
  readonly label: _angular_core.InputSignal<string>;
714
717
  readonly options: _angular_core.InputSignal<T[]>;
715
718
  readonly basicSelectConfig: _angular_core.InputSignal<BasicSelectConfig<T>>;
@@ -759,7 +762,13 @@ declare class NgxBasicSelect<T> implements ControlValueAccessor {
759
762
  protected readonly showNoOptionsMessage: _angular_core.Signal<boolean>;
760
763
  /** Mensaje aria-live con el recuento de resultados al filtrar. */
761
764
  protected readonly searchAnnouncement: _angular_core.Signal<string>;
762
- /** ErrorStateMatcher que refleja el estado del control del formulario. */
765
+ /**
766
+ * ErrorStateMatcher que refleja el estado del control del formulario.
767
+ * Replica el criterio por defecto de Material: se muestra el error si el
768
+ * control es inválido y además ha sido tocado O ya se ha enviado el
769
+ * formulario. Sin la parte de `submitted`, al pulsar "Guardar" los campos
770
+ * obligatorios que el usuario no llegó a tocar no se marcaban en rojo.
771
+ */
763
772
  protected readonly errorStateMatcher: ErrorStateMatcher;
764
773
  /**
765
774
  * Obligatorio si el control del formulario tiene el validador `required`.
@@ -767,6 +776,8 @@ declare class NgxBasicSelect<T> implements ControlValueAccessor {
767
776
  * asterisco, igual que hace Material con un `<input matInput>`.
768
777
  */
769
778
  protected isRequired(): boolean;
779
+ /** true cuando el formulario contenedor ya ha intentado enviarse. */
780
+ private _isParentFormSubmitted;
770
781
  constructor();
771
782
  writeValue(value: any): void;
772
783
  registerOnChange(fn: (value: any) => void): void;
@@ -1101,6 +1112,9 @@ declare class NgxPaginatedSelect<T, U extends PaginatedFilter<T>> implements Con
1101
1112
  private readonly _bottomSheet;
1102
1113
  /** Se auto-registra como CVA (self/optional para leer validación y no fallar sin form). */
1103
1114
  private readonly _ngControl;
1115
+ /** Formulario contenedor, para saber si ya se intento enviar (reactive o template-driven). */
1116
+ private readonly _parentFormGroup;
1117
+ private readonly _parentForm;
1104
1118
  readonly intl: NgxTablesIntl;
1105
1119
  /** Label that floats on the form field */
1106
1120
  readonly label: _angular_core.InputSignal<string>;
@@ -1180,6 +1194,8 @@ declare class NgxPaginatedSelect<T, U extends PaginatedFilter<T>> implements Con
1180
1194
  protected readonly remainingChipsCount: _angular_core.Signal<number>;
1181
1195
  /** ErrorStateMatcher que refleja el estado del control del formulario. */
1182
1196
  protected readonly errorStateMatcher: ErrorStateMatcher;
1197
+ /** true cuando el formulario contenedor ya ha intentado enviarse. */
1198
+ private _isParentFormSubmitted;
1183
1199
  /**
1184
1200
  * Obligatorio si el control del formulario tiene el validador `required`.
1185
1201
  * Se propaga al input interno para que el mat-form-field pinte el asterisco,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-eiffage-material",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "^20.0.0",
6
6
  "@angular/common": "^20.1.0",