ui-core-abv 0.10.3 → 0.10.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.
@@ -1,6 +1,11 @@
1
1
  import { FormGroup } from '@angular/forms';
2
2
  import { uicFormValuesRecord } from './form.models';
3
+ import { AppSelectOption } from '../inputs/select/select.component';
3
4
  import * as i0 from "@angular/core";
5
+ export interface UicRowFieldOptionsState {
6
+ options?: AppSelectOption[];
7
+ loading?: boolean;
8
+ }
4
9
  export declare class UicFormStateService {
5
10
  private readonly destroyRef;
6
11
  private formValueSignal;
@@ -10,6 +15,15 @@ export declare class UicFormStateService {
10
15
  form: import("@angular/core").Signal<FormGroup<any> | null>;
11
16
  setForm(form: FormGroup): void;
12
17
  constructor();
18
+ /**
19
+ * Opciones de subcampos de repeater resueltas por ítem (optionsSource con dependsOn).
20
+ * Cada FormGroup de ítem guarda las suyas; el registro se reemplaza (inmutable) en cada cambio
21
+ * para que los consumidores puedan memoizar por referencia.
22
+ */
23
+ private readonly rowFieldOptions;
24
+ readonly rowFieldOptionsVersion: import("@angular/core").WritableSignal<number>;
25
+ setRowFieldOptions(row: FormGroup, fieldName: string, state: Partial<UicRowFieldOptionsState>): void;
26
+ getRowFieldOptions(row: FormGroup): Record<string, UicRowFieldOptionsState> | undefined;
13
27
  getFieldValue(fieldName: string): any;
14
28
  static ɵfac: i0.ɵɵFactoryDeclaration<UicFormStateService, never>;
15
29
  static ɵprov: i0.ɵɵInjectableDeclaration<UicFormStateService>;
@@ -43,6 +43,9 @@ export declare class UicFormWrapperComponent implements OnInit, OnChanges, OnDes
43
43
  private formValueSub;
44
44
  private readonly optionSourceSubs;
45
45
  private readonly optionSourceDependencyValueByField;
46
+ private readonly rowOptionSourceSubs;
47
+ private readonly rowOptionSourceDependencyKeys;
48
+ private readonly formState;
46
49
  private readonly computedFieldSubs;
47
50
  private readonly computedFieldDependencySignatureByField;
48
51
  private readonly computedExternalValidationLastValue;
@@ -69,6 +72,14 @@ export declare class UicFormWrapperComponent implements OnInit, OnChanges, OnDes
69
72
  private updateFieldOptions;
70
73
  private updateOptionsSources;
71
74
  private updateRepeaterSubFieldOptionsSources;
75
+ /**
76
+ * Subcampos con optionsSource.dependsOn: cada ítem resuelve sus propias opciones.
77
+ * La dependencia sigue la regla de ámbito "gana el hermano": primero el ítem, luego el raíz
78
+ * (las relaciones van de menor a mayor o igual ámbito, nunca raíz -> ítem).
79
+ */
80
+ private updateRowScopedSubFieldOptionsSources;
81
+ private resolveRowSubFieldOptionsSource;
82
+ private handleRowOptionsSourceError;
72
83
  private resolveRepeaterSubFieldOptionsSource;
73
84
  private updateRepeaterSubFieldOptionsState;
74
85
  private updateDependentOptionsSources;
@@ -81,7 +92,9 @@ export declare class UicFormWrapperComponent implements OnInit, OnChanges, OnDes
81
92
  private renderOptionsSourceTemplate;
82
93
  private updateFieldOptionsState;
83
94
  private clearInvalidFieldValue;
95
+ private clearInvalidControlValue;
84
96
  private clearFieldValue;
97
+ private clearControlValue;
85
98
  private hasUsableOptionsSource;
86
99
  private supportsOptions;
87
100
  private isValidOptionId;
@@ -1,9 +1,11 @@
1
1
  import { OnInit } from '@angular/core';
2
- import { FormArray, FormGroup } from '@angular/forms';
2
+ import { AbstractControl, FormArray, FormGroup } from '@angular/forms';
3
3
  import { FormField, SelectOptionsResolver } from '../form.models';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class UicRepeaterComponent implements OnInit {
6
6
  private readonly fb;
7
+ private readonly formState;
8
+ private readonly itemFieldsCache;
7
9
  formArray: FormArray;
8
10
  field: FormField;
9
11
  cols: number;
@@ -13,6 +15,11 @@ export declare class UicRepeaterComponent implements OnInit {
13
15
  parentForm?: FormGroup;
14
16
  getParentFormValues(): Record<string, any>;
15
17
  ngOnInit(): void;
18
+ /**
19
+ * Subcampos del ítem con las opciones resueltas para ese ítem (optionsSource con dependsOn).
20
+ * Se memoiza por referencia para no recrear los FormField en cada ciclo de detección.
21
+ */
22
+ getItemFields(control: AbstractControl): FormField[];
16
23
  getGroup(index: number): FormGroup;
17
24
  addGroup(): void;
18
25
  removeGroup(index: number): void;
@@ -40,6 +40,7 @@ export declare class BlockEditorComponent {
40
40
  requestDeleteBlock(e: Event): void;
41
41
  deleteField(fieldCode: string, e: Event): void;
42
42
  isVisibilityParent(fieldCode: string): boolean;
43
+ isSubFieldVisibilityParent(parentField: EditableField, sfCode: string): boolean;
43
44
  isBlockVisibilityParent(): boolean;
44
45
  reorderFields(event: CdkDragDrop<EditableField[]>): void;
45
46
  static ɵfac: i0.ɵɵFactoryDeclaration<BlockEditorComponent, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-core-abv",
3
- "version": "0.10.3",
3
+ "version": "0.10.5",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=19.2.0 <21.0.0",
6
6
  "@angular/core": ">=19.2.0 <21.0.0",