commons-shared-web-ui 0.0.49 → 0.0.51

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
@@ -4,7 +4,7 @@ import * as i2 from '@angular/material/snack-bar';
4
4
  import { MatSnackBar, MatSnackBarRef } from '@angular/material/snack-bar';
5
5
  import * as i2$1 from '@angular/common';
6
6
  import * as i3$1 from '@angular/forms';
7
- import { FormGroup, FormControl, FormArray, FormBuilder, ValidatorFn, ControlValueAccessor, AbstractControl, ValidationErrors } from '@angular/forms';
7
+ import { FormGroup, FormArray, FormControl, FormBuilder, ValidatorFn, ControlValueAccessor, AbstractControl, ValidationErrors } from '@angular/forms';
8
8
  import { HttpClient, HttpHeaders } from '@angular/common/http';
9
9
  import * as i3$2 from '@angular/router';
10
10
  import { Router, ActivatedRoute } from '@angular/router';
@@ -1298,6 +1298,16 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
1298
1298
  * between different instances of the same repeater row.
1299
1299
  */
1300
1300
  allowMulti: boolean;
1301
+ /**
1302
+ * The repeater's FormArray, set only when this field instance lives inside an
1303
+ * allowMulti section (see FormSectionComponent). Lets a single-select DROPDOWN
1304
+ * exclude values already chosen by sibling instances — e.g. picking "English" in
1305
+ * Language Details #1 removes it from Language Details #2's options — without any
1306
+ * schema-level config (see displayOptionList/displayLocalOptionList below).
1307
+ */
1308
+ siblingFormArray: FormArray | null;
1309
+ /** This instance's own index within siblingFormArray — excluded from the "taken values" set. */
1310
+ siblingIndex: number | null;
1301
1311
  value: any;
1302
1312
  isVisible: boolean;
1303
1313
  showPassword: boolean;
@@ -1520,6 +1530,15 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
1520
1530
  onDocumentClick(): void;
1521
1531
  onEscapeKey(): void;
1522
1532
  get multiSelectedCount(): number;
1533
+ /** True when this is a single-select DROPDOWN living inside an allowMulti repeater. */
1534
+ private get _excludesSiblingValues();
1535
+ /** Values currently chosen for this field name by OTHER instances in the repeater. */
1536
+ private get _siblingTakenValues();
1537
+ private _excludeTaken;
1538
+ /** Options for the custom single-select dropdown, with sibling-taken values hidden. */
1539
+ get displayOptionList(): any[];
1540
+ /** Options for the native <select>/radio rendering, with sibling-taken values hidden. */
1541
+ get displayLocalOptionList(): any[];
1523
1542
  /** Initialise the RxJS search stream for dropdown filtering. */
1524
1543
  private initDropdownSearch;
1525
1544
  /** Execute client-side or server-side dropdown search. */
@@ -1636,7 +1655,7 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
1636
1655
  getLocationMapEmbedUrl(): string;
1637
1656
  private _renderMap;
1638
1657
  static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldComponent, never>;
1639
- static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldComponent, "lib-form-field", never, { "config": { "alias": "config"; "required": false; }; "controller": { "alias": "controller"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "allowMulti": { "alias": "allowMulti"; "required": false; }; }, {}, never, never, false, never>;
1658
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldComponent, "lib-form-field", never, { "config": { "alias": "config"; "required": false; }; "controller": { "alias": "controller"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "allowMulti": { "alias": "allowMulti"; "required": false; }; "siblingFormArray": { "alias": "siblingFormArray"; "required": false; }; "siblingIndex": { "alias": "siblingIndex"; "required": false; }; }, {}, never, never, false, never>;
1640
1659
  }
1641
1660
 
1642
1661
  declare class SmartFormComponent implements OnInit, OnChanges, OnDestroy {
@@ -1780,8 +1799,16 @@ declare class SmartFormComponent implements OnInit, OnChanges, OnDestroy {
1780
1799
  * displays it; showing it again inside the content would be redundant. */
1781
1800
  getSectionStepConfig(step: FieldConfig): any;
1782
1801
  private _emitStepChange;
1783
- /** Marks all controls in the given step as touched and records valid/warning state. */
1802
+ /** Marks all controls in the given step as touched, records valid/warning state,
1803
+ * and returns whether the step had any invalid control. */
1784
1804
  private _validateStep;
1805
+ /** Public hard-validation check for the host app: does the CURRENT step have any
1806
+ * invalid required field? navigateToNext()/goToSectionStep() only mark a step's badge
1807
+ * as a soft "warning" and still advance regardless — hosts that need to actually BLOCK
1808
+ * navigation until required fields are filled (e.g. the beneficiary add/edit wizard)
1809
+ * should call this before invoking navigateToNext(). Also marks the step's controls as
1810
+ * touched so the field-level error states render immediately. */
1811
+ isCurrentStepValid(): boolean;
1785
1812
  /** Recursively collects all leaf field names from a set of FieldConfigs. */
1786
1813
  private _collectFieldNames;
1787
1814
  get nextLabel(): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commons-shared-web-ui",
3
- "version": "0.0.49",
3
+ "version": "0.0.51",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "20.3.15",
6
6
  "@angular/cdk": "20.2.14",