@suntelecoms/ngx-dynamic-form 1.4.2 → 1.5.0

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.
@@ -24,6 +24,11 @@ export declare class DynamicFieldComponent implements OnInit {
24
24
  locationError: string;
25
25
  readonly phoneCountries: PhoneCountry[];
26
26
  selectedPhoneCountry: PhoneCountry;
27
+ phoneSearch: string;
28
+ /** Chiffres locaux courants (hors indicatif), tenus à jour par `applyPhoneMask` — évite de les re-dériver de la valeur E.164 complète du formControl (qui contient déjà l'ancien indicatif). */
29
+ private phoneLocalDigits;
30
+ get filteredPhoneCountries(): PhoneCountry[];
31
+ selectPhoneCountry(country: PhoneCountry): void;
27
32
  getLocation(): void;
28
33
  private _geoError;
29
34
  onPhoneSelectChange(event: Event): void;
@@ -31,8 +36,23 @@ export declare class DynamicFieldComponent implements OnInit {
31
36
  get hostStyle(): Record<string, string>;
32
37
  get hostClass(): string;
33
38
  ngOnInit(): void;
39
+ private resolveOptions;
34
40
  private resolveStaticOptions;
41
+ /** Liste brute (non filtrée) mise en cache pour `dependsOnMode: 'client'`. */
42
+ private rawRemoteItems;
43
+ /** Refiltre localement `rawRemoteItems` (mode `dependsOnMode: 'client'`) selon la valeur courante du champ `dependsOn`. */
44
+ private applyClientFilter;
45
+ /** Remplace les `{{cléDeChamp}}` d'une URL par la valeur courante du champ correspondant dans ce formulaire. */
46
+ private interpolateUrl;
47
+ /** @param cacheRaw Conserve la réponse brute dans `rawRemoteItems` pour un filtrage local ultérieur, au lieu de la mapper directement dans `resolvedOptions`. */
35
48
  private loadRemoteOptions;
49
+ /**
50
+ * Une réponse d'API select-options peut déjà être un tableau brut, ou
51
+ * être enveloppée (ex: { data: [...], total: N }). `responseDataKey`
52
+ * force explicitement la clé à utiliser ; sinon 'data' est essayé en
53
+ * repli automatique, la convention la plus courante.
54
+ */
55
+ private extractOptionsArray;
36
56
  get formControl(): FormControl;
37
57
  /**
38
58
  * Masque de saisie : # = chiffre, tout autre caractère = séparateur littéral.
@@ -4,6 +4,7 @@ export interface SelectOption {
4
4
  value: any;
5
5
  disabled?: boolean;
6
6
  group?: string;
7
+ dependsOnValue?: any;
7
8
  }
8
9
  export interface FieldValidation {
9
10
  required?: boolean;
@@ -43,6 +44,11 @@ export interface DynamicFormField {
43
44
  url?: string;
44
45
  displayName?: string;
45
46
  displayValue?: string;
47
+ responseDataKey?: string;
48
+ dependsOn?: string;
49
+ dependsOnMode?: 'server' | 'client';
50
+ dependsOnItemKey?: string;
51
+ dependsOnOffset?: number;
46
52
  validation?: FieldValidation;
47
53
  col?: 1 | 2 | 3 | 4 | 6 | 8 | 9 | 12;
48
54
  cssClass?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suntelecoms/ngx-dynamic-form",
3
- "version": "1.4.2",
3
+ "version": "1.5.0",
4
4
  "description": "Générateur de formulaires Angular dynamiques — SUNTELECOMS",
5
5
  "author": "Amadou Diallo <amadoumacbookpro38@gmail.com>",
6
6
  "license": "MIT",
@@ -10,7 +10,8 @@
10
10
  "@angular/forms": ">=19.0.0",
11
11
  "@angular/router": ">=19.0.0",
12
12
  "@angular/material": ">=19.0.0",
13
- "@angular/cdk": ">=19.0.0"
13
+ "@angular/cdk": ">=19.0.0",
14
+ "flag-icons": ">=7.0.0"
14
15
  },
15
16
  "keywords": [
16
17
  "angular",